diff --git a/packages/google-cloud-cloudsecuritycompliance/.eslintrc.json b/packages/google-cloud-cloudsecuritycompliance/.eslintrc.json index 782153495464..3e8d97ccb390 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/packages/google-cloud-cloudsecuritycompliance/.gitattributes b/packages/google-cloud-cloudsecuritycompliance/.gitattributes new file mode 100644 index 000000000000..33739cb74e44 --- /dev/null +++ b/packages/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/packages/google-cloud-cloudsecuritycompliance/CODE_OF_CONDUCT.md b/packages/google-cloud-cloudsecuritycompliance/CODE_OF_CONDUCT.md new file mode 100644 index 000000000000..2add2547a812 --- /dev/null +++ b/packages/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/packages/google-cloud-cloudsecuritycompliance/CONTRIBUTING.md b/packages/google-cloud-cloudsecuritycompliance/CONTRIBUTING.md new file mode 100644 index 000000000000..1cc1cbcd1e54 --- /dev/null +++ b/packages/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/packages/google-cloud-cloudsecuritycompliance/LICENSE b/packages/google-cloud-cloudsecuritycompliance/LICENSE new file mode 100644 index 000000000000..d64569567334 --- /dev/null +++ b/packages/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/packages/google-cloud-cloudsecuritycompliance/protos/google/cloud/cloudsecuritycompliance/v1/common.proto b/packages/google-cloud-cloudsecuritycompliance/protos/google/cloud/cloudsecuritycompliance/v1/common.proto index 5622291469d9..4f950a71499b 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 9ef74423c8e0..85c153b90b96 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 343819f0f4bb..be772f7cfb90 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 a8c4fc0ff03e..b2a5c3eae33b 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 3c290d62d46d..7d8d15d1f33a 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 62e842d9106f..e0d9a03dc52b 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 1e06d3fb2aa2..a18874f53aa7 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 a27751c3bf32..ba921be782e4 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 fb75d0fc7edb..01b7f00be2c0 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 04efe4151222..341e9f4f6a7d 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 17fe4ed34267..103c52a4a93f 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 29955d50b421..cb9b86d83822 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 1ef1174ee9ac..3c883cf3035c 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 d16665ecaa71..b6888455f71b 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 9104ed928d9c..f37c2a647dc4 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 09716ce22949..6d1895cfa543 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 a43adaac23ed..061be6c79d56 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 f822f7467813..5700b2100ded 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 faec1c1970c6..8bd828cc6a74 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 56702d12dd88..3b79a1db407f 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 2e5621704271..df8505aaffd8 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 dc674c028db6..15537e784c6b 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 2c43ee380c9e..b93c05a9230f 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 044c7dcaed48..c60712c3a159 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 44306d945d02..ef8d67c8ff4a 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 4a2c4475e336..4424c6801d22 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 454129022796..ae9357e32402 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 31130cdfa4f8..b7dba1fd676f 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 6286e4c2caa7..71b4dc65ffa5 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 394f3362d203..f66069aa3940 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 15437030df8d..731fc0c5c8ca 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 14d9a1c2657e..7a0c86fb9145 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 a789d6e10e60..cdad6d139710 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 30fab6d77009..d3887b2ab372 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 6b2b6658f860..3e72919f3048 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)); + }); + }); }); });