diff --git a/.gitignore b/.gitignore index 50656545db..e0cd0f3107 100644 --- a/.gitignore +++ b/.gitignore @@ -63,7 +63,6 @@ Thumbs.db # root; tools with their own go.mod land beside their source. Build with # `-o bin/`, which is ignored above. /validate-image-cache -/setup-gcp /tools/apitool/apitool /tools/junittool/junittool diff --git a/AGENTS.md b/AGENTS.md index 30b87bdd71..00e8828529 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -66,7 +66,7 @@ It takes the Kubernetes control-plane out of the critical path to achieve lower Agent Substrate relies on the fact that agent-like applications tend to be idle most of the time to achieve heavy multiplexing. For development, it's recommended to read the `README.md` and `CONTRIBUTING.md` in the root folder. -See `cmd/ate-setup` and `tools/setup-gcp` for provisioning and deploying clusters and GCP resources. +See `cmd/ate-setup` for deploying clusters. GCP resources are provisioned with `tools/setup-gcp` in [substrate-gke](https://github.com/ai-on-gke/substrate-gke). ## Repository Layout @@ -156,7 +156,7 @@ See the [metric registry](docs/observability.md#the-metric-registry) section of 1. Write tests for new behavior. Update tests when you change existing behavior. Consider the value of tests for future changes. 2. Ensure changes do not break existing tests. 3. Run `go test -race ./...` and `hack/verify-all.sh` locally before requesting a code review to catch common issues like missed copyright headers or formatting drift. -4. For end-to-end tests involving the actual infrastructure, ensure you have a running cluster (setup via `hack/ate-dev-env.sh.example` and `go run ./tools/setup-gcp bootstrap`). +4. For end-to-end tests involving the actual infrastructure, ensure you have a running cluster (on GKE, set up with `tools/setup-gcp` in [substrate-gke](https://github.com/ai-on-gke/substrate-gke)). 5. A test that skips when a precondition is missing (Docker, a cluster, an artifact directory) must **fail** on it in CI, because a skip and a pass are the same exit code. Check for CI with a named predicate like `cmd/ateapi/internal/store/dockerenv.Required()` instead of an inline `os.Getenv("CI")`. Make sure the CI branch actually fails before merging. See `docs/dev/best-practices/ci-fail-closed.md`. ## Security Considerations diff --git a/README.md b/README.md index 6e89e288e6..61ef89fc95 100644 --- a/README.md +++ b/README.md @@ -167,19 +167,18 @@ curl -X POST -i http://localhost:8000/ gcloud auth application-default login --project=${PROJECT_ID} ``` -3. Provision the required GCP resources (GKE cluster, GCS, and IAM bindings): - ```bash - go run ./tools/setup-gcp bootstrap - ``` - - On a fresh project this step also creates the Workload Identity IAM grants - that ate-api-server and atelet depend on. See - [what `create iam` actually grants](tools/setup-gcp/README.md#what-create-iam-actually-grants) - to audit them or apply them manually. If you bring your own cluster instead, - it needs the PodCertificateRequest and ClusterTrustBundle APIs, which GKE - 1.37 and higher serve by default. On 1.36, enable them as beta APIs, then - replace any 1.36 node pools created before that. See the - [Create Cluster warning](tools/setup-gcp/README.md#2-create-cluster). +3. Provision the required GCP resources (GKE cluster, GCS, and IAM bindings) + with [`tools/setup-gcp`](https://github.com/ai-on-gke/substrate-gke/tree/main/tools/setup-gcp) in the + [substrate-gke](https://github.com/ai-on-gke/substrate-gke) repository, which holds the GKE + setup and teardown tooling. Its `bootstrap` command also creates the Workload + Identity IAM grants that ate-api-server and atelet depend on. See + [what `create iam` actually grants](https://github.com/ai-on-gke/substrate-gke/blob/main/tools/setup-gcp/README.md#what-create-iam-actually-grants) + to audit them or apply them manually. + + If you bring your own cluster instead, it needs the PodCertificateRequest and + ClusterTrustBundle APIs, which GKE 1.37 and higher serve by default. On 1.36, + enable them as beta APIs, then replace any 1.36 node pools created before + that. See the [Create Cluster warning](https://github.com/ai-on-gke/substrate-gke/blob/main/tools/setup-gcp/README.md#2-create-cluster). 4. Deploy the Agent Substrate system to your cluster: ```bash @@ -210,17 +209,11 @@ curl -X POST -i http://localhost:8000/ #### Custom Setup and Deployment -You can run individual setup steps to create GCP resources as needed. See `go run ./tools/setup-gcp --help` for available options. For example: -```bash -go run ./tools/setup-gcp create cluster -go run ./tools/setup-gcp create bucket -``` - -To run the PostgreSQL store backend on Cloud SQL — with IAM database -authentication and no passwords — see [tools/setup-gcp/cloud-sql.md](tools/setup-gcp/cloud-sql.md). +To create individual GCP resources, or to run the PostgreSQL store backend on +Cloud SQL, see [`tools/setup-gcp`](https://github.com/ai-on-gke/substrate-gke/tree/main/tools/setup-gcp) in substrate-gke. -Similarly, you can deploy or clean up specific Agent Substrate components with -`ate-setup`. See `go run ./cmd/ate-setup --help` for all options. +You can deploy or cleanup specific Agent Substrate components using +the installation script. See `go run ./cmd/ate-setup` for all options. ```bash # Re-deploy only ate-apiserver of the ATE system go run ./cmd/ate-setup deploy apiserver @@ -231,17 +224,13 @@ go run ./cmd/ate-setup delete all #### Tearing down resources (GCP) -If you need to delete the resources created by the setup script, you can use the provided script `hack/teardown.sh`. This script will delete resources in the reverse order of creation and handles partial failures gracefully. - -```bash -./hack/teardown.sh [--all|--cluster-scoped] -``` +To delete the GCP resources, run substrate-gke's +[`tools/setup-gcp/teardown.sh`](https://github.com/ai-on-gke/substrate-gke/blob/main/tools/setup-gcp/README.md#teardown). It deletes resources +in the reverse order of creation and handles partial failures. * `--all` deletes everything, including the dashboards, the snapshot transfer service account and the project-level IAM bindings, which every Substrate cluster in the project shares. * `--cluster-scoped` deletes only this cluster, its buckets and the bindings on them. Use it while other Substrate clusters still use the project. -Or run individual teardown steps as needed (see `./hack/teardown.sh` for available options). - #### Tearing down local `kind` resources If you need to delete the local `kind` cluster and its registry (if it was created by `hack/create-kind-cluster.sh`): @@ -293,5 +282,4 @@ We provide several sample applications demonstrating Agent Substrate's capabilit will eventually ship in upstream Kubernetes (with different names). * `cmd/kubectl-ate`: A CLI tool for managing Agent Substrate resources. See its [README](cmd/kubectl-ate/README.md). * `cmd/benchmarking`: Synthetic workloads used by the load tests, including `glutton`, which consumes RAM, disk, and file descriptors on demand. -* `tools/setup-gcp`: A provisioning utility to set up the necessary GCP infrastructure resources (GKE, GCS, IAM). * `demos/`: Sample applications demonstrating Agent Substrate capabilities. diff --git a/_LICENSES/cloud.google.com/go/container/LICENSE b/_LICENSES/cloud.google.com/go/container/LICENSE deleted file mode 100644 index d645695673..0000000000 --- a/_LICENSES/cloud.google.com/go/container/LICENSE +++ /dev/null @@ -1,202 +0,0 @@ - - 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/_LICENSES/cloud.google.com/go/longrunning/LICENSE b/_LICENSES/cloud.google.com/go/longrunning/LICENSE deleted file mode 100644 index d645695673..0000000000 --- a/_LICENSES/cloud.google.com/go/longrunning/LICENSE +++ /dev/null @@ -1,202 +0,0 @@ - - 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/_LICENSES/cloud.google.com/go/resourcemanager/LICENSE b/_LICENSES/cloud.google.com/go/resourcemanager/LICENSE deleted file mode 100644 index d645695673..0000000000 --- a/_LICENSES/cloud.google.com/go/resourcemanager/LICENSE +++ /dev/null @@ -1,202 +0,0 @@ - - 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/_LICENSES/cloud.google.com/go/serviceusage/LICENSE b/_LICENSES/cloud.google.com/go/serviceusage/LICENSE deleted file mode 100644 index d645695673..0000000000 --- a/_LICENSES/cloud.google.com/go/serviceusage/LICENSE +++ /dev/null @@ -1,202 +0,0 @@ - - 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/benchmarking/automation/README.md b/benchmarking/automation/README.md index 30a9dfe83c..3fd15e8f98 100644 --- a/benchmarking/automation/README.md +++ b/benchmarking/automation/README.md @@ -116,7 +116,7 @@ gcloud container clusters create \ ``` On GKE 1.37 or higher, omit `--enable-kubernetes-unstable-apis`; the -required APIs are served by default. See the [cluster setup guide](../../tools/setup-gcp/README.md#2-create-cluster) for details. +required APIs are served by default. See the [cluster setup guide](https://github.com/ai-on-gke/substrate-gke/blob/main/tools/setup-gcp/README.md#2-create-cluster) in substrate-gke for details. The orchestration cluster needs Workload Identity but no special APIs. It only ever runs one pod (the orchestrator + DIND sidecar), so a single zonal node diff --git a/benchmarking/automation/setup.sh b/benchmarking/automation/setup.sh index 504c30fa37..60f29c75f9 100755 --- a/benchmarking/automation/setup.sh +++ b/benchmarking/automation/setup.sh @@ -33,11 +33,10 @@ # files in scratch/target-clusters/ intact. # # TODO: drive workload-cluster creation and IAM/Workload Identity bindings -# from tools/setup-gcp (see tools/setup-gcp/cmd/cluster.go) instead of leaving -# them as manual gcloud steps in README.md. That tool already encodes the -# required beta APIs, Workload Identity pool, and node config; this wizard -# should call it (or its equivalent in tools/setup-gcp) once we know the -# values collected below. +# from tools/setup-gcp in https://github.com/ai-on-gke/substrate-gke instead +# of leaving them as manual gcloud steps in README.md. That tool already +# encodes the required beta APIs, Workload Identity pool, and node config; +# this wizard should call it once we know the values collected below. set -o errexit -o nounset -o pipefail diff --git a/cmd/ate-setup/differences.md b/cmd/ate-setup/differences.md index d97a6bbdb7..e652f24541 100644 --- a/cmd/ate-setup/differences.md +++ b/cmd/ate-setup/differences.md @@ -292,7 +292,7 @@ shell-installed cluster rolls `ate-api-server` once. `ATE_API_POSTGRES_CLOUDSQL_INSTANCE` set and no explicit `ATE_API_POSTGRES_READ_WRITE_CONNECTION_STRING`, the DSN is built passwordless against the proxy's loopback listener from the GSA's email -([`cloud-sql.md`](../../tools/setup-gcp/cloud-sql.md)), so +([`cloud-sql.md`](https://github.com/ai-on-gke/substrate-gke/blob/main/tools/setup-gcp/cloud-sql.md) in substrate-gke), so `ATE_API_POSTGRES_CLOUDSQL_IAM_AUTH=false` is rejected rather than producing a DSN that cannot authenticate. The owner connection uses the same IAM login unless `ATE_API_POSTGRES_OWNER_CONNECTION_STRING` is set. An *unset* instance variable is distinct from an diff --git a/cmd/ate-setup/internal/config/config.go b/cmd/ate-setup/internal/config/config.go index a44fdf816a..e5458d74aa 100644 --- a/cmd/ate-setup/internal/config/config.go +++ b/cmd/ate-setup/internal/config/config.go @@ -291,8 +291,8 @@ func (c *Config) Resolved() *Resolved { } // TransferServiceAccount is the email of the snapshot transfer service -// account, built from TransferGSAName and ProjectID as tools/setup-gcp builds -// it. It is empty when either is. +// account, built from TransferGSAName and ProjectID the same way substrate-gke's +// tools/setup-gcp builds it. It is empty when either is. func (c *Config) TransferServiceAccount() string { if c.TransferGSAName == "" || c.ProjectID == "" { return "" diff --git a/cmd/kubectl-ate/README.md b/cmd/kubectl-ate/README.md index 2c86821b69..4497bd2a96 100644 --- a/cmd/kubectl-ate/README.md +++ b/cmd/kubectl-ate/README.md @@ -37,7 +37,7 @@ gcloud services enable cloudtrace.googleapis.com --project=PROJECT_ID ``` 2. The GKE cluster must have **Managed OpenTelemetry** enabled. Clusters created by -`setup-gcp create cluster` or `setup-gcp bootstrap` always enable it. For a cluster that does +[substrate-gke](https://github.com/ai-on-gke/substrate-gke)'s `setup-gcp create cluster` or `setup-gcp bootstrap` always enable it. For a cluster that does not have it, enable it with: ```bash diff --git a/docs/api-guide.md b/docs/api-guide.md index 7fba29d68a..96eda75984 100644 --- a/docs/api-guide.md +++ b/docs/api-guide.md @@ -520,7 +520,7 @@ Each entry of `versions` (`SandboxVersionConfig`): | :--- | :--- | :--- | | `name` | `string` | **Required.** Identifies the version within the config. A DNS label (lower-case alphanumerics and `-`, at most 63 characters). | | `state` | `string` | Optional. `Enabled` (default) or `Disabled`. The version named by `defaultVersion` cannot be `Disabled`. | -| `assets` | `map[arch]map[name]AssetFile` | Content-addressed files atelet fetches, keyed by architecture (`amd64`, `arm64`) then asset name. gVisor expects a `gvisor` asset (the release's `gvisor.tar.zstd`), which atelet auto-extracts. A microVM backend expects several. Each `AssetFile` is a `{ url, sha256 }` pair; `url` is at most 2048 bytes. A `ValidatingAdmissionPolicy` enforces each class's required assets on every version. atelet holds no storage credentials: it fetches every URL through the node's object-store plugin (`AssetProvider`), with the plugin's credentials. Which schemes work depends on the plugin; the in-tree one serves only its storage backend's scheme, `gs://` on GCS and `s3://` on S3, as `/`, and rejects other schemes without reading them. A `gs://` URL the plugin cannot serve (it has no such object, rejects the URL, does not implement `AssetProvider`, is unreachable, or fails with an error it does not recognize, such as GCS refusing its credentials for a public bucket) is then read anonymously, which serves public buckets such as `gs://gvisor`; any other refusal by the plugin is final. The plugin returns an object only if its content matches `sha256`, and refuses any URL under a snapshot location (a snapshot location followed by `/atespaces/`), so assets must not be stored there. On GKE, setup-gcp lets the plugin read only the asset bucket, `-assets`, so keep assets there. atelet verifies the sha256 again before using an asset. Its logs and errors show an asset URL as `scheme://host/path`. | +| `assets` | `map[arch]map[name]AssetFile` | Content-addressed files atelet fetches, keyed by architecture (`amd64`, `arm64`) then asset name. gVisor expects a `gvisor` asset (the release's `gvisor.tar.zstd`), which atelet auto-extracts. A microVM backend expects several. Each `AssetFile` is a `{ url, sha256 }` pair; `url` is at most 2048 bytes. A `ValidatingAdmissionPolicy` enforces each class's required assets on every version. atelet holds no storage credentials: it fetches every URL through the node's object-store plugin (`AssetProvider`), with the plugin's credentials. Which schemes work depends on the plugin; the in-tree one serves only its storage backend's scheme, `gs://` on GCS and `s3://` on S3, as `/`, and rejects other schemes without reading them. A `gs://` URL the plugin cannot serve (it has no such object, rejects the URL, does not implement `AssetProvider`, is unreachable, or fails with an error it does not recognize, such as GCS refusing its credentials for a public bucket) is then read anonymously, which serves public buckets such as `gs://gvisor`; any other refusal by the plugin is final. The plugin returns an object only if its content matches `sha256`, and refuses any URL under a snapshot location (a snapshot location followed by `/atespaces/`), so assets must not be stored there. On GKE, substrate-gke's setup-gcp lets the plugin read only the asset bucket, `-assets`, so keep assets there. atelet verifies the sha256 again before using an asset. Its logs and errors show an asset URL as `scheme://host/path`. | A cluster-wide gVisor `SandboxConfig` (`gvisor-default`, annotated as the class default) is installed with the platform, so gVisor `WorkerPool`s use it automatically without any extra setup. diff --git a/docs/dev/best-practices/metrics.md b/docs/dev/best-practices/metrics.md index 8f3997a6b5..494545785d 100644 --- a/docs/dev/best-practices/metrics.md +++ b/docs/dev/best-practices/metrics.md @@ -471,7 +471,8 @@ a short paragraph below the table rather than growing the row. ### Dashboards -Cloud Monitoring dashboards live in `tools/setup-gcp/dashboards/`. A new metric +Cloud Monitoring dashboards live in `tools/setup-gcp/dashboards/` in +[substrate-gke](https://github.com/ai-on-gke/substrate-gke). A new metric does not need a new dashboard in the same PR, but a metric an operator will alert on should get a panel in a follow-up, and the PR description should say which question the panel answers. diff --git a/docs/dev/cloud-sql-scaling-guide.md b/docs/dev/cloud-sql-scaling-guide.md index 383382d311..d543ec1432 100644 --- a/docs/dev/cloud-sql-scaling-guide.md +++ b/docs/dev/cloud-sql-scaling-guide.md @@ -1,7 +1,7 @@ # Scaling the Cloud SQL store Sizing guidance for running the ateapi PostgreSQL store -([tools/setup-gcp/cloud-sql.md](../../tools/setup-gcp/cloud-sql.md)) at large +([tools/setup-gcp/cloud-sql.md](https://github.com/ai-on-gke/substrate-gke/blob/main/tools/setup-gcp/cloud-sql.md) in substrate-gke) at large actor counts and high request rates. The provisioning defaults (`db-custom-2-8192`, 10 GB disk) suit development diff --git a/docs/dev/code-layout.md b/docs/dev/code-layout.md index 94c7b7dfbe..8fbcbd1878 100644 --- a/docs/dev/code-layout.md +++ b/docs/dev/code-layout.md @@ -107,7 +107,8 @@ shell scripts here; for more complex automation, put a Go tool in `tools/`. Dev/CI tools written in Go. These are build-time or operations tools that are part of the repository but not compiled into any -shipped binary. Example: `tools/setup-gcp` provisions GCP resources. +shipped binary. Example: `tools/junittool` checks that CI test runs wrote +JUnit results. Each tool must have its own dedicated `go.mod` (and `go.sum`). diff --git a/docs/egress-credential-injection.md b/docs/egress-credential-injection.md index 0b583ebd09..ae1a180f3b 100644 --- a/docs/egress-credential-injection.md +++ b/docs/egress-credential-injection.md @@ -219,7 +219,7 @@ it alongside the gateway. The install applies: (`app: atenet-egress`), on the provider's gRPC port. Every other connection to the provider pods is dropped. The NetworkPolicy takes effect only on a cluster whose network plugin enforces NetworkPolicy, such as GKE Dataplane - V2, which `tools/setup-gcp` turns on by default. Elsewhere the provider's + V2, which `tools/setup-gcp` in [substrate-gke](https://github.com/ai-on-gke/substrate-gke) turns on by default. Elsewhere the provider's check of the gateway's client certificate is the only restriction. Selecting any other provider, or `{"enabled":false}`, removes a bundled diff --git a/docs/observability.md b/docs/observability.md index f8cffd84d3..cf92159105 100644 --- a/docs/observability.md +++ b/docs/observability.md @@ -554,8 +554,4 @@ Substrate puts no OTLP configuration into an actor container. Set `OTEL_EXPORTER > **GCP-specific.** These are **Google Cloud Monitoring** dashboards; they apply only to a GKE / Google Cloud deployment. There is no dashboard support on Kind — use the Prometheus UI in [Metrics](#2-metrics) for local development. -Dashboard definitions live in [`tools/setup-gcp/dashboards/`](../tools/setup-gcp/dashboards/) (see its README for the per-dashboard breakdown). They are created and updated **as part of GCP setup**: `tools/setup-gcp` applies each dashboard idempotently (matched and updated by display name), so re-running is safe. - -```sh -go run ./tools/setup-gcp create dashboards # also part of: bootstrap -``` +Dashboard definitions live in [`tools/setup-gcp/dashboards/`](https://github.com/ai-on-gke/substrate-gke/tree/main/tools/setup-gcp/dashboards) in the [substrate-gke](https://github.com/ai-on-gke/substrate-gke) repository (see its README for the per-dashboard breakdown). They are created and updated **as part of GCP setup**: substrate-gke's `tools/setup-gcp` applies each dashboard idempotently (matched and updated by display name), so re-running is safe. diff --git a/docs/operator-install.md b/docs/operator-install.md index 5c8616e043..e5a5b98935 100644 --- a/docs/operator-install.md +++ b/docs/operator-install.md @@ -340,32 +340,31 @@ its name with `SNAPSHOT_TRANSFER_GSA_NAME` (or ate-setup's one. The exchange impersonates the account, so ate-api-server's identity needs `roles/iam.serviceAccountTokenCreator` on it, and the account needs object admin and bucket viewer on every snapshot bucket. -`go run ./tools/setup-gcp create iam` creates it under that name, +`tools/setup-gcp create iam` in [substrate-gke](https://github.com/ai-on-gke/substrate-gke) creates it under that name, `ate-snapshot-transfer` by default, with both grants. kind does not use it. With `--kind`, ate-setup defaults `storage.snapshotLocation` to `gs:///` (`gs://ate-snapshots/`, the bucket the in-cluster rustfs creates) and ignores an ambient `SNAPSHOT_LOCATION`. On GKE, ate-setup -does not create the bucket or grant access to it: run -`go run ./tools/setup-gcp create bucket` and -`go run ./tools/setup-gcp create iam` first, or `bootstrap` for both (see -[tools/setup-gcp](../tools/setup-gcp/README.md)). +does not create the bucket or grant access to it: run substrate-gke's +`tools/setup-gcp create bucket` and `create iam` first, or `bootstrap` for both +(see [tools/setup-gcp](https://github.com/ai-on-gke/substrate-gke/blob/main/tools/setup-gcp/README.md) in substrate-gke). -setup-gcp also creates an asset bucket, `-assets`, where +substrate-gke's setup-gcp also creates an asset bucket, `-assets`, where `hack/install-microvm-deps.sh` stages microVM sandbox assets, and gives atelet read access to it. atelet gets no access to the snapshot bucket: every snapshot transfer runs on a token scoped to its actor, issued by ate-api-server's credential exchange. A GCP project set up before the asset bucket existed -keeps atelet's old grants, since setup-gcp only adds bindings. Remove them as -[tools/setup-gcp](../tools/setup-gcp/README.md#upgrading-an-existing-install) +keeps atelet's old grants, since substrate-gke's setup-gcp only adds bindings. Remove them as +[tools/setup-gcp](https://github.com/ai-on-gke/substrate-gke/blob/main/tools/setup-gcp/README.md#moving-to-per-actor-snapshot-credentials) in substrate-gke shows, which also covers recreating a cluster with microVM workers. With the `PerTemplateSnapshotLocation` preview gate, an ActorTemplate may set `snapshotConfig.storageLocation` to store its snapshots elsewhere; templates that leave it empty use `--snapshot-location`. Grant ate-api-server's identity and the snapshot transfer service account object admin and bucket viewer on -any other bucket a template names, as setup-gcp does on the snapshot bucket. Without the gate, +any other bucket a template names, as substrate-gke's setup-gcp does on the snapshot bucket. Without the gate, ate-api-server rejects templates that set `snapshotConfig.storageLocation`. See [Snapshot Storage Layout](api-guide.md#snapshot-storage-layout). diff --git a/docs/postgres.md b/docs/postgres.md index b9769613ec..ee0ac0384b 100644 --- a/docs/postgres.md +++ b/docs/postgres.md @@ -77,7 +77,7 @@ Operators using ordinary PostgreSQL login users may run [`pkg/postgressetup/setu The login users come from the database provider: they may be ordinary PostgreSQL users, IAM identities, or another provider-managed identity. Substrate does not create them or require specific login names. -Create an owner role with schema ownership and a read/write role with schema usage. Grant the runtime role SELECT, INSERT, UPDATE, and DELETE on tables; USAGE, SELECT, and UPDATE on sequences; EXECUTE on routines; and USAGE on types. Configure the owner's default privileges so newly migrated objects receive these grants. Grant the respective roles to the login users. The [Cloud SQL setup example](../tools/setup-gcp/cloud-sql.md#2-one-time-roles-and-schema-privileges) shows the SQL for one login with both roles; use separate logins for stronger isolation. +Create an owner role with schema ownership and a read/write role with schema usage. Grant the runtime role SELECT, INSERT, UPDATE, and DELETE on tables; USAGE, SELECT, and UPDATE on sequences; EXECUTE on routines; and USAGE on types. Configure the owner's default privileges so newly migrated objects receive these grants. Grant the respective roles to the login users. The [Cloud SQL setup example](https://github.com/ai-on-gke/substrate-gke/blob/main/tools/setup-gcp/cloud-sql.md#2-one-time-roles-and-schema-privileges) in substrate-gke shows the SQL for one login with both roles; use separate logins for stronger isolation. Apply these grants before the first `ateapi` startup. The owner connection creates and updates tables through migrations; the read/write connection cannot create schema objects. @@ -90,4 +90,4 @@ User credentials are passed as connection strings through `ATE_API_POSTGRES_OWNE `ateapi` uses the same `@env` flag pattern for role names and schema. ### CloudSQL Configuration -CloudSQL setup information can be found in the dedicated guide [here](../tools/setup-gcp/cloud-sql.md). +CloudSQL setup information can be found in the dedicated guide [here](https://github.com/ai-on-gke/substrate-gke/blob/main/tools/setup-gcp/cloud-sql.md) in substrate-gke. diff --git a/docs/threat-model.md b/docs/threat-model.md index e197550dab..cba14903b2 100644 --- a/docs/threat-model.md +++ b/docs/threat-model.md @@ -66,7 +66,7 @@ While it's probably unlikely that Substrate, which is expected to be an internal | T-05 | High | Privilege escalation via access to sensitive labels. | If Substrate offers its own resource labeling mechanism, it must also offer a way to authorize label updates on a per-label basis. | Substrate authorization system requires explicit authorization to update metadata, separate from updating resource body. Substrate authorization system supports per-label authorization rules. | Plenty of attacks in K8s were possible because labels had semantic meaning, but the permission model could implicitly granted access to modify labels, even if it was inappropriate. For example, /status subresource allows label updates. Substrate shouldn't repeat this mistake. | | T-06 | High | Attacker gains control of the Substrate API server or an ingress/egress gateway. | Isolate the control plane from the data plane, and isolate data plane ingress from sandboxes. | Don't co-locate ate-apiserver or other control-plane components on the same machines as the untrusted sandboxes. This also supports control-plane / data-plane isolation from a reliability and performance perspective. Consider running any gateway that enables direct interaction with sandboxes on a separate VM from the sandboxes. Consider using a zero-trust architecture where traffic is encrypted and authenticated end-to-end and routed via a mesh. | While the sandbox is trusted as an isolation layer, the residual risk is typically not worth the marginal cost savings of colocating, and isolation is recommend to avoid noisy neighbor problems or other reliability issues that stem from mixing the control-plane and data-plane, especially for large scale deployments of Substrate. | | T-07 | High | Attacker who can create ActorTemplates specifies malicious runtime. | Ensure available runtime can only be configured by administrators. | Consider a mechanism like RuntimeClass to decouple configuration of available runtimes from consumption of available runtimes. | | -| T-08 | High | Attacker who can create ActorTemplates can read or write any storage buckets atelet has access to. | Ensure that bucket access is least-privilege. | Use credentials derived from actor identity to read snapshots. Configure permissions to prevent atelet or nodes from having access to sensitive buckets. Don't support arbitrary URLs in APIs, instead design a standard approach for accessing the correct resource given the ActorTemplate name and compute the mapping internally, subject to scheduling-aware authorization checks. | For example: Attacker creates an ActorTemplate with the runsc URL or golden snapshot URL pointing to an arbitrary bucket in the same project/resource scope as the cluster. If atelet has project-wide access to buckets, this could cause the state to be pulled into the worker pod or malicious actor. Similarly, an attacker could set the snapshots URL to point to an internal infrastructure bucket, causing data to be written to that bucket. Current state for sandbox asset URLs (SandboxConfig): atelet holds no storage credentials. It fetches every asset through the node's object-store plugin, which refuses any URL under a snapshot location before reading it, and returns an object only if its content matches the sha256 the SandboxConfig pins, staging the download where atelet cannot read it until it is verified. Only when the plugin cannot serve a `gs://` URL (no such object, a URL it rejects, no `AssetProvider`, unreachable, or an error it does not recognize) does atelet read it anonymously, which returns only publicly readable objects; any other refusal by the plugin is final. A SandboxConfig author therefore cannot use an asset URL to pull another actor's snapshot onto a node, even when assets share a bucket with snapshots, and a modified asset fails the digest check in the plugin and again in atelet. Current state for snapshot locations on GCS: snapshot transfers run on per-actor tokens from the credential exchange. The tokens are downscoped from ate-api-server's identity, so a template can reach only buckets that identity can access. setup-gcp gives the plugin's own identity read access to the asset bucket only, and no storage role on the snapshot bucket or the project. | +| T-08 | High | Attacker who can create ActorTemplates can read or write any storage buckets atelet has access to. | Ensure that bucket access is least-privilege. | Use credentials derived from actor identity to read snapshots. Configure permissions to prevent atelet or nodes from having access to sensitive buckets. Don't support arbitrary URLs in APIs, instead design a standard approach for accessing the correct resource given the ActorTemplate name and compute the mapping internally, subject to scheduling-aware authorization checks. | For example: Attacker creates an ActorTemplate with the runsc URL or golden snapshot URL pointing to an arbitrary bucket in the same project/resource scope as the cluster. If atelet has project-wide access to buckets, this could cause the state to be pulled into the worker pod or malicious actor. Similarly, an attacker could set the snapshots URL to point to an internal infrastructure bucket, causing data to be written to that bucket. Current state for sandbox asset URLs (SandboxConfig): atelet holds no storage credentials. It fetches every asset through the node's object-store plugin, which refuses any URL under a snapshot location before reading it, and returns an object only if its content matches the sha256 the SandboxConfig pins, staging the download where atelet cannot read it until it is verified. Only when the plugin cannot serve a `gs://` URL (no such object, a URL it rejects, no `AssetProvider`, unreachable, or an error it does not recognize) does atelet read it anonymously, which returns only publicly readable objects; any other refusal by the plugin is final. A SandboxConfig author therefore cannot use an asset URL to pull another actor's snapshot onto a node, even when assets share a bucket with snapshots, and a modified asset fails the digest check in the plugin and again in atelet. Current state for snapshot locations on GCS: snapshot transfers run on per-actor tokens from the credential exchange. The tokens are downscoped from ate-api-server's identity, so a template can reach only buckets that identity can access. substrate-gke's setup-gcp gives the plugin's own identity read access to the asset bucket only, and no storage role on the snapshot bucket or the project. | | T-09 | Medium | DoS attack against API, gateway, or available cluster resources. | Minimize exposure and ensure APIs and proxies implement appropriately scoped quotas and rate limiting. | Don't co-locate ate-apiserver or other control-plane components on the same machines as the untrusted sandboxes. Don't expose ate-apiserver directly to the internet. Consider an identity-aware WAF (likely up to providers) if external access is required. Use network policy to block direct interaction between untrusted sandboxes and the ate-apiserver. Implement quotas and rate limiting in the API and in proxies. This includes quotas for the number of actors a user can allocate. Use a zero-trust architecture that prevents identity spoofing or intentional misrouting to get around limits. | The gateway calls ate-apiserver to resolve Actor assignments and uses a short-lived cache. A flood of Actor traffic could still create high API load; cache invalidation during Actor rescheduling must avoid stale routing. | | T-10 | Medium | Internal network traffic is intercepted or spoofed | Encrypt all traffic by default | Use mTLS between all system components, including the gateway-to-worker `atunnel` connection. | It may be desirable to rely on cloud providers to transparently encrypt traffic between VMs on their internal network. Worth discussing what makes the most sense. | @@ -109,7 +109,7 @@ While it's probably unlikely that Substrate, which is expected to be an internal | Threat ID | Priority | Threat | Mitigating Invariants | Suggested Concrete Mitigations | Notes | | :---- | :---- | :---- | :---- | :---- | :---- | -| T-36 | High | A compromised node accesses all snapshots for the cluster. | Node access to snapshots must be scoped to actors actively scheduled to the node. | Issue special per-actor JWT, only for atelet, not in sandbox, that has claims available in conditional IAM. Use CredentialAccessBoundary (GCP only) Perform data wipeout on previous actor “tenants” of the node on actor suspension. Snapshots should be write-once per version, to prevent malicious actors from overwriting “golden” snapshots and compromising other actors that use that snapshot. | Detection rules to determine whether a given actor is running on the node and correlate it to a node requesting a snapshot for the actor could be valuable defense in depth. Current state on GCS: each snapshot transfer runs on a token downscoped to one actor's prefixes, which the credential exchange issues only while the actor is still assigned to the node that minted its JWT. setup-gcp gives atelet no storage role on snapshots. Still open: S3 installs transfer with the plugin's own credentials. | +| T-36 | High | A compromised node accesses all snapshots for the cluster. | Node access to snapshots must be scoped to actors actively scheduled to the node. | Issue special per-actor JWT, only for atelet, not in sandbox, that has claims available in conditional IAM. Use CredentialAccessBoundary (GCP only) Perform data wipeout on previous actor “tenants” of the node on actor suspension. Snapshots should be write-once per version, to prevent malicious actors from overwriting “golden” snapshots and compromising other actors that use that snapshot. | Detection rules to determine whether a given actor is running on the node and correlate it to a node requesting a snapshot for the actor could be valuable defense in depth. Current state on GCS: each snapshot transfer runs on a token downscoped to one actor's prefixes, which the credential exchange issues only while the actor is still assigned to the node that minted its JWT. substrate-gke's setup-gcp gives atelet no storage role on snapshots. Still open: S3 installs transfer with the plugin's own credentials. | | T-37 | High | Compromised node accesses filesystem storage for actors on other nodes. | Node access to network filesystems must be scoped to actors actively scheduled to the node. | TBD \- depends on network filesystem implementation and what it supports. | | | T-38 | High | Compromised node can escalate to other nodes or control plane via Substrate or Kubernetes. | Node access to Substrate or Kubernetes APIs must be scoped to operations relevant to actors actively scheduled to the node, and to the node itself. | Disable network communications for actors by default Tightly scoped Ingress/Egress network policies for every pod Default deny Actor to Actor communication Any allowed Actor to Actor communication should be over TLS and have authentication/authorization Limit total number of child actors under a given parent (and limit depth of actor create calls) Limit network access between data plane components, and ensure control plane components have minimal ingress from actors/workloads. | | diff --git a/docs/threats.json b/docs/threats.json index 2f04c14983..8d7e2caa23 100644 --- a/docs/threats.json +++ b/docs/threats.json @@ -61,7 +61,7 @@ "threat": "Attacker who can create ActorTemplates can read or write any storage buckets atelet has access to.", "mitigating_invariants": "Ensure that bucket access is least-privilege.", "suggested_concrete_mitigations": "Use credentials derived from actor identity to read snapshots. Configure permissions to prevent atelet or nodes from having access to sensitive buckets. Don't support arbitrary URLs in APIs, instead design a standard approach for accessing the correct resource given the ActorTemplate name and compute the mapping internally, subject to scheduling-aware authorization checks.", - "notes": "For example: Attacker creates an ActorTemplate with the runsc URL or golden snapshot URL pointing to an arbitrary bucket in the same project/resource scope as the cluster. If atelet has project-wide access to buckets, this could cause the state to be pulled into the worker pod or malicious actor. Similarly, an attacker could set the snapshots URL to point to an internal infrastructure bucket, causing data to be written to that bucket. Current state for sandbox asset URLs (SandboxConfig): atelet holds no storage credentials. It fetches every asset through the node's object-store plugin, which refuses any URL under a snapshot location before reading it, and returns an object only if its content matches the sha256 the SandboxConfig pins, staging the download where atelet cannot read it until it is verified. Only when the plugin cannot serve a `gs://` URL (no such object, a URL it rejects, no `AssetProvider`, unreachable, or an error it does not recognize) does atelet read it anonymously, which returns only publicly readable objects; any other refusal by the plugin is final. A SandboxConfig author therefore cannot use an asset URL to pull another actor's snapshot onto a node, even when assets share a bucket with snapshots, and a modified asset fails the digest check in the plugin and again in atelet. Current state for snapshot locations on GCS: snapshot transfers run on per-actor tokens from the credential exchange. The tokens are downscoped from ate-api-server's identity, so a template can reach only buckets that identity can access. setup-gcp gives the plugin's own identity read access to the asset bucket only, and no storage role on the snapshot bucket or the project." + "notes": "For example: Attacker creates an ActorTemplate with the runsc URL or golden snapshot URL pointing to an arbitrary bucket in the same project/resource scope as the cluster. If atelet has project-wide access to buckets, this could cause the state to be pulled into the worker pod or malicious actor. Similarly, an attacker could set the snapshots URL to point to an internal infrastructure bucket, causing data to be written to that bucket. Current state for sandbox asset URLs (SandboxConfig): atelet holds no storage credentials. It fetches every asset through the node's object-store plugin, which refuses any URL under a snapshot location before reading it, and returns an object only if its content matches the sha256 the SandboxConfig pins, staging the download where atelet cannot read it until it is verified. Only when the plugin cannot serve a `gs://` URL (no such object, a URL it rejects, no `AssetProvider`, unreachable, or an error it does not recognize) does atelet read it anonymously, which returns only publicly readable objects; any other refusal by the plugin is final. A SandboxConfig author therefore cannot use an asset URL to pull another actor's snapshot onto a node, even when assets share a bucket with snapshots, and a modified asset fails the digest check in the plugin and again in atelet. Current state for snapshot locations on GCS: snapshot transfers run on per-actor tokens from the credential exchange. The tokens are downscoped from ate-api-server's identity, so a template can reach only buckets that identity can access. substrate-gke's setup-gcp gives the plugin's own identity read access to the asset bucket only, and no storage role on the snapshot bucket or the project." }, { "threat_id": "T-09", @@ -285,7 +285,7 @@ "threat": "A compromised node accesses all snapshots for the cluster.", "mitigating_invariants": "Node access to snapshots must be scoped to actors actively scheduled to the node.", "suggested_concrete_mitigations": "Issue special per-actor JWT, only for atelet, not in sandbox, that has claims available in conditional IAM. Use CredentialAccessBoundary (GCP only) Perform data wipeout on previous actor \u201ctenants\u201d of the node on actor suspension. Snapshots should be write-once per version, to prevent malicious actors from overwriting \u201cgolden\u201d snapshots and compromising other actors that use that snapshot.", - "notes": "Detection rules to determine whether a given actor is running on the node and correlate it to a node requesting a snapshot for the actor could be valuable defense in depth. Current state on GCS: each snapshot transfer runs on a token downscoped to one actor's prefixes, which the credential exchange issues only while the actor is still assigned to the node that minted its JWT. setup-gcp gives atelet no storage role on snapshots. Still open: S3 installs transfer with the plugin's own credentials." + "notes": "Detection rules to determine whether a given actor is running on the node and correlate it to a node requesting a snapshot for the actor could be valuable defense in depth. Current state on GCS: each snapshot transfer runs on a token downscoped to one actor's prefixes, which the credential exchange issues only while the actor is still assigned to the node that minted its JWT. substrate-gke's setup-gcp gives atelet no storage role on snapshots. Still open: S3 installs transfer with the plugin's own credentials." }, { "threat_id": "T-37", diff --git a/go.mod b/go.mod index deca33e7cd..ca72e7fdcc 100644 --- a/go.mod +++ b/go.mod @@ -6,11 +6,6 @@ toolchain go1.27.3 require ( cloud.google.com/go/compute/metadata v0.9.0 - cloud.google.com/go/container v1.49.0 - cloud.google.com/go/iam v1.9.0 - cloud.google.com/go/monitoring v1.24.3 - cloud.google.com/go/resourcemanager v1.13.0 - cloud.google.com/go/serviceusage v1.14.0 cloud.google.com/go/storage v1.62.1 github.com/Masterminds/squirrel v1.5.4 github.com/aws/aws-sdk-go-v2 v1.41.7 @@ -91,7 +86,8 @@ require ( cloud.google.com/go v0.123.0 // indirect cloud.google.com/go/auth v0.19.0 // indirect cloud.google.com/go/auth/oauth2adapt v0.2.8 // indirect - cloud.google.com/go/longrunning v0.9.0 // indirect + cloud.google.com/go/iam v1.9.0 // indirect + cloud.google.com/go/monitoring v1.24.3 // indirect dario.cat/mergo v1.0.2 // indirect github.com/Azure/go-ansiterm v0.0.0-20250102033503-faa5f7b0171c // indirect github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.33.0 // indirect diff --git a/go.sum b/go.sum index 64c57966a0..ab335f79cf 100644 --- a/go.sum +++ b/go.sum @@ -9,8 +9,6 @@ cloud.google.com/go/auth/oauth2adapt v0.2.8 h1:keo8NaayQZ6wimpNSmW5OPc283g65QNIi cloud.google.com/go/auth/oauth2adapt v0.2.8/go.mod h1:XQ9y31RkqZCcwJWNSx2Xvric3RrU88hAYYbjDWYDL+c= cloud.google.com/go/compute/metadata v0.9.0 h1:pDUj4QMoPejqq20dK0Pg2N4yG9zIkYGdBtwLoEkH9Zs= cloud.google.com/go/compute/metadata v0.9.0/go.mod h1:E0bWwX5wTnLPedCKqk3pJmVgCBSM6qQI1yTBdEb3C10= -cloud.google.com/go/container v1.49.0 h1:K4nmtmJezHOzsIyedAOv1Ok36krw1apFmo4zXBaRL1A= -cloud.google.com/go/container v1.49.0/go.mod h1:EvqoT2eXfxLweXXUlhAMGR0sOAB00XPzEjoL01esSDs= cloud.google.com/go/iam v1.9.0 h1:89wyjxT6DL4b5rk/Nk8eBC9DHqf+JiMstrn5IEYxFw4= cloud.google.com/go/iam v1.9.0/go.mod h1:KP+nKGugNJW4LcLx1uEZcq1ok5sQHFaQehQNl4QDgV4= cloud.google.com/go/logging v1.13.2 h1:qqlHCBvieJT9Cdq4QqYx1KPadCQ2noD4FK02eNqHAjA= @@ -19,10 +17,6 @@ cloud.google.com/go/longrunning v0.9.0 h1:0EzbDEGsAvOZNbqXopgniY0w0a1phvu5IdUFq8 cloud.google.com/go/longrunning v0.9.0/go.mod h1:pkTz846W7bF4o2SzdWJ40Hu0Re+UoNT6Q5t+igIcb8E= cloud.google.com/go/monitoring v1.24.3 h1:dde+gMNc0UhPZD1Azu6at2e79bfdztVDS5lvhOdsgaE= cloud.google.com/go/monitoring v1.24.3/go.mod h1:nYP6W0tm3N9H/bOw8am7t62YTzZY+zUeQ+Bi6+2eonI= -cloud.google.com/go/resourcemanager v1.13.0 h1:cc291PxLoKrHKVxqoJ2uMMzrxVJj+sRe+iEb1DFlDNA= -cloud.google.com/go/resourcemanager v1.13.0/go.mod h1:ve0VNxPoDU6XxDuEMCjkineb0YzXQXx3mOWwnNckGDE= -cloud.google.com/go/serviceusage v1.14.0 h1:2wVWxmoPU6zsMC0PUG5eOv34HNcGawrP98B1WqSaPKo= -cloud.google.com/go/serviceusage v1.14.0/go.mod h1:qUjKUDKkN+4yMmZfOaLleMRthZgGJgwDf72GmyuC6Gk= cloud.google.com/go/storage v1.62.1 h1:Os0G3XbUbjZumkpDUf2Y0rLoXJTCF1kU2kWUujKYXD8= cloud.google.com/go/storage v1.62.1/go.mod h1:cpYz/kRVZ+UQAF1uHeea10/9ewcRbxGoGNKsS9daSXA= cloud.google.com/go/trace v1.11.7 h1:kDNDX8JkaAG3R2nq1lIdkb7FCSi1rCmsEtKVsty7p+U= diff --git a/hack/ate-dev-env.sh.example b/hack/ate-dev-env.sh.example index 653e1e42c1..87b0f7b0a5 100644 --- a/hack/ate-dev-env.sh.example +++ b/hack/ate-dev-env.sh.example @@ -25,12 +25,13 @@ export NETWORK=default export SUBNETWORK=default export CLUSTER_NAME=substrate-poc -# Supported: 1.36 with the v1beta1 PodCertificate APIs enabled, which setup-gcp -# does, or 1.37+, which serves them under v1. Anything below 1.36 does not +# Supported: 1.36 with the v1beta1 PodCertificate APIs enabled, which +# substrate-gke's setup-gcp does, or 1.37+, which serves them under v1. Anything below 1.36 does not # work. GKE retires patch versions over time — if cluster creation rejects # this pin, pick a current one from: # gcloud container get-server-config --zone ${CLUSTER_LOCATION} --format="value(defaultClusterVersion)" -# See tools/setup-gcp/README.md ("Create Cluster") for the full constraint. +# See tools/setup-gcp/README.md ("Create Cluster") in +# https://github.com/ai-on-gke/substrate-gke for the full constraint. export CLUSTER_VERSION=1.36.3-gke.1767000 export NODE_POOL_NAME=gvisor-pool export NODE_POOL_VERSION=1.36.3-gke.1767000 @@ -47,8 +48,8 @@ export KUBECTL_CONTEXT= export BUCKET_NAME=snapshot-substrate-test-${PROJECT_ID} # Cluster-wide location ate-api-server stores snapshots under. export SNAPSHOT_LOCATION="gs://${BUCKET_NAME}/" -# Google service account snapshot transfers run as on GCS. setup-gcp creates -# it, and ate-setup and hack/teardown.sh read the same name. +# Google service account snapshot transfers run as on GCS. substrate-gke's +# setup-gcp creates it, and ate-setup reads the same name. export SNAPSHOT_TRANSFER_GSA_NAME=ate-snapshot-transfer export KO_DOCKER_REPO="gcr.io/${PROJECT_ID}/ate-images" diff --git a/hack/install-microvm-deps.sh b/hack/install-microvm-deps.sh index 312da2e346..5c82940a80 100755 --- a/hack/install-microvm-deps.sh +++ b/hack/install-microvm-deps.sh @@ -41,7 +41,7 @@ # Env (most come from .ate-dev-env.sh): # BUCKET_NAME object store bucket for snapshots (default: ate-snapshots). On # kind the assets share it. On GKE they go to BUCKET_NAME-assets, -# which tools/setup-gcp creates, so nodes can read assets +# which substrate-gke's tools/setup-gcp creates, so nodes can read assets # without being able to read snapshots. # KUBECTL_CONTEXT (optional) kube context; threaded into kubectl. # PROJECT_ID (optional) GCP project for the GCS asset upload (GKE path). diff --git a/hack/microvm-assets/README.md b/hack/microvm-assets/README.md index 00580b90d5..d2110557db 100644 --- a/hack/microvm-assets/README.md +++ b/hack/microvm-assets/README.md @@ -54,5 +54,5 @@ it as a device, which is what places microVM workers there. `snapshotConfig.location` followed by `/atespaces/`): the node's object-store plugin refuses to serve anything there as an asset. The staging scripts use `kata-assets/`, which is outside it. On GKE they stage into the asset bucket, `BUCKET_NAME-assets`, - the only bucket setup-gcp lets nodes read. On kind they share the rustfs bucket. + the only bucket substrate-gke's setup-gcp lets nodes read. On kind they share the rustfs bucket. - `assets` is single-arch (unlike runsc's amd64/arm64): stage assets matching the node arch. diff --git a/hack/microvm-assets/stage-to-gcs.sh b/hack/microvm-assets/stage-to-gcs.sh index 7820e6c9c3..c080ebd9e6 100755 --- a/hack/microvm-assets/stage-to-gcs.sh +++ b/hack/microvm-assets/stage-to-gcs.sh @@ -33,7 +33,7 @@ ROOT="$(git rev-parse --show-toplevel)" OUT="${OUT:-${ROOT}/bin/microvm-assets/amd64}" BUCKET="${BUCKET:?set BUCKET to the asset bucket, BUCKET_NAME-assets}" -# Pass --project only when PROJECT_ID is set (mirrors hack/teardown.sh); otherwise +# Pass --project only when PROJECT_ID is set; otherwise # gcloud uses its active config project. ${PROJECT_ID:+...} elides the flag entirely # when unset (same idiom as KUBECTL_CONTEXT in hack/run-microvm-demo.sh). echo ">> Uploading assets to gs://${BUCKET}/kata-assets/ ..." diff --git a/hack/teardown.sh b/hack/teardown.sh deleted file mode 100755 index 8651b6f8d8..0000000000 --- a/hack/teardown.sh +++ /dev/null @@ -1,237 +0,0 @@ -#!/usr/bin/env bash - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -set -o errexit -o nounset -o pipefail - -# Source the environment variables. The file is optional: an installer (or a -# user pasting a one-liner) can pass the same variables through the -# environment instead, which also makes teardown possible on a machine that -# never had a dev-env file. -if [ -f .ate-dev-env.sh ]; then - source .ate-dev-env.sh -fi -# No cluster-admin precheck here: every step below talks to GCP, not to the -# cluster, and requiring a live kubectl context would block tearing down a -# cluster that is already half-gone. - -# require checks that each named variable is set, so a step fails up front -# with the variable's name rather than mid-deletion with a gcloud error. Each -# step declares only what it uses: deleting a bucket must not demand a node -# pool name. -require() { - for var in "$@"; do - if [ -z "${!var:-}" ]; then - echo "${var} is not set; export it or create .ate-dev-env.sh from the example file in hack" >&2 - exit 1 - fi - done -} - -# --- Helper Functions --- - -# transfer_service_account prints the snapshot transfer service account's -# email, from SNAPSHOT_TRANSFER_GSA_NAME as setup-gcp and ate-setup build it. -transfer_service_account() { - echo "${SNAPSHOT_TRANSFER_GSA_NAME:-ate-snapshot-transfer}@${PROJECT_ID}.iam.gserviceaccount.com" -} -function usage() { - echo "Usage: $0 [options]" - echo "Options:" - echo " --delete-iam-policy-bindings Delete bucket IAM policy bindings for atelet, ate-api-server and the transfer account" - echo " --delete-snapshot-bucket Delete snapshot bucket" - echo " --delete-gvisor-node-pool Delete gVisor node pool" - echo " --delete-cluster Delete GKE cluster" - echo " --cluster-scoped Run the steps above (reverse order of setup)" - echo "Project-wide options. These affect every Substrate cluster in the project:" - echo " --delete-dashboards Delete the Substrate monitoring dashboards" - echo " --delete-transfer-service-account Delete the snapshot transfer service account" - echo " --revoke-atelet-permissions Revoke atelet's project-level IAM bindings" - echo " --revoke-gke-node-permissions Revoke GKE nodes permission to pull images, on every cluster that uses the default compute service account" - echo " --all Run every step above (reverse order of setup)" - exit 1 -} - -# --- Teardown Functions --- - -# Revoke GKE Node Permissions (Reverse of grant_gke_node_permissions) -revoke_gke_node_permissions() { - require PROJECT_ID PROJECT_NUMBER - echo "Revoking GKE node permissions..." - gcloud projects remove-iam-policy-binding "${PROJECT_ID}" \ - --member="serviceAccount:${PROJECT_NUMBER}-compute@developer.gserviceaccount.com" \ - --role="roles/storage.objectViewer" \ - --condition=None \ - --quiet || true - gcloud projects remove-iam-policy-binding "${PROJECT_ID}" \ - --member="serviceAccount:${PROJECT_NUMBER}-compute@developer.gserviceaccount.com" \ - --role="roles/artifactregistry.reader" \ - --condition=None \ - --quiet || true -} - -# Revoke Atelet's project-level bindings (Reverse of grant_atelet_permissions) -revoke_atelet_permissions() { - require PROJECT_ID PROJECT_NUMBER - echo "Revoking atelet project-level permissions..." - local member="principal://iam.googleapis.com/projects/${PROJECT_NUMBER}/locations/global/workloadIdentityPools/${PROJECT_ID}.svc.id.goog/subject/ns/ate-system/sa/atelet" - gcloud projects remove-iam-policy-binding "${PROJECT_ID}" \ - --member="${member}" \ - --role="roles/storage.objectAdmin" \ - --condition=None \ - --quiet || true - gcloud projects remove-iam-policy-binding "${PROJECT_ID}" \ - --member="${member}" \ - --role="roles/artifactregistry.reader" \ - --condition=None \ - --quiet || true -} - -# Delete Monitoring Dashboards (Reverse of create_monitoring_dashboards) -delete_dashboards() { - require PROJECT_ID - echo "Deleting Substrate monitoring dashboards..." - # Matched by display name, since setup only records names in its JSON. - local names=( - "Substrate Snapshot Size & QPS" - "Substrate Routing & E2E Latency" - "Substrate gRPC Server — latency / QPS / errors" - ) - for display_name in "${names[@]}"; do - for dashboard in $(gcloud monitoring dashboards list \ - --project="${PROJECT_ID}" \ - --filter="displayName=\"${display_name}\"" \ - --format="value(name)" 2>/dev/null); do - gcloud monitoring dashboards delete "${dashboard}" \ - --project="${PROJECT_ID}" \ - --quiet || true - done - done -} - -# Delete IAM Policy Bindings for Bucket (Reverse of create_iam_policy_bindings) -delete_iam_policy_bindings() { - require PROJECT_ID PROJECT_NUMBER BUCKET_NAME - echo "Deleting IAM policy bindings for bucket..." - local wi="principal://iam.googleapis.com/projects/${PROJECT_NUMBER}/locations/global/workloadIdentityPools/${PROJECT_ID}.svc.id.goog/subject/ns/ate-system/sa" - local asset_bucket="${BUCKET_NAME}-assets" - local subject role - for subject in atelet ate-api-server; do - for role in roles/storage.objectAdmin roles/storage.bucketViewer; do - gcloud storage buckets remove-iam-policy-binding "gs://${BUCKET_NAME}" \ - --member="${wi}/${subject}" \ - --role="${role}" \ - --quiet || true - done - done - local transfer - transfer="serviceAccount:$(transfer_service_account)" - for role in roles/storage.objectAdmin roles/storage.bucketViewer; do - gcloud storage buckets remove-iam-policy-binding "gs://${BUCKET_NAME}" \ - --member="${transfer}" \ - --role="${role}" \ - --quiet || true - done - gcloud storage buckets remove-iam-policy-binding "gs://${asset_bucket}" \ - --member="${wi}/atelet" \ - --role=roles/storage.objectViewer \ - --quiet || true -} - -# Delete the snapshot transfer service account. Deleting it drops the token -# creator grants on it. -delete_transfer_service_account() { - require PROJECT_ID - echo "Deleting the snapshot transfer service account..." - gcloud iam service-accounts delete "$(transfer_service_account)" \ - --project="${PROJECT_ID}" --quiet || true -} - -# Delete Snapshot Bucket (Reverse of create_snapshot_bucket) -delete_snapshot_bucket() { - require PROJECT_ID BUCKET_NAME - echo "Deleting snapshot and asset buckets..." - local bucket asset_bucket="${BUCKET_NAME}-assets" - for bucket in "${BUCKET_NAME}" "${asset_bucket}"; do - gcloud storage rm --recursive "gs://${bucket}/**" --project="${PROJECT_ID}" --quiet || true - gcloud storage buckets delete "gs://${bucket}" --project="${PROJECT_ID}" --quiet || true - done -} - -# Delete gVisor Node Pool (Reverse of create_gvisor_node_pool) -delete_gvisor_node_pool() { - require PROJECT_ID CLUSTER_NAME CLUSTER_LOCATION NODE_POOL_NAME - echo "Deleting gVisor node pool..." - gcloud container node-pools delete "${NODE_POOL_NAME}" \ - --cluster="${CLUSTER_NAME}" \ - --location="${CLUSTER_LOCATION}" \ - --project="${PROJECT_ID}" \ - --quiet || true -} - -# Delete Cluster (Reverse of create_cluster) -delete_cluster() { - require PROJECT_ID CLUSTER_NAME CLUSTER_LOCATION - echo "Deleting GKE cluster..." - gcloud container clusters delete "${CLUSTER_NAME}" \ - --location="${CLUSTER_LOCATION}" \ - --project="${PROJECT_ID}" \ - --quiet || true -} - -# delete_buckets_and_cluster deletes the buckets, the node pool and the cluster. -delete_buckets_and_cluster() { - delete_snapshot_bucket - # Deleting the cluster removes its node pools, so this does not insist on a - # pool name a caller (e.g. an installer) may not track. - if [ -n "${NODE_POOL_NAME:-}" ]; then - delete_gvisor_node_pool - else - echo "NODE_POOL_NAME not set; skipping node pool deletion (the cluster deletion removes its pools)" - fi - delete_cluster -} - -# --- Main Logic --- -if [ "$#" -eq 0 ]; then - usage -fi - -while [[ "$#" -gt 0 ]]; do - case $1 in - --revoke-gke-node-permissions) revoke_gke_node_permissions ;; - --revoke-atelet-permissions) revoke_atelet_permissions ;; - --delete-iam-policy-bindings) delete_iam_policy_bindings ;; - --delete-transfer-service-account) delete_transfer_service_account ;; - --delete-snapshot-bucket) delete_snapshot_bucket ;; - --delete-gvisor-node-pool) delete_gvisor_node_pool ;; - --delete-cluster) delete_cluster ;; - --delete-dashboards) delete_dashboards ;; - --cluster-scoped) - delete_iam_policy_bindings - delete_buckets_and_cluster - ;; - --all) - delete_dashboards - delete_iam_policy_bindings - delete_transfer_service_account - revoke_atelet_permissions - revoke_gke_node_permissions - delete_buckets_and_cluster - ;; - *) usage ;; - esac - shift -done diff --git a/internal/installdefaults/installdefaults.go b/internal/installdefaults/installdefaults.go index 2402e7986a..8613a0e5bc 100644 --- a/internal/installdefaults/installdefaults.go +++ b/internal/installdefaults/installdefaults.go @@ -53,7 +53,8 @@ const ( APIServerServiceAccount = "ate-api-server" // TransferServiceAccountName is the default name of the Google service - // account snapshot transfers run as on GCS, which tools/setup-gcp creates. + // account snapshot transfers run as on GCS, which substrate-gke's + // tools/setup-gcp creates. TransferServiceAccountName = "ate-snapshot-transfer" // WorkerServiceAccount is what worker pods run as when their WorkerPool diff --git a/tools/setup-gcp/README.md b/tools/setup-gcp/README.md deleted file mode 100644 index 82fa35866a..0000000000 --- a/tools/setup-gcp/README.md +++ /dev/null @@ -1,431 +0,0 @@ -# GCP Setup Tool (`setup-gcp`) - -This tool automates the provisioning and configuration of Google Cloud Platform (GCP) resources required to run Agent Substrate. It is designed to be idempotent, meaning it can be run multiple times safely to ensure the environment is correctly configured. - -## Overview - -The `setup-gcp` tool provisions and configures GCP resources for Agent Substrate. -It uses a hierarchical command structure: - -* `setup-gcp` (root) - * `enable apis` - Enable required GCP APIs. - * `create` - Parent command for resource creation. - * `cluster` - Create GKE cluster. - * `bucket` - Create the GCS snapshot and asset buckets. - * `iam` - Create IAM policy bindings and grant permissions. - * `dashboards` - Create Cloud Monitoring dashboards. - * `cloudsql` - Create a Cloud SQL PostgreSQL instance for the ateapi store, with IAM database authentication (see [cloud-sql.md](cloud-sql.md)). - * `bootstrap` - Run all setup steps in order. - -## Prerequisites - -1. **Go**: Ensure Go is installed (version compatible with the project, see root `go.mod`). -2. **Google Cloud SDK (`gcloud`)**: Installed and authenticated. -3. **Application Default Credentials (ADC)**: The tool uses Google Cloud client libraries. You must set up ADC: - ```bash - gcloud auth application-default login - ``` -4. **Target Project**: You must have a GCP project created and have sufficient permissions (typically Owner or Editor) to create resources like GKE clusters, GCS buckets, and IAM bindings. - -## Configuration & Defaults - -All CLI flags can be configured via environment variables. If an environment variable is set, it will be used as the default value for the corresponding flag. Command-line flags always take precedence over environment variables. - -A convenient way to manage these is to copy the example environment file, customize it, and source it before running the tool: - -```bash -cp hack/ate-dev-env.sh.example .ate-dev-env.sh -# Edit .ate-dev-env.sh to match your project and preferences -source .ate-dev-env.sh -``` - -## Global Flags - -These flags can be passed to the root command and apply to all subcommands: - -| Flag | Description | Default Env Var | Fallback Default | -| :--- | :--- | :--- | :--- | -| `--project-id` | GCP Project ID. | `PROJECT_ID` | None (Required) | -| `--project-number` | GCP Project Number (optional, resolved from `--project-id` if needed). | `PROJECT_NUMBER` | None | -| `--region` | GCP Region for regional resources. | `GCE_REGION` | `us-west1` | - -## Subcommands - -### 1. Enable APIs - -Enables the required GCP APIs for the project. - -```bash -go run ./tools/setup-gcp enable apis [flags] -``` - -**Flags:** -* (Uses global `--project-id`) - -### 2. Create Cluster - -Creates a GKE cluster configured for Agent Substrate (with Workload Identity, -required Kubernetes beta APIs, and Managed OpenTelemetry enabled, and the -Filestore CSI driver disabled). An existing cluster keeps its Filestore -add-on setting. - -> [!WARNING] -> Agent Substrate requires PodCertificateRequest and ClusterTrustBundle APIs. -> ClusterTrustBundle discovery prefers `certificates.k8s.io/v1`, falling back -> to `certificates.k8s.io/v1beta1` only when the stable resource is not served. -> PodCertificateRequest discovery independently prefers `v1` over `v1beta1`. -> GKE 1.37 and higher serve both under `v1` by default. GKE 1.36 serves them -> only under `v1beta1`, as beta APIs that must be enabled. Versions below 1.36 -> are not supported. -> -> `create cluster` enables the beta APIs on every cluster it creates, whatever -> its version. If you bring your own 1.36 cluster, create it with them: -> -> ```bash -> gcloud container clusters create "${CLUSTER_NAME}" ... \ -> --enable-kubernetes-unstable-apis=certificates.k8s.io/v1beta1/podcertificaterequests,certificates.k8s.io/v1beta1/clustertrustbundles -> ``` -> -> A 1.36 cluster created without them can be fixed in place: `create cluster` -> and `bootstrap` turn them on for an existing cluster, or run `gcloud -> container clusters update` with the same flag yourself. The APIs are served -> once the update finishes. **That is not enough on its own:** pod -> certificate projection is a kubelet feature, gated through 1.36, and nodes -> that were already running do not pick it up. Pods scheduled onto them fail -> with `MountVolume.SetUp failed: unimplemented`. Replace each such pool: -> create a new one, let workloads move to it, then delete the old one. The -> tool logs both commands for every pool it finds, with the new pool's -> machine type, disk, node count and nested virtualization copied from the -> old one; carry over anything else you customized (taints, service account, -> autoscaling) yourself: -> -> ```bash -> gcloud container node-pools create "${NODE_POOL}-2" --cluster="${CLUSTER_NAME}" \ -> --location="${CLUSTER_LOCATION}" --machine-type="${NODE_MACHINE_TYPE}" ... -> gcloud container node-pools delete "${NODE_POOL}" --cluster="${CLUSTER_NAME}" \ -> --location="${CLUSTER_LOCATION}" -> ``` -> -> Upgrading a pool to the version it already runs does **not** help: GKE -> skips a same-version upgrade without recreating any nodes. Node pools on -> 1.37 or higher need nothing further. -> -> The symptom of a cluster without the APIs: the install hangs at "Waiting for -> podcertificate ClusterTrustBundles to be ready" and `kubectl get -> clustertrustbundles` reports the resource type is not served. - -```bash -go run ./tools/setup-gcp create cluster [flags] -``` - -**Flags:** -| Flag | Description | Default Env Var | Fallback Default | -| :--- | :--- | :--- | :--- | -| `--name` | Name of the GKE cluster. | `CLUSTER_NAME` | `substrate-poc` | -| `--location` | Zone or region for the cluster (must be compatible with `--region`). | `CLUSTER_LOCATION` | `us-west1-c` | -| `--version` | Kubernetes version. | `CLUSTER_VERSION` | None | -| `--network` | VPC network name. | `NETWORK` | `default` | -| `--subnetwork` | VPC subnetwork name. | `SUBNETWORK` | `default` | -| `--machine-type` | Machine type for the node pool. | `NODE_MACHINE_TYPE` | `c3-standard-4` | -| `--enable-nested-virtualization` | Create the node pool with nested virtualization, exposing `/dev/kvm` for microVM workers. | `ENABLE_NESTED_VIRTUALIZATION` | `true` | -| `--boot-disk-size` | Boot disk size in GB for the node pool (0 = GKE default). | `BOOT_DISK_SIZE_GB` | None | -| `--boot-disk-type` | Boot disk type for the node pool (empty = GKE default). | `BOOT_DISK_TYPE` | None | - -`NODE_MACHINE_TYPE` was named `GVISOR_NODE_MACHINE_TYPE`. The old name still -works and warns; rename it in your `.ate-dev-env.sh`. - -**Node sysctls for high sandbox density (>800 sandboxes/node):** each awake -actor sandbox creates its own network namespace, veth/tap pair, and inotify -watches on the host kernel (even in multi-actor worker pods). Default COS -limits (`net.ipv4.neigh.default.gc_thresh3 = 1024`, -`fs.inotify.max_user_instances = 128`, `fs.inotify.max_user_watches = 8192`) -fail around ~800–1,000 live sandboxes per node: in single-node density -benchmarks on `c3-standard-192-metal` (50–100 multi-actor worker pods), -inotify watches exhausted at ~800 live sandboxes and the host ARP cache -overflowed on the 1,000-sandbox wave after passing 850 (`dmesg`: `neighbour: -arp_cache: neighbor table overflow!`), while raising these sysctls sustained -1,500 concurrent sandboxes per node. -`create cluster` sets these sysctls on `substrate-node-pool` **when creating a -new cluster**; existing clusters keep their original node-pool sysctls -(`create cluster` logs a warning if they are missing) and must be updated via -one of the options below. - -* **When creating or updating node pools** (e.g., bare-metal pools), pass - `--system-config-from-file=systemconfig.yaml` to `gcloud container node-pools - create` or `update`. Note that `node-pools update --system-config-from-file` - **replaces the pool's entire system config** (so carry over any existing - sysctls/kubelet/cgroup settings) and **recreates the pool's nodes**: - - ```yaml - # systemconfig.yaml - linuxConfig: - sysctls: - net.ipv4.neigh.default.gc_thresh1: '4096' - net.ipv4.neigh.default.gc_thresh2: '16384' - net.ipv4.neigh.default.gc_thresh3: '32768' - fs.inotify.max_user_instances: '65536' - fs.inotify.max_user_watches: '1048576' - ``` - -* **On an already-running node pool (without rolling/recreating nodes)**, apply - a privileged `DaemonSet` to tune the host sysctls in place: - - ```yaml - apiVersion: apps/v1 - kind: DaemonSet - metadata: - name: substrate-sysctl-tuner - namespace: kube-system - spec: - selector: - matchLabels: - app: substrate-sysctl-tuner - template: - metadata: - labels: - app: substrate-sysctl-tuner - spec: - hostNetwork: true - tolerations: - - operator: Exists - containers: - - name: sysctl-tuner - image: busybox:1.36 - securityContext: - privileged: true - command: - - sh - - -ce - - | - sysctl -w net.ipv4.neigh.default.gc_thresh1=4096 - sysctl -w net.ipv4.neigh.default.gc_thresh2=16384 - sysctl -w net.ipv4.neigh.default.gc_thresh3=32768 - sysctl -w fs.inotify.max_user_instances=65536 - sysctl -w fs.inotify.max_user_watches=1048576 - sleep infinity - ``` - -### 3. Create Bucket - -Creates the GCS bucket for snapshots and the asset bucket, `NAME-assets`, for -microVM sandbox assets. - -```bash -go run ./tools/setup-gcp create bucket [flags] -``` - -**Flags:** -| Flag | Description | Default Env Var | Fallback Default | -| :--- | :--- | :--- | :--- | -| `--name` | Name of the GCS snapshot bucket. The microVM asset bucket is created beside it as `NAME-assets`. | `BUCKET_NAME` | None (Required*) | - -*\*Note: Required unless the `BUCKET_NAME` environment variable is set.* - -### 4. Create IAM - -Configures IAM permissions and Workload Identity bindings. - -```bash -go run ./tools/setup-gcp create iam [flags] -``` - -**Flags:** -| Flag | Description | Default Env Var | Fallback Default | -| :--- | :--- | :--- | :--- | -| `--bucket` | GCS bucket name. | `BUCKET_NAME` | None (Required for bucket bindings*) | -| `--gke-nodes` | Grant GKE nodes permission to pull images. | - | `true` | -| `--atelet` | Grant atelet project-level permissions. | - | `true` | -| `--transfer-service-account` | Create the snapshot transfer service account and let ate-api-server create tokens for it. | - | `true` | -| `--transfer-gsa-name` | Name of the snapshot transfer service account to create. ate-setup and `hack/teardown.sh` read the same variable. | `SNAPSHOT_TRANSFER_GSA_NAME` | `ate-snapshot-transfer` | -| `--bucket-bindings` | Grant ate-api-server and the snapshot transfer service account access to the snapshot bucket, and atelet read access to the asset bucket. | - | `true` | - -*\*Note: Required for bucket bindings unless the `BUCKET_NAME` environment variable is set.* - -#### What `create iam` actually grants - -On a fresh GCP project these bindings do not exist, and nothing else creates -them. Without them atelet cannot fetch microVM assets, ate-api cannot copy or -collect snapshots or issue per-actor tokens for them (`403` from GCS on the -first suspend/resume), and nodes cannot pull images. `bootstrap` and `create iam` -apply them for you. The table below is the reference for auditing them, or for -applying them by hand in projects where you cannot run the tool with -project-level IAM permissions. - -atelet and ate-api authenticate via [GKE Workload Identity -Federation](https://cloud.google.com/kubernetes-engine/docs/how-to/workload-identity): -their Kubernetes ServiceAccounts (`ate-system/atelet` and -`ate-system/ate-api-server`, created by `ate-setup`) are addressed -directly as IAM principals. The one Google service account `create iam` -creates is the snapshot transfer account⁴, which ate-api-server's credential -exchange impersonates and downscopes per actor for every snapshot transfer. -This only works on a cluster with Workload Identity enabled. `create cluster` -enables the `PROJECT_ID.svc.id.goog` pool, and a pre-existing cluster must -have it enabled too, or their GCS calls fail with `401`. - -| Member | Role | Resource | Why | -| :--- | :--- | :--- | :--- | -| atelet WI principal¹ | `roles/artifactregistry.reader` | project² | Pull sandbox runtime assets | -| ate-api-server WI principal¹ | `roles/storage.objectAdmin` | snapshot bucket | Copy external snapshots for tags, delete the ones nothing refers to | -| ate-api-server WI principal¹ | `roles/storage.bucketViewer` | snapshot bucket | List/stat the snapshot bucket | -| snapshot transfer SA⁴ | `roles/storage.objectAdmin` | snapshot bucket | Snapshot transfers, on tokens the credential exchange downscopes per actor | -| snapshot transfer SA⁴ | `roles/storage.bucketViewer` | snapshot bucket | List/stat the snapshot bucket | -| ate-api-server WI principal¹ | `roles/iam.serviceAccountTokenCreator` | snapshot transfer SA⁴ | The credential exchange impersonates it | -| Cloud SQL GSA⁵ | `roles/iam.serviceAccountTokenCreator` | snapshot transfer SA⁴ | Granted by `create cloudsql`: with Cloud SQL, ate-api-server's pod runs as this account | -| atelet WI principal¹ | `roles/storage.objectViewer` | asset bucket (`BUCKET_NAME-assets`) | Read microVM sandbox assets | -| default compute SA³ | `roles/artifactregistry.reader` | project² | Nodes pull images from Artifact Registry, which also serves gcr.io | - -¹ `principal://iam.googleapis.com/projects/PROJECT_NUMBER/locations/global/workloadIdentityPools/PROJECT_ID.svc.id.goog/subject/ns/ate-system/sa/SERVICE_ACCOUNT` — note it is keyed to the **project number**, not the ID. -² Project-level today; scoping these down is tracked in the TODOs in `cmd/iam.go`. -³ `PROJECT_NUMBER-compute@developer.gserviceaccount.com`. It gets no storage role, since root on a node can use it. Installs set up before this also granted it `roles/storage.objectViewer` on the project. Remove that with -`gcloud projects remove-iam-policy-binding "${PROJECT_ID}" --member="serviceAccount:${PROJECT_NUMBER}-compute@developer.gserviceaccount.com" --role=roles/storage.objectViewer --condition=None`. -⁴ `NAME@PROJECT_ID.iam.gserviceaccount.com`, with `NAME` from `SNAPSHOT_TRANSFER_GSA_NAME`. setup-gcp and `hack/teardown.sh` default it to `ate-snapshot-transfer`. ate-setup has no default and requires it on GKE. -⁵ `ate-api-server@PROJECT_ID.iam.gserviceaccount.com` by default, see [cloud-sql.md](cloud-sql.md). - -Manual equivalent: - -```bash -WI="principal://iam.googleapis.com/projects/${PROJECT_NUMBER}/locations/global/workloadIdentityPools/${PROJECT_ID}.svc.id.goog/subject/ns/ate-system/sa" -ATELET="${WI}/atelet" -ATE_API="${WI}/ate-api-server" -TRANSFER_NAME="${SNAPSHOT_TRANSFER_GSA_NAME:-ate-snapshot-transfer}" -TRANSFER="${TRANSFER_NAME}@${PROJECT_ID}.iam.gserviceaccount.com" - -gcloud projects add-iam-policy-binding "${PROJECT_ID}" \ - --member="${ATELET}" --role=roles/artifactregistry.reader -gcloud iam service-accounts create "${TRANSFER_NAME}" --project="${PROJECT_ID}" \ - --display-name="Substrate snapshot transfers" -gcloud iam service-accounts add-iam-policy-binding "${TRANSFER}" --project="${PROJECT_ID}" \ - --member="${ATE_API}" --role=roles/iam.serviceAccountTokenCreator -gcloud storage buckets add-iam-policy-binding "gs://${BUCKET_NAME}" \ - --member="${ATE_API}" --role=roles/storage.objectAdmin -gcloud storage buckets add-iam-policy-binding "gs://${BUCKET_NAME}" \ - --member="${ATE_API}" --role=roles/storage.bucketViewer -gcloud storage buckets add-iam-policy-binding "gs://${BUCKET_NAME}" \ - --member="serviceAccount:${TRANSFER}" --role=roles/storage.objectAdmin -gcloud storage buckets add-iam-policy-binding "gs://${BUCKET_NAME}" \ - --member="serviceAccount:${TRANSFER}" --role=roles/storage.bucketViewer -gcloud storage buckets add-iam-policy-binding "gs://${BUCKET_NAME}-assets" \ - --member="${ATELET}" --role=roles/storage.objectViewer -``` - -#### Upgrading an existing install - -Substrate does not support upgrading a cluster in place yet. A cluster with -microVM workers has to be recreated: each node indexes a sandbox runtime by -the digests of its assets, which do not change when the assets move to the -asset bucket, so a node keeps fetching them from the snapshot bucket. The -commands below still apply when the new cluster reuses the GCP project. - -Run `create iam` before deploying a Substrate release whose credential -exchange impersonates the snapshot transfer account. It creates the account -and its grants, and ate-setup refuses to deploy ate-api-server on GKE until -`SNAPSHOT_TRANSFER_GSA_NAME` names it. With Cloud SQL, rerun -`create cloudsql` too, so its account may create the transfer account's -tokens. - -setup-gcp only adds bindings. An install set up before the asset bucket -existed still grants atelet object admin on the project and on the snapshot -bucket. Upgrade Substrate first, to a release whose node plugin gets snapshot -credentials from ate-api-server's credential exchange. On an older release, -removing these grants makes every suspend and resume fail with `403`. Remove -those grants after running `create bucket` and `create iam`, and after -rerunning `hack/install-microvm-deps.sh --install` if you use microVM -workers, so the assets are in the asset bucket. `ATELET` is set as in the -manual equivalent above: - -```bash -gcloud projects remove-iam-policy-binding "${PROJECT_ID}" \ - --member="${ATELET}" --role=roles/storage.objectAdmin --condition=None -gcloud storage buckets remove-iam-policy-binding "gs://${BUCKET_NAME}" \ - --member="${ATELET}" --role=roles/storage.objectAdmin -gcloud storage buckets remove-iam-policy-binding "gs://${BUCKET_NAME}" \ - --member="${ATELET}" --role=roles/storage.bucketViewer -``` - -An install from before the node service account lost its project-wide read -access also still has that grant. Remove it too: - -```bash -gcloud projects remove-iam-policy-binding "${PROJECT_ID}" \ - --member="serviceAccount:${PROJECT_NUMBER}-compute@developer.gserviceaccount.com" \ - --role=roles/storage.objectViewer --condition=None -``` - -### 5. Create Dashboards - -Creates or updates Cloud Monitoring dashboards. - -```bash -go run ./tools/setup-gcp create dashboards [flags] -``` - -**Flags:** -| Flag | Description | Default Env Var | Fallback Default | -| :--- | :--- | :--- | :--- | -| `--dir` | Directory containing dashboard JSON files. | `DASHBOARD_DIR` | `tools/setup-gcp/dashboards` | - -### 6. Bootstrap (All Steps) - -Runs all the setup steps in the correct order to fully bootstrap the environment. - -```bash -go run ./tools/setup-gcp bootstrap [flags] -``` - -**Flags:** -| Flag | Description | Default Env Var | Fallback Default | -| :--- | :--- | :--- | :--- | -| `--cluster-name` | Name of the GKE cluster. | `CLUSTER_NAME` | `substrate-poc` | -| `--cluster-location`| Zone or region for the cluster (must be compatible with `--region`). | `CLUSTER_LOCATION` | `us-west1-c` | -| `--cluster-version` | Kubernetes version. | `CLUSTER_VERSION` | None | -| `--network` | VPC network name. | `NETWORK` | `default` | -| `--subnetwork` | VPC subnetwork name. | `SUBNETWORK` | `default` | -| `--machine-type` | Machine type for the node pool. | `NODE_MACHINE_TYPE` | `c3-standard-4` | -| `--enable-nested-virtualization` | Create the node pool with nested virtualization, exposing `/dev/kvm` for microVM workers. | `ENABLE_NESTED_VIRTUALIZATION` | `true` | -| `--boot-disk-size` | Boot disk size in GB for the node pool (0 = GKE default). | `BOOT_DISK_SIZE_GB` | None | -| `--boot-disk-type` | Boot disk type for the node pool (empty = GKE default). | `BOOT_DISK_TYPE` | None | -| `--bucket-name` | Name of the GCS bucket for snapshots. | `BUCKET_NAME` | None (Required*) | -| `--dashboard-dir` | Directory containing dashboard JSON files. | `DASHBOARD_DIR` | `tools/setup-gcp/dashboards` | -| `--transfer-gsa-name` | Name of the snapshot transfer service account to create. ate-setup and `hack/teardown.sh` read the same variable. | `SNAPSHOT_TRANSFER_GSA_NAME` | `ate-snapshot-transfer` | - -*\*Note: Required unless the `BUCKET_NAME` environment variable is set.* - -`--enable-nested-virtualization` is on by default and needs a `--machine-type` -that supports the feature; pass `--enable-nested-virtualization=false` to turn -it off. It applies only to a cluster this command creates. - -## Examples - -Run the tool from the **repository root** to ensure relative paths to dashboard configurations are resolved correctly. - -### Bootstrap everything using environment variables - -If you have sourced your `.ate-dev-env.sh`: - -```bash -go run ./tools/setup-gcp bootstrap -``` - -### Bootstrap everything overriding some values - -```bash -go run ./tools/setup-gcp bootstrap \ - --cluster-name="custom-cluster" \ - --machine-type="n2-standard-8" -``` - -### Bootstrap a cluster whose nodes cannot run microVM workers - -Nested virtualization is on by default, so turning it off is the case that -needs a flag: - -```bash -go run ./tools/setup-gcp bootstrap \ - --enable-nested-virtualization=false -``` - -### Only create the cluster (using env vars for defaults) - -```bash -go run ./tools/setup-gcp create cluster -``` diff --git a/tools/setup-gcp/cloud-sql.md b/tools/setup-gcp/cloud-sql.md deleted file mode 100644 index ee8c6302f0..0000000000 --- a/tools/setup-gcp/cloud-sql.md +++ /dev/null @@ -1,203 +0,0 @@ -# Cloud SQL for the PostgreSQL store backend - -The ateapi PostgreSQL store can run against -[Cloud SQL for PostgreSQL](https://cloud.google.com/sql/docs/postgres). The -supported, most secure configuration uses the -[Cloud SQL Auth Proxy](https://docs.cloud.google.com/sql/docs/postgres/sql-proxy) -([source](https://github.com/GoogleCloudPlatform/cloud-sql-proxy)) as a -sidecar on `ate-api-server` with [**automatic IAM database -authentication**](https://docs.cloud.google.com/sql/docs/postgres/iam-authentication): - -- **Transport security** — the proxy establishes a TLS 1.3 tunnel to the - instance using ephemeral certificates and verifies the instance's identity. - No server CA files to download, mount, or rotate. ateapi connects to the - proxy over pod-local loopback; that traffic never leaves the pod's network - namespace. -- **Authentication** — establishing the tunnel requires the IAM permission - `cloudsql.instances.connect`, and the database session itself is - authenticated with a short-lived OAuth token for the pod's Workload - Identity (`--auto-iam-authn`). **No database password exists anywhere** — - nothing to store, leak, or rotate; access is revoked in IAM. -- **Cloud-agnostic code** — ateapi itself knows nothing about Cloud SQL. The - sidecar is a deployment-time patch - (`manifests/ate-install/cloudsql/proxy-sidecar-patch.yaml`) applied by - `ate-setup` only when a Cloud SQL instance is configured. - -## 1. Provision - -The cluster must have Workload Identity enabled (clusters created by -`setup-gcp create cluster` do), and the VPC needs [private services -access](https://cloud.google.com/sql/docs/postgres/configure-private-services-access) -(one-time per VPC; the tool prints the two `gcloud` commands if it is -missing). Then: - -```sh -export PROJECT_ID= -go run ./tools/setup-gcp create cloudsql --region= -# other flags: --instance, --tier, --edition, --storage-size, --gsa-name, --network -``` - -This idempotently creates: - -| Resource | Value | -|---|---| -| Cloud SQL instance | PostgreSQL 18, Enterprise edition, private IP only, `cloudsql.iam_authentication=on`, automated backups + point-in-time recovery, deletion protection | -| Database | `atepg` | -| Google service account | `ate-api-server@.iam.gserviceaccount.com` | -| Project IAM roles | `roles/cloudsql.client`, `roles/cloudsql.instanceUser` on the GSA | -| Workload Identity binding | `roles/iam.workloadIdentityUser` for `.svc.id.goog[ate-system/ate-api-server]` on the GSA | -| Token creator binding | `roles/iam.serviceAccountTokenCreator` for the GSA on the snapshot transfer service account, named by `SNAPSHOT_TRANSFER_GSA_NAME` and `ate-snapshot-transfer` by default, created if missing. ate-api-server's pod runs as the GSA, and its credential exchange impersonates the transfer account | -| IAM database user | the GSA, type `CLOUD_IAM_SERVICE_ACCOUNT` | - -> **Note:** The repo otherwise uses WIF-direct -> `principal://` bindings, but Cloud SQL IAM database users must be service -> accounts — federated Kubernetes principals cannot log into the database. The -> KSA is therefore annotated with `iam.gke.io/gcp-service-account` so the -> proxy's ambient credentials resolve to the GSA. - -Deletion protection means an instance cannot be deleted until it is cleared: - -```sh -gcloud sql instances patch --no-deletion-protection -gcloud sql instances delete -``` - -Backups, point-in-time recovery, and the shape of an existing instance are -never reconciled — the settings above apply at creation. Change them later -with `gcloud sql instances patch`. - -## 2. One-time roles and schema privileges - -[IAM database users](https://docs.cloud.google.com/sql/docs/postgres/add-manage-iam-users) -are created with no privileges. By default, ateapi connects as the -IAM user and then assumes `substrate_owner` for migrations or -`substrate_readwrite` for application queries. Create these roles, grant the -IAM user membership, create the `substrate` schema, and configure the -owner's default privileges before deploying. The IAM database username is the GSA email **without** -`.gserviceaccount.com`. - -Getting that `postgres` session on a private-IP-only instance takes two -steps: give `postgres` a temporary password (fresh instances have none), and -run `psql` from inside the cluster, which is the only place with a network -path to the instance. Replace ``, ``, and `` below: - -```sh -gcloud sql users set-password postgres --instance= --password='' -IP=$(gcloud sql instances describe --format="value(ipAddresses[0].ipAddress)") -kubectl run psql-grant --rm -i --restart=Never --image=postgres:18-alpine -- \ - psql "postgresql://postgres:@${IP}:5432/atepg?sslmode=require" \ - -v ON_ERROR_STOP=1 <<'SQL' -BEGIN; -CREATE ROLE substrate_owner NOLOGIN; -CREATE ROLE substrate_readwrite NOLOGIN; -GRANT substrate_owner TO postgres WITH SET TRUE; -GRANT substrate_owner, substrate_readwrite TO "ate-api-server@.iam"; -CREATE SCHEMA substrate AUTHORIZATION substrate_owner; -GRANT USAGE ON SCHEMA substrate TO substrate_readwrite; -ALTER DEFAULT PRIVILEGES FOR ROLE substrate_owner IN SCHEMA substrate - GRANT SELECT, INSERT, UPDATE, DELETE ON TABLES TO substrate_readwrite; -ALTER DEFAULT PRIVILEGES FOR ROLE substrate_owner IN SCHEMA substrate - GRANT USAGE, SELECT, UPDATE ON SEQUENCES TO substrate_readwrite; -ALTER DEFAULT PRIVILEGES FOR ROLE substrate_owner IN SCHEMA substrate - GRANT EXECUTE ON ROUTINES TO substrate_readwrite; -ALTER DEFAULT PRIVILEGES FOR ROLE substrate_owner IN SCHEMA substrate - GRANT USAGE ON TYPES TO substrate_readwrite; -COMMIT; -SQL -``` - -The grant back to `postgres` lets this non-superuser administrator configure -the owner role's default privileges. - -Nothing deployed ever uses this password — afterwards you can scramble it -(`gcloud sql users set-password postgres --instance= ---password="$(openssl rand -hex 16)"`) or keep it for admin access such as -Cloud SQL Studio. Note that `postgres` is not a superuser on Cloud SQL. - -This identity layout requires a fresh `atepg` database. Existing tables and -users need a separate migration of ownership and grants. - -## 3. Deploy - -```sh -export ATE_API_POSTGRES_CLOUDSQL_INSTANCE=:: -export ATE_API_POSTGRES_CLOUDSQL_GSA=ate-api-server@.iam.gserviceaccount.com -go run ./cmd/ate-setup deploy ate-system --credential-provider='{"name":"k8s.io"}' -# Existing installation: deploy apiserver instead of deploy ate-system -``` - -What this does differently from a plain install: - -- Skips the bundled PostgreSQL StatefulSet (a configured Cloud SQL instance - counts as an external database); the install logs the skip and the database - it deferred to. -- Writes the proxy's configuration (`CSQL_PROXY_*`) into the - `ate-api-server-envvars` ConfigMap and synthesizes a passwordless DSN - (`user= host=127.0.0.1 ... sslmode=disable`) into the - `ate-api-server-secret-envvars` Secret for both database connection pools. -- Annotates the `ate-api-server` KSA with the GSA and patches the - `cloud-sql-proxy` native sidecar (initContainer with - `restartPolicy: Always`; requires Kubernetes 1.29+) into the deployment. - The sidecar's `/startup` probe gates ateapi, so ateapi never races the - tunnel. Leaving `ATE_API_POSTGRES_CLOUDSQL_INSTANCE` **unset** on later - redeploys keeps the current Cloud SQL configuration (it is adopted from - the cluster's record); to remove the sidecar and annotation, set it to - the empty string explicitly: `ATE_API_POSTGRES_CLOUDSQL_INSTANCE=""`. - -Optional environment variables: - -- `ATE_API_POSTGRES_CLOUDSQL_IP_TYPE` — `private` (default), `public`, `psc`. - Selects which of the instance's addresses the proxy dials, for connecting - to instances provisioned outside this tool: `setup-gcp create cloudsql` - itself only creates private-services-access (private IP) instances — - `public` and `psc` require an instance configured accordingly out-of-band. -- `ATE_API_POSTGRES_READ_WRITE_ROLE` and `ATE_API_POSTGRES_OWNER_ROLE` — required stable - `NOLOGIN` roles (defaults: `substrate_readwrite` and `substrate_owner`). - If you override them, create the custom roles and substitute their names in - the grants in section 2. `ateapi` runs `SET ROLE` on every new connection; - stable roles keep grants and object ownership across IAM username rotations. -- `ATE_API_POSTGRES_SCHEMA` — the schema holding the store's tables - (default `substrate`). If you override it, create the named schema with - the owner role as owner and target it in the grants in section 2. -- `ATE_API_POSTGRES_POOL_MAX_CONNS` — connections in the read/write pool - (default: `max(4, NumCPU)`). It does not affect the owner and watch pools, which are - capped at 2 and 3 connections. - -Changing the installed configuration rolls ate-api-server: ate-setup -stamps a hash of the rendered configuration into the pod template -(`ate.dev/env-hash`). - -## 4. Verify - -```sh -kubectl rollout status deployment/ate-api-server -n ate-system -kubectl logs deployment/ate-api-server -n ate-system -c cloud-sql-proxy | head -# expect: "The proxy has started successfully and is ready for new connections" -kubectl logs deployment/ate-api-server -n ate-system | head -5 -# expect the startup flag dump and no store connection errors -kubectl get secret ate-api-server-secret-envvars -n ate-system \ - -o jsonpath='{.data.ATE_API_POSTGRES_READ_WRITE_CONNECTION_STRING}' | base64 -d -# expect: no password in the DSN -``` - -Common failure modes: - -| Symptom | Cause | -|---|---| -| proxy: `PERMISSION_DENIED` on startup | GSA missing `roles/cloudsql.client`, or the Workload Identity annotation/binding is absent | -| `FATAL: Cloud SQL IAM service account authentication failed` | GSA missing `roles/cloudsql.instanceUser`, or the IAM database user was not created | -| ateapi: `role "substrate_owner" does not exist` or `permission denied to set role` | Create the roles and grant the IAM database user membership (section 2) | -| ateapi: `permission denied for schema substrate` | The one-time schema grants (section 2) were not run | -| ateapi: `permission denied for table` | The owner role's default privileges (section 2) were not configured before migrations | -| proxy: instance connection errors mentioning IAM | `cloudsql.iam_authentication` flag is off on the instance | - -## 5. Scaling the database - -The provisioning defaults (`db-custom-2-8192`, 10 GB disk) suit development -and modest fleets. For sizing at large actor counts and high request rates — -instance shape and the data cache, storage/IOPS, connection-pool math, -proxy sidecar resources, and Managed Connection Pooling — see -[docs/dev/cloud-sql-scaling-guide.md](../../docs/dev/cloud-sql-scaling-guide.md). - -For explicit connection strings or a non-Cloud-SQL PostgreSQL database, see -the [general PostgreSQL configuration guide](../../docs/postgres.md). diff --git a/tools/setup-gcp/cmd/api.go b/tools/setup-gcp/cmd/api.go deleted file mode 100644 index 210a53f645..0000000000 --- a/tools/setup-gcp/cmd/api.go +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package cmd - -import ( - "context" - "fmt" - "log/slog" - "strings" - - serviceusage "cloud.google.com/go/serviceusage/apiv1" - "cloud.google.com/go/serviceusage/apiv1/serviceusagepb" -) - -func enableRequiredAPIs(ctx context.Context, cfg *Config) error { - suClient, err := serviceusage.NewClient(ctx) - if err != nil { - return err - } - defer suClient.Close() - - services := []string{ - "artifactregistry.googleapis.com", - "cloudresourcemanager.googleapis.com", - "container.googleapis.com", - "iam.googleapis.com", - "iamcredentials.googleapis.com", - "networkconnectivity.googleapis.com", - "serviceusage.googleapis.com", - "storage.googleapis.com", - "logging.googleapis.com", - "monitoring.googleapis.com", - "cloudtrace.googleapis.com", - "telemetry.googleapis.com", - } - - slog.Info("Batch enabling services", slog.String("services", strings.Join(services, ", "))) - - req := &serviceusagepb.BatchEnableServicesRequest{ - Parent: fmt.Sprintf("projects/%s", cfg.ProjectID), - ServiceIds: services, - } - - op, err := suClient.BatchEnableServices(ctx, req) - if err != nil { - return fmt.Errorf("failed to start batch enabling services: %w", err) - } - - if _, err := op.Wait(ctx); err != nil { - return fmt.Errorf("failed to complete batch enabling services: %w", err) - } - - slog.Info("Successfully enabled required services.") - return nil -} diff --git a/tools/setup-gcp/cmd/bootstrap.go b/tools/setup-gcp/cmd/bootstrap.go deleted file mode 100644 index 6e3af7fe64..0000000000 --- a/tools/setup-gcp/cmd/bootstrap.go +++ /dev/null @@ -1,105 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package cmd - -import ( - "errors" - "log/slog" - - "github.com/spf13/cobra" -) - -var bootstrapCmd = &cobra.Command{ - Use: "bootstrap", - Short: "Fully bootstrap the GCP environment", - Long: `Runs all setup steps in order: enable APIs, create cluster, create buckets, create the snapshot transfer service account, grant IAM permissions, and create dashboards.`, - RunE: func(cmd *cobra.Command, args []string) error { - ctx := cmd.Context() - warnDeprecatedMachineTypeEnv(cmd) - if err := resolveProjectID(ctx, &cfg); err != nil { - return err - } - if cfg.BucketName == "" { - return errors.New("--bucket-name is required") - } - if err := checkAssetBucketName(&cfg); err != nil { - return err - } - - slog.Info("Starting full bootstrap...") - - slog.Info("Step 1/8: Enabling required APIs...") - if err := enableRequiredAPIs(ctx, &cfg); err != nil { - return err - } - - slog.Info("Step 2/8: Creating GKE Cluster...") - if err := createClusterIdempotent(ctx, &cfg); err != nil { - return err - } - - slog.Info("Step 3/8: Creating GCS buckets for snapshots and micro-VM assets...") - if err := createBuckets(ctx, &cfg); err != nil { - return err - } - - slog.Info("Step 4/8: Granting GKE Node permissions...") - if err := grantGkeNodePermissions(ctx, &cfg); err != nil { - return err - } - - slog.Info("Step 5/8: Granting Atelet permissions...") - if err := grantAteletPermissions(ctx, &cfg); err != nil { - return err - } - - slog.Info("Step 6/8: Creating the snapshot transfer service account...") - if err := setupTransferServiceAccount(ctx, &cfg, workloadIdentityPrincipal(&cfg, "ate-api-server")); err != nil { - return err - } - - slog.Info("Step 7/8: Creating IAM policy bindings for the buckets...") - if err := createIamPolicyBindings(ctx, &cfg); err != nil { - return err - } - - slog.Info("Step 8/8: Creating Monitoring Dashboards...") - if err := createMonitoringDashboards(ctx, &cfg); err != nil { - return err - } - - slog.Info("Bootstrap completed successfully.") - return nil - }, -} - -func init() { - rootCmd.AddCommand(bootstrapCmd) - - // Register bootstrap-specific flags that map to Config fields. - // We use distinct names to avoid confusion and match the desired design. - bootstrapCmd.Flags().StringVar(&cfg.ClusterName, "cluster-name", getEnv("CLUSTER_NAME", "substrate-poc"), "Name of the GKE cluster [env: CLUSTER_NAME]") - bootstrapCmd.Flags().StringVar(&cfg.ClusterLocation, "cluster-location", getEnv("CLUSTER_LOCATION", "us-west1-c"), "Zone or region for the cluster [env: CLUSTER_LOCATION]") - bootstrapCmd.Flags().StringVar(&cfg.ClusterVersion, "cluster-version", getEnv("CLUSTER_VERSION", ""), "Kubernetes version [env: CLUSTER_VERSION]") - bootstrapCmd.Flags().StringVar(&cfg.Network, "network", getEnv("NETWORK", "default"), "VPC network name [env: NETWORK]") - bootstrapCmd.Flags().StringVar(&cfg.Subnetwork, "subnetwork", getEnv("SUBNETWORK", "default"), "VPC subnetwork name [env: SUBNETWORK]") - bootstrapCmd.Flags().StringVar(&cfg.MachineType, "machine-type", resolveMachineTypeDefault(), "Machine type for the node pool [env: NODE_MACHINE_TYPE]") - bootstrapCmd.Flags().BoolVar(&cfg.EnableNestedVirtualization, "enable-nested-virtualization", getEnv("ENABLE_NESTED_VIRTUALIZATION", true), "Create the node pool with nested virtualization, exposing /dev/kvm for micro-VM workers; needs a machine type that supports it. Turn off with --enable-nested-virtualization=false [env: ENABLE_NESTED_VIRTUALIZATION]") - bootstrapCmd.Flags().Int32Var(&cfg.BootDiskSizeGB, "boot-disk-size", getEnv("BOOT_DISK_SIZE_GB", int32(0)), "Boot disk size in GB for the node pool; 0 = GKE default (100 GB) [env: BOOT_DISK_SIZE_GB]") - bootstrapCmd.Flags().StringVar(&cfg.BootDiskType, "boot-disk-type", getEnv("BOOT_DISK_TYPE", ""), "Boot disk type for the node pool; empty = GKE default [env: BOOT_DISK_TYPE]") - bootstrapCmd.Flags().StringVar(&cfg.BucketName, "bucket-name", getEnv("BUCKET_NAME", ""), "Name of the GCS bucket for snapshots [env: BUCKET_NAME]") - addTransferGSANameFlag(bootstrapCmd) - bootstrapCmd.Flags().StringVar(&cfg.DashboardDir, "dashboard-dir", getEnv("DASHBOARD_DIR", "tools/setup-gcp/dashboards"), "Directory containing dashboard JSON files [env: DASHBOARD_DIR]") -} diff --git a/tools/setup-gcp/cmd/bucket.go b/tools/setup-gcp/cmd/bucket.go deleted file mode 100644 index 2cb8fde59d..0000000000 --- a/tools/setup-gcp/cmd/bucket.go +++ /dev/null @@ -1,254 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package cmd - -import ( - "context" - "errors" - "fmt" - "log/slog" - "net/http" - "slices" - "strconv" - "strings" - "time" - - "cloud.google.com/go/iam" - "cloud.google.com/go/storage" - "github.com/spf13/cobra" - "google.golang.org/api/googleapi" -) - -// createBuckets creates the snapshot bucket and the micro-VM asset bucket. -func createBuckets(ctx context.Context, cfg *Config) error { - if err := createBucket(ctx, cfg, cfg.BucketName); err != nil { - return err - } - return createBucket(ctx, cfg, cfg.assetBucketName()) -} - -func createBucket(ctx context.Context, cfg *Config, name string) error { - if err := resolveProject(ctx, cfg); err != nil { - return err - } - - client, err := storage.NewClient(ctx) - if err != nil { - return err - } - defer client.Close() - - bucket := client.Bucket(name) - slog.Info("Checking if Bucket exists", slog.String("bucket", name)) - attrs, err := bucket.Attrs(ctx) - if err != nil { - if !errors.Is(err, storage.ErrBucketNotExist) { - return fmt.Errorf("getting bucket %s: %w", name, err) - } - - slog.Info("Bucket does not exist. Creating...", slog.String("bucket", name)) - err = bucket.Create(ctx, cfg.ProjectID, &storage.BucketAttrs{ - Location: cfg.Region, - UniformBucketLevelAccess: storage.UniformBucketLevelAccess{ - Enabled: true, - }, - }) - if err != nil { - return fmt.Errorf("create bucket %s: %w", name, err) - } - return nil - } - - slog.Info("Bucket exists. Checking attributes...", slog.String("bucket", name)) - - // Ensure the bucket belongs to the correct project. - // GCS bucket names are globally unique, so it's possible this bucket belongs to a different project. - projectNum := strconv.FormatUint(attrs.ProjectNumber, 10) - if projectNum != cfg.ProjectNumber { - return fmt.Errorf("bucket %s belongs to project number %s, but expected %s (it may be owned by another GCP project)", name, projectNum, cfg.ProjectNumber) - } - - // Ensure the bucket is in the correct region. - if !strings.EqualFold(attrs.Location, cfg.Region) { - return fmt.Errorf("bucket %s is in location %s, but expected %s", name, attrs.Location, cfg.Region) - } - - slog.Info("Bucket is in the correct project and region. Checking uniform-bucket-level-access setting...", slog.String("bucket", name)) - if !attrs.UniformBucketLevelAccess.Enabled { - slog.Info("Updating uniform-bucket-level-access", slog.String("bucket", name)) - _, err = bucket.Update(ctx, storage.BucketAttrsToUpdate{ - UniformBucketLevelAccess: &storage.UniformBucketLevelAccess{ - Enabled: true, - }, - }) - if err != nil { - return fmt.Errorf("update bucket %s ubla: %w", name, err) - } - } else { - slog.Info("uniform-bucket-level-access is already correct", slog.String("bucket", name)) - } - - return nil -} - -// bucketGrant is a role on a bucket for an IAM member. -type bucketGrant struct { - bucket string - member string - role string -} - -// bucketGrants are the roles setup-gcp grants on the two buckets. -// ate-api-server copies snapshots for tags and deletes the ones nothing refers -// to, so it gets objectAdmin, plus bucketViewer to resolve the bucket. The -// transfer service account gets the same: the credential exchange downscopes -// its token to each actor's prefixes for every snapshot transfer. atelet reads -// only micro-VM sandbox assets with its own identity. -func bucketGrants(cfg *Config) []bucketGrant { - apiServer := workloadIdentityPrincipal(cfg, "ate-api-server") - transfer := transferServiceAccountMember(cfg) - return []bucketGrant{ - {bucket: cfg.BucketName, member: apiServer, role: "roles/storage.objectAdmin"}, - {bucket: cfg.BucketName, member: apiServer, role: "roles/storage.bucketViewer"}, - {bucket: cfg.BucketName, member: transfer, role: "roles/storage.objectAdmin"}, - {bucket: cfg.BucketName, member: transfer, role: "roles/storage.bucketViewer"}, - {bucket: cfg.assetBucketName(), member: workloadIdentityPrincipal(cfg, "atelet"), role: "roles/storage.objectViewer"}, - } -} - -func createIamPolicyBindings(ctx context.Context, cfg *Config) error { - client, err := storage.NewClient(ctx) - if err != nil { - return err - } - defer client.Close() - - // Every policy is read before any is written, so a missing bucket fails - // the run before it grants anything. - names := []string{cfg.BucketName, cfg.assetBucketName()} - policies := make([]*iam.Policy, len(names)) - for i, name := range names { - policy, err := client.Bucket(name).IAM().Policy(ctx) - if gerr := (*googleapi.Error)(nil); errors.As(err, &gerr) && gerr.Code == http.StatusNotFound { - return fmt.Errorf("bucket %s does not exist, run `create bucket` first: %w", name, err) - } - if err != nil { - return fmt.Errorf("get bucket %s iam policy: %w", name, err) - } - policies[i] = policy - } - - grants := bucketGrants(cfg) - for i, name := range names { - handle := client.Bucket(name).IAM() - policy := policies[i] - // A service account created moments earlier can take a while to - // propagate, and granting to it too soon fails with "does not - // exist". Re-read the policy each attempt so etag conflicts also - // resolve, as grantCloudSQLProjectRoles does. - for attempt := 1; ; attempt++ { - if !addGrants(policy, cfg, name, grants) { - slog.Info("IAM policy is already correct", slog.String("bucket", name)) - break - } - slog.Info("Setting IAM policy for bucket", slog.String("bucket", name)) - err := handle.SetPolicy(ctx, policy) - if err == nil { - break - } - if attempt >= 6 { - return fmt.Errorf("set bucket %s iam policy: %w", name, err) - } - slog.Warn("Setting bucket IAM policy failed, retrying...", slog.String("bucket", name), slog.Int("attempt", attempt), slog.Any("err", err)) - select { - case <-ctx.Done(): - return ctx.Err() - case <-time.After(10 * time.Second): - } - if policy, err = handle.Policy(ctx); err != nil { - return fmt.Errorf("get bucket %s iam policy: %w", name, err) - } - } - } - return nil -} - -// addGrants adds the grants on the named bucket that policy lacks, and -// reports whether it added any. -func addGrants(policy *iam.Policy, cfg *Config, name string, grants []bucketGrant) bool { - changed := false - for _, g := range grants { - if g.bucket != name { - continue - } - if hasUnconditionalBinding(policy, g.role, g.member) { - continue - } - slog.Info("Adding role to member", slog.String("bucket", name), slog.String("role", g.role), slog.String("member", g.member)) - policy.Add(g.member, iam.RoleName(g.role)) - changed = true - } - return changed -} - -// hasUnconditionalBinding reports whether the policy already grants role to -// member without a condition. Conditional bindings are ignored: they may not -// apply to the objects Substrate touches. -func hasUnconditionalBinding(policy *iam.Policy, role, member string) bool { - for _, b := range policy.InternalProto.Bindings { - if b.Condition == nil && b.Role == role && slices.Contains(b.Members, member) { - return true - } - } - return false -} - -func validateBucketFlags(ctx context.Context, cfg *Config) error { - if cfg.BucketName == "" { - return errors.New("--name is required") - } - if err := checkAssetBucketName(cfg); err != nil { - return err - } - return resolveProject(ctx, cfg) -} - -// maxBucketNameLength is the longest bucket name GCS accepts. -const maxBucketNameLength = 63 - -// checkAssetBucketName fails when the asset bucket's name, the snapshot -// bucket's plus a suffix, is longer than GCS allows. -func checkAssetBucketName(cfg *Config) error { - if n := len(cfg.assetBucketName()); n > maxBucketNameLength { - return fmt.Errorf("bucket name %q is too long: the asset bucket %q would have %d characters, and GCS allows %d", cfg.BucketName, cfg.assetBucketName(), n, maxBucketNameLength) - } - return nil -} - -var bucketCmd = &cobra.Command{ - Use: "bucket", - Short: "Create the GCS snapshot bucket and the micro-VM asset bucket", - RunE: func(cmd *cobra.Command, args []string) error { - if err := validateBucketFlags(cmd.Context(), &cfg); err != nil { - return err - } - return createBuckets(cmd.Context(), &cfg) - }, -} - -func init() { - createCmd.AddCommand(bucketCmd) - bucketCmd.Flags().StringVar(&cfg.BucketName, "name", getEnv("BUCKET_NAME", ""), "Name of the GCS snapshot bucket. The asset bucket is named NAME-assets [env: BUCKET_NAME]") -} diff --git a/tools/setup-gcp/cmd/bucket_test.go b/tools/setup-gcp/cmd/bucket_test.go deleted file mode 100644 index 3e3237c2b7..0000000000 --- a/tools/setup-gcp/cmd/bucket_test.go +++ /dev/null @@ -1,154 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package cmd - -import ( - "context" - "slices" - "strings" - "testing" - - "cloud.google.com/go/iam" - "cloud.google.com/go/iam/apiv1/iampb" - "cloud.google.com/go/resourcemanager/apiv3/resourcemanagerpb" -) - -func TestValidateBucketFlags(t *testing.T) { - origGetProject := getProjectFn - defer func() { getProjectFn = origGetProject }() - - getProjectFn = func(ctx context.Context, name string) (*resourcemanagerpb.Project, error) { - return &resourcemanagerpb.Project{ - Name: "projects/123456", - ProjectId: "test-project", - }, nil - } - - tooLong := strings.Repeat("b", 57) - tooLongErr := `bucket name "` + tooLong + `" is too long: the asset bucket "` + tooLong + `-assets" would have 64 characters, and GCS allows 63` - - tests := []struct { - name string - cfg Config - want string - }{ - { - name: "missing bucket name", - cfg: Config{ProjectID: "test-project"}, - want: "--name is required", - }, - { - name: "bucket name too long for the asset bucket", - cfg: Config{ProjectID: "test-project", BucketName: tooLong}, - want: tooLongErr, - }, - { - name: "longest bucket name the asset bucket allows", - cfg: Config{ProjectID: "test-project", BucketName: strings.Repeat("b", 56)}, - }, - { - name: "missing project id", - cfg: Config{BucketName: "test-bucket"}, - want: "--project-id is required", - }, - { - name: "missing project id when only project number provided", - cfg: Config{BucketName: "test-bucket", ProjectNumber: "123456"}, - want: "--project-id is required", - }, - { - name: "all required flags present with both id and number", - cfg: Config{ProjectID: "test-project", ProjectNumber: "123456", BucketName: "test-bucket"}, - }, - { - name: "all required flags present with only project id", - cfg: Config{ProjectID: "test-project", BucketName: "test-bucket"}, - }, - } - - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - cfgCopy := tt.cfg - err := validateBucketFlags(t.Context(), &cfgCopy) - if tt.want == "" { - if err != nil { - t.Fatalf("validateBucketFlags() = %v; want nil", err) - } - if cfgCopy.ProjectNumber != "123456" { - t.Errorf("cfgCopy.ProjectNumber = %q; want %q", cfgCopy.ProjectNumber, "123456") - } - return - } - if err == nil { - t.Fatalf("validateBucketFlags() = nil; want %q", tt.want) - } - if err.Error() != tt.want { - t.Errorf("validateBucketFlags() = %q; want %q", err.Error(), tt.want) - } - }) - } -} - -// TestBucketGrantsPerMember pins what each member may reach: atelet reads -// the asset bucket only, and the transfer account, like ate-api-server, may -// read and write the snapshot bucket only. -func TestBucketGrantsPerMember(t *testing.T) { - cfg := &Config{ProjectID: "proj", ProjectNumber: "123", BucketName: "snaps", TransferGSAName: "ate-snapshot-transfer"} - grantsOf := func(member string) []bucketGrant { - var got []bucketGrant - for _, g := range bucketGrants(cfg) { - if g.member == member { - got = append(got, g) - } - } - return got - } - atelet := workloadIdentityPrincipal(cfg, "atelet") - transfer := "serviceAccount:ate-snapshot-transfer@proj.iam.gserviceaccount.com" - for _, tc := range []struct { - member string - want []bucketGrant - }{ - {atelet, []bucketGrant{{bucket: "snaps-assets", member: atelet, role: "roles/storage.objectViewer"}}}, - {transfer, []bucketGrant{ - {bucket: "snaps", member: transfer, role: "roles/storage.objectAdmin"}, - {bucket: "snaps", member: transfer, role: "roles/storage.bucketViewer"}, - }}, - } { - if got := grantsOf(tc.member); !slices.Equal(got, tc.want) { - t.Errorf("grants for %s = %v, want %v", tc.member, got, tc.want) - } - } -} - -func TestAddGrantsOnlyTouchesTheNamedBucket(t *testing.T) { - cfg := &Config{ProjectID: "proj", ProjectNumber: "123", BucketName: "snaps"} - member := func(sa string) string { - return "principal://iam.googleapis.com/projects/123/locations/global/workloadIdentityPools/proj.svc.id.goog/subject/ns/ate-system/sa/" + sa - } - policy := &iam.Policy{InternalProto: &iampb.Policy{}} - if !addGrants(policy, cfg, "snaps-assets", bucketGrants(cfg)) { - t.Fatal("addGrants on the asset bucket added nothing") - } - if got := policy.Members("roles/storage.objectViewer"); !slices.Equal(got, []string{member("atelet")}) { - t.Errorf("objectViewer members = %v, want only atelet", got) - } - if got := policy.Members("roles/storage.objectAdmin"); len(got) != 0 { - t.Errorf("objectAdmin members on the asset bucket = %v, want none", got) - } - if addGrants(policy, cfg, "snaps-assets", bucketGrants(cfg)) { - t.Error("a second addGrants added bindings the policy already has") - } -} diff --git a/tools/setup-gcp/cmd/cloudsql.go b/tools/setup-gcp/cmd/cloudsql.go deleted file mode 100644 index 8e8e43fac3..0000000000 --- a/tools/setup-gcp/cmd/cloudsql.go +++ /dev/null @@ -1,458 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package cmd - -import ( - "context" - "errors" - "fmt" - "log/slog" - "os" - "strings" - "time" - - "cloud.google.com/go/iam/apiv1/iampb" - resourcemanager "cloud.google.com/go/resourcemanager/apiv3" - serviceusage "cloud.google.com/go/serviceusage/apiv1" - "cloud.google.com/go/serviceusage/apiv1/serviceusagepb" - "github.com/spf13/cobra" - "google.golang.org/api/googleapi" - iam "google.golang.org/api/iam/v1" - servicenetworking "google.golang.org/api/servicenetworking/v1" - sqladmin "google.golang.org/api/sqladmin/v1" -) - -// The ateapi store database and the Kubernetes identity that connects to it. -// These match the atepg store (ate-setup) and the ate-api-server -// deployment. -const ( - cloudSQLDatabase = "atepg" - apiServerNamespace = "ate-system" - apiServerKSA = "ate-api-server" -) - -func cloudSQLGSAEmail(cfg *Config) string { - return fmt.Sprintf("%s@%s.iam.gserviceaccount.com", cfg.CloudSQLGSAName, cfg.ProjectID) -} - -// cloudSQLDatabaseUser derives the IAM database username for a service -// account: the email with the .gserviceaccount.com suffix trimmed. -func cloudSQLDatabaseUser(gsaEmail string) string { - return strings.TrimSuffix(gsaEmail, ".gserviceaccount.com") -} - -// workloadIdentityMember is the classic Workload Identity member for the -// ate-api-server KSA. WIF-direct principal:// identities (used elsewhere in -// this tool) cannot be Cloud SQL IAM database users, so Cloud SQL requires -// the KSA→GSA link. -func workloadIdentityMember(projectID string) string { - return fmt.Sprintf("serviceAccount:%s.svc.id.goog[%s/%s]", projectID, apiServerNamespace, apiServerKSA) -} - -func privateNetworkURL(cfg *Config) string { - return fmt.Sprintf("projects/%s/global/networks/%s", cfg.ProjectID, cfg.Network) -} - -func isNotFound(err error) bool { - var gerr *googleapi.Error - return errors.As(err, &gerr) && gerr.Code == 404 -} - -// enableCloudSQLAPIs idempotently enables the APIs this command depends on. -// Scoped here rather than in `enable apis`: Cloud SQL is opt-in, so only its -// users get these APIs turned on. -func enableCloudSQLAPIs(ctx context.Context, cfg *Config) error { - suClient, err := serviceusage.NewClient(ctx) - if err != nil { - return err - } - defer suClient.Close() - - services := []string{ - "sqladmin.googleapis.com", - "servicenetworking.googleapis.com", - } - slog.Info("Batch enabling services", slog.String("services", strings.Join(services, ", "))) - op, err := suClient.BatchEnableServices(ctx, &serviceusagepb.BatchEnableServicesRequest{ - Parent: fmt.Sprintf("projects/%s", cfg.ProjectID), - ServiceIds: services, - }) - if err != nil { - return fmt.Errorf("failed to start batch enabling services: %w", err) - } - if _, err := op.Wait(ctx); err != nil { - return fmt.Errorf("failed to complete batch enabling services: %w", err) - } - return nil -} - -// checkPrivateServicesAccess verifies the VPC has a private services access -// peering, which Cloud SQL private IP requires. Allocating the range and -// peering is a rare one-time-per-VPC operation left to gcloud. -func checkPrivateServicesAccess(ctx context.Context, cfg *Config) error { - svc, err := servicenetworking.NewService(ctx) - if err != nil { - return fmt.Errorf("create servicenetworking client: %w", err) - } - resp, err := svc.Services.Connections.List("services/servicenetworking.googleapis.com"). - Network(privateNetworkURL(cfg)).Context(ctx).Do() - if err == nil && len(resp.Connections) > 0 && len(resp.Connections[0].ReservedPeeringRanges) > 0 { - return nil - } - if err != nil { - slog.Warn("Could not list service networking connections", slog.Any("err", err)) - } - return fmt.Errorf(`network %q has no private services access peering, which Cloud SQL private IP requires. Create it once per VPC: - - gcloud compute addresses create google-managed-services-%[1]s \ - --global --purpose=VPC_PEERING --prefix-length=16 --network=%[1]s --project=%[2]s - gcloud services vpc-peerings connect \ - --service=servicenetworking.googleapis.com \ - --ranges=google-managed-services-%[1]s --network=%[1]s --project=%[2]s`, - cfg.Network, cfg.ProjectID) -} - -func waitForSQLOperation(ctx context.Context, svc *sqladmin.Service, cfg *Config, op *sqladmin.Operation) error { - for { - if op.Status == "DONE" { - if op.Error != nil && len(op.Error.Errors) > 0 { - return fmt.Errorf("operation %s failed: %s", op.Name, op.Error.Errors[0].Message) - } - return nil - } - select { - case <-ctx.Done(): - return ctx.Err() - case <-time.After(5 * time.Second): - } - name := op.Name - var err error - op, err = svc.Operations.Get(cfg.ProjectID, name).Context(ctx).Do() - if err != nil { - return fmt.Errorf("poll operation %s: %w", name, err) - } - } -} - -// createCloudSQLInstance creates a private-IP PostgreSQL instance with IAM -// database authentication enabled, or verifies an existing one. -func createCloudSQLInstance(ctx context.Context, svc *sqladmin.Service, cfg *Config) error { - slog.Info("Checking if Cloud SQL instance exists", slog.String("instance", cfg.CloudSQLInstance)) - existing, err := svc.Instances.Get(cfg.ProjectID, cfg.CloudSQLInstance).Context(ctx).Do() - if err == nil { - iamAuthOn := false - if existing.Settings != nil { - for _, f := range existing.Settings.DatabaseFlags { - if f.Name == "cloudsql.iam_authentication" && f.Value == "on" { - iamAuthOn = true - } - } - } - if !iamAuthOn { - return fmt.Errorf("instance %s exists but cloudsql.iam_authentication is off; enable it (this restarts the instance):\n\n gcloud sql instances patch %s --database-flags=cloudsql.iam_authentication=on --project=%s", - cfg.CloudSQLInstance, cfg.CloudSQLInstance, cfg.ProjectID) - } - slog.Info("Cloud SQL instance exists with IAM authentication on. Skipping create.") - return nil - } - if !isNotFound(err) { - return fmt.Errorf("get instance: %w", err) - } - - if err := checkPrivateServicesAccess(ctx, cfg); err != nil { - return err - } - - spec, err := cloudSQLInstanceSpec(cfg) - if err != nil { - return err - } - slog.Info("Creating Cloud SQL instance (takes several minutes)...", - slog.String("instance", cfg.CloudSQLInstance), slog.String("region", cfg.Region), - slog.String("tier", cfg.CloudSQLTier), slog.String("edition", spec.Settings.Edition)) - op, err := svc.Instances.Insert(cfg.ProjectID, spec).Context(ctx).Do() - if err != nil { - return fmt.Errorf("create instance: %w", err) - } - return waitForSQLOperation(ctx, svc, cfg, op) -} - -// cloudSQLInstanceSpec maps the flags onto the creation request. Pure, for -// testing. Shape/storage of an already-existing instance is never touched — -// resize with `gcloud sql instances patch`. -func cloudSQLInstanceSpec(cfg *Config) (*sqladmin.DatabaseInstance, error) { - settings := &sqladmin.Settings{ - Tier: cfg.CloudSQLTier, - // This tool provisions private-services-access instances exclusively. - // The ATE_API_POSTGRES_CLOUDSQL_IP_TYPE setting in ate-setup exists - // only to connect to public/PSC instances provisioned out-of-band. - IpConfiguration: &sqladmin.IpConfiguration{ - Ipv4Enabled: false, - PrivateNetwork: privateNetworkURL(cfg), - ForceSendFields: []string{"Ipv4Enabled"}, - }, - DatabaseFlags: []*sqladmin.DatabaseFlags{ - {Name: "cloudsql.iam_authentication", Value: "on"}, - }, - // Daily automated backups with point-in-time recovery, and a guard - // against accidental deletion; clear it with `gcloud sql instances - // patch --no-deletion-protection` before tearing the instance down. - BackupConfiguration: &sqladmin.BackupConfiguration{ - Enabled: true, - PointInTimeRecoveryEnabled: true, - }, - DeletionProtectionEnabled: true, - } - switch cfg.CloudSQLEdition { - case "", "enterprise": - // Enterprise edition accepts db-custom-- tiers. - settings.Edition = "ENTERPRISE" - case "enterprise-plus": - // Enterprise Plus only accepts db-perf-optimized-N- tiers. Its - // local-SSD data cache is the reason to pick it for this store: it - // extends the effective cache beyond RAM once the dataset outgrows - // memory (see cloud-sql.md, "Scaling the database"). - settings.Edition = "ENTERPRISE_PLUS" - settings.DataCacheConfig = &sqladmin.DataCacheConfig{DataCacheEnabled: true} - default: - return nil, fmt.Errorf("unknown --edition %q (want enterprise|enterprise-plus)", cfg.CloudSQLEdition) - } - // 0 leaves the Cloud SQL default (10 GB, auto-resizing). PD IOPS and - // throughput scale with provisioned size, so benchmarks and production - // should pre-size rather than rely on auto-resize. - if cfg.CloudSQLStorageGB > 0 { - settings.DataDiskSizeGb = cfg.CloudSQLStorageGB - } - return &sqladmin.DatabaseInstance{ - Name: cfg.CloudSQLInstance, - Region: cfg.Region, - DatabaseVersion: "POSTGRES_18", - Settings: settings, - }, nil -} - -func createCloudSQLDatabase(ctx context.Context, svc *sqladmin.Service, cfg *Config) error { - _, err := svc.Databases.Get(cfg.ProjectID, cfg.CloudSQLInstance, cloudSQLDatabase).Context(ctx).Do() - if err == nil { - slog.Info("Database exists. Skipping create.", slog.String("database", cloudSQLDatabase)) - return nil - } - if !isNotFound(err) { - return fmt.Errorf("get database: %w", err) - } - slog.Info("Creating database...", slog.String("database", cloudSQLDatabase)) - op, err := svc.Databases.Insert(cfg.ProjectID, cfg.CloudSQLInstance, &sqladmin.Database{ - Name: cloudSQLDatabase, - }).Context(ctx).Do() - if err != nil { - return fmt.Errorf("create database: %w", err) - } - return waitForSQLOperation(ctx, svc, cfg, op) -} - -func createCloudSQLGSA(ctx context.Context, cfg *Config) error { - svc, err := iam.NewService(ctx) - if err != nil { - return fmt.Errorf("create iam client: %w", err) - } - email := cloudSQLGSAEmail(cfg) - resource := fmt.Sprintf("projects/%s/serviceAccounts/%s", cfg.ProjectID, email) - _, err = svc.Projects.ServiceAccounts.Get(resource).Context(ctx).Do() - if err == nil { - slog.Info("Service account exists. Skipping create.", slog.String("gsa", email)) - } else if isNotFound(err) { - slog.Info("Creating service account...", slog.String("gsa", email)) - _, err = svc.Projects.ServiceAccounts.Create("projects/"+cfg.ProjectID, &iam.CreateServiceAccountRequest{ - AccountId: cfg.CloudSQLGSAName, - ServiceAccount: &iam.ServiceAccount{ - DisplayName: "ate-api-server Cloud SQL access", - }, - }).Context(ctx).Do() - if err != nil { - return fmt.Errorf("create service account: %w", err) - } - } else { - return fmt.Errorf("get service account: %w", err) - } - - // Classic Workload Identity: let the ate-api-server KSA mint tokens as - // this GSA, so the proxy sidecar's ADC resolves to the IAM database user. - member := workloadIdentityMember(cfg.ProjectID) - policy, err := svc.Projects.ServiceAccounts.GetIamPolicy(resource).Context(ctx).Do() - if err != nil { - return fmt.Errorf("get service account iam policy: %w", err) - } - if !addServiceAccountBinding(policy, "roles/iam.workloadIdentityUser", member) { - slog.Info("Workload Identity binding exists. Skipping.") - return nil - } - slog.Info("Binding Workload Identity user to service account...") - return setGSAPolicy(ctx, svc, resource, policy) -} - -func setGSAPolicy(ctx context.Context, svc *iam.Service, resource string, policy *iam.Policy) error { - _, err := svc.Projects.ServiceAccounts.SetIamPolicy(resource, &iam.SetIamPolicyRequest{Policy: policy}).Context(ctx).Do() - if err != nil { - return fmt.Errorf("set service account iam policy: %w", err) - } - return nil -} - -// grantCloudSQLProjectRoles grants the GSA the roles needed to establish -// connector tunnels (cloudsql.client) and to log in with IAM database -// authentication (cloudsql.instanceUser). -func grantCloudSQLProjectRoles(ctx context.Context, cfg *Config) error { - client, err := resourcemanager.NewProjectsClient(ctx) - if err != nil { - return err - } - defer client.Close() - - resource := fmt.Sprintf("projects/%s", cfg.ProjectID) - policy, err := client.GetIamPolicy(ctx, &iampb.GetIamPolicyRequest{Resource: resource}) - if err != nil { - return fmt.Errorf("get project iam policy: %w", err) - } - - member := "serviceAccount:" + cloudSQLGSAEmail(cfg) - // A freshly created service account can take a while to propagate; - // granting to it too soon fails with "does not exist". Re-read the - // policy each attempt so etag conflicts also resolve. - for attempt := 1; ; attempt++ { - changed1 := addProjectIamBinding(policy, "roles/cloudsql.client", member) - changed2 := addProjectIamBinding(policy, "roles/cloudsql.instanceUser", member) - if !changed1 && !changed2 { - slog.Info("IAM policy already has required Cloud SQL permissions. Skipping update.") - return nil - } - slog.Info("Setting IAM policy (grant Cloud SQL permissions)...", slog.String("member", member)) - _, err = client.SetIamPolicy(ctx, &iampb.SetIamPolicyRequest{Resource: resource, Policy: policy}) - if err == nil { - return nil - } - if attempt >= 6 { - return fmt.Errorf("set project iam policy: %w", err) - } - slog.Warn("Setting IAM policy failed, retrying...", slog.Int("attempt", attempt), slog.Any("err", err)) - select { - case <-ctx.Done(): - return ctx.Err() - case <-time.After(10 * time.Second): - } - policy, err = client.GetIamPolicy(ctx, &iampb.GetIamPolicyRequest{Resource: resource}) - if err != nil { - return fmt.Errorf("get project iam policy: %w", err) - } - } -} - -func createCloudSQLIAMUser(ctx context.Context, svc *sqladmin.Service, cfg *Config) error { - dbUser := cloudSQLDatabaseUser(cloudSQLGSAEmail(cfg)) - users, err := svc.Users.List(cfg.ProjectID, cfg.CloudSQLInstance).Context(ctx).Do() - if err != nil { - return fmt.Errorf("list database users: %w", err) - } - for _, u := range users.Items { - if u.Name == dbUser { - slog.Info("IAM database user exists. Skipping create.", slog.String("user", dbUser)) - return nil - } - } - slog.Info("Creating IAM database user...", slog.String("user", dbUser)) - // The API requires the truncated form (without .gserviceaccount.com), - // which is also the username the database sees. - op, err := svc.Users.Insert(cfg.ProjectID, cfg.CloudSQLInstance, &sqladmin.User{ - Name: dbUser, - Type: "CLOUD_IAM_SERVICE_ACCOUNT", - }).Context(ctx).Do() - if err != nil { - return fmt.Errorf("create IAM database user: %w", err) - } - return waitForSQLOperation(ctx, svc, cfg, op) -} - -func printCloudSQLNextSteps(cfg *Config) { - gsa := cloudSQLGSAEmail(cfg) - fmt.Printf(` -Cloud SQL is provisioned. Two steps remain: - -1. Create the PostgreSQL owner and read/write roles, grant the IAM database - user membership, and configure schema privileges. Follow section 2 of - tools/setup-gcp/cloud-sql.md before deploying ateapi. - -2. Deploy ateapi against it: - - export ATE_API_POSTGRES_CLOUDSQL_INSTANCE=%s:%s:%s - export ATE_API_POSTGRES_CLOUDSQL_GSA=%s - go run ./cmd/ate-setup deploy ate-system --credential-provider='{"name":"k8s.io"}' - -See tools/setup-gcp/cloud-sql.md for details and verification steps. -`, cfg.ProjectID, cfg.Region, cfg.CloudSQLInstance, gsa) -} - -var cloudsqlCmd = &cobra.Command{ - Use: "cloudsql", - Short: "Create a Cloud SQL PostgreSQL instance for the ateapi store, with IAM database authentication", - RunE: func(cmd *cobra.Command, args []string) error { - ctx := cmd.Context() - if err := resolveProjectID(ctx, &cfg); err != nil { - return err - } - // Require explicit region to prevent silent cross-region latency and egress costs. - if !cmd.Flags().Changed("region") && os.Getenv("GCE_REGION") == "" { - return errors.New("--region is required (or set GCE_REGION): the instance must be in the cluster's region") - } - if err := enableCloudSQLAPIs(ctx, &cfg); err != nil { - return err - } - svc, err := sqladmin.NewService(ctx) - if err != nil { - return fmt.Errorf("create sqladmin client: %w", err) - } - if err := createCloudSQLInstance(ctx, svc, &cfg); err != nil { - return err - } - if err := createCloudSQLDatabase(ctx, svc, &cfg); err != nil { - return err - } - if err := createCloudSQLGSA(ctx, &cfg); err != nil { - return err - } - // ate-api-server's pod runs as this account once Cloud SQL is on, so - // its credential exchange creates transfer account tokens with it. - if err := setupTransferServiceAccount(ctx, &cfg, "serviceAccount:"+cloudSQLGSAEmail(&cfg)); err != nil { - return err - } - if err := grantCloudSQLProjectRoles(ctx, &cfg); err != nil { - return err - } - if err := createCloudSQLIAMUser(ctx, svc, &cfg); err != nil { - return err - } - printCloudSQLNextSteps(&cfg) - return nil - }, -} - -func init() { - createCmd.AddCommand(cloudsqlCmd) - cloudsqlCmd.Flags().StringVar(&cfg.CloudSQLInstance, "instance", getEnv("CLOUDSQL_INSTANCE", "atepg"), "Cloud SQL instance name [env: CLOUDSQL_INSTANCE]") - cloudsqlCmd.Flags().StringVar(&cfg.CloudSQLTier, "tier", getEnv("CLOUDSQL_TIER", "db-custom-2-8192"), "Machine tier: db-custom-- for enterprise, db-perf-optimized-N- for enterprise-plus [env: CLOUDSQL_TIER]") - cloudsqlCmd.Flags().StringVar(&cfg.CloudSQLEdition, "edition", getEnv("CLOUDSQL_EDITION", "enterprise"), "Instance edition: enterprise | enterprise-plus (enables the local-SSD data cache) [env: CLOUDSQL_EDITION]") - cloudsqlCmd.Flags().Int64Var(&cfg.CloudSQLStorageGB, "storage-size", getEnv("CLOUDSQL_STORAGE_GB", int64(0)), "Data disk size in GB; 0 = Cloud SQL default (10 GB, auto-resizing). PD IOPS scale with size [env: CLOUDSQL_STORAGE_GB]") - cloudsqlCmd.Flags().StringVar(&cfg.CloudSQLGSAName, "gsa-name", getEnv("CLOUDSQL_GSA_NAME", "ate-api-server"), "Name of the Google service account to create for Workload Identity + IAM database auth [env: CLOUDSQL_GSA_NAME]") - addTransferGSANameFlag(cloudsqlCmd) - cloudsqlCmd.Flags().StringVar(&cfg.Network, "network", getEnv("NETWORK", "default"), "VPC network name (must match the cluster's) [env: NETWORK]") -} diff --git a/tools/setup-gcp/cmd/cloudsql_test.go b/tools/setup-gcp/cmd/cloudsql_test.go deleted file mode 100644 index 84040a7f6e..0000000000 --- a/tools/setup-gcp/cmd/cloudsql_test.go +++ /dev/null @@ -1,142 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package cmd - -import ( - "testing" - - "cloud.google.com/go/iam/apiv1/iampb" -) - -func TestCloudSQLIdentityDerivations(t *testing.T) { - cfg := &Config{ - ProjectID: "my-proj", - Region: "us-central1", - Network: "default", - CloudSQLGSAName: "ate-api-server", - CloudSQLInstance: "atepg", - } - - if got, want := cloudSQLGSAEmail(cfg), "ate-api-server@my-proj.iam.gserviceaccount.com"; got != want { - t.Errorf("cloudSQLGSAEmail() = %q, want %q", got, want) - } - // The IAM database username is the GSA email without the - // .gserviceaccount.com suffix — this must match what operators GRANT to - // and what ate-setup synthesizes into the DSN. - if got, want := cloudSQLDatabaseUser(cloudSQLGSAEmail(cfg)), "ate-api-server@my-proj.iam"; got != want { - t.Errorf("cloudSQLDatabaseUser() = %q, want %q", got, want) - } - if got, want := workloadIdentityMember(cfg.ProjectID), "serviceAccount:my-proj.svc.id.goog[ate-system/ate-api-server]"; got != want { - t.Errorf("workloadIdentityMember() = %q, want %q", got, want) - } - if got, want := privateNetworkURL(cfg), "projects/my-proj/global/networks/default"; got != want { - t.Errorf("privateNetworkURL() = %q, want %q", got, want) - } -} - -func TestCloudSQLInstanceSpec(t *testing.T) { - base := Config{ - ProjectID: "my-proj", - Region: "us-central1", - Network: "default", - CloudSQLInstance: "atepg", - CloudSQLTier: "db-custom-2-8192", - } - - t.Run("enterprise defaults", func(t *testing.T) { - cfg := base - spec, err := cloudSQLInstanceSpec(&cfg) - if err != nil { - t.Fatalf("cloudSQLInstanceSpec() = %v, want nil", err) - } - if spec.Settings.Edition != "ENTERPRISE" { - t.Errorf("Edition = %q, want ENTERPRISE", spec.Settings.Edition) - } - if spec.Settings.DataCacheConfig != nil { - t.Error("DataCacheConfig set for enterprise edition, want nil") - } - if spec.Settings.DataDiskSizeGb != 0 { - t.Errorf("DataDiskSizeGb = %d, want 0 (API default)", spec.Settings.DataDiskSizeGb) - } - if got := spec.Settings.DatabaseFlags[0]; got.Name != "cloudsql.iam_authentication" || got.Value != "on" { - t.Errorf("DatabaseFlags[0] = %v, want cloudsql.iam_authentication=on", got) - } - // The Admin API leaves these off when omitted, so the spec must ask - // for them explicitly: this database is the control plane's state. - if spec.Settings.BackupConfiguration == nil || !spec.Settings.BackupConfiguration.Enabled { - t.Error("BackupConfiguration not enabled, want automated backups on") - } else if !spec.Settings.BackupConfiguration.PointInTimeRecoveryEnabled { - t.Error("PointInTimeRecoveryEnabled = false, want true") - } - if !spec.Settings.DeletionProtectionEnabled { - t.Error("DeletionProtectionEnabled = false, want true") - } - }) - - t.Run("enterprise-plus enables data cache", func(t *testing.T) { - cfg := base - cfg.CloudSQLEdition = "enterprise-plus" - cfg.CloudSQLTier = "db-perf-optimized-N-16" - cfg.CloudSQLStorageGB = 5000 - spec, err := cloudSQLInstanceSpec(&cfg) - if err != nil { - t.Fatalf("cloudSQLInstanceSpec() = %v, want nil", err) - } - if spec.Settings.Edition != "ENTERPRISE_PLUS" { - t.Errorf("Edition = %q, want ENTERPRISE_PLUS", spec.Settings.Edition) - } - if spec.Settings.DataCacheConfig == nil || !spec.Settings.DataCacheConfig.DataCacheEnabled { - t.Error("DataCacheConfig not enabled for enterprise-plus") - } - if spec.Settings.DataDiskSizeGb != 5000 { - t.Errorf("DataDiskSizeGb = %d, want 5000", spec.Settings.DataDiskSizeGb) - } - }) - - t.Run("unknown edition rejected", func(t *testing.T) { - cfg := base - cfg.CloudSQLEdition = "hyperscale" - if _, err := cloudSQLInstanceSpec(&cfg); err == nil { - t.Error("cloudSQLInstanceSpec() = nil error for unknown edition, want error naming --edition") - } - }) -} - -func TestGetEnvInt64(t *testing.T) { - const key = "TEST_ENV_INT64_VAR" - t.Setenv(key, "1234") - if got := getEnv(key, int64(0)); got != 1234 { - t.Errorf("getEnv(%q, 0) = %d, want 1234", key, got) - } - t.Setenv(key, "not-a-number") - if got := getEnv(key, int64(7)); got != 7 { - t.Errorf("getEnv(%q, 7) with junk value = %d, want fallback 7", key, got) - } -} - -func TestAddProjectIamBindingCloudSQLRoles(t *testing.T) { - // The cloudsql roles reuse addProjectIamBinding; verify idempotency for - // the two roles this command grants. - policy := &iampb.Policy{} - member := "serviceAccount:ate-api-server@my-proj.iam.gserviceaccount.com" - for _, role := range []string{"roles/cloudsql.client", "roles/cloudsql.instanceUser"} { - if !addProjectIamBinding(policy, role, member) { - t.Errorf("addProjectIamBinding(%q) = false on first add, want true", role) - } - if addProjectIamBinding(policy, role, member) { - t.Errorf("addProjectIamBinding(%q) = true on repeat add, want false", role) - } - } -} diff --git a/tools/setup-gcp/cmd/cluster.go b/tools/setup-gcp/cmd/cluster.go deleted file mode 100644 index d8be40dd50..0000000000 --- a/tools/setup-gcp/cmd/cluster.go +++ /dev/null @@ -1,529 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package cmd - -import ( - "context" - "errors" - "fmt" - "log/slog" - "maps" - "slices" - "strconv" - "strings" - "time" - - container "cloud.google.com/go/container/apiv1" - "cloud.google.com/go/container/apiv1/containerpb" - "github.com/spf13/cobra" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/status" - "google.golang.org/protobuf/proto" - "k8s.io/apimachinery/pkg/util/wait" -) - -var requiredBetaAPIs = []string{ - "certificates.k8s.io/v1beta1/podcertificaterequests", - "certificates.k8s.io/v1beta1/clustertrustbundles", -} - -var requiredNodeSysctls = map[string]string{ - "net.ipv4.neigh.default.gc_thresh1": "4096", - "net.ipv4.neigh.default.gc_thresh2": "16384", - "net.ipv4.neigh.default.gc_thresh3": "32768", - "fs.inotify.max_user_instances": "65536", - "fs.inotify.max_user_watches": "1048576", -} - -func deleteCluster(ctx context.Context, cfg *Config) error { - client, err := container.NewClusterManagerClient(ctx) - if err != nil { - return err - } - defer client.Close() - name := fmt.Sprintf("projects/%s/locations/%s/clusters/%s", cfg.ProjectID, cfg.ClusterLocation, cfg.ClusterName) - slog.Info("Deleting cluster", slog.String("cluster", cfg.ClusterName)) - op, err := client.DeleteCluster(ctx, &containerpb.DeleteClusterRequest{Name: name}) - if err != nil { - return fmt.Errorf("delete cluster: %w", err) - } - return waitContainerOperation(ctx, client, op.Name, cfg) -} - -func buildCreateClusterRequest(parent string, cfg *Config) *containerpb.CreateClusterRequest { - var networkConfig *containerpb.NetworkConfig - if cfg.EnableDataplaneV2 { - networkConfig = &containerpb.NetworkConfig{ - DatapathProvider: containerpb.DatapathProvider_ADVANCED_DATAPATH, - } - } - nodeConfig := &containerpb.NodeConfig{ - MachineType: cfg.MachineType, - LinuxNodeConfig: &containerpb.LinuxNodeConfig{ - Sysctls: maps.Clone(requiredNodeSysctls), - }, - } - if cfg.EnableNestedVirtualization { - nodeConfig.AdvancedMachineFeatures = &containerpb.AdvancedMachineFeatures{ - EnableNestedVirtualization: proto.Bool(true), - } - } - if cfg.BootDiskSizeGB > 0 { - nodeConfig.DiskSizeGb = cfg.BootDiskSizeGB - } - if cfg.BootDiskType != "" { - nodeConfig.DiskType = cfg.BootDiskType - } - return &containerpb.CreateClusterRequest{ - Parent: parent, - Cluster: &containerpb.Cluster{ - Name: cfg.ClusterName, - InitialClusterVersion: cfg.ClusterVersion, - NodePools: []*containerpb.NodePool{ - { - Name: "substrate-node-pool", - InitialNodeCount: 2, - Config: nodeConfig, - }, - }, - EnableK8SBetaApis: &containerpb.K8SBetaAPIConfig{ - EnabledApis: requiredBetaAPIs, - }, - WorkloadIdentityConfig: &containerpb.WorkloadIdentityConfig{ - WorkloadPool: fmt.Sprintf("%s.svc.id.goog", cfg.ProjectID), - }, - Network: cfg.Network, - Subnetwork: cfg.Subnetwork, - NetworkConfig: networkConfig, - ManagedOpentelemetryConfig: &containerpb.ManagedOpenTelemetryConfig{Scope: containerpb.ManagedOpenTelemetryConfig_COLLECTION_AND_INSTRUMENTATION_COMPONENTS.Enum()}, - // Only new clusters; an existing cluster's add-on is left alone. - AddonsConfig: &containerpb.AddonsConfig{ - GcpFilestoreCsiDriverConfig: &containerpb.GcpFilestoreCsiDriverConfig{ - Enabled: false, - }, - }, - }, - } -} - -// nestedVirtualizationEnabled reports whether any node pool exposes /dev/kvm, -// which micro-VM workers need. Any pool, not every pool: a cluster that keeps -// its KVM nodes in a second pool added by hand is a normal arrangement. -func nestedVirtualizationEnabled(cluster *containerpb.Cluster) bool { - for _, pool := range cluster.GetNodePools() { - if pool.GetConfig().GetAdvancedMachineFeatures().GetEnableNestedVirtualization() { - return true - } - } - return false -} - -// nodeSysctlsConfigured reports whether any node pool carries all -// requiredNodeSysctls keys in its LinuxNodeConfig. -func nodeSysctlsConfigured(cluster *containerpb.Cluster) bool { - for _, pool := range cluster.GetNodePools() { - sysctls := pool.GetConfig().GetLinuxNodeConfig().GetSysctls() - if len(sysctls) == 0 { - continue - } - allPresent := true - for k := range requiredNodeSysctls { - if _, ok := sysctls[k]; !ok { - allPresent = false - break - } - } - if allPresent { - return true - } - } - return false -} - -// podCertificateProjectionGAMinor is the first Kubernetes 1.x minor whose -// kubelet serves pod certificate projection without a feature gate. -const podCertificateProjectionGAMinor = 37 - -// nodePoolsWithoutPodCertificateProjection returns the pools whose nodes will -// not mount pod certificate volumes after the beta APIs are turned on in place. -// -// Turning the APIs on is a control-plane change, and it is enough on its own: -// the APIs are served afterward. But projection is a kubelet feature, gated -// through 1.36, and a kubelet that was already running when the APIs were -// turned on never picks it up. Pods with a pod certificate volume scheduled -// onto such a node fail with "MountVolume.SetUp failed: unimplemented" while -// the control plane looks healthy. Nodes created afterward are fine, as is -// any kubelet on 1.37 or later, where projection is GA. -// -// It is the pool's version that decides this, not the control plane's: a 1.37 -// control plane can still be running 1.36 nodes. A version that cannot be -// parsed is reported too, since a spurious warning costs far less than a -// silent mount failure. -func nodePoolsWithoutPodCertificateProjection(cluster *containerpb.Cluster) []*containerpb.NodePool { - var stale []*containerpb.NodePool - for _, pool := range cluster.GetNodePools() { - if minor, ok := kubernetesMinor(pool.GetVersion()); ok && minor >= podCertificateProjectionGAMinor { - continue - } - stale = append(stale, pool) - } - return stale -} - -// kubernetesMinor extracts the minor from a GKE version such as -// "1.36.4-gke.1247000". It only understands Kubernetes 1.x. -func kubernetesMinor(version string) (int, bool) { - major, rest, ok := strings.Cut(version, ".") - if !ok || major != "1" { - return 0, false - } - minor, _, _ := strings.Cut(rest, ".") - n, err := strconv.Atoi(minor) - if err != nil { - return 0, false - } - return n, true -} - -// replacementNodePoolCommand is the command that adds a pool to take over -// from one whose nodes predate the beta APIs. A new pool is the remedy because -// it is the one GKE operation that is certain to produce new kubelets: an -// upgrade to the version a pool already runs is skipped outright, and a pool -// can only be upgraded forward when GKE happens to offer a newer patch. -// -// It copies what this tool sets on the pools it creates, so for a cluster -// this tool made the new pool is equivalent. Anything else customized on the -// old pool (taints, service account, autoscaling) has to be carried over by -// hand, which the warning says. -func replacementNodePoolCommand(cfg *Config, pool *containerpb.NodePool) string { - nodeConfig := pool.GetConfig() - args := []string{ - "gcloud container node-pools create " + replacementNodePoolName(pool.GetName()), - "--cluster=" + cfg.ClusterName, - "--project=" + cfg.ProjectID, - "--location=" + cfg.ClusterLocation, - "--node-version=" + pool.GetVersion(), - "--machine-type=" + nodeConfig.GetMachineType(), - fmt.Sprintf("--num-nodes=%d", max(pool.GetInitialNodeCount(), 1)), - } - if nodeConfig.GetDiskSizeGb() > 0 { - args = append(args, fmt.Sprintf("--disk-size=%d", nodeConfig.GetDiskSizeGb())) - } - if nodeConfig.GetDiskType() != "" { - args = append(args, "--disk-type="+nodeConfig.GetDiskType()) - } - if nodeConfig.GetAdvancedMachineFeatures().GetEnableNestedVirtualization() { - args = append(args, "--enable-nested-virtualization") - } - return strings.Join(args, " ") -} - -// replacementNodePoolName derives a name for the replacement pool. GKE caps -// pool names at 40 characters. -func replacementNodePoolName(name string) string { - const suffix = "-2" - if len(name)+len(suffix) > 40 { - name = strings.TrimRight(name[:40-len(suffix)], "-") - } - return name + suffix -} - -// deleteNodePoolCommand removes the old pool once its workloads have moved. -func deleteNodePoolCommand(cfg *Config, pool *containerpb.NodePool) string { - return fmt.Sprintf("gcloud container node-pools delete %s --cluster=%s --project=%s --location=%s", - pool.GetName(), cfg.ClusterName, cfg.ProjectID, cfg.ClusterLocation) -} - -// warnNodePoolsWithoutPodCertificateProjection is called after this tool has -// turned the beta APIs on for an existing cluster. Replacing a pool moves -// running workloads, so it is left to the user rather than done here. -func warnNodePoolsWithoutPodCertificateProjection(cfg *Config, cluster *containerpb.Cluster) { - for _, pool := range nodePoolsWithoutPodCertificateProjection(cluster) { - slog.Warn("Node pool predates the beta APIs and its nodes cannot mount pod certificate volumes; replace it with a new pool, copying over any settings of its own such as taints, service account, or autoscaling", - slog.String("cluster", cfg.ClusterName), - slog.String("node_pool", pool.GetName()), - slog.String("version", pool.GetVersion()), - slog.String("create_replacement", replacementNodePoolCommand(cfg, pool)), - slog.String("then_delete_old", deleteNodePoolCommand(cfg, pool))) - } -} - -func createClusterInternal(ctx context.Context, cfg *Config, client *container.ClusterManagerClient, parent string) error { - slog.Info("Cluster does not exist. Creating...", slog.String("cluster", cfg.ClusterName)) - req := buildCreateClusterRequest(parent, cfg) - op, err := client.CreateCluster(ctx, req) - if err != nil { - return fmt.Errorf("create cluster: %w", err) - } - return waitContainerOperation(ctx, client, op.Name, cfg) -} - -func createClusterIdempotent(ctx context.Context, cfg *Config) error { - if err := validateClusterLocation(cfg); err != nil { - return err - } - if err := validateBootDisk(cfg); err != nil { - return err - } - client, err := container.NewClusterManagerClient(ctx) - if err != nil { - return err - } - defer client.Close() - - parent := fmt.Sprintf("projects/%s/locations/%s", cfg.ProjectID, cfg.ClusterLocation) - clusterName := fmt.Sprintf("projects/%s/locations/%s/clusters/%s", cfg.ProjectID, cfg.ClusterLocation, cfg.ClusterName) - - slog.Info("Checking if cluster exists", slog.String("cluster", cfg.ClusterName), slog.String("location", cfg.ClusterLocation)) - cluster, err := client.GetCluster(ctx, &containerpb.GetClusterRequest{Name: clusterName}) - if err != nil { - if status.Code(err) != codes.NotFound { - return fmt.Errorf("getting cluster: %w", err) - } - - return createClusterInternal(ctx, cfg, client, parent) - } - - slog.Info("Cluster exists. Checking attributes...", slog.String("cluster", cfg.ClusterName)) - - // Recreate cluster if network configuration mismatches. - expectedNetwork := fmt.Sprintf("projects/%s/global/networks/%s", cfg.ProjectID, cfg.Network) - if cluster.NetworkConfig != nil && cluster.NetworkConfig.Network != "" && !strings.HasSuffix(cluster.NetworkConfig.Network, expectedNetwork) { - slog.Info("Mismatch in network", slog.String("current", cluster.NetworkConfig.Network), slog.String("expected", expectedNetwork)) - if err := deleteCluster(ctx, cfg); err != nil { - return err - } - return createClusterInternal(ctx, cfg, client, parent) - } - - // Recreate cluster if subnet configuration mismatches. - expectedSubnetwork := fmt.Sprintf("projects/%s/regions/%s/subnetworks/%s", cfg.ProjectID, cfg.Region, cfg.Subnetwork) - if cluster.NetworkConfig != nil && cluster.NetworkConfig.Subnetwork != "" && !strings.HasSuffix(cluster.NetworkConfig.Subnetwork, expectedSubnetwork) { - slog.Info("Mismatch in subnetwork", slog.String("current", cluster.NetworkConfig.Subnetwork), slog.String("expected", expectedSubnetwork)) - if err := deleteCluster(ctx, cfg); err != nil { - return err - } - return createClusterInternal(ctx, cfg, client, parent) - } - - // Recreate cluster if dataplane v2 configuration mismatches. - currentIsV2 := cluster.NetworkConfig != nil && cluster.NetworkConfig.DatapathProvider == containerpb.DatapathProvider_ADVANCED_DATAPATH - if currentIsV2 != cfg.EnableDataplaneV2 { - slog.Info("Mismatch in Dataplane V2 configuration", slog.Bool("current", currentIsV2), slog.Bool("expected", cfg.EnableDataplaneV2)) - if err := deleteCluster(ctx, cfg); err != nil { - return err - } - return createClusterInternal(ctx, cfg, client, parent) - } - - expectedWorkloadPool := fmt.Sprintf("%s.svc.id.goog", cfg.ProjectID) - currentWorkloadPool := "" - if cluster.WorkloadIdentityConfig != nil { - currentWorkloadPool = cluster.WorkloadIdentityConfig.WorkloadPool - } - if currentWorkloadPool != expectedWorkloadPool { - slog.Info("Mismatch in workload pool", slog.String("current", currentWorkloadPool), slog.String("expected", expectedWorkloadPool)) - slog.Info("Updating cluster WorkloadIdentityConfig...") - op, err := client.UpdateCluster(ctx, &containerpb.UpdateClusterRequest{ - Name: clusterName, - Update: &containerpb.ClusterUpdate{ - DesiredWorkloadIdentityConfig: &containerpb.WorkloadIdentityConfig{ - WorkloadPool: expectedWorkloadPool, - }, - }, - }) - if err != nil { - return fmt.Errorf("update cluster workload identity: %w", err) - } - if err := waitContainerOperation(ctx, client, op.Name, cfg); err != nil { - return err - } - } else { - slog.Info("Cluster WorkloadIdentityConfig match perfectly.", slog.String("cluster", cfg.ClusterName)) - } - - if cluster.EnableK8SBetaApis == nil || - len(cluster.EnableK8SBetaApis.EnabledApis) == 0 || - !containsAll(cluster.EnableK8SBetaApis.EnabledApis, requiredBetaAPIs) { - - clusterEnabledAPIs := []string{} - if cluster.EnableK8SBetaApis != nil && len(cluster.EnableK8SBetaApis.EnabledApis) > 0 { - clusterEnabledAPIs = cluster.EnableK8SBetaApis.EnabledApis - } - slog.Info("Mismatch in EnableK8SBetaApis", slog.String("current", strings.Join(clusterEnabledAPIs, ",")), slog.String("expected", strings.Join(requiredBetaAPIs, ","))) - - var combinedAPIs []string - for _, api := range append(requiredBetaAPIs, clusterEnabledAPIs...) { - if !slices.Contains(combinedAPIs, api) { - combinedAPIs = append(combinedAPIs, api) - } - } - - op, err := client.UpdateCluster(ctx, &containerpb.UpdateClusterRequest{ - Name: clusterName, - Update: &containerpb.ClusterUpdate{ - DesiredK8SBetaApis: &containerpb.K8SBetaAPIConfig{ - EnabledApis: combinedAPIs, - }, - }, - }) - if err != nil { - return fmt.Errorf("update cluster beta apis: %w", err) - } - if err := waitContainerOperation(ctx, client, op.Name, cfg); err != nil { - return err - } - warnNodePoolsWithoutPodCertificateProjection(cfg, cluster) - } else { - slog.Info("Cluster EnableK8SBetaApis match perfectly.", slog.String("cluster", cfg.ClusterName)) - } - - desiredOTelScope := containerpb.ManagedOpenTelemetryConfig_COLLECTION_AND_INSTRUMENTATION_COMPONENTS - if cluster.GetManagedOpentelemetryConfig().GetScope() != desiredOTelScope { - slog.Info("Mismatch in Managed OpenTelemetry config", - slog.String("current", cluster.GetManagedOpentelemetryConfig().GetScope().String()), - slog.String("expected", desiredOTelScope.String())) - slog.Info("Updating cluster ManagedOpentelemetryConfig...") - op, err := client.UpdateCluster(ctx, &containerpb.UpdateClusterRequest{ - Name: clusterName, - Update: &containerpb.ClusterUpdate{ - DesiredManagedOpentelemetryConfig: &containerpb.ManagedOpenTelemetryConfig{Scope: desiredOTelScope.Enum()}, - }, - }) - if err != nil { - return fmt.Errorf("update cluster managed opentelemetry: %w", err) - } - if err := waitContainerOperation(ctx, client, op.Name, cfg); err != nil { - return err - } - } else { - slog.Info("Cluster ManagedOpentelemetryConfig match perfectly.", slog.String("cluster", cfg.ClusterName)) - } - - // Nested virtualization is fixed at node creation, so an existing cluster - // cannot be updated into it: the pool has to be recreated. Report the drift - // rather than let the flag look applied when it was not. - if cfg.EnableNestedVirtualization && !nestedVirtualizationEnabled(cluster) { - slog.Warn("Cluster has no node pool with nested virtualization; --enable-nested-virtualization only applies to a cluster this tool creates", - slog.String("cluster", cfg.ClusterName), - slog.String("remedy", "recreate the cluster, or add a node pool with nested virtualization")) - } - - if !nodeSysctlsConfigured(cluster) { - slog.Warn("Cluster has no node pool with high-density node sysctls; create cluster only sets them on a cluster it creates", - slog.String("cluster", cfg.ClusterName), - slog.String("remedy", "run gcloud container node-pools update --system-config-from-file (see tools/setup-gcp/README.md; this warning is expected to remain if using the in-place DaemonSet)")) - } - - return nil -} - -func waitContainerOperation(ctx context.Context, client *container.ClusterManagerClient, opName string, cfg *Config) error { - slog.Info("Waiting for operation to complete...", slog.String("operation", opName)) - - fullName := opName - if !strings.HasPrefix(opName, "projects/") { - fullName = fmt.Sprintf("projects/%s/locations/%s/operations/%s", cfg.ProjectID, cfg.ClusterLocation, opName) - } - - err := wait.PollUntilContextTimeout(ctx, 10*time.Second, 30*time.Minute, true, func(pollCtx context.Context) (bool, error) { - op, err := client.GetOperation(pollCtx, &containerpb.GetOperationRequest{ - Name: fullName, - }) - if err != nil { - return false, fmt.Errorf("failed to get operation status: %w", err) - } - if op.Status == containerpb.Operation_DONE { - if op.Error != nil { - return true, fmt.Errorf("operation failed: %v", op.Error) - } - slog.Info("Operation completed successfully.", slog.String("operation", opName)) - return true, nil - } - if op.Status == containerpb.Operation_ABORTING { - return true, fmt.Errorf("operation %s is aborting", opName) - } - return false, nil - }) - - if err != nil { - return fmt.Errorf("wait for operation %s: %w", opName, err) - } - - return nil -} - -func containsAll(clusterAPIs []string, requiredAPIs []string) bool { - for _, s := range requiredAPIs { - if !slices.Contains(clusterAPIs, s) { - return false - } - } - return true -} - -// validateBootDisk ensures BootDiskSizeGB is non-negative. -func validateBootDisk(cfg *Config) error { - if cfg.BootDiskSizeGB < 0 { - return fmt.Errorf("boot disk size %d is invalid: must be greater than or equal to 0", cfg.BootDiskSizeGB) - } - return nil -} - -// validateClusterLocation ensures ClusterLocation is set and compatible with Region. -func validateClusterLocation(cfg *Config) error { - cfg.Region = strings.TrimSpace(cfg.Region) - if cfg.Region == "" { - return errors.New("--region is required") - } - - cfg.ClusterLocation = strings.TrimSpace(cfg.ClusterLocation) - if cfg.ClusterLocation == "" { - return errors.New("--cluster-location is required") - } - - if cfg.ClusterLocation != cfg.Region && !strings.HasPrefix(cfg.ClusterLocation, cfg.Region+"-") { - return fmt.Errorf("cluster location %q is not compatible with region %q: cluster location must be the region itself (for regional clusters) or a zone within that region (e.g. %s-c)", cfg.ClusterLocation, cfg.Region, cfg.Region) - } - - return nil -} - -var clusterCmd = &cobra.Command{ - Use: "cluster", - Short: "Create GKE cluster", - RunE: func(cmd *cobra.Command, args []string) error { - ctx := cmd.Context() - warnDeprecatedMachineTypeEnv(cmd) - if err := resolveProjectID(ctx, &cfg); err != nil { - return err - } - return createClusterIdempotent(ctx, &cfg) - }, -} - -func init() { - createCmd.AddCommand(clusterCmd) - clusterCmd.Flags().StringVar(&cfg.ClusterName, "name", getEnv("CLUSTER_NAME", "substrate-poc"), "Name of the GKE cluster [env: CLUSTER_NAME]") - clusterCmd.Flags().StringVar(&cfg.ClusterLocation, "location", getEnv("CLUSTER_LOCATION", "us-west1-c"), "Zone or region for the cluster [env: CLUSTER_LOCATION]") - clusterCmd.Flags().StringVar(&cfg.ClusterVersion, "version", getEnv("CLUSTER_VERSION", ""), "Kubernetes version [env: CLUSTER_VERSION]") - clusterCmd.Flags().StringVar(&cfg.Network, "network", getEnv("NETWORK", "default"), "VPC network name [env: NETWORK]") - clusterCmd.Flags().StringVar(&cfg.Subnetwork, "subnetwork", getEnv("SUBNETWORK", "default"), "VPC subnetwork name [env: SUBNETWORK]") - clusterCmd.Flags().StringVar(&cfg.MachineType, "machine-type", resolveMachineTypeDefault(), "Machine type for the node pool [env: NODE_MACHINE_TYPE]") - clusterCmd.Flags().BoolVar(&cfg.EnableDataplaneV2, "enable-dataplane-v2", getEnv("ENABLE_DATAPLANE_V2", true), "Enable Dataplane V2 [env: ENABLE_DATAPLANE_V2]") - clusterCmd.Flags().BoolVar(&cfg.EnableNestedVirtualization, "enable-nested-virtualization", getEnv("ENABLE_NESTED_VIRTUALIZATION", true), "Create the node pool with nested virtualization, exposing /dev/kvm for micro-VM workers; needs a machine type that supports it. Turn off with --enable-nested-virtualization=false [env: ENABLE_NESTED_VIRTUALIZATION]") - clusterCmd.Flags().Int32Var(&cfg.BootDiskSizeGB, "boot-disk-size", getEnv("BOOT_DISK_SIZE_GB", int32(0)), "Boot disk size in GB for the node pool; 0 = GKE default (100 GB) [env: BOOT_DISK_SIZE_GB]") - clusterCmd.Flags().StringVar(&cfg.BootDiskType, "boot-disk-type", getEnv("BOOT_DISK_TYPE", ""), "Boot disk type for the node pool; empty = GKE default [env: BOOT_DISK_TYPE]") -} diff --git a/tools/setup-gcp/cmd/cluster_test.go b/tools/setup-gcp/cmd/cluster_test.go deleted file mode 100644 index 8fba804a01..0000000000 --- a/tools/setup-gcp/cmd/cluster_test.go +++ /dev/null @@ -1,582 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package cmd - -import ( - "maps" - "strconv" - "strings" - "testing" - - "cloud.google.com/go/container/apiv1/containerpb" - "google.golang.org/protobuf/proto" -) - -func TestBuildCreateClusterRequest_FilestoreDisabled(t *testing.T) { - cfg := &Config{ - ProjectID: "test-project", - ClusterName: "test-cluster", - ClusterLocation: "us-west1-c", - MachineType: "c3-standard-4", - } - parent := "projects/test-project/locations/us-west1-c" - - req := buildCreateClusterRequest(parent, cfg) - if req.Cluster == nil { - t.Fatal("expected req.Cluster to be non-nil") - } - - addonsConfig := req.Cluster.AddonsConfig - if addonsConfig == nil { - t.Fatal("expected req.Cluster.AddonsConfig to be non-nil") - } - - filestoreConfig := addonsConfig.GcpFilestoreCsiDriverConfig - if filestoreConfig == nil { - t.Fatal("expected GcpFilestoreCsiDriverConfig to be non-nil") - } - - if filestoreConfig.Enabled { - t.Errorf("expected GcpFilestoreCsiDriverConfig.Enabled to be false, got true") - } -} - -func TestBuildCreateClusterRequest_NodeConfig(t *testing.T) { - tests := []struct { - name string - cfg *Config - wantDiskSize int32 - wantDiskType string - }{ - { - name: "custom disk size and type", - cfg: &Config{ - ProjectID: "test-project", - ClusterName: "test-cluster", - ClusterLocation: "us-west1-c", - MachineType: "c3-standard-8", - BootDiskSizeGB: 500, - BootDiskType: "hyperdisk-balanced", - }, - wantDiskSize: 500, - wantDiskType: "hyperdisk-balanced", - }, - { - name: "unset disk size and type", - cfg: &Config{ - ProjectID: "test-project", - ClusterName: "test-cluster", - ClusterLocation: "us-west1-c", - MachineType: "c3-standard-4", - }, - wantDiskSize: 0, - wantDiskType: "", - }, - } - - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - parent := "projects/test-project/locations/us-west1-c" - req := buildCreateClusterRequest(parent, tt.cfg) - if req.Cluster == nil || len(req.Cluster.NodePools) == 0 { - t.Fatal("expected non-empty node pools in request") - } - - nodeConfig := req.Cluster.NodePools[0].Config - if nodeConfig == nil { - t.Fatal("expected non-nil node config") - } - - if nodeConfig.MachineType != tt.cfg.MachineType { - t.Errorf("MachineType = %q, want %q", nodeConfig.MachineType, tt.cfg.MachineType) - } - if nodeConfig.DiskSizeGb != tt.wantDiskSize { - t.Errorf("DiskSizeGb = %d, want %d", nodeConfig.DiskSizeGb, tt.wantDiskSize) - } - if nodeConfig.DiskType != tt.wantDiskType { - t.Errorf("DiskType = %q, want %q", nodeConfig.DiskType, tt.wantDiskType) - } - - sysctls := nodeConfig.GetLinuxNodeConfig().GetSysctls() - wantKeys := []string{ - "net.ipv4.neigh.default.gc_thresh1", - "net.ipv4.neigh.default.gc_thresh2", - "net.ipv4.neigh.default.gc_thresh3", - "fs.inotify.max_user_instances", - "fs.inotify.max_user_watches", - } - parsed := make(map[string]int, len(wantKeys)) - for _, k := range wantKeys { - raw, ok := sysctls[k] - if !ok { - t.Fatalf("missing required sysctl key %q", k) - } - v, err := strconv.Atoi(raw) - if err != nil || v <= 0 { - t.Fatalf("sysctl %q = %q, want positive integer: %v", k, raw, err) - } - parsed[k] = v - } - t1 := parsed["net.ipv4.neigh.default.gc_thresh1"] - t2 := parsed["net.ipv4.neigh.default.gc_thresh2"] - t3 := parsed["net.ipv4.neigh.default.gc_thresh3"] - if !(1024 < t1 && t1 < t2 && t2 < t3) { - t.Errorf("expected 1024 < gc_thresh1 (%d) < gc_thresh2 (%d) < gc_thresh3 (%d)", t1, t2, t3) - } - if watches := parsed["fs.inotify.max_user_watches"]; watches > 1048576 { - t.Errorf("fs.inotify.max_user_watches = %d, exceeds GKE cap of 1048576", watches) - } - }) - } -} - -func TestBuildCreateClusterRequest_NestedVirtualization(t *testing.T) { - tests := []struct { - name string - cfg *Config - want bool - }{ - { - name: "enabled", - cfg: &Config{ - ProjectID: "test-project", - ClusterName: "test-cluster", - ClusterLocation: "us-west1-c", - MachineType: "n2-standard-8", - EnableNestedVirtualization: true, - }, - want: true, - }, - { - name: "disabled", - cfg: &Config{ - ProjectID: "test-project", - ClusterName: "test-cluster", - ClusterLocation: "us-west1-c", - MachineType: "c3-standard-4", - }, - want: false, - }, - } - - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - parent := "projects/test-project/locations/us-west1-c" - req := buildCreateClusterRequest(parent, tt.cfg) - if req.Cluster == nil || len(req.Cluster.NodePools) == 0 { - t.Fatal("expected non-empty node pools in request") - } - - got := req.Cluster.NodePools[0].Config.GetAdvancedMachineFeatures().GetEnableNestedVirtualization() - if got != tt.want { - t.Errorf("EnableNestedVirtualization = %v, want %v", got, tt.want) - } - - // A disabled knob must leave the field unset rather than send - // false, so GKE applies its own default. - if !tt.want && req.Cluster.NodePools[0].Config.GetAdvancedMachineFeatures() != nil { - t.Errorf("expected AdvancedMachineFeatures to be nil when the knob is off") - } - }) - } -} - -func TestNestedVirtualizationEnabled(t *testing.T) { - poolWith := func(enabled *bool) *containerpb.NodePool { - return &containerpb.NodePool{ - Config: &containerpb.NodeConfig{ - AdvancedMachineFeatures: &containerpb.AdvancedMachineFeatures{ - EnableNestedVirtualization: enabled, - }, - }, - } - } - - tests := []struct { - name string - cluster *containerpb.Cluster - want bool - }{ - { - name: "nil cluster", - cluster: nil, - want: false, - }, - { - name: "no node pools", - cluster: &containerpb.Cluster{}, - want: false, - }, - { - name: "pool without advanced machine features", - cluster: &containerpb.Cluster{ - NodePools: []*containerpb.NodePool{{Config: &containerpb.NodeConfig{}}}, - }, - want: false, - }, - { - name: "single pool with nested virtualization", - cluster: &containerpb.Cluster{ - NodePools: []*containerpb.NodePool{poolWith(proto.Bool(true))}, - }, - want: true, - }, - { - name: "second pool carries the KVM nodes", - cluster: &containerpb.Cluster{ - NodePools: []*containerpb.NodePool{ - poolWith(proto.Bool(false)), - poolWith(proto.Bool(true)), - }, - }, - want: true, - }, - { - name: "every pool disabled", - cluster: &containerpb.Cluster{ - NodePools: []*containerpb.NodePool{ - poolWith(proto.Bool(false)), - poolWith(nil), - }, - }, - want: false, - }, - } - - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - if got := nestedVirtualizationEnabled(tt.cluster); got != tt.want { - t.Errorf("nestedVirtualizationEnabled() = %v, want %v", got, tt.want) - } - }) - } -} - -func TestNodeSysctlsConfigured(t *testing.T) { - poolWith := func(sysctls map[string]string) *containerpb.NodePool { - return &containerpb.NodePool{ - Config: &containerpb.NodeConfig{ - LinuxNodeConfig: &containerpb.LinuxNodeConfig{ - Sysctls: sysctls, - }, - }, - } - } - - partialSysctls := maps.Clone(requiredNodeSysctls) - delete(partialSysctls, "fs.inotify.max_user_watches") - - tests := []struct { - name string - cluster *containerpb.Cluster - want bool - }{ - { - name: "nil cluster", - cluster: nil, - want: false, - }, - { - name: "no node pools", - cluster: &containerpb.Cluster{}, - want: false, - }, - { - name: "pool without linux node config", - cluster: &containerpb.Cluster{ - NodePools: []*containerpb.NodePool{{Config: &containerpb.NodeConfig{}}}, - }, - want: false, - }, - { - name: "pool missing required sysctl", - cluster: &containerpb.Cluster{ - NodePools: []*containerpb.NodePool{poolWith(partialSysctls)}, - }, - want: false, - }, - { - name: "single pool with required sysctls", - cluster: &containerpb.Cluster{ - NodePools: []*containerpb.NodePool{poolWith(maps.Clone(requiredNodeSysctls))}, - }, - want: true, - }, - { - name: "second pool carries required sysctls", - cluster: &containerpb.Cluster{ - NodePools: []*containerpb.NodePool{ - poolWith(nil), - poolWith(maps.Clone(requiredNodeSysctls)), - }, - }, - want: true, - }, - } - - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - if got := nodeSysctlsConfigured(tt.cluster); got != tt.want { - t.Errorf("nodeSysctlsConfigured() = %v, want %v", got, tt.want) - } - }) - } -} - -func TestValidateBootDisk(t *testing.T) { - tests := []struct { - name string - cfg Config - wantErr string - }{ - { - name: "valid positive boot disk size", - cfg: Config{BootDiskSizeGB: 500}, - }, - { - name: "zero boot disk size (unset/default)", - cfg: Config{BootDiskSizeGB: 0}, - }, - { - name: "negative boot disk size", - cfg: Config{BootDiskSizeGB: -1}, - wantErr: "boot disk size -1 is invalid: must be greater than or equal to 0", - }, - } - - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - cfgCopy := tt.cfg - err := validateBootDisk(&cfgCopy) - if tt.wantErr != "" { - if err == nil { - t.Fatalf("expected error %q, got nil", tt.wantErr) - } - if err.Error() != tt.wantErr { - t.Errorf("got error %q, want %q", err.Error(), tt.wantErr) - } - return - } - if err != nil { - t.Fatalf("unexpected error: %v", err) - } - }) - } -} - -func TestValidateClusterLocation(t *testing.T) { - tests := []struct { - name string - cfg Config - wantErr string - }{ - { - name: "compatible default us-west1 and us-west1-c", - cfg: Config{Region: "us-west1", ClusterLocation: "us-west1-c"}, - }, - { - name: "compatible zone in region", - cfg: Config{Region: "us-central1", ClusterLocation: "us-central1-a"}, - }, - { - name: "compatible regional cluster location", - cfg: Config{Region: "us-central1", ClusterLocation: "us-central1"}, - }, - { - name: "incompatible zone and region", - cfg: Config{Region: "us-central1", ClusterLocation: "us-west1-c"}, - wantErr: `cluster location "us-west1-c" is not compatible with region "us-central1"`, - }, - { - name: "incompatible regions", - cfg: Config{Region: "us-central1", ClusterLocation: "us-west1"}, - wantErr: `cluster location "us-west1" is not compatible with region "us-central1"`, - }, - { - name: "similar prefix but different region number", - cfg: Config{Region: "us-central1", ClusterLocation: "us-central2-c"}, - wantErr: `cluster location "us-central2-c" is not compatible with region "us-central1"`, - }, - { - name: "missing region", - cfg: Config{Region: "", ClusterLocation: "us-central1-c"}, - wantErr: "--region is required", - }, - { - name: "missing cluster location", - cfg: Config{Region: "us-central1", ClusterLocation: ""}, - wantErr: "--cluster-location is required", - }, - } - - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - cfgCopy := tt.cfg - err := validateClusterLocation(&cfgCopy) - if tt.wantErr != "" { - if err == nil { - t.Fatalf("expected error containing %q, got nil", tt.wantErr) - } - if !strings.Contains(err.Error(), tt.wantErr) { - t.Errorf("got error %q, want containing %q", err.Error(), tt.wantErr) - } - return - } - if err != nil { - t.Fatalf("unexpected error: %v", err) - } - }) - } -} - -func TestNodePoolsWithoutPodCertificateProjection(t *testing.T) { - pool := func(name, version string) *containerpb.NodePool { - return &containerpb.NodePool{Name: name, Version: version} - } - tests := []struct { - name string - pools []*containerpb.NodePool - want []string - }{ - { - name: "1.36 pool needs its nodes recreated", - pools: []*containerpb.NodePool{pool("default-pool", "1.36.4-gke.1247000")}, - want: []string{"default-pool"}, - }, - { - name: "1.37 pool is fine, projection is GA in its kubelet", - pools: []*containerpb.NodePool{pool("default-pool", "1.37.0-gke.3503000")}, - }, - { - // A 1.37 control plane does not help 1.36 kubelets, so only the - // old pool is reported. - name: "only the pools below 1.37 are reported", - pools: []*containerpb.NodePool{ - pool("old", "1.36.4-gke.1247000"), - pool("new", "1.37.0-gke.3503000"), - }, - want: []string{"old"}, - }, - { - name: "an unreadable version is reported rather than assumed fine", - pools: []*containerpb.NodePool{pool("mystery", "")}, - want: []string{"mystery"}, - }, - { - name: "no pools, nothing to report", - }, - } - - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - var got []string - for _, p := range nodePoolsWithoutPodCertificateProjection(&containerpb.Cluster{NodePools: tt.pools}) { - got = append(got, p.GetName()) - } - if strings.Join(got, ",") != strings.Join(tt.want, ",") { - t.Errorf("got %v, want %v", got, tt.want) - } - }) - } -} - -func TestKubernetesMinor(t *testing.T) { - tests := []struct { - version string - want int - wantOK bool - }{ - {version: "1.36.4-gke.1247000", want: 36, wantOK: true}, - {version: "1.37", want: 37, wantOK: true}, - {version: "1.100.0", want: 100, wantOK: true}, - {version: ""}, - {version: "latest"}, - {version: "2.0.0"}, - {version: "1.x.0"}, - } - - for _, tt := range tests { - t.Run(tt.version, func(t *testing.T) { - got, ok := kubernetesMinor(tt.version) - if ok != tt.wantOK || got != tt.want { - t.Errorf("kubernetesMinor(%q) = %d, %v; want %d, %v", tt.version, got, ok, tt.want, tt.wantOK) - } - }) - } -} - -func TestReplacementNodePoolCommand(t *testing.T) { - cfg := &Config{ProjectID: "my-project", ClusterName: "substrate-poc", ClusterLocation: "us-west1-c"} - tests := []struct { - name string - pool *containerpb.NodePool - want string - }{ - { - name: "a pool this tool created carries its disk and nested virtualization over", - pool: &containerpb.NodePool{ - Name: "substrate-node-pool", - Version: "1.36.4-gke.1247000", - InitialNodeCount: 2, - Config: &containerpb.NodeConfig{ - MachineType: "c3-standard-4", - DiskSizeGb: 500, - DiskType: "pd-balanced", - AdvancedMachineFeatures: &containerpb.AdvancedMachineFeatures{EnableNestedVirtualization: proto.Bool(true)}, - }, - }, - want: "gcloud container node-pools create substrate-node-pool-2 --cluster=substrate-poc --project=my-project --location=us-west1-c --node-version=1.36.4-gke.1247000 --machine-type=c3-standard-4 --num-nodes=2 --disk-size=500 --disk-type=pd-balanced --enable-nested-virtualization", - }, - { - // Autoscaled pools can report zero; a pool with no nodes would - // leave nothing for the workloads to move to. - name: "defaults stay defaults, and the pool gets at least one node", - pool: &containerpb.NodePool{ - Name: "default-pool", - Version: "1.36.4-gke.1082000", - Config: &containerpb.NodeConfig{MachineType: "e2-standard-4"}, - }, - want: "gcloud container node-pools create default-pool-2 --cluster=substrate-poc --project=my-project --location=us-west1-c --node-version=1.36.4-gke.1082000 --machine-type=e2-standard-4 --num-nodes=1", - }, - } - - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - if got := replacementNodePoolCommand(cfg, tt.pool); got != tt.want { - t.Errorf("got %q\nwant %q", got, tt.want) - } - }) - } -} - -func TestReplacementNodePoolNameFitsGKELimit(t *testing.T) { - long := strings.Repeat("a", 39) + "-b" - got := replacementNodePoolName(long) - if len(got) > 40 { - t.Errorf("replacementNodePoolName(%q) = %q, %d characters; GKE allows 40", long, got, len(got)) - } - if got == long { - t.Errorf("replacement pool name %q collides with the original", got) - } -} - -func TestDeleteNodePoolCommand(t *testing.T) { - cfg := &Config{ProjectID: "my-project", ClusterName: "substrate-poc", ClusterLocation: "us-west1-c"} - got := deleteNodePoolCommand(cfg, &containerpb.NodePool{Name: "substrate-node-pool"}) - want := "gcloud container node-pools delete substrate-node-pool --cluster=substrate-poc --project=my-project --location=us-west1-c" - if got != want { - t.Errorf("got %q\nwant %q", got, want) - } -} diff --git a/tools/setup-gcp/cmd/common.go b/tools/setup-gcp/cmd/common.go deleted file mode 100644 index 9eb30093f0..0000000000 --- a/tools/setup-gcp/cmd/common.go +++ /dev/null @@ -1,135 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package cmd - -import ( - "fmt" - "log/slog" - "os" - "strconv" - "sync" - - "github.com/spf13/cobra" -) - -type Config struct { - ProjectID string - ProjectNumber string - Region string - - ClusterName string - ClusterLocation string - ClusterVersion string - - Network string - Subnetwork string - EnableDataplaneV2 bool - - NodePoolName string - NodePoolVersion string - MachineType string - EnableNestedVirtualization bool - BootDiskSizeGB int32 - BootDiskType string - - BucketName string - - // TransferGSAName is the name of the snapshot transfer service account - // (SNAPSHOT_TRANSFER_GSA_NAME), the variable ate-setup also reads. - TransferGSAName string - - CloudSQLInstance string - CloudSQLTier string - CloudSQLEdition string - CloudSQLStorageGB int64 - CloudSQLGSAName string - - DashboardDir string -} - -func machineTypeFromEnv() (machineType string, deprecated bool) { - if v := os.Getenv("NODE_MACHINE_TYPE"); v != "" { - return v, false - } - if v := os.Getenv("GVISOR_NODE_MACHINE_TYPE"); v != "" { - return v, true - } - return "c3-standard-4", false -} - -func resolveMachineTypeDefault() string { - machineType, _ := machineTypeFromEnv() - return machineType -} - -func warnDeprecatedMachineTypeEnv(cmd *cobra.Command) { - if cmd.Flags().Changed("machine-type") { - return - } - if _, deprecated := machineTypeFromEnv(); deprecated { - slog.Warn("GVISOR_NODE_MACHINE_TYPE is deprecated; use NODE_MACHINE_TYPE instead") - } -} - -type getEnvType interface { - string | bool | int64 | int32 -} - -var warnedEnvKeys sync.Map - -// getEnv retrieves an environment variable by key and parses it into the specified type. -func getEnv[T getEnvType](key string, fallback T) T { - val, ok := os.LookupEnv(key) - if !ok { - return fallback - } - - var ret any - var err error - - switch any(fallback).(type) { - case string: - ret = val - case bool: - ret, err = strconv.ParseBool(val) - case int64: - ret, err = strconv.ParseInt(val, 10, 64) - case int32: - var v int64 - v, err = strconv.ParseInt(val, 10, 32) - ret = int32(v) - } - - if err != nil { - if _, warned := warnedEnvKeys.LoadOrStore(key, struct{}{}); !warned { - slog.Warn("Ignoring unparsable environment variable", "key", key, "value", val, "using", fallback, "error", err) - } - return fallback - } - - return ret.(T) -} - -// assetBucketName is the bucket for micro-VM sandbox assets. -// hack/install-microvm-deps.sh derives the same name. -func (c *Config) assetBucketName() string { - return c.BucketName + "-assets" -} - -// workloadIdentityPrincipal is the IAM member for the ate-system Kubernetes -// service account ksa under GKE Workload Identity Federation. -func workloadIdentityPrincipal(cfg *Config, ksa string) string { - return fmt.Sprintf("principal://iam.googleapis.com/projects/%s/locations/global/workloadIdentityPools/%s.svc.id.goog/subject/ns/ate-system/sa/%s", cfg.ProjectNumber, cfg.ProjectID, ksa) -} diff --git a/tools/setup-gcp/cmd/common_test.go b/tools/setup-gcp/cmd/common_test.go deleted file mode 100644 index a5199de927..0000000000 --- a/tools/setup-gcp/cmd/common_test.go +++ /dev/null @@ -1,278 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package cmd - -import ( - "bytes" - "log/slog" - "os" - "strings" - "testing" - - "github.com/spf13/cobra" -) - -func TestResolveMachineTypeDefault(t *testing.T) { - tests := []struct { - name string - newVal *string - oldVal *string - want string - }{ - { - name: "neither set", - want: "c3-standard-4", - }, - { - name: "new name set", - newVal: ptr("n4-standard-8"), - want: "n4-standard-8", - }, - { - name: "old name still honored", - oldVal: ptr("n2-standard-8"), - want: "n2-standard-8", - }, - { - name: "new name wins over old", - newVal: ptr("n4-standard-8"), - oldVal: ptr("n2-standard-8"), - want: "n4-standard-8", - }, - { - name: "empty new name does not suppress the old one", - newVal: ptr(""), - oldVal: ptr("n2-standard-8"), - want: "n2-standard-8", - }, - { - name: "empty values fall back to the default", - newVal: ptr(""), - oldVal: ptr(""), - want: "c3-standard-4", - }, - } - - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - setOrUnset(t, "NODE_MACHINE_TYPE", tt.newVal) - setOrUnset(t, "GVISOR_NODE_MACHINE_TYPE", tt.oldVal) - - if got := resolveMachineTypeDefault(); got != tt.want { - t.Errorf("resolveMachineTypeDefault() = %q, want %q", got, tt.want) - } - }) - } -} - -func TestWarnDeprecatedMachineTypeEnv(t *testing.T) { - tests := []struct { - name string - newVal *string - oldVal *string - flagArgs []string - wantWarn bool - }{ - { - name: "old name alone warns", - oldVal: ptr("n2-standard-8"), - wantWarn: true, - }, - { - name: "neither set is quiet", - }, - { - name: "new name alone is quiet", - newVal: ptr("n4-standard-8"), - }, - { - name: "new name takes precedence, so no warning", - newVal: ptr("n4-standard-8"), - oldVal: ptr("n2-standard-8"), - }, - { - name: "explicit flag makes the variable moot", - oldVal: ptr("n2-standard-8"), - flagArgs: []string{"--machine-type=n4-standard-8"}, - }, - } - - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - setOrUnset(t, "NODE_MACHINE_TYPE", tt.newVal) - setOrUnset(t, "GVISOR_NODE_MACHINE_TYPE", tt.oldVal) - - var buf bytes.Buffer - restore := slog.Default() - slog.SetDefault(slog.New(slog.NewTextHandler(&buf, nil))) - t.Cleanup(func() { slog.SetDefault(restore) }) - - cmd := &cobra.Command{Use: "test"} - cmd.Flags().String("machine-type", resolveMachineTypeDefault(), "") - if err := cmd.ParseFlags(tt.flagArgs); err != nil { - t.Fatalf("ParseFlags(%v) = %v", tt.flagArgs, err) - } - - warnDeprecatedMachineTypeEnv(cmd) - - if got := strings.Contains(buf.String(), "GVISOR_NODE_MACHINE_TYPE is deprecated"); got != tt.wantWarn { - t.Errorf("warned = %t, want %t (log: %q)", got, tt.wantWarn, buf.String()) - } - }) - } -} - -func ptr[T any](v T) *T { return &v } - -// setOrUnset exports key with the given value, or removes key from the -// environment when val is nil. t.Setenv registers the restore either way, -// including for a key that started out unset. -func setOrUnset(t *testing.T, key string, val *string) { - t.Helper() - if val == nil { - t.Setenv(key, "") - os.Unsetenv(key) - return - } - t.Setenv(key, *val) -} - -func TestGetEnv_String(t *testing.T) { - const key = "TEST_ENV_STRING_VAR" - - // Ensure clean environment - os.Unsetenv(key) - defer os.Unsetenv(key) - - // Test fallback when environment variable is not set - if got := getEnv(key, "default"); got != "default" { - t.Errorf("getEnv(%q, %q) = %q; want %q", key, "default", got, "default") - } - - // Test when environment variable is set - os.Setenv(key, "hello") - if got := getEnv(key, "default"); got != "hello" { - t.Errorf("getEnv(%q, %q) = %q; want %q", key, "default", got, "hello") - } -} - -func TestGetEnv_Bool(t *testing.T) { - const key = "TEST_ENV_BOOL_VAR" - - // Ensure clean environment - os.Unsetenv(key) - defer os.Unsetenv(key) - - // Test fallback when environment variable is not set - if got := getEnv(key, true); got != true { - t.Errorf("getEnv(%q, true) = %t; want true", key, got) - } - if got := getEnv(key, false); got != false { - t.Errorf("getEnv(%q, false) = %t; want false", key, got) - } - - // Test when environment variable is set to valid bool strings - tests := []struct { - envVal string - fallback bool - want bool - }{ - {"true", false, true}, - {"TRUE", false, true}, - {"1", false, true}, - {"t", false, true}, - {"T", false, true}, - {"false", true, false}, - {"FALSE", true, false}, - {"0", true, false}, - {"f", true, false}, - {"F", true, false}, - } - - for _, tc := range tests { - os.Setenv(key, tc.envVal) - if got := getEnv(key, tc.fallback); got != tc.want { - t.Errorf("getEnv(%q, %t) with env %q = %t; want %t", key, tc.fallback, tc.envVal, got, tc.want) - } - } - - // Test when environment variable is set to an invalid bool string - os.Setenv(key, "invalid_bool") - if got := getEnv(key, true); got != true { - t.Errorf("getEnv(%q, true) with invalid env = %t; want true", key, got) - } - if got := getEnv(key, false); got != false { - t.Errorf("getEnv(%q, false) with invalid env = %t; want false", key, got) - } -} - -// ParseBool rejects spellings such as "off" and "no", so a value meant to turn a -// default-on knob off would otherwise leave it on without a word. -func TestGetEnv_WarnsOnUnparsableValue(t *testing.T) { - const key = "TEST_ENV_UNPARSABLE_VAR" - t.Setenv(key, "off") - t.Cleanup(func() { warnedEnvKeys.Delete(key) }) - - var buf bytes.Buffer - restore := slog.Default() - slog.SetDefault(slog.New(slog.NewTextHandler(&buf, nil))) - t.Cleanup(func() { slog.SetDefault(restore) }) - - if got := getEnv(key, true); got != true { - t.Errorf("getEnv(%q, true) = %t; want true", key, got) - } - if !strings.Contains(buf.String(), key) { - t.Errorf("getEnv(%q, true) logged %q; want a warning naming the variable", key, buf.String()) - } - - // Several commands register a flag for the same variable, so the warning - // must not repeat once per registration. - buf.Reset() - getEnv(key, true) - if buf.Len() != 0 { - t.Errorf("second getEnv(%q, true) logged %q; want nothing", key, buf.String()) - } -} - -func TestGetEnv_Int32(t *testing.T) { - const key = "TEST_ENV_INT32_VAR" - - // Ensure clean environment - os.Unsetenv(key) - defer os.Unsetenv(key) - - // Test fallback when environment variable is not set - if got := getEnv(key, int32(500)); got != int32(500) { - t.Errorf("getEnv(%q, %d) = %d; want %d", key, 500, got, 500) - } - - // Test when environment variable is set - os.Setenv(key, "250") - if got := getEnv(key, int32(500)); got != int32(250) { - t.Errorf("getEnv(%q, %d) = %d; want %d", key, 500, got, 250) - } - - // Test when environment variable is invalid int32 string - os.Setenv(key, "invalid") - if got := getEnv(key, int32(500)); got != int32(500) { - t.Errorf("getEnv(%q, %d) with invalid env = %d; want %d", key, 500, got, 500) - } - - // Test when environment variable exceeds int32 range - os.Setenv(key, "5000000000") - if got := getEnv(key, int32(500)); got != int32(500) { - t.Errorf("getEnv(%q, %d) with out-of-range env = %d; want %d", key, 500, got, 500) - } -} diff --git a/tools/setup-gcp/cmd/create.go b/tools/setup-gcp/cmd/create.go deleted file mode 100644 index f6014c77bb..0000000000 --- a/tools/setup-gcp/cmd/create.go +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// 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. - -package cmd - -import ( - "github.com/spf13/cobra" -) - -var createCmd = &cobra.Command{ - Use: "create", - Short: "Create GCP resources", - RunE: func(cmd *cobra.Command, args []string) error { - return cmd.Help() - }, -} - -func init() { - rootCmd.AddCommand(createCmd) -} diff --git a/tools/setup-gcp/cmd/dashboards.go b/tools/setup-gcp/cmd/dashboards.go deleted file mode 100644 index d6e99ad6f9..0000000000 --- a/tools/setup-gcp/cmd/dashboards.go +++ /dev/null @@ -1,118 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package cmd - -import ( - "context" - "fmt" - "log/slog" - "os" - "path/filepath" - - dashboard "cloud.google.com/go/monitoring/dashboard/apiv1" - "cloud.google.com/go/monitoring/dashboard/apiv1/dashboardpb" - "github.com/spf13/cobra" - "google.golang.org/api/iterator" - "google.golang.org/protobuf/encoding/protojson" -) - -var dashboardFiles = []string{ - "ate-grpc-dashboard.json", - "ate-e2e-latency-dashboard.json", - "ate-snapshot-dashboard.json", -} - -// createMonitoringDashboards creates or updates each dashboard in -// dashboardFiles. It is idempotent: dashboards are matched by displayName and -// updated in place, because CreateDashboard always creates a new dashboard (so -// calling it repeatedly would produce duplicates). -func createMonitoringDashboards(ctx context.Context, cfg *Config) error { - client, err := dashboard.NewDashboardsClient(ctx) - if err != nil { - return fmt.Errorf("create dashboards client: %w", err) - } - defer client.Close() - - parent := "projects/" + cfg.ProjectID - - // Index existing dashboards by displayName to decide create vs update. - existing := map[string]*dashboardpb.Dashboard{} - it := client.ListDashboards(ctx, &dashboardpb.ListDashboardsRequest{Parent: parent}) - for { - d, err := it.Next() - if err == iterator.Done { - break - } - if err != nil { - return fmt.Errorf("list dashboards: %w", err) - } - existing[d.GetDisplayName()] = d - } - - dir := cfg.DashboardDir - if dir == "" { - dir = "tools/setup-gcp/dashboards" - } - - for _, file := range dashboardFiles { - path := filepath.Join(dir, file) - data, err := os.ReadFile(path) - if err != nil { - return fmt.Errorf("read %s: %w", path, err) - } - d := &dashboardpb.Dashboard{} - if err := protojson.Unmarshal(data, d); err != nil { - return fmt.Errorf("parse %s: %w", path, err) - } - - if cur, ok := existing[d.GetDisplayName()]; ok { - // Update in place: reuse the existing resource name and etag. - d.Name = cur.GetName() - d.Etag = cur.GetEtag() - slog.Info("Updating dashboard", - slog.String("displayName", d.GetDisplayName()), - slog.String("name", d.GetName()), - slog.String("file", filepath.Base(path))) - if _, err := client.UpdateDashboard(ctx, &dashboardpb.UpdateDashboardRequest{Dashboard: d}); err != nil { - return fmt.Errorf("update dashboard %q: %w", d.GetDisplayName(), err) - } - } else { - slog.Info("Creating dashboard", - slog.String("displayName", d.GetDisplayName()), - slog.String("file", filepath.Base(path))) - if _, err := client.CreateDashboard(ctx, &dashboardpb.CreateDashboardRequest{Parent: parent, Dashboard: d}); err != nil { - return fmt.Errorf("create dashboard %q: %w", d.GetDisplayName(), err) - } - } - } - return nil -} - -var dashboardsCmd = &cobra.Command{ - Use: "dashboards", - Short: "Create Cloud Monitoring dashboards", - RunE: func(cmd *cobra.Command, args []string) error { - ctx := cmd.Context() - if err := resolveProjectID(ctx, &cfg); err != nil { - return err - } - return createMonitoringDashboards(ctx, &cfg) - }, -} - -func init() { - createCmd.AddCommand(dashboardsCmd) - dashboardsCmd.Flags().StringVar(&cfg.DashboardDir, "dir", getEnv("DASHBOARD_DIR", "tools/setup-gcp/dashboards"), "Directory containing dashboard JSON files [env: DASHBOARD_DIR]") -} diff --git a/tools/setup-gcp/cmd/enable.go b/tools/setup-gcp/cmd/enable.go deleted file mode 100644 index a910aa77ae..0000000000 --- a/tools/setup-gcp/cmd/enable.go +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package cmd - -import ( - "github.com/spf13/cobra" -) - -var enableCmd = &cobra.Command{ - Use: "enable", - Short: "Enable GCP resources", - RunE: func(cmd *cobra.Command, args []string) error { - return cmd.Help() - }, -} - -var enableApisCmd = &cobra.Command{ - Use: "apis", - Short: "Enable required GCP APIs", - RunE: func(cmd *cobra.Command, args []string) error { - ctx := cmd.Context() - if err := resolveProjectID(ctx, &cfg); err != nil { - return err - } - return enableRequiredAPIs(ctx, &cfg) - }, -} - -func init() { - rootCmd.AddCommand(enableCmd) - enableCmd.AddCommand(enableApisCmd) -} diff --git a/tools/setup-gcp/cmd/iam.go b/tools/setup-gcp/cmd/iam.go deleted file mode 100644 index ccae453f67..0000000000 --- a/tools/setup-gcp/cmd/iam.go +++ /dev/null @@ -1,196 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package cmd - -import ( - "context" - "errors" - "fmt" - "log/slog" - "slices" - - "cloud.google.com/go/iam/apiv1/iampb" - resourcemanager "cloud.google.com/go/resourcemanager/apiv3" - "github.com/spf13/cobra" -) - -func addProjectIamBinding(policy *iampb.Policy, role, member string) bool { - for _, b := range policy.Bindings { - // Skip if the policy has any conditions. - if b.Condition != nil { - continue - } - if b.Role == role { - if slices.Contains(b.Members, member) { - return false // Member already has this role - } - b.Members = append(b.Members, member) - return true - } - } - // Role not found, add a new binding - policy.Bindings = append(policy.Bindings, &iampb.Binding{ - Role: role, - Members: []string{member}, - }) - return true -} - -func grantGkeNodePermissions(ctx context.Context, cfg *Config) error { - client, err := resourcemanager.NewProjectsClient(ctx) - if err != nil { - return err - } - defer client.Close() - - resource := fmt.Sprintf("projects/%s", cfg.ProjectID) - req := &iampb.GetIamPolicyRequest{ - Resource: resource, - } - - policy, err := client.GetIamPolicy(ctx, req) - if err != nil { - return fmt.Errorf("get project iam policy: %w", err) - } - - // TODO(#76): Use a least-privileged node service account instead. - member := fmt.Sprintf("serviceAccount:%s-compute@developer.gserviceaccount.com", cfg.ProjectNumber) - - // TODO: Don't grant these permissions at project level. - changed := addProjectIamBinding(policy, "roles/artifactregistry.reader", member) - - if !changed { - slog.Info("IAM policy already has required GKE node permissions. Skipping update.", slog.String("project", cfg.ProjectID)) - return nil - } - - slog.Info("Setting IAM policy (grant gke node permissions)...", slog.String("project", cfg.ProjectID)) - setReq := &iampb.SetIamPolicyRequest{ - Resource: resource, - Policy: policy, - } - _, err = client.SetIamPolicy(ctx, setReq) - if err != nil { - return fmt.Errorf("set project iam policy: %w", err) - } - - return nil -} -func grantAteletPermissions(ctx context.Context, cfg *Config) error { - client, err := resourcemanager.NewProjectsClient(ctx) - if err != nil { - return err - } - defer client.Close() - - resource := fmt.Sprintf("projects/%s", cfg.ProjectID) - req := &iampb.GetIamPolicyRequest{ - Resource: resource, - } - - policy, err := client.GetIamPolicy(ctx, req) - if err != nil { - return fmt.Errorf("get project iam policy: %w", err) - } - - member := fmt.Sprintf("principal://iam.googleapis.com/projects/%s/locations/global/workloadIdentityPools/%s.svc.id.goog/subject/ns/ate-system/sa/atelet", cfg.ProjectNumber, cfg.ProjectID) - - // atelet gets no storage role here, see bucketGrants. - // TODO: grant artifactregistry.reader on the repository in use only. - changed := addProjectIamBinding(policy, "roles/artifactregistry.reader", member) - - if !changed { - slog.Info("IAM policy already has required GKE node permissions. Skipping update.", slog.String("project", cfg.ProjectID)) - return nil - } - - slog.Info("Setting IAM policy (grant api server permissions)...", slog.String("project", cfg.ProjectID)) - setReq := &iampb.SetIamPolicyRequest{ - Resource: resource, - Policy: policy, - } - _, err = client.SetIamPolicy(ctx, setReq) - if err != nil { - return fmt.Errorf("set project iam policy: %w", err) - } - - return nil -} - -// validateIamFlags checks every flag the command needs before any of the -// grants run. Each grant is a separate SetIamPolicy call, so a flag validated -// partway through the sequence reports a usage error only after the earlier -// grants have already been written to the project. -func validateIamFlags(ctx context.Context, cfg *Config, bucketBindings bool) error { - if err := resolveProject(ctx, cfg); err != nil { - return err - } - if bucketBindings && cfg.BucketName == "" { - return errors.New("--bucket is required for bucket bindings") - } - if bucketBindings { - return checkAssetBucketName(cfg) - } - return nil -} - -var iamCmd = &cobra.Command{ - Use: "iam", - Short: "Create IAM bindings", - RunE: func(cmd *cobra.Command, args []string) error { - gkeNodes, _ := cmd.Flags().GetBool("gke-nodes") - atelet, _ := cmd.Flags().GetBool("atelet") - transferAccount, _ := cmd.Flags().GetBool("transfer-service-account") - bucketBindings, _ := cmd.Flags().GetBool("bucket-bindings") - - if err := validateIamFlags(cmd.Context(), &cfg, bucketBindings); err != nil { - return err - } - - if gkeNodes { - if err := grantGkeNodePermissions(cmd.Context(), &cfg); err != nil { - return err - } - } - if atelet { - if err := grantAteletPermissions(cmd.Context(), &cfg); err != nil { - return err - } - } - // Before the bucket bindings, which grant the account: IAM refuses a - // binding for an account that does not exist. - if transferAccount { - if err := setupTransferServiceAccount(cmd.Context(), &cfg, workloadIdentityPrincipal(&cfg, "ate-api-server")); err != nil { - return err - } - } - if bucketBindings { - if err := createIamPolicyBindings(cmd.Context(), &cfg); err != nil { - return err - } - } - return nil - }, -} - -func init() { - createCmd.AddCommand(iamCmd) - iamCmd.Flags().StringVar(&cfg.BucketName, "bucket", getEnv("BUCKET_NAME", ""), "GCS bucket name (required for bucket bindings) [env: BUCKET_NAME]") - iamCmd.Flags().Bool("gke-nodes", true, "Grant GKE nodes permission to pull images") - iamCmd.Flags().Bool("atelet", true, "Grant atelet project-level permissions") - addTransferGSANameFlag(iamCmd) - iamCmd.Flags().Bool("transfer-service-account", true, "Create the snapshot transfer service account and let ate-api-server create tokens for it") - iamCmd.Flags().Bool("bucket-bindings", true, "Grant ate-api-server and the snapshot transfer service account access to the snapshot bucket, and atelet read access to the asset bucket") -} diff --git a/tools/setup-gcp/cmd/iam_test.go b/tools/setup-gcp/cmd/iam_test.go deleted file mode 100644 index a0eb769f44..0000000000 --- a/tools/setup-gcp/cmd/iam_test.go +++ /dev/null @@ -1,110 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package cmd - -import ( - "context" - "strings" - "testing" - - "cloud.google.com/go/resourcemanager/apiv3/resourcemanagerpb" -) - -func TestValidateIamFlags(t *testing.T) { - origGetProject := getProjectFn - defer func() { getProjectFn = origGetProject }() - - getProjectFn = func(ctx context.Context, name string) (*resourcemanagerpb.Project, error) { - return &resourcemanagerpb.Project{ - Name: "projects/123", - ProjectId: "test-project", - }, nil - } - - tooLong := strings.Repeat("b", 57) - tooLongErr := `bucket name "` + tooLong + `" is too long: the asset bucket "` + tooLong + `-assets" would have 64 characters, and GCS allows 63` - - tests := []struct { - name string - cfg Config - bucketBindings bool - want string - }{ - { - name: "missing project id", - cfg: Config{}, - bucketBindings: true, - want: "--project-id is required", - }, - { - name: "missing project id when only project number provided", - cfg: Config{ProjectNumber: "123"}, - bucketBindings: true, - want: "--project-id is required", - }, - { - name: "only project id provided, bucket missing", - cfg: Config{ProjectID: "test-project"}, - bucketBindings: true, - want: "--bucket is required for bucket bindings", - }, - { - name: "missing bucket while bucket bindings are requested", - cfg: Config{ProjectID: "test-project", ProjectNumber: "123"}, - bucketBindings: true, - want: "--bucket is required for bucket bindings", - }, - { - name: "bucket name too long for the asset bucket", - cfg: Config{ProjectID: "test-project", BucketName: tooLong}, - bucketBindings: true, - want: tooLongErr, - }, - { - name: "bucket not required when bucket bindings are disabled", - cfg: Config{ProjectID: "test-project", ProjectNumber: "123"}, - bucketBindings: false, - }, - { - name: "all required flags present with both id and number", - cfg: Config{ProjectID: "test-project", ProjectNumber: "123", BucketName: "test-bucket"}, - bucketBindings: true, - }, - { - name: "all required flags present with only project id", - cfg: Config{ProjectID: "test-project", BucketName: "test-bucket"}, - bucketBindings: true, - }, - } - - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - cfgCopy := tt.cfg - err := validateIamFlags(t.Context(), &cfgCopy, tt.bucketBindings) - if tt.want == "" { - if err != nil { - t.Fatalf("validateIamFlags() = %v; want nil", err) - } - return - } - if err == nil { - t.Fatalf("validateIamFlags() = nil; want %q", tt.want) - } - if err.Error() != tt.want { - t.Errorf("validateIamFlags() = %q; want %q", err.Error(), tt.want) - } - }) - } -} diff --git a/tools/setup-gcp/cmd/project.go b/tools/setup-gcp/cmd/project.go deleted file mode 100644 index 72276f5081..0000000000 --- a/tools/setup-gcp/cmd/project.go +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// 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. - -package cmd - -import ( - "context" - "errors" - "fmt" - "log/slog" - "strings" - - resourcemanager "cloud.google.com/go/resourcemanager/apiv3" - "cloud.google.com/go/resourcemanager/apiv3/resourcemanagerpb" -) - -// getProjectFn fetches a GCP project by resource name (e.g. "projects/" or "projects/"). -// Swappable in tests. -var getProjectFn = func(ctx context.Context, name string) (*resourcemanagerpb.Project, error) { - client, err := resourcemanager.NewProjectsClient(ctx) - if err != nil { - return nil, fmt.Errorf("create resourcemanager client: %w", err) - } - defer client.Close() - return client.GetProject(ctx, &resourcemanagerpb.GetProjectRequest{Name: name}) -} - -// resolveProjectID ensures ProjectID is provided on cfg. -func resolveProjectID(ctx context.Context, cfg *Config) error { - cfg.ProjectID = strings.TrimPrefix(cfg.ProjectID, "projects/") - cfg.ProjectNumber = strings.TrimPrefix(cfg.ProjectNumber, "projects/") - - if cfg.ProjectID == "" { - return errors.New("--project-id is required") - } - return nil -} - -// resolveProject ensures both ProjectID and ProjectNumber are populated on cfg. -// ProjectID is required. If ProjectNumber is missing, it is resolved using the -// Google Cloud Resource Manager API. -func resolveProject(ctx context.Context, cfg *Config) error { - if err := resolveProjectID(ctx, cfg); err != nil { - return err - } - - if cfg.ProjectNumber != "" { - return nil - } - - name := fmt.Sprintf("projects/%s", cfg.ProjectID) - project, err := getProjectFn(ctx, name) - if err != nil { - return fmt.Errorf("resolve project info for %s: %w", name, err) - } - - cfg.ProjectNumber = strings.TrimPrefix(project.GetName(), "projects/") - slog.Info("Resolved GCP project number", slog.String("project_id", cfg.ProjectID), slog.String("project_number", cfg.ProjectNumber)) - return nil -} diff --git a/tools/setup-gcp/cmd/project_test.go b/tools/setup-gcp/cmd/project_test.go deleted file mode 100644 index f6d45d64f2..0000000000 --- a/tools/setup-gcp/cmd/project_test.go +++ /dev/null @@ -1,246 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package cmd - -import ( - "context" - "errors" - "strings" - "testing" - - "cloud.google.com/go/resourcemanager/apiv3/resourcemanagerpb" -) - -func TestResolveProject(t *testing.T) { - origGetProject := getProjectFn - defer func() { getProjectFn = origGetProject }() - - tests := []struct { - name string - cfg Config - mockProject *resourcemanagerpb.Project - mockErr error - wantProjectID string - wantProjectNr string - wantErr string - wantCalled bool - wantName string - }{ - { - name: "missing project ID", - cfg: Config{}, - wantErr: "--project-id is required", - }, - { - name: "only project number provided", - cfg: Config{ - ProjectNumber: "987654", - }, - wantErr: "--project-id is required", - }, - { - name: "both provided", - cfg: Config{ - ProjectID: "my-proj", - ProjectNumber: "123456", - }, - wantProjectID: "my-proj", - wantProjectNr: "123456", - wantCalled: false, - }, - { - name: "only project ID provided resolves project number", - cfg: Config{ - ProjectID: "my-proj", - }, - mockProject: &resourcemanagerpb.Project{ - Name: "projects/987654", - ProjectId: "my-proj", - }, - wantProjectID: "my-proj", - wantProjectNr: "987654", - wantCalled: true, - wantName: "projects/my-proj", - }, - { - name: "projects prefix trimmed", - cfg: Config{ - ProjectID: "projects/my-proj", - }, - mockProject: &resourcemanagerpb.Project{ - Name: "projects/987654", - ProjectId: "my-proj", - }, - wantProjectID: "my-proj", - wantProjectNr: "987654", - wantCalled: true, - wantName: "projects/my-proj", - }, - { - name: "resolution API error", - cfg: Config{ - ProjectID: "nonexistent-proj", - }, - mockErr: errors.New("project not found"), - wantErr: "resolve project info for projects/nonexistent-proj: project not found", - wantCalled: true, - wantName: "projects/nonexistent-proj", - }, - } - - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - called := false - var calledName string - getProjectFn = func(ctx context.Context, name string) (*resourcemanagerpb.Project, error) { - called = true - calledName = name - if tt.mockErr != nil { - return nil, tt.mockErr - } - return tt.mockProject, nil - } - - cfgCopy := tt.cfg - err := resolveProject(t.Context(), &cfgCopy) - - if tt.wantErr != "" { - if err == nil { - t.Fatalf("expected error containing %q, got nil", tt.wantErr) - } - if !strings.Contains(err.Error(), tt.wantErr) { - t.Errorf("got error %q, want containing %q", err.Error(), tt.wantErr) - } - return - } - - if err != nil { - t.Fatalf("unexpected error: %v", err) - } - if called != tt.wantCalled { - t.Errorf("getProjectFn called = %v; want %v", called, tt.wantCalled) - } - if tt.wantCalled && calledName != tt.wantName { - t.Errorf("getProjectFn called with name = %q; want %q", calledName, tt.wantName) - } - if cfgCopy.ProjectID != tt.wantProjectID { - t.Errorf("cfg.ProjectID = %q; want %q", cfgCopy.ProjectID, tt.wantProjectID) - } - if cfgCopy.ProjectNumber != tt.wantProjectNr { - t.Errorf("cfg.ProjectNumber = %q; want %q", cfgCopy.ProjectNumber, tt.wantProjectNr) - } - }) - } -} - -func TestResolveProjectID(t *testing.T) { - origGetProject := getProjectFn - defer func() { getProjectFn = origGetProject }() - - tests := []struct { - name string - cfg Config - mockProject *resourcemanagerpb.Project - mockErr error - wantProjectID string - wantProjectNr string - wantErr string - wantCalled bool - wantName string - }{ - { - name: "missing project ID", - cfg: Config{}, - wantErr: "--project-id is required", - }, - { - name: "only project number provided", - cfg: Config{ - ProjectNumber: "987654", - }, - wantErr: "--project-id is required", - }, - { - name: "both provided", - cfg: Config{ - ProjectID: "my-proj", - ProjectNumber: "123456", - }, - wantProjectID: "my-proj", - wantProjectNr: "123456", - wantCalled: false, - }, - { - name: "only project ID provided skips API call", - cfg: Config{ - ProjectID: "my-proj", - }, - wantProjectID: "my-proj", - wantCalled: false, - }, - { - name: "projects prefix trimmed with only project ID", - cfg: Config{ - ProjectID: "projects/my-proj", - }, - wantProjectID: "my-proj", - wantCalled: false, - }, - } - - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - called := false - var calledName string - getProjectFn = func(ctx context.Context, name string) (*resourcemanagerpb.Project, error) { - called = true - calledName = name - if tt.mockErr != nil { - return nil, tt.mockErr - } - return tt.mockProject, nil - } - - cfgCopy := tt.cfg - err := resolveProjectID(t.Context(), &cfgCopy) - - if tt.wantErr != "" { - if err == nil { - t.Fatalf("expected error containing %q, got nil", tt.wantErr) - } - if !strings.Contains(err.Error(), tt.wantErr) { - t.Errorf("got error %q, want containing %q", err.Error(), tt.wantErr) - } - return - } - - if err != nil { - t.Fatalf("unexpected error: %v", err) - } - if called != tt.wantCalled { - t.Errorf("getProjectFn called = %v; want %v", called, tt.wantCalled) - } - if tt.wantCalled && calledName != tt.wantName { - t.Errorf("getProjectFn called with name = %q; want %q", calledName, tt.wantName) - } - if cfgCopy.ProjectID != tt.wantProjectID { - t.Errorf("cfg.ProjectID = %q; want %q", cfgCopy.ProjectID, tt.wantProjectID) - } - if cfgCopy.ProjectNumber != tt.wantProjectNr { - t.Errorf("cfg.ProjectNumber = %q; want %q", cfgCopy.ProjectNumber, tt.wantProjectNr) - } - }) - } -} diff --git a/tools/setup-gcp/cmd/root.go b/tools/setup-gcp/cmd/root.go deleted file mode 100644 index 6325c488da..0000000000 --- a/tools/setup-gcp/cmd/root.go +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package cmd - -import ( - "github.com/spf13/cobra" -) - -var cfg Config - -var rootCmd = &cobra.Command{ - Use: "setup-gcp", - Short: "Setup GCP resources for Agent Substrate", - Long: `A tool to provision and configure GCP resources required for Agent Substrate.`, - RunE: func(cmd *cobra.Command, args []string) error { - return cmd.Help() - }, -} - -func Execute() error { - return rootCmd.Execute() -} - -func init() { - rootCmd.PersistentFlags().StringVar(&cfg.ProjectID, "project-id", getEnv("PROJECT_ID", ""), "GCP Project ID [env: PROJECT_ID]") - rootCmd.PersistentFlags().StringVar(&cfg.ProjectNumber, "project-number", getEnv("PROJECT_NUMBER", ""), "GCP Project Number (optional, resolved from --project-id if needed) [env: PROJECT_NUMBER]") - rootCmd.PersistentFlags().StringVar(&cfg.Region, "region", getEnv("GCE_REGION", "us-west1"), "GCP Region [env: GCE_REGION]") -} diff --git a/tools/setup-gcp/cmd/transferaccount.go b/tools/setup-gcp/cmd/transferaccount.go deleted file mode 100644 index 2c1128c29e..0000000000 --- a/tools/setup-gcp/cmd/transferaccount.go +++ /dev/null @@ -1,132 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package cmd - -import ( - "context" - "fmt" - "log/slog" - "slices" - "time" - - "github.com/spf13/cobra" - iam "google.golang.org/api/iam/v1" - - "go.ate.dev/substrate/internal/installdefaults" -) - -// tokenCreatorRole lets a member create tokens for a service account, which -// ate-api-server's credential exchange does for the transfer account. -const tokenCreatorRole = "roles/iam.serviceAccountTokenCreator" - -// addTransferGSANameFlag registers the transfer account's name on cmd, read -// from the variable ate-setup also reads. -func addTransferGSANameFlag(cmd *cobra.Command) { - cmd.Flags().StringVar(&cfg.TransferGSAName, "transfer-gsa-name", getEnv("SNAPSHOT_TRANSFER_GSA_NAME", installdefaults.TransferServiceAccountName), - "Name of the snapshot transfer service account to create [env: SNAPSHOT_TRANSFER_GSA_NAME]") -} - -func transferGSAEmail(cfg *Config) string { - return fmt.Sprintf("%s@%s.iam.gserviceaccount.com", cfg.TransferGSAName, cfg.ProjectID) -} - -// transferServiceAccountMember is the transfer account as an IAM member. -func transferServiceAccountMember(cfg *Config) string { - return "serviceAccount:" + transferGSAEmail(cfg) -} - -// setupTransferServiceAccount creates the snapshot transfer service account -// unless it exists, and lets each of members create tokens for it. -func setupTransferServiceAccount(ctx context.Context, cfg *Config, members ...string) error { - svc, err := iam.NewService(ctx) - if err != nil { - return fmt.Errorf("create iam client: %w", err) - } - email := transferGSAEmail(cfg) - resource := fmt.Sprintf("projects/%s/serviceAccounts/%s", cfg.ProjectID, email) - _, err = svc.Projects.ServiceAccounts.Get(resource).Context(ctx).Do() - switch { - case err == nil: - slog.Info("Service account exists. Skipping create.", slog.String("gsa", email)) - case isNotFound(err): - slog.Info("Creating service account...", slog.String("gsa", email)) - _, err = svc.Projects.ServiceAccounts.Create("projects/"+cfg.ProjectID, &iam.CreateServiceAccountRequest{ - AccountId: cfg.TransferGSAName, - ServiceAccount: &iam.ServiceAccount{DisplayName: "Substrate snapshot transfers"}, - }).Context(ctx).Do() - if err != nil { - return fmt.Errorf("create service account %s: %w", email, err) - } - default: - return fmt.Errorf("get service account %s: %w", email, err) - } - - // A service account created moments earlier, this one or a member, can - // take a while to propagate, and granting too soon fails with "does not - // exist". Re-read the policy each attempt so etag conflicts also resolve, - // as grantCloudSQLProjectRoles does. - for attempt := 1; ; attempt++ { - err := grantTokenCreator(ctx, svc, resource, email, members) - if err == nil { - return nil - } - if attempt >= 6 { - return err - } - slog.Warn("Granting token creator failed, retrying...", slog.String("gsa", email), slog.Int("attempt", attempt), slog.Any("err", err)) - select { - case <-ctx.Done(): - return ctx.Err() - case <-time.After(10 * time.Second): - } - } -} - -// grantTokenCreator grants members token creator on the service account. -func grantTokenCreator(ctx context.Context, svc *iam.Service, resource, email string, members []string) error { - policy, err := svc.Projects.ServiceAccounts.GetIamPolicy(resource).Context(ctx).Do() - if err != nil { - return fmt.Errorf("get service account %s iam policy: %w", email, err) - } - changed := false - for _, member := range members { - if addServiceAccountBinding(policy, tokenCreatorRole, member) { - slog.Info("Granting token creator on service account", slog.String("gsa", email), slog.String("member", member)) - changed = true - } - } - if !changed { - slog.Info("Service account IAM policy is already correct", slog.String("gsa", email)) - return nil - } - return setGSAPolicy(ctx, svc, resource, policy) -} - -// addServiceAccountBinding adds member to role in policy, and reports whether -// it added anything. -func addServiceAccountBinding(policy *iam.Policy, role, member string) bool { - for _, b := range policy.Bindings { - if b.Role != role || b.Condition != nil { - continue - } - if slices.Contains(b.Members, member) { - return false - } - b.Members = append(b.Members, member) - return true - } - policy.Bindings = append(policy.Bindings, &iam.Binding{Role: role, Members: []string{member}}) - return true -} diff --git a/tools/setup-gcp/cmd/transferaccount_test.go b/tools/setup-gcp/cmd/transferaccount_test.go deleted file mode 100644 index 3f72d468fe..0000000000 --- a/tools/setup-gcp/cmd/transferaccount_test.go +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package cmd - -import ( - "slices" - "testing" - - iam "google.golang.org/api/iam/v1" -) - -func TestAddServiceAccountBinding(t *testing.T) { - const member = "principal://iam.googleapis.com/projects/123/locations/global/workloadIdentityPools/proj.svc.id.goog/subject/ns/ate-system/sa/ate-api-server" - for _, tc := range []struct { - name string - bindings []*iam.Binding - wantChanged bool - wantMembers []string - }{ - {name: "no binding yet", wantChanged: true, wantMembers: []string{member}}, - {name: "joins the role's binding", bindings: []*iam.Binding{{Role: tokenCreatorRole, Members: []string{"user:a@example.com"}}}, - wantChanged: true, wantMembers: []string{"user:a@example.com", member}}, - {name: "already a member", bindings: []*iam.Binding{{Role: tokenCreatorRole, Members: []string{member}}}, - wantMembers: []string{member}}, - {name: "a conditional binding does not count", bindings: []*iam.Binding{{Role: tokenCreatorRole, Members: []string{member}, Condition: &iam.Expr{Expression: "false"}}}, - wantChanged: true, wantMembers: []string{member}}, - } { - t.Run(tc.name, func(t *testing.T) { - policy := &iam.Policy{Bindings: tc.bindings} - if got := addServiceAccountBinding(policy, tokenCreatorRole, member); got != tc.wantChanged { - t.Errorf("changed = %v, want %v", got, tc.wantChanged) - } - var got []string - for _, b := range policy.Bindings { - if b.Role == tokenCreatorRole && b.Condition == nil { - got = append(got, b.Members...) - } - } - if !slices.Equal(got, tc.wantMembers) { - t.Errorf("unconditional token creator members = %v, want %v", got, tc.wantMembers) - } - }) - } -} - -func TestTransferServiceAccountMember(t *testing.T) { - cfg := &Config{ProjectID: "proj", TransferGSAName: "xfer"} - if got, want := transferServiceAccountMember(cfg), "serviceAccount:xfer@proj.iam.gserviceaccount.com"; got != want { - t.Errorf("member = %q, want %q", got, want) - } -} diff --git a/tools/setup-gcp/dashboards/README.md b/tools/setup-gcp/dashboards/README.md deleted file mode 100644 index 7a6b59c0d3..0000000000 --- a/tools/setup-gcp/dashboards/README.md +++ /dev/null @@ -1,25 +0,0 @@ -# Cloud Monitoring dashboards - -Google Cloud Monitoring dashboard definitions for ATE. They turn the raw -`prometheus.googleapis.com/...` metrics that ATE emits into readable -per-method / per-stage latency / throughput / error views. - -| File | Shows | -|------|-------| -| `ate-grpc-dashboard.json` | ateapi & atelet gRPC latency (p50/p95/p99), request rate, and error rate, by method | -| `ate-e2e-latency-dashboard.json` | "Substrate Routing & E2E Latency". Substrate routing P50/P95/P99, routing P99 by stage (routing / ateapi ResumeActor / atelet Restore), routing P99 by ActorTemplate, routing QPS by status, plus the E2E full round-trip from Envoy (ms — includes actor compute + response, so it's context, not our overhead): P99 and QPS by response class. Needs the `atenet-router-envoy` PodMonitoring for the round-trip lines. | -| `ate-snapshot-dashboard.json` | Substrate snapshot image size and throughput ("Substrate Snapshot Size & QPS"): snapshot (`pages`) image size P99 by ActorTemplate, P50/P95/P99 by image kind, and snapshot QPS. Checkpoint/Restore *latency* is not here — it's the atelet gRPC `Checkpoint`/`Restore` methods in `ate-grpc-dashboard.json`. | - -## Applying - -Dashboards are created/updated (idempotently) by setup: - -```sh -go run ./tools/setup-gcp create dashboards # also part of: bootstrap -``` - -Or apply any single file by hand: - -```sh -gcloud monitoring dashboards create --config-from-file=tools/setup-gcp/dashboards/.json -``` diff --git a/tools/setup-gcp/dashboards/ate-e2e-latency-dashboard.json b/tools/setup-gcp/dashboards/ate-e2e-latency-dashboard.json deleted file mode 100644 index 4aba20dc1b..0000000000 --- a/tools/setup-gcp/dashboards/ate-e2e-latency-dashboard.json +++ /dev/null @@ -1,216 +0,0 @@ -{ - "displayName": "Substrate Routing & E2E Latency", - "mosaicLayout": { - "columns": 12, - "tiles": [ - { - "xPos": 0, - "yPos": 0, - "width": 6, - "height": 4, - "widget": { - "title": "Substrate routing latency — P50/P95/P99", - "xyChart": { - "dataSets": [ - { - "timeSeriesQuery": { - "prometheusQuery": "histogram_quantile(0.50, sum by (le) (rate({\"atenet.router.route.duration_bucket\", top_level_controller_name=\"atenet-router\"}[5m])))", - "unitOverride": "s" - }, - "plotType": "LINE", - "targetAxis": "Y1", - "legendTemplate": "P50" - }, - { - "timeSeriesQuery": { - "prometheusQuery": "histogram_quantile(0.95, sum by (le) (rate({\"atenet.router.route.duration_bucket\", top_level_controller_name=\"atenet-router\"}[5m])))", - "unitOverride": "s" - }, - "plotType": "LINE", - "targetAxis": "Y1", - "legendTemplate": "P95" - }, - { - "timeSeriesQuery": { - "prometheusQuery": "histogram_quantile(0.99, sum by (le) (rate({\"atenet.router.route.duration_bucket\", top_level_controller_name=\"atenet-router\"}[5m])))", - "unitOverride": "s" - }, - "plotType": "LINE", - "targetAxis": "Y1", - "legendTemplate": "P99" - } - ], - "yAxis": { - "label": "seconds", - "scale": "LINEAR" - } - } - } - }, - { - "xPos": 6, - "yPos": 0, - "width": 6, - "height": 4, - "widget": { - "title": "Substrate routing latency P99 - by stages", - "xyChart": { - "dataSets": [ - { - "timeSeriesQuery": { - "prometheusQuery": "histogram_quantile(0.99, sum by (le) (rate({\"atenet.router.route.duration_bucket\", top_level_controller_name=\"atenet-router\"}[5m])))", - "unitOverride": "s" - }, - "plotType": "LINE", - "targetAxis": "Y1", - "legendTemplate": "substrate routing P99" - }, - { - "timeSeriesQuery": { - "prometheusQuery": "histogram_quantile(0.99, sum by (le) (rate({\"rpc.server.call.duration_bucket\", top_level_controller_name=\"ate-api-server\", \"rpc.method\"=\"substrate.ateapi.v1.Control/ResumeActor\"}[5m])))", - "unitOverride": "s" - }, - "plotType": "LINE", - "targetAxis": "Y1", - "legendTemplate": "ateapi ResumeActor P99" - }, - { - "timeSeriesQuery": { - "prometheusQuery": "histogram_quantile(0.99, sum by (le) (rate({\"rpc.server.call.duration_bucket\", top_level_controller_name=\"atelet\", \"rpc.method\"=\"atelet.Atelet/Restore\"}[5m])))", - "unitOverride": "s" - }, - "plotType": "LINE", - "targetAxis": "Y1", - "legendTemplate": "atelet Restore P99" - } - ], - "yAxis": { - "label": "seconds", - "scale": "LINEAR" - } - } - } - }, - { - "xPos": 0, - "yPos": 4, - "width": 6, - "height": 4, - "widget": { - "title": "Substrate routing latency P99 — by ActorTemplate", - "xyChart": { - "dataSets": [ - { - "timeSeriesQuery": { - "prometheusQuery": "histogram_quantile(0.99, sum by (le, \"ate.template.name\") (rate({\"atenet.router.route.duration_bucket\", top_level_controller_name=\"atenet-router\", \"ate.router.outcome\"=\"ok\"}[5m])))", - "unitOverride": "s" - }, - "plotType": "LINE", - "targetAxis": "Y1" - } - ], - "yAxis": { - "label": "seconds", - "scale": "LINEAR" - } - } - } - }, - { - "xPos": 6, - "yPos": 4, - "width": 6, - "height": 4, - "widget": { - "title": "Substrate routing QPS - by Status", - "xyChart": { - "dataSets": [ - { - "timeSeriesQuery": { - "prometheusQuery": "sum by (\"ate.router.outcome\") (rate({\"atenet.router.route.duration_count\", top_level_controller_name=\"atenet-router\"}[5m]))", - "unitOverride": "1/s" - }, - "plotType": "LINE", - "targetAxis": "Y1" - } - ], - "yAxis": { - "label": "requests/s", - "scale": "LINEAR" - } - } - } - }, - { - "xPos": 0, - "yPos": 8, - "width": 6, - "height": 4, - "widget": { - "title": "Substrate E2E (full round-trip) Latency — P50/P95/P99", - "xyChart": { - "dataSets": [ - { - "timeSeriesQuery": { - "prometheusQuery": "histogram_quantile(0.50, sum by (le) (rate(envoy_http_downstream_rq_time_bucket{envoy_http_conn_manager_prefix=~\"ingress_.*\"}[5m])))", - "unitOverride": "ms" - }, - "plotType": "LINE", - "targetAxis": "Y1", - "legendTemplate": "P50 (all ingress)" - }, - { - "timeSeriesQuery": { - "prometheusQuery": "histogram_quantile(0.95, sum by (le) (rate(envoy_http_downstream_rq_time_bucket{envoy_http_conn_manager_prefix=~\"ingress_.*\"}[5m])))", - "unitOverride": "ms" - }, - "plotType": "LINE", - "targetAxis": "Y1", - "legendTemplate": "P95 (all ingress)" - }, - { - "timeSeriesQuery": { - "prometheusQuery": "histogram_quantile(0.99, sum by (le) (rate(envoy_http_downstream_rq_time_bucket{envoy_http_conn_manager_prefix=~\"ingress_.*\"}[5m])))", - "unitOverride": "ms" - }, - "plotType": "LINE", - "targetAxis": "Y1", - "legendTemplate": "P99 (all ingress)" - } - ], - "yAxis": { - "label": "milliseconds", - "scale": "LINEAR" - } - } - } - }, - { - "xPos": 6, - "yPos": 8, - "width": 6, - "height": 4, - "widget": { - "title": "Substrate E2E (full round-trip) QPS — by Response Code", - "xyChart": { - "dataSets": [ - { - "timeSeriesQuery": { - "prometheusQuery": "sum by (envoy_response_code_class) (rate(envoy_http_downstream_rq_xx{envoy_http_conn_manager_prefix=~\"ingress_.*\"}[5m]))", - "unitOverride": "1/s" - }, - "plotType": "LINE", - "targetAxis": "Y1", - "legendTemplate": "${metric.labels.envoy_response_code_class}xx" - } - ], - "yAxis": { - "label": "requests/s", - "scale": "LINEAR" - } - } - } - } - ] - } -} diff --git a/tools/setup-gcp/dashboards/ate-grpc-dashboard.json b/tools/setup-gcp/dashboards/ate-grpc-dashboard.json deleted file mode 100644 index a8099fd56b..0000000000 --- a/tools/setup-gcp/dashboards/ate-grpc-dashboard.json +++ /dev/null @@ -1,158 +0,0 @@ -{ - "displayName": "Substrate gRPC Server — latency / QPS / errors", - "mosaicLayout": { - "columns": 12, - "tiles": [ - { - "xPos": 0, - "yPos": 0, - "width": 6, - "height": 4, - "widget": { - "title": "ateapi — gRPC p99 latency by method", - "xyChart": { - "dataSets": [ - { - "timeSeriesQuery": { - "prometheusQuery": "histogram_quantile(0.99, sum by (le, \"rpc.method\") (rate({\"rpc.server.call.duration_bucket\", top_level_controller_name=\"ate-api-server\"}[5m])))", - "unitOverride": "s" - }, - "plotType": "LINE", - "targetAxis": "Y1" - } - ], - "yAxis": { - "label": "seconds", - "scale": "LINEAR" - } - } - } - }, - { - "xPos": 0, - "yPos": 4, - "width": 6, - "height": 4, - "widget": { - "title": "ateapi — gRPC request rate by method (req/s)", - "xyChart": { - "dataSets": [ - { - "timeSeriesQuery": { - "prometheusQuery": "sum by (\"rpc.method\") (rate({\"rpc.server.call.duration_count\", top_level_controller_name=\"ate-api-server\"}[5m]))", - "unitOverride": "1/s" - }, - "plotType": "LINE", - "targetAxis": "Y1" - } - ], - "yAxis": { - "label": "requests/s", - "scale": "LINEAR" - } - } - } - }, - { - "xPos": 0, - "yPos": 8, - "width": 6, - "height": 4, - "widget": { - "title": "ateapi — gRPC errors by status code (req/s, non-OK)", - "xyChart": { - "dataSets": [ - { - "timeSeriesQuery": { - "prometheusQuery": "sum by (\"rpc.response.status_code\") (rate({\"rpc.server.call.duration_count\", top_level_controller_name=\"ate-api-server\", \"rpc.response.status_code\"!=\"OK\"}[5m]))", - "unitOverride": "1/s" - }, - "plotType": "LINE", - "targetAxis": "Y1" - } - ], - "yAxis": { - "label": "errors/s", - "scale": "LINEAR" - } - } - } - }, - { - "xPos": 6, - "yPos": 0, - "width": 6, - "height": 4, - "widget": { - "title": "atelet — gRPC p99 latency by method", - "xyChart": { - "dataSets": [ - { - "timeSeriesQuery": { - "prometheusQuery": "histogram_quantile(0.99, sum by (le, \"rpc.method\") (rate({\"rpc.server.call.duration_bucket\", top_level_controller_name=\"atelet\"}[5m])))", - "unitOverride": "s" - }, - "plotType": "LINE", - "targetAxis": "Y1" - } - ], - "yAxis": { - "label": "seconds", - "scale": "LINEAR" - } - } - } - }, - { - "xPos": 6, - "yPos": 4, - "width": 6, - "height": 4, - "widget": { - "title": "atelet — gRPC request rate by method (req/s)", - "xyChart": { - "dataSets": [ - { - "timeSeriesQuery": { - "prometheusQuery": "sum by (\"rpc.method\") (rate({\"rpc.server.call.duration_count\", top_level_controller_name=\"atelet\"}[5m]))", - "unitOverride": "1/s" - }, - "plotType": "LINE", - "targetAxis": "Y1" - } - ], - "yAxis": { - "label": "requests/s", - "scale": "LINEAR" - } - } - } - }, - { - "xPos": 6, - "yPos": 8, - "width": 6, - "height": 4, - "widget": { - "title": "atelet — gRPC errors by status code (req/s, non-OK)", - "xyChart": { - "dataSets": [ - { - "timeSeriesQuery": { - "prometheusQuery": "sum by (\"rpc.response.status_code\") (rate({\"rpc.server.call.duration_count\", top_level_controller_name=\"atelet\", \"rpc.response.status_code\"!=\"OK\"}[5m]))", - "unitOverride": "1/s" - }, - "plotType": "LINE", - "targetAxis": "Y1" - } - ], - "yAxis": { - "label": "errors/s", - "scale": "LINEAR" - } - } - } - } - ] - } -} diff --git a/tools/setup-gcp/dashboards/ate-snapshot-dashboard.json b/tools/setup-gcp/dashboards/ate-snapshot-dashboard.json deleted file mode 100644 index 022647487e..0000000000 --- a/tools/setup-gcp/dashboards/ate-snapshot-dashboard.json +++ /dev/null @@ -1,136 +0,0 @@ -{ - "displayName": "Substrate Snapshot Size & QPS", - "mosaicLayout": { - "columns": 12, - "tiles": [ - { - "xPos": 0, - "yPos": 0, - "width": 6, - "height": 4, - "widget": { - "title": "Substrate — snapshot image size P99 by ActorTemplate", - "xyChart": { - "dataSets": [ - { - "timeSeriesQuery": { - "prometheusQuery": "histogram_quantile(0.99, sum by (le, \"ate.template.name\") (rate({\"atelet.snapshot.size_bucket\", top_level_controller_name=\"atelet\", \"file.name\"=\"pages.img\"}[1h])))", - "unitOverride": "By" - }, - "plotType": "LINE", - "targetAxis": "Y1" - } - ], - "yAxis": { - "label": "bytes", - "scale": "LINEAR" - } - } - } - }, - { - "xPos": 6, - "yPos": 0, - "width": 6, - "height": 4, - "widget": { - "title": "Substrate — snapshot image size P50/P95/P99", - "xyChart": { - "dataSets": [ - { - "timeSeriesQuery": { - "prometheusQuery": "histogram_quantile(0.50, sum by (le) (rate({\"atelet.snapshot.size_bucket\", top_level_controller_name=\"atelet\"}[1h])))", - "unitOverride": "By" - }, - "plotType": "LINE", - "targetAxis": "Y1", - "legendTemplate": "P50" - }, - { - "timeSeriesQuery": { - "prometheusQuery": "histogram_quantile(0.95, sum by (le) (rate({\"atelet.snapshot.size_bucket\", top_level_controller_name=\"atelet\"}[1h])))", - "unitOverride": "By" - }, - "plotType": "LINE", - "targetAxis": "Y1", - "legendTemplate": "P95" - }, - { - "timeSeriesQuery": { - "prometheusQuery": "histogram_quantile(0.99, sum by (le) (rate({\"atelet.snapshot.size_bucket\", top_level_controller_name=\"atelet\"}[1h])))", - "unitOverride": "By" - }, - "plotType": "LINE", - "targetAxis": "Y1", - "legendTemplate": "P99" - } - ], - "yAxis": { - "label": "bytes", - "scale": "LINEAR" - } - } - } - }, - { - "xPos": 0, - "yPos": 4, - "width": 12, - "height": 4, - "widget": { - "title": "Substrate — Snapshot QPS", - "xyChart": { - "dataSets": [ - { - "timeSeriesQuery": { - "prometheusQuery": "sum by (\"ate.template.name\") (rate({\"atelet.snapshot.size_count\", top_level_controller_name=\"atelet\", \"file.name\"=\"pages.img\"}[1h]))", - "unitOverride": "1/s" - }, - "plotType": "LINE", - "targetAxis": "Y1" - } - ], - "yAxis": { - "label": "snapshots/s", - "scale": "LINEAR" - } - } - } - }, - { - "xPos": 0, - "yPos": 8, - "width": 12, - "height": 4, - "widget": { - "title": "Substrate — snapshot (pages) size distribution (heatmap)", - "xyChart": { - "dataSets": [ - { - "timeSeriesQuery": { - "timeSeriesFilter": { - "filter": "metric.type=\"prometheus.googleapis.com/atelet.snapshot.size/histogram\" resource.type=\"prometheus_target\" metric.labels.\"file.name\"=\"pages.img\"", - "aggregation": { - "alignmentPeriod": "60s", - "perSeriesAligner": "ALIGN_DELTA", - "crossSeriesReducer": "REDUCE_SUM" - } - } - }, - "plotType": "HEATMAP", - "targetAxis": "Y1" - } - ], - "yAxis": { - "label": "bytes", - "scale": "LINEAR" - }, - "chartOptions": { - "mode": "COLOR" - } - } - } - } - ] - } -} diff --git a/tools/setup-gcp/main.go b/tools/setup-gcp/main.go deleted file mode 100644 index 4aa5b679d0..0000000000 --- a/tools/setup-gcp/main.go +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package main - -import ( - "fmt" - "os" - - "go.ate.dev/substrate/tools/setup-gcp/cmd" -) - -func main() { - if err := cmd.Execute(); err != nil { - fmt.Fprintln(os.Stderr, err) - os.Exit(1) - } -} diff --git a/vendor/cloud.google.com/go/.gitignore b/vendor/cloud.google.com/go/.gitignore deleted file mode 100644 index cc7e53b46c..0000000000 --- a/vendor/cloud.google.com/go/.gitignore +++ /dev/null @@ -1,12 +0,0 @@ -# Editors -.idea -.vscode -*.swp -.history - -# Test files -*.test -coverage.txt - -# Other -.DS_Store diff --git a/vendor/cloud.google.com/go/.release-please-manifest-individual.json b/vendor/cloud.google.com/go/.release-please-manifest-individual.json deleted file mode 100644 index 158fe0caa8..0000000000 --- a/vendor/cloud.google.com/go/.release-please-manifest-individual.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "auth": "0.16.5", - "auth/oauth2adapt": "0.2.8", - "bigquery": "1.70.0", - "bigtable": "1.39.0", - "datastore": "1.20.0", - "errorreporting": "0.3.2", - "firestore": "1.18.0", - "logging": "1.13.0", - "profiler": "0.4.3", - "pubsub": "1.50.1", - "pubsub/v2": "2.0.1", - "pubsublite": "1.8.2", - "spanner": "1.85.1", - "storage": "1.56.1", - "vertexai": "0.15.0" -} diff --git a/vendor/cloud.google.com/go/.release-please-manifest-submodules.json b/vendor/cloud.google.com/go/.release-please-manifest-submodules.json deleted file mode 100644 index a194f47513..0000000000 --- a/vendor/cloud.google.com/go/.release-please-manifest-submodules.json +++ /dev/null @@ -1,166 +0,0 @@ -{ - "accessapproval": "1.8.7", - "accesscontextmanager": "1.9.6", - "advisorynotifications": "1.5.6", - "ai": "0.13.0", - "aiplatform": "1.102.0", - "alloydb": "1.18.0", - "analytics": "0.30.0", - "apigateway": "1.7.7", - "apigeeconnect": "1.7.7", - "apigeeregistry": "0.9.6", - "apihub": "0.2.0", - "apikeys": "1.2.7", - "appengine": "1.9.7", - "apphub": "0.3.1", - "apps": "0.8.0", - "area120": "0.9.7", - "artifactregistry": "1.17.1", - "asset": "1.21.1", - "assuredworkloads": "1.12.6", - "automl": "1.14.7", - "backupdr": "1.4.0", - "baremetalsolution": "1.3.6", - "batch": "1.12.2", - "beyondcorp": "1.1.6", - "billing": "1.20.4", - "binaryauthorization": "1.9.5", - "capacityplanner": "0.1.0", - "certificatemanager": "1.9.5", - "channel": "1.20.0", - "chat": "0.15.1", - "chronicle": "0.1.1", - "cloudbuild": "1.23.0", - "cloudcontrolspartner": "1.4.0", - "clouddms": "1.8.8", - "cloudprofiler": "0.4.5", - "cloudquotas": "1.4.0", - "cloudtasks": "1.13.6", - "commerce": "1.2.6", - "compute": "1.47.0", - "compute/metadata": "0.8.4", - "confidentialcomputing": "1.10.1", - "config": "1.5.1", - "configdelivery": "0.1.1", - "contactcenterinsights": "1.17.4", - "container": "1.44.0", - "containeranalysis": "0.14.1", - "datacatalog": "1.26.1", - "dataflow": "0.11.0", - "dataform": "0.12.1", - "datafusion": "1.8.7", - "datalabeling": "0.9.7", - "dataplex": "1.27.1", - "dataproc": "2.14.1", - "dataqna": "0.9.7", - "datastream": "1.15.1", - "deploy": "1.27.3", - "developerconnect": "0.4.1", - "devicestreaming": "0.1.1", - "dialogflow": "1.69.1", - "discoveryengine": "1.21.1", - "documentai": "1.38.1", - "domains": "0.10.7", - "edgecontainer": "1.4.4", - "edgenetwork": "1.2.7", - "essentialcontacts": "1.7.7", - "eventarc": "1.16.1", - "filestore": "1.10.3", - "financialservices": "0.1.4", - "functions": "1.19.7", - "geminidataanalytics": "0.2.1", - "gkebackup": "1.8.1", - "gkeconnect": "0.12.5", - "gkehub": "0.16.0", - "gkemulticloud": "1.5.4", - "grafeas": "0.3.16", - "gsuiteaddons": "1.7.8", - "iam": "1.5.2", - "iap": "1.11.3", - "identitytoolkit": "0.2.6", - "ids": "1.5.7", - "iot": "1.8.7", - "kms": "1.23.0", - "language": "1.14.5", - "licensemanager": "0.1.1", - "lifesciences": "0.10.7", - "locationfinder": "0.1.1", - "longrunning": "0.6.7", - "lustre": "0.2.1", - "maintenance": "0.1.2", - "managedidentities": "1.7.7", - "managedkafka": "0.8.1", - "maps": "1.23.0", - "mediatranslation": "0.9.7", - "memcache": "1.11.7", - "memorystore": "0.3.1", - "metastore": "1.14.8", - "migrationcenter": "1.1.6", - "modelarmor": "0.6.1", - "monitoring": "1.24.2", - "netapp": "1.10.1", - "networkconnectivity": "1.19.1", - "networkmanagement": "1.20.1", - "networksecurity": "0.10.7", - "networkservices": "0.5.1", - "notebooks": "1.12.7", - "optimization": "1.7.7", - "oracledatabase": "0.5.1", - "orchestration": "1.11.10", - "orgpolicy": "1.15.1", - "osconfig": "1.15.1", - "oslogin": "1.14.7", - "parallelstore": "0.11.4", - "parametermanager": "0.3.1", - "phishingprotection": "0.9.7", - "policysimulator": "0.4.1", - "policytroubleshooter": "1.11.7", - "privatecatalog": "0.10.8", - "privilegedaccessmanager": "0.3.1", - "rapidmigrationassessment": "1.1.7", - "recaptchaenterprise": "2.20.4", - "recommendationengine": "0.9.6", - "recommender": "1.13.5", - "redis": "1.18.2", - "resourcemanager": "1.10.6", - "retail": "1.25.0", - "run": "1.12.0", - "scheduler": "1.11.7", - "secretmanager": "1.15.0", - "securesourcemanager": "1.4.0", - "security": "1.19.1", - "securitycenter": "1.38.0", - "securitycentermanagement": "1.1.5", - "securityposture": "0.2.5", - "servicecontrol": "1.14.5", - "servicedirectory": "1.12.6", - "servicehealth": "1.2.3", - "servicemanagement": "1.10.6", - "serviceusage": "1.9.6", - "shell": "1.8.6", - "shopping": "1.1.0", - "spanner/benchmarks": "0.1.0", - "speech": "1.28.0", - "storagebatchoperations": "0.1.0", - "storageinsights": "1.2.0", - "storagetransfer": "1.13.0", - "streetview": "0.2.5", - "support": "1.4.0", - "talent": "1.8.3", - "telcoautomation": "1.1.5", - "texttospeech": "1.14.0", - "tpu": "1.8.3", - "trace": "1.11.6", - "translate": "1.12.6", - "video": "1.27.0", - "videointelligence": "1.12.6", - "vision": "2.9.5", - "visionai": "0.4.5", - "vmmigration": "1.9.0", - "vmwareengine": "1.3.5", - "vpcaccess": "1.8.6", - "webrisk": "1.11.1", - "websecurityscanner": "1.7.6", - "workflows": "1.14.2", - "workstations": "1.1.5" -} diff --git a/vendor/cloud.google.com/go/.release-please-manifest.json b/vendor/cloud.google.com/go/.release-please-manifest.json deleted file mode 100644 index 768a5b8e61..0000000000 --- a/vendor/cloud.google.com/go/.release-please-manifest.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - ".": "0.123.0" -} diff --git a/vendor/cloud.google.com/go/CHANGES.md b/vendor/cloud.google.com/go/CHANGES.md deleted file mode 100644 index a63b40267f..0000000000 --- a/vendor/cloud.google.com/go/CHANGES.md +++ /dev/null @@ -1,2808 +0,0 @@ -# Changes - - - -## [0.123.0](https://github.com/googleapis/google-cloud-go/compare/v0.122.0...v0.123.0) (2025-09-18) - - -### Features - -* **internal/stategen:** Populate the latest googleapis commit ([#12880](https://github.com/googleapis/google-cloud-go/issues/12880)) ([7b017a0](https://github.com/googleapis/google-cloud-go/commit/7b017a083ddd322b21faf413a329ba870a98db96)) -* **librariangen:** Implement the build command ([#12817](https://github.com/googleapis/google-cloud-go/issues/12817)) ([14734c8](https://github.com/googleapis/google-cloud-go/commit/14734c875103f97748857b9b0472fd0b2658663f)) - - -### Bug Fixes - -* **internal/librariangen:** Add link to source commit in release notes ([#12881](https://github.com/googleapis/google-cloud-go/issues/12881)) ([1c06cc6](https://github.com/googleapis/google-cloud-go/commit/1c06cc6109a84941c367896575b187b79befc3af)) -* **internal/librariangen:** Fix CHANGES.md headers ([#12849](https://github.com/googleapis/google-cloud-go/issues/12849)) ([baf515d](https://github.com/googleapis/google-cloud-go/commit/baf515dfe0d94f36c9dc232f6b55e9828b268eb0)) -* **internal/librariangen:** Remove go mod init/tidy from postprocessor ([#12832](https://github.com/googleapis/google-cloud-go/issues/12832)) ([1fe506a](https://github.com/googleapis/google-cloud-go/commit/1fe506a37e68497b6da4587d409b79e7b4d2a113)) -* **internal/librariangen:** Test for error path with flags ([#12830](https://github.com/googleapis/google-cloud-go/issues/12830)) ([f0da7b2](https://github.com/googleapis/google-cloud-go/commit/f0da7b22488b4d9f6232d227d3e196d8d2b92858)) -* **internal/postprocessor:** Add dlp to skip-module-scan-paths ([#12857](https://github.com/googleapis/google-cloud-go/issues/12857)) ([45a7d9b](https://github.com/googleapis/google-cloud-go/commit/45a7d9b4b9083d1bcaca89c3d86878ba77c230e3)) -* **librariangen:** Honor original container contract ([#12846](https://github.com/googleapis/google-cloud-go/issues/12846)) ([71c8fd3](https://github.com/googleapis/google-cloud-go/commit/71c8fd368667f74426aa31b6c50def8151482480)) -* **librariangen:** Improvements to release-init ([#12842](https://github.com/googleapis/google-cloud-go/issues/12842)) ([0db677a](https://github.com/googleapis/google-cloud-go/commit/0db677a93fe16b9a62bb69a3cea7bc45d5aaec36)) -* **stategen:** Specify an appropriate tag format for google-cloud-go ([#12835](https://github.com/googleapis/google-cloud-go/issues/12835)) ([ffcff33](https://github.com/googleapis/google-cloud-go/commit/ffcff33a0c3fad720a31083672c4cf2498af719f)) - -## [0.122.0](https://github.com/googleapis/google-cloud-go/compare/v0.121.6...v0.122.0) (2025-09-04) - - -### Features - -* **internal/librariangen:** Add release-init command ([#12751](https://github.com/googleapis/google-cloud-go/issues/12751)) ([52e84cc](https://github.com/googleapis/google-cloud-go/commit/52e84cc9a11077eb3c50a0b5fc9aa26361d63b47)) - - -### Bug Fixes - -* **internal/godocfx:** Better support for v2 modules ([#12797](https://github.com/googleapis/google-cloud-go/issues/12797)) ([4bc8785](https://github.com/googleapis/google-cloud-go/commit/4bc878597a5e6bd97cf3ee2174f6df7fbdd2d47b)) -* **internal/godocfx:** Module detection when tidy errors ([#12801](https://github.com/googleapis/google-cloud-go/issues/12801)) ([83d46cd](https://github.com/googleapis/google-cloud-go/commit/83d46cdc5ed7cfbb94038e7fa1f787adfe532c74)) -* **internal/librariangen:** Fix goimports errors ([#12765](https://github.com/googleapis/google-cloud-go/issues/12765)) ([83bdaa4](https://github.com/googleapis/google-cloud-go/commit/83bdaa4ce4e42f8b4a29e2055fc4894d8c6b1e2c)) - -## [0.121.6](https://github.com/googleapis/google-cloud-go/compare/v0.121.5...v0.121.6) (2025-08-14) - - -### Bug Fixes - -* **internal/librariangen:** Fix Dockerfile permissions for go mod tidy ([#12704](https://github.com/googleapis/google-cloud-go/issues/12704)) ([0e70a0b](https://github.com/googleapis/google-cloud-go/commit/0e70a0b6afccc016c67337f340e2755fe7a476ca)) - -## [0.121.5](https://github.com/googleapis/google-cloud-go/compare/v0.121.4...v0.121.5) (2025-08-12) - - -### Bug Fixes - -* **internal/librariangen:** Get README title from service config yaml ([#12676](https://github.com/googleapis/google-cloud-go/issues/12676)) ([b3b8f70](https://github.com/googleapis/google-cloud-go/commit/b3b8f70a15ae477885f3ecc92e01ae37b7505de3)) -* **internal/librariangen:** Update source_paths to source_roots in generate-request.json ([#12691](https://github.com/googleapis/google-cloud-go/issues/12691)) ([2adb6f9](https://github.com/googleapis/google-cloud-go/commit/2adb6f9a67f21fba32371fb4b3dcfb7204309560)) - -## [0.121.4](https://github.com/googleapis/google-cloud-go/compare/v0.121.3...v0.121.4) (2025-07-17) - - -### Bug Fixes - -* **geminidataanalytics:** Correct resource reference type for `parent` field in `data_chat_service.proto` ([98ba6f0](https://github.com/googleapis/google-cloud-go/commit/98ba6f06e69685bca510ca85c12124434f9ba1e8)) -* **internal/postprocessor:** Add git ([#12524](https://github.com/googleapis/google-cloud-go/issues/12524)) ([82030ee](https://github.com/googleapis/google-cloud-go/commit/82030eec5d66f25ebc3fee1fda4b45ced370fc2b)) - -## [0.121.3](https://github.com/googleapis/google-cloud-go/compare/v0.121.2...v0.121.3) (2025-06-25) - - -### Documentation - -* **impersonate:** Address TODO in impersonate/example_test.go ([#12401](https://github.com/googleapis/google-cloud-go/issues/12401)) ([dd096ec](https://github.com/googleapis/google-cloud-go/commit/dd096ec81944e785b9245fda7e7b46e9908cfe8f)) - -## [0.121.2](https://github.com/googleapis/google-cloud-go/compare/v0.121.1...v0.121.2) (2025-05-21) - - -### Documentation - -* **internal/generated:** Remove outdated pubsub snippets ([#12284](https://github.com/googleapis/google-cloud-go/issues/12284)) ([0338a40](https://github.com/googleapis/google-cloud-go/commit/0338a40d70206317d319e69911be0321fbb54e3f)) - -## [0.121.1](https://github.com/googleapis/google-cloud-go/compare/v0.121.0...v0.121.1) (2025-05-13) - - -### Bug Fixes - -* **civil:** Add support for civil.Date, civil.Time and civil.DateTime arguments to their respective Scan methods ([#12240](https://github.com/googleapis/google-cloud-go/issues/12240)) ([7127ce9](https://github.com/googleapis/google-cloud-go/commit/7127ce9992f890667f2c8f75c924136b0e94f115)), refs [#12060](https://github.com/googleapis/google-cloud-go/issues/12060) - -## [0.121.0](https://github.com/googleapis/google-cloud-go/compare/v0.120.1...v0.121.0) (2025-04-28) - - -### Features - -* **debugger:** Remove debugger/apiv2 client ([#12050](https://github.com/googleapis/google-cloud-go/issues/12050)) ([af8641e](https://github.com/googleapis/google-cloud-go/commit/af8641e7d011349afa774b668b30a95b007fd076)) - -## [0.120.1](https://github.com/googleapis/google-cloud-go/compare/v0.120.0...v0.120.1) (2025-04-14) - - -### Bug Fixes - -* **readme:** Update authentication section ([#11918](https://github.com/googleapis/google-cloud-go/issues/11918)) ([2fda860](https://github.com/googleapis/google-cloud-go/commit/2fda86031820ad7d29322f03ad6f34871ad5ff59)) - -## [0.120.0](https://github.com/googleapis/google-cloud-go/compare/v0.119.0...v0.120.0) (2025-03-20) - - -### Features - -* **civil:** Implement database/sql.Scanner|Valuer ([#1145](https://github.com/googleapis/google-cloud-go/issues/1145)) ([#11808](https://github.com/googleapis/google-cloud-go/issues/11808)) ([cbe4419](https://github.com/googleapis/google-cloud-go/commit/cbe4419c17f677c05f3f52c2080861adce705db4)) - - -### Bug Fixes - -* **third_party/pkgsite:** Increase comment size limit ([#11877](https://github.com/googleapis/google-cloud-go/issues/11877)) ([587b5cc](https://github.com/googleapis/google-cloud-go/commit/587b5ccc684ad99cb9eeba897304b7143564d423)) - -## [0.119.0](https://github.com/googleapis/google-cloud-go/compare/v0.118.3...v0.119.0) (2025-03-11) - - -### Features - -* **main:** Add support for listening on custom host to internal/testutil ([#11780](https://github.com/googleapis/google-cloud-go/issues/11780)) ([9608a09](https://github.com/googleapis/google-cloud-go/commit/9608a09a5d41778c7bb93792b5d5128d7081d4a6)), refs [#11586](https://github.com/googleapis/google-cloud-go/issues/11586) - -## [0.118.3](https://github.com/googleapis/google-cloud-go/compare/v0.118.2...v0.118.3) (2025-02-20) - - -### Bug Fixes - -* **main:** Bump github.com/envoyproxy/go-control-plane/envoy to v1.32.4 ([#11591](https://github.com/googleapis/google-cloud-go/issues/11591)) ([d52451a](https://github.com/googleapis/google-cloud-go/commit/d52451aa22fb7120e37b43161d3d3103c19e5943)) - -## [0.118.2](https://github.com/googleapis/google-cloud-go/compare/v0.118.1...v0.118.2) (2025-02-06) - - -### Bug Fixes - -* **internal/godocfx:** Don't save timestamps until modules are successfully processed ([#11563](https://github.com/googleapis/google-cloud-go/issues/11563)) ([8f38b3d](https://github.com/googleapis/google-cloud-go/commit/8f38b3d912354027c30977b5adc928e0c6eff7a9)) -* **internal/godocfx:** Retry go get with explicit envoy dependency ([#11564](https://github.com/googleapis/google-cloud-go/issues/11564)) ([a06a6a5](https://github.com/googleapis/google-cloud-go/commit/a06a6a5542939b6239e1ec2c944eb1aae56745d9)) - -## [0.118.1](https://github.com/googleapis/google-cloud-go/compare/v0.118.0...v0.118.1) (2025-01-30) - - -### Bug Fixes - -* **main:** Remove OpenCensus dependency ([6243d91](https://github.com/googleapis/google-cloud-go/commit/6243d910b2bb502211d8308f9cc7723829d9f844)) - -## [0.118.0](https://github.com/googleapis/google-cloud-go/compare/v0.117.0...v0.118.0) (2025-01-02) - - -### Features - -* **civil:** Add AddMonths, AddYears and Weekday methods to Date ([#11340](https://github.com/googleapis/google-cloud-go/issues/11340)) ([d45f1a0](https://github.com/googleapis/google-cloud-go/commit/d45f1a01ebff868418aa14fe762ef7d1334f797d)) - -## [0.117.0](https://github.com/googleapis/google-cloud-go/compare/v0.116.0...v0.117.0) (2024-12-16) - - -### Features - -* **internal/trace:** Remove previously deprecated OpenCensus support ([#11230](https://github.com/googleapis/google-cloud-go/issues/11230)) ([40cf125](https://github.com/googleapis/google-cloud-go/commit/40cf1251c9d73be435585ce204a63588446c72b1)), refs [#10287](https://github.com/googleapis/google-cloud-go/issues/10287) -* **transport:** Remove deprecated EXPERIMENTAL OpenCensus trace context propagation ([#11239](https://github.com/googleapis/google-cloud-go/issues/11239)) ([0d1ac87](https://github.com/googleapis/google-cloud-go/commit/0d1ac87174ed8526ea47d71a80e641ffbd687a6c)), refs [#10287](https://github.com/googleapis/google-cloud-go/issues/10287) [#11230](https://github.com/googleapis/google-cloud-go/issues/11230) - -## [0.116.0](https://github.com/googleapis/google-cloud-go/compare/v0.115.1...v0.116.0) (2024-10-09) - - -### Features - -* **genai:** Add tokenizer package ([#10699](https://github.com/googleapis/google-cloud-go/issues/10699)) ([214af16](https://github.com/googleapis/google-cloud-go/commit/214af1604bf3837f68e96dbf81c1331b90c9375f)) - -## [0.115.1](https://github.com/googleapis/google-cloud-go/compare/v0.115.0...v0.115.1) (2024-08-13) - - -### Bug Fixes - -* **cloud.google.com/go:** Bump google.golang.org/grpc@v1.64.1 ([8ecc4e9](https://github.com/googleapis/google-cloud-go/commit/8ecc4e9622e5bbe9b90384d5848ab816027226c5)) - -## [0.115.0](https://github.com/googleapis/google-cloud-go/compare/v0.114.0...v0.115.0) (2024-06-12) - - -### Features - -* **internal/trace:** Deprecate OpenCensus support ([#10287](https://github.com/googleapis/google-cloud-go/issues/10287)) ([430ce8a](https://github.com/googleapis/google-cloud-go/commit/430ce8adea2d0be43461e2ca783b7c17794e983f)), refs [#2205](https://github.com/googleapis/google-cloud-go/issues/2205) [#8655](https://github.com/googleapis/google-cloud-go/issues/8655) - - -### Bug Fixes - -* **internal/postprocessor:** Use approved image tag ([#10341](https://github.com/googleapis/google-cloud-go/issues/10341)) ([a388fe5](https://github.com/googleapis/google-cloud-go/commit/a388fe5cf075d0af986861c70dcb7b9f97c31019)) - -## [0.114.0](https://github.com/googleapis/google-cloud-go/compare/v0.113.0...v0.114.0) (2024-05-23) - - -### Features - -* **civil:** Add Compare method to Date, Time, and DateTime ([#10193](https://github.com/googleapis/google-cloud-go/issues/10193)) ([c2920d7](https://github.com/googleapis/google-cloud-go/commit/c2920d7c9007a11d9232c628fba5496197deeba4)) - - -### Bug Fixes - -* **internal/postprocessor:** Add scopes to all appropriate commit lines ([#10192](https://github.com/googleapis/google-cloud-go/issues/10192)) ([c21399b](https://github.com/googleapis/google-cloud-go/commit/c21399bdc362c6c646c2c0f8c2c55903898e0eab)) - -## [0.113.0](https://github.com/googleapis/google-cloud-go/compare/v0.112.2...v0.113.0) (2024-05-08) - - -### Features - -* **civil:** Add Compare method to Date, Time, and DateTime ([#10010](https://github.com/googleapis/google-cloud-go/issues/10010)) ([34455c1](https://github.com/googleapis/google-cloud-go/commit/34455c15d62b089f3281ff4c663245e72b257f37)) - - -### Bug Fixes - -* **all:** Bump x/net to v0.24.0 ([#10000](https://github.com/googleapis/google-cloud-go/issues/10000)) ([ba31ed5](https://github.com/googleapis/google-cloud-go/commit/ba31ed5fda2c9664f2e1cf972469295e63deb5b4)) -* **debugger:** Add internaloption.WithDefaultEndpointTemplate ([3b41408](https://github.com/googleapis/google-cloud-go/commit/3b414084450a5764a0248756e95e13383a645f90)) -* **internal/aliasfix:** Handle import paths correctly ([#10097](https://github.com/googleapis/google-cloud-go/issues/10097)) ([fafaf0d](https://github.com/googleapis/google-cloud-go/commit/fafaf0d0a293096559a4655ea61062cb896f1568)) -* **rpcreplay:** Properly unmarshal dynamic message ([#9774](https://github.com/googleapis/google-cloud-go/issues/9774)) ([53ccb20](https://github.com/googleapis/google-cloud-go/commit/53ccb20d925ccb00f861958d9658b55738097dc6)), refs [#9773](https://github.com/googleapis/google-cloud-go/issues/9773) - - -### Documentation - -* **testing:** Switch deprecated WithInsecure to WithTransportCredentials ([#10091](https://github.com/googleapis/google-cloud-go/issues/10091)) ([2b576ab](https://github.com/googleapis/google-cloud-go/commit/2b576abd1c3bfca2f962de0e024524f72d3652c0)) - -## [0.112.2](https://github.com/googleapis/google-cloud-go/compare/v0.112.1...v0.112.2) (2024-03-27) - - -### Bug Fixes - -* **all:** Release protobuf dep bump ([#9586](https://github.com/googleapis/google-cloud-go/issues/9586)) ([30b038d](https://github.com/googleapis/google-cloud-go/commit/30b038d8cac0b8cd5dd4761c87f3f298760dd33a)) - -## [0.112.1](https://github.com/googleapis/google-cloud-go/compare/v0.112.0...v0.112.1) (2024-02-26) - - -### Bug Fixes - -* **internal/postprocessor:** Handle googleapis link in commit body ([#9251](https://github.com/googleapis/google-cloud-go/issues/9251)) ([1dd3515](https://github.com/googleapis/google-cloud-go/commit/1dd35157bff871a2b3e5b0e3cac33502737fd631)) - - -### Documentation - -* **main:** Add OpenTelemetry-Go compatibility warning to debug.md ([#9268](https://github.com/googleapis/google-cloud-go/issues/9268)) ([18f9bb9](https://github.com/googleapis/google-cloud-go/commit/18f9bb94fbc239255a873b29462fc7c2eac3c0aa)), refs [#9267](https://github.com/googleapis/google-cloud-go/issues/9267) - -## [0.112.0](https://github.com/googleapis/google-cloud-go/compare/v0.111.0...v0.112.0) (2024-01-11) - - -### Features - -* **internal/trace:** Export internal/trace package constants and vars ([#9242](https://github.com/googleapis/google-cloud-go/issues/9242)) ([941c16f](https://github.com/googleapis/google-cloud-go/commit/941c16f3a2602e9bdc737b139060a7dd8318f9dd)) - - -### Documentation - -* **main:** Add telemetry discussion to debug.md ([#9074](https://github.com/googleapis/google-cloud-go/issues/9074)) ([90ed12e](https://github.com/googleapis/google-cloud-go/commit/90ed12e1dffe722b42f58556f0e17b808da9714d)), refs [#8655](https://github.com/googleapis/google-cloud-go/issues/8655) - -## [0.111.0](https://github.com/googleapis/google-cloud-go/compare/v0.110.10...v0.111.0) (2023-11-29) - - -### Features - -* **internal/trace:** Add OpenTelemetry support ([#8655](https://github.com/googleapis/google-cloud-go/issues/8655)) ([7a46b54](https://github.com/googleapis/google-cloud-go/commit/7a46b5428f239871993d66be2c7c667121f60a6f)), refs [#2205](https://github.com/googleapis/google-cloud-go/issues/2205) - - -### Bug Fixes - -* **all:** Bump google.golang.org/api to v0.149.0 ([#8959](https://github.com/googleapis/google-cloud-go/issues/8959)) ([8d2ab9f](https://github.com/googleapis/google-cloud-go/commit/8d2ab9f320a86c1c0fab90513fc05861561d0880)) - -## [0.110.10](https://github.com/googleapis/google-cloud-go/compare/v0.110.9...v0.110.10) (2023-10-31) - - -### Bug Fixes - -* **all:** Update grpc-go to v1.56.3 ([#8916](https://github.com/googleapis/google-cloud-go/issues/8916)) ([343cea8](https://github.com/googleapis/google-cloud-go/commit/343cea8c43b1e31ae21ad50ad31d3b0b60143f8c)) -* **all:** Update grpc-go to v1.59.0 ([#8922](https://github.com/googleapis/google-cloud-go/issues/8922)) ([81a97b0](https://github.com/googleapis/google-cloud-go/commit/81a97b06cb28b25432e4ece595c55a9857e960b7)) -* **internal/godocfx:** Fix links to other packages in summary ([#8756](https://github.com/googleapis/google-cloud-go/issues/8756)) ([6220a9a](https://github.com/googleapis/google-cloud-go/commit/6220a9afeb89df3080e9e663e97648939fd4e15f)) - -## [0.110.9](https://github.com/googleapis/google-cloud-go/compare/v0.110.8...v0.110.9) (2023-10-19) - - -### Bug Fixes - -* **all:** Update golang.org/x/net to v0.17.0 ([#8705](https://github.com/googleapis/google-cloud-go/issues/8705)) ([174da47](https://github.com/googleapis/google-cloud-go/commit/174da47254fefb12921bbfc65b7829a453af6f5d)) -* **internal/aliasgen:** Update golang.org/x/net to v0.17.0 ([174da47](https://github.com/googleapis/google-cloud-go/commit/174da47254fefb12921bbfc65b7829a453af6f5d)) -* **internal/examples/fake:** Update golang.org/x/net to v0.17.0 ([174da47](https://github.com/googleapis/google-cloud-go/commit/174da47254fefb12921bbfc65b7829a453af6f5d)) -* **internal/gapicgen:** Update golang.org/x/net to v0.17.0 ([174da47](https://github.com/googleapis/google-cloud-go/commit/174da47254fefb12921bbfc65b7829a453af6f5d)) -* **internal/generated/snippets:** Update golang.org/x/net to v0.17.0 ([174da47](https://github.com/googleapis/google-cloud-go/commit/174da47254fefb12921bbfc65b7829a453af6f5d)) -* **internal/godocfx:** Update golang.org/x/net to v0.17.0 ([174da47](https://github.com/googleapis/google-cloud-go/commit/174da47254fefb12921bbfc65b7829a453af6f5d)) -* **internal/postprocessor:** Add ability to override release level ([#8643](https://github.com/googleapis/google-cloud-go/issues/8643)) ([26c608a](https://github.com/googleapis/google-cloud-go/commit/26c608a8204d740767dfebf6aa473cdf1873e5f0)) -* **internal/postprocessor:** Add missing assignment ([#8646](https://github.com/googleapis/google-cloud-go/issues/8646)) ([d8c5746](https://github.com/googleapis/google-cloud-go/commit/d8c5746e6dde1bd34c01a9886804f861c88c0cb7)) -* **internal/postprocessor:** Update golang.org/x/net to v0.17.0 ([174da47](https://github.com/googleapis/google-cloud-go/commit/174da47254fefb12921bbfc65b7829a453af6f5d)) - -## [0.110.8](https://github.com/googleapis/google-cloud-go/compare/v0.110.7...v0.110.8) (2023-09-11) - - -### Documentation - -* **postprocessor:** Nudge users towards stable clients ([#8513](https://github.com/googleapis/google-cloud-go/issues/8513)) ([05a1484](https://github.com/googleapis/google-cloud-go/commit/05a1484b0752aaa3d6a164d37686d6de070cc78d)) - -## [0.110.7](https://github.com/googleapis/google-cloud-go/compare/v0.110.6...v0.110.7) (2023-07-31) - - -### Bug Fixes - -* **main:** Add more docs to base package ([c401ab4](https://github.com/googleapis/google-cloud-go/commit/c401ab4a576c64ab2b8840a90f7ccd5d031cea57)) - -## [0.110.6](https://github.com/googleapis/google-cloud-go/compare/v0.110.5...v0.110.6) (2023-07-13) - - -### Bug Fixes - -* **httpreplay:** Ignore GCS header by default ([#8260](https://github.com/googleapis/google-cloud-go/issues/8260)) ([b961a1a](https://github.com/googleapis/google-cloud-go/commit/b961a1abe7aeafe420c88eed38035fed0bbf7bbe)), refs [#8233](https://github.com/googleapis/google-cloud-go/issues/8233) - -## [0.110.5](https://github.com/googleapis/google-cloud-go/compare/v0.110.4...v0.110.5) (2023-07-07) - - -### Bug Fixes - -* **logadmin:** Use consistent filter in paging example ([#8221](https://github.com/googleapis/google-cloud-go/issues/8221)) ([9570159](https://github.com/googleapis/google-cloud-go/commit/95701597b1d709543ea22a4b6ff9b28b14a2d4fc)) - -## [0.110.4](https://github.com/googleapis/google-cloud-go/compare/v0.110.3...v0.110.4) (2023-07-05) - - -### Bug Fixes - -* **internal/retry:** Simplify gRPC status code mapping of retry error ([#8196](https://github.com/googleapis/google-cloud-go/issues/8196)) ([e8b224a](https://github.com/googleapis/google-cloud-go/commit/e8b224a3bcb0ca9430990ef6ae8ddb7b60f5225d)) - -## [0.110.3](https://github.com/googleapis/google-cloud-go/compare/v0.110.2...v0.110.3) (2023-06-23) - - -### Bug Fixes - -* **internal/retry:** Never return nil from GRPCStatus() ([#8128](https://github.com/googleapis/google-cloud-go/issues/8128)) ([005d2df](https://github.com/googleapis/google-cloud-go/commit/005d2dfb6b68bf5a35bfb8db449d3f0084b34d6e)) - - -### Documentation - -* **v1:** Minor clarifications for TaskGroup and min_cpu_platform ([3382ef8](https://github.com/googleapis/google-cloud-go/commit/3382ef81b6bcefe1c7bfc14aa5ff9bbf25850966)) - -## [0.110.2](https://github.com/googleapis/google-cloud-go/compare/v0.110.1...v0.110.2) (2023-05-08) - - -### Bug Fixes - -* **deps:** Update grpc to v1.55.0 ([#7885](https://github.com/googleapis/google-cloud-go/issues/7885)) ([9fc48a9](https://github.com/googleapis/google-cloud-go/commit/9fc48a921428c94c725ea90415d55ff0c177dd81)) - -## [0.110.1](https://github.com/googleapis/google-cloud-go/compare/v0.110.0...v0.110.1) (2023-05-03) - - -### Bug Fixes - -* **httpreplay:** Add ignore-header flag, fix tests ([#7865](https://github.com/googleapis/google-cloud-go/issues/7865)) ([1829706](https://github.com/googleapis/google-cloud-go/commit/1829706c5ade36cc786b2e6780fda5e7302f965b)) - -## [0.110.0](https://github.com/googleapis/google-cloud-go/compare/v0.109.0...v0.110.0) (2023-02-15) - - -### Features - -* **internal/postprocessor:** Detect and initialize new modules ([#7288](https://github.com/googleapis/google-cloud-go/issues/7288)) ([59ce02c](https://github.com/googleapis/google-cloud-go/commit/59ce02c13f265741a8f1f0f7ad5109bf83e3df82)) -* **internal/postprocessor:** Only regen snippets for changed modules ([#7300](https://github.com/googleapis/google-cloud-go/issues/7300)) ([220f8a5](https://github.com/googleapis/google-cloud-go/commit/220f8a5ad2fd64b75c5a1af531b1ab4597cf17d7)) - - -### Bug Fixes - -* **internal/postprocessor:** Add scopes without OwlBot api-name feature ([#7404](https://github.com/googleapis/google-cloud-go/issues/7404)) ([f7fe4f6](https://github.com/googleapis/google-cloud-go/commit/f7fe4f68ebf2ca28efd282f3419329dd2c09d245)) -* **internal/postprocessor:** Include module and package in scope ([#7294](https://github.com/googleapis/google-cloud-go/issues/7294)) ([d2c5c84](https://github.com/googleapis/google-cloud-go/commit/d2c5c8449f6939301f0fd506282e8fc73fc84f96)) - -## [0.109.0](https://github.com/googleapis/google-cloud-go/compare/v0.108.0...v0.109.0) (2023-01-18) - - -### Features - -* **internal/postprocessor:** Make OwlBot postprocessor ([#7202](https://github.com/googleapis/google-cloud-go/issues/7202)) ([7a1022e](https://github.com/googleapis/google-cloud-go/commit/7a1022e215261d679c8496cdd35a9cad1f13e527)) - -## [0.108.0](https://github.com/googleapis/google-cloud-go/compare/v0.107.0...v0.108.0) (2023-01-05) - - -### Features - -* **all:** Enable REGAPIC and REST numeric enums ([#6999](https://github.com/googleapis/google-cloud-go/issues/6999)) ([28f3572](https://github.com/googleapis/google-cloud-go/commit/28f3572addb0f563a2a42a76977b4e083191613f)) -* **debugger:** Add REST client ([06a54a1](https://github.com/googleapis/google-cloud-go/commit/06a54a16a5866cce966547c51e203b9e09a25bc0)) - - -### Bug Fixes - -* **internal/gapicgen:** Disable rest for non-rest APIs ([#7157](https://github.com/googleapis/google-cloud-go/issues/7157)) ([ab332ce](https://github.com/googleapis/google-cloud-go/commit/ab332ced06f6c07909444e4528c02a8b6a0a70a6)) - -## [0.107.0](https://github.com/googleapis/google-cloud-go/compare/v0.106.0...v0.107.0) (2022-11-15) - - -### Features - -* **routing:** Start generating apiv2 ([#7011](https://github.com/googleapis/google-cloud-go/issues/7011)) ([66e8e27](https://github.com/googleapis/google-cloud-go/commit/66e8e2717b2593f4e5640ecb97344bb1d5e5fc0b)) - -## [0.106.0](https://github.com/googleapis/google-cloud-go/compare/v0.105.0...v0.106.0) (2022-11-09) - - -### Features - -* **debugger:** rewrite signatures in terms of new location ([3c4b2b3](https://github.com/googleapis/google-cloud-go/commit/3c4b2b34565795537aac1661e6af2442437e34ad)) - -## [0.104.0](https://github.com/googleapis/google-cloud-go/compare/v0.103.0...v0.104.0) (2022-08-24) - - -### Features - -* **godocfx:** add friendlyAPIName ([#6447](https://github.com/googleapis/google-cloud-go/issues/6447)) ([c6d3ba4](https://github.com/googleapis/google-cloud-go/commit/c6d3ba401b7b3ae9b710a8850c6ec5d49c4c1490)) - -## [0.103.0](https://github.com/googleapis/google-cloud-go/compare/v0.102.1...v0.103.0) (2022-06-29) - - -### Features - -* **privateca:** temporarily remove REGAPIC support ([199b725](https://github.com/googleapis/google-cloud-go/commit/199b7250f474b1a6f53dcf0aac0c2966f4987b68)) - -## [0.102.1](https://github.com/googleapis/google-cloud-go/compare/v0.102.0...v0.102.1) (2022-06-17) - - -### Bug Fixes - -* **longrunning:** regapic remove path params duped as query params ([#6183](https://github.com/googleapis/google-cloud-go/issues/6183)) ([c963be3](https://github.com/googleapis/google-cloud-go/commit/c963be301f074779e6bb8c897d8064fa076e9e35)) - -## [0.102.0](https://github.com/googleapis/google-cloud-go/compare/v0.101.1...v0.102.0) (2022-05-24) - - -### Features - -* **civil:** add Before and After methods to civil.Time ([#5703](https://github.com/googleapis/google-cloud-go/issues/5703)) ([7acaaaf](https://github.com/googleapis/google-cloud-go/commit/7acaaafef47668c3e8382b8bc03475598c3db187)) - -### [0.101.1](https://github.com/googleapis/google-cloud-go/compare/v0.101.0...v0.101.1) (2022-05-03) - - -### Bug Fixes - -* **internal/gapicgen:** properly update modules that have no gapic changes ([#5945](https://github.com/googleapis/google-cloud-go/issues/5945)) ([de2befc](https://github.com/googleapis/google-cloud-go/commit/de2befcaa2a886499db9da6d4d04d28398c8d44b)) - -## [0.101.0](https://github.com/googleapis/google-cloud-go/compare/v0.100.2...v0.101.0) (2022-04-20) - - -### Features - -* **all:** bump grpc dep ([#5481](https://github.com/googleapis/google-cloud-go/issues/5481)) ([b12964d](https://github.com/googleapis/google-cloud-go/commit/b12964df5c63c647aaf204e73cfcdfd379d19682)) -* **internal/gapicgen:** change versionClient for gapics ([#5687](https://github.com/googleapis/google-cloud-go/issues/5687)) ([55f0d92](https://github.com/googleapis/google-cloud-go/commit/55f0d92bf112f14b024b4ab0076c9875a17423c9)) - - -### Bug Fixes - -* **internal/gapicgen:** add generation of internal/version.go for new client modules ([#5726](https://github.com/googleapis/google-cloud-go/issues/5726)) ([341e0df](https://github.com/googleapis/google-cloud-go/commit/341e0df1e44480706180cc5b07c49b3cee904095)) -* **internal/gapicgen:** don't gen version files for longrunning and debugger ([#5698](https://github.com/googleapis/google-cloud-go/issues/5698)) ([3a81108](https://github.com/googleapis/google-cloud-go/commit/3a81108c74cd8864c56b8ab5939afd864db3c64b)) -* **internal/gapicgen:** don't try to make snippets for non-gapics ([#5919](https://github.com/googleapis/google-cloud-go/issues/5919)) ([c94dddc](https://github.com/googleapis/google-cloud-go/commit/c94dddc60ef83a0584ba8f7dd24589d9db971672)) -* **internal/gapicgen:** move breaking change indicator if present ([#5452](https://github.com/googleapis/google-cloud-go/issues/5452)) ([e712df5](https://github.com/googleapis/google-cloud-go/commit/e712df5ebb45598a1653081d7e11e578bad22ff8)) -* **internal/godocfx:** prevent errors for filtered mods ([#5485](https://github.com/googleapis/google-cloud-go/issues/5485)) ([6cb9b89](https://github.com/googleapis/google-cloud-go/commit/6cb9b89b2d654c695eab00d8fb375cce0cd6e059)) - -## [0.100.0](https://www.github.com/googleapis/google-cloud-go/compare/v0.99.0...v0.100.0) (2022-01-04) - - -### Features - -* **analytics/admin:** add the `AcknowledgeUserDataCollection` operation which acknowledges the terms of user data collection for the specified property feat: add the new resource type `DataStream`, which is planned to eventually replace `WebDataStream`, `IosAppDataStream`, `AndroidAppDataStream` resources fix!: remove `GetEnhancedMeasurementSettings`, `UpdateEnhancedMeasurementSettingsRequest`, `UpdateEnhancedMeasurementSettingsRequest` operations from the API feat: add `CreateDataStream`, `DeleteDataStream`, `UpdateDataStream`, `ListDataStreams` operations to support the new `DataStream` resource feat: add `DISPLAY_VIDEO_360_ADVERTISER_LINK`, `DISPLAY_VIDEO_360_ADVERTISER_LINK_PROPOSAL` fields to `ChangeHistoryResourceType` enum feat: add the `account` field to the `Property` type docs: update the documentation with a new list of valid values for `UserLink.direct_roles` field ([5444809](https://www.github.com/googleapis/google-cloud-go/commit/5444809e0b7cf9f5416645ea2df6fec96f8b9023)) -* **assuredworkloads:** EU Regions and Support With Sovereign Controls ([5444809](https://www.github.com/googleapis/google-cloud-go/commit/5444809e0b7cf9f5416645ea2df6fec96f8b9023)) -* **dialogflow/cx:** added the display name of the current page in webhook requests ([e0833b2](https://www.github.com/googleapis/google-cloud-go/commit/e0833b2853834ba79fd20ca2ae9c613d585dd2a5)) -* **dialogflow/cx:** added the display name of the current page in webhook requests ([e0833b2](https://www.github.com/googleapis/google-cloud-go/commit/e0833b2853834ba79fd20ca2ae9c613d585dd2a5)) -* **dialogflow:** added export documentation method feat: added filter in list documentations request feat: added option to import custom metadata from Google Cloud Storage in reload document request feat: added option to apply partial update to the smart messaging allowlist in reload document request feat: added filter in list knowledge bases request ([5444809](https://www.github.com/googleapis/google-cloud-go/commit/5444809e0b7cf9f5416645ea2df6fec96f8b9023)) -* **dialogflow:** removed OPTIONAL for speech model variant docs: added more docs for speech model variant and improved docs format for participant ([5444809](https://www.github.com/googleapis/google-cloud-go/commit/5444809e0b7cf9f5416645ea2df6fec96f8b9023)) -* **recaptchaenterprise:** add new reCAPTCHA Enterprise fraud annotations ([3dd34a2](https://www.github.com/googleapis/google-cloud-go/commit/3dd34a262edbff63b9aece8faddc2ff0d98ce42a)) - - -### Bug Fixes - -* **artifactregistry:** fix resource pattern ID segment name ([5444809](https://www.github.com/googleapis/google-cloud-go/commit/5444809e0b7cf9f5416645ea2df6fec96f8b9023)) -* **compute:** add parameter in compute bazel rules ([#692](https://www.github.com/googleapis/google-cloud-go/issues/692)) ([5444809](https://www.github.com/googleapis/google-cloud-go/commit/5444809e0b7cf9f5416645ea2df6fec96f8b9023)) -* **profiler:** refine regular expression for parsing backoff duration in E2E tests ([#5229](https://www.github.com/googleapis/google-cloud-go/issues/5229)) ([4438aeb](https://www.github.com/googleapis/google-cloud-go/commit/4438aebca2ec01d4dbf22287aa651937a381e043)) -* **profiler:** remove certificate expiration workaround ([#5222](https://www.github.com/googleapis/google-cloud-go/issues/5222)) ([2da36c9](https://www.github.com/googleapis/google-cloud-go/commit/2da36c95f44d5f88fd93cd949ab78823cea74fe7)) - -## [0.99.0](https://www.github.com/googleapis/google-cloud-go/compare/v0.98.0...v0.99.0) (2021-12-06) - - -### Features - -* **dialogflow/cx:** added `TelephonyTransferCall` in response message ([fe27098](https://www.github.com/googleapis/google-cloud-go/commit/fe27098e5d429911428821ded57384353e699774)) - -## [0.98.0](https://www.github.com/googleapis/google-cloud-go/compare/v0.97.0...v0.98.0) (2021-12-03) - - -### Features - -* **aiplatform:** add enable_private_service_connect field to Endpoint feat: add id field to DeployedModel feat: add service_attachment field to PrivateEndpoints feat: add endpoint_id to CreateEndpointRequest and method signature to CreateEndpoint feat: add method signature to CreateFeatureStore, CreateEntityType, CreateFeature feat: add network and enable_private_service_connect to IndexEndpoint feat: add service_attachment to IndexPrivateEndpoints feat: add stratified_split field to training_pipeline InputDataConfig ([a2c0bef](https://www.github.com/googleapis/google-cloud-go/commit/a2c0bef551489c9f1d0d12b973d3bf095354841e)) -* **aiplatform:** add featurestore service to aiplatform v1 feat: add metadata service to aiplatform v1 ([30794e7](https://www.github.com/googleapis/google-cloud-go/commit/30794e70050b55ff87d6a80d0b4075065e9d271d)) -* **aiplatform:** Adds support for `google.protobuf.Value` pipeline parameters in the `parameter_values` field ([88a1cdb](https://www.github.com/googleapis/google-cloud-go/commit/88a1cdbef3cc337354a61bc9276725bfb9a686d8)) -* **aiplatform:** Tensorboard v1 protos release feat:Exposing a field for v1 CustomJob-Tensorboard integration. ([90e2868](https://www.github.com/googleapis/google-cloud-go/commit/90e2868a3d220aa7f897438f4917013fda7a7c59)) -* **binaryauthorization:** add new admission rule types to Policy feat: update SignatureAlgorithm enum to match algorithm names in KMS feat: add SystemPolicyV1Beta1 service ([1f5aa78](https://www.github.com/googleapis/google-cloud-go/commit/1f5aa78a4d6633871651c89a6d9c48e3409fecc5)) -* **channel:** add resource type to ChannelPartnerLink ([c206948](https://www.github.com/googleapis/google-cloud-go/commit/c2069487f6af5bcb37d519afeb60e312e35e67d5)) -* **cloudtasks:** add C++ rules for Cloud Tasks ([90e2868](https://www.github.com/googleapis/google-cloud-go/commit/90e2868a3d220aa7f897438f4917013fda7a7c59)) -* **compute:** Move compute.v1 from googleapis-discovery to googleapis ([#675](https://www.github.com/googleapis/google-cloud-go/issues/675)) ([1f5aa78](https://www.github.com/googleapis/google-cloud-go/commit/1f5aa78a4d6633871651c89a6d9c48e3409fecc5)) -* **compute:** Switch to string enums for compute ([#685](https://www.github.com/googleapis/google-cloud-go/issues/685)) ([c8271d4](https://www.github.com/googleapis/google-cloud-go/commit/c8271d4b217a6e6924d9f87eac9468c4b5767ba7)) -* **contactcenterinsights:** Add ability to update phrase matchers feat: Add issue model stats to time series feat: Add display name to issue model stats ([1f5aa78](https://www.github.com/googleapis/google-cloud-go/commit/1f5aa78a4d6633871651c89a6d9c48e3409fecc5)) -* **contactcenterinsights:** Add WriteDisposition to BigQuery Export API ([a2c0bef](https://www.github.com/googleapis/google-cloud-go/commit/a2c0bef551489c9f1d0d12b973d3bf095354841e)) -* **contactcenterinsights:** deprecate issue_matches docs: if conversation medium is unspecified, it will default to PHONE_CALL ([1a0720f](https://www.github.com/googleapis/google-cloud-go/commit/1a0720f2f33bb14617f5c6a524946a93209e1266)) -* **contactcenterinsights:** new feature flag disable_issue_modeling docs: fixed formatting issues in the reference documentation ([c8271d4](https://www.github.com/googleapis/google-cloud-go/commit/c8271d4b217a6e6924d9f87eac9468c4b5767ba7)) -* **contactcenterinsights:** remove feature flag disable_issue_modeling ([c8271d4](https://www.github.com/googleapis/google-cloud-go/commit/c8271d4b217a6e6924d9f87eac9468c4b5767ba7)) -* **datacatalog:** Added BigQueryDateShardedSpec.latest_shard_resource field feat: Added SearchCatalogResult.display_name field feat: Added SearchCatalogResult.description field ([1f5aa78](https://www.github.com/googleapis/google-cloud-go/commit/1f5aa78a4d6633871651c89a6d9c48e3409fecc5)) -* **dataproc:** add Dataproc Serverless for Spark Batches API ([30794e7](https://www.github.com/googleapis/google-cloud-go/commit/30794e70050b55ff87d6a80d0b4075065e9d271d)) -* **dataproc:** Add support for dataproc BatchController service ([8519b94](https://www.github.com/googleapis/google-cloud-go/commit/8519b948fee5dc82d39300c4d96e92c85fe78fe6)) -* **dialogflow/cx:** added API for changelogs docs: clarified semantic of the streaming APIs ([587bba5](https://www.github.com/googleapis/google-cloud-go/commit/587bba5ad792a92f252107aa38c6af50fb09fb58)) -* **dialogflow/cx:** added API for changelogs docs: clarified semantic of the streaming APIs ([587bba5](https://www.github.com/googleapis/google-cloud-go/commit/587bba5ad792a92f252107aa38c6af50fb09fb58)) -* **dialogflow/cx:** added support for comparing between versions docs: clarified security settings API reference ([83b941c](https://www.github.com/googleapis/google-cloud-go/commit/83b941c0983e44fdd18ceee8c6f3e91219d72ad1)) -* **dialogflow/cx:** added support for Deployments with ListDeployments and GetDeployment apis feat: added support for DeployFlow api under Environments feat: added support for TestCasesConfig under Environment docs: added long running operation explanation for several apis fix!: marked resource name of security setting as not-required ([8c5c6cf](https://www.github.com/googleapis/google-cloud-go/commit/8c5c6cf9df046b67998a8608d05595bd9e34feb0)) -* **dialogflow/cx:** allow setting custom CA for generic webhooks and release CompareVersions API docs: clarify DLP template reader usage ([90e2868](https://www.github.com/googleapis/google-cloud-go/commit/90e2868a3d220aa7f897438f4917013fda7a7c59)) -* **dialogflow:** added support to configure security settings, language code and time zone on conversation profile ([1f5aa78](https://www.github.com/googleapis/google-cloud-go/commit/1f5aa78a4d6633871651c89a6d9c48e3409fecc5)) -* **dialogflow:** support document metadata filter in article suggestion and smart reply model in human agent assistant ([e33350c](https://www.github.com/googleapis/google-cloud-go/commit/e33350cfcabcddcda1a90069383d39c68deb977a)) -* **dlp:** added deidentify replacement dictionaries feat: added field for BigQuery inspect template inclusion lists feat: added field to support infotype versioning ([a2c0bef](https://www.github.com/googleapis/google-cloud-go/commit/a2c0bef551489c9f1d0d12b973d3bf095354841e)) -* **domains:** added library for Cloud Domains v1 API. Also added methods for the transfer-in flow docs: improved API comments ([8519b94](https://www.github.com/googleapis/google-cloud-go/commit/8519b948fee5dc82d39300c4d96e92c85fe78fe6)) -* **functions:** Secret Manager integration fields 'secret_environment_variables' and 'secret_volumes' added feat: CMEK integration fields 'kms_key_name' and 'docker_repository' added ([1f5aa78](https://www.github.com/googleapis/google-cloud-go/commit/1f5aa78a4d6633871651c89a6d9c48e3409fecc5)) -* **kms:** add OAEP+SHA1 to the list of supported algorithms ([8c5c6cf](https://www.github.com/googleapis/google-cloud-go/commit/8c5c6cf9df046b67998a8608d05595bd9e34feb0)) -* **kms:** add RPC retry information for MacSign, MacVerify, and GenerateRandomBytes Committer: [@bdhess](https://www.github.com/bdhess) ([1a0720f](https://www.github.com/googleapis/google-cloud-go/commit/1a0720f2f33bb14617f5c6a524946a93209e1266)) -* **kms:** add support for Raw PKCS[#1](https://www.github.com/googleapis/google-cloud-go/issues/1) signing keys ([58bea89](https://www.github.com/googleapis/google-cloud-go/commit/58bea89a3d177d5c431ff19310794e3296253353)) -* **monitoring/apiv3:** add CreateServiceTimeSeries RPC ([9e41088](https://www.github.com/googleapis/google-cloud-go/commit/9e41088bb395fbae0e757738277d5c95fa2749c8)) -* **monitoring/dashboard:** Added support for auto-close configurations ([90e2868](https://www.github.com/googleapis/google-cloud-go/commit/90e2868a3d220aa7f897438f4917013fda7a7c59)) -* **monitoring/metricsscope:** promote apiv1 to GA ([#5135](https://www.github.com/googleapis/google-cloud-go/issues/5135)) ([33c0f63](https://www.github.com/googleapis/google-cloud-go/commit/33c0f63e0e0ce69d9ef6e57b04d1b8cc10ed2b78)) -* **osconfig:** OSConfig: add OS policy assignment rpcs ([83b941c](https://www.github.com/googleapis/google-cloud-go/commit/83b941c0983e44fdd18ceee8c6f3e91219d72ad1)) -* **osconfig:** Update OSConfig API ([e33350c](https://www.github.com/googleapis/google-cloud-go/commit/e33350cfcabcddcda1a90069383d39c68deb977a)) -* **osconfig:** Update osconfig v1 and v1alpha RecurringSchedule.Frequency with DAILY frequency ([59e548a](https://www.github.com/googleapis/google-cloud-go/commit/59e548acc249c7bddd9c884c2af35d582a408c4d)) -* **recaptchaenterprise:** add reCAPTCHA Enterprise account defender API methods ([88a1cdb](https://www.github.com/googleapis/google-cloud-go/commit/88a1cdbef3cc337354a61bc9276725bfb9a686d8)) -* **redis:** [Cloud Memorystore for Redis] Support Multiple Read Replicas when creating Instance ([1f5aa78](https://www.github.com/googleapis/google-cloud-go/commit/1f5aa78a4d6633871651c89a6d9c48e3409fecc5)) -* **redis:** [Cloud Memorystore for Redis] Support Multiple Read Replicas when creating Instance ([1f5aa78](https://www.github.com/googleapis/google-cloud-go/commit/1f5aa78a4d6633871651c89a6d9c48e3409fecc5)) -* **security/privateca:** add IAMPolicy & Locations mix-in support ([1a0720f](https://www.github.com/googleapis/google-cloud-go/commit/1a0720f2f33bb14617f5c6a524946a93209e1266)) -* **securitycenter:** Added a new API method UpdateExternalSystem, which enables updating a finding w/ external system metadata. External systems are a child resource under finding, and are housed on the finding itself, and can also be filtered on in Notifications, the ListFindings and GroupFindings API ([c8271d4](https://www.github.com/googleapis/google-cloud-go/commit/c8271d4b217a6e6924d9f87eac9468c4b5767ba7)) -* **securitycenter:** Added mute related APIs, proto messages and fields ([3e7185c](https://www.github.com/googleapis/google-cloud-go/commit/3e7185c241d97ee342f132ae04bc93bb79a8e897)) -* **securitycenter:** Added resource type and display_name field to the FindingResult, and supported them in the filter for ListFindings and GroupFindings. Also added display_name to the resource which is surfaced in NotificationMessage ([1f5aa78](https://www.github.com/googleapis/google-cloud-go/commit/1f5aa78a4d6633871651c89a6d9c48e3409fecc5)) -* **securitycenter:** Added vulnerability field to the finding feat: Added type field to the resource which is surfaced in NotificationMessage ([090cc3a](https://www.github.com/googleapis/google-cloud-go/commit/090cc3ae0f8747a14cc904fc6d429e2f5379bb03)) -* **servicecontrol:** add C++ rules for many Cloud services ([c8271d4](https://www.github.com/googleapis/google-cloud-go/commit/c8271d4b217a6e6924d9f87eac9468c4b5767ba7)) -* **speech:** add result_end_time to SpeechRecognitionResult ([a2c0bef](https://www.github.com/googleapis/google-cloud-go/commit/a2c0bef551489c9f1d0d12b973d3bf095354841e)) -* **speech:** added alternative_language_codes to RecognitionConfig feat: WEBM_OPUS codec feat: SpeechAdaptation configuration feat: word confidence feat: spoken punctuation and spoken emojis feat: hint boost in SpeechContext ([a2c0bef](https://www.github.com/googleapis/google-cloud-go/commit/a2c0bef551489c9f1d0d12b973d3bf095354841e)) -* **texttospeech:** update v1 proto ([90e2868](https://www.github.com/googleapis/google-cloud-go/commit/90e2868a3d220aa7f897438f4917013fda7a7c59)) -* **workflows/executions:** add a stack_trace field to the Error messages specifying where the error occured feat: add call_log_level field to Execution messages doc: clarify requirement to escape strings within JSON arguments ([1f5aa78](https://www.github.com/googleapis/google-cloud-go/commit/1f5aa78a4d6633871651c89a6d9c48e3409fecc5)) - - -### Bug Fixes - -* **accesscontextmanager:** nodejs package name access-context-manager ([30794e7](https://www.github.com/googleapis/google-cloud-go/commit/30794e70050b55ff87d6a80d0b4075065e9d271d)) -* **aiplatform:** Remove invalid resource annotations ([587bba5](https://www.github.com/googleapis/google-cloud-go/commit/587bba5ad792a92f252107aa38c6af50fb09fb58)) -* **compute/metadata:** return an error when all retries have failed ([#5063](https://www.github.com/googleapis/google-cloud-go/issues/5063)) ([c792a0d](https://www.github.com/googleapis/google-cloud-go/commit/c792a0d13db019c9964efeee5c6bc85b07ca50fa)), refs [#5062](https://www.github.com/googleapis/google-cloud-go/issues/5062) -* **compute:** make parent_id fields required compute move and insert methods ([#686](https://www.github.com/googleapis/google-cloud-go/issues/686)) ([c8271d4](https://www.github.com/googleapis/google-cloud-go/commit/c8271d4b217a6e6924d9f87eac9468c4b5767ba7)) -* **compute:** Move compute_small protos under its own directory ([#681](https://www.github.com/googleapis/google-cloud-go/issues/681)) ([3e7185c](https://www.github.com/googleapis/google-cloud-go/commit/3e7185c241d97ee342f132ae04bc93bb79a8e897)) -* **internal/gapicgen:** fix a compute filtering ([#5111](https://www.github.com/googleapis/google-cloud-go/issues/5111)) ([77aa19d](https://www.github.com/googleapis/google-cloud-go/commit/77aa19de7fc33a9e831e6b91bd324d6832b44d99)) -* **internal/godocfx:** only put TOC status on mod if all pkgs have same status ([#4974](https://www.github.com/googleapis/google-cloud-go/issues/4974)) ([309b59e](https://www.github.com/googleapis/google-cloud-go/commit/309b59e583d1bf0dd9ffe84223034eb8a2975d47)) -* **internal/godocfx:** replace * with HTML code ([#5049](https://www.github.com/googleapis/google-cloud-go/issues/5049)) ([a8f7c06](https://www.github.com/googleapis/google-cloud-go/commit/a8f7c066e8d97120ae4e12963e3c9acc8b8906c2)) -* **monitoring/apiv3:** Reintroduce deprecated field/enum for backward compatibility docs: Use absolute link targets in comments ([45fd259](https://www.github.com/googleapis/google-cloud-go/commit/45fd2594d99ef70c776df26866f0a3b537e7e69e)) -* **profiler:** workaround certificate expiration issue in integration tests ([#4955](https://www.github.com/googleapis/google-cloud-go/issues/4955)) ([de9e465](https://www.github.com/googleapis/google-cloud-go/commit/de9e465bea8cd0580c45e87d2cbc2b610615b363)) -* **security/privateca:** include mixin protos as input for mixin rpcs ([479c2f9](https://www.github.com/googleapis/google-cloud-go/commit/479c2f90d556a106b25ebcdb1539d231488182da)) -* **security/privateca:** repair service config to enable mixins ([83b941c](https://www.github.com/googleapis/google-cloud-go/commit/83b941c0983e44fdd18ceee8c6f3e91219d72ad1)) -* **video/transcoder:** update nodejs package name to video-transcoder ([30794e7](https://www.github.com/googleapis/google-cloud-go/commit/30794e70050b55ff87d6a80d0b4075065e9d271d)) - -## [0.97.0](https://www.github.com/googleapis/google-cloud-go/compare/v0.96.0...v0.97.0) (2021-09-29) - - -### Features - -* **internal** add Retry func to testutil from samples repository [#4902](https://github.com/googleapis/google-cloud-go/pull/4902) - -## [0.96.0](https://www.github.com/googleapis/google-cloud-go/compare/v0.95.0...v0.96.0) (2021-09-28) - - -### Features - -* **civil:** add IsEmpty function to time, date and datetime ([#4728](https://www.github.com/googleapis/google-cloud-go/issues/4728)) ([88bfa64](https://www.github.com/googleapis/google-cloud-go/commit/88bfa64d6df2f3bb7d41e0b8f56717dd3de790e2)), refs [#4727](https://www.github.com/googleapis/google-cloud-go/issues/4727) -* **internal/godocfx:** detect preview versions ([#4899](https://www.github.com/googleapis/google-cloud-go/issues/4899)) ([9b60844](https://www.github.com/googleapis/google-cloud-go/commit/9b608445ce9ebabbc87a50e85ce6ef89125031d2)) -* **internal:** provide wrapping for retried errors ([#4797](https://www.github.com/googleapis/google-cloud-go/issues/4797)) ([ce5f4db](https://www.github.com/googleapis/google-cloud-go/commit/ce5f4dbab884e847a2d9f1f8f3fcfd7df19a505a)) - - -### Bug Fixes - -* **internal/gapicgen:** restore fmting proto files ([#4789](https://www.github.com/googleapis/google-cloud-go/issues/4789)) ([5606b54](https://www.github.com/googleapis/google-cloud-go/commit/5606b54b97bb675487c6c138a4081c827218f933)) -* **internal/trace:** use xerrors.As for trace ([#4813](https://www.github.com/googleapis/google-cloud-go/issues/4813)) ([05fe61c](https://www.github.com/googleapis/google-cloud-go/commit/05fe61c5aa4860bdebbbe3e91a9afaba16aa6184)) - -## [0.95.0](https://www.github.com/googleapis/google-cloud-go/compare/v0.94.1...v0.95.0) (2021-09-21) - -### Bug Fixes - -* **internal/gapicgen:** add a temporary import ([#4756](https://www.github.com/googleapis/google-cloud-go/issues/4756)) ([4d9c046](https://www.github.com/googleapis/google-cloud-go/commit/4d9c046b66a2dc205e2c14b676995771301440da)) -* **compute/metadata:** remove heavy gax dependency ([#4784](https://www.github.com/googleapis/google-cloud-go/issues/4784)) ([ea00264](https://www.github.com/googleapis/google-cloud-go/commit/ea00264428137471805f2ec67f04f3a5a42928fa)) - -### [0.94.1](https://www.github.com/googleapis/google-cloud-go/compare/v0.94.0...v0.94.1) (2021-09-02) - - -### Bug Fixes - -* **compute/metadata:** fix retry logic to not panic on error ([#4714](https://www.github.com/googleapis/google-cloud-go/issues/4714)) ([75c63b9](https://www.github.com/googleapis/google-cloud-go/commit/75c63b94d2cf86606fffc3611f7e6150b667eedc)), refs [#4713](https://www.github.com/googleapis/google-cloud-go/issues/4713) - -## [0.94.0](https://www.github.com/googleapis/google-cloud-go/compare/v0.92.0...v0.94.0) (2021-08-31) - - -### Features - -* **aiplatform:** add XAI, model monitoring, and index services to aiplatform v1 ([e385b40](https://www.github.com/googleapis/google-cloud-go/commit/e385b40a1e2ecf81f5fd0910de5c37275951f86b)) -* **analytics/admin:** add `GetDataRetentionSettings`, `UpdateDataRetentionSettings` methods to the API ([8467899](https://www.github.com/googleapis/google-cloud-go/commit/8467899ab6ebf0328c543bfb5fbcddeb2f53a082)) -* **asset:** Release of relationships in v1, Add content type Relationship to support relationship export Committer: lvv@ ([d4c3340](https://www.github.com/googleapis/google-cloud-go/commit/d4c3340bfc8b6793d6d2c8a3ed8ccdb472e1efd3)) -* **assuredworkloads:** Add Canada Regions And Support compliance regime ([b9226eb](https://www.github.com/googleapis/google-cloud-go/commit/b9226eb0b34473cb6f920c2526ad0d6dacb03f3c)) -* **cloudbuild/apiv1:** Add ability to configure BuildTriggers to create Builds that require approval before executing and ApproveBuild API to approve or reject pending Builds ([d4c3340](https://www.github.com/googleapis/google-cloud-go/commit/d4c3340bfc8b6793d6d2c8a3ed8ccdb472e1efd3)) -* **cloudbuild/apiv1:** add script field to BuildStep message ([b9226eb](https://www.github.com/googleapis/google-cloud-go/commit/b9226eb0b34473cb6f920c2526ad0d6dacb03f3c)) -* **cloudbuild/apiv1:** Update cloudbuild proto with the service_account for BYOSA Triggers. ([b9226eb](https://www.github.com/googleapis/google-cloud-go/commit/b9226eb0b34473cb6f920c2526ad0d6dacb03f3c)) -* **compute/metadata:** retry error when talking to metadata service ([#4648](https://www.github.com/googleapis/google-cloud-go/issues/4648)) ([81c6039](https://www.github.com/googleapis/google-cloud-go/commit/81c6039503121f8da3de4f4cd957b8488a3ef620)), refs [#4642](https://www.github.com/googleapis/google-cloud-go/issues/4642) -* **dataproc:** remove apiv1beta2 client ([#4682](https://www.github.com/googleapis/google-cloud-go/issues/4682)) ([2248554](https://www.github.com/googleapis/google-cloud-go/commit/22485541affb1251604df292670a20e794111d3e)) -* **gaming:** support version reporting API ([cd65cec](https://www.github.com/googleapis/google-cloud-go/commit/cd65cecf15c4a01648da7f8f4f4d497772961510)) -* **gkehub:** Add request_id under `DeleteMembershipRequest` and `UpdateMembershipRequest` ([b9226eb](https://www.github.com/googleapis/google-cloud-go/commit/b9226eb0b34473cb6f920c2526ad0d6dacb03f3c)) -* **internal/carver:** support carving batches ([#4623](https://www.github.com/googleapis/google-cloud-go/issues/4623)) ([2972d19](https://www.github.com/googleapis/google-cloud-go/commit/2972d194da19bedf16d76fda471c06a965cfdcd6)) -* **kms:** add support for Key Reimport ([bf4378b](https://www.github.com/googleapis/google-cloud-go/commit/bf4378b5b859f7b835946891dbfebfee31c4b123)) -* **metastore:** Added the Backup resource and Backup resource GetIamPolicy/SetIamPolicy to V1 feat: Added the RestoreService method to V1 ([d4c3340](https://www.github.com/googleapis/google-cloud-go/commit/d4c3340bfc8b6793d6d2c8a3ed8ccdb472e1efd3)) -* **monitoring/dashboard:** Added support for logs-based alerts: https://cloud.google.com/logging/docs/alerting/log-based-alerts feat: Added support for user-defined labels on cloud monitoring's Service and ServiceLevelObjective objects fix!: mark required fields in QueryTimeSeriesRequest as required ([b9226eb](https://www.github.com/googleapis/google-cloud-go/commit/b9226eb0b34473cb6f920c2526ad0d6dacb03f3c)) -* **osconfig:** Update osconfig v1 and v1alpha with WindowsApplication ([bf4378b](https://www.github.com/googleapis/google-cloud-go/commit/bf4378b5b859f7b835946891dbfebfee31c4b123)) -* **speech:** Add transcript normalization ([b31646d](https://www.github.com/googleapis/google-cloud-go/commit/b31646d1e12037731df4b5c0ba9f60b6434d7b9b)) -* **talent:** Add new commute methods in Search APIs feat: Add new histogram type 'publish_time_in_day' feat: Support filtering by requisitionId is ListJobs API ([d4c3340](https://www.github.com/googleapis/google-cloud-go/commit/d4c3340bfc8b6793d6d2c8a3ed8ccdb472e1efd3)) -* **translate:** added v3 proto for online/batch document translation and updated v3beta1 proto for format conversion ([bf4378b](https://www.github.com/googleapis/google-cloud-go/commit/bf4378b5b859f7b835946891dbfebfee31c4b123)) - - -### Bug Fixes - -* **datastream:** Change a few resource pattern variables from camelCase to snake_case ([bf4378b](https://www.github.com/googleapis/google-cloud-go/commit/bf4378b5b859f7b835946891dbfebfee31c4b123)) - -## [0.92.0](https://www.github.com/googleapis/google-cloud-go/compare/v0.91.0...v0.92.0) (2021-08-16) - - -### Features - -* **all:** remove testing deps ([#4580](https://www.github.com/googleapis/google-cloud-go/issues/4580)) ([15c1eb9](https://www.github.com/googleapis/google-cloud-go/commit/15c1eb9730f0b514edb911161f9c59e8d790a5ec)), refs [#4061](https://www.github.com/googleapis/google-cloud-go/issues/4061) -* **internal/detect:** add helper to detect projectID from env ([#4582](https://www.github.com/googleapis/google-cloud-go/issues/4582)) ([cc65d94](https://www.github.com/googleapis/google-cloud-go/commit/cc65d945688ac446602bce6ef86a935714dfe2f8)), refs [#1294](https://www.github.com/googleapis/google-cloud-go/issues/1294) -* **spannertest:** Add validation of duplicated column names ([#4611](https://www.github.com/googleapis/google-cloud-go/issues/4611)) ([84f86a6](https://www.github.com/googleapis/google-cloud-go/commit/84f86a605c809ab36dd3cb4b3ab1df15a5302083)) - -## [0.91.0](https://www.github.com/googleapis/google-cloud-go/compare/v0.90.0...v0.91.0) (2021-08-11) - - -### Features - -* **.github:** support dynamic submodule detection ([#4537](https://www.github.com/googleapis/google-cloud-go/issues/4537)) ([4374b90](https://www.github.com/googleapis/google-cloud-go/commit/4374b907e9f166da6bd23a8ef94399872b00afd6)) -* **dialogflow/cx:** add advanced settings for agent level feat: add rollout config, state and failure reason for experiment feat: add insights export settings for security setting feat: add language code for streaming recognition result and flow versions for query parameters docs: deprecate legacy logging settings ([ed73554](https://www.github.com/googleapis/google-cloud-go/commit/ed735541dc57d0681d84b46853393eac5f7ccec3)) -* **dialogflow/cx:** add advanced settings for agent level feat: add rollout config, state and failure reason for experiment feat: add insights export settings for security setting feat: add language code for streaming recognition result and flow versions for query parameters docs: deprecate legacy logging settings ([ed73554](https://www.github.com/googleapis/google-cloud-go/commit/ed735541dc57d0681d84b46853393eac5f7ccec3)) -* **dialogflow/cx:** added support for DLP templates; expose `Locations` service to get/list avaliable locations of Dialogflow products ([5996846](https://www.github.com/googleapis/google-cloud-go/commit/59968462a3870c6289166fa1161f9b6d9c10e093)) -* **dialogflow/cx:** added support for DLP templates; expose `Locations` service to get/list avaliable locations of Dialogflow products docs: reorder some fields ([5996846](https://www.github.com/googleapis/google-cloud-go/commit/59968462a3870c6289166fa1161f9b6d9c10e093)) -* **dialogflow:** expose `Locations` service to get/list avaliable locations of Dialogflow products; fixed some API annotations ([5996846](https://www.github.com/googleapis/google-cloud-go/commit/59968462a3870c6289166fa1161f9b6d9c10e093)) -* **kms:** add support for HMAC, Variable Key Destruction, and GenerateRandom ([5996846](https://www.github.com/googleapis/google-cloud-go/commit/59968462a3870c6289166fa1161f9b6d9c10e093)) -* **speech:** add total_billed_time response field ([5996846](https://www.github.com/googleapis/google-cloud-go/commit/59968462a3870c6289166fa1161f9b6d9c10e093)) -* **video/transcoder:** Add video cropping feature feat: Add video padding feature feat: Add ttl_after_completion_days field to Job docs: Update proto documentation docs: Indicate v1beta1 deprecation ([5996846](https://www.github.com/googleapis/google-cloud-go/commit/59968462a3870c6289166fa1161f9b6d9c10e093)) - - -### Bug Fixes - -* **functions:** Updating behavior of source_upload_url during Get/List function calls ([381a494](https://www.github.com/googleapis/google-cloud-go/commit/381a494c29da388977b0bdda2177058328cc4afe)) - -## [0.90.0](https://www.github.com/googleapis/google-cloud-go/compare/v0.89.0...v0.90.0) (2021-08-03) - - -### ⚠ BREAKING CHANGES - -* **compute:** add pagination and an Operation wrapper (#4542) - -### Features - -* **compute:** add pagination and an Operation wrapper ([#4542](https://www.github.com/googleapis/google-cloud-go/issues/4542)) ([36f4649](https://www.github.com/googleapis/google-cloud-go/commit/36f46494111f6d16d103fb208d49616576dbf91e)) -* **internal/godocfx:** add status to packages and TOCs ([#4547](https://www.github.com/googleapis/google-cloud-go/issues/4547)) ([c6de69c](https://www.github.com/googleapis/google-cloud-go/commit/c6de69c710561bb2a40eff05417df4b9798c258a)) -* **internal/godocfx:** mark status of deprecated items ([#4525](https://www.github.com/googleapis/google-cloud-go/issues/4525)) ([d571c6f](https://www.github.com/googleapis/google-cloud-go/commit/d571c6f4337ec9c4807c230cd77f53b6e7db6437)) - - -### Bug Fixes - -* **internal/carver:** don't tag commits ([#4518](https://www.github.com/googleapis/google-cloud-go/issues/4518)) ([c355eb8](https://www.github.com/googleapis/google-cloud-go/commit/c355eb8ecb0bb1af0ccf55e6262ca8c0d5c7e352)) - -## [0.89.0](https://www.github.com/googleapis/google-cloud-go/compare/v0.88.0...v0.89.0) (2021-07-29) - - -### Features - -* **assuredworkloads:** Add EU Regions And Support compliance regime ([a52baa4](https://www.github.com/googleapis/google-cloud-go/commit/a52baa456ed8513ec492c4b573c191eb61468758)) -* **datacatalog:** Added support for BigQuery connections entries feat: Added support for BigQuery routines entries feat: Added usage_signal field feat: Added labels field feat: Added ReplaceTaxonomy in Policy Tag Manager Serialization API feat: Added support for public tag templates feat: Added support for rich text tags docs: Documentation improvements ([a52baa4](https://www.github.com/googleapis/google-cloud-go/commit/a52baa456ed8513ec492c4b573c191eb61468758)) -* **datafusion:** start generating apiv1 ([e55a016](https://www.github.com/googleapis/google-cloud-go/commit/e55a01667afaf36ff70807d061ecafb61827ba97)) -* **iap:** start generating apiv1 ([e55a016](https://www.github.com/googleapis/google-cloud-go/commit/e55a01667afaf36ff70807d061ecafb61827ba97)) -* **internal/carver:** add tooling to help carve out sub-modules ([#4417](https://www.github.com/googleapis/google-cloud-go/issues/4417)) ([a7e28f2](https://www.github.com/googleapis/google-cloud-go/commit/a7e28f2557469562ae57e5174b41bdf8fce62b63)) -* **networkconnectivity:** Add files for Network Connectivity v1 API. ([a52baa4](https://www.github.com/googleapis/google-cloud-go/commit/a52baa456ed8513ec492c4b573c191eb61468758)) -* **retail:** Add restricted Retail Search features for Retail API v2. ([a52baa4](https://www.github.com/googleapis/google-cloud-go/commit/a52baa456ed8513ec492c4b573c191eb61468758)) -* **secretmanager:** In Secret Manager, users can now use filter to customize the output of ListSecrets/ListSecretVersions calls ([a52baa4](https://www.github.com/googleapis/google-cloud-go/commit/a52baa456ed8513ec492c4b573c191eb61468758)) -* **securitycenter:** add finding_class and indicator fields in Finding ([a52baa4](https://www.github.com/googleapis/google-cloud-go/commit/a52baa456ed8513ec492c4b573c191eb61468758)) -* **speech:** add total_billed_time response field. fix!: phrase_set_id is required field in CreatePhraseSetRequest. fix!: custom_class_id is required field in CreateCustomClassRequest. ([a52baa4](https://www.github.com/googleapis/google-cloud-go/commit/a52baa456ed8513ec492c4b573c191eb61468758)) -* **storagetransfer:** start generating apiv1 ([#4505](https://www.github.com/googleapis/google-cloud-go/issues/4505)) ([f2d531d](https://www.github.com/googleapis/google-cloud-go/commit/f2d531d2b519efa58e0f23a178bbebe675c203c3)) - - -### Bug Fixes - -* **internal/gapicgen:** exec Stdout already set ([#4509](https://www.github.com/googleapis/google-cloud-go/issues/4509)) ([41246e9](https://www.github.com/googleapis/google-cloud-go/commit/41246e900aaaea92a9f956e92956c40c86f4cb3a)) -* **internal/gapicgen:** tidy all after dep bump ([#4515](https://www.github.com/googleapis/google-cloud-go/issues/4515)) ([9401be5](https://www.github.com/googleapis/google-cloud-go/commit/9401be509c570c3c55694375065c84139e961857)), refs [#4434](https://www.github.com/googleapis/google-cloud-go/issues/4434) - -## [0.88.0](https://www.github.com/googleapis/google-cloud-go/compare/v0.87.0...v0.88.0) (2021-07-22) - - -### ⚠ BREAKING CHANGES - -* **cloudbuild/apiv1:** Proto had a prior definitions of WorkerPool resources which were never supported. This change replaces those resources with definitions that are currently supported. - -### Features - -* **cloudbuild/apiv1:** add a WorkerPools API ([19ea3f8](https://www.github.com/googleapis/google-cloud-go/commit/19ea3f830212582bfee21d9e09f0034f9ce76547)) -* **cloudbuild/apiv1:** Implementation of Build Failure Info: - Added message FailureInfo field ([19ea3f8](https://www.github.com/googleapis/google-cloud-go/commit/19ea3f830212582bfee21d9e09f0034f9ce76547)) -* **osconfig/agentendpoint:** OSConfig AgentEndpoint: add basic os info to RegisterAgentRequest, add WindowsApplication type to Inventory ([8936bc3](https://www.github.com/googleapis/google-cloud-go/commit/8936bc3f2d0fb2f6514f6e019fa247b8f41bd43c)) -* **resourcesettings:** Publish Cloud ResourceSettings v1 API ([43ad3cb](https://www.github.com/googleapis/google-cloud-go/commit/43ad3cb7be981fff9dc5dcf4510f1cd7bea99957)) - - -### Bug Fixes - -* **internal/godocfx:** set exit code, print cmd output, no go get ... ([#4445](https://www.github.com/googleapis/google-cloud-go/issues/4445)) ([cc70f77](https://www.github.com/googleapis/google-cloud-go/commit/cc70f77ac279a62e24e1b07f6e53fd126b7286b0)) -* **internal:** detect module for properly generating docs URLs ([#4460](https://www.github.com/googleapis/google-cloud-go/issues/4460)) ([1eaba8b](https://www.github.com/googleapis/google-cloud-go/commit/1eaba8bd694f7552a8e3e09b4f164de8b6ca23f0)), refs [#4447](https://www.github.com/googleapis/google-cloud-go/issues/4447) -* **kms:** Updating WORKSPACE files to use the newest version of the Typescript generator. ([8936bc3](https://www.github.com/googleapis/google-cloud-go/commit/8936bc3f2d0fb2f6514f6e019fa247b8f41bd43c)) - -## [0.87.0](https://www.github.com/googleapis/google-cloud-go/compare/v0.86.0...v0.87.0) (2021-07-13) - - -### Features - -* **container:** allow updating security group on existing clusters ([528ffc9](https://www.github.com/googleapis/google-cloud-go/commit/528ffc9bd63090129a8b1355cd31273f8c23e34c)) -* **monitoring/dashboard:** added validation only mode when writing dashboards feat: added alert chart widget ([652d7c2](https://www.github.com/googleapis/google-cloud-go/commit/652d7c277da2f6774729064ab65d557875c81567)) -* **networkmanagment:** start generating apiv1 ([907592c](https://www.github.com/googleapis/google-cloud-go/commit/907592c576abfc65c01bbcd30c1a6094916cdc06)) -* **secretmanager:** Tune Secret Manager auto retry parameters ([528ffc9](https://www.github.com/googleapis/google-cloud-go/commit/528ffc9bd63090129a8b1355cd31273f8c23e34c)) -* **video/transcoder:** start generating apiv1 ([907592c](https://www.github.com/googleapis/google-cloud-go/commit/907592c576abfc65c01bbcd30c1a6094916cdc06)) - - -### Bug Fixes - -* **compute:** properly generate PUT requests ([#4426](https://www.github.com/googleapis/google-cloud-go/issues/4426)) ([a7491a5](https://www.github.com/googleapis/google-cloud-go/commit/a7491a533e4ad75eb6d5f89718d4dafb0c5b4167)) -* **internal:** fix relative pathing for generator ([#4397](https://www.github.com/googleapis/google-cloud-go/issues/4397)) ([25e0eae](https://www.github.com/googleapis/google-cloud-go/commit/25e0eaecf9feb1caa97988c5398ac58f6ca17391)) - - -### Miscellaneous Chores - -* **all:** fix release version ([#4427](https://www.github.com/googleapis/google-cloud-go/issues/4427)) ([2c0d267](https://www.github.com/googleapis/google-cloud-go/commit/2c0d2673ccab7281b6432215ee8279f9efd04a15)) - -## [0.86.0](https://www.github.com/googleapis/google-cloud-go/compare/v0.85.0...v0.86.0) (2021-07-01) - - -### Features - -* **bigquery managedwriter:** schema conversion support ([#4357](https://www.github.com/googleapis/google-cloud-go/issues/4357)) ([f2b20f4](https://www.github.com/googleapis/google-cloud-go/commit/f2b20f493e2ed5a883ce42fa65695c03c574feb5)) - -## [0.85.0](https://www.github.com/googleapis/google-cloud-go/compare/v0.84.0...v0.85.0) (2021-06-30) - - -### Features - -* **dataflow:** start generating apiv1beta3 ([cfee361](https://www.github.com/googleapis/google-cloud-go/commit/cfee36161d41e3a0f769e51ab96c25d0967af273)) -* **datastream:** start generating apiv1alpha1 ([cfee361](https://www.github.com/googleapis/google-cloud-go/commit/cfee36161d41e3a0f769e51ab96c25d0967af273)) -* **dialogflow:** added Automated agent reply type and allow cancellation flag for partial response feature. ([5a9c6ce](https://www.github.com/googleapis/google-cloud-go/commit/5a9c6ce781fb6a338e29d3dee72367998d834af0)) -* **documentai:** update document.proto, add the processor management methods. ([5a9c6ce](https://www.github.com/googleapis/google-cloud-go/commit/5a9c6ce781fb6a338e29d3dee72367998d834af0)) -* **eventarc:** start generating apiv1 ([cfee361](https://www.github.com/googleapis/google-cloud-go/commit/cfee36161d41e3a0f769e51ab96c25d0967af273)) -* **gkehub:** added v1alpha messages and client for gkehub ([8fb4649](https://www.github.com/googleapis/google-cloud-go/commit/8fb464956f0ca51d30e8e14dc625ff9fa150c437)) -* **internal/godocfx:** add support for other modules ([#4290](https://www.github.com/googleapis/google-cloud-go/issues/4290)) ([d52bae6](https://www.github.com/googleapis/google-cloud-go/commit/d52bae6cd77474174192c46236d309bf967dfa00)) -* **internal/godocfx:** different metadata for different modules ([#4297](https://www.github.com/googleapis/google-cloud-go/issues/4297)) ([598f5b9](https://www.github.com/googleapis/google-cloud-go/commit/598f5b93778b2e2e75265ae54484dd54477433f5)) -* **internal:** add force option for regen ([#4310](https://www.github.com/googleapis/google-cloud-go/issues/4310)) ([de654eb](https://www.github.com/googleapis/google-cloud-go/commit/de654ebfcf23a53b4d1fee0aa48c73999a55c1a6)) -* **servicecontrol:** Added the gRPC service config for the Service Controller v1 API docs: Updated some comments. ([8fb4649](https://www.github.com/googleapis/google-cloud-go/commit/8fb464956f0ca51d30e8e14dc625ff9fa150c437)) -* **workflows/executions:** start generating apiv1 ([cfee361](https://www.github.com/googleapis/google-cloud-go/commit/cfee36161d41e3a0f769e51ab96c25d0967af273)) - - -### Bug Fixes - -* **internal:** add autogenerated header to snippets ([#4261](https://www.github.com/googleapis/google-cloud-go/issues/4261)) ([2220787](https://www.github.com/googleapis/google-cloud-go/commit/222078722c37c3fdadec7bbbe0bcf81edd105f1a)), refs [#4260](https://www.github.com/googleapis/google-cloud-go/issues/4260) -* **internal:** fix googleapis-disco regen ([#4354](https://www.github.com/googleapis/google-cloud-go/issues/4354)) ([aeea1ce](https://www.github.com/googleapis/google-cloud-go/commit/aeea1ce1e5dff3acdfe208932327b52c49851b41)) -* **kms:** replace IAMPolicy mixin in service config. ([5a9c6ce](https://www.github.com/googleapis/google-cloud-go/commit/5a9c6ce781fb6a338e29d3dee72367998d834af0)) -* **security/privateca:** Fixed casing of the Ruby namespace ([5a9c6ce](https://www.github.com/googleapis/google-cloud-go/commit/5a9c6ce781fb6a338e29d3dee72367998d834af0)) - -## [0.84.0](https://www.github.com/googleapis/google-cloud-go/compare/v0.83.0...v0.84.0) (2021-06-09) - - -### Features - -* **aiplatform:** start generating apiv1 ([be1d729](https://www.github.com/googleapis/google-cloud-go/commit/be1d729fdaa18eb1c782f3b09a6bb8fd6b3a144c)) -* **apigeeconnect:** start generating abiv1 ([be1d729](https://www.github.com/googleapis/google-cloud-go/commit/be1d729fdaa18eb1c782f3b09a6bb8fd6b3a144c)) -* **dialogflow/cx:** support sentiment analysis in bot testing ([7a57aac](https://www.github.com/googleapis/google-cloud-go/commit/7a57aac996f2bae20ee6ddbd02ad9e56e380099b)) -* **dialogflow/cx:** support sentiment analysis in bot testing ([6ad2306](https://www.github.com/googleapis/google-cloud-go/commit/6ad2306f64710ce16059b464342dbc6a98d2d9c2)) -* **documentai:** Move CommonOperationMetadata into a separate proto file for potential reuse. ([9e80ea0](https://www.github.com/googleapis/google-cloud-go/commit/9e80ea0d053b06876418194f65a478045dc4fe6c)) -* **documentai:** Move CommonOperationMetadata into a separate proto file for potential reuse. ([18375e5](https://www.github.com/googleapis/google-cloud-go/commit/18375e50e8f16e63506129b8927a7b62f85e407b)) -* **gkeconnect/gateway:** start generating apiv1beta1 ([#4235](https://www.github.com/googleapis/google-cloud-go/issues/4235)) ([1c3e968](https://www.github.com/googleapis/google-cloud-go/commit/1c3e9689d78670a231a3660db00fd4fd8f5c6345)) -* **lifesciences:** strat generating apiv2beta ([be1d729](https://www.github.com/googleapis/google-cloud-go/commit/be1d729fdaa18eb1c782f3b09a6bb8fd6b3a144c)) -* **tpu:** start generating apiv1 ([#4199](https://www.github.com/googleapis/google-cloud-go/issues/4199)) ([cac48ea](https://www.github.com/googleapis/google-cloud-go/commit/cac48eab960cd34cc20732f6a1aeb93c540a036b)) - - -### Bug Fixes - -* **bttest:** fix race condition in SampleRowKeys ([#4207](https://www.github.com/googleapis/google-cloud-go/issues/4207)) ([5711fb1](https://www.github.com/googleapis/google-cloud-go/commit/5711fb10d25c458807598d736a232bb2210a047a)) -* **documentai:** Fix Ruby gem title of documentai v1 (package not currently published) ([9e80ea0](https://www.github.com/googleapis/google-cloud-go/commit/9e80ea0d053b06876418194f65a478045dc4fe6c)) - -## [0.83.0](https://www.github.com/googleapis/google-cloud-go/compare/v0.82.0...v0.83.0) (2021-06-02) - - -### Features - -* **dialogflow:** added a field in the query result to indicate whether slot filling is cancelled. ([f9cda8f](https://www.github.com/googleapis/google-cloud-go/commit/f9cda8fb6c3d76a062affebe6649f0a43aeb96f3)) -* **essentialcontacts:** start generating apiv1 ([#4118](https://www.github.com/googleapis/google-cloud-go/issues/4118)) ([fe14afc](https://www.github.com/googleapis/google-cloud-go/commit/fe14afcf74e09089b22c4f5221cbe37046570fda)) -* **gsuiteaddons:** start generating apiv1 ([#4082](https://www.github.com/googleapis/google-cloud-go/issues/4082)) ([6de5c99](https://www.github.com/googleapis/google-cloud-go/commit/6de5c99173c4eeaf777af18c47522ca15637d232)) -* **osconfig:** OSConfig: add ExecResourceOutput and per step error message. ([f9cda8f](https://www.github.com/googleapis/google-cloud-go/commit/f9cda8fb6c3d76a062affebe6649f0a43aeb96f3)) -* **osconfig:** start generating apiv1alpha ([#4119](https://www.github.com/googleapis/google-cloud-go/issues/4119)) ([8ad471f](https://www.github.com/googleapis/google-cloud-go/commit/8ad471f26087ec076460df6dcf27769ffe1b8834)) -* **privatecatalog:** start generating apiv1beta1 ([500c1a6](https://www.github.com/googleapis/google-cloud-go/commit/500c1a6101f624cb6032f0ea16147645a02e7076)) -* **serviceusage:** start generating apiv1 ([#4120](https://www.github.com/googleapis/google-cloud-go/issues/4120)) ([e4531f9](https://www.github.com/googleapis/google-cloud-go/commit/e4531f93cfeb6388280bb253ef6eb231aba37098)) -* **shell:** start generating apiv1 ([500c1a6](https://www.github.com/googleapis/google-cloud-go/commit/500c1a6101f624cb6032f0ea16147645a02e7076)) -* **vpcaccess:** start generating apiv1 ([500c1a6](https://www.github.com/googleapis/google-cloud-go/commit/500c1a6101f624cb6032f0ea16147645a02e7076)) - -## [0.82.0](https://www.github.com/googleapis/google-cloud-go/compare/v0.81.0...v0.82.0) (2021-05-17) - - -### Features - -* **billing/budgets:** Added support for configurable budget time period. fix: Updated some documentation links. ([83b1b3b](https://www.github.com/googleapis/google-cloud-go/commit/83b1b3b648c6d9225f07f00e8c0cdabc3d1fc1ab)) -* **billing/budgets:** Added support for configurable budget time period. fix: Updated some documentation links. ([83b1b3b](https://www.github.com/googleapis/google-cloud-go/commit/83b1b3b648c6d9225f07f00e8c0cdabc3d1fc1ab)) -* **cloudbuild/apiv1:** Add fields for Pub/Sub triggers ([8b4adbf](https://www.github.com/googleapis/google-cloud-go/commit/8b4adbf9815e1ec229dfbcfb9189d3ea63112e1b)) -* **cloudbuild/apiv1:** Implementation of Source Manifests: - Added message StorageSourceManifest as an option for the Source message - Added StorageSourceManifest field to the SourceProvenance message ([7fd2ccd](https://www.github.com/googleapis/google-cloud-go/commit/7fd2ccd26adec1468e15fe84bf75210255a9dfea)) -* **clouddms:** start generating apiv1 ([#4081](https://www.github.com/googleapis/google-cloud-go/issues/4081)) ([29df85c](https://www.github.com/googleapis/google-cloud-go/commit/29df85c40ab64d59e389a980c9ce550077839763)) -* **dataproc:** update the Dataproc V1 API client library ([9a459d5](https://www.github.com/googleapis/google-cloud-go/commit/9a459d5d149b9c3b02a35d4245d164b899ff09b3)) -* **dialogflow/cx:** add support for service directory webhooks ([7fd2ccd](https://www.github.com/googleapis/google-cloud-go/commit/7fd2ccd26adec1468e15fe84bf75210255a9dfea)) -* **dialogflow/cx:** add support for service directory webhooks ([7fd2ccd](https://www.github.com/googleapis/google-cloud-go/commit/7fd2ccd26adec1468e15fe84bf75210255a9dfea)) -* **dialogflow/cx:** support setting current_page to resume sessions; expose transition_route_groups in flows and language_code in webhook ([9a459d5](https://www.github.com/googleapis/google-cloud-go/commit/9a459d5d149b9c3b02a35d4245d164b899ff09b3)) -* **dialogflow/cx:** support setting current_page to resume sessions; expose transition_route_groups in flows and language_code in webhook ([9a459d5](https://www.github.com/googleapis/google-cloud-go/commit/9a459d5d149b9c3b02a35d4245d164b899ff09b3)) -* **dialogflow:** added more Environment RPCs feat: added Versions service feat: added Fulfillment service feat: added TextToSpeechSettings. feat: added location in some resource patterns. ([4f73dc1](https://www.github.com/googleapis/google-cloud-go/commit/4f73dc19c2e05ad6133a8eac3d62ddb522314540)) -* **documentai:** add confidence field to the PageAnchor.PageRef in document.proto. ([d089dda](https://www.github.com/googleapis/google-cloud-go/commit/d089dda0089acb9aaef9b3da40b219476af9fc06)) -* **documentai:** add confidence field to the PageAnchor.PageRef in document.proto. ([07fdcd1](https://www.github.com/googleapis/google-cloud-go/commit/07fdcd12499eac26f9b5fae01d6c1282c3e02b7c)) -* **internal/gapicgen:** only update relevant gapic files ([#4066](https://www.github.com/googleapis/google-cloud-go/issues/4066)) ([5948bee](https://www.github.com/googleapis/google-cloud-go/commit/5948beedbadd491601bdee6a006cf685e94a85f4)) -* **internal/gensnippets:** add license header and region tags ([#3924](https://www.github.com/googleapis/google-cloud-go/issues/3924)) ([e9ff7a0](https://www.github.com/googleapis/google-cloud-go/commit/e9ff7a0f9bb1cc67f5d0de47934811960429e72c)) -* **internal/gensnippets:** initial commit ([#3922](https://www.github.com/googleapis/google-cloud-go/issues/3922)) ([3fabef0](https://www.github.com/googleapis/google-cloud-go/commit/3fabef032388713f732ab4dbfc51624cdca0f481)) -* **internal:** auto-generate snippets ([#3949](https://www.github.com/googleapis/google-cloud-go/issues/3949)) ([b70e0fc](https://www.github.com/googleapis/google-cloud-go/commit/b70e0fccdc86813e0d97ff63b585822d4deafb38)) -* **internal:** generate region tags for snippets ([#3962](https://www.github.com/googleapis/google-cloud-go/issues/3962)) ([ef2b90e](https://www.github.com/googleapis/google-cloud-go/commit/ef2b90ea6d47e27744c98a1a9ae0c487c5051808)) -* **metastore:** start generateing apiv1 ([#4083](https://www.github.com/googleapis/google-cloud-go/issues/4083)) ([661610a](https://www.github.com/googleapis/google-cloud-go/commit/661610afa6a9113534884cafb138109536724310)) -* **security/privateca:** start generating apiv1 ([#4023](https://www.github.com/googleapis/google-cloud-go/issues/4023)) ([08aa83a](https://www.github.com/googleapis/google-cloud-go/commit/08aa83a5371bb6485bc3b19b3ed5300f807ce69f)) -* **securitycenter:** add canonical_name and folder fields ([5c5ca08](https://www.github.com/googleapis/google-cloud-go/commit/5c5ca08c637a23cfa3e3a051fea576e1feb324fd)) -* **securitycenter:** add canonical_name and folder fields ([5c5ca08](https://www.github.com/googleapis/google-cloud-go/commit/5c5ca08c637a23cfa3e3a051fea576e1feb324fd)) -* **speech:** add webm opus support. ([d089dda](https://www.github.com/googleapis/google-cloud-go/commit/d089dda0089acb9aaef9b3da40b219476af9fc06)) -* **speech:** Support for spoken punctuation and spoken emojis. ([9a459d5](https://www.github.com/googleapis/google-cloud-go/commit/9a459d5d149b9c3b02a35d4245d164b899ff09b3)) - - -### Bug Fixes - -* **binaryauthorization:** add Java options to Binaryauthorization protos ([9a459d5](https://www.github.com/googleapis/google-cloud-go/commit/9a459d5d149b9c3b02a35d4245d164b899ff09b3)) -* **internal/gapicgen:** filter out internal directory changes ([#4085](https://www.github.com/googleapis/google-cloud-go/issues/4085)) ([01473f6](https://www.github.com/googleapis/google-cloud-go/commit/01473f6d8db26c6e18969ace7f9e87c66e94ad9e)) -* **internal/gapicgen:** use correct region tags for gensnippets ([#4022](https://www.github.com/googleapis/google-cloud-go/issues/4022)) ([8ccd689](https://www.github.com/googleapis/google-cloud-go/commit/8ccd689cab08f016008ca06a939a4828817d4a25)) -* **internal/gensnippets:** run goimports ([#3931](https://www.github.com/googleapis/google-cloud-go/issues/3931)) ([10050f0](https://www.github.com/googleapis/google-cloud-go/commit/10050f05c20c226547d87c08168fa4bc551395c5)) -* **internal:** append a new line to comply with go fmt ([#4028](https://www.github.com/googleapis/google-cloud-go/issues/4028)) ([a297278](https://www.github.com/googleapis/google-cloud-go/commit/a2972783c4af806199d1c67c9f63ad9677f20f34)) -* **internal:** make sure formatting is run on snippets ([#4039](https://www.github.com/googleapis/google-cloud-go/issues/4039)) ([130dfc5](https://www.github.com/googleapis/google-cloud-go/commit/130dfc535396e98fc009585b0457e3bc48ead941)), refs [#4037](https://www.github.com/googleapis/google-cloud-go/issues/4037) -* **metastore:** increase metastore lro polling timeouts ([83b1b3b](https://www.github.com/googleapis/google-cloud-go/commit/83b1b3b648c6d9225f07f00e8c0cdabc3d1fc1ab)) - - -### Miscellaneous Chores - -* **all:** fix release version ([#4040](https://www.github.com/googleapis/google-cloud-go/issues/4040)) ([4c991a9](https://www.github.com/googleapis/google-cloud-go/commit/4c991a928665d9be93691decce0c653f430688b7)) - -## [0.81.0](https://www.github.com/googleapis/google-cloud-go/compare/v0.80.0...v0.81.0) (2021-04-02) - - -### Features - -* **datacatalog:** Policy Tag Manager v1 API service feat: new RenameTagTemplateFieldEnumValue API feat: adding fully_qualified_name in lookup and search feat: added DATAPROC_METASTORE integrated system along with new entry types: DATABASE and SERVICE docs: Documentation improvements ([2b02a03](https://www.github.com/googleapis/google-cloud-go/commit/2b02a03ff9f78884da5a8e7b64a336014c61bde7)) -* **dialogflow/cx:** include original user query in WebhookRequest; add GetTextCaseresult API. doc: clarify resource format for session response. ([a0b1f6f](https://www.github.com/googleapis/google-cloud-go/commit/a0b1f6faae77d014fdee166ab018ddcd6f846ab4)) -* **dialogflow/cx:** include original user query in WebhookRequest; add GetTextCaseresult API. doc: clarify resource format for session response. ([b5b4da6](https://www.github.com/googleapis/google-cloud-go/commit/b5b4da6952922440d03051f629f3166f731dfaa3)) -* **dialogflow:** expose MP3_64_KBPS and MULAW for output audio encodings. ([b5b4da6](https://www.github.com/googleapis/google-cloud-go/commit/b5b4da6952922440d03051f629f3166f731dfaa3)) -* **secretmanager:** Rotation for Secrets ([2b02a03](https://www.github.com/googleapis/google-cloud-go/commit/2b02a03ff9f78884da5a8e7b64a336014c61bde7)) - - -### Bug Fixes - -* **internal/godocfx:** filter out non-Cloud ([#3878](https://www.github.com/googleapis/google-cloud-go/issues/3878)) ([625aef9](https://www.github.com/googleapis/google-cloud-go/commit/625aef9b47181cf627587cc9cde9e400713c6678)) - -## [0.80.0](https://www.github.com/googleapis/google-cloud-go/compare/v0.79.0...v0.80.0) (2021-03-23) - - -### ⚠ BREAKING CHANGES - -* **all:** This is a breaking change in dialogflow - -### Features - -* **appengine:** added vm_liveness, search_api_available, network_settings, service_account, build_env_variables, kms_key_reference to v1 API ([fd04a55](https://www.github.com/googleapis/google-cloud-go/commit/fd04a552213f99619c714b5858548f61f4948493)) -* **assuredworkloads:** Add 'resource_settings' field to provide custom properties (ids) for the provisioned projects. ([ab4824a](https://www.github.com/googleapis/google-cloud-go/commit/ab4824a7914864228e59b244d6382de862139524)) -* **assuredworkloads:** add HIPAA and HITRUST compliance regimes ([ab4824a](https://www.github.com/googleapis/google-cloud-go/commit/ab4824a7914864228e59b244d6382de862139524)) -* **dialogflow/cx:** added fallback option when restoring an agent docs: clarified experiment length ([cd70aa9](https://www.github.com/googleapis/google-cloud-go/commit/cd70aa9cc1a5dccfe4e49d2d6ca6db2119553c86)) -* **dialogflow/cx:** start generating apiv3 ([#3850](https://www.github.com/googleapis/google-cloud-go/issues/3850)) ([febbdcf](https://www.github.com/googleapis/google-cloud-go/commit/febbdcf13fcea3f5d8186c3d3dface1c0d27ef9e)), refs [#3634](https://www.github.com/googleapis/google-cloud-go/issues/3634) -* **documentai:** add EVAL_SKIPPED value to the Provenance.OperationType enum in document.proto. ([cb43066](https://www.github.com/googleapis/google-cloud-go/commit/cb4306683926843f6e977f207fa6070bb9242a61)) -* **documentai:** start generating apiv1 ([#3853](https://www.github.com/googleapis/google-cloud-go/issues/3853)) ([d68e604](https://www.github.com/googleapis/google-cloud-go/commit/d68e604c953eea90489f6134e71849b24dd0fcbf)) -* **internal/godocfx:** add prettyprint class to code blocks ([#3819](https://www.github.com/googleapis/google-cloud-go/issues/3819)) ([6e49f21](https://www.github.com/googleapis/google-cloud-go/commit/6e49f2148b116ee439c8a882dcfeefb6e7647c57)) -* **internal/godocfx:** handle Markdown content ([#3816](https://www.github.com/googleapis/google-cloud-go/issues/3816)) ([56d5d0a](https://www.github.com/googleapis/google-cloud-go/commit/56d5d0a900197fb2de46120a0eda649f2c17448f)) -* **kms:** Add maxAttempts to retry policy for KMS gRPC service config feat: Add Bazel exports_files entry for KMS gRPC service config ([fd04a55](https://www.github.com/googleapis/google-cloud-go/commit/fd04a552213f99619c714b5858548f61f4948493)) -* **resourcesettings:** start generating apiv1 ([#3854](https://www.github.com/googleapis/google-cloud-go/issues/3854)) ([3b288b4](https://www.github.com/googleapis/google-cloud-go/commit/3b288b4fa593c6cb418f696b5b26768967c20b9e)) -* **speech:** Support output transcript to GCS for LongRunningRecognize. ([fd04a55](https://www.github.com/googleapis/google-cloud-go/commit/fd04a552213f99619c714b5858548f61f4948493)) -* **speech:** Support output transcript to GCS for LongRunningRecognize. ([cd70aa9](https://www.github.com/googleapis/google-cloud-go/commit/cd70aa9cc1a5dccfe4e49d2d6ca6db2119553c86)) -* **speech:** Support output transcript to GCS for LongRunningRecognize. ([35a8706](https://www.github.com/googleapis/google-cloud-go/commit/35a870662df8bf63c4ec10a0233d1d7a708007ee)) - - -### Miscellaneous Chores - -* **all:** auto-regenerate gapics ([#3837](https://www.github.com/googleapis/google-cloud-go/issues/3837)) ([ab4824a](https://www.github.com/googleapis/google-cloud-go/commit/ab4824a7914864228e59b244d6382de862139524)) - -## [0.79.0](https://www.github.com/googleapis/google-cloud-go/compare/v0.78.0...v0.79.0) (2021-03-10) - - -### Features - -* **apigateway:** start generating apiv1 ([#3726](https://www.github.com/googleapis/google-cloud-go/issues/3726)) ([66046da](https://www.github.com/googleapis/google-cloud-go/commit/66046da2a4be5971ce2655dc6a5e1fadb08c3d1f)) -* **channel:** addition of billing_account field on Plan. docs: clarification that valid address lines are required for all customers. ([d4246aa](https://www.github.com/googleapis/google-cloud-go/commit/d4246aad4da3c3ef12350385f229bb908e3fb215)) -* **dialogflow/cx:** allow to disable webhook invocation per request ([d4246aa](https://www.github.com/googleapis/google-cloud-go/commit/d4246aad4da3c3ef12350385f229bb908e3fb215)) -* **dialogflow/cx:** allow to disable webhook invocation per request ([44c6bf9](https://www.github.com/googleapis/google-cloud-go/commit/44c6bf986f39a3c9fddf46788ae63bfbb3739441)) -* **dialogflow:** Add CCAI API ([18c88c4](https://www.github.com/googleapis/google-cloud-go/commit/18c88c437bd1741eaf5bf5911b9da6f6ea7cd75d)) -* **documentai:** remove the translation fields in document.proto. ([18c88c4](https://www.github.com/googleapis/google-cloud-go/commit/18c88c437bd1741eaf5bf5911b9da6f6ea7cd75d)) -* **documentai:** Update documentai/v1beta3 protos: add support for boolean normalized value ([529925b](https://www.github.com/googleapis/google-cloud-go/commit/529925ba79f4d3191ef80a13e566d86210fe4d25)) -* **internal/godocfx:** keep some cross links on same domain ([#3767](https://www.github.com/googleapis/google-cloud-go/issues/3767)) ([77f76ed](https://www.github.com/googleapis/google-cloud-go/commit/77f76ed09cb07a090ba9054063a7c002a35bca4e)) -* **internal:** add ability to regenerate one module's docs ([#3777](https://www.github.com/googleapis/google-cloud-go/issues/3777)) ([dc15995](https://www.github.com/googleapis/google-cloud-go/commit/dc15995521bd065da4cfaae95642588919a8c548)) -* **metastore:** added support for release channels when creating service ([18c88c4](https://www.github.com/googleapis/google-cloud-go/commit/18c88c437bd1741eaf5bf5911b9da6f6ea7cd75d)) -* **metastore:** Publish Dataproc Metastore v1alpha API ([18c88c4](https://www.github.com/googleapis/google-cloud-go/commit/18c88c437bd1741eaf5bf5911b9da6f6ea7cd75d)) -* **metastore:** start generating apiv1alpha ([#3747](https://www.github.com/googleapis/google-cloud-go/issues/3747)) ([359312a](https://www.github.com/googleapis/google-cloud-go/commit/359312ad6d4f61fb341d41ffa35fc0634979e650)) -* **metastore:** start generating apiv1beta ([#3788](https://www.github.com/googleapis/google-cloud-go/issues/3788)) ([2977095](https://www.github.com/googleapis/google-cloud-go/commit/297709593ad32f234c0fbcfa228cffcfd3e591f4)) -* **secretmanager:** added topic field to Secret ([f1323b1](https://www.github.com/googleapis/google-cloud-go/commit/f1323b10a3c7cc1d215730cefd3062064ef54c01)) - - -### Bug Fixes - -* **analytics/admin:** add `https://www.googleapis.com/auth/analytics.edit` OAuth2 scope to the list of acceptable scopes for all read only methods of the Admin API docs: update the documentation of the `update_mask` field used by Update() methods ([f1323b1](https://www.github.com/googleapis/google-cloud-go/commit/f1323b10a3c7cc1d215730cefd3062064ef54c01)) -* **apigateway:** Provide resource definitions for service management and IAM resources ([18c88c4](https://www.github.com/googleapis/google-cloud-go/commit/18c88c437bd1741eaf5bf5911b9da6f6ea7cd75d)) -* **functions:** Fix service namespace in grpc_service_config. ([7811a34](https://www.github.com/googleapis/google-cloud-go/commit/7811a34ef64d722480c640810251bb3a0d65d495)) -* **internal/godocfx:** prevent index out of bounds when pkg == mod ([#3768](https://www.github.com/googleapis/google-cloud-go/issues/3768)) ([3d80b4e](https://www.github.com/googleapis/google-cloud-go/commit/3d80b4e93b0f7e857d6e9681d8d6a429750ecf80)) -* **internal/godocfx:** use correct anchor links ([#3738](https://www.github.com/googleapis/google-cloud-go/issues/3738)) ([919039a](https://www.github.com/googleapis/google-cloud-go/commit/919039a01a006c41e720218bd55f83ce98a5edef)) -* **internal:** fix Bash syntax ([#3779](https://www.github.com/googleapis/google-cloud-go/issues/3779)) ([3dd245d](https://www.github.com/googleapis/google-cloud-go/commit/3dd245dbdbfa84f0bbe5a476412d8463fe3e700c)) -* **tables:** use area120tables_v1alpha1.yaml as api-service-config ([#3759](https://www.github.com/googleapis/google-cloud-go/issues/3759)) ([b130ec0](https://www.github.com/googleapis/google-cloud-go/commit/b130ec0aa946b1a1eaa4d5a7c33e72353ac1612e)) - -## [0.78.0](https://www.github.com/googleapis/google-cloud-go/compare/v0.77.0...v0.78.0) (2021-02-22) - - -### Features - -* **area120/tables:** Added ListWorkspaces, GetWorkspace, BatchDeleteRows APIs. ([16597fa](https://www.github.com/googleapis/google-cloud-go/commit/16597fa1ce549053c7183e8456e23f554a5501de)) -* **area120/tables:** Added ListWorkspaces, GetWorkspace, BatchDeleteRows APIs. ([0bd21d7](https://www.github.com/googleapis/google-cloud-go/commit/0bd21d793f75924e5a2d033c58e8aaef89cf8113)) -* **dialogflow:** add additional_bindings to Dialogflow v2 ListIntents API docs: update copyrights and session docs ([0bd21d7](https://www.github.com/googleapis/google-cloud-go/commit/0bd21d793f75924e5a2d033c58e8aaef89cf8113)) -* **documentai:** Update documentai/v1beta3 protos ([613ced7](https://www.github.com/googleapis/google-cloud-go/commit/613ced702bbc82a154a4d3641b483f71c7cd1af4)) -* **gkehub:** Update Membership API v1beta1 proto ([613ced7](https://www.github.com/googleapis/google-cloud-go/commit/613ced702bbc82a154a4d3641b483f71c7cd1af4)) -* **servicecontrol:** Update the ruby_cloud_gapic_library rules for the libraries published to google-cloud-ruby to the form that works with build_gen (separate parameters for ruby_cloud_title and ruby_cloud_description). chore: Update Bazel-Ruby rules version. chore: Update build_gen version. ([0bd21d7](https://www.github.com/googleapis/google-cloud-go/commit/0bd21d793f75924e5a2d033c58e8aaef89cf8113)) -* **speech:** Support Model Adaptation. ([0bd21d7](https://www.github.com/googleapis/google-cloud-go/commit/0bd21d793f75924e5a2d033c58e8aaef89cf8113)) - - -### Bug Fixes - -* **dialogflow/cx:** RunTestCase http template. PHP REST client lib can be generated. feat: Support transition route group coverage for Test Cases. ([613ced7](https://www.github.com/googleapis/google-cloud-go/commit/613ced702bbc82a154a4d3641b483f71c7cd1af4)) -* **errorreporting:** Fixes ruby gem build ([0bd21d7](https://www.github.com/googleapis/google-cloud-go/commit/0bd21d793f75924e5a2d033c58e8aaef89cf8113)) - -## [0.77.0](https://www.github.com/googleapis/google-cloud-go/compare/v0.76.0...v0.77.0) (2021-02-16) - - -### Features - -* **channel:** Add Pub/Sub endpoints for Cloud Channel API. ([1aea7c8](https://www.github.com/googleapis/google-cloud-go/commit/1aea7c87d39eed87620b488ba0dd60b88ff26c04)) -* **dialogflow/cx:** supports SentimentAnalysisResult in webhook request docs: minor updates in wording ([2b4414d](https://www.github.com/googleapis/google-cloud-go/commit/2b4414d973e3445725cd38901bf75340c97fc663)) -* **errorreporting:** Make resolution status field available for error groups. Now callers can set the status of an error group by passing this to UpdateGroup. When not specified, it's treated like OPEN. feat: Make source location available for error groups created from GAE. ([2b4414d](https://www.github.com/googleapis/google-cloud-go/commit/2b4414d973e3445725cd38901bf75340c97fc663)) -* **errorreporting:** Make resolution status field available for error groups. Now callers can set the status of an error group by passing this to UpdateGroup. When not specified, it's treated like OPEN. feat: Make source location available for error groups created from GAE. ([f66114b](https://www.github.com/googleapis/google-cloud-go/commit/f66114bc7233ad06e18f38dd39497a74d85fdbd8)) -* **gkehub:** start generating apiv1beta1 ([#3698](https://www.github.com/googleapis/google-cloud-go/issues/3698)) ([8aed3bd](https://www.github.com/googleapis/google-cloud-go/commit/8aed3bd1bbbe983e4891c813e4c5dc9b3aa1b9b2)) -* **internal/docfx:** full cross reference linking ([#3656](https://www.github.com/googleapis/google-cloud-go/issues/3656)) ([fcb7318](https://www.github.com/googleapis/google-cloud-go/commit/fcb7318eb338bf3828ac831ed06ca630e1876418)) -* **memcache:** added ApplySoftwareUpdate API docs: various clarifications, new documentation for ApplySoftwareUpdate chore: update proto annotations ([2b4414d](https://www.github.com/googleapis/google-cloud-go/commit/2b4414d973e3445725cd38901bf75340c97fc663)) -* **networkconnectivity:** Add state field in resources docs: Minor changes ([0b4370a](https://www.github.com/googleapis/google-cloud-go/commit/0b4370a0d397913d932dbbdc2046a958dc3b836a)) -* **networkconnectivity:** Add state field in resources docs: Minor changes ([b4b5898](https://www.github.com/googleapis/google-cloud-go/commit/b4b58987368f80494bbc7f651f50e9123200fb3f)) -* **recommendationengine:** start generating apiv1beta1 ([#3686](https://www.github.com/googleapis/google-cloud-go/issues/3686)) ([8f4e130](https://www.github.com/googleapis/google-cloud-go/commit/8f4e13009444d88a5a56144129f055623a2205ac)) - - -### Bug Fixes - -* **errorreporting:** Remove dependency on AppEngine's proto definitions. This also removes the source_references field. ([2b4414d](https://www.github.com/googleapis/google-cloud-go/commit/2b4414d973e3445725cd38901bf75340c97fc663)) -* **errorreporting:** Update bazel builds for ER client libraries. ([0b4370a](https://www.github.com/googleapis/google-cloud-go/commit/0b4370a0d397913d932dbbdc2046a958dc3b836a)) -* **internal/godocfx:** use exact list of top-level decls ([#3665](https://www.github.com/googleapis/google-cloud-go/issues/3665)) ([3cd2961](https://www.github.com/googleapis/google-cloud-go/commit/3cd2961bd7b9c29d82a21ba8850eff00c7c332fd)) -* **kms:** do not retry on 13 INTERNAL ([2b4414d](https://www.github.com/googleapis/google-cloud-go/commit/2b4414d973e3445725cd38901bf75340c97fc663)) -* **orgpolicy:** Fix constraint resource pattern annotation ([f66114b](https://www.github.com/googleapis/google-cloud-go/commit/f66114bc7233ad06e18f38dd39497a74d85fdbd8)) -* **orgpolicy:** Fix constraint resource pattern annotation ([0b4370a](https://www.github.com/googleapis/google-cloud-go/commit/0b4370a0d397913d932dbbdc2046a958dc3b836a)) -* **profiler:** make sure retries use the most up-to-date copy of the trailer ([#3660](https://www.github.com/googleapis/google-cloud-go/issues/3660)) ([3ba9ebc](https://www.github.com/googleapis/google-cloud-go/commit/3ba9ebcee2b8b43cdf2c8f8a3d810516a604b363)) -* **vision:** sync vision v1 protos to get extra FaceAnnotation Landmark Types ([2b4414d](https://www.github.com/googleapis/google-cloud-go/commit/2b4414d973e3445725cd38901bf75340c97fc663)) - -## [0.76.0](https://www.github.com/googleapis/google-cloud-go/compare/v0.75.0...v0.76.0) (2021-02-02) - - -### Features - -* **accessapproval:** Migrate the Bazel rules for the libraries published to google-cloud-ruby to use the gapic-generator-ruby instead of the monolith generator. ([ac22beb](https://www.github.com/googleapis/google-cloud-go/commit/ac22beb9b90771b24c8b35db7587ad3f5c0a970e)) -* **all:** auto-regenerate gapics ([#3526](https://www.github.com/googleapis/google-cloud-go/issues/3526)) ([ab2af0b](https://www.github.com/googleapis/google-cloud-go/commit/ab2af0b32630dd97f44800f4e273184f887375db)) -* **all:** auto-regenerate gapics ([#3539](https://www.github.com/googleapis/google-cloud-go/issues/3539)) ([84d4d8a](https://www.github.com/googleapis/google-cloud-go/commit/84d4d8ae2d3fbf34a4a312a0a2e4062d18caaa3d)) -* **all:** auto-regenerate gapics ([#3546](https://www.github.com/googleapis/google-cloud-go/issues/3546)) ([959fde5](https://www.github.com/googleapis/google-cloud-go/commit/959fde5ab12f7aee206dd46022e3cad1bc3470f7)) -* **all:** auto-regenerate gapics ([#3563](https://www.github.com/googleapis/google-cloud-go/issues/3563)) ([102112a](https://www.github.com/googleapis/google-cloud-go/commit/102112a4e9285a16645aabc89789f613d4f47c9e)) -* **all:** auto-regenerate gapics ([#3576](https://www.github.com/googleapis/google-cloud-go/issues/3576)) ([ac22beb](https://www.github.com/googleapis/google-cloud-go/commit/ac22beb9b90771b24c8b35db7587ad3f5c0a970e)) -* **all:** auto-regenerate gapics ([#3580](https://www.github.com/googleapis/google-cloud-go/issues/3580)) ([9974a80](https://www.github.com/googleapis/google-cloud-go/commit/9974a8017b5de8129a586f2404a23396caea0ee1)) -* **all:** auto-regenerate gapics ([#3587](https://www.github.com/googleapis/google-cloud-go/issues/3587)) ([3859a6f](https://www.github.com/googleapis/google-cloud-go/commit/3859a6ffc447e9c0b4ef231e2788fbbcfe48a94f)) -* **all:** auto-regenerate gapics ([#3598](https://www.github.com/googleapis/google-cloud-go/issues/3598)) ([7bdebad](https://www.github.com/googleapis/google-cloud-go/commit/7bdebadbe06774c94ab745dfef4ce58ce40a5582)) -* **appengine:** start generating apiv1 ([#3561](https://www.github.com/googleapis/google-cloud-go/issues/3561)) ([2b6a3b4](https://www.github.com/googleapis/google-cloud-go/commit/2b6a3b4609e389da418a83eb60a8ae3710d646d7)) -* **assuredworkloads:** updated google.cloud.assuredworkloads.v1beta1.AssuredWorkloadsService service. Clients can now create workloads with US_REGIONAL_ACCESS compliance regime ([7bdebad](https://www.github.com/googleapis/google-cloud-go/commit/7bdebadbe06774c94ab745dfef4ce58ce40a5582)) -* **binaryauthorization:** start generating apiv1beta1 ([#3562](https://www.github.com/googleapis/google-cloud-go/issues/3562)) ([56e18a6](https://www.github.com/googleapis/google-cloud-go/commit/56e18a64836ab9482528b212eb139f649f7a35c3)) -* **channel:** Add Pub/Sub endpoints for Cloud Channel API. ([9070c86](https://www.github.com/googleapis/google-cloud-go/commit/9070c86e2c69f9405d42fc0e6fe7afd4a256d8b8)) -* **cloudtasks:** introducing field: ListQueuesRequest.read_mask, GetQueueRequest.read_mask, Queue.task_ttl, Queue.tombstone_ttl, Queue.stats, Task.pull_message and introducing messages: QueueStats PullMessage docs: updates to max burst size description ([7bdebad](https://www.github.com/googleapis/google-cloud-go/commit/7bdebadbe06774c94ab745dfef4ce58ce40a5582)) -* **cloudtasks:** introducing fields: ListQueuesRequest.read_mask, GetQueueRequest.read_mask, Queue.task_ttl, Queue.tombstone_ttl, Queue.stats and introducing messages: QueueStats docs: updates to AppEngineHttpRequest description ([7bdebad](https://www.github.com/googleapis/google-cloud-go/commit/7bdebadbe06774c94ab745dfef4ce58ce40a5582)) -* **datalabeling:** start generating apiv1beta1 ([#3582](https://www.github.com/googleapis/google-cloud-go/issues/3582)) ([d8a7fee](https://www.github.com/googleapis/google-cloud-go/commit/d8a7feef51d3344fa7e258aba1d9fbdab56dadcf)) -* **dataqna:** start generating apiv1alpha ([#3586](https://www.github.com/googleapis/google-cloud-go/issues/3586)) ([24c5b8f](https://www.github.com/googleapis/google-cloud-go/commit/24c5b8f4f45f8cd8b3001b1ca5a8d80e9f3b39d5)) -* **dialogflow/cx:** Add new Experiment service docs: minor doc update on redact field in intent.proto and page.proto ([0959f27](https://www.github.com/googleapis/google-cloud-go/commit/0959f27e85efe94d39437ceef0ff62ddceb8e7a7)) -* **dialogflow/cx:** added support for test cases and agent validation ([7bdebad](https://www.github.com/googleapis/google-cloud-go/commit/7bdebadbe06774c94ab745dfef4ce58ce40a5582)) -* **dialogflow/cx:** added support for test cases and agent validation ([3859a6f](https://www.github.com/googleapis/google-cloud-go/commit/3859a6ffc447e9c0b4ef231e2788fbbcfe48a94f)) -* **dialogflow:** add C++ targets for DialogFlow ([959fde5](https://www.github.com/googleapis/google-cloud-go/commit/959fde5ab12f7aee206dd46022e3cad1bc3470f7)) -* **documentai:** start generating apiv1beta3 ([#3595](https://www.github.com/googleapis/google-cloud-go/issues/3595)) ([5ae21fa](https://www.github.com/googleapis/google-cloud-go/commit/5ae21fa1cfb8b8dacbcd0fc43eee430f7db63102)) -* **domains:** start generating apiv1beta1 ([#3632](https://www.github.com/googleapis/google-cloud-go/issues/3632)) ([b8ada6f](https://www.github.com/googleapis/google-cloud-go/commit/b8ada6f197e680d0bb26aa031e6431bc099a3149)) -* **godocfx:** include alt documentation link ([#3530](https://www.github.com/googleapis/google-cloud-go/issues/3530)) ([806cdd5](https://www.github.com/googleapis/google-cloud-go/commit/806cdd56fb6fdddd7a6c1354e55e0d1259bd6c8b)) -* **internal/gapicgen:** change commit formatting to match standard ([#3500](https://www.github.com/googleapis/google-cloud-go/issues/3500)) ([d1e3d46](https://www.github.com/googleapis/google-cloud-go/commit/d1e3d46c47c425581e2b149c07f8e27ffc373c7e)) -* **internal/godocfx:** xref function declarations ([#3615](https://www.github.com/googleapis/google-cloud-go/issues/3615)) ([2bdbb87](https://www.github.com/googleapis/google-cloud-go/commit/2bdbb87a682d799cf5e262a61a3ef1faf41151af)) -* **mediatranslation:** start generating apiv1beta1 ([#3636](https://www.github.com/googleapis/google-cloud-go/issues/3636)) ([4129469](https://www.github.com/googleapis/google-cloud-go/commit/412946966cf7f53c51deff1b1cc1a12d62ed0279)) -* **memcache:** start generating apiv1 ([#3579](https://www.github.com/googleapis/google-cloud-go/issues/3579)) ([eabf7cf](https://www.github.com/googleapis/google-cloud-go/commit/eabf7cfde7b3a3cc1b35c320ba52e07be9926359)) -* **networkconnectivity:** initial generation of apiv1alpha1 ([#3567](https://www.github.com/googleapis/google-cloud-go/issues/3567)) ([adf489a](https://www.github.com/googleapis/google-cloud-go/commit/adf489a536292e3196677621477eae0d52761e7f)) -* **orgpolicy:** start generating apiv2 ([#3652](https://www.github.com/googleapis/google-cloud-go/issues/3652)) ([c103847](https://www.github.com/googleapis/google-cloud-go/commit/c1038475779fda3589aa9659d4ad0b703036b531)) -* **osconfig/agentendpoint:** add ApplyConfigTask to AgentEndpoint API ([9070c86](https://www.github.com/googleapis/google-cloud-go/commit/9070c86e2c69f9405d42fc0e6fe7afd4a256d8b8)) -* **osconfig/agentendpoint:** add ApplyConfigTask to AgentEndpoint API ([9af529c](https://www.github.com/googleapis/google-cloud-go/commit/9af529c21e98b62c4617f7a7191c307659cf8bb8)) -* **recommender:** add bindings for folder/org type resources for protos in recommendations, insights and recommender_service to enable v1 api for folder/org ([7bdebad](https://www.github.com/googleapis/google-cloud-go/commit/7bdebadbe06774c94ab745dfef4ce58ce40a5582)) -* **recommender:** auto generated cl for enabling v1beta1 folder/org APIs and integration test ([7bdebad](https://www.github.com/googleapis/google-cloud-go/commit/7bdebadbe06774c94ab745dfef4ce58ce40a5582)) -* **resourcemanager:** start generating apiv2 ([#3575](https://www.github.com/googleapis/google-cloud-go/issues/3575)) ([93d0ebc](https://www.github.com/googleapis/google-cloud-go/commit/93d0ebceb4270351518a13958005bb68f0cace60)) -* **secretmanager:** added expire_time and ttl fields to Secret ([9974a80](https://www.github.com/googleapis/google-cloud-go/commit/9974a8017b5de8129a586f2404a23396caea0ee1)) -* **secretmanager:** added expire_time and ttl fields to Secret ([ac22beb](https://www.github.com/googleapis/google-cloud-go/commit/ac22beb9b90771b24c8b35db7587ad3f5c0a970e)) -* **servicecontrol:** start generating apiv1 ([#3644](https://www.github.com/googleapis/google-cloud-go/issues/3644)) ([f84938b](https://www.github.com/googleapis/google-cloud-go/commit/f84938bb4042a5629fd66bda42de028fd833648a)) -* **servicemanagement:** start generating apiv1 ([#3614](https://www.github.com/googleapis/google-cloud-go/issues/3614)) ([b96134f](https://www.github.com/googleapis/google-cloud-go/commit/b96134fe91c182237359000cd544af5fec60d7db)) - - -### Bug Fixes - -* **datacatalog:** Update PHP package name casing to match the PHP namespace in the proto files ([c7ecf0f](https://www.github.com/googleapis/google-cloud-go/commit/c7ecf0f3f454606b124e52d20af2545b2c68646f)) -* **internal/godocfx:** add TOC element for module root package ([#3599](https://www.github.com/googleapis/google-cloud-go/issues/3599)) ([1d6eb23](https://www.github.com/googleapis/google-cloud-go/commit/1d6eb238206fcf8815d88981527ef176851afd7a)) -* **profiler:** Force gax to retry in case of certificate errors ([#3178](https://www.github.com/googleapis/google-cloud-go/issues/3178)) ([35dcd72](https://www.github.com/googleapis/google-cloud-go/commit/35dcd725dcd03266ed7439de40c277376b38cd71)) - -## [0.75.0](https://www.github.com/googleapis/google-cloud-go/compare/v0.74.0...v0.75.0) (2021-01-11) - - -### Features - -* **all:** auto-regenerate gapics , refs [#3514](https://www.github.com/googleapis/google-cloud-go/issues/3514) [#3501](https://www.github.com/googleapis/google-cloud-go/issues/3501) [#3497](https://www.github.com/googleapis/google-cloud-go/issues/3497) [#3455](https://www.github.com/googleapis/google-cloud-go/issues/3455) [#3448](https://www.github.com/googleapis/google-cloud-go/issues/3448) -* **channel:** start generating apiv1 ([#3517](https://www.github.com/googleapis/google-cloud-go/issues/3517)) ([2cf3b3c](https://www.github.com/googleapis/google-cloud-go/commit/2cf3b3cf7d99f2efd6868a710fad9e935fc87965)) - - -### Bug Fixes - -* **internal/gapicgen:** don't regen files that have been deleted ([#3471](https://www.github.com/googleapis/google-cloud-go/issues/3471)) ([112ca94](https://www.github.com/googleapis/google-cloud-go/commit/112ca9416cc8a2502b32547dc8d789655452f84a)) - -## [0.74.0](https://www.github.com/googleapis/google-cloud-go/compare/v0.73.0...v0.74.0) (2020-12-10) - - -### Features - -* **all:** auto-regenerate gapics , refs [#3440](https://www.github.com/googleapis/google-cloud-go/issues/3440) [#3436](https://www.github.com/googleapis/google-cloud-go/issues/3436) [#3394](https://www.github.com/googleapis/google-cloud-go/issues/3394) [#3391](https://www.github.com/googleapis/google-cloud-go/issues/3391) [#3374](https://www.github.com/googleapis/google-cloud-go/issues/3374) -* **internal/gapicgen:** support generating only gapics with genlocal ([#3383](https://www.github.com/googleapis/google-cloud-go/issues/3383)) ([eaa742a](https://www.github.com/googleapis/google-cloud-go/commit/eaa742a248dc7d93c019863248f28e37f88aae84)) -* **servicedirectory:** start generating apiv1 ([#3382](https://www.github.com/googleapis/google-cloud-go/issues/3382)) ([2774925](https://www.github.com/googleapis/google-cloud-go/commit/2774925925909071ebc585cf7400373334c156ba)) - - -### Bug Fixes - -* **internal/gapicgen:** don't create genproto pr as draft ([#3379](https://www.github.com/googleapis/google-cloud-go/issues/3379)) ([517ab0f](https://www.github.com/googleapis/google-cloud-go/commit/517ab0f25e544498c5374b256354bc41ba936ad5)) - -## [0.73.0](https://www.github.com/googleapis/google-cloud-go/compare/v0.72.0...v0.73.0) (2020-12-04) - - -### Features - -* **all:** auto-regenerate gapics , refs [#3335](https://www.github.com/googleapis/google-cloud-go/issues/3335) [#3294](https://www.github.com/googleapis/google-cloud-go/issues/3294) [#3250](https://www.github.com/googleapis/google-cloud-go/issues/3250) [#3229](https://www.github.com/googleapis/google-cloud-go/issues/3229) [#3211](https://www.github.com/googleapis/google-cloud-go/issues/3211) [#3217](https://www.github.com/googleapis/google-cloud-go/issues/3217) [#3212](https://www.github.com/googleapis/google-cloud-go/issues/3212) [#3209](https://www.github.com/googleapis/google-cloud-go/issues/3209) [#3206](https://www.github.com/googleapis/google-cloud-go/issues/3206) [#3199](https://www.github.com/googleapis/google-cloud-go/issues/3199) -* **artifactregistry:** start generating apiv1beta2 ([#3352](https://www.github.com/googleapis/google-cloud-go/issues/3352)) ([2e6f20b](https://www.github.com/googleapis/google-cloud-go/commit/2e6f20b0ab438b0b366a1a3802fc64d1a0e66fff)) -* **internal:** copy pubsub Message and PublishResult to internal/pubsub ([#3351](https://www.github.com/googleapis/google-cloud-go/issues/3351)) ([82521ee](https://www.github.com/googleapis/google-cloud-go/commit/82521ee5038735c1663525658d27e4df00ec90be)) -* **internal/gapicgen:** support adding context to regen ([#3174](https://www.github.com/googleapis/google-cloud-go/issues/3174)) ([941ab02](https://www.github.com/googleapis/google-cloud-go/commit/941ab029ba6f7f33e8b2e31e3818aeb68312a999)) -* **internal/kokoro:** add ability to regen all DocFX YAML ([#3191](https://www.github.com/googleapis/google-cloud-go/issues/3191)) ([e12046b](https://www.github.com/googleapis/google-cloud-go/commit/e12046bc4431d33aee72c324e6eb5cc907a4214a)) - - -### Bug Fixes - -* **internal/godocfx:** filter out test packages from other modules ([#3197](https://www.github.com/googleapis/google-cloud-go/issues/3197)) ([1d397aa](https://www.github.com/googleapis/google-cloud-go/commit/1d397aa8b41f8f980cba1d3dcc50f11e4d4f4ca0)) - -## [0.72.0](https://www.github.com/googleapis/google-cloud-go/compare/v0.71.0...v0.72.0) (2020-11-10) - - -### Features - -* **all:** auto-regenerate gapics , refs [#3177](https://www.github.com/googleapis/google-cloud-go/issues/3177) [#3164](https://www.github.com/googleapis/google-cloud-go/issues/3164) [#3149](https://www.github.com/googleapis/google-cloud-go/issues/3149) [#3142](https://www.github.com/googleapis/google-cloud-go/issues/3142) [#3136](https://www.github.com/googleapis/google-cloud-go/issues/3136) [#3130](https://www.github.com/googleapis/google-cloud-go/issues/3130) [#3121](https://www.github.com/googleapis/google-cloud-go/issues/3121) [#3119](https://www.github.com/googleapis/google-cloud-go/issues/3119) - - -### Bug Fixes - -* **all:** Update hand-written clients to not use WithEndpoint override ([#3111](https://www.github.com/googleapis/google-cloud-go/issues/3111)) ([f0cfd05](https://www.github.com/googleapis/google-cloud-go/commit/f0cfd0532f5204ff16f7bae406efa72603d16f44)) -* **internal/godocfx:** rename README files to pkg-readme ([#3185](https://www.github.com/googleapis/google-cloud-go/issues/3185)) ([d3a8571](https://www.github.com/googleapis/google-cloud-go/commit/d3a85719be411b692aede3331abb29b5a7b3da9a)) - - -## [0.71.0](https://www.github.com/googleapis/google-cloud-go/compare/v0.70.0...v0.71.0) (2020-10-30) - - -### Features - -* **all:** auto-regenerate gapics , refs [#3115](https://www.github.com/googleapis/google-cloud-go/issues/3115) [#3106](https://www.github.com/googleapis/google-cloud-go/issues/3106) [#3102](https://www.github.com/googleapis/google-cloud-go/issues/3102) [#3083](https://www.github.com/googleapis/google-cloud-go/issues/3083) [#3073](https://www.github.com/googleapis/google-cloud-go/issues/3073) [#3057](https://www.github.com/googleapis/google-cloud-go/issues/3057) [#3044](https://www.github.com/googleapis/google-cloud-go/issues/3044) -* **billing/budgets:** start generating apiv1 ([#3099](https://www.github.com/googleapis/google-cloud-go/issues/3099)) ([e760c85](https://www.github.com/googleapis/google-cloud-go/commit/e760c859de88a6e79b6dffc653dbf75f1630d8e3)) -* **internal:** auto-run godocfx on new mods ([#3069](https://www.github.com/googleapis/google-cloud-go/issues/3069)) ([49f497e](https://www.github.com/googleapis/google-cloud-go/commit/49f497eab80ce34dfb4ca41f033a5c0429ff5e42)) -* **pubsublite:** Added Pub/Sub Lite clients and routing headers ([#3105](https://www.github.com/googleapis/google-cloud-go/issues/3105)) ([98668fa](https://www.github.com/googleapis/google-cloud-go/commit/98668fa5457d26ed34debee708614f027020e5bc)) -* **pubsublite:** Message type and message routers ([#3077](https://www.github.com/googleapis/google-cloud-go/issues/3077)) ([179fc55](https://www.github.com/googleapis/google-cloud-go/commit/179fc550b545a5344358a243da7007ffaa7b5171)) -* **pubsublite:** Pub/Sub Lite admin client ([#3036](https://www.github.com/googleapis/google-cloud-go/issues/3036)) ([749473e](https://www.github.com/googleapis/google-cloud-go/commit/749473ead30bf1872634821d3238d1299b99acc6)) -* **pubsublite:** Publish settings and errors ([#3075](https://www.github.com/googleapis/google-cloud-go/issues/3075)) ([9eb9fcb](https://www.github.com/googleapis/google-cloud-go/commit/9eb9fcb79f17ad7c08c77c455ba3e8d89e3bdbf2)) -* **pubsublite:** Retryable stream wrapper ([#3068](https://www.github.com/googleapis/google-cloud-go/issues/3068)) ([97cfd45](https://www.github.com/googleapis/google-cloud-go/commit/97cfd4587f2f51996bd685ff486308b70eb51900)) - - -### Bug Fixes - -* **internal/kokoro:** remove unnecessary cd ([#3071](https://www.github.com/googleapis/google-cloud-go/issues/3071)) ([c1a4c3e](https://www.github.com/googleapis/google-cloud-go/commit/c1a4c3eaffcdc3cffe0e223fcfa1f60879cd23bb)) -* **pubsublite:** Disable integration tests for project id ([#3087](https://www.github.com/googleapis/google-cloud-go/issues/3087)) ([a0982f7](https://www.github.com/googleapis/google-cloud-go/commit/a0982f79d6461feabdf31363f29fed7dc5677fe7)) - -## [0.70.0](https://www.github.com/googleapis/google-cloud-go/compare/v0.69.0...v0.70.0) (2020-10-19) - - -### Features - -* **all:** auto-regenerate gapics , refs [#3047](https://www.github.com/googleapis/google-cloud-go/issues/3047) [#3035](https://www.github.com/googleapis/google-cloud-go/issues/3035) [#3025](https://www.github.com/googleapis/google-cloud-go/issues/3025) -* **managedidentities:** start generating apiv1 ([#3032](https://www.github.com/googleapis/google-cloud-go/issues/3032)) ([10ccca2](https://www.github.com/googleapis/google-cloud-go/commit/10ccca238074d24fea580a4cd8e64478818b0b44)) -* **pubsublite:** Types for resource paths and topic/subscription configs ([#3026](https://www.github.com/googleapis/google-cloud-go/issues/3026)) ([6f7fa86](https://www.github.com/googleapis/google-cloud-go/commit/6f7fa86ed906258f98d996aab40184f3a46f9714)) - -## [0.69.1](https://www.github.com/googleapis/google-cloud-go/compare/v0.69.0...v0.69.1) (2020-10-14) - -This is an empty release that was created solely to aid in pubsublite's module -carve out. See: https://github.com/golang/go/wiki/Modules#is-it-possible-to-add-a-module-to-a-multi-module-repository. - -## [0.69.0](https://www.github.com/googleapis/google-cloud-go/compare/v0.68.0...v0.69.0) (2020-10-14) - - -### Features - -* **accessapproval:** start generating apiv1 ([#3002](https://www.github.com/googleapis/google-cloud-go/issues/3002)) ([709d6e7](https://www.github.com/googleapis/google-cloud-go/commit/709d6e76393e6ac00ff488efd83bfe873173b045)) -* **all:** auto-regenerate gapics , refs [#3010](https://www.github.com/googleapis/google-cloud-go/issues/3010) [#3005](https://www.github.com/googleapis/google-cloud-go/issues/3005) [#2993](https://www.github.com/googleapis/google-cloud-go/issues/2993) [#2989](https://www.github.com/googleapis/google-cloud-go/issues/2989) [#2981](https://www.github.com/googleapis/google-cloud-go/issues/2981) [#2976](https://www.github.com/googleapis/google-cloud-go/issues/2976) [#2968](https://www.github.com/googleapis/google-cloud-go/issues/2968) [#2958](https://www.github.com/googleapis/google-cloud-go/issues/2958) -* **cmd/go-cloud-debug-agent:** mark as deprecated ([#2964](https://www.github.com/googleapis/google-cloud-go/issues/2964)) ([276ec88](https://www.github.com/googleapis/google-cloud-go/commit/276ec88b05852c33a3ba437e18d072f7ffd8fd33)) -* **godocfx:** add nesting to TOC ([#2972](https://www.github.com/googleapis/google-cloud-go/issues/2972)) ([3a49b2d](https://www.github.com/googleapis/google-cloud-go/commit/3a49b2d142a353f98429235c3f380431430b4dbf)) -* **internal/godocfx:** HTML-ify package summary ([#2986](https://www.github.com/googleapis/google-cloud-go/issues/2986)) ([9e64b01](https://www.github.com/googleapis/google-cloud-go/commit/9e64b018255bd8d9b31d60e8f396966251de946b)) -* **internal/kokoro:** make publish_docs VERSION optional ([#2979](https://www.github.com/googleapis/google-cloud-go/issues/2979)) ([76e35f6](https://www.github.com/googleapis/google-cloud-go/commit/76e35f689cb60bd5db8e14b8c8d367c5902bcb0e)) -* **websecurityscanner:** start generating apiv1 ([#3006](https://www.github.com/googleapis/google-cloud-go/issues/3006)) ([1d92e20](https://www.github.com/googleapis/google-cloud-go/commit/1d92e2062a13f62d7a96be53a7354c0cacca6a85)) - - -### Bug Fixes - -* **godocfx:** make extra files optional, filter out third_party ([#2985](https://www.github.com/googleapis/google-cloud-go/issues/2985)) ([f268921](https://www.github.com/googleapis/google-cloud-go/commit/f2689214a24b2e325d3e8f54441bb11fbef925f0)) - -## [0.68.0](https://www.github.com/googleapis/google-cloud-go/compare/v0.67.0...v0.68.0) (2020-10-02) - - -### Features - -* **all:** auto-regenerate gapics , refs [#2952](https://www.github.com/googleapis/google-cloud-go/issues/2952) [#2944](https://www.github.com/googleapis/google-cloud-go/issues/2944) [#2935](https://www.github.com/googleapis/google-cloud-go/issues/2935) - -## [0.67.0](https://www.github.com/googleapis/google-cloud-go/compare/v0.66.0...v0.67.0) (2020-09-29) - - -### Features - -* **all:** auto-regenerate gapics , refs [#2933](https://www.github.com/googleapis/google-cloud-go/issues/2933) [#2919](https://www.github.com/googleapis/google-cloud-go/issues/2919) [#2913](https://www.github.com/googleapis/google-cloud-go/issues/2913) [#2910](https://www.github.com/googleapis/google-cloud-go/issues/2910) [#2899](https://www.github.com/googleapis/google-cloud-go/issues/2899) [#2897](https://www.github.com/googleapis/google-cloud-go/issues/2897) [#2886](https://www.github.com/googleapis/google-cloud-go/issues/2886) [#2877](https://www.github.com/googleapis/google-cloud-go/issues/2877) [#2869](https://www.github.com/googleapis/google-cloud-go/issues/2869) [#2864](https://www.github.com/googleapis/google-cloud-go/issues/2864) -* **assuredworkloads:** start generating apiv1beta1 ([#2866](https://www.github.com/googleapis/google-cloud-go/issues/2866)) ([7598c4d](https://www.github.com/googleapis/google-cloud-go/commit/7598c4dd2462e8270a2c7b1f496af58ca81ff568)) -* **dialogflow/cx:** start generating apiv3beta1 ([#2875](https://www.github.com/googleapis/google-cloud-go/issues/2875)) ([37ca93a](https://www.github.com/googleapis/google-cloud-go/commit/37ca93ad69eda363d956f0174d444ed5914f5a72)) -* **docfx:** add support for examples ([#2884](https://www.github.com/googleapis/google-cloud-go/issues/2884)) ([0cc0de3](https://www.github.com/googleapis/google-cloud-go/commit/0cc0de300d58be6d3b7eeb2f1baebfa6df076830)) -* **godocfx:** include README in output ([#2927](https://www.github.com/googleapis/google-cloud-go/issues/2927)) ([f084690](https://www.github.com/googleapis/google-cloud-go/commit/f084690a2ea08ce73bafaaced95ad271fd01e11e)) -* **talent:** start generating apiv4 ([#2871](https://www.github.com/googleapis/google-cloud-go/issues/2871)) ([5c98071](https://www.github.com/googleapis/google-cloud-go/commit/5c98071b03822c58862d1fa5442ff36d627f1a61)) - - -### Bug Fixes - -* **godocfx:** filter out other modules, sort pkgs ([#2894](https://www.github.com/googleapis/google-cloud-go/issues/2894)) ([868db45](https://www.github.com/googleapis/google-cloud-go/commit/868db45e2e6f4e9ad48432be86c849f335e1083d)) -* **godocfx:** shorten function names ([#2880](https://www.github.com/googleapis/google-cloud-go/issues/2880)) ([48a0217](https://www.github.com/googleapis/google-cloud-go/commit/48a0217930750c1f4327f2622b0f2a3ec8afc0b7)) -* **translate:** properly name examples ([#2892](https://www.github.com/googleapis/google-cloud-go/issues/2892)) ([c19e141](https://www.github.com/googleapis/google-cloud-go/commit/c19e1415e6fa76b7ea66a7fc67ad3ba22670a2ba)), refs [#2883](https://www.github.com/googleapis/google-cloud-go/issues/2883) - -## [0.66.0](https://www.github.com/googleapis/google-cloud-go/compare/v0.65.0...v0.66.0) (2020-09-15) - - -### Features - -* **all:** auto-regenerate gapics , refs [#2849](https://www.github.com/googleapis/google-cloud-go/issues/2849) [#2843](https://www.github.com/googleapis/google-cloud-go/issues/2843) [#2841](https://www.github.com/googleapis/google-cloud-go/issues/2841) [#2819](https://www.github.com/googleapis/google-cloud-go/issues/2819) [#2816](https://www.github.com/googleapis/google-cloud-go/issues/2816) [#2809](https://www.github.com/googleapis/google-cloud-go/issues/2809) [#2801](https://www.github.com/googleapis/google-cloud-go/issues/2801) [#2795](https://www.github.com/googleapis/google-cloud-go/issues/2795) [#2791](https://www.github.com/googleapis/google-cloud-go/issues/2791) [#2788](https://www.github.com/googleapis/google-cloud-go/issues/2788) [#2781](https://www.github.com/googleapis/google-cloud-go/issues/2781) -* **analytics/data:** start generating apiv1alpha ([#2796](https://www.github.com/googleapis/google-cloud-go/issues/2796)) ([e93132c](https://www.github.com/googleapis/google-cloud-go/commit/e93132c77725de3c80c34d566df269eabfcfde93)) -* **area120/tables:** start generating apiv1alpha1 ([#2807](https://www.github.com/googleapis/google-cloud-go/issues/2807)) ([9e5a4d0](https://www.github.com/googleapis/google-cloud-go/commit/9e5a4d0dee0d83be0c020797a2f579d9e42ef521)) -* **cloudbuild:** Start generating apiv1/v3 ([#2830](https://www.github.com/googleapis/google-cloud-go/issues/2830)) ([358a536](https://www.github.com/googleapis/google-cloud-go/commit/358a5368da64cf4868551652e852ceb453504f64)) -* **godocfx:** create Go DocFX YAML generator ([#2854](https://www.github.com/googleapis/google-cloud-go/issues/2854)) ([37c70ac](https://www.github.com/googleapis/google-cloud-go/commit/37c70acd91768567106ff3b2b130835998d974c5)) -* **security/privateca:** start generating apiv1beta1 ([#2806](https://www.github.com/googleapis/google-cloud-go/issues/2806)) ([f985141](https://www.github.com/googleapis/google-cloud-go/commit/f9851412183989dc69733a7e61ad39a9378cd893)) -* **video/transcoder:** start generating apiv1beta1 ([#2797](https://www.github.com/googleapis/google-cloud-go/issues/2797)) ([390dda8](https://www.github.com/googleapis/google-cloud-go/commit/390dda8ff2c526e325e434ad0aec778b7aa97ea4)) -* **workflows:** start generating apiv1beta ([#2799](https://www.github.com/googleapis/google-cloud-go/issues/2799)) ([0e39665](https://www.github.com/googleapis/google-cloud-go/commit/0e39665ccb788caec800e2887d433ca6e0cf9901)) -* **workflows/executions:** start generating apiv1beta ([#2800](https://www.github.com/googleapis/google-cloud-go/issues/2800)) ([7eaa0d1](https://www.github.com/googleapis/google-cloud-go/commit/7eaa0d184c6a2141d8bf4514b3fd20715b50a580)) - - -### Bug Fixes - -* **internal/kokoro:** install the right version of docuploader ([#2861](https://www.github.com/googleapis/google-cloud-go/issues/2861)) ([d8489c1](https://www.github.com/googleapis/google-cloud-go/commit/d8489c141b8b02e83d6426f4baebd3658ae11639)) -* **internal/kokoro:** remove extra dash in doc tarball ([#2862](https://www.github.com/googleapis/google-cloud-go/issues/2862)) ([690ddcc](https://www.github.com/googleapis/google-cloud-go/commit/690ddccc5202b5a70f1afa5c518dca37b6a0861c)) -* **profiler:** do not collect disabled profile types ([#2836](https://www.github.com/googleapis/google-cloud-go/issues/2836)) ([faeb498](https://www.github.com/googleapis/google-cloud-go/commit/faeb4985bf6afdcddba4553efa874642bf7f08ed)), refs [#2835](https://www.github.com/googleapis/google-cloud-go/issues/2835) - - -### Reverts - -* **cloudbuild): "feat(cloudbuild:** Start generating apiv1/v3" ([#2840](https://www.github.com/googleapis/google-cloud-go/issues/2840)) ([3aaf755](https://www.github.com/googleapis/google-cloud-go/commit/3aaf755476dfea1700986fc086f53fc1ab756557)) - -## [0.65.0](https://www.github.com/googleapis/google-cloud-go/compare/v0.64.0...v0.65.0) (2020-08-27) - - -### Announcements - -The following changes will be included in an upcoming release and are not -included in this one. - -#### Default Deadlines - -By default, non-streaming methods, like Create or Get methods, will have a -default deadline applied to the context provided at call time, unless a context -deadline is already set. Streaming methods have no default deadline and will run -indefinitely, unless the context provided at call time contains a deadline. - -To opt-out of this behavior, set the environment variable -`GOOGLE_API_GO_EXPERIMENTAL_DISABLE_DEFAULT_DEADLINE` to `true` prior to -initializing a client. This opt-out mechanism will be removed in a later -release, with a notice similar to this one ahead of its removal. - - -### Features - -* **all:** auto-regenerate gapics , refs [#2774](https://www.github.com/googleapis/google-cloud-go/issues/2774) [#2764](https://www.github.com/googleapis/google-cloud-go/issues/2764) - - -### Bug Fixes - -* **all:** correct minor typos ([#2756](https://www.github.com/googleapis/google-cloud-go/issues/2756)) ([03d78b5](https://www.github.com/googleapis/google-cloud-go/commit/03d78b5627819cb64d1f3866f90043f709e825e1)) -* **compute/metadata:** remove leading slash for Get suffix ([#2760](https://www.github.com/googleapis/google-cloud-go/issues/2760)) ([f0d605c](https://www.github.com/googleapis/google-cloud-go/commit/f0d605ccf32391a9da056a2c551158bd076c128d)) - -## [0.64.0](https://www.github.com/googleapis/google-cloud-go/compare/v0.63.0...v0.64.0) (2020-08-18) - - -### Features - -* **all:** auto-regenerate gapics , refs [#2734](https://www.github.com/googleapis/google-cloud-go/issues/2734) [#2731](https://www.github.com/googleapis/google-cloud-go/issues/2731) [#2730](https://www.github.com/googleapis/google-cloud-go/issues/2730) [#2725](https://www.github.com/googleapis/google-cloud-go/issues/2725) [#2722](https://www.github.com/googleapis/google-cloud-go/issues/2722) [#2706](https://www.github.com/googleapis/google-cloud-go/issues/2706) -* **pubsublite:** start generating v1 ([#2700](https://www.github.com/googleapis/google-cloud-go/issues/2700)) ([d2e777f](https://www.github.com/googleapis/google-cloud-go/commit/d2e777f56e08146646b3ffb7a78856795094ab4e)) - -## [0.63.0](https://www.github.com/googleapis/google-cloud-go/compare/v0.62.0...v0.63.0) (2020-08-05) - - -### Features - -* **all:** auto-regenerate gapics ([#2682](https://www.github.com/googleapis/google-cloud-go/issues/2682)) ([63bfd63](https://www.github.com/googleapis/google-cloud-go/commit/63bfd638da169e0f1f4fa4a5125da2955022dc04)) -* **analytics/admin:** start generating apiv1alpha ([#2670](https://www.github.com/googleapis/google-cloud-go/issues/2670)) ([268199e](https://www.github.com/googleapis/google-cloud-go/commit/268199e5350a64a83ecf198e0e0fa4863f00fa6c)) -* **functions/metadata:** Special-case marshaling ([#2669](https://www.github.com/googleapis/google-cloud-go/issues/2669)) ([d8d7fc6](https://www.github.com/googleapis/google-cloud-go/commit/d8d7fc66cbc42f79bec25fb0daaf53d926e3645b)) -* **gaming:** start generate apiv1 ([#2681](https://www.github.com/googleapis/google-cloud-go/issues/2681)) ([1adfd0a](https://www.github.com/googleapis/google-cloud-go/commit/1adfd0aed6b2c0e1dd0c575a5ec0f49388fa5601)) -* **internal/kokoro:** add script to test compatibility with samples ([#2637](https://www.github.com/googleapis/google-cloud-go/issues/2637)) ([f2aa76a](https://www.github.com/googleapis/google-cloud-go/commit/f2aa76a0058e86c1c33bb634d2c084b58f77ab32)) - -## v0.62.0 - -### Announcements - -- There was a breaking change to `cloud.google.com/go/dataproc/apiv1` that was - merged in [this PR](https://github.com/googleapis/google-cloud-go/pull/2606). - This fixed a broken API response for `DiagnoseCluster`. When polling on the - Long Running Operation(LRO), the API now returns - `(*dataprocpb.DiagnoseClusterResults, error)` whereas it only returned an - `error` before. - -### Changes - -- all: - - Updated all direct dependencies. - - Updated contributing guidelines to suggest allowing edits from maintainers. -- billing/budgets: - - Start generating client for apiv1beta1. -- functions: - - Start generating client for apiv1. -- notebooks: - - Start generating client apiv1beta1. -- profiler: - - update proftest to support parsing floating-point backoff durations. - - Fix the regexp used to parse backoff duration. -- Various updates to autogenerated clients. - -## v0.61.0 - -### Changes - -- all: - - Update all direct dependencies. -- dashboard: - - Start generating client for apiv1. -- policytroubleshooter: - - Start generating client for apiv1. -- profiler: - - Disable OpenCensus Telemetry for requests made by the profiler package by default. You can re-enable it using `profiler.Config.EnableOCTelemetry`. -- Various updates to autogenerated clients. - -## v0.60.0 - -### Changes - -- all: - - Refactored examples to reduce module dependencies. - - Update sub-modules to use cloud.google.com/go v0.59.0. -- internal: - - Start generating client for gaming apiv1beta. -- Various updates to autogenerated clients. - -## v0.59.0 - -### Announcements - -goolgeapis/google-cloud-go has moved its source of truth to GitHub and is no longer a mirror. This means that our -contributing process has changed a bit. We will now be conducting all code reviews on GitHub which means we now accept -pull requests! If you have a version of the codebase previously checked out you may wish to update your git remote to -point to GitHub. - -### Changes - -- all: - - Remove dependency on honnef.co/go/tools. - - Update our contributing instructions now that we use GitHub for reviews. - - Remove some un-inclusive terminology. -- compute/metadata: - - Pass cancelable context to DNS lookup. -- .github: - - Update templates issue/PR templates. -- internal: - - Bump several clients to GA. - - Fix GoDoc badge source. - - Several automation changes related to the move to GitHub. - - Start generating a client for asset v1p5beta1. -- Various updates to autogenerated clients. - -## v0.58.0 - -### Deprecation notice - -- `cloud.google.com/go/monitoring/apiv3` has been deprecated due to breaking - changes in the API. Please migrate to `cloud.google.com/go/monitoring/apiv3/v2`. - -### Changes - -- all: - - The remaining uses of gtransport.Dial have been removed. - - The `genproto` dependency has been updated to a version that makes use of - new `protoreflect` library. For more information on these protobuf changes - please see the following post from the official Go blog: - https://blog.golang.org/protobuf-apiv2. -- internal: - - Started generation of datastore admin v1 client. - - Updated protofuf version used for generation to 3.12.X. - - Update the release levels for several APIs. - - Generate clients with protoc-gen-go@v1.4.1. -- monitoring: - - Re-enable generation of monitoring/apiv3 under v2 directory (see deprecation - notice above). -- profiler: - - Fixed flakiness in tests. -- Various updates to autogenerated clients. - -## v0.57.0 - -- all: - - Update module dependency `google.golang.org/api` to `v0.21.0`. -- errorreporting: - - Add exported SetGoogleClientInfo wrappers to manual file. -- expr/v1alpha1: - - Deprecate client. This client will be removed in a future release. -- internal: - - Fix possible data race in TestTracer. - - Pin versions of tools used for generation. - - Correct the release levels for BigQuery APIs. - - Start generation osconfig v1. -- longrunning: - - Add exported SetGoogleClientInfo wrappers to manual file. -- monitoring: - - Stop generation of monitoring/apiv3 because of incoming breaking change. -- trace: - - Add exported SetGoogleClientInfo wrappers to manual file. -- Various updates to autogenerated clients. - -## v0.56.0 - -- secretmanager: - - add IAM helper -- profiler: - - try all us-west1 zones for integration tests -- internal: - - add config to generate webrisk v1 - - add repo and commit to buildcop invocation - - add recaptchaenterprise v1 generation config - - update microgenerator to v0.12.5 - - add datacatalog client - - start generating security center settings v1beta - - start generating osconfig agentendpoint v1 - - setup generation for bigquery/connection/v1beta1 -- all: - - increase continous testing timeout to 45m - - various updates to autogenerated clients. - -## v0.55.0 - -- Various updates to autogenerated clients. - -## v0.54.0 - -- all: - - remove unused golang.org/x/exp from mod file - - update godoc.org links to pkg.go.dev -- compute/metadata: - - use defaultClient when http.Client is nil - - remove subscribeClient -- iam: - - add support for v3 policy and IAM conditions -- Various updates to autogenerated clients. - -## v0.53.0 - -- all: most clients now use transport/grpc.DialPool rather than Dial (see #1777 for outliers). - - Connection pooling now does not use the deprecated (and soon to be removed) gRPC load balancer API. -- profiler: remove symbolization (drops support for go1.10) -- Various updates to autogenerated clients. - -## v0.52.0 - -- internal/gapicgen: multiple improvements related to library generation. -- compute/metadata: unset ResponseHeaderTimeout in defaultClient -- docs: fix link to KMS in README.md -- Various updates to autogenerated clients. - -## v0.51.0 - -- secretmanager: - - add IAM helper for generic resource IAM handle -- cloudbuild: - - migrate to microgen in a major version -- Various updates to autogenerated clients. - -## v0.50.0 - -- profiler: - - Support disabling CPU profile collection. - - Log when a profile creation attempt begins. -- compute/metadata: - - Fix panic on malformed URLs. - - InstanceName returns actual instance name. -- Various updates to autogenerated clients. - -## v0.49.0 - -- functions/metadata: - - Handle string resources in JSON unmarshaller. -- Various updates to autogenerated clients. - -## v0.48.0 - -- Various updates to autogenerated clients - -## v0.47.0 - -This release drops support for Go 1.9 and Go 1.10: we continue to officially -support Go 1.11, Go 1.12, and Go 1.13. - -- Various updates to autogenerated clients. -- Add cloudbuild/apiv1 client. - -## v0.46.3 - -This is an empty release that was created solely to aid in storage's module -carve-out. See: https://github.com/golang/go/wiki/Modules#is-it-possible-to-add-a-module-to-a-multi-module-repository. - -## v0.46.2 - -This is an empty release that was created solely to aid in spanner's module -carve-out. See: https://github.com/golang/go/wiki/Modules#is-it-possible-to-add-a-module-to-a-multi-module-repository. - -## v0.46.1 - -This is an empty release that was created solely to aid in firestore's module -carve-out. See: https://github.com/golang/go/wiki/Modules#is-it-possible-to-add-a-module-to-a-multi-module-repository. - -## v0.46.0 - -- spanner: - - Retry "Session not found" for read-only transactions. - - Retry aborted PDMLs. -- spanner/spannertest: - - Fix a bug that was causing 0X-prefixed number to be parsed incorrectly. -- storage: - - Add HMACKeyOptions. - - Remove *REGIONAL from StorageClass documentation. Using MULTI_REGIONAL, - DURABLE_REDUCED_AVAILABILITY, and REGIONAL are no longer best practice - StorageClasses but they are still acceptable values. -- trace: - - Remove cloud.google.com/go/trace. Package cloud.google.com/go/trace has been - marked OBSOLETE for several years: it is now no longer provided. If you - relied on this package, please vendor it or switch to using - https://cloud.google.com/trace/docs/setup/go (which obsoleted it). - -## v0.45.1 - -This is an empty release that was created solely to aid in pubsub's module -carve-out. See: https://github.com/golang/go/wiki/Modules#is-it-possible-to-add-a-module-to-a-multi-module-repository. - -## v0.45.0 - -- compute/metadata: - - Add Email method. -- storage: - - Fix duplicated retry logic. - - Add ReaderObjectAttrs.StartOffset. - - Support reading last N bytes of a file when a negative range is given, such - as `obj.NewRangeReader(ctx, -10, -1)`. - - Add HMACKey listing functionality. -- spanner/spannertest: - - Support primary keys with no columns. - - Fix MinInt64 parsing. - - Implement deletion of key ranges. - - Handle reads during a read-write transaction. - - Handle returning DATE values. -- pubsub: - - Fix Ack/Modack request size calculation. -- logging: - - Add auto-detection of monitored resources on GAE Standard. - -## v0.44.3 - -This is an empty release that was created solely to aid in bigtable's module -carve-out. See: https://github.com/golang/go/wiki/Modules#is-it-possible-to-add-a-module-to-a-multi-module-repository. - -## v0.44.2 - -This is an empty release that was created solely to aid in bigquery's module -carve-out. See: https://github.com/golang/go/wiki/Modules#is-it-possible-to-add-a-module-to-a-multi-module-repository. - -## v0.44.1 - -This is an empty release that was created solely to aid in datastore's module -carve-out. See: https://github.com/golang/go/wiki/Modules#is-it-possible-to-add-a-module-to-a-multi-module-repository. - -## v0.44.0 - -- datastore: - - Interface elements whose underlying types are supported, are now supported. - - Reduce time to initial retry from 1s to 100ms. -- firestore: - - Add Increment transformation. -- storage: - - Allow emulator with STORAGE_EMULATOR_HOST. - - Add methods for HMAC key management. -- pubsub: - - Add PublishCount and PublishLatency measurements. - - Add DefaultPublishViews and DefaultSubscribeViews for convenience of - importing all views. - - Add add Subscription.PushConfig.AuthenticationMethod. -- spanner: - - Allow emulator usage with SPANNER_EMULATOR_HOST. - - Add cloud.google.com/go/spanner/spannertest, a spanner emulator. - - Add cloud.google.com/go/spanner/spansql which contains types and a parser - for the Cloud Spanner SQL dialect. -- asset: - - Add apiv1p2beta1 client. - -## v0.43.0 - -This is an empty release that was created solely to aid in logging's module -carve-out. See: https://github.com/golang/go/wiki/Modules#is-it-possible-to-add-a-module-to-a-multi-module-repository. - -## v0.42.0 - -- bigtable: - - Add an admin method to update an instance and clusters. - - Fix bttest regex matching behavior for alternations (things like `|a`). - - Expose BlockAllFilter filter. -- bigquery: - - Add Routines API support. -- storage: - - Add read-only Bucket.LocationType. -- logging: - - Add TraceSampled to Entry. - - Fix to properly extract {Trace, Span}Id from X-Cloud-Trace-Context. -- pubsub: - - Add Cloud Key Management to TopicConfig. - - Change ExpirationPolicy to optional.Duration. -- automl: - - Add apiv1beta1 client. -- iam: - - Fix compilation problem with iam/credentials/apiv1. - -## v0.41.0 - -- bigtable: - - Check results from PredicateFilter in bttest, which fixes certain false matches. -- profiler: - - debugLog checks user defined logging options before logging. -- spanner: - - PartitionedUpdates respect query parameters. - - StartInstance allows specifying cloud API access scopes. -- bigquery: - - Use empty slice instead of nil for ValueSaver, fixing an issue with zero-length, repeated, nested fields causing panics. -- firestore: - - Return same number of snapshots as doc refs (in the form of duplicate records) during GetAll. -- replay: - - Change references to IPv4 addresses to localhost, making replay compatible with IPv6. - -## v0.40.0 - -- all: - - Update to protobuf-golang v1.3.1. -- datastore: - - Attempt to decode GAE-encoded keys if initial decoding attempt fails. - - Support integer time conversion. -- pubsub: - - Add PublishSettings.BundlerByteLimit. If users receive pubsub.ErrOverflow, - this value should be adjusted higher. - - Use IPv6 compatible target in testutil. -- bigtable: - - Fix Latin-1 regexp filters in bttest, allowing \C. - - Expose PassAllFilter. -- profiler: - - Add log messages for slow path in start. - - Fix start to allow retry until success. -- firestore: - - Add admin client. -- containeranalysis: - - Add apiv1 client. -- grafeas: - - Add apiv1 client. - -## 0.39.0 - -- bigtable: - - Implement DeleteInstance in bttest. - - Return an error on invalid ReadRowsRequest.RowRange key ranges in bttest. -- bigquery: - - Move RequirePartitionFilter outside of TimePartioning. - - Expose models API. -- firestore: - - Allow array values in create and update calls. - - Add CollectionGroup method. -- pubsub: - - Add ExpirationPolicy to Subscription. -- storage: - - Add V4 signing. -- rpcreplay: - - Match streams by first sent request. This further improves rpcreplay's - ability to distinguish streams. -- httpreplay: - - Set up Man-In-The-Middle config only once. This should improve proxy - creation when multiple proxies are used in a single process. - - Remove error on empty Content-Type, allowing requests with no Content-Type - header but a non-empty body. -- all: - - Fix an edge case bug in auto-generated library pagination by properly - propagating pagetoken. - -## 0.38.0 - -This update includes a substantial reduction in our transitive dependency list -by way of updating to opencensus@v0.21.0. - -- spanner: - - Error implements GRPCStatus, allowing status.Convert. -- bigtable: - - Fix a bug in bttest that prevents single column queries returning results - that match other filters. - - Remove verbose retry logging. -- logging: - - Ensure RequestUrl has proper UTF-8, removing the need for users to wrap and - rune replace manually. -- recaptchaenterprise: - - Add v1beta1 client. -- phishingprotection: - - Add v1beta1 client. - -## 0.37.4 - -This patch releases re-builds the go.sum. This was not possible in the -previous release. - -- firestore: - - Add sentinel value DetectProjectID for auto-detecting project ID. - - Add OpenCensus tracing for public methods. - - Marked stable. All future changes come with a backwards compatibility - guarantee. - - Removed firestore/apiv1beta1. All users relying on this low-level library - should migrate to firestore/apiv1. Note that most users should use the - high-level firestore package instead. -- pubsub: - - Allow large messages in synchronous pull case. - - Cap bundler byte limit. This should prevent OOM conditions when there are - a very large number of message publishes occurring. -- storage: - - Add ETag to BucketAttrs and ObjectAttrs. -- datastore: - - Removed some non-sensical OpenCensus traces. -- webrisk: - - Add v1 client. -- asset: - - Add v1 client. -- cloudtasks: - - Add v2 client. - -## 0.37.3 - -This patch release removes github.com/golang/lint from the transitive -dependency list, resolving `go get -u` problems. - -Note: this release intentionally has a broken go.sum. Please use v0.37.4. - -## 0.37.2 - -This patch release is mostly intended to bring in v0.3.0 of -google.golang.org/api, which fixes a GCF deployment issue. - -Note: we had to-date accidentally marked Redis as stable. In this release, we've -fixed it by downgrading its documentation to alpha, as it is in other languages -and docs. - -- all: - - Document context in generated libraries. - -## 0.37.1 - -Small go.mod version bumps to bring in v0.2.0 of google.golang.org/api, which -introduces a new oauth2 url. - -## 0.37.0 - -- spanner: - - Add BatchDML method. - - Reduced initial time between retries. -- bigquery: - - Produce better error messages for InferSchema. - - Add logical type control for avro loads. - - Add support for the GEOGRAPHY type. -- datastore: - - Add sentinel value DetectProjectID for auto-detecting project ID. - - Allow flatten tag on struct pointers. - - Fixed a bug that caused queries to panic with invalid queries. Instead they - will now return an error. -- profiler: - - Add ability to override GCE zone and instance. -- pubsub: - - BEHAVIOR CHANGE: Refactor error code retry logic. RPCs should now more - consistently retry specific error codes based on whether they're idempotent - or non-idempotent. -- httpreplay: Fixed a bug when a non-GET request had a zero-length body causing - the Content-Length header to be dropped. -- iot: - - Add new apiv1 client. -- securitycenter: - - Add new apiv1 client. -- cloudscheduler: - - Add new apiv1 client. - -## 0.36.0 - -- spanner: - - Reduce minimum retry backoff from 1s to 100ms. This makes time between - retries much faster and should improve latency. -- storage: - - Add support for Bucket Policy Only. -- kms: - - Add ResourceIAM helper method. - - Deprecate KeyRingIAM and CryptoKeyIAM. Please use ResourceIAM. -- firestore: - - Switch from v1beta1 API to v1 API. - - Allow emulator with FIRESTORE_EMULATOR_HOST. -- bigquery: - - Add NumLongTermBytes to Table. - - Add TotalBytesProcessedAccuracy to QueryStatistics. -- irm: - - Add new v1alpha2 client. -- talent: - - Add new v4beta1 client. -- rpcreplay: - - Fix connection to work with grpc >= 1.17. - - It is now required for an actual gRPC server to be running for Dial to - succeed. - -## 0.35.1 - -- spanner: - - Adds OpenCensus views back to public API. - -## v0.35.0 - -- all: - - Add go.mod and go.sum. - - Switch usage of gax-go to gax-go/v2. -- bigquery: - - Fix bug where time partitioning could not be removed from a table. - - Fix panic that occurred with empty query parameters. -- bttest: - - Fix bug where deleted rows were returned by ReadRows. -- bigtable/emulator: - - Configure max message size to 256 MiB. -- firestore: - - Allow non-transactional queries in transactions. - - Allow StartAt/EndBefore on direct children at any depth. - - QuerySnapshotIterator.Stop may be called in an error state. - - Fix bug the prevented reset of transaction write state in between retries. -- functions/metadata: - - Make Metadata.Resource a pointer. -- logging: - - Make SpanID available in logging.Entry. -- metadata: - - Wrap !200 error code in a typed err. -- profiler: - - Add function to check if function name is within a particular file in the - profile. - - Set parent field in create profile request. - - Return kubernetes client to start cluster, so client can be used to poll - cluster. - - Add function for checking if filename is in profile. -- pubsub: - - Fix bug where messages expired without an initial modack in - synchronous=true mode. - - Receive does not retry ResourceExhausted errors. -- spanner: - - client.Close now cancels existing requests and should be much faster for - large amounts of sessions. - - Correctly allow MinOpened sessions to be spun up. - -## v0.34.0 - -- functions/metadata: - - Switch to using JSON in context. - - Make Resource a value. -- vision: Fix ProductSearch return type. -- datastore: Add an example for how to handle MultiError. - -## v0.33.1 - -- compute: Removes an erroneously added go.mod. -- logging: Populate source location in fromLogEntry. - -## v0.33.0 - -- bttest: - - Add support for apply_label_transformer. -- expr: - - Add expr library. -- firestore: - - Support retrieval of missing documents. -- kms: - - Add IAM methods. -- pubsub: - - Clarify extension documentation. -- scheduler: - - Add v1beta1 client. -- vision: - - Add product search helper. - - Add new product search client. - -## v0.32.0 - -Note: This release is the last to support Go 1.6 and 1.8. - -- bigquery: - - Add support for removing an expiration. - - Ignore NeverExpire in Table.Create. - - Validate table expiration time. -- cbt: - - Add note about not supporting arbitrary bytes. -- datastore: - - Align key checks. -- firestore: - - Return an error when using Start/End without providing values. -- pubsub: - - Add pstest Close method. - - Clarify MaxExtension documentation. -- securitycenter: - - Add v1beta1 client. -- spanner: - - Allow nil in mutations. - - Improve doc of SessionPoolConfig.MaxOpened. - - Increase session deletion timeout from 5s to 15s. - -## v0.31.0 - -- bigtable: - - Group mutations across multiple requests. -- bigquery: - - Link to bigquery troubleshooting errors page in bigquery.Error comment. -- cbt: - - Fix go generate command. - - Document usage of both maxage + maxversions. -- datastore: - - Passing nil keys results in ErrInvalidKey. -- firestore: - - Clarify what Document.DataTo does with untouched struct fields. -- profile: - - Validate service name in agent. -- pubsub: - - Fix deadlock with pstest and ctx.Cancel. - - Fix a possible deadlock in pstest. -- trace: - - Update doc URL with new fragment. - -Special thanks to @fastest963 for going above and beyond helping us to debug -hard-to-reproduce Pub/Sub issues. - -## v0.30.0 - -- spanner: DML support added. See https://godoc.org/cloud.google.com/go/spanner#hdr-DML_and_Partitioned_DML for more information. -- bigtable: bttest supports row sample filter. -- functions: metadata package added for accessing Cloud Functions resource metadata. - -## v0.29.0 - -- bigtable: - - Add retry to all idempotent RPCs. - - cbt supports complex GC policies. - - Emulator supports arbitrary bytes in regex filters. -- firestore: Add ArrayUnion and ArrayRemove. -- logging: Add the ContextFunc option to supply the context used for - asynchronous RPCs. -- profiler: Ignore NotDefinedError when fetching the instance name -- pubsub: - - BEHAVIOR CHANGE: Receive doesn't retry if an RPC returns codes.Cancelled. - - BEHAVIOR CHANGE: Receive retries on Unavailable intead of returning. - - Fix deadlock. - - Restore Ack/Nack/Modacks metrics. - - Improve context handling in iterator. - - Implement synchronous mode for Receive. - - pstest: add Pull. -- spanner: Add a metric for the number of sessions currently opened. -- storage: - - Canceling the context releases all resources. - - Add additional RetentionPolicy attributes. -- vision/apiv1: Add LocalizeObjects method. - -## v0.28.0 - -- bigtable: - - Emulator returns Unimplemented for snapshot RPCs. -- bigquery: - - Support zero-length repeated, nested fields. -- cloud assets: - - Add v1beta client. -- datastore: - - Don't nil out transaction ID on retry. -- firestore: - - BREAKING CHANGE: When watching a query with Query.Snapshots, QuerySnapshotIterator.Next - returns a QuerySnapshot which contains read time, result size, change list and the DocumentIterator - (previously, QuerySnapshotIterator.Next returned just the DocumentIterator). See: https://godoc.org/cloud.google.com/go/firestore#Query.Snapshots. - - Add array-contains operator. -- IAM: - - Add iam/credentials/apiv1 client. -- pubsub: - - Canceling the context passed to Subscription.Receive causes Receive to return when - processing finishes on all messages currently in progress, even if new messages are arriving. -- redis: - - Add redis/apiv1 client. -- storage: - - Add Reader.Attrs. - - Deprecate several Reader getter methods: please use Reader.Attrs for these instead. - - Add ObjectHandle.Bucket and ObjectHandle.Object methods. - -## v0.27.0 - -- bigquery: - - Allow modification of encryption configuration and partitioning options to a table via the Update call. - - Add a SchemaFromJSON function that converts a JSON table schema. -- bigtable: - - Restore cbt count functionality. -- containeranalysis: - - Add v1beta client. -- spanner: - - Fix a case where an iterator might not be closed correctly. -- storage: - - Add ServiceAccount method https://godoc.org/cloud.google.com/go/storage#Client.ServiceAccount. - - Add a method to Reader that returns the parsed value of the Last-Modified header. - -## v0.26.0 - -- bigquery: - - Support filtering listed jobs by min/max creation time. - - Support data clustering (https://godoc.org/cloud.google.com/go/bigquery#Clustering). - - Include job creator email in Job struct. -- bigtable: - - Add `RowSampleFilter`. - - emulator: BREAKING BEHAVIOR CHANGE: Regexps in row, family, column and value filters - must match the entire target string to succeed. Previously, the emulator was - succeeding on partial matches. - NOTE: As of this release, this change only affects the emulator when run - from this repo (bigtable/cmd/emulator/cbtemulator.go). The version launched - from `gcloud` will be updated in a subsequent `gcloud` release. -- dataproc: Add apiv1beta2 client. -- datastore: Save non-nil pointer fields on omitempty. -- logging: populate Entry.Trace from the HTTP X-Cloud-Trace-Context header. -- logging/logadmin: Support writer_identity and include_children. -- pubsub: - - Support labels on topics and subscriptions. - - Support message storage policy for topics. - - Use the distribution of ack times to determine when to extend ack deadlines. - The only user-visible effect of this change should be that programs that - call only `Subscription.Receive` need no IAM permissions other than `Pub/Sub - Subscriber`. -- storage: - - Support predefined ACLs. - - Support additional ACL fields other than Entity and Role. - - Support bucket websites. - - Support bucket logging. - - -## v0.25.0 - -- Added [Code of Conduct](https://github.com/googleapis/google-cloud-go/blob/master/CODE_OF_CONDUCT.md) -- bigtable: - - cbt: Support a GC policy of "never". -- errorreporting: - - Support User. - - Close now calls Flush. - - Use OnError (previously ignored). - - Pass through the RPC error as-is to OnError. -- httpreplay: A tool for recording and replaying HTTP requests - (for the bigquery and storage clients in this repo). -- kms: v1 client added -- logging: add SourceLocation to Entry. -- storage: improve CRC checking on read. - -## v0.24.0 - -- bigquery: Support for the NUMERIC type. -- bigtable: - - cbt: Optionally specify columns for read/lookup - - Support instance-level administration. -- oslogin: New client for the OS Login API. -- pubsub: - - The package is now stable. There will be no further breaking changes. - - Internal changes to improve Subscription.Receive behavior. -- storage: Support updating bucket lifecycle config. -- spanner: Support struct-typed parameter bindings. -- texttospeech: New client for the Text-to-Speech API. - -## v0.23.0 - -- bigquery: Add DDL stats to query statistics. -- bigtable: - - cbt: Add cells-per-column limit for row lookup. - - cbt: Make it possible to combine read filters. -- dlp: v2beta2 client removed. Use the v2 client instead. -- firestore, spanner: Fix compilation errors due to protobuf changes. - -## v0.22.0 - -- bigtable: - - cbt: Support cells per column limit for row read. - - bttest: Correctly handle empty RowSet. - - Fix ReadModifyWrite operation in emulator. - - Fix API path in GetCluster. - -- bigquery: - - BEHAVIOR CHANGE: Retry on 503 status code. - - Add dataset.DeleteWithContents. - - Add SchemaUpdateOptions for query jobs. - - Add Timeline to QueryStatistics. - - Add more stats to ExplainQueryStage. - - Support Parquet data format. - -- datastore: - - Support omitempty for times. - -- dlp: - - **BREAKING CHANGE:** Remove v1beta1 client. Please migrate to the v2 client, - which is now out of beta. - - Add v2 client. - -- firestore: - - BEHAVIOR CHANGE: Treat set({}, MergeAll) as valid. - -- iam: - - Support JWT signing via SignJwt callopt. - -- profiler: - - BEHAVIOR CHANGE: PollForSerialOutput returns an error when context.Done. - - BEHAVIOR CHANGE: Increase the initial backoff to 1 minute. - - Avoid returning empty serial port output. - -- pubsub: - - BEHAVIOR CHANGE: Don't backoff during next retryable error once stream is healthy. - - BEHAVIOR CHANGE: Don't backoff on EOF. - - pstest: Support Acknowledge and ModifyAckDeadline RPCs. - -- redis: - - Add v1 beta Redis client. - -- spanner: - - Support SessionLabels. - -- speech: - - Add api v1 beta1 client. - -- storage: - - BEHAVIOR CHANGE: Retry reads when retryable error occurs. - - Fix delete of object in requester-pays bucket. - - Support KMS integration. - -## v0.21.0 - -- bigquery: - - Add OpenCensus tracing. - -- firestore: - - **BREAKING CHANGE:** If a document does not exist, return a DocumentSnapshot - whose Exists method returns false. DocumentRef.Get and Transaction.Get - return the non-nil DocumentSnapshot in addition to a NotFound error. - **DocumentRef.GetAll and Transaction.GetAll return a non-nil - DocumentSnapshot instead of nil.** - - Add DocumentIterator.Stop. **Call Stop whenever you are done with a - DocumentIterator.** - - Added Query.Snapshots and DocumentRef.Snapshots, which provide realtime - notification of updates. See https://cloud.google.com/firestore/docs/query-data/listen. - - Canceling an RPC now always returns a grpc.Status with codes.Canceled. - -- spanner: - - Add `CommitTimestamp`, which supports inserting the commit timestamp of a - transaction into a column. - -## v0.20.0 - -- bigquery: Support SchemaUpdateOptions for load jobs. - -- bigtable: - - Add SampleRowKeys. - - cbt: Support union, intersection GCPolicy. - - Retry admin RPCS. - - Add trace spans to retries. - -- datastore: Add OpenCensus tracing. - -- firestore: - - Fix queries involving Null and NaN. - - Allow Timestamp protobuffers for time values. - -- logging: Add a WriteTimeout option. - -- spanner: Support Batch API. - -- storage: Add OpenCensus tracing. - -## v0.19.0 - -- bigquery: - - Support customer-managed encryption keys. - -- bigtable: - - Improved emulator support. - - Support GetCluster. - -- datastore: - - Add general mutations. - - Support pointer struct fields. - - Support transaction options. - -- firestore: - - Add Transaction.GetAll. - - Support document cursors. - -- logging: - - Support concurrent RPCs to the service. - - Support per-entry resources. - -- profiler: - - Add config options to disable heap and thread profiling. - - Read the project ID from $GOOGLE_CLOUD_PROJECT when it's set. - -- pubsub: - - BEHAVIOR CHANGE: Release flow control after ack/nack (instead of after the - callback returns). - - Add SubscriptionInProject. - - Add OpenCensus instrumentation for streaming pull. - -- storage: - - Support CORS. - -## v0.18.0 - -- bigquery: - - Marked stable. - - Schema inference of nullable fields supported. - - Added TimePartitioning to QueryConfig. - -- firestore: Data provided to DocumentRef.Set with a Merge option can contain - Delete sentinels. - -- logging: Clients can accept parent resources other than projects. - -- pubsub: - - pubsub/pstest: A lighweight fake for pubsub. Experimental; feedback welcome. - - Support updating more subscription metadata: AckDeadline, - RetainAckedMessages and RetentionDuration. - -- oslogin/apiv1beta: New client for the Cloud OS Login API. - -- rpcreplay: A package for recording and replaying gRPC traffic. - -- spanner: - - Add a ReadWithOptions that supports a row limit, as well as an index. - - Support query plan and execution statistics. - - Added [OpenCensus](http://opencensus.io) support. - -- storage: Clarify checksum validation for gzipped files (it is not validated - when the file is served uncompressed). - - -## v0.17.0 - -- firestore BREAKING CHANGES: - - Remove UpdateMap and UpdateStruct; rename UpdatePaths to Update. - Change - `docref.UpdateMap(ctx, map[string]interface{}{"a.b", 1})` - to - `docref.Update(ctx, []firestore.Update{{Path: "a.b", Value: 1}})` - - Change - `docref.UpdateStruct(ctx, []string{"Field"}, aStruct)` - to - `docref.Update(ctx, []firestore.Update{{Path: "Field", Value: aStruct.Field}})` - - Rename MergePaths to Merge; require args to be FieldPaths - - A value stored as an integer can be read into a floating-point field, and vice versa. -- bigtable/cmd/cbt: - - Support deleting a column. - - Add regex option for row read. -- spanner: Mark stable. -- storage: - - Add Reader.ContentEncoding method. - - Fix handling of SignedURL headers. -- bigquery: - - If Uploader.Put is called with no rows, it returns nil without making a - call. - - Schema inference supports the "nullable" option in struct tags for - non-required fields. - - TimePartitioning supports "Field". - - -## v0.16.0 - -- Other bigquery changes: - - `JobIterator.Next` returns `*Job`; removed `JobInfo` (BREAKING CHANGE). - - UseStandardSQL is deprecated; set UseLegacySQL to true if you need - Legacy SQL. - - Uploader.Put will generate a random insert ID if you do not provide one. - - Support time partitioning for load jobs. - - Support dry-run queries. - - A `Job` remembers its last retrieved status. - - Support retrieving job configuration. - - Support labels for jobs and tables. - - Support dataset access lists. - - Improve support for external data sources, including data from Bigtable and - Google Sheets, and tables with external data. - - Support updating a table's view configuration. - - Fix uploading civil times with nanoseconds. - -- storage: - - Support PubSub notifications. - - Support Requester Pays buckets. - -- profiler: Support goroutine and mutex profile types. - -## v0.15.0 - -- firestore: beta release. See the - [announcement](https://firebase.googleblog.com/2017/10/introducing-cloud-firestore.html). - -- errorreporting: The existing package has been redesigned. - -- errors: This package has been removed. Use errorreporting. - - -## v0.14.0 - -- bigquery BREAKING CHANGES: - - Standard SQL is the default for queries and views. - - `Table.Create` takes `TableMetadata` as a second argument, instead of - options. - - `Dataset.Create` takes `DatasetMetadata` as a second argument. - - `DatasetMetadata` field `ID` renamed to `FullID` - - `TableMetadata` field `ID` renamed to `FullID` - -- Other bigquery changes: - - The client will append a random suffix to a provided job ID if you set - `AddJobIDSuffix` to true in a job config. - - Listing jobs is supported. - - Better retry logic. - -- vision, language, speech: clients are now stable - -- monitoring: client is now beta - -- profiler: - - Rename InstanceName to Instance, ZoneName to Zone - - Auto-detect service name and version on AppEngine. - -## v0.13.0 - -- bigquery: UseLegacySQL options for CreateTable and QueryConfig. Use these - options to continue using Legacy SQL after the client switches its default - to Standard SQL. - -- bigquery: Support for updating dataset labels. - -- bigquery: Set DatasetIterator.ProjectID to list datasets in a project other - than the client's. DatasetsInProject is no longer needed and is deprecated. - -- bigtable: Fail ListInstances when any zones fail. - -- spanner: support decoding of slices of basic types (e.g. []string, []int64, - etc.) - -- logging/logadmin: UpdateSink no longer creates a sink if it is missing - (actually a change to the underlying service, not the client) - -- profiler: Service and ServiceVersion replace Target in Config. - -## v0.12.0 - -- pubsub: Subscription.Receive now uses streaming pull. - -- pubsub: add Client.TopicInProject to access topics in a different project - than the client. - -- errors: renamed errorreporting. The errors package will be removed shortly. - -- datastore: improved retry behavior. - -- bigquery: support updates to dataset metadata, with etags. - -- bigquery: add etag support to Table.Update (BREAKING: etag argument added). - -- bigquery: generate all job IDs on the client. - -- storage: support bucket lifecycle configurations. - - -## v0.11.0 - -- Clients for spanner, pubsub and video are now in beta. - -- New client for DLP. - -- spanner: performance and testing improvements. - -- storage: requester-pays buckets are supported. - -- storage, profiler, bigtable, bigquery: bug fixes and other minor improvements. - -- pubsub: bug fixes and other minor improvements - -## v0.10.0 - -- pubsub: Subscription.ModifyPushConfig replaced with Subscription.Update. - -- pubsub: Subscription.Receive now runs concurrently for higher throughput. - -- vision: cloud.google.com/go/vision is deprecated. Use -cloud.google.com/go/vision/apiv1 instead. - -- translation: now stable. - -- trace: several changes to the surface. See the link below. - -### Code changes required from v0.9.0 - -- pubsub: Replace - - ``` - sub.ModifyPushConfig(ctx, pubsub.PushConfig{Endpoint: "https://example.com/push"}) - ``` - - with - - ``` - sub.Update(ctx, pubsub.SubscriptionConfigToUpdate{ - PushConfig: &pubsub.PushConfig{Endpoint: "https://example.com/push"}, - }) - ``` - -- trace: traceGRPCServerInterceptor will be provided from *trace.Client. -Given an initialized `*trace.Client` named `tc`, instead of - - ``` - s := grpc.NewServer(grpc.UnaryInterceptor(trace.GRPCServerInterceptor(tc))) - ``` - - write - - ``` - s := grpc.NewServer(grpc.UnaryInterceptor(tc.GRPCServerInterceptor())) - ``` - -- trace trace.GRPCClientInterceptor will also provided from *trace.Client. -Instead of - - ``` - conn, err := grpc.Dial(srv.Addr, grpc.WithUnaryInterceptor(trace.GRPCClientInterceptor())) - ``` - - write - - ``` - conn, err := grpc.Dial(srv.Addr, grpc.WithUnaryInterceptor(tc.GRPCClientInterceptor())) - ``` - -- trace: We removed the deprecated `trace.EnableGRPCTracing`. Use the gRPC -interceptor as a dial option as shown below when initializing Cloud package -clients: - - ``` - c, err := pubsub.NewClient(ctx, "project-id", option.WithGRPCDialOption(grpc.WithUnaryInterceptor(tc.GRPCClientInterceptor()))) - if err != nil { - ... - } - ``` - - -## v0.9.0 - -- Breaking changes to some autogenerated clients. -- rpcreplay package added. - -## v0.8.0 - -- profiler package added. -- storage: - - Retry Objects.Insert call. - - Add ProgressFunc to WRiter. -- pubsub: breaking changes: - - Publish is now asynchronous ([announcement](https://groups.google.com/d/topic/google-api-go-announce/aaqRDIQ3rvU/discussion)). - - Subscription.Pull replaced by Subscription.Receive, which takes a callback ([announcement](https://groups.google.com/d/topic/google-api-go-announce/8pt6oetAdKc/discussion)). - - Message.Done replaced with Message.Ack and Message.Nack. - -## v0.7.0 - -- Release of a client library for Spanner. See -the -[blog -post](https://cloudplatform.googleblog.com/2017/02/introducing-Cloud-Spanner-a-global-database-service-for-mission-critical-applications.html). -Note that although the Spanner service is beta, the Go client library is alpha. - -## v0.6.0 - -- Beta release of BigQuery, DataStore, Logging and Storage. See the -[blog post](https://cloudplatform.googleblog.com/2016/12/announcing-new-google-cloud-client.html). - -- bigquery: - - struct support. Read a row directly into a struct with -`RowIterator.Next`, and upload a row directly from a struct with `Uploader.Put`. -You can also use field tags. See the [package documentation][cloud-bigquery-ref] -for details. - - - The `ValueList` type was removed. It is no longer necessary. Instead of - ```go - var v ValueList - ... it.Next(&v) .. - ``` - use - - ```go - var v []Value - ... it.Next(&v) ... - ``` - - - Previously, repeatedly calling `RowIterator.Next` on the same `[]Value` or - `ValueList` would append to the slice. Now each call resets the size to zero first. - - - Schema inference will infer the SQL type BYTES for a struct field of - type []byte. Previously it inferred STRING. - - - The types `uint`, `uint64` and `uintptr` are no longer supported in schema - inference. BigQuery's integer type is INT64, and those types may hold values - that are not correctly represented in a 64-bit signed integer. - -## v0.5.0 - -- bigquery: - - The SQL types DATE, TIME and DATETIME are now supported. They correspond to - the `Date`, `Time` and `DateTime` types in the new `cloud.google.com/go/civil` - package. - - Support for query parameters. - - Support deleting a dataset. - - Values from INTEGER columns will now be returned as int64, not int. This - will avoid errors arising from large values on 32-bit systems. -- datastore: - - Nested Go structs encoded as Entity values, instead of a -flattened list of the embedded struct's fields. This means that you may now have twice-nested slices, eg. - ```go - type State struct { - Cities []struct{ - Populations []int - } - } - ``` - See [the announcement](https://groups.google.com/forum/#!topic/google-api-go-announce/79jtrdeuJAg) for -more details. - - Contexts no longer hold namespaces; instead you must set a key's namespace - explicitly. Also, key functions have been changed and renamed. - - The WithNamespace function has been removed. To specify a namespace in a Query, use the Query.Namespace method: - ```go - q := datastore.NewQuery("Kind").Namespace("ns") - ``` - - All the fields of Key are exported. That means you can construct any Key with a struct literal: - ```go - k := &Key{Kind: "Kind", ID: 37, Namespace: "ns"} - ``` - - As a result of the above, the Key methods Kind, ID, d.Name, Parent, SetParent and Namespace have been removed. - - `NewIncompleteKey` has been removed, replaced by `IncompleteKey`. Replace - ```go - NewIncompleteKey(ctx, kind, parent) - ``` - with - ```go - IncompleteKey(kind, parent) - ``` - and if you do use namespaces, make sure you set the namespace on the returned key. - - `NewKey` has been removed, replaced by `NameKey` and `IDKey`. Replace - ```go - NewKey(ctx, kind, name, 0, parent) - NewKey(ctx, kind, "", id, parent) - ``` - with - ```go - NameKey(kind, name, parent) - IDKey(kind, id, parent) - ``` - and if you do use namespaces, make sure you set the namespace on the returned key. - - The `Done` variable has been removed. Replace `datastore.Done` with `iterator.Done`, from the package `google.golang.org/api/iterator`. - - The `Client.Close` method will have a return type of error. It will return the result of closing the underlying gRPC connection. - - See [the announcement](https://groups.google.com/forum/#!topic/google-api-go-announce/hqXtM_4Ix-0) for -more details. - -## v0.4.0 - -- bigquery: - -`NewGCSReference` is now a function, not a method on `Client`. - - `Table.LoaderFrom` now accepts a `ReaderSource`, enabling - loading data into a table from a file or any `io.Reader`. - * Client.Table and Client.OpenTable have been removed. - Replace - ```go - client.OpenTable("project", "dataset", "table") - ``` - with - ```go - client.DatasetInProject("project", "dataset").Table("table") - ``` - - * Client.CreateTable has been removed. - Replace - ```go - client.CreateTable(ctx, "project", "dataset", "table") - ``` - with - ```go - client.DatasetInProject("project", "dataset").Table("table").Create(ctx) - ``` - - * Dataset.ListTables have been replaced with Dataset.Tables. - Replace - ```go - tables, err := ds.ListTables(ctx) - ``` - with - ```go - it := ds.Tables(ctx) - for { - table, err := it.Next() - if err == iterator.Done { - break - } - if err != nil { - // TODO: Handle error. - } - // TODO: use table. - } - ``` - - * Client.Read has been replaced with Job.Read, Table.Read and Query.Read. - Replace - ```go - it, err := client.Read(ctx, job) - ``` - with - ```go - it, err := job.Read(ctx) - ``` - and similarly for reading from tables or queries. - - * The iterator returned from the Read methods is now named RowIterator. Its - behavior is closer to the other iterators in these libraries. It no longer - supports the Schema method; see the next item. - Replace - ```go - for it.Next(ctx) { - var vals ValueList - if err := it.Get(&vals); err != nil { - // TODO: Handle error. - } - // TODO: use vals. - } - if err := it.Err(); err != nil { - // TODO: Handle error. - } - ``` - with - ``` - for { - var vals ValueList - err := it.Next(&vals) - if err == iterator.Done { - break - } - if err != nil { - // TODO: Handle error. - } - // TODO: use vals. - } - ``` - Instead of the `RecordsPerRequest(n)` option, write - ```go - it.PageInfo().MaxSize = n - ``` - Instead of the `StartIndex(i)` option, write - ```go - it.StartIndex = i - ``` - - * ValueLoader.Load now takes a Schema in addition to a slice of Values. - Replace - ```go - func (vl *myValueLoader) Load(v []bigquery.Value) - ``` - with - ```go - func (vl *myValueLoader) Load(v []bigquery.Value, s bigquery.Schema) - ``` - - - * Table.Patch is replace by Table.Update. - Replace - ```go - p := table.Patch() - p.Description("new description") - metadata, err := p.Apply(ctx) - ``` - with - ```go - metadata, err := table.Update(ctx, bigquery.TableMetadataToUpdate{ - Description: "new description", - }) - ``` - - * Client.Copy is replaced by separate methods for each of its four functions. - All options have been replaced by struct fields. - - * To load data from Google Cloud Storage into a table, use Table.LoaderFrom. - - Replace - ```go - client.Copy(ctx, table, gcsRef) - ``` - with - ```go - table.LoaderFrom(gcsRef).Run(ctx) - ``` - Instead of passing options to Copy, set fields on the Loader: - ```go - loader := table.LoaderFrom(gcsRef) - loader.WriteDisposition = bigquery.WriteTruncate - ``` - - * To extract data from a table into Google Cloud Storage, use - Table.ExtractorTo. Set fields on the returned Extractor instead of - passing options. - - Replace - ```go - client.Copy(ctx, gcsRef, table) - ``` - with - ```go - table.ExtractorTo(gcsRef).Run(ctx) - ``` - - * To copy data into a table from one or more other tables, use - Table.CopierFrom. Set fields on the returned Copier instead of passing options. - - Replace - ```go - client.Copy(ctx, dstTable, srcTable) - ``` - with - ```go - dst.Table.CopierFrom(srcTable).Run(ctx) - ``` - - * To start a query job, create a Query and call its Run method. Set fields - on the query instead of passing options. - - Replace - ```go - client.Copy(ctx, table, query) - ``` - with - ```go - query.Run(ctx) - ``` - - * Table.NewUploader has been renamed to Table.Uploader. Instead of options, - configure an Uploader by setting its fields. - Replace - ```go - u := table.NewUploader(bigquery.UploadIgnoreUnknownValues()) - ``` - with - ```go - u := table.NewUploader(bigquery.UploadIgnoreUnknownValues()) - u.IgnoreUnknownValues = true - ``` - -- pubsub: remove `pubsub.Done`. Use `iterator.Done` instead, where `iterator` is the package -`google.golang.org/api/iterator`. - -## v0.3.0 - -- storage: - * AdminClient replaced by methods on Client. - Replace - ```go - adminClient.CreateBucket(ctx, bucketName, attrs) - ``` - with - ```go - client.Bucket(bucketName).Create(ctx, projectID, attrs) - ``` - - * BucketHandle.List replaced by BucketHandle.Objects. - Replace - ```go - for query != nil { - objs, err := bucket.List(d.ctx, query) - if err != nil { ... } - query = objs.Next - for _, obj := range objs.Results { - fmt.Println(obj) - } - } - ``` - with - ```go - iter := bucket.Objects(d.ctx, query) - for { - obj, err := iter.Next() - if err == iterator.Done { - break - } - if err != nil { ... } - fmt.Println(obj) - } - ``` - (The `iterator` package is at `google.golang.org/api/iterator`.) - - Replace `Query.Cursor` with `ObjectIterator.PageInfo().Token`. - - Replace `Query.MaxResults` with `ObjectIterator.PageInfo().MaxSize`. - - - * ObjectHandle.CopyTo replaced by ObjectHandle.CopierFrom. - Replace - ```go - attrs, err := src.CopyTo(ctx, dst, nil) - ``` - with - ```go - attrs, err := dst.CopierFrom(src).Run(ctx) - ``` - - Replace - ```go - attrs, err := src.CopyTo(ctx, dst, &storage.ObjectAttrs{ContextType: "text/html"}) - ``` - with - ```go - c := dst.CopierFrom(src) - c.ContextType = "text/html" - attrs, err := c.Run(ctx) - ``` - - * ObjectHandle.ComposeFrom replaced by ObjectHandle.ComposerFrom. - Replace - ```go - attrs, err := dst.ComposeFrom(ctx, []*storage.ObjectHandle{src1, src2}, nil) - ``` - with - ```go - attrs, err := dst.ComposerFrom(src1, src2).Run(ctx) - ``` - - * ObjectHandle.Update's ObjectAttrs argument replaced by ObjectAttrsToUpdate. - Replace - ```go - attrs, err := obj.Update(ctx, &storage.ObjectAttrs{ContextType: "text/html"}) - ``` - with - ```go - attrs, err := obj.Update(ctx, storage.ObjectAttrsToUpdate{ContextType: "text/html"}) - ``` - - * ObjectHandle.WithConditions replaced by ObjectHandle.If. - Replace - ```go - obj.WithConditions(storage.Generation(gen), storage.IfMetaGenerationMatch(mgen)) - ``` - with - ```go - obj.Generation(gen).If(storage.Conditions{MetagenerationMatch: mgen}) - ``` - - Replace - ```go - obj.WithConditions(storage.IfGenerationMatch(0)) - ``` - with - ```go - obj.If(storage.Conditions{DoesNotExist: true}) - ``` - - * `storage.Done` replaced by `iterator.Done` (from package `google.golang.org/api/iterator`). - -- Package preview/logging deleted. Use logging instead. - -## v0.2.0 - -- Logging client replaced with preview version (see below). - -- New clients for some of Google's Machine Learning APIs: Vision, Speech, and -Natural Language. - -- Preview version of a new [Stackdriver Logging][cloud-logging] client in -[`cloud.google.com/go/preview/logging`](https://godoc.org/cloud.google.com/go/preview/logging). -This client uses gRPC as its transport layer, and supports log reading, sinks -and metrics. It will replace the current client at `cloud.google.com/go/logging` shortly. diff --git a/vendor/cloud.google.com/go/CODE_OF_CONDUCT.md b/vendor/cloud.google.com/go/CODE_OF_CONDUCT.md deleted file mode 100644 index 8fd1bc9c22..0000000000 --- a/vendor/cloud.google.com/go/CODE_OF_CONDUCT.md +++ /dev/null @@ -1,44 +0,0 @@ -# Contributor Code of Conduct - -As contributors and maintainers of this project, -and in the interest of fostering an open and welcoming community, -we pledge to respect all people who contribute through reporting issues, -posting feature requests, updating documentation, -submitting pull requests or patches, and other activities. - -We are committed to making participation in this project -a harassment-free experience for everyone, -regardless of level of experience, gender, gender identity and expression, -sexual orientation, disability, personal appearance, -body size, race, ethnicity, age, religion, or nationality. - -Examples of unacceptable behavior by participants include: - -* The use of sexualized language or imagery -* Personal attacks -* Trolling or insulting/derogatory comments -* Public or private harassment -* Publishing other's private information, -such as physical or electronic -addresses, without explicit permission -* Other unethical or unprofessional conduct. - -Project maintainers have the right and responsibility to remove, edit, or reject -comments, commits, code, wiki edits, issues, and other contributions -that are not aligned to this Code of Conduct. -By adopting this Code of Conduct, -project maintainers commit themselves to fairly and consistently -applying these principles to every aspect of managing this project. -Project maintainers who do not follow or enforce the Code of Conduct -may be permanently removed from the project team. - -This code of conduct applies both within project spaces and in public spaces -when an individual is representing the project or its community. - -Instances of abusive, harassing, or otherwise unacceptable behavior -may be reported by opening an issue -or contacting one or more of the project maintainers. - -This Code of Conduct is adapted from the [Contributor Covenant](http://contributor-covenant.org), version 1.2.0, -available at [http://contributor-covenant.org/version/1/2/0/](http://contributor-covenant.org/version/1/2/0/) - diff --git a/vendor/cloud.google.com/go/CONTRIBUTING.md b/vendor/cloud.google.com/go/CONTRIBUTING.md deleted file mode 100644 index 26ea7bb285..0000000000 --- a/vendor/cloud.google.com/go/CONTRIBUTING.md +++ /dev/null @@ -1,379 +0,0 @@ -# Contributing - -1. [File an issue](https://github.com/googleapis/google-cloud-go/issues/new/choose). - The issue will be used to discuss the bug or feature and should be created - before sending a PR. - -1. [Install Go](https://golang.org/dl/). - 1. Ensure that your `GOBIN` directory (by default `$(go env GOPATH)/bin`) - is in your `PATH`. - 1. Check it's working by running `go version`. - * If it doesn't work, check the install location, usually - `/usr/local/go`, is on your `PATH`. - -1. Sign one of the -[contributor license agreements](#contributor-license-agreements) below. - -1. Clone the repo: - `git clone https://github.com/googleapis/google-cloud-go` - -1. Change into the checked out source: - `cd google-cloud-go` - -1. Fork the repo. - -1. Set your fork as a remote: - `git remote add fork git@github.com:GITHUB_USERNAME/google-cloud-go.git` - -1. Make changes, commit to your fork. - - Commit messages should follow the - [Conventional Commits Style](https://www.conventionalcommits.org). The scope - portion should always be filled with the name of the package affected by the - changes being made. For example: - ``` - feat(functions): add gophers codelab - ``` - -1. Send a pull request with your changes. - - To minimize friction, consider setting `Allow edits from maintainers` on the - PR, which will enable project committers and automation to update your PR. - -1. A maintainer will review the pull request and make comments. - - Prefer adding additional commits over amending and force-pushing since it can - be difficult to follow code reviews when the commit history changes. - - Commits will be squashed when they're merged. - -## Policy on new dependencies - -While the Go ecosystem is rich with useful modules, in this project we try to -minimize the number of direct dependencies we have on modules that are not -Google-owned. - -Adding new third party dependencies can have the following effects: -* broadens the vulnerability surface -* increases so called "vanity" import routing infrastructure failure points -* increases complexity of our own [`third_party`][] imports - -So if you are contributing, please either contribute the full implementation -directly, or find a Google-owned project that provides the functionality. Of -course, there may be exceptions to this rule, but those should be well defined -and agreed upon by the maintainers ahead of time. - -## Testing - -We test code against two versions of Go, the minimum and maximum versions -supported by our clients. To see which versions these are checkout our -[README](README.md#supported-versions). - -### Integration Tests - -In addition to the unit tests, you may run the integration test suite. These -directions describe setting up your environment to run integration tests for -_all_ packages: note that many of these instructions may be redundant if you -intend only to run integration tests on a single package. - -#### GCP Setup - -To run the integrations tests, creation and configuration of three projects in -the Google Developers Console is required: one specifically for Firestore -integration tests, one specifically for Bigtable integration tests, and another -for all other integration tests. We'll refer to these projects as -"Firestore project", "Bigtable project" and "general project". - -Note: You can skip setting up Bigtable project if you do not plan working on or running a few Bigtable -tests that require a secondary project - -After creating each project, you must [create a service account](https://developers.google.com/identity/protocols/OAuth2ServiceAccount#creatinganaccount) -for each project. Ensure the project-level **Owner** -[IAM role](https://console.cloud.google.com/iam-admin/iam/project) role is added to -each service account. During the creation of the service account, you should -download the JSON credential file for use later. - -Next, ensure the following APIs are enabled in the general project: - -- BigQuery API -- BigQuery Data Transfer API -- Cloud Dataproc API -- Cloud Dataproc Control API Private -- Cloud Datastore API -- Cloud Firestore API -- Cloud Key Management Service (KMS) API -- Cloud Natural Language API -- Cloud OS Login API -- Cloud Pub/Sub API -- Cloud Resource Manager API -- Cloud Spanner API -- Cloud Speech API -- Cloud Translation API -- Cloud Video Intelligence API -- Cloud Vision API -- Compute Engine API -- Compute Engine Instance Group Manager API -- Container Registry API -- Firebase Rules API -- Google Cloud APIs -- Google Cloud Deployment Manager V2 API -- Google Cloud SQL -- Google Cloud Storage -- Google Cloud Storage JSON API -- Google Compute Engine Instance Group Updater API -- Google Compute Engine Instance Groups API -- Kubernetes Engine API -- Cloud Error Reporting API -- Pub/Sub Lite API - -Next, create a Datastore database in the general project, and a Firestore -database in the Firestore project. - -Finally, in the general project, create an API key for the translate API: - -- Go to GCP Developer Console. -- Navigate to APIs & Services > Credentials. -- Click Create Credentials > API Key. -- Save this key for use in `GCLOUD_TESTS_API_KEY` as described below. - -#### Local Setup - -Once the three projects are created and configured, set the following -environment variables: - -- `GCLOUD_TESTS_GOLANG_PROJECT_ID`: Developers Console project's ID (e.g. -bamboo-shift-455) for the general project. -- `GCLOUD_TESTS_GOLANG_KEY`: The path to the JSON key file of the general -project's service account. -- `GCLOUD_TESTS_GOLANG_DATASTORE_DATABASES`: Comma separated list of developer's -Datastore databases. If not provided, default database i.e. empty string is used. -- `GCLOUD_TESTS_GOLANG_FIRESTORE_PROJECT_ID`: Developers Console project's ID -(e.g. doorway-cliff-677) for the Firestore project. -- `GCLOUD_TESTS_GOLANG_FIRESTORE_DATABASES`: Comma separated list of developer's -Firestore databases. If not provided, default database is used. -- `GCLOUD_TESTS_GOLANG_FIRESTORE_KEY`: The path to the JSON key file of the -Firestore project's service account. -- `GCLOUD_TESTS_API_KEY`: API key for using the Translate API created above. -- `GCLOUD_TESTS_GOLANG_SECONDARY_BIGTABLE_PROJECT_ID`: Developers Console -project's ID (e.g. doorway-cliff-677) for Bigtable optional secondary project. -This can be same as Firestore project or any project other than the general -project. -- `GCLOUD_TESTS_BIGTABLE_CLUSTER`: Cluster ID of Bigtable cluster in general -project. -- `GCLOUD_TESTS_BIGTABLE_PRI_PROJ_SEC_CLUSTER`: Optional. Cluster ID of Bigtable -secondary cluster in general project -- `TEST_UNIVERSE_DOMAIN`: Optional. Universe domain to test universe domain -functionality against. -- `TEST_UNIVERSE_PROJECT_ID`: Optional. Project ID within the universe domain -for testing. -- `TEST_UNIVERSE_LOCATION`: Optional. Available location within the universe -domain. -- `TEST_UNIVERSE_DOMAIN_CREDENTIAL`: Optional. The path to the JSON key file of -the universe domain's service account. - -As part of the setup that follows, the following variables will be configured: - -- `GCLOUD_TESTS_GOLANG_KEYRING`: The full name of the keyring for the tests, -in the form -"projects/P/locations/L/keyRings/R". The creation of this is described below. -- `GCLOUD_TESTS_BIGTABLE_KEYRING`: The full name of the keyring for the bigtable tests, -in the form -"projects/P/locations/L/keyRings/R". The creation of this is described below. Expected to be single region. -- `GCLOUD_TESTS_GOLANG_ZONE`: Compute Engine zone. - -Install the [gcloud command-line tool][gcloudcli] to your machine and use it to -create some resources used in integration tests. - -From the project's root directory: - -``` sh -# Sets the default project in your env. -$ gcloud config set project $GCLOUD_TESTS_GOLANG_PROJECT_ID - -# Authenticates the gcloud tool with your account. -$ gcloud auth login - -# Create the indexes for all the databases you want to use in the datastore integration tests. -# Use empty string as databaseID or skip database flag for default database. -$ gcloud alpha datastore indexes create --database=your-databaseID-1 --project=$GCLOUD_TESTS_GOLANG_PROJECT_ID testdata/index.yaml - -# Creates a Google Cloud storage bucket with the same name as your test project, -# and with the Cloud Logging service account as owner, for the sink -# integration tests in logging. -$ gsutil mb gs://$GCLOUD_TESTS_GOLANG_PROJECT_ID -$ gsutil acl ch -g cloud-logs@google.com:O gs://$GCLOUD_TESTS_GOLANG_PROJECT_ID - -# Creates a PubSub topic for integration tests of storage notifications. -$ gcloud beta pubsub topics create go-storage-notification-test -# Next, go to the Pub/Sub dashboard in GCP console. Authorize the user -# "service-@gs-project-accounts.iam.gserviceaccount.com" -# as a publisher to that topic. - -# Creates a Spanner instance for the spanner integration tests. -$ gcloud beta spanner instances create go-integration-test --config regional-us-central1 --nodes 10 --description 'Instance for go client test' -# NOTE: Spanner instances are priced by the node-hour, so you may want to -# delete the instance after testing with 'gcloud beta spanner instances delete'. - -$ export MY_KEYRING=some-keyring-name -$ export MY_LOCATION=global -$ export MY_SINGLE_LOCATION=us-central1 -# Creates a KMS keyring, in the same location as the default location for your -# project's buckets. -$ gcloud kms keyrings create $MY_KEYRING --location $MY_LOCATION -# Creates two keys in the keyring, named key1 and key2. -$ gcloud kms keys create key1 --keyring $MY_KEYRING --location $MY_LOCATION --purpose encryption -$ gcloud kms keys create key2 --keyring $MY_KEYRING --location $MY_LOCATION --purpose encryption -# Sets the GCLOUD_TESTS_GOLANG_KEYRING environment variable. -$ export GCLOUD_TESTS_GOLANG_KEYRING=projects/$GCLOUD_TESTS_GOLANG_PROJECT_ID/locations/$MY_LOCATION/keyRings/$MY_KEYRING -# Authorizes Google Cloud Storage to encrypt and decrypt using key1. -$ gsutil kms authorize -p $GCLOUD_TESTS_GOLANG_PROJECT_ID -k $GCLOUD_TESTS_GOLANG_KEYRING/cryptoKeys/key1 - -# Create KMS Key in one region for Bigtable -$ gcloud kms keyrings create $MY_KEYRING --location $MY_SINGLE_LOCATION -$ gcloud kms keys create key1 --keyring $MY_KEYRING --location $MY_SINGLE_LOCATION --purpose encryption -# Sets the GCLOUD_TESTS_BIGTABLE_KEYRING environment variable. -$ export GCLOUD_TESTS_BIGTABLE_KEYRING=projects/$GCLOUD_TESTS_GOLANG_PROJECT_ID/locations/$MY_SINGLE_LOCATION/keyRings/$MY_KEYRING -# Create a service agent, https://cloud.google.com/bigtable/docs/use-cmek#gcloud: -$ gcloud beta services identity create \ - --service=bigtableadmin.googleapis.com \ - --project $GCLOUD_TESTS_GOLANG_PROJECT_ID -# Note the service agent email for the agent created. -$ export SERVICE_AGENT_EMAIL= - -# Authorizes Google Cloud Bigtable to encrypt and decrypt using key1 -$ gcloud kms keys add-iam-policy-binding key1 \ - --keyring $MY_KEYRING \ - --location $MY_SINGLE_LOCATION \ - --role roles/cloudkms.cryptoKeyEncrypterDecrypter \ - --member "serviceAccount:$SERVICE_AGENT_EMAIL" \ - --project $GCLOUD_TESTS_GOLANG_PROJECT_ID -``` - -It may be useful to add exports to your shell initialization for future use. -For instance, in `.zshrc`: - -```sh -#### START GO SDK Test Variables -# Developers Console project's ID (e.g. bamboo-shift-455) for the general project. -export GCLOUD_TESTS_GOLANG_PROJECT_ID=your-project - -# Developers Console project's ID (e.g. bamboo-shift-455) for the Bigtable project. -export GCLOUD_TESTS_GOLANG_SECONDARY_BIGTABLE_PROJECT_ID=your-bigtable-optional-secondary-project - -# The path to the JSON key file of the general project's service account. -export GCLOUD_TESTS_GOLANG_KEY=~/directory/your-project-abcd1234.json - -# Comma separated list of developer's Datastore databases. If not provided, -# default database i.e. empty string is used. -export GCLOUD_TESTS_GOLANG_DATASTORE_DATABASES=your-database-1,your-database-2 - -# Developers Console project's ID (e.g. doorway-cliff-677) for the Firestore project. -export GCLOUD_TESTS_GOLANG_FIRESTORE_PROJECT_ID=your-firestore-project - -# Comma separated list of developer's Firestore databases. If not provided, default database is used. -export GCLOUD_TESTS_GOLANG_FIRESTORE_DATABASES=your-database-1,your-database-2 - -# The path to the JSON key file of the Firestore project's service account. -export GCLOUD_TESTS_GOLANG_FIRESTORE_KEY=~/directory/your-firestore-project-abcd1234.json - -# The full name of the keyring for the tests, in the form "projects/P/locations/L/keyRings/R". -# The creation of this is described below. -export MY_KEYRING=my-golang-sdk-test -export MY_LOCATION=global -export GCLOUD_TESTS_GOLANG_KEYRING=projects/$GCLOUD_TESTS_GOLANG_PROJECT_ID/locations/$MY_LOCATION/keyRings/$MY_KEYRING - -# API key for using the Translate API. -export GCLOUD_TESTS_API_KEY=abcdefghijk123456789 - -# Compute Engine zone. (https://cloud.google.com/compute/docs/regions-zones) -export GCLOUD_TESTS_GOLANG_ZONE=your-chosen-region -#### END GO SDK Test Variables -``` - -#### Running - -Once you've done the necessary setup, you can run the integration tests by -running: - -``` sh -$ go test -v ./... -``` - -Note that the above command will not run the tests in other modules. To run -tests on other modules, first navigate to the appropriate -subdirectory. For instance, to run only the tests for datastore: -``` sh -$ cd datastore -$ go test -v ./... -``` - -#### Replay - -Some packages can record the RPCs during integration tests to a file for -subsequent replay. To record, pass the `-record` flag to `go test`. The -recording will be saved to the _package_`.replay` file. To replay integration -tests from a saved recording, the replay file must be present, the `-short` -flag must be passed to `go test`, and the `GCLOUD_TESTS_GOLANG_ENABLE_REPLAY` -environment variable must have a non-empty value. - -## Contributor License Agreements - -Before we can accept your pull requests you'll need to sign a Contributor -License Agreement (CLA): - -- **If you are an individual writing original source code** and **you own the -intellectual property**, then you'll need to sign an [individual CLA][indvcla]. -- **If you work for a company that wants to allow you to contribute your -work**, then you'll need to sign a [corporate CLA][corpcla]. - -You can sign these electronically (just scroll to the bottom). After that, -we'll be able to accept your pull requests. - -## Contributor Code of Conduct - -As contributors and maintainers of this project, -and in the interest of fostering an open and welcoming community, -we pledge to respect all people who contribute through reporting issues, -posting feature requests, updating documentation, -submitting pull requests or patches, and other activities. - -We are committed to making participation in this project -a harassment-free experience for everyone, -regardless of level of experience, gender, gender identity and expression, -sexual orientation, disability, personal appearance, -body size, race, ethnicity, age, religion, or nationality. - -Examples of unacceptable behavior by participants include: - -* The use of sexualized language or imagery -* Personal attacks -* Trolling or insulting/derogatory comments -* Public or private harassment -* Publishing other's private information, -such as physical or electronic -addresses, without explicit permission -* Other unethical or unprofessional conduct. - -Project maintainers have the right and responsibility to remove, edit, or reject -comments, commits, code, wiki edits, issues, and other contributions -that are not aligned to this Code of Conduct. -By adopting this Code of Conduct, -project maintainers commit themselves to fairly and consistently -applying these principles to every aspect of managing this project. -Project maintainers who do not follow or enforce the Code of Conduct -may be permanently removed from the project team. - -This code of conduct applies both within project spaces and in public spaces -when an individual is representing the project or its community. - -Instances of abusive, harassing, or otherwise unacceptable behavior -may be reported by opening an issue -or contacting one or more of the project maintainers. - -This Code of Conduct is adapted from the [Contributor Covenant](https://contributor-covenant.org), version 1.2.0, -available at [https://contributor-covenant.org/version/1/2/0/](https://contributor-covenant.org/version/1/2/0/) - -[gcloudcli]: https://developers.google.com/cloud/sdk/gcloud/ -[indvcla]: https://developers.google.com/open-source/cla/individual -[corpcla]: https://developers.google.com/open-source/cla/corporate -[`third_party`]: https://opensource.google/documentation/reference/thirdparty diff --git a/vendor/cloud.google.com/go/README.md b/vendor/cloud.google.com/go/README.md deleted file mode 100644 index 5fd6ff388c..0000000000 --- a/vendor/cloud.google.com/go/README.md +++ /dev/null @@ -1,92 +0,0 @@ -# Google Cloud Client Libraries for Go - -[![Go Reference](https://pkg.go.dev/badge/cloud.google.com/go.svg)](https://pkg.go.dev/cloud.google.com/go) - -Go packages for [Google Cloud Platform](https://cloud.google.com) services. - -## Installation - -```bash -go get cloud.google.com/go/firestore@latest # Replace firestore with the package you want to use. -``` - -**NOTE:** Some of these packages are under development, and may occasionally -make backwards-incompatible changes. - -## Supported APIs - -For an updated list of all of our released APIs please see our -[reference docs](https://cloud.google.com/go/docs/reference). - -## [Go Versions Supported](#supported-versions) - -Our libraries are compatible with the two most recent major Go -releases, the same [policy](https://go.dev/doc/devel/release#policy) the Go -programming language follows. This means the currently supported versions are: - -- Go 1.24 -- Go 1.25 - -## Authentication - -By default, each client library will use [Application Default Credentials](https://developers.google.com/identity/protocols/application-default-credentials) -(ADC) to automatically configure the credentials used in calling the API endpoint. -When using the libraries in a Google Cloud Platform environment such as Compute -Engine, Kubernetes Engine, or App Engine, no additional authentication steps are -necessary. See [Authentication methods at Google](https://cloud.google.com/docs/authentication) -and [Authenticate for using client libraries](https://cloud.google.com/docs/authentication/client-libraries) -for more information. - -```go -client, err := storage.NewClient(ctx) -``` - -For applications running elsewhere, such as your local development environment, -you can use the `gcloud auth application-default login` command from the -[Google Cloud CLI](https://cloud.google.com/cli) to set user credentials in -your local filesystem. Application Default Credentials will automatically detect -these credentials. See [Set up ADC for a local development -environment](https://cloud.google.com/docs/authentication/set-up-adc-local-dev-environment) -for more information. - -Alternately, you may need to provide an explicit path to your credentials. To authenticate -using a [service account](https://cloud.google.com/docs/authentication#service-accounts) -key file, either set the `GOOGLE_APPLICATION_CREDENTIALS` environment variable to the path -to your key file, or programmatically pass -[`option.WithCredentialsFile`](https://pkg.go.dev/google.golang.org/api/option#WithCredentialsFile) -to the `NewClient` function of the desired package. For example: - -```go -client, err := storage.NewClient(ctx, option.WithCredentialsFile("path/to/keyfile.json")) -``` - -You can exert even more control over authentication by using the -[credentials](https://pkg.go.dev/cloud.google.com/go/auth/credentials) package to -create an [auth.Credentials](https://pkg.go.dev/cloud.google.com/go/auth#Credentials). -Then pass [`option.WithAuthCredentials`](https://pkg.go.dev/google.golang.org/api/option#WithAuthCredentials) -to the `NewClient` function: - -```go -creds, err := credentials.DetectDefault(&credentials.DetectOptions{...}) -... -client, err := storage.NewClient(ctx, option.WithAuthCredentials(creds)) -``` - -## Contributing - -Contributions are welcome. Please, see the -[CONTRIBUTING](https://github.com/GoogleCloudPlatform/google-cloud-go/blob/main/CONTRIBUTING.md) -document for details. - -Please note that this project is released with a Contributor Code of Conduct. -By participating in this project you agree to abide by its terms. -See [Contributor Code of Conduct](https://github.com/GoogleCloudPlatform/google-cloud-go/blob/main/CONTRIBUTING.md#contributor-code-of-conduct) -for more information. - -## Links - -- [Go on Google Cloud](https://cloud.google.com/go/home) -- [Getting started with Go on Google Cloud](https://cloud.google.com/go/getting-started) -- [App Engine Quickstart](https://cloud.google.com/appengine/docs/standard/go/quickstart) -- [Cloud Functions Quickstart](https://cloud.google.com/functions/docs/quickstart-go) -- [Cloud Run Quickstart](https://cloud.google.com/run/docs/quickstarts/build-and-deploy#go) diff --git a/vendor/cloud.google.com/go/RELEASING.md b/vendor/cloud.google.com/go/RELEASING.md deleted file mode 100644 index 6d0fcf4f9f..0000000000 --- a/vendor/cloud.google.com/go/RELEASING.md +++ /dev/null @@ -1,141 +0,0 @@ -# Releasing - -## Determine which module to release - -The Go client libraries have several modules. Each module does not strictly -correspond to a single library - they correspond to trees of directories. If a -file needs to be released, you must release the closest ancestor module. - -To see all modules: - -```bash -$ cat `find . -name go.mod` | grep module -module cloud.google.com/go/pubsub -module cloud.google.com/go/spanner -module cloud.google.com/go -module cloud.google.com/go/bigtable -module cloud.google.com/go/bigquery -module cloud.google.com/go/storage -module cloud.google.com/go/pubsublite -module cloud.google.com/go/firestore -module cloud.google.com/go/logging -module cloud.google.com/go/internal/gapicgen -module cloud.google.com/go/internal/godocfx -module cloud.google.com/go/internal/examples/fake -module cloud.google.com/go/internal/examples/mock -module cloud.google.com/go/datastore -``` - -The `cloud.google.com/go` is the repository root module. Each other module is -a submodule. - -So, if you need to release a change in `bigtable/bttest/inmem.go`, the closest -ancestor module is `cloud.google.com/go/bigtable` - so you should release a new -version of the `cloud.google.com/go/bigtable` submodule. - -If you need to release a change in `asset/apiv1/asset_client.go`, the closest -ancestor module is `cloud.google.com/go` - so you should release a new version -of the `cloud.google.com/go` repository root module. Note: releasing -`cloud.google.com/go` has no impact on any of the submodules, and vice-versa. -They are released entirely independently. - -## Test failures - -If there are any test failures in the Kokoro build, releases are blocked until -the failures have been resolved. - -## How to release - -### Automated Releases (`cloud.google.com/go` and submodules) - -We now use [release-please](https://github.com/googleapis/release-please) to -perform automated releases for `cloud.google.com/go` and all submodules. - -1. If there are changes that have not yet been released, a - [pull request](https://github.com/googleapis/google-cloud-go/pull/2971) will - be automatically opened by release-please - with a title like "chore: release X.Y.Z" (for the root module) or - "chore: release datastore X.Y.Z" (for the datastore submodule), where X.Y.Z - is the next version to be released. Find the desired pull request - [here](https://github.com/googleapis/google-cloud-go/pulls) -1. Check for failures in the - [continuous Kokoro build](http://go/google-cloud-go-continuous). If there are - any failures in the most recent build, address them before proceeding with - the release. (This applies even if the failures are in a different submodule - from the one being released.) -1. Review the release notes. These are automatically generated from the titles - of any merged commits since the previous release. If you would like to edit - them, this can be done by updating the changes in the release PR. -1. To cut a release, approve and merge the pull request. Doing so will - update the `CHANGES.md`, tag the merged commit with the appropriate version, - and draft a GitHub release which will copy the notes from `CHANGES.md`. - -### Manual Release (`cloud.google.com/go`) - -If for whatever reason the automated release process is not working as expected, -here is how to manually cut a release of `cloud.google.com/go`. - -1. Check for failures in the - [continuous Kokoro build](http://go/google-cloud-go-continuous). If there are - any failures in the most recent build, address them before proceeding with - the release. -1. Navigate to `google-cloud-go/` and switch to main. -1. `git pull` -1. Run `git tag -l | grep -v beta | grep -v alpha` to see all existing releases. - The current latest tag `$CV` is the largest tag. It should look something - like `vX.Y.Z` (note: ignore all `LIB/vX.Y.Z` tags - these are tags for a - specific library, not the module root). We'll call the current version `$CV` - and the new version `$NV`. -1. On main, run `git log $CV...` to list all the changes since the last - release. NOTE: You must manually visually parse out changes to submodules [1] - (the `git log` is going to show you things in submodules, which are not going - to be part of your release). -1. Edit `CHANGES.md` to include a summary of the changes. -1. In `internal/version/version.go`, update `const Repo` to today's date with - the format `YYYYMMDD`. -1. In `internal/version` run `go generate`. -1. Commit the changes, ignoring the generated `.go-r` file. Push to your fork, - and create a PR titled `chore: release $NV`. -1. Wait for the PR to be reviewed and merged. Once it's merged, and without - merging any other PRs in the meantime: - a. Switch to main. - b. `git pull` - c. Tag the repo with the next version: `git tag $NV`. - d. Push the tag to origin: - `git push origin $NV` -1. Update [the releases page](https://github.com/googleapis/google-cloud-go/releases) - with the new release, copying the contents of `CHANGES.md`. - -### Manual Releases (submodules) - -If for whatever reason the automated release process is not working as expected, -here is how to manually cut a release of a submodule. - -(these instructions assume we're releasing `cloud.google.com/go/datastore` - adjust accordingly) - -1. Check for failures in the - [continuous Kokoro build](http://go/google-cloud-go-continuous). If there are - any failures in the most recent build, address them before proceeding with - the release. (This applies even if the failures are in a different submodule - from the one being released.) -1. Navigate to `google-cloud-go/` and switch to main. -1. `git pull` -1. Run `git tag -l | grep datastore | grep -v beta | grep -v alpha` to see all - existing releases. The current latest tag `$CV` is the largest tag. It - should look something like `datastore/vX.Y.Z`. We'll call the current version - `$CV` and the new version `$NV`. -1. On main, run `git log $CV.. -- datastore/` to list all the changes to the - submodule directory since the last release. -1. Edit `datastore/CHANGES.md` to include a summary of the changes. -1. In `internal/version` run `go generate`. -1. Commit the changes, ignoring the generated `.go-r` file. Push to your fork, - and create a PR titled `chore(datastore): release $NV`. -1. Wait for the PR to be reviewed and merged. Once it's merged, and without - merging any other PRs in the meantime: - a. Switch to main. - b. `git pull` - c. Tag the repo with the next version: `git tag $NV`. - d. Push the tag to origin: - `git push origin $NV` -1. Update [the releases page](https://github.com/googleapis/google-cloud-go/releases) - with the new release, copying the contents of `datastore/CHANGES.md`. diff --git a/vendor/cloud.google.com/go/SECURITY.md b/vendor/cloud.google.com/go/SECURITY.md deleted file mode 100644 index 8b58ae9c01..0000000000 --- a/vendor/cloud.google.com/go/SECURITY.md +++ /dev/null @@ -1,7 +0,0 @@ -# Security Policy - -To report a security issue, please use [g.co/vulnz](https://g.co/vulnz). - -The Google Security Team will respond within 5 working days of your report on g.co/vulnz. - -We use g.co/vulnz for our intake, and do coordination and disclosure here using GitHub Security Advisory to privately discuss and fix the issue. diff --git a/vendor/cloud.google.com/go/container/LICENSE b/vendor/cloud.google.com/go/container/LICENSE deleted file mode 100644 index d645695673..0000000000 --- a/vendor/cloud.google.com/go/container/LICENSE +++ /dev/null @@ -1,202 +0,0 @@ - - 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/vendor/cloud.google.com/go/container/apiv1/.repo-metadata.json b/vendor/cloud.google.com/go/container/apiv1/.repo-metadata.json deleted file mode 100644 index b891b9b1de..0000000000 --- a/vendor/cloud.google.com/go/container/apiv1/.repo-metadata.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "api_shortname": "container", - "client_documentation": "https://cloud.google.com/go/docs/reference/cloud.google.com/go/container/latest/apiv1", - "client_library_type": "generated", - "description": "Kubernetes Engine API", - "distribution_name": "cloud.google.com/go/container/apiv1", - "language": "go", - "library_type": "GAPIC_AUTO", - "release_level": "stable" -} \ No newline at end of file diff --git a/vendor/cloud.google.com/go/container/apiv1/auxiliary.go b/vendor/cloud.google.com/go/container/apiv1/auxiliary.go deleted file mode 100644 index 2fd16c6e4c..0000000000 --- a/vendor/cloud.google.com/go/container/apiv1/auxiliary.go +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Code generated by protoc-gen-go_gapic. DO NOT EDIT. - -package container - -import ( - containerpb "cloud.google.com/go/container/apiv1/containerpb" - "google.golang.org/api/iterator" -) - -// UsableSubnetworkIterator manages a stream of *containerpb.UsableSubnetwork. -type UsableSubnetworkIterator struct { - items []*containerpb.UsableSubnetwork - pageInfo *iterator.PageInfo - nextFunc func() error - - // Response is the raw response for the current page. - // It must be cast to the RPC response type. - // Calling Next() or InternalFetch() updates this value. - Response interface{} - - // InternalFetch is for use by the Google Cloud Libraries only. - // It is not part of the stable interface of this package. - // - // InternalFetch returns results from a single call to the underlying RPC. - // The number of results is no greater than pageSize. - // If there are no more results, nextPageToken is empty and err is nil. - InternalFetch func(pageSize int, pageToken string) (results []*containerpb.UsableSubnetwork, nextPageToken string, err error) -} - -// PageInfo supports pagination. See the [google.golang.org/api/iterator] package for details. -func (it *UsableSubnetworkIterator) PageInfo() *iterator.PageInfo { - return it.pageInfo -} - -// Next returns the next result. Its second return value is iterator.Done if there are no more -// results. Once Next returns Done, all subsequent calls will return Done. -func (it *UsableSubnetworkIterator) Next() (*containerpb.UsableSubnetwork, error) { - var item *containerpb.UsableSubnetwork - if err := it.nextFunc(); err != nil { - return item, err - } - item = it.items[0] - it.items = it.items[1:] - return item, nil -} - -func (it *UsableSubnetworkIterator) bufLen() int { - return len(it.items) -} - -func (it *UsableSubnetworkIterator) takeBuf() interface{} { - b := it.items - it.items = nil - return b -} diff --git a/vendor/cloud.google.com/go/container/apiv1/auxiliary_go123.go b/vendor/cloud.google.com/go/container/apiv1/auxiliary_go123.go deleted file mode 100644 index f637e42a28..0000000000 --- a/vendor/cloud.google.com/go/container/apiv1/auxiliary_go123.go +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Code generated by protoc-gen-go_gapic. DO NOT EDIT. - -//go:build go1.23 - -package container - -import ( - "iter" - - containerpb "cloud.google.com/go/container/apiv1/containerpb" - "github.com/googleapis/gax-go/v2/iterator" -) - -// All returns an iterator. If an error is returned by the iterator, the -// iterator will stop after that iteration. -func (it *UsableSubnetworkIterator) All() iter.Seq2[*containerpb.UsableSubnetwork, error] { - return iterator.RangeAdapter(it.Next) -} diff --git a/vendor/cloud.google.com/go/container/apiv1/cluster_manager_client.go b/vendor/cloud.google.com/go/container/apiv1/cluster_manager_client.go deleted file mode 100644 index 61d23a29af..0000000000 --- a/vendor/cloud.google.com/go/container/apiv1/cluster_manager_client.go +++ /dev/null @@ -1,4004 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Code generated by protoc-gen-go_gapic. DO NOT EDIT. - -package container - -import ( - "bytes" - "context" - "fmt" - "log/slog" - "math" - "net/http" - "net/url" - "time" - - containerpb "cloud.google.com/go/container/apiv1/containerpb" - gax "github.com/googleapis/gax-go/v2" - "github.com/googleapis/gax-go/v2/callctx" - "google.golang.org/api/iterator" - "google.golang.org/api/option" - "google.golang.org/api/option/internaloption" - gtransport "google.golang.org/api/transport/grpc" - httptransport "google.golang.org/api/transport/http" - "google.golang.org/grpc" - "google.golang.org/grpc/codes" - "google.golang.org/protobuf/encoding/protojson" - "google.golang.org/protobuf/proto" -) - -var newClusterManagerClientHook clientHook - -// ClusterManagerCallOptions contains the retry settings for each method of ClusterManagerClient. -type ClusterManagerCallOptions struct { - ListClusters []gax.CallOption - GetCluster []gax.CallOption - CreateCluster []gax.CallOption - UpdateCluster []gax.CallOption - UpdateNodePool []gax.CallOption - SetNodePoolAutoscaling []gax.CallOption - SetLoggingService []gax.CallOption - SetMonitoringService []gax.CallOption - SetAddonsConfig []gax.CallOption - SetLocations []gax.CallOption - UpdateMaster []gax.CallOption - SetMasterAuth []gax.CallOption - DeleteCluster []gax.CallOption - ListOperations []gax.CallOption - GetOperation []gax.CallOption - CancelOperation []gax.CallOption - GetServerConfig []gax.CallOption - GetJSONWebKeys []gax.CallOption - ListNodePools []gax.CallOption - GetNodePool []gax.CallOption - CreateNodePool []gax.CallOption - DeleteNodePool []gax.CallOption - CompleteNodePoolUpgrade []gax.CallOption - RollbackNodePoolUpgrade []gax.CallOption - SetNodePoolManagement []gax.CallOption - SetLabels []gax.CallOption - SetLegacyAbac []gax.CallOption - StartIPRotation []gax.CallOption - CompleteIPRotation []gax.CallOption - SetNodePoolSize []gax.CallOption - SetNetworkPolicy []gax.CallOption - SetMaintenancePolicy []gax.CallOption - ListUsableSubnetworks []gax.CallOption - CheckAutopilotCompatibility []gax.CallOption - FetchClusterUpgradeInfo []gax.CallOption - FetchNodePoolUpgradeInfo []gax.CallOption -} - -func defaultClusterManagerGRPCClientOptions() []option.ClientOption { - return []option.ClientOption{ - internaloption.WithDefaultEndpoint("container.googleapis.com:443"), - internaloption.WithDefaultEndpointTemplate("container.UNIVERSE_DOMAIN:443"), - internaloption.WithDefaultMTLSEndpoint("container.mtls.googleapis.com:443"), - internaloption.WithDefaultUniverseDomain("googleapis.com"), - internaloption.WithDefaultAudience("https://container.googleapis.com/"), - internaloption.WithDefaultScopes(DefaultAuthScopes()...), - internaloption.EnableJwtWithScope(), - internaloption.EnableNewAuthLibrary(), - option.WithGRPCDialOption(grpc.WithDefaultCallOptions( - grpc.MaxCallRecvMsgSize(math.MaxInt32))), - } -} - -func defaultClusterManagerCallOptions() *ClusterManagerCallOptions { - return &ClusterManagerCallOptions{ - ListClusters: []gax.CallOption{ - gax.WithTimeout(20000 * time.Millisecond), - gax.WithRetry(func() gax.Retryer { - return gax.OnCodes([]codes.Code{ - codes.Unavailable, - codes.DeadlineExceeded, - }, gax.Backoff{ - Initial: 100 * time.Millisecond, - Max: 60000 * time.Millisecond, - Multiplier: 1.30, - }) - }), - }, - GetCluster: []gax.CallOption{ - gax.WithTimeout(20000 * time.Millisecond), - gax.WithRetry(func() gax.Retryer { - return gax.OnCodes([]codes.Code{ - codes.Unavailable, - codes.DeadlineExceeded, - }, gax.Backoff{ - Initial: 100 * time.Millisecond, - Max: 60000 * time.Millisecond, - Multiplier: 1.30, - }) - }), - }, - CreateCluster: []gax.CallOption{ - gax.WithTimeout(45000 * time.Millisecond), - }, - UpdateCluster: []gax.CallOption{ - gax.WithTimeout(45000 * time.Millisecond), - }, - UpdateNodePool: []gax.CallOption{ - gax.WithTimeout(45000 * time.Millisecond), - }, - SetNodePoolAutoscaling: []gax.CallOption{ - gax.WithTimeout(45000 * time.Millisecond), - }, - SetLoggingService: []gax.CallOption{ - gax.WithTimeout(45000 * time.Millisecond), - }, - SetMonitoringService: []gax.CallOption{ - gax.WithTimeout(45000 * time.Millisecond), - }, - SetAddonsConfig: []gax.CallOption{ - gax.WithTimeout(45000 * time.Millisecond), - }, - SetLocations: []gax.CallOption{ - gax.WithTimeout(45000 * time.Millisecond), - }, - UpdateMaster: []gax.CallOption{ - gax.WithTimeout(45000 * time.Millisecond), - }, - SetMasterAuth: []gax.CallOption{ - gax.WithTimeout(45000 * time.Millisecond), - }, - DeleteCluster: []gax.CallOption{ - gax.WithTimeout(20000 * time.Millisecond), - gax.WithRetry(func() gax.Retryer { - return gax.OnCodes([]codes.Code{ - codes.Unavailable, - codes.DeadlineExceeded, - }, gax.Backoff{ - Initial: 100 * time.Millisecond, - Max: 60000 * time.Millisecond, - Multiplier: 1.30, - }) - }), - }, - ListOperations: []gax.CallOption{ - gax.WithTimeout(20000 * time.Millisecond), - gax.WithRetry(func() gax.Retryer { - return gax.OnCodes([]codes.Code{ - codes.Unavailable, - codes.DeadlineExceeded, - }, gax.Backoff{ - Initial: 100 * time.Millisecond, - Max: 60000 * time.Millisecond, - Multiplier: 1.30, - }) - }), - }, - GetOperation: []gax.CallOption{ - gax.WithTimeout(20000 * time.Millisecond), - gax.WithRetry(func() gax.Retryer { - return gax.OnCodes([]codes.Code{ - codes.Unavailable, - codes.DeadlineExceeded, - }, gax.Backoff{ - Initial: 100 * time.Millisecond, - Max: 60000 * time.Millisecond, - Multiplier: 1.30, - }) - }), - }, - CancelOperation: []gax.CallOption{ - gax.WithTimeout(45000 * time.Millisecond), - }, - GetServerConfig: []gax.CallOption{ - gax.WithTimeout(20000 * time.Millisecond), - gax.WithRetry(func() gax.Retryer { - return gax.OnCodes([]codes.Code{ - codes.Unavailable, - codes.DeadlineExceeded, - }, gax.Backoff{ - Initial: 100 * time.Millisecond, - Max: 60000 * time.Millisecond, - Multiplier: 1.30, - }) - }), - }, - GetJSONWebKeys: []gax.CallOption{}, - ListNodePools: []gax.CallOption{ - gax.WithTimeout(20000 * time.Millisecond), - gax.WithRetry(func() gax.Retryer { - return gax.OnCodes([]codes.Code{ - codes.Unavailable, - codes.DeadlineExceeded, - }, gax.Backoff{ - Initial: 100 * time.Millisecond, - Max: 60000 * time.Millisecond, - Multiplier: 1.30, - }) - }), - }, - GetNodePool: []gax.CallOption{ - gax.WithTimeout(20000 * time.Millisecond), - gax.WithRetry(func() gax.Retryer { - return gax.OnCodes([]codes.Code{ - codes.Unavailable, - codes.DeadlineExceeded, - }, gax.Backoff{ - Initial: 100 * time.Millisecond, - Max: 60000 * time.Millisecond, - Multiplier: 1.30, - }) - }), - }, - CreateNodePool: []gax.CallOption{ - gax.WithTimeout(45000 * time.Millisecond), - }, - DeleteNodePool: []gax.CallOption{ - gax.WithTimeout(20000 * time.Millisecond), - gax.WithRetry(func() gax.Retryer { - return gax.OnCodes([]codes.Code{ - codes.Unavailable, - codes.DeadlineExceeded, - }, gax.Backoff{ - Initial: 100 * time.Millisecond, - Max: 60000 * time.Millisecond, - Multiplier: 1.30, - }) - }), - }, - CompleteNodePoolUpgrade: []gax.CallOption{}, - RollbackNodePoolUpgrade: []gax.CallOption{ - gax.WithTimeout(45000 * time.Millisecond), - }, - SetNodePoolManagement: []gax.CallOption{ - gax.WithTimeout(45000 * time.Millisecond), - }, - SetLabels: []gax.CallOption{ - gax.WithTimeout(45000 * time.Millisecond), - }, - SetLegacyAbac: []gax.CallOption{ - gax.WithTimeout(45000 * time.Millisecond), - }, - StartIPRotation: []gax.CallOption{ - gax.WithTimeout(45000 * time.Millisecond), - }, - CompleteIPRotation: []gax.CallOption{ - gax.WithTimeout(45000 * time.Millisecond), - }, - SetNodePoolSize: []gax.CallOption{ - gax.WithTimeout(45000 * time.Millisecond), - }, - SetNetworkPolicy: []gax.CallOption{ - gax.WithTimeout(45000 * time.Millisecond), - }, - SetMaintenancePolicy: []gax.CallOption{ - gax.WithTimeout(45000 * time.Millisecond), - }, - ListUsableSubnetworks: []gax.CallOption{}, - CheckAutopilotCompatibility: []gax.CallOption{}, - FetchClusterUpgradeInfo: []gax.CallOption{}, - FetchNodePoolUpgradeInfo: []gax.CallOption{}, - } -} - -func defaultClusterManagerRESTCallOptions() *ClusterManagerCallOptions { - return &ClusterManagerCallOptions{ - ListClusters: []gax.CallOption{ - gax.WithTimeout(20000 * time.Millisecond), - gax.WithRetry(func() gax.Retryer { - return gax.OnHTTPCodes(gax.Backoff{ - Initial: 100 * time.Millisecond, - Max: 60000 * time.Millisecond, - Multiplier: 1.30, - }, - http.StatusServiceUnavailable, - http.StatusGatewayTimeout) - }), - }, - GetCluster: []gax.CallOption{ - gax.WithTimeout(20000 * time.Millisecond), - gax.WithRetry(func() gax.Retryer { - return gax.OnHTTPCodes(gax.Backoff{ - Initial: 100 * time.Millisecond, - Max: 60000 * time.Millisecond, - Multiplier: 1.30, - }, - http.StatusServiceUnavailable, - http.StatusGatewayTimeout) - }), - }, - CreateCluster: []gax.CallOption{ - gax.WithTimeout(45000 * time.Millisecond), - }, - UpdateCluster: []gax.CallOption{ - gax.WithTimeout(45000 * time.Millisecond), - }, - UpdateNodePool: []gax.CallOption{ - gax.WithTimeout(45000 * time.Millisecond), - }, - SetNodePoolAutoscaling: []gax.CallOption{ - gax.WithTimeout(45000 * time.Millisecond), - }, - SetLoggingService: []gax.CallOption{ - gax.WithTimeout(45000 * time.Millisecond), - }, - SetMonitoringService: []gax.CallOption{ - gax.WithTimeout(45000 * time.Millisecond), - }, - SetAddonsConfig: []gax.CallOption{ - gax.WithTimeout(45000 * time.Millisecond), - }, - SetLocations: []gax.CallOption{ - gax.WithTimeout(45000 * time.Millisecond), - }, - UpdateMaster: []gax.CallOption{ - gax.WithTimeout(45000 * time.Millisecond), - }, - SetMasterAuth: []gax.CallOption{ - gax.WithTimeout(45000 * time.Millisecond), - }, - DeleteCluster: []gax.CallOption{ - gax.WithTimeout(20000 * time.Millisecond), - gax.WithRetry(func() gax.Retryer { - return gax.OnHTTPCodes(gax.Backoff{ - Initial: 100 * time.Millisecond, - Max: 60000 * time.Millisecond, - Multiplier: 1.30, - }, - http.StatusServiceUnavailable, - http.StatusGatewayTimeout) - }), - }, - ListOperations: []gax.CallOption{ - gax.WithTimeout(20000 * time.Millisecond), - gax.WithRetry(func() gax.Retryer { - return gax.OnHTTPCodes(gax.Backoff{ - Initial: 100 * time.Millisecond, - Max: 60000 * time.Millisecond, - Multiplier: 1.30, - }, - http.StatusServiceUnavailable, - http.StatusGatewayTimeout) - }), - }, - GetOperation: []gax.CallOption{ - gax.WithTimeout(20000 * time.Millisecond), - gax.WithRetry(func() gax.Retryer { - return gax.OnHTTPCodes(gax.Backoff{ - Initial: 100 * time.Millisecond, - Max: 60000 * time.Millisecond, - Multiplier: 1.30, - }, - http.StatusServiceUnavailable, - http.StatusGatewayTimeout) - }), - }, - CancelOperation: []gax.CallOption{ - gax.WithTimeout(45000 * time.Millisecond), - }, - GetServerConfig: []gax.CallOption{ - gax.WithTimeout(20000 * time.Millisecond), - gax.WithRetry(func() gax.Retryer { - return gax.OnHTTPCodes(gax.Backoff{ - Initial: 100 * time.Millisecond, - Max: 60000 * time.Millisecond, - Multiplier: 1.30, - }, - http.StatusServiceUnavailable, - http.StatusGatewayTimeout) - }), - }, - GetJSONWebKeys: []gax.CallOption{}, - ListNodePools: []gax.CallOption{ - gax.WithTimeout(20000 * time.Millisecond), - gax.WithRetry(func() gax.Retryer { - return gax.OnHTTPCodes(gax.Backoff{ - Initial: 100 * time.Millisecond, - Max: 60000 * time.Millisecond, - Multiplier: 1.30, - }, - http.StatusServiceUnavailable, - http.StatusGatewayTimeout) - }), - }, - GetNodePool: []gax.CallOption{ - gax.WithTimeout(20000 * time.Millisecond), - gax.WithRetry(func() gax.Retryer { - return gax.OnHTTPCodes(gax.Backoff{ - Initial: 100 * time.Millisecond, - Max: 60000 * time.Millisecond, - Multiplier: 1.30, - }, - http.StatusServiceUnavailable, - http.StatusGatewayTimeout) - }), - }, - CreateNodePool: []gax.CallOption{ - gax.WithTimeout(45000 * time.Millisecond), - }, - DeleteNodePool: []gax.CallOption{ - gax.WithTimeout(20000 * time.Millisecond), - gax.WithRetry(func() gax.Retryer { - return gax.OnHTTPCodes(gax.Backoff{ - Initial: 100 * time.Millisecond, - Max: 60000 * time.Millisecond, - Multiplier: 1.30, - }, - http.StatusServiceUnavailable, - http.StatusGatewayTimeout) - }), - }, - CompleteNodePoolUpgrade: []gax.CallOption{}, - RollbackNodePoolUpgrade: []gax.CallOption{ - gax.WithTimeout(45000 * time.Millisecond), - }, - SetNodePoolManagement: []gax.CallOption{ - gax.WithTimeout(45000 * time.Millisecond), - }, - SetLabels: []gax.CallOption{ - gax.WithTimeout(45000 * time.Millisecond), - }, - SetLegacyAbac: []gax.CallOption{ - gax.WithTimeout(45000 * time.Millisecond), - }, - StartIPRotation: []gax.CallOption{ - gax.WithTimeout(45000 * time.Millisecond), - }, - CompleteIPRotation: []gax.CallOption{ - gax.WithTimeout(45000 * time.Millisecond), - }, - SetNodePoolSize: []gax.CallOption{ - gax.WithTimeout(45000 * time.Millisecond), - }, - SetNetworkPolicy: []gax.CallOption{ - gax.WithTimeout(45000 * time.Millisecond), - }, - SetMaintenancePolicy: []gax.CallOption{ - gax.WithTimeout(45000 * time.Millisecond), - }, - ListUsableSubnetworks: []gax.CallOption{}, - CheckAutopilotCompatibility: []gax.CallOption{}, - FetchClusterUpgradeInfo: []gax.CallOption{}, - FetchNodePoolUpgradeInfo: []gax.CallOption{}, - } -} - -// internalClusterManagerClient is an interface that defines the methods available from Kubernetes Engine API. -type internalClusterManagerClient interface { - Close() error - setGoogleClientInfo(...string) - Connection() *grpc.ClientConn - ListClusters(context.Context, *containerpb.ListClustersRequest, ...gax.CallOption) (*containerpb.ListClustersResponse, error) - GetCluster(context.Context, *containerpb.GetClusterRequest, ...gax.CallOption) (*containerpb.Cluster, error) - CreateCluster(context.Context, *containerpb.CreateClusterRequest, ...gax.CallOption) (*containerpb.Operation, error) - UpdateCluster(context.Context, *containerpb.UpdateClusterRequest, ...gax.CallOption) (*containerpb.Operation, error) - UpdateNodePool(context.Context, *containerpb.UpdateNodePoolRequest, ...gax.CallOption) (*containerpb.Operation, error) - SetNodePoolAutoscaling(context.Context, *containerpb.SetNodePoolAutoscalingRequest, ...gax.CallOption) (*containerpb.Operation, error) - SetLoggingService(context.Context, *containerpb.SetLoggingServiceRequest, ...gax.CallOption) (*containerpb.Operation, error) - SetMonitoringService(context.Context, *containerpb.SetMonitoringServiceRequest, ...gax.CallOption) (*containerpb.Operation, error) - SetAddonsConfig(context.Context, *containerpb.SetAddonsConfigRequest, ...gax.CallOption) (*containerpb.Operation, error) - SetLocations(context.Context, *containerpb.SetLocationsRequest, ...gax.CallOption) (*containerpb.Operation, error) - UpdateMaster(context.Context, *containerpb.UpdateMasterRequest, ...gax.CallOption) (*containerpb.Operation, error) - SetMasterAuth(context.Context, *containerpb.SetMasterAuthRequest, ...gax.CallOption) (*containerpb.Operation, error) - DeleteCluster(context.Context, *containerpb.DeleteClusterRequest, ...gax.CallOption) (*containerpb.Operation, error) - ListOperations(context.Context, *containerpb.ListOperationsRequest, ...gax.CallOption) (*containerpb.ListOperationsResponse, error) - GetOperation(context.Context, *containerpb.GetOperationRequest, ...gax.CallOption) (*containerpb.Operation, error) - CancelOperation(context.Context, *containerpb.CancelOperationRequest, ...gax.CallOption) error - GetServerConfig(context.Context, *containerpb.GetServerConfigRequest, ...gax.CallOption) (*containerpb.ServerConfig, error) - GetJSONWebKeys(context.Context, *containerpb.GetJSONWebKeysRequest, ...gax.CallOption) (*containerpb.GetJSONWebKeysResponse, error) - ListNodePools(context.Context, *containerpb.ListNodePoolsRequest, ...gax.CallOption) (*containerpb.ListNodePoolsResponse, error) - GetNodePool(context.Context, *containerpb.GetNodePoolRequest, ...gax.CallOption) (*containerpb.NodePool, error) - CreateNodePool(context.Context, *containerpb.CreateNodePoolRequest, ...gax.CallOption) (*containerpb.Operation, error) - DeleteNodePool(context.Context, *containerpb.DeleteNodePoolRequest, ...gax.CallOption) (*containerpb.Operation, error) - CompleteNodePoolUpgrade(context.Context, *containerpb.CompleteNodePoolUpgradeRequest, ...gax.CallOption) error - RollbackNodePoolUpgrade(context.Context, *containerpb.RollbackNodePoolUpgradeRequest, ...gax.CallOption) (*containerpb.Operation, error) - SetNodePoolManagement(context.Context, *containerpb.SetNodePoolManagementRequest, ...gax.CallOption) (*containerpb.Operation, error) - SetLabels(context.Context, *containerpb.SetLabelsRequest, ...gax.CallOption) (*containerpb.Operation, error) - SetLegacyAbac(context.Context, *containerpb.SetLegacyAbacRequest, ...gax.CallOption) (*containerpb.Operation, error) - StartIPRotation(context.Context, *containerpb.StartIPRotationRequest, ...gax.CallOption) (*containerpb.Operation, error) - CompleteIPRotation(context.Context, *containerpb.CompleteIPRotationRequest, ...gax.CallOption) (*containerpb.Operation, error) - SetNodePoolSize(context.Context, *containerpb.SetNodePoolSizeRequest, ...gax.CallOption) (*containerpb.Operation, error) - SetNetworkPolicy(context.Context, *containerpb.SetNetworkPolicyRequest, ...gax.CallOption) (*containerpb.Operation, error) - SetMaintenancePolicy(context.Context, *containerpb.SetMaintenancePolicyRequest, ...gax.CallOption) (*containerpb.Operation, error) - ListUsableSubnetworks(context.Context, *containerpb.ListUsableSubnetworksRequest, ...gax.CallOption) *UsableSubnetworkIterator - CheckAutopilotCompatibility(context.Context, *containerpb.CheckAutopilotCompatibilityRequest, ...gax.CallOption) (*containerpb.CheckAutopilotCompatibilityResponse, error) - FetchClusterUpgradeInfo(context.Context, *containerpb.FetchClusterUpgradeInfoRequest, ...gax.CallOption) (*containerpb.ClusterUpgradeInfo, error) - FetchNodePoolUpgradeInfo(context.Context, *containerpb.FetchNodePoolUpgradeInfoRequest, ...gax.CallOption) (*containerpb.NodePoolUpgradeInfo, error) -} - -// ClusterManagerClient is a client for interacting with Kubernetes Engine API. -// Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. -// -// Google Kubernetes Engine Cluster Manager v1 -type ClusterManagerClient struct { - // The internal transport-dependent client. - internalClient internalClusterManagerClient - - // The call options for this service. - CallOptions *ClusterManagerCallOptions -} - -// Wrapper methods routed to the internal client. - -// Close closes the connection to the API service. The user should invoke this when -// the client is no longer required. -func (c *ClusterManagerClient) Close() error { - return c.internalClient.Close() -} - -// setGoogleClientInfo sets the name and version of the application in -// the `x-goog-api-client` header passed on each request. Intended for -// use by Google-written clients. -func (c *ClusterManagerClient) setGoogleClientInfo(keyval ...string) { - c.internalClient.setGoogleClientInfo(keyval...) -} - -// Connection returns a connection to the API service. -// -// Deprecated: Connections are now pooled so this method does not always -// return the same resource. -func (c *ClusterManagerClient) Connection() *grpc.ClientConn { - return c.internalClient.Connection() -} - -// ListClusters lists all clusters owned by a project in either the specified zone or all -// zones. -func (c *ClusterManagerClient) ListClusters(ctx context.Context, req *containerpb.ListClustersRequest, opts ...gax.CallOption) (*containerpb.ListClustersResponse, error) { - return c.internalClient.ListClusters(ctx, req, opts...) -} - -// GetCluster gets the details of a specific cluster. -func (c *ClusterManagerClient) GetCluster(ctx context.Context, req *containerpb.GetClusterRequest, opts ...gax.CallOption) (*containerpb.Cluster, error) { - return c.internalClient.GetCluster(ctx, req, opts...) -} - -// CreateCluster creates a cluster, consisting of the specified number and type of Google -// Compute Engine instances. -// -// By default, the cluster is created in the project’s -// default -// network (at https://cloud.google.com/compute/docs/networks-and-firewalls#networks). -// -// One firewall is added for the cluster. After cluster creation, -// the kubelet creates routes for each node to allow the containers -// on that node to communicate with all other instances in the -// cluster. -// -// Finally, an entry is added to the project’s global metadata indicating -// which CIDR range the cluster is using. -func (c *ClusterManagerClient) CreateCluster(ctx context.Context, req *containerpb.CreateClusterRequest, opts ...gax.CallOption) (*containerpb.Operation, error) { - return c.internalClient.CreateCluster(ctx, req, opts...) -} - -// UpdateCluster updates the settings of a specific cluster. -func (c *ClusterManagerClient) UpdateCluster(ctx context.Context, req *containerpb.UpdateClusterRequest, opts ...gax.CallOption) (*containerpb.Operation, error) { - return c.internalClient.UpdateCluster(ctx, req, opts...) -} - -// UpdateNodePool updates the version and/or image type for the specified node pool. -func (c *ClusterManagerClient) UpdateNodePool(ctx context.Context, req *containerpb.UpdateNodePoolRequest, opts ...gax.CallOption) (*containerpb.Operation, error) { - return c.internalClient.UpdateNodePool(ctx, req, opts...) -} - -// SetNodePoolAutoscaling sets the autoscaling settings for the specified node pool. -func (c *ClusterManagerClient) SetNodePoolAutoscaling(ctx context.Context, req *containerpb.SetNodePoolAutoscalingRequest, opts ...gax.CallOption) (*containerpb.Operation, error) { - return c.internalClient.SetNodePoolAutoscaling(ctx, req, opts...) -} - -// SetLoggingService sets the logging service for a specific cluster. -func (c *ClusterManagerClient) SetLoggingService(ctx context.Context, req *containerpb.SetLoggingServiceRequest, opts ...gax.CallOption) (*containerpb.Operation, error) { - return c.internalClient.SetLoggingService(ctx, req, opts...) -} - -// SetMonitoringService sets the monitoring service for a specific cluster. -func (c *ClusterManagerClient) SetMonitoringService(ctx context.Context, req *containerpb.SetMonitoringServiceRequest, opts ...gax.CallOption) (*containerpb.Operation, error) { - return c.internalClient.SetMonitoringService(ctx, req, opts...) -} - -// SetAddonsConfig sets the addons for a specific cluster. -func (c *ClusterManagerClient) SetAddonsConfig(ctx context.Context, req *containerpb.SetAddonsConfigRequest, opts ...gax.CallOption) (*containerpb.Operation, error) { - return c.internalClient.SetAddonsConfig(ctx, req, opts...) -} - -// SetLocations sets the locations for a specific cluster. -// Deprecated. Use -// projects.locations.clusters.update (at https://cloud.google.com/kubernetes-engine/docs/reference/rest/v1/projects.locations.clusters/update) -// instead. -// -// Deprecated: SetLocations may be removed in a future version. -func (c *ClusterManagerClient) SetLocations(ctx context.Context, req *containerpb.SetLocationsRequest, opts ...gax.CallOption) (*containerpb.Operation, error) { - return c.internalClient.SetLocations(ctx, req, opts...) -} - -// UpdateMaster updates the master for a specific cluster. -func (c *ClusterManagerClient) UpdateMaster(ctx context.Context, req *containerpb.UpdateMasterRequest, opts ...gax.CallOption) (*containerpb.Operation, error) { - return c.internalClient.UpdateMaster(ctx, req, opts...) -} - -// SetMasterAuth sets master auth materials. Currently supports changing the admin password -// or a specific cluster, either via password generation or explicitly setting -// the password. -func (c *ClusterManagerClient) SetMasterAuth(ctx context.Context, req *containerpb.SetMasterAuthRequest, opts ...gax.CallOption) (*containerpb.Operation, error) { - return c.internalClient.SetMasterAuth(ctx, req, opts...) -} - -// DeleteCluster deletes the cluster, including the Kubernetes endpoint and all worker -// nodes. -// -// Firewalls and routes that were configured during cluster creation -// are also deleted. -// -// Other Google Compute Engine resources that might be in use by the cluster, -// such as load balancer resources, are not deleted if they weren’t present -// when the cluster was initially created. -func (c *ClusterManagerClient) DeleteCluster(ctx context.Context, req *containerpb.DeleteClusterRequest, opts ...gax.CallOption) (*containerpb.Operation, error) { - return c.internalClient.DeleteCluster(ctx, req, opts...) -} - -// ListOperations lists all operations in a project in a specific zone or all zones. -func (c *ClusterManagerClient) ListOperations(ctx context.Context, req *containerpb.ListOperationsRequest, opts ...gax.CallOption) (*containerpb.ListOperationsResponse, error) { - return c.internalClient.ListOperations(ctx, req, opts...) -} - -// GetOperation gets the specified operation. -func (c *ClusterManagerClient) GetOperation(ctx context.Context, req *containerpb.GetOperationRequest, opts ...gax.CallOption) (*containerpb.Operation, error) { - return c.internalClient.GetOperation(ctx, req, opts...) -} - -// CancelOperation cancels the specified operation. -func (c *ClusterManagerClient) CancelOperation(ctx context.Context, req *containerpb.CancelOperationRequest, opts ...gax.CallOption) error { - return c.internalClient.CancelOperation(ctx, req, opts...) -} - -// GetServerConfig returns configuration info about the Google Kubernetes Engine service. -func (c *ClusterManagerClient) GetServerConfig(ctx context.Context, req *containerpb.GetServerConfigRequest, opts ...gax.CallOption) (*containerpb.ServerConfig, error) { - return c.internalClient.GetServerConfig(ctx, req, opts...) -} - -// GetJSONWebKeys gets the public component of the cluster signing keys in -// JSON Web Key format. -func (c *ClusterManagerClient) GetJSONWebKeys(ctx context.Context, req *containerpb.GetJSONWebKeysRequest, opts ...gax.CallOption) (*containerpb.GetJSONWebKeysResponse, error) { - return c.internalClient.GetJSONWebKeys(ctx, req, opts...) -} - -// ListNodePools lists the node pools for a cluster. -func (c *ClusterManagerClient) ListNodePools(ctx context.Context, req *containerpb.ListNodePoolsRequest, opts ...gax.CallOption) (*containerpb.ListNodePoolsResponse, error) { - return c.internalClient.ListNodePools(ctx, req, opts...) -} - -// GetNodePool retrieves the requested node pool. -func (c *ClusterManagerClient) GetNodePool(ctx context.Context, req *containerpb.GetNodePoolRequest, opts ...gax.CallOption) (*containerpb.NodePool, error) { - return c.internalClient.GetNodePool(ctx, req, opts...) -} - -// CreateNodePool creates a node pool for a cluster. -func (c *ClusterManagerClient) CreateNodePool(ctx context.Context, req *containerpb.CreateNodePoolRequest, opts ...gax.CallOption) (*containerpb.Operation, error) { - return c.internalClient.CreateNodePool(ctx, req, opts...) -} - -// DeleteNodePool deletes a node pool from a cluster. -func (c *ClusterManagerClient) DeleteNodePool(ctx context.Context, req *containerpb.DeleteNodePoolRequest, opts ...gax.CallOption) (*containerpb.Operation, error) { - return c.internalClient.DeleteNodePool(ctx, req, opts...) -} - -// CompleteNodePoolUpgrade completeNodePoolUpgrade will signal an on-going node pool upgrade to -// complete. -func (c *ClusterManagerClient) CompleteNodePoolUpgrade(ctx context.Context, req *containerpb.CompleteNodePoolUpgradeRequest, opts ...gax.CallOption) error { - return c.internalClient.CompleteNodePoolUpgrade(ctx, req, opts...) -} - -// RollbackNodePoolUpgrade rolls back a previously Aborted or Failed NodePool upgrade. -// This makes no changes if the last upgrade successfully completed. -func (c *ClusterManagerClient) RollbackNodePoolUpgrade(ctx context.Context, req *containerpb.RollbackNodePoolUpgradeRequest, opts ...gax.CallOption) (*containerpb.Operation, error) { - return c.internalClient.RollbackNodePoolUpgrade(ctx, req, opts...) -} - -// SetNodePoolManagement sets the NodeManagement options for a node pool. -func (c *ClusterManagerClient) SetNodePoolManagement(ctx context.Context, req *containerpb.SetNodePoolManagementRequest, opts ...gax.CallOption) (*containerpb.Operation, error) { - return c.internalClient.SetNodePoolManagement(ctx, req, opts...) -} - -// SetLabels sets labels on a cluster. -func (c *ClusterManagerClient) SetLabels(ctx context.Context, req *containerpb.SetLabelsRequest, opts ...gax.CallOption) (*containerpb.Operation, error) { - return c.internalClient.SetLabels(ctx, req, opts...) -} - -// SetLegacyAbac enables or disables the ABAC authorization mechanism on a cluster. -func (c *ClusterManagerClient) SetLegacyAbac(ctx context.Context, req *containerpb.SetLegacyAbacRequest, opts ...gax.CallOption) (*containerpb.Operation, error) { - return c.internalClient.SetLegacyAbac(ctx, req, opts...) -} - -// StartIPRotation starts master IP rotation. -func (c *ClusterManagerClient) StartIPRotation(ctx context.Context, req *containerpb.StartIPRotationRequest, opts ...gax.CallOption) (*containerpb.Operation, error) { - return c.internalClient.StartIPRotation(ctx, req, opts...) -} - -// CompleteIPRotation completes master IP rotation. -func (c *ClusterManagerClient) CompleteIPRotation(ctx context.Context, req *containerpb.CompleteIPRotationRequest, opts ...gax.CallOption) (*containerpb.Operation, error) { - return c.internalClient.CompleteIPRotation(ctx, req, opts...) -} - -// SetNodePoolSize sets the size for a specific node pool. The new size will be used for all -// replicas, including future replicas created by modifying -// NodePool.locations. -func (c *ClusterManagerClient) SetNodePoolSize(ctx context.Context, req *containerpb.SetNodePoolSizeRequest, opts ...gax.CallOption) (*containerpb.Operation, error) { - return c.internalClient.SetNodePoolSize(ctx, req, opts...) -} - -// SetNetworkPolicy enables or disables Network Policy for a cluster. -func (c *ClusterManagerClient) SetNetworkPolicy(ctx context.Context, req *containerpb.SetNetworkPolicyRequest, opts ...gax.CallOption) (*containerpb.Operation, error) { - return c.internalClient.SetNetworkPolicy(ctx, req, opts...) -} - -// SetMaintenancePolicy sets the maintenance policy for a cluster. -func (c *ClusterManagerClient) SetMaintenancePolicy(ctx context.Context, req *containerpb.SetMaintenancePolicyRequest, opts ...gax.CallOption) (*containerpb.Operation, error) { - return c.internalClient.SetMaintenancePolicy(ctx, req, opts...) -} - -// ListUsableSubnetworks lists subnetworks that are usable for creating clusters in a project. -func (c *ClusterManagerClient) ListUsableSubnetworks(ctx context.Context, req *containerpb.ListUsableSubnetworksRequest, opts ...gax.CallOption) *UsableSubnetworkIterator { - return c.internalClient.ListUsableSubnetworks(ctx, req, opts...) -} - -// CheckAutopilotCompatibility checks the cluster compatibility with Autopilot mode, and returns a list of -// compatibility issues. -func (c *ClusterManagerClient) CheckAutopilotCompatibility(ctx context.Context, req *containerpb.CheckAutopilotCompatibilityRequest, opts ...gax.CallOption) (*containerpb.CheckAutopilotCompatibilityResponse, error) { - return c.internalClient.CheckAutopilotCompatibility(ctx, req, opts...) -} - -// FetchClusterUpgradeInfo fetch upgrade information of a specific cluster. -func (c *ClusterManagerClient) FetchClusterUpgradeInfo(ctx context.Context, req *containerpb.FetchClusterUpgradeInfoRequest, opts ...gax.CallOption) (*containerpb.ClusterUpgradeInfo, error) { - return c.internalClient.FetchClusterUpgradeInfo(ctx, req, opts...) -} - -// FetchNodePoolUpgradeInfo fetch upgrade information of a specific nodepool. -func (c *ClusterManagerClient) FetchNodePoolUpgradeInfo(ctx context.Context, req *containerpb.FetchNodePoolUpgradeInfoRequest, opts ...gax.CallOption) (*containerpb.NodePoolUpgradeInfo, error) { - return c.internalClient.FetchNodePoolUpgradeInfo(ctx, req, opts...) -} - -// clusterManagerGRPCClient is a client for interacting with Kubernetes Engine API over gRPC transport. -// -// Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. -type clusterManagerGRPCClient struct { - // Connection pool of gRPC connections to the service. - connPool gtransport.ConnPool - - // Points back to the CallOptions field of the containing ClusterManagerClient - CallOptions **ClusterManagerCallOptions - - // The gRPC API client. - clusterManagerClient containerpb.ClusterManagerClient - - // The x-goog-* metadata to be sent with each request. - xGoogHeaders []string - - logger *slog.Logger -} - -// NewClusterManagerClient creates a new cluster manager client based on gRPC. -// The returned client must be Closed when it is done being used to clean up its underlying connections. -// -// Google Kubernetes Engine Cluster Manager v1 -func NewClusterManagerClient(ctx context.Context, opts ...option.ClientOption) (*ClusterManagerClient, error) { - clientOpts := defaultClusterManagerGRPCClientOptions() - if gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - clientOpts = append(clientOpts, internaloption.WithTelemetryAttributes(map[string]string{ - "gcp.client.service": "container", - "gcp.client.version": getVersionClient(), - "gcp.client.repo": "googleapis/google-cloud-go", - "gcp.client.artifact": "cloud.google.com/go/container/apiv1", - "gcp.client.language": "go", - "url.domain": "container.googleapis.com", - })) - } - if newClusterManagerClientHook != nil { - hookOpts, err := newClusterManagerClientHook(ctx, clientHookParams{}) - if err != nil { - return nil, err - } - clientOpts = append(clientOpts, hookOpts...) - } - - connPool, err := gtransport.DialPool(ctx, append(clientOpts, opts...)...) - if err != nil { - return nil, err - } - client := ClusterManagerClient{CallOptions: defaultClusterManagerCallOptions()} - - c := &clusterManagerGRPCClient{ - connPool: connPool, - clusterManagerClient: containerpb.NewClusterManagerClient(connPool), - CallOptions: &client.CallOptions, - logger: internaloption.GetLogger(opts), - } - c.setGoogleClientInfo() - if gax.IsFeatureEnabled("METRICS") { - metrics := gax.NewClientMetrics( - gax.WithTelemetryLogger(c.logger), - gax.WithTelemetryAttributes(map[string]string{ - gax.ClientService: "container", - gax.ClientVersion: getVersionClient(), - gax.ClientArtifact: "cloud.google.com/go/container/apiv1", - gax.RPCSystem: "grpc", - gax.URLDomain: "container.googleapis.com", - }), - ) - - client.CallOptions.ListClusters = append(client.CallOptions.ListClusters, gax.WithClientMetrics(metrics)) - client.CallOptions.GetCluster = append(client.CallOptions.GetCluster, gax.WithClientMetrics(metrics)) - client.CallOptions.CreateCluster = append(client.CallOptions.CreateCluster, gax.WithClientMetrics(metrics)) - client.CallOptions.UpdateCluster = append(client.CallOptions.UpdateCluster, gax.WithClientMetrics(metrics)) - client.CallOptions.UpdateNodePool = append(client.CallOptions.UpdateNodePool, gax.WithClientMetrics(metrics)) - client.CallOptions.SetNodePoolAutoscaling = append(client.CallOptions.SetNodePoolAutoscaling, gax.WithClientMetrics(metrics)) - client.CallOptions.SetLoggingService = append(client.CallOptions.SetLoggingService, gax.WithClientMetrics(metrics)) - client.CallOptions.SetMonitoringService = append(client.CallOptions.SetMonitoringService, gax.WithClientMetrics(metrics)) - client.CallOptions.SetAddonsConfig = append(client.CallOptions.SetAddonsConfig, gax.WithClientMetrics(metrics)) - client.CallOptions.SetLocations = append(client.CallOptions.SetLocations, gax.WithClientMetrics(metrics)) - client.CallOptions.UpdateMaster = append(client.CallOptions.UpdateMaster, gax.WithClientMetrics(metrics)) - client.CallOptions.SetMasterAuth = append(client.CallOptions.SetMasterAuth, gax.WithClientMetrics(metrics)) - client.CallOptions.DeleteCluster = append(client.CallOptions.DeleteCluster, gax.WithClientMetrics(metrics)) - client.CallOptions.ListOperations = append(client.CallOptions.ListOperations, gax.WithClientMetrics(metrics)) - client.CallOptions.GetOperation = append(client.CallOptions.GetOperation, gax.WithClientMetrics(metrics)) - client.CallOptions.CancelOperation = append(client.CallOptions.CancelOperation, gax.WithClientMetrics(metrics)) - client.CallOptions.GetServerConfig = append(client.CallOptions.GetServerConfig, gax.WithClientMetrics(metrics)) - client.CallOptions.GetJSONWebKeys = append(client.CallOptions.GetJSONWebKeys, gax.WithClientMetrics(metrics)) - client.CallOptions.ListNodePools = append(client.CallOptions.ListNodePools, gax.WithClientMetrics(metrics)) - client.CallOptions.GetNodePool = append(client.CallOptions.GetNodePool, gax.WithClientMetrics(metrics)) - client.CallOptions.CreateNodePool = append(client.CallOptions.CreateNodePool, gax.WithClientMetrics(metrics)) - client.CallOptions.DeleteNodePool = append(client.CallOptions.DeleteNodePool, gax.WithClientMetrics(metrics)) - client.CallOptions.CompleteNodePoolUpgrade = append(client.CallOptions.CompleteNodePoolUpgrade, gax.WithClientMetrics(metrics)) - client.CallOptions.RollbackNodePoolUpgrade = append(client.CallOptions.RollbackNodePoolUpgrade, gax.WithClientMetrics(metrics)) - client.CallOptions.SetNodePoolManagement = append(client.CallOptions.SetNodePoolManagement, gax.WithClientMetrics(metrics)) - client.CallOptions.SetLabels = append(client.CallOptions.SetLabels, gax.WithClientMetrics(metrics)) - client.CallOptions.SetLegacyAbac = append(client.CallOptions.SetLegacyAbac, gax.WithClientMetrics(metrics)) - client.CallOptions.StartIPRotation = append(client.CallOptions.StartIPRotation, gax.WithClientMetrics(metrics)) - client.CallOptions.CompleteIPRotation = append(client.CallOptions.CompleteIPRotation, gax.WithClientMetrics(metrics)) - client.CallOptions.SetNodePoolSize = append(client.CallOptions.SetNodePoolSize, gax.WithClientMetrics(metrics)) - client.CallOptions.SetNetworkPolicy = append(client.CallOptions.SetNetworkPolicy, gax.WithClientMetrics(metrics)) - client.CallOptions.SetMaintenancePolicy = append(client.CallOptions.SetMaintenancePolicy, gax.WithClientMetrics(metrics)) - client.CallOptions.ListUsableSubnetworks = append(client.CallOptions.ListUsableSubnetworks, gax.WithClientMetrics(metrics)) - client.CallOptions.CheckAutopilotCompatibility = append(client.CallOptions.CheckAutopilotCompatibility, gax.WithClientMetrics(metrics)) - client.CallOptions.FetchClusterUpgradeInfo = append(client.CallOptions.FetchClusterUpgradeInfo, gax.WithClientMetrics(metrics)) - client.CallOptions.FetchNodePoolUpgradeInfo = append(client.CallOptions.FetchNodePoolUpgradeInfo, gax.WithClientMetrics(metrics)) - } - - client.internalClient = c - - return &client, nil -} - -// Connection returns a connection to the API service. -// -// Deprecated: Connections are now pooled so this method does not always -// return the same resource. -func (c *clusterManagerGRPCClient) Connection() *grpc.ClientConn { - return c.connPool.Conn() -} - -// setGoogleClientInfo sets the name and version of the application in -// the `x-goog-api-client` header passed on each request. Intended for -// use by Google-written clients. -func (c *clusterManagerGRPCClient) setGoogleClientInfo(keyval ...string) { - kv := append([]string{"gl-go", gax.GoVersion}, keyval...) - kv = append(kv, "gapic", getVersionClient(), "gax", gax.Version, "grpc", grpc.Version, "pb", protoVersion) - c.xGoogHeaders = []string{ - "x-goog-api-client", gax.XGoogHeader(kv...), - } -} - -// Close closes the connection to the API service. The user should invoke this when -// the client is no longer required. -func (c *clusterManagerGRPCClient) Close() error { - return c.connPool.Close() -} - -// Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. -type clusterManagerRESTClient struct { - // The http endpoint to connect to. - endpoint string - - // The http client. - httpClient *http.Client - - // The x-goog-* headers to be sent with each request. - xGoogHeaders []string - - // Points back to the CallOptions field of the containing ClusterManagerClient - CallOptions **ClusterManagerCallOptions - - logger *slog.Logger -} - -// NewClusterManagerRESTClient creates a new cluster manager rest client. -// -// Google Kubernetes Engine Cluster Manager v1 -func NewClusterManagerRESTClient(ctx context.Context, opts ...option.ClientOption) (*ClusterManagerClient, error) { - clientOpts := append(defaultClusterManagerRESTClientOptions(), opts...) - if gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - clientOpts = append(clientOpts, internaloption.WithTelemetryAttributes(map[string]string{ - "gcp.client.service": "container", - "gcp.client.version": getVersionClient(), - "gcp.client.repo": "googleapis/google-cloud-go", - "gcp.client.artifact": "cloud.google.com/go/container/apiv1", - "gcp.client.language": "go", - "url.domain": "container.googleapis.com", - })) - } - httpClient, endpoint, err := httptransport.NewClient(ctx, clientOpts...) - if err != nil { - return nil, err - } - - callOpts := defaultClusterManagerRESTCallOptions() - c := &clusterManagerRESTClient{ - endpoint: endpoint, - httpClient: httpClient, - CallOptions: &callOpts, - logger: internaloption.GetLogger(opts), - } - c.setGoogleClientInfo() - - if gax.IsFeatureEnabled("METRICS") { - metrics := gax.NewClientMetrics( - gax.WithTelemetryLogger(c.logger), - gax.WithTelemetryAttributes(map[string]string{ - gax.ClientService: "container", - gax.ClientVersion: getVersionClient(), - gax.ClientArtifact: "cloud.google.com/go/container/apiv1", - gax.RPCSystem: "http", - gax.URLDomain: "container.googleapis.com", - }), - ) - - callOpts.ListClusters = append(callOpts.ListClusters, gax.WithClientMetrics(metrics)) - callOpts.GetCluster = append(callOpts.GetCluster, gax.WithClientMetrics(metrics)) - callOpts.CreateCluster = append(callOpts.CreateCluster, gax.WithClientMetrics(metrics)) - callOpts.UpdateCluster = append(callOpts.UpdateCluster, gax.WithClientMetrics(metrics)) - callOpts.UpdateNodePool = append(callOpts.UpdateNodePool, gax.WithClientMetrics(metrics)) - callOpts.SetNodePoolAutoscaling = append(callOpts.SetNodePoolAutoscaling, gax.WithClientMetrics(metrics)) - callOpts.SetLoggingService = append(callOpts.SetLoggingService, gax.WithClientMetrics(metrics)) - callOpts.SetMonitoringService = append(callOpts.SetMonitoringService, gax.WithClientMetrics(metrics)) - callOpts.SetAddonsConfig = append(callOpts.SetAddonsConfig, gax.WithClientMetrics(metrics)) - callOpts.SetLocations = append(callOpts.SetLocations, gax.WithClientMetrics(metrics)) - callOpts.UpdateMaster = append(callOpts.UpdateMaster, gax.WithClientMetrics(metrics)) - callOpts.SetMasterAuth = append(callOpts.SetMasterAuth, gax.WithClientMetrics(metrics)) - callOpts.DeleteCluster = append(callOpts.DeleteCluster, gax.WithClientMetrics(metrics)) - callOpts.ListOperations = append(callOpts.ListOperations, gax.WithClientMetrics(metrics)) - callOpts.GetOperation = append(callOpts.GetOperation, gax.WithClientMetrics(metrics)) - callOpts.CancelOperation = append(callOpts.CancelOperation, gax.WithClientMetrics(metrics)) - callOpts.GetServerConfig = append(callOpts.GetServerConfig, gax.WithClientMetrics(metrics)) - callOpts.GetJSONWebKeys = append(callOpts.GetJSONWebKeys, gax.WithClientMetrics(metrics)) - callOpts.ListNodePools = append(callOpts.ListNodePools, gax.WithClientMetrics(metrics)) - callOpts.GetNodePool = append(callOpts.GetNodePool, gax.WithClientMetrics(metrics)) - callOpts.CreateNodePool = append(callOpts.CreateNodePool, gax.WithClientMetrics(metrics)) - callOpts.DeleteNodePool = append(callOpts.DeleteNodePool, gax.WithClientMetrics(metrics)) - callOpts.CompleteNodePoolUpgrade = append(callOpts.CompleteNodePoolUpgrade, gax.WithClientMetrics(metrics)) - callOpts.RollbackNodePoolUpgrade = append(callOpts.RollbackNodePoolUpgrade, gax.WithClientMetrics(metrics)) - callOpts.SetNodePoolManagement = append(callOpts.SetNodePoolManagement, gax.WithClientMetrics(metrics)) - callOpts.SetLabels = append(callOpts.SetLabels, gax.WithClientMetrics(metrics)) - callOpts.SetLegacyAbac = append(callOpts.SetLegacyAbac, gax.WithClientMetrics(metrics)) - callOpts.StartIPRotation = append(callOpts.StartIPRotation, gax.WithClientMetrics(metrics)) - callOpts.CompleteIPRotation = append(callOpts.CompleteIPRotation, gax.WithClientMetrics(metrics)) - callOpts.SetNodePoolSize = append(callOpts.SetNodePoolSize, gax.WithClientMetrics(metrics)) - callOpts.SetNetworkPolicy = append(callOpts.SetNetworkPolicy, gax.WithClientMetrics(metrics)) - callOpts.SetMaintenancePolicy = append(callOpts.SetMaintenancePolicy, gax.WithClientMetrics(metrics)) - callOpts.ListUsableSubnetworks = append(callOpts.ListUsableSubnetworks, gax.WithClientMetrics(metrics)) - callOpts.CheckAutopilotCompatibility = append(callOpts.CheckAutopilotCompatibility, gax.WithClientMetrics(metrics)) - callOpts.FetchClusterUpgradeInfo = append(callOpts.FetchClusterUpgradeInfo, gax.WithClientMetrics(metrics)) - callOpts.FetchNodePoolUpgradeInfo = append(callOpts.FetchNodePoolUpgradeInfo, gax.WithClientMetrics(metrics)) - } - - return &ClusterManagerClient{internalClient: c, CallOptions: callOpts}, nil -} - -func defaultClusterManagerRESTClientOptions() []option.ClientOption { - return []option.ClientOption{ - internaloption.WithDefaultEndpoint("https://container.googleapis.com"), - internaloption.WithDefaultEndpointTemplate("https://container.UNIVERSE_DOMAIN"), - internaloption.WithDefaultMTLSEndpoint("https://container.mtls.googleapis.com"), - internaloption.WithDefaultUniverseDomain("googleapis.com"), - internaloption.WithDefaultAudience("https://container.googleapis.com/"), - internaloption.WithDefaultScopes(DefaultAuthScopes()...), - internaloption.EnableNewAuthLibrary(), - } -} - -// setGoogleClientInfo sets the name and version of the application in -// the `x-goog-api-client` header passed on each request. Intended for -// use by Google-written clients. -func (c *clusterManagerRESTClient) setGoogleClientInfo(keyval ...string) { - kv := append([]string{"gl-go", gax.GoVersion}, keyval...) - kv = append(kv, "gapic", getVersionClient(), "gax", gax.Version, "rest", "UNKNOWN", "pb", protoVersion) - c.xGoogHeaders = []string{ - "x-goog-api-client", gax.XGoogHeader(kv...), - } -} - -// Close closes the connection to the API service. The user should invoke this when -// the client is no longer required. -func (c *clusterManagerRESTClient) Close() error { - // Replace httpClient with nil to force cleanup. - c.httpClient = nil - return nil -} - -// Connection returns a connection to the API service. -// -// Deprecated: This method always returns nil. -func (c *clusterManagerRESTClient) Connection() *grpc.ClientConn { - return nil -} -func (c *clusterManagerGRPCClient) ListClusters(ctx context.Context, req *containerpb.ListClustersRequest, opts ...gax.CallOption) (*containerpb.ListClustersResponse, error) { - hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v&%s=%v&%s=%v", "parent", url.QueryEscape(req.GetParent()), "project_id", url.QueryEscape(req.GetProjectId()), "zone", url.QueryEscape(req.GetZone()))} - - hds = append(c.xGoogHeaders, hds...) - ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) - if gax.IsFeatureEnabled("METRICS") || gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "rpc_method", "google.container.v1.ClusterManager/ListClusters") - } - opts = append((*c.CallOptions).ListClusters[0:len((*c.CallOptions).ListClusters):len((*c.CallOptions).ListClusters)], opts...) - var resp *containerpb.ListClustersResponse - err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - var err error - resp, err = executeRPC(ctx, c.clusterManagerClient.ListClusters, req, settings.GRPC, c.logger, "ListClusters") - return err - }, opts...) - if err != nil { - return nil, err - } - return resp, nil -} - -func (c *clusterManagerGRPCClient) GetCluster(ctx context.Context, req *containerpb.GetClusterRequest, opts ...gax.CallOption) (*containerpb.Cluster, error) { - hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v&%s=%v&%s=%v&%s=%v", "name", url.QueryEscape(req.GetName()), "project_id", url.QueryEscape(req.GetProjectId()), "zone", url.QueryEscape(req.GetZone()), "cluster_id", url.QueryEscape(req.GetClusterId()))} - - hds = append(c.xGoogHeaders, hds...) - ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) - if gax.IsFeatureEnabled("METRICS") || gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "rpc_method", "google.container.v1.ClusterManager/GetCluster") - } - opts = append((*c.CallOptions).GetCluster[0:len((*c.CallOptions).GetCluster):len((*c.CallOptions).GetCluster)], opts...) - var resp *containerpb.Cluster - err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - var err error - resp, err = executeRPC(ctx, c.clusterManagerClient.GetCluster, req, settings.GRPC, c.logger, "GetCluster") - return err - }, opts...) - if err != nil { - return nil, err - } - return resp, nil -} - -func (c *clusterManagerGRPCClient) CreateCluster(ctx context.Context, req *containerpb.CreateClusterRequest, opts ...gax.CallOption) (*containerpb.Operation, error) { - hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v&%s=%v&%s=%v", "parent", url.QueryEscape(req.GetParent()), "project_id", url.QueryEscape(req.GetProjectId()), "zone", url.QueryEscape(req.GetZone()))} - - hds = append(c.xGoogHeaders, hds...) - ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) - if gax.IsFeatureEnabled("METRICS") || gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "rpc_method", "google.container.v1.ClusterManager/CreateCluster") - } - opts = append((*c.CallOptions).CreateCluster[0:len((*c.CallOptions).CreateCluster):len((*c.CallOptions).CreateCluster)], opts...) - var resp *containerpb.Operation - err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - var err error - resp, err = executeRPC(ctx, c.clusterManagerClient.CreateCluster, req, settings.GRPC, c.logger, "CreateCluster") - return err - }, opts...) - if err != nil { - return nil, err - } - return resp, nil -} - -func (c *clusterManagerGRPCClient) UpdateCluster(ctx context.Context, req *containerpb.UpdateClusterRequest, opts ...gax.CallOption) (*containerpb.Operation, error) { - hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v&%s=%v&%s=%v&%s=%v", "name", url.QueryEscape(req.GetName()), "project_id", url.QueryEscape(req.GetProjectId()), "zone", url.QueryEscape(req.GetZone()), "cluster_id", url.QueryEscape(req.GetClusterId()))} - - hds = append(c.xGoogHeaders, hds...) - ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) - if gax.IsFeatureEnabled("METRICS") || gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "rpc_method", "google.container.v1.ClusterManager/UpdateCluster") - } - opts = append((*c.CallOptions).UpdateCluster[0:len((*c.CallOptions).UpdateCluster):len((*c.CallOptions).UpdateCluster)], opts...) - var resp *containerpb.Operation - err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - var err error - resp, err = executeRPC(ctx, c.clusterManagerClient.UpdateCluster, req, settings.GRPC, c.logger, "UpdateCluster") - return err - }, opts...) - if err != nil { - return nil, err - } - return resp, nil -} - -func (c *clusterManagerGRPCClient) UpdateNodePool(ctx context.Context, req *containerpb.UpdateNodePoolRequest, opts ...gax.CallOption) (*containerpb.Operation, error) { - hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v&%s=%v&%s=%v&%s=%v&%s=%v", "name", url.QueryEscape(req.GetName()), "project_id", url.QueryEscape(req.GetProjectId()), "zone", url.QueryEscape(req.GetZone()), "cluster_id", url.QueryEscape(req.GetClusterId()), "node_pool_id", url.QueryEscape(req.GetNodePoolId()))} - - hds = append(c.xGoogHeaders, hds...) - ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) - if gax.IsFeatureEnabled("METRICS") || gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "rpc_method", "google.container.v1.ClusterManager/UpdateNodePool") - } - opts = append((*c.CallOptions).UpdateNodePool[0:len((*c.CallOptions).UpdateNodePool):len((*c.CallOptions).UpdateNodePool)], opts...) - var resp *containerpb.Operation - err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - var err error - resp, err = executeRPC(ctx, c.clusterManagerClient.UpdateNodePool, req, settings.GRPC, c.logger, "UpdateNodePool") - return err - }, opts...) - if err != nil { - return nil, err - } - return resp, nil -} - -func (c *clusterManagerGRPCClient) SetNodePoolAutoscaling(ctx context.Context, req *containerpb.SetNodePoolAutoscalingRequest, opts ...gax.CallOption) (*containerpb.Operation, error) { - hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v&%s=%v&%s=%v&%s=%v&%s=%v", "name", url.QueryEscape(req.GetName()), "project_id", url.QueryEscape(req.GetProjectId()), "zone", url.QueryEscape(req.GetZone()), "cluster_id", url.QueryEscape(req.GetClusterId()), "node_pool_id", url.QueryEscape(req.GetNodePoolId()))} - - hds = append(c.xGoogHeaders, hds...) - ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) - if gax.IsFeatureEnabled("METRICS") || gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "rpc_method", "google.container.v1.ClusterManager/SetNodePoolAutoscaling") - } - opts = append((*c.CallOptions).SetNodePoolAutoscaling[0:len((*c.CallOptions).SetNodePoolAutoscaling):len((*c.CallOptions).SetNodePoolAutoscaling)], opts...) - var resp *containerpb.Operation - err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - var err error - resp, err = executeRPC(ctx, c.clusterManagerClient.SetNodePoolAutoscaling, req, settings.GRPC, c.logger, "SetNodePoolAutoscaling") - return err - }, opts...) - if err != nil { - return nil, err - } - return resp, nil -} - -func (c *clusterManagerGRPCClient) SetLoggingService(ctx context.Context, req *containerpb.SetLoggingServiceRequest, opts ...gax.CallOption) (*containerpb.Operation, error) { - hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v&%s=%v&%s=%v&%s=%v", "name", url.QueryEscape(req.GetName()), "project_id", url.QueryEscape(req.GetProjectId()), "zone", url.QueryEscape(req.GetZone()), "cluster_id", url.QueryEscape(req.GetClusterId()))} - - hds = append(c.xGoogHeaders, hds...) - ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) - if gax.IsFeatureEnabled("METRICS") || gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "rpc_method", "google.container.v1.ClusterManager/SetLoggingService") - } - opts = append((*c.CallOptions).SetLoggingService[0:len((*c.CallOptions).SetLoggingService):len((*c.CallOptions).SetLoggingService)], opts...) - var resp *containerpb.Operation - err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - var err error - resp, err = executeRPC(ctx, c.clusterManagerClient.SetLoggingService, req, settings.GRPC, c.logger, "SetLoggingService") - return err - }, opts...) - if err != nil { - return nil, err - } - return resp, nil -} - -func (c *clusterManagerGRPCClient) SetMonitoringService(ctx context.Context, req *containerpb.SetMonitoringServiceRequest, opts ...gax.CallOption) (*containerpb.Operation, error) { - hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v&%s=%v&%s=%v&%s=%v", "name", url.QueryEscape(req.GetName()), "project_id", url.QueryEscape(req.GetProjectId()), "zone", url.QueryEscape(req.GetZone()), "cluster_id", url.QueryEscape(req.GetClusterId()))} - - hds = append(c.xGoogHeaders, hds...) - ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) - if gax.IsFeatureEnabled("METRICS") || gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "rpc_method", "google.container.v1.ClusterManager/SetMonitoringService") - } - opts = append((*c.CallOptions).SetMonitoringService[0:len((*c.CallOptions).SetMonitoringService):len((*c.CallOptions).SetMonitoringService)], opts...) - var resp *containerpb.Operation - err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - var err error - resp, err = executeRPC(ctx, c.clusterManagerClient.SetMonitoringService, req, settings.GRPC, c.logger, "SetMonitoringService") - return err - }, opts...) - if err != nil { - return nil, err - } - return resp, nil -} - -func (c *clusterManagerGRPCClient) SetAddonsConfig(ctx context.Context, req *containerpb.SetAddonsConfigRequest, opts ...gax.CallOption) (*containerpb.Operation, error) { - hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v&%s=%v&%s=%v&%s=%v", "name", url.QueryEscape(req.GetName()), "project_id", url.QueryEscape(req.GetProjectId()), "zone", url.QueryEscape(req.GetZone()), "cluster_id", url.QueryEscape(req.GetClusterId()))} - - hds = append(c.xGoogHeaders, hds...) - ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) - if gax.IsFeatureEnabled("METRICS") || gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "rpc_method", "google.container.v1.ClusterManager/SetAddonsConfig") - } - opts = append((*c.CallOptions).SetAddonsConfig[0:len((*c.CallOptions).SetAddonsConfig):len((*c.CallOptions).SetAddonsConfig)], opts...) - var resp *containerpb.Operation - err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - var err error - resp, err = executeRPC(ctx, c.clusterManagerClient.SetAddonsConfig, req, settings.GRPC, c.logger, "SetAddonsConfig") - return err - }, opts...) - if err != nil { - return nil, err - } - return resp, nil -} - -func (c *clusterManagerGRPCClient) SetLocations(ctx context.Context, req *containerpb.SetLocationsRequest, opts ...gax.CallOption) (*containerpb.Operation, error) { - hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v&%s=%v&%s=%v&%s=%v", "name", url.QueryEscape(req.GetName()), "project_id", url.QueryEscape(req.GetProjectId()), "zone", url.QueryEscape(req.GetZone()), "cluster_id", url.QueryEscape(req.GetClusterId()))} - - hds = append(c.xGoogHeaders, hds...) - ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) - if gax.IsFeatureEnabled("METRICS") || gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "rpc_method", "google.container.v1.ClusterManager/SetLocations") - } - opts = append((*c.CallOptions).SetLocations[0:len((*c.CallOptions).SetLocations):len((*c.CallOptions).SetLocations)], opts...) - var resp *containerpb.Operation - err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - var err error - resp, err = executeRPC(ctx, c.clusterManagerClient.SetLocations, req, settings.GRPC, c.logger, "SetLocations") - return err - }, opts...) - if err != nil { - return nil, err - } - return resp, nil -} - -func (c *clusterManagerGRPCClient) UpdateMaster(ctx context.Context, req *containerpb.UpdateMasterRequest, opts ...gax.CallOption) (*containerpb.Operation, error) { - hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v&%s=%v&%s=%v&%s=%v", "name", url.QueryEscape(req.GetName()), "project_id", url.QueryEscape(req.GetProjectId()), "zone", url.QueryEscape(req.GetZone()), "cluster_id", url.QueryEscape(req.GetClusterId()))} - - hds = append(c.xGoogHeaders, hds...) - ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) - if gax.IsFeatureEnabled("METRICS") || gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "rpc_method", "google.container.v1.ClusterManager/UpdateMaster") - } - opts = append((*c.CallOptions).UpdateMaster[0:len((*c.CallOptions).UpdateMaster):len((*c.CallOptions).UpdateMaster)], opts...) - var resp *containerpb.Operation - err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - var err error - resp, err = executeRPC(ctx, c.clusterManagerClient.UpdateMaster, req, settings.GRPC, c.logger, "UpdateMaster") - return err - }, opts...) - if err != nil { - return nil, err - } - return resp, nil -} - -func (c *clusterManagerGRPCClient) SetMasterAuth(ctx context.Context, req *containerpb.SetMasterAuthRequest, opts ...gax.CallOption) (*containerpb.Operation, error) { - hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v&%s=%v&%s=%v&%s=%v", "name", url.QueryEscape(req.GetName()), "project_id", url.QueryEscape(req.GetProjectId()), "zone", url.QueryEscape(req.GetZone()), "cluster_id", url.QueryEscape(req.GetClusterId()))} - - hds = append(c.xGoogHeaders, hds...) - ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) - if gax.IsFeatureEnabled("METRICS") || gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "rpc_method", "google.container.v1.ClusterManager/SetMasterAuth") - } - opts = append((*c.CallOptions).SetMasterAuth[0:len((*c.CallOptions).SetMasterAuth):len((*c.CallOptions).SetMasterAuth)], opts...) - var resp *containerpb.Operation - err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - var err error - resp, err = executeRPC(ctx, c.clusterManagerClient.SetMasterAuth, req, settings.GRPC, c.logger, "SetMasterAuth") - return err - }, opts...) - if err != nil { - return nil, err - } - return resp, nil -} - -func (c *clusterManagerGRPCClient) DeleteCluster(ctx context.Context, req *containerpb.DeleteClusterRequest, opts ...gax.CallOption) (*containerpb.Operation, error) { - hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v&%s=%v&%s=%v&%s=%v", "name", url.QueryEscape(req.GetName()), "project_id", url.QueryEscape(req.GetProjectId()), "zone", url.QueryEscape(req.GetZone()), "cluster_id", url.QueryEscape(req.GetClusterId()))} - - hds = append(c.xGoogHeaders, hds...) - ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) - if gax.IsFeatureEnabled("METRICS") || gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "rpc_method", "google.container.v1.ClusterManager/DeleteCluster") - } - opts = append((*c.CallOptions).DeleteCluster[0:len((*c.CallOptions).DeleteCluster):len((*c.CallOptions).DeleteCluster)], opts...) - var resp *containerpb.Operation - err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - var err error - resp, err = executeRPC(ctx, c.clusterManagerClient.DeleteCluster, req, settings.GRPC, c.logger, "DeleteCluster") - return err - }, opts...) - if err != nil { - return nil, err - } - return resp, nil -} - -func (c *clusterManagerGRPCClient) ListOperations(ctx context.Context, req *containerpb.ListOperationsRequest, opts ...gax.CallOption) (*containerpb.ListOperationsResponse, error) { - hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v&%s=%v&%s=%v", "parent", url.QueryEscape(req.GetParent()), "project_id", url.QueryEscape(req.GetProjectId()), "zone", url.QueryEscape(req.GetZone()))} - - hds = append(c.xGoogHeaders, hds...) - ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) - if gax.IsFeatureEnabled("METRICS") || gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "rpc_method", "google.container.v1.ClusterManager/ListOperations") - } - opts = append((*c.CallOptions).ListOperations[0:len((*c.CallOptions).ListOperations):len((*c.CallOptions).ListOperations)], opts...) - var resp *containerpb.ListOperationsResponse - err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - var err error - resp, err = executeRPC(ctx, c.clusterManagerClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") - return err - }, opts...) - if err != nil { - return nil, err - } - return resp, nil -} - -func (c *clusterManagerGRPCClient) GetOperation(ctx context.Context, req *containerpb.GetOperationRequest, opts ...gax.CallOption) (*containerpb.Operation, error) { - hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v&%s=%v&%s=%v&%s=%v", "name", url.QueryEscape(req.GetName()), "project_id", url.QueryEscape(req.GetProjectId()), "zone", url.QueryEscape(req.GetZone()), "operation_id", url.QueryEscape(req.GetOperationId()))} - - hds = append(c.xGoogHeaders, hds...) - ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) - if gax.IsFeatureEnabled("METRICS") || gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "rpc_method", "google.container.v1.ClusterManager/GetOperation") - } - opts = append((*c.CallOptions).GetOperation[0:len((*c.CallOptions).GetOperation):len((*c.CallOptions).GetOperation)], opts...) - var resp *containerpb.Operation - err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - var err error - resp, err = executeRPC(ctx, c.clusterManagerClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") - return err - }, opts...) - if err != nil { - return nil, err - } - return resp, nil -} - -func (c *clusterManagerGRPCClient) CancelOperation(ctx context.Context, req *containerpb.CancelOperationRequest, opts ...gax.CallOption) error { - hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v&%s=%v&%s=%v&%s=%v", "name", url.QueryEscape(req.GetName()), "project_id", url.QueryEscape(req.GetProjectId()), "zone", url.QueryEscape(req.GetZone()), "operation_id", url.QueryEscape(req.GetOperationId()))} - - hds = append(c.xGoogHeaders, hds...) - ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) - if gax.IsFeatureEnabled("METRICS") || gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "rpc_method", "google.container.v1.ClusterManager/CancelOperation") - } - opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) - err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - var err error - _, err = executeRPC(ctx, c.clusterManagerClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") - return err - }, opts...) - return err -} - -func (c *clusterManagerGRPCClient) GetServerConfig(ctx context.Context, req *containerpb.GetServerConfigRequest, opts ...gax.CallOption) (*containerpb.ServerConfig, error) { - hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v&%s=%v&%s=%v", "name", url.QueryEscape(req.GetName()), "project_id", url.QueryEscape(req.GetProjectId()), "zone", url.QueryEscape(req.GetZone()))} - - hds = append(c.xGoogHeaders, hds...) - ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) - if gax.IsFeatureEnabled("METRICS") || gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "rpc_method", "google.container.v1.ClusterManager/GetServerConfig") - } - opts = append((*c.CallOptions).GetServerConfig[0:len((*c.CallOptions).GetServerConfig):len((*c.CallOptions).GetServerConfig)], opts...) - var resp *containerpb.ServerConfig - err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - var err error - resp, err = executeRPC(ctx, c.clusterManagerClient.GetServerConfig, req, settings.GRPC, c.logger, "GetServerConfig") - return err - }, opts...) - if err != nil { - return nil, err - } - return resp, nil -} - -func (c *clusterManagerGRPCClient) GetJSONWebKeys(ctx context.Context, req *containerpb.GetJSONWebKeysRequest, opts ...gax.CallOption) (*containerpb.GetJSONWebKeysResponse, error) { - hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))} - - hds = append(c.xGoogHeaders, hds...) - ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) - if gax.IsFeatureEnabled("METRICS") || gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "rpc_method", "google.container.v1.ClusterManager/GetJSONWebKeys") - } - opts = append((*c.CallOptions).GetJSONWebKeys[0:len((*c.CallOptions).GetJSONWebKeys):len((*c.CallOptions).GetJSONWebKeys)], opts...) - var resp *containerpb.GetJSONWebKeysResponse - err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - var err error - resp, err = executeRPC(ctx, c.clusterManagerClient.GetJSONWebKeys, req, settings.GRPC, c.logger, "GetJSONWebKeys") - return err - }, opts...) - if err != nil { - return nil, err - } - return resp, nil -} - -func (c *clusterManagerGRPCClient) ListNodePools(ctx context.Context, req *containerpb.ListNodePoolsRequest, opts ...gax.CallOption) (*containerpb.ListNodePoolsResponse, error) { - hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v&%s=%v&%s=%v&%s=%v", "parent", url.QueryEscape(req.GetParent()), "project_id", url.QueryEscape(req.GetProjectId()), "zone", url.QueryEscape(req.GetZone()), "cluster_id", url.QueryEscape(req.GetClusterId()))} - - hds = append(c.xGoogHeaders, hds...) - ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) - if gax.IsFeatureEnabled("METRICS") || gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "rpc_method", "google.container.v1.ClusterManager/ListNodePools") - } - opts = append((*c.CallOptions).ListNodePools[0:len((*c.CallOptions).ListNodePools):len((*c.CallOptions).ListNodePools)], opts...) - var resp *containerpb.ListNodePoolsResponse - err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - var err error - resp, err = executeRPC(ctx, c.clusterManagerClient.ListNodePools, req, settings.GRPC, c.logger, "ListNodePools") - return err - }, opts...) - if err != nil { - return nil, err - } - return resp, nil -} - -func (c *clusterManagerGRPCClient) GetNodePool(ctx context.Context, req *containerpb.GetNodePoolRequest, opts ...gax.CallOption) (*containerpb.NodePool, error) { - hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v&%s=%v&%s=%v&%s=%v&%s=%v", "name", url.QueryEscape(req.GetName()), "project_id", url.QueryEscape(req.GetProjectId()), "zone", url.QueryEscape(req.GetZone()), "cluster_id", url.QueryEscape(req.GetClusterId()), "node_pool_id", url.QueryEscape(req.GetNodePoolId()))} - - hds = append(c.xGoogHeaders, hds...) - ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) - if gax.IsFeatureEnabled("METRICS") || gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "rpc_method", "google.container.v1.ClusterManager/GetNodePool") - } - opts = append((*c.CallOptions).GetNodePool[0:len((*c.CallOptions).GetNodePool):len((*c.CallOptions).GetNodePool)], opts...) - var resp *containerpb.NodePool - err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - var err error - resp, err = executeRPC(ctx, c.clusterManagerClient.GetNodePool, req, settings.GRPC, c.logger, "GetNodePool") - return err - }, opts...) - if err != nil { - return nil, err - } - return resp, nil -} - -func (c *clusterManagerGRPCClient) CreateNodePool(ctx context.Context, req *containerpb.CreateNodePoolRequest, opts ...gax.CallOption) (*containerpb.Operation, error) { - hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v&%s=%v&%s=%v&%s=%v", "parent", url.QueryEscape(req.GetParent()), "project_id", url.QueryEscape(req.GetProjectId()), "zone", url.QueryEscape(req.GetZone()), "cluster_id", url.QueryEscape(req.GetClusterId()))} - - hds = append(c.xGoogHeaders, hds...) - ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) - if gax.IsFeatureEnabled("METRICS") || gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "rpc_method", "google.container.v1.ClusterManager/CreateNodePool") - } - opts = append((*c.CallOptions).CreateNodePool[0:len((*c.CallOptions).CreateNodePool):len((*c.CallOptions).CreateNodePool)], opts...) - var resp *containerpb.Operation - err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - var err error - resp, err = executeRPC(ctx, c.clusterManagerClient.CreateNodePool, req, settings.GRPC, c.logger, "CreateNodePool") - return err - }, opts...) - if err != nil { - return nil, err - } - return resp, nil -} - -func (c *clusterManagerGRPCClient) DeleteNodePool(ctx context.Context, req *containerpb.DeleteNodePoolRequest, opts ...gax.CallOption) (*containerpb.Operation, error) { - hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v&%s=%v&%s=%v&%s=%v&%s=%v", "name", url.QueryEscape(req.GetName()), "project_id", url.QueryEscape(req.GetProjectId()), "zone", url.QueryEscape(req.GetZone()), "cluster_id", url.QueryEscape(req.GetClusterId()), "node_pool_id", url.QueryEscape(req.GetNodePoolId()))} - - hds = append(c.xGoogHeaders, hds...) - ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) - if gax.IsFeatureEnabled("METRICS") || gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "rpc_method", "google.container.v1.ClusterManager/DeleteNodePool") - } - opts = append((*c.CallOptions).DeleteNodePool[0:len((*c.CallOptions).DeleteNodePool):len((*c.CallOptions).DeleteNodePool)], opts...) - var resp *containerpb.Operation - err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - var err error - resp, err = executeRPC(ctx, c.clusterManagerClient.DeleteNodePool, req, settings.GRPC, c.logger, "DeleteNodePool") - return err - }, opts...) - if err != nil { - return nil, err - } - return resp, nil -} - -func (c *clusterManagerGRPCClient) CompleteNodePoolUpgrade(ctx context.Context, req *containerpb.CompleteNodePoolUpgradeRequest, opts ...gax.CallOption) error { - hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))} - - hds = append(c.xGoogHeaders, hds...) - ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) - if gax.IsFeatureEnabled("METRICS") || gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "rpc_method", "google.container.v1.ClusterManager/CompleteNodePoolUpgrade") - } - opts = append((*c.CallOptions).CompleteNodePoolUpgrade[0:len((*c.CallOptions).CompleteNodePoolUpgrade):len((*c.CallOptions).CompleteNodePoolUpgrade)], opts...) - err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - var err error - _, err = executeRPC(ctx, c.clusterManagerClient.CompleteNodePoolUpgrade, req, settings.GRPC, c.logger, "CompleteNodePoolUpgrade") - return err - }, opts...) - return err -} - -func (c *clusterManagerGRPCClient) RollbackNodePoolUpgrade(ctx context.Context, req *containerpb.RollbackNodePoolUpgradeRequest, opts ...gax.CallOption) (*containerpb.Operation, error) { - hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v&%s=%v&%s=%v&%s=%v&%s=%v", "name", url.QueryEscape(req.GetName()), "project_id", url.QueryEscape(req.GetProjectId()), "zone", url.QueryEscape(req.GetZone()), "cluster_id", url.QueryEscape(req.GetClusterId()), "node_pool_id", url.QueryEscape(req.GetNodePoolId()))} - - hds = append(c.xGoogHeaders, hds...) - ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) - if gax.IsFeatureEnabled("METRICS") || gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "rpc_method", "google.container.v1.ClusterManager/RollbackNodePoolUpgrade") - } - opts = append((*c.CallOptions).RollbackNodePoolUpgrade[0:len((*c.CallOptions).RollbackNodePoolUpgrade):len((*c.CallOptions).RollbackNodePoolUpgrade)], opts...) - var resp *containerpb.Operation - err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - var err error - resp, err = executeRPC(ctx, c.clusterManagerClient.RollbackNodePoolUpgrade, req, settings.GRPC, c.logger, "RollbackNodePoolUpgrade") - return err - }, opts...) - if err != nil { - return nil, err - } - return resp, nil -} - -func (c *clusterManagerGRPCClient) SetNodePoolManagement(ctx context.Context, req *containerpb.SetNodePoolManagementRequest, opts ...gax.CallOption) (*containerpb.Operation, error) { - hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v&%s=%v&%s=%v&%s=%v&%s=%v", "name", url.QueryEscape(req.GetName()), "project_id", url.QueryEscape(req.GetProjectId()), "zone", url.QueryEscape(req.GetZone()), "cluster_id", url.QueryEscape(req.GetClusterId()), "node_pool_id", url.QueryEscape(req.GetNodePoolId()))} - - hds = append(c.xGoogHeaders, hds...) - ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) - if gax.IsFeatureEnabled("METRICS") || gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "rpc_method", "google.container.v1.ClusterManager/SetNodePoolManagement") - } - opts = append((*c.CallOptions).SetNodePoolManagement[0:len((*c.CallOptions).SetNodePoolManagement):len((*c.CallOptions).SetNodePoolManagement)], opts...) - var resp *containerpb.Operation - err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - var err error - resp, err = executeRPC(ctx, c.clusterManagerClient.SetNodePoolManagement, req, settings.GRPC, c.logger, "SetNodePoolManagement") - return err - }, opts...) - if err != nil { - return nil, err - } - return resp, nil -} - -func (c *clusterManagerGRPCClient) SetLabels(ctx context.Context, req *containerpb.SetLabelsRequest, opts ...gax.CallOption) (*containerpb.Operation, error) { - hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v&%s=%v&%s=%v&%s=%v", "name", url.QueryEscape(req.GetName()), "project_id", url.QueryEscape(req.GetProjectId()), "zone", url.QueryEscape(req.GetZone()), "cluster_id", url.QueryEscape(req.GetClusterId()))} - - hds = append(c.xGoogHeaders, hds...) - ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) - if gax.IsFeatureEnabled("METRICS") || gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "rpc_method", "google.container.v1.ClusterManager/SetLabels") - } - opts = append((*c.CallOptions).SetLabels[0:len((*c.CallOptions).SetLabels):len((*c.CallOptions).SetLabels)], opts...) - var resp *containerpb.Operation - err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - var err error - resp, err = executeRPC(ctx, c.clusterManagerClient.SetLabels, req, settings.GRPC, c.logger, "SetLabels") - return err - }, opts...) - if err != nil { - return nil, err - } - return resp, nil -} - -func (c *clusterManagerGRPCClient) SetLegacyAbac(ctx context.Context, req *containerpb.SetLegacyAbacRequest, opts ...gax.CallOption) (*containerpb.Operation, error) { - hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v&%s=%v&%s=%v&%s=%v", "name", url.QueryEscape(req.GetName()), "project_id", url.QueryEscape(req.GetProjectId()), "zone", url.QueryEscape(req.GetZone()), "cluster_id", url.QueryEscape(req.GetClusterId()))} - - hds = append(c.xGoogHeaders, hds...) - ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) - if gax.IsFeatureEnabled("METRICS") || gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "rpc_method", "google.container.v1.ClusterManager/SetLegacyAbac") - } - opts = append((*c.CallOptions).SetLegacyAbac[0:len((*c.CallOptions).SetLegacyAbac):len((*c.CallOptions).SetLegacyAbac)], opts...) - var resp *containerpb.Operation - err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - var err error - resp, err = executeRPC(ctx, c.clusterManagerClient.SetLegacyAbac, req, settings.GRPC, c.logger, "SetLegacyAbac") - return err - }, opts...) - if err != nil { - return nil, err - } - return resp, nil -} - -func (c *clusterManagerGRPCClient) StartIPRotation(ctx context.Context, req *containerpb.StartIPRotationRequest, opts ...gax.CallOption) (*containerpb.Operation, error) { - hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v&%s=%v&%s=%v&%s=%v", "name", url.QueryEscape(req.GetName()), "project_id", url.QueryEscape(req.GetProjectId()), "zone", url.QueryEscape(req.GetZone()), "cluster_id", url.QueryEscape(req.GetClusterId()))} - - hds = append(c.xGoogHeaders, hds...) - ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) - if gax.IsFeatureEnabled("METRICS") || gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "rpc_method", "google.container.v1.ClusterManager/StartIPRotation") - } - opts = append((*c.CallOptions).StartIPRotation[0:len((*c.CallOptions).StartIPRotation):len((*c.CallOptions).StartIPRotation)], opts...) - var resp *containerpb.Operation - err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - var err error - resp, err = executeRPC(ctx, c.clusterManagerClient.StartIPRotation, req, settings.GRPC, c.logger, "StartIPRotation") - return err - }, opts...) - if err != nil { - return nil, err - } - return resp, nil -} - -func (c *clusterManagerGRPCClient) CompleteIPRotation(ctx context.Context, req *containerpb.CompleteIPRotationRequest, opts ...gax.CallOption) (*containerpb.Operation, error) { - hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v&%s=%v&%s=%v&%s=%v", "name", url.QueryEscape(req.GetName()), "project_id", url.QueryEscape(req.GetProjectId()), "zone", url.QueryEscape(req.GetZone()), "cluster_id", url.QueryEscape(req.GetClusterId()))} - - hds = append(c.xGoogHeaders, hds...) - ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) - if gax.IsFeatureEnabled("METRICS") || gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "rpc_method", "google.container.v1.ClusterManager/CompleteIPRotation") - } - opts = append((*c.CallOptions).CompleteIPRotation[0:len((*c.CallOptions).CompleteIPRotation):len((*c.CallOptions).CompleteIPRotation)], opts...) - var resp *containerpb.Operation - err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - var err error - resp, err = executeRPC(ctx, c.clusterManagerClient.CompleteIPRotation, req, settings.GRPC, c.logger, "CompleteIPRotation") - return err - }, opts...) - if err != nil { - return nil, err - } - return resp, nil -} - -func (c *clusterManagerGRPCClient) SetNodePoolSize(ctx context.Context, req *containerpb.SetNodePoolSizeRequest, opts ...gax.CallOption) (*containerpb.Operation, error) { - hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v&%s=%v&%s=%v&%s=%v&%s=%v", "name", url.QueryEscape(req.GetName()), "project_id", url.QueryEscape(req.GetProjectId()), "zone", url.QueryEscape(req.GetZone()), "cluster_id", url.QueryEscape(req.GetClusterId()), "node_pool_id", url.QueryEscape(req.GetNodePoolId()))} - - hds = append(c.xGoogHeaders, hds...) - ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) - if gax.IsFeatureEnabled("METRICS") || gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "rpc_method", "google.container.v1.ClusterManager/SetNodePoolSize") - } - opts = append((*c.CallOptions).SetNodePoolSize[0:len((*c.CallOptions).SetNodePoolSize):len((*c.CallOptions).SetNodePoolSize)], opts...) - var resp *containerpb.Operation - err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - var err error - resp, err = executeRPC(ctx, c.clusterManagerClient.SetNodePoolSize, req, settings.GRPC, c.logger, "SetNodePoolSize") - return err - }, opts...) - if err != nil { - return nil, err - } - return resp, nil -} - -func (c *clusterManagerGRPCClient) SetNetworkPolicy(ctx context.Context, req *containerpb.SetNetworkPolicyRequest, opts ...gax.CallOption) (*containerpb.Operation, error) { - hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v&%s=%v&%s=%v&%s=%v", "name", url.QueryEscape(req.GetName()), "project_id", url.QueryEscape(req.GetProjectId()), "zone", url.QueryEscape(req.GetZone()), "cluster_id", url.QueryEscape(req.GetClusterId()))} - - hds = append(c.xGoogHeaders, hds...) - ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) - if gax.IsFeatureEnabled("METRICS") || gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "rpc_method", "google.container.v1.ClusterManager/SetNetworkPolicy") - } - opts = append((*c.CallOptions).SetNetworkPolicy[0:len((*c.CallOptions).SetNetworkPolicy):len((*c.CallOptions).SetNetworkPolicy)], opts...) - var resp *containerpb.Operation - err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - var err error - resp, err = executeRPC(ctx, c.clusterManagerClient.SetNetworkPolicy, req, settings.GRPC, c.logger, "SetNetworkPolicy") - return err - }, opts...) - if err != nil { - return nil, err - } - return resp, nil -} - -func (c *clusterManagerGRPCClient) SetMaintenancePolicy(ctx context.Context, req *containerpb.SetMaintenancePolicyRequest, opts ...gax.CallOption) (*containerpb.Operation, error) { - hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v&%s=%v&%s=%v&%s=%v", "name", url.QueryEscape(req.GetName()), "project_id", url.QueryEscape(req.GetProjectId()), "zone", url.QueryEscape(req.GetZone()), "cluster_id", url.QueryEscape(req.GetClusterId()))} - - hds = append(c.xGoogHeaders, hds...) - ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) - if gax.IsFeatureEnabled("METRICS") || gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "rpc_method", "google.container.v1.ClusterManager/SetMaintenancePolicy") - } - opts = append((*c.CallOptions).SetMaintenancePolicy[0:len((*c.CallOptions).SetMaintenancePolicy):len((*c.CallOptions).SetMaintenancePolicy)], opts...) - var resp *containerpb.Operation - err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - var err error - resp, err = executeRPC(ctx, c.clusterManagerClient.SetMaintenancePolicy, req, settings.GRPC, c.logger, "SetMaintenancePolicy") - return err - }, opts...) - if err != nil { - return nil, err - } - return resp, nil -} - -func (c *clusterManagerGRPCClient) ListUsableSubnetworks(ctx context.Context, req *containerpb.ListUsableSubnetworksRequest, opts ...gax.CallOption) *UsableSubnetworkIterator { - hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))} - - hds = append(c.xGoogHeaders, hds...) - ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) - if gax.IsFeatureEnabled("METRICS") || gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "rpc_method", "google.container.v1.ClusterManager/ListUsableSubnetworks") - } - opts = append((*c.CallOptions).ListUsableSubnetworks[0:len((*c.CallOptions).ListUsableSubnetworks):len((*c.CallOptions).ListUsableSubnetworks)], opts...) - it := &UsableSubnetworkIterator{} - req = proto.Clone(req).(*containerpb.ListUsableSubnetworksRequest) - it.InternalFetch = func(pageSize int, pageToken string) ([]*containerpb.UsableSubnetwork, string, error) { - resp := &containerpb.ListUsableSubnetworksResponse{} - if pageToken != "" { - req.PageToken = pageToken - } - if pageSize > math.MaxInt32 { - req.PageSize = math.MaxInt32 - } else if pageSize != 0 { - req.PageSize = int32(pageSize) - } - err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - var err error - resp, err = executeRPC(ctx, c.clusterManagerClient.ListUsableSubnetworks, req, settings.GRPC, c.logger, "ListUsableSubnetworks") - return err - }, opts...) - if err != nil { - return nil, "", err - } - - it.Response = resp - return resp.GetSubnetworks(), resp.GetNextPageToken(), nil - } - fetch := func(pageSize int, pageToken string) (string, error) { - items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) - if err != nil { - return "", err - } - it.items = append(it.items, items...) - return nextPageToken, nil - } - - it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) - it.pageInfo.MaxSize = int(req.GetPageSize()) - it.pageInfo.Token = req.GetPageToken() - - return it -} - -func (c *clusterManagerGRPCClient) CheckAutopilotCompatibility(ctx context.Context, req *containerpb.CheckAutopilotCompatibilityRequest, opts ...gax.CallOption) (*containerpb.CheckAutopilotCompatibilityResponse, error) { - hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))} - - hds = append(c.xGoogHeaders, hds...) - ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) - if gax.IsFeatureEnabled("METRICS") || gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "rpc_method", "google.container.v1.ClusterManager/CheckAutopilotCompatibility") - } - opts = append((*c.CallOptions).CheckAutopilotCompatibility[0:len((*c.CallOptions).CheckAutopilotCompatibility):len((*c.CallOptions).CheckAutopilotCompatibility)], opts...) - var resp *containerpb.CheckAutopilotCompatibilityResponse - err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - var err error - resp, err = executeRPC(ctx, c.clusterManagerClient.CheckAutopilotCompatibility, req, settings.GRPC, c.logger, "CheckAutopilotCompatibility") - return err - }, opts...) - if err != nil { - return nil, err - } - return resp, nil -} - -func (c *clusterManagerGRPCClient) FetchClusterUpgradeInfo(ctx context.Context, req *containerpb.FetchClusterUpgradeInfoRequest, opts ...gax.CallOption) (*containerpb.ClusterUpgradeInfo, error) { - hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))} - - hds = append(c.xGoogHeaders, hds...) - ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) - if gax.IsFeatureEnabled("METRICS") || gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "rpc_method", "google.container.v1.ClusterManager/FetchClusterUpgradeInfo") - } - opts = append((*c.CallOptions).FetchClusterUpgradeInfo[0:len((*c.CallOptions).FetchClusterUpgradeInfo):len((*c.CallOptions).FetchClusterUpgradeInfo)], opts...) - var resp *containerpb.ClusterUpgradeInfo - err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - var err error - resp, err = executeRPC(ctx, c.clusterManagerClient.FetchClusterUpgradeInfo, req, settings.GRPC, c.logger, "FetchClusterUpgradeInfo") - return err - }, opts...) - if err != nil { - return nil, err - } - return resp, nil -} - -func (c *clusterManagerGRPCClient) FetchNodePoolUpgradeInfo(ctx context.Context, req *containerpb.FetchNodePoolUpgradeInfoRequest, opts ...gax.CallOption) (*containerpb.NodePoolUpgradeInfo, error) { - hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))} - - hds = append(c.xGoogHeaders, hds...) - ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) - if gax.IsFeatureEnabled("METRICS") || gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "rpc_method", "google.container.v1.ClusterManager/FetchNodePoolUpgradeInfo") - } - opts = append((*c.CallOptions).FetchNodePoolUpgradeInfo[0:len((*c.CallOptions).FetchNodePoolUpgradeInfo):len((*c.CallOptions).FetchNodePoolUpgradeInfo)], opts...) - var resp *containerpb.NodePoolUpgradeInfo - err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - var err error - resp, err = executeRPC(ctx, c.clusterManagerClient.FetchNodePoolUpgradeInfo, req, settings.GRPC, c.logger, "FetchNodePoolUpgradeInfo") - return err - }, opts...) - if err != nil { - return nil, err - } - return resp, nil -} - -// ListClusters lists all clusters owned by a project in either the specified zone or all -// zones. -func (c *clusterManagerRESTClient) ListClusters(ctx context.Context, req *containerpb.ListClustersRequest, opts ...gax.CallOption) (*containerpb.ListClustersResponse, error) { - baseUrl, err := url.Parse(c.endpoint) - if err != nil { - return nil, err - } - baseUrl.Path += fmt.Sprintf("/v1/%v/clusters", req.GetParent()) - - params := url.Values{} - params.Add("$alt", "json;enum-encoding=int") - if req.GetProjectId() != "" { - params.Add("projectId", fmt.Sprintf("%v", req.GetProjectId())) - } - if req.GetZone() != "" { - params.Add("zone", fmt.Sprintf("%v", req.GetZone())) - } - - baseUrl.RawQuery = params.Encode() - - // Build HTTP headers from client and context metadata. - hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v&%s=%v&%s=%v", "parent", url.QueryEscape(req.GetParent()), "project_id", url.QueryEscape(req.GetProjectId()), "zone", url.QueryEscape(req.GetZone()))} - - hds = append(c.xGoogHeaders, hds...) - hds = append(hds, "Content-Type", "application/json") - headers := gax.BuildHeaders(ctx, hds...) - if gax.IsFeatureEnabled("METRICS") || gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "rpc_method", "google.container.v1.ClusterManager/ListClusters") - ctx = callctx.WithTelemetryContext(ctx, "url_template", "/v1/{parent=projects/*/locations/*}/clusters") - } - opts = append((*c.CallOptions).ListClusters[0:len((*c.CallOptions).ListClusters):len((*c.CallOptions).ListClusters)], opts...) - unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} - resp := &containerpb.ListClustersResponse{} - e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - if settings.Path != "" { - baseUrl.Path = settings.Path - } - httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) - if err != nil { - return err - } - httpReq = httpReq.WithContext(ctx) - httpReq.Header = headers - - buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListClusters") - if err != nil { - return err - } - - if err := unm.Unmarshal(buf, resp); err != nil { - return err - } - - return nil - }, opts...) - if e != nil { - return nil, e - } - return resp, nil -} - -// GetCluster gets the details of a specific cluster. -func (c *clusterManagerRESTClient) GetCluster(ctx context.Context, req *containerpb.GetClusterRequest, opts ...gax.CallOption) (*containerpb.Cluster, error) { - baseUrl, err := url.Parse(c.endpoint) - if err != nil { - return nil, err - } - baseUrl.Path += fmt.Sprintf("/v1/%v", req.GetName()) - - params := url.Values{} - params.Add("$alt", "json;enum-encoding=int") - if req.GetClusterId() != "" { - params.Add("clusterId", fmt.Sprintf("%v", req.GetClusterId())) - } - if req.GetProjectId() != "" { - params.Add("projectId", fmt.Sprintf("%v", req.GetProjectId())) - } - if req.GetZone() != "" { - params.Add("zone", fmt.Sprintf("%v", req.GetZone())) - } - - baseUrl.RawQuery = params.Encode() - - // Build HTTP headers from client and context metadata. - hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v&%s=%v&%s=%v&%s=%v", "name", url.QueryEscape(req.GetName()), "project_id", url.QueryEscape(req.GetProjectId()), "zone", url.QueryEscape(req.GetZone()), "cluster_id", url.QueryEscape(req.GetClusterId()))} - - hds = append(c.xGoogHeaders, hds...) - hds = append(hds, "Content-Type", "application/json") - headers := gax.BuildHeaders(ctx, hds...) - if gax.IsFeatureEnabled("METRICS") || gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "rpc_method", "google.container.v1.ClusterManager/GetCluster") - ctx = callctx.WithTelemetryContext(ctx, "url_template", "/v1/{name=projects/*/locations/*/clusters/*}") - } - opts = append((*c.CallOptions).GetCluster[0:len((*c.CallOptions).GetCluster):len((*c.CallOptions).GetCluster)], opts...) - unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} - resp := &containerpb.Cluster{} - e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - if settings.Path != "" { - baseUrl.Path = settings.Path - } - httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) - if err != nil { - return err - } - httpReq = httpReq.WithContext(ctx) - httpReq.Header = headers - - buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetCluster") - if err != nil { - return err - } - - if err := unm.Unmarshal(buf, resp); err != nil { - return err - } - - return nil - }, opts...) - if e != nil { - return nil, e - } - return resp, nil -} - -// CreateCluster creates a cluster, consisting of the specified number and type of Google -// Compute Engine instances. -// -// By default, the cluster is created in the project’s -// default -// network (at https://cloud.google.com/compute/docs/networks-and-firewalls#networks). -// -// One firewall is added for the cluster. After cluster creation, -// the kubelet creates routes for each node to allow the containers -// on that node to communicate with all other instances in the -// cluster. -// -// Finally, an entry is added to the project’s global metadata indicating -// which CIDR range the cluster is using. -func (c *clusterManagerRESTClient) CreateCluster(ctx context.Context, req *containerpb.CreateClusterRequest, opts ...gax.CallOption) (*containerpb.Operation, error) { - m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} - jsonReq, err := m.Marshal(req) - if err != nil { - return nil, err - } - - baseUrl, err := url.Parse(c.endpoint) - if err != nil { - return nil, err - } - baseUrl.Path += fmt.Sprintf("/v1/%v/clusters", req.GetParent()) - - params := url.Values{} - params.Add("$alt", "json;enum-encoding=int") - - baseUrl.RawQuery = params.Encode() - - // Build HTTP headers from client and context metadata. - hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v&%s=%v&%s=%v", "parent", url.QueryEscape(req.GetParent()), "project_id", url.QueryEscape(req.GetProjectId()), "zone", url.QueryEscape(req.GetZone()))} - - hds = append(c.xGoogHeaders, hds...) - hds = append(hds, "Content-Type", "application/json") - headers := gax.BuildHeaders(ctx, hds...) - if gax.IsFeatureEnabled("METRICS") || gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "rpc_method", "google.container.v1.ClusterManager/CreateCluster") - ctx = callctx.WithTelemetryContext(ctx, "url_template", "/v1/{parent=projects/*/locations/*}/clusters") - } - opts = append((*c.CallOptions).CreateCluster[0:len((*c.CallOptions).CreateCluster):len((*c.CallOptions).CreateCluster)], opts...) - unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} - resp := &containerpb.Operation{} - e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - if settings.Path != "" { - baseUrl.Path = settings.Path - } - httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) - if err != nil { - return err - } - httpReq = httpReq.WithContext(ctx) - httpReq.Header = headers - - buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateCluster") - if err != nil { - return err - } - - if err := unm.Unmarshal(buf, resp); err != nil { - return err - } - - return nil - }, opts...) - if e != nil { - return nil, e - } - return resp, nil -} - -// UpdateCluster updates the settings of a specific cluster. -func (c *clusterManagerRESTClient) UpdateCluster(ctx context.Context, req *containerpb.UpdateClusterRequest, opts ...gax.CallOption) (*containerpb.Operation, error) { - m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} - jsonReq, err := m.Marshal(req) - if err != nil { - return nil, err - } - - baseUrl, err := url.Parse(c.endpoint) - if err != nil { - return nil, err - } - baseUrl.Path += fmt.Sprintf("/v1/%v", req.GetName()) - - params := url.Values{} - params.Add("$alt", "json;enum-encoding=int") - - baseUrl.RawQuery = params.Encode() - - // Build HTTP headers from client and context metadata. - hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v&%s=%v&%s=%v&%s=%v", "name", url.QueryEscape(req.GetName()), "project_id", url.QueryEscape(req.GetProjectId()), "zone", url.QueryEscape(req.GetZone()), "cluster_id", url.QueryEscape(req.GetClusterId()))} - - hds = append(c.xGoogHeaders, hds...) - hds = append(hds, "Content-Type", "application/json") - headers := gax.BuildHeaders(ctx, hds...) - if gax.IsFeatureEnabled("METRICS") || gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "rpc_method", "google.container.v1.ClusterManager/UpdateCluster") - ctx = callctx.WithTelemetryContext(ctx, "url_template", "/v1/{name=projects/*/locations/*/clusters/*}") - } - opts = append((*c.CallOptions).UpdateCluster[0:len((*c.CallOptions).UpdateCluster):len((*c.CallOptions).UpdateCluster)], opts...) - unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} - resp := &containerpb.Operation{} - e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - if settings.Path != "" { - baseUrl.Path = settings.Path - } - httpReq, err := http.NewRequest("PUT", baseUrl.String(), bytes.NewReader(jsonReq)) - if err != nil { - return err - } - httpReq = httpReq.WithContext(ctx) - httpReq.Header = headers - - buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateCluster") - if err != nil { - return err - } - - if err := unm.Unmarshal(buf, resp); err != nil { - return err - } - - return nil - }, opts...) - if e != nil { - return nil, e - } - return resp, nil -} - -// UpdateNodePool updates the version and/or image type for the specified node pool. -func (c *clusterManagerRESTClient) UpdateNodePool(ctx context.Context, req *containerpb.UpdateNodePoolRequest, opts ...gax.CallOption) (*containerpb.Operation, error) { - m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} - jsonReq, err := m.Marshal(req) - if err != nil { - return nil, err - } - - baseUrl, err := url.Parse(c.endpoint) - if err != nil { - return nil, err - } - baseUrl.Path += fmt.Sprintf("/v1/%v", req.GetName()) - - params := url.Values{} - params.Add("$alt", "json;enum-encoding=int") - - baseUrl.RawQuery = params.Encode() - - // Build HTTP headers from client and context metadata. - hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v&%s=%v&%s=%v&%s=%v&%s=%v", "name", url.QueryEscape(req.GetName()), "project_id", url.QueryEscape(req.GetProjectId()), "zone", url.QueryEscape(req.GetZone()), "cluster_id", url.QueryEscape(req.GetClusterId()), "node_pool_id", url.QueryEscape(req.GetNodePoolId()))} - - hds = append(c.xGoogHeaders, hds...) - hds = append(hds, "Content-Type", "application/json") - headers := gax.BuildHeaders(ctx, hds...) - if gax.IsFeatureEnabled("METRICS") || gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "rpc_method", "google.container.v1.ClusterManager/UpdateNodePool") - ctx = callctx.WithTelemetryContext(ctx, "url_template", "/v1/{name=projects/*/locations/*/clusters/*/nodePools/*}") - } - opts = append((*c.CallOptions).UpdateNodePool[0:len((*c.CallOptions).UpdateNodePool):len((*c.CallOptions).UpdateNodePool)], opts...) - unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} - resp := &containerpb.Operation{} - e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - if settings.Path != "" { - baseUrl.Path = settings.Path - } - httpReq, err := http.NewRequest("PUT", baseUrl.String(), bytes.NewReader(jsonReq)) - if err != nil { - return err - } - httpReq = httpReq.WithContext(ctx) - httpReq.Header = headers - - buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateNodePool") - if err != nil { - return err - } - - if err := unm.Unmarshal(buf, resp); err != nil { - return err - } - - return nil - }, opts...) - if e != nil { - return nil, e - } - return resp, nil -} - -// SetNodePoolAutoscaling sets the autoscaling settings for the specified node pool. -func (c *clusterManagerRESTClient) SetNodePoolAutoscaling(ctx context.Context, req *containerpb.SetNodePoolAutoscalingRequest, opts ...gax.CallOption) (*containerpb.Operation, error) { - m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} - jsonReq, err := m.Marshal(req) - if err != nil { - return nil, err - } - - baseUrl, err := url.Parse(c.endpoint) - if err != nil { - return nil, err - } - baseUrl.Path += fmt.Sprintf("/v1/%v:setAutoscaling", req.GetName()) - - params := url.Values{} - params.Add("$alt", "json;enum-encoding=int") - - baseUrl.RawQuery = params.Encode() - - // Build HTTP headers from client and context metadata. - hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v&%s=%v&%s=%v&%s=%v&%s=%v", "name", url.QueryEscape(req.GetName()), "project_id", url.QueryEscape(req.GetProjectId()), "zone", url.QueryEscape(req.GetZone()), "cluster_id", url.QueryEscape(req.GetClusterId()), "node_pool_id", url.QueryEscape(req.GetNodePoolId()))} - - hds = append(c.xGoogHeaders, hds...) - hds = append(hds, "Content-Type", "application/json") - headers := gax.BuildHeaders(ctx, hds...) - if gax.IsFeatureEnabled("METRICS") || gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "rpc_method", "google.container.v1.ClusterManager/SetNodePoolAutoscaling") - ctx = callctx.WithTelemetryContext(ctx, "url_template", "/v1/{name=projects/*/locations/*/clusters/*/nodePools/*}:setAutoscaling") - } - opts = append((*c.CallOptions).SetNodePoolAutoscaling[0:len((*c.CallOptions).SetNodePoolAutoscaling):len((*c.CallOptions).SetNodePoolAutoscaling)], opts...) - unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} - resp := &containerpb.Operation{} - e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - if settings.Path != "" { - baseUrl.Path = settings.Path - } - httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) - if err != nil { - return err - } - httpReq = httpReq.WithContext(ctx) - httpReq.Header = headers - - buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetNodePoolAutoscaling") - if err != nil { - return err - } - - if err := unm.Unmarshal(buf, resp); err != nil { - return err - } - - return nil - }, opts...) - if e != nil { - return nil, e - } - return resp, nil -} - -// SetLoggingService sets the logging service for a specific cluster. -func (c *clusterManagerRESTClient) SetLoggingService(ctx context.Context, req *containerpb.SetLoggingServiceRequest, opts ...gax.CallOption) (*containerpb.Operation, error) { - m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} - jsonReq, err := m.Marshal(req) - if err != nil { - return nil, err - } - - baseUrl, err := url.Parse(c.endpoint) - if err != nil { - return nil, err - } - baseUrl.Path += fmt.Sprintf("/v1/%v:setLogging", req.GetName()) - - params := url.Values{} - params.Add("$alt", "json;enum-encoding=int") - - baseUrl.RawQuery = params.Encode() - - // Build HTTP headers from client and context metadata. - hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v&%s=%v&%s=%v&%s=%v", "name", url.QueryEscape(req.GetName()), "project_id", url.QueryEscape(req.GetProjectId()), "zone", url.QueryEscape(req.GetZone()), "cluster_id", url.QueryEscape(req.GetClusterId()))} - - hds = append(c.xGoogHeaders, hds...) - hds = append(hds, "Content-Type", "application/json") - headers := gax.BuildHeaders(ctx, hds...) - if gax.IsFeatureEnabled("METRICS") || gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "rpc_method", "google.container.v1.ClusterManager/SetLoggingService") - ctx = callctx.WithTelemetryContext(ctx, "url_template", "/v1/{name=projects/*/locations/*/clusters/*}:setLogging") - } - opts = append((*c.CallOptions).SetLoggingService[0:len((*c.CallOptions).SetLoggingService):len((*c.CallOptions).SetLoggingService)], opts...) - unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} - resp := &containerpb.Operation{} - e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - if settings.Path != "" { - baseUrl.Path = settings.Path - } - httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) - if err != nil { - return err - } - httpReq = httpReq.WithContext(ctx) - httpReq.Header = headers - - buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetLoggingService") - if err != nil { - return err - } - - if err := unm.Unmarshal(buf, resp); err != nil { - return err - } - - return nil - }, opts...) - if e != nil { - return nil, e - } - return resp, nil -} - -// SetMonitoringService sets the monitoring service for a specific cluster. -func (c *clusterManagerRESTClient) SetMonitoringService(ctx context.Context, req *containerpb.SetMonitoringServiceRequest, opts ...gax.CallOption) (*containerpb.Operation, error) { - m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} - jsonReq, err := m.Marshal(req) - if err != nil { - return nil, err - } - - baseUrl, err := url.Parse(c.endpoint) - if err != nil { - return nil, err - } - baseUrl.Path += fmt.Sprintf("/v1/%v:setMonitoring", req.GetName()) - - params := url.Values{} - params.Add("$alt", "json;enum-encoding=int") - - baseUrl.RawQuery = params.Encode() - - // Build HTTP headers from client and context metadata. - hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v&%s=%v&%s=%v&%s=%v", "name", url.QueryEscape(req.GetName()), "project_id", url.QueryEscape(req.GetProjectId()), "zone", url.QueryEscape(req.GetZone()), "cluster_id", url.QueryEscape(req.GetClusterId()))} - - hds = append(c.xGoogHeaders, hds...) - hds = append(hds, "Content-Type", "application/json") - headers := gax.BuildHeaders(ctx, hds...) - if gax.IsFeatureEnabled("METRICS") || gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "rpc_method", "google.container.v1.ClusterManager/SetMonitoringService") - ctx = callctx.WithTelemetryContext(ctx, "url_template", "/v1/{name=projects/*/locations/*/clusters/*}:setMonitoring") - } - opts = append((*c.CallOptions).SetMonitoringService[0:len((*c.CallOptions).SetMonitoringService):len((*c.CallOptions).SetMonitoringService)], opts...) - unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} - resp := &containerpb.Operation{} - e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - if settings.Path != "" { - baseUrl.Path = settings.Path - } - httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) - if err != nil { - return err - } - httpReq = httpReq.WithContext(ctx) - httpReq.Header = headers - - buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetMonitoringService") - if err != nil { - return err - } - - if err := unm.Unmarshal(buf, resp); err != nil { - return err - } - - return nil - }, opts...) - if e != nil { - return nil, e - } - return resp, nil -} - -// SetAddonsConfig sets the addons for a specific cluster. -func (c *clusterManagerRESTClient) SetAddonsConfig(ctx context.Context, req *containerpb.SetAddonsConfigRequest, opts ...gax.CallOption) (*containerpb.Operation, error) { - m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} - jsonReq, err := m.Marshal(req) - if err != nil { - return nil, err - } - - baseUrl, err := url.Parse(c.endpoint) - if err != nil { - return nil, err - } - baseUrl.Path += fmt.Sprintf("/v1/%v:setAddons", req.GetName()) - - params := url.Values{} - params.Add("$alt", "json;enum-encoding=int") - - baseUrl.RawQuery = params.Encode() - - // Build HTTP headers from client and context metadata. - hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v&%s=%v&%s=%v&%s=%v", "name", url.QueryEscape(req.GetName()), "project_id", url.QueryEscape(req.GetProjectId()), "zone", url.QueryEscape(req.GetZone()), "cluster_id", url.QueryEscape(req.GetClusterId()))} - - hds = append(c.xGoogHeaders, hds...) - hds = append(hds, "Content-Type", "application/json") - headers := gax.BuildHeaders(ctx, hds...) - if gax.IsFeatureEnabled("METRICS") || gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "rpc_method", "google.container.v1.ClusterManager/SetAddonsConfig") - ctx = callctx.WithTelemetryContext(ctx, "url_template", "/v1/{name=projects/*/locations/*/clusters/*}:setAddons") - } - opts = append((*c.CallOptions).SetAddonsConfig[0:len((*c.CallOptions).SetAddonsConfig):len((*c.CallOptions).SetAddonsConfig)], opts...) - unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} - resp := &containerpb.Operation{} - e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - if settings.Path != "" { - baseUrl.Path = settings.Path - } - httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) - if err != nil { - return err - } - httpReq = httpReq.WithContext(ctx) - httpReq.Header = headers - - buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetAddonsConfig") - if err != nil { - return err - } - - if err := unm.Unmarshal(buf, resp); err != nil { - return err - } - - return nil - }, opts...) - if e != nil { - return nil, e - } - return resp, nil -} - -// SetLocations sets the locations for a specific cluster. -// Deprecated. Use -// projects.locations.clusters.update (at https://cloud.google.com/kubernetes-engine/docs/reference/rest/v1/projects.locations.clusters/update) -// instead. -// -// Deprecated: SetLocations may be removed in a future version. -func (c *clusterManagerRESTClient) SetLocations(ctx context.Context, req *containerpb.SetLocationsRequest, opts ...gax.CallOption) (*containerpb.Operation, error) { - m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} - jsonReq, err := m.Marshal(req) - if err != nil { - return nil, err - } - - baseUrl, err := url.Parse(c.endpoint) - if err != nil { - return nil, err - } - baseUrl.Path += fmt.Sprintf("/v1/%v:setLocations", req.GetName()) - - params := url.Values{} - params.Add("$alt", "json;enum-encoding=int") - - baseUrl.RawQuery = params.Encode() - - // Build HTTP headers from client and context metadata. - hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v&%s=%v&%s=%v&%s=%v", "name", url.QueryEscape(req.GetName()), "project_id", url.QueryEscape(req.GetProjectId()), "zone", url.QueryEscape(req.GetZone()), "cluster_id", url.QueryEscape(req.GetClusterId()))} - - hds = append(c.xGoogHeaders, hds...) - hds = append(hds, "Content-Type", "application/json") - headers := gax.BuildHeaders(ctx, hds...) - if gax.IsFeatureEnabled("METRICS") || gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "rpc_method", "google.container.v1.ClusterManager/SetLocations") - ctx = callctx.WithTelemetryContext(ctx, "url_template", "/v1/{name=projects/*/locations/*/clusters/*}:setLocations") - } - opts = append((*c.CallOptions).SetLocations[0:len((*c.CallOptions).SetLocations):len((*c.CallOptions).SetLocations)], opts...) - unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} - resp := &containerpb.Operation{} - e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - if settings.Path != "" { - baseUrl.Path = settings.Path - } - httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) - if err != nil { - return err - } - httpReq = httpReq.WithContext(ctx) - httpReq.Header = headers - - buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetLocations") - if err != nil { - return err - } - - if err := unm.Unmarshal(buf, resp); err != nil { - return err - } - - return nil - }, opts...) - if e != nil { - return nil, e - } - return resp, nil -} - -// UpdateMaster updates the master for a specific cluster. -func (c *clusterManagerRESTClient) UpdateMaster(ctx context.Context, req *containerpb.UpdateMasterRequest, opts ...gax.CallOption) (*containerpb.Operation, error) { - m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} - jsonReq, err := m.Marshal(req) - if err != nil { - return nil, err - } - - baseUrl, err := url.Parse(c.endpoint) - if err != nil { - return nil, err - } - baseUrl.Path += fmt.Sprintf("/v1/%v:updateMaster", req.GetName()) - - params := url.Values{} - params.Add("$alt", "json;enum-encoding=int") - - baseUrl.RawQuery = params.Encode() - - // Build HTTP headers from client and context metadata. - hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v&%s=%v&%s=%v&%s=%v", "name", url.QueryEscape(req.GetName()), "project_id", url.QueryEscape(req.GetProjectId()), "zone", url.QueryEscape(req.GetZone()), "cluster_id", url.QueryEscape(req.GetClusterId()))} - - hds = append(c.xGoogHeaders, hds...) - hds = append(hds, "Content-Type", "application/json") - headers := gax.BuildHeaders(ctx, hds...) - if gax.IsFeatureEnabled("METRICS") || gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "rpc_method", "google.container.v1.ClusterManager/UpdateMaster") - ctx = callctx.WithTelemetryContext(ctx, "url_template", "/v1/{name=projects/*/locations/*/clusters/*}:updateMaster") - } - opts = append((*c.CallOptions).UpdateMaster[0:len((*c.CallOptions).UpdateMaster):len((*c.CallOptions).UpdateMaster)], opts...) - unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} - resp := &containerpb.Operation{} - e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - if settings.Path != "" { - baseUrl.Path = settings.Path - } - httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) - if err != nil { - return err - } - httpReq = httpReq.WithContext(ctx) - httpReq.Header = headers - - buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateMaster") - if err != nil { - return err - } - - if err := unm.Unmarshal(buf, resp); err != nil { - return err - } - - return nil - }, opts...) - if e != nil { - return nil, e - } - return resp, nil -} - -// SetMasterAuth sets master auth materials. Currently supports changing the admin password -// or a specific cluster, either via password generation or explicitly setting -// the password. -func (c *clusterManagerRESTClient) SetMasterAuth(ctx context.Context, req *containerpb.SetMasterAuthRequest, opts ...gax.CallOption) (*containerpb.Operation, error) { - m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} - jsonReq, err := m.Marshal(req) - if err != nil { - return nil, err - } - - baseUrl, err := url.Parse(c.endpoint) - if err != nil { - return nil, err - } - baseUrl.Path += fmt.Sprintf("/v1/%v:setMasterAuth", req.GetName()) - - params := url.Values{} - params.Add("$alt", "json;enum-encoding=int") - - baseUrl.RawQuery = params.Encode() - - // Build HTTP headers from client and context metadata. - hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v&%s=%v&%s=%v&%s=%v", "name", url.QueryEscape(req.GetName()), "project_id", url.QueryEscape(req.GetProjectId()), "zone", url.QueryEscape(req.GetZone()), "cluster_id", url.QueryEscape(req.GetClusterId()))} - - hds = append(c.xGoogHeaders, hds...) - hds = append(hds, "Content-Type", "application/json") - headers := gax.BuildHeaders(ctx, hds...) - if gax.IsFeatureEnabled("METRICS") || gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "rpc_method", "google.container.v1.ClusterManager/SetMasterAuth") - ctx = callctx.WithTelemetryContext(ctx, "url_template", "/v1/{name=projects/*/locations/*/clusters/*}:setMasterAuth") - } - opts = append((*c.CallOptions).SetMasterAuth[0:len((*c.CallOptions).SetMasterAuth):len((*c.CallOptions).SetMasterAuth)], opts...) - unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} - resp := &containerpb.Operation{} - e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - if settings.Path != "" { - baseUrl.Path = settings.Path - } - httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) - if err != nil { - return err - } - httpReq = httpReq.WithContext(ctx) - httpReq.Header = headers - - buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetMasterAuth") - if err != nil { - return err - } - - if err := unm.Unmarshal(buf, resp); err != nil { - return err - } - - return nil - }, opts...) - if e != nil { - return nil, e - } - return resp, nil -} - -// DeleteCluster deletes the cluster, including the Kubernetes endpoint and all worker -// nodes. -// -// Firewalls and routes that were configured during cluster creation -// are also deleted. -// -// Other Google Compute Engine resources that might be in use by the cluster, -// such as load balancer resources, are not deleted if they weren’t present -// when the cluster was initially created. -func (c *clusterManagerRESTClient) DeleteCluster(ctx context.Context, req *containerpb.DeleteClusterRequest, opts ...gax.CallOption) (*containerpb.Operation, error) { - baseUrl, err := url.Parse(c.endpoint) - if err != nil { - return nil, err - } - baseUrl.Path += fmt.Sprintf("/v1/%v", req.GetName()) - - params := url.Values{} - params.Add("$alt", "json;enum-encoding=int") - if req.GetClusterId() != "" { - params.Add("clusterId", fmt.Sprintf("%v", req.GetClusterId())) - } - if req.GetProjectId() != "" { - params.Add("projectId", fmt.Sprintf("%v", req.GetProjectId())) - } - if req.GetZone() != "" { - params.Add("zone", fmt.Sprintf("%v", req.GetZone())) - } - - baseUrl.RawQuery = params.Encode() - - // Build HTTP headers from client and context metadata. - hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v&%s=%v&%s=%v&%s=%v", "name", url.QueryEscape(req.GetName()), "project_id", url.QueryEscape(req.GetProjectId()), "zone", url.QueryEscape(req.GetZone()), "cluster_id", url.QueryEscape(req.GetClusterId()))} - - hds = append(c.xGoogHeaders, hds...) - hds = append(hds, "Content-Type", "application/json") - headers := gax.BuildHeaders(ctx, hds...) - if gax.IsFeatureEnabled("METRICS") || gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "rpc_method", "google.container.v1.ClusterManager/DeleteCluster") - ctx = callctx.WithTelemetryContext(ctx, "url_template", "/v1/{name=projects/*/locations/*/clusters/*}") - } - opts = append((*c.CallOptions).DeleteCluster[0:len((*c.CallOptions).DeleteCluster):len((*c.CallOptions).DeleteCluster)], opts...) - unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} - resp := &containerpb.Operation{} - e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - if settings.Path != "" { - baseUrl.Path = settings.Path - } - httpReq, err := http.NewRequest("DELETE", baseUrl.String(), nil) - if err != nil { - return err - } - httpReq = httpReq.WithContext(ctx) - httpReq.Header = headers - - buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteCluster") - if err != nil { - return err - } - - if err := unm.Unmarshal(buf, resp); err != nil { - return err - } - - return nil - }, opts...) - if e != nil { - return nil, e - } - return resp, nil -} - -// ListOperations lists all operations in a project in a specific zone or all zones. -func (c *clusterManagerRESTClient) ListOperations(ctx context.Context, req *containerpb.ListOperationsRequest, opts ...gax.CallOption) (*containerpb.ListOperationsResponse, error) { - baseUrl, err := url.Parse(c.endpoint) - if err != nil { - return nil, err - } - baseUrl.Path += fmt.Sprintf("/v1/%v/operations", req.GetParent()) - - params := url.Values{} - params.Add("$alt", "json;enum-encoding=int") - if req.GetProjectId() != "" { - params.Add("projectId", fmt.Sprintf("%v", req.GetProjectId())) - } - if req.GetZone() != "" { - params.Add("zone", fmt.Sprintf("%v", req.GetZone())) - } - - baseUrl.RawQuery = params.Encode() - - // Build HTTP headers from client and context metadata. - hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v&%s=%v&%s=%v", "parent", url.QueryEscape(req.GetParent()), "project_id", url.QueryEscape(req.GetProjectId()), "zone", url.QueryEscape(req.GetZone()))} - - hds = append(c.xGoogHeaders, hds...) - hds = append(hds, "Content-Type", "application/json") - headers := gax.BuildHeaders(ctx, hds...) - if gax.IsFeatureEnabled("METRICS") || gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "rpc_method", "google.container.v1.ClusterManager/ListOperations") - ctx = callctx.WithTelemetryContext(ctx, "url_template", "/v1/{parent=projects/*/locations/*}/operations") - } - opts = append((*c.CallOptions).ListOperations[0:len((*c.CallOptions).ListOperations):len((*c.CallOptions).ListOperations)], opts...) - unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} - resp := &containerpb.ListOperationsResponse{} - e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - if settings.Path != "" { - baseUrl.Path = settings.Path - } - httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) - if err != nil { - return err - } - httpReq = httpReq.WithContext(ctx) - httpReq.Header = headers - - buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") - if err != nil { - return err - } - - if err := unm.Unmarshal(buf, resp); err != nil { - return err - } - - return nil - }, opts...) - if e != nil { - return nil, e - } - return resp, nil -} - -// GetOperation gets the specified operation. -func (c *clusterManagerRESTClient) GetOperation(ctx context.Context, req *containerpb.GetOperationRequest, opts ...gax.CallOption) (*containerpb.Operation, error) { - baseUrl, err := url.Parse(c.endpoint) - if err != nil { - return nil, err - } - baseUrl.Path += fmt.Sprintf("/v1/%v", req.GetName()) - - params := url.Values{} - params.Add("$alt", "json;enum-encoding=int") - if req.GetOperationId() != "" { - params.Add("operationId", fmt.Sprintf("%v", req.GetOperationId())) - } - if req.GetProjectId() != "" { - params.Add("projectId", fmt.Sprintf("%v", req.GetProjectId())) - } - if req.GetZone() != "" { - params.Add("zone", fmt.Sprintf("%v", req.GetZone())) - } - - baseUrl.RawQuery = params.Encode() - - // Build HTTP headers from client and context metadata. - hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v&%s=%v&%s=%v&%s=%v", "name", url.QueryEscape(req.GetName()), "project_id", url.QueryEscape(req.GetProjectId()), "zone", url.QueryEscape(req.GetZone()), "operation_id", url.QueryEscape(req.GetOperationId()))} - - hds = append(c.xGoogHeaders, hds...) - hds = append(hds, "Content-Type", "application/json") - headers := gax.BuildHeaders(ctx, hds...) - if gax.IsFeatureEnabled("METRICS") || gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "rpc_method", "google.container.v1.ClusterManager/GetOperation") - ctx = callctx.WithTelemetryContext(ctx, "url_template", "/v1/{name=projects/*/locations/*/operations/*}") - } - opts = append((*c.CallOptions).GetOperation[0:len((*c.CallOptions).GetOperation):len((*c.CallOptions).GetOperation)], opts...) - unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} - resp := &containerpb.Operation{} - e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - if settings.Path != "" { - baseUrl.Path = settings.Path - } - httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) - if err != nil { - return err - } - httpReq = httpReq.WithContext(ctx) - httpReq.Header = headers - - buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") - if err != nil { - return err - } - - if err := unm.Unmarshal(buf, resp); err != nil { - return err - } - - return nil - }, opts...) - if e != nil { - return nil, e - } - return resp, nil -} - -// CancelOperation cancels the specified operation. -func (c *clusterManagerRESTClient) CancelOperation(ctx context.Context, req *containerpb.CancelOperationRequest, opts ...gax.CallOption) error { - m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} - jsonReq, err := m.Marshal(req) - if err != nil { - return err - } - - baseUrl, err := url.Parse(c.endpoint) - if err != nil { - return err - } - baseUrl.Path += fmt.Sprintf("/v1/%v:cancel", req.GetName()) - - params := url.Values{} - params.Add("$alt", "json;enum-encoding=int") - - baseUrl.RawQuery = params.Encode() - - // Build HTTP headers from client and context metadata. - hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v&%s=%v&%s=%v&%s=%v", "name", url.QueryEscape(req.GetName()), "project_id", url.QueryEscape(req.GetProjectId()), "zone", url.QueryEscape(req.GetZone()), "operation_id", url.QueryEscape(req.GetOperationId()))} - - hds = append(c.xGoogHeaders, hds...) - hds = append(hds, "Content-Type", "application/json") - headers := gax.BuildHeaders(ctx, hds...) - if gax.IsFeatureEnabled("METRICS") || gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "rpc_method", "google.container.v1.ClusterManager/CancelOperation") - ctx = callctx.WithTelemetryContext(ctx, "url_template", "/v1/{name=projects/*/locations/*/operations/*}:cancel") - } - return gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - if settings.Path != "" { - baseUrl.Path = settings.Path - } - httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) - if err != nil { - return err - } - httpReq = httpReq.WithContext(ctx) - httpReq.Header = headers - - _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CancelOperation") - return err - }, opts...) -} - -// GetServerConfig returns configuration info about the Google Kubernetes Engine service. -func (c *clusterManagerRESTClient) GetServerConfig(ctx context.Context, req *containerpb.GetServerConfigRequest, opts ...gax.CallOption) (*containerpb.ServerConfig, error) { - baseUrl, err := url.Parse(c.endpoint) - if err != nil { - return nil, err - } - baseUrl.Path += fmt.Sprintf("/v1/%v/serverConfig", req.GetName()) - - params := url.Values{} - params.Add("$alt", "json;enum-encoding=int") - if req.GetProjectId() != "" { - params.Add("projectId", fmt.Sprintf("%v", req.GetProjectId())) - } - if req.GetZone() != "" { - params.Add("zone", fmt.Sprintf("%v", req.GetZone())) - } - - baseUrl.RawQuery = params.Encode() - - // Build HTTP headers from client and context metadata. - hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v&%s=%v&%s=%v", "name", url.QueryEscape(req.GetName()), "project_id", url.QueryEscape(req.GetProjectId()), "zone", url.QueryEscape(req.GetZone()))} - - hds = append(c.xGoogHeaders, hds...) - hds = append(hds, "Content-Type", "application/json") - headers := gax.BuildHeaders(ctx, hds...) - if gax.IsFeatureEnabled("METRICS") || gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "rpc_method", "google.container.v1.ClusterManager/GetServerConfig") - ctx = callctx.WithTelemetryContext(ctx, "url_template", "/v1/{name=projects/*/locations/*}/serverConfig") - } - opts = append((*c.CallOptions).GetServerConfig[0:len((*c.CallOptions).GetServerConfig):len((*c.CallOptions).GetServerConfig)], opts...) - unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} - resp := &containerpb.ServerConfig{} - e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - if settings.Path != "" { - baseUrl.Path = settings.Path - } - httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) - if err != nil { - return err - } - httpReq = httpReq.WithContext(ctx) - httpReq.Header = headers - - buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetServerConfig") - if err != nil { - return err - } - - if err := unm.Unmarshal(buf, resp); err != nil { - return err - } - - return nil - }, opts...) - if e != nil { - return nil, e - } - return resp, nil -} - -// GetJSONWebKeys gets the public component of the cluster signing keys in -// JSON Web Key format. -func (c *clusterManagerRESTClient) GetJSONWebKeys(ctx context.Context, req *containerpb.GetJSONWebKeysRequest, opts ...gax.CallOption) (*containerpb.GetJSONWebKeysResponse, error) { - baseUrl, err := url.Parse(c.endpoint) - if err != nil { - return nil, err - } - baseUrl.Path += fmt.Sprintf("/v1/%v/jwks", req.GetParent()) - - params := url.Values{} - params.Add("$alt", "json;enum-encoding=int") - - baseUrl.RawQuery = params.Encode() - - // Build HTTP headers from client and context metadata. - hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))} - - hds = append(c.xGoogHeaders, hds...) - hds = append(hds, "Content-Type", "application/json") - headers := gax.BuildHeaders(ctx, hds...) - if gax.IsFeatureEnabled("METRICS") || gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "rpc_method", "google.container.v1.ClusterManager/GetJSONWebKeys") - ctx = callctx.WithTelemetryContext(ctx, "url_template", "/v1/{parent=projects/*/locations/*/clusters/*}/jwks") - } - opts = append((*c.CallOptions).GetJSONWebKeys[0:len((*c.CallOptions).GetJSONWebKeys):len((*c.CallOptions).GetJSONWebKeys)], opts...) - unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} - resp := &containerpb.GetJSONWebKeysResponse{} - e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - if settings.Path != "" { - baseUrl.Path = settings.Path - } - httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) - if err != nil { - return err - } - httpReq = httpReq.WithContext(ctx) - httpReq.Header = headers - - buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetJSONWebKeys") - if err != nil { - return err - } - - if err := unm.Unmarshal(buf, resp); err != nil { - return err - } - - return nil - }, opts...) - if e != nil { - return nil, e - } - return resp, nil -} - -// ListNodePools lists the node pools for a cluster. -func (c *clusterManagerRESTClient) ListNodePools(ctx context.Context, req *containerpb.ListNodePoolsRequest, opts ...gax.CallOption) (*containerpb.ListNodePoolsResponse, error) { - baseUrl, err := url.Parse(c.endpoint) - if err != nil { - return nil, err - } - baseUrl.Path += fmt.Sprintf("/v1/%v/nodePools", req.GetParent()) - - params := url.Values{} - params.Add("$alt", "json;enum-encoding=int") - if req.GetClusterId() != "" { - params.Add("clusterId", fmt.Sprintf("%v", req.GetClusterId())) - } - if req.GetProjectId() != "" { - params.Add("projectId", fmt.Sprintf("%v", req.GetProjectId())) - } - if req.GetZone() != "" { - params.Add("zone", fmt.Sprintf("%v", req.GetZone())) - } - - baseUrl.RawQuery = params.Encode() - - // Build HTTP headers from client and context metadata. - hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v&%s=%v&%s=%v&%s=%v", "parent", url.QueryEscape(req.GetParent()), "project_id", url.QueryEscape(req.GetProjectId()), "zone", url.QueryEscape(req.GetZone()), "cluster_id", url.QueryEscape(req.GetClusterId()))} - - hds = append(c.xGoogHeaders, hds...) - hds = append(hds, "Content-Type", "application/json") - headers := gax.BuildHeaders(ctx, hds...) - if gax.IsFeatureEnabled("METRICS") || gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "rpc_method", "google.container.v1.ClusterManager/ListNodePools") - ctx = callctx.WithTelemetryContext(ctx, "url_template", "/v1/{parent=projects/*/locations/*/clusters/*}/nodePools") - } - opts = append((*c.CallOptions).ListNodePools[0:len((*c.CallOptions).ListNodePools):len((*c.CallOptions).ListNodePools)], opts...) - unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} - resp := &containerpb.ListNodePoolsResponse{} - e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - if settings.Path != "" { - baseUrl.Path = settings.Path - } - httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) - if err != nil { - return err - } - httpReq = httpReq.WithContext(ctx) - httpReq.Header = headers - - buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListNodePools") - if err != nil { - return err - } - - if err := unm.Unmarshal(buf, resp); err != nil { - return err - } - - return nil - }, opts...) - if e != nil { - return nil, e - } - return resp, nil -} - -// GetNodePool retrieves the requested node pool. -func (c *clusterManagerRESTClient) GetNodePool(ctx context.Context, req *containerpb.GetNodePoolRequest, opts ...gax.CallOption) (*containerpb.NodePool, error) { - baseUrl, err := url.Parse(c.endpoint) - if err != nil { - return nil, err - } - baseUrl.Path += fmt.Sprintf("/v1/%v", req.GetName()) - - params := url.Values{} - params.Add("$alt", "json;enum-encoding=int") - if req.GetClusterId() != "" { - params.Add("clusterId", fmt.Sprintf("%v", req.GetClusterId())) - } - if req.GetNodePoolId() != "" { - params.Add("nodePoolId", fmt.Sprintf("%v", req.GetNodePoolId())) - } - if req.GetProjectId() != "" { - params.Add("projectId", fmt.Sprintf("%v", req.GetProjectId())) - } - if req.GetZone() != "" { - params.Add("zone", fmt.Sprintf("%v", req.GetZone())) - } - - baseUrl.RawQuery = params.Encode() - - // Build HTTP headers from client and context metadata. - hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v&%s=%v&%s=%v&%s=%v&%s=%v", "name", url.QueryEscape(req.GetName()), "project_id", url.QueryEscape(req.GetProjectId()), "zone", url.QueryEscape(req.GetZone()), "cluster_id", url.QueryEscape(req.GetClusterId()), "node_pool_id", url.QueryEscape(req.GetNodePoolId()))} - - hds = append(c.xGoogHeaders, hds...) - hds = append(hds, "Content-Type", "application/json") - headers := gax.BuildHeaders(ctx, hds...) - if gax.IsFeatureEnabled("METRICS") || gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "rpc_method", "google.container.v1.ClusterManager/GetNodePool") - ctx = callctx.WithTelemetryContext(ctx, "url_template", "/v1/{name=projects/*/locations/*/clusters/*/nodePools/*}") - } - opts = append((*c.CallOptions).GetNodePool[0:len((*c.CallOptions).GetNodePool):len((*c.CallOptions).GetNodePool)], opts...) - unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} - resp := &containerpb.NodePool{} - e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - if settings.Path != "" { - baseUrl.Path = settings.Path - } - httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) - if err != nil { - return err - } - httpReq = httpReq.WithContext(ctx) - httpReq.Header = headers - - buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetNodePool") - if err != nil { - return err - } - - if err := unm.Unmarshal(buf, resp); err != nil { - return err - } - - return nil - }, opts...) - if e != nil { - return nil, e - } - return resp, nil -} - -// CreateNodePool creates a node pool for a cluster. -func (c *clusterManagerRESTClient) CreateNodePool(ctx context.Context, req *containerpb.CreateNodePoolRequest, opts ...gax.CallOption) (*containerpb.Operation, error) { - m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} - jsonReq, err := m.Marshal(req) - if err != nil { - return nil, err - } - - baseUrl, err := url.Parse(c.endpoint) - if err != nil { - return nil, err - } - baseUrl.Path += fmt.Sprintf("/v1/%v/nodePools", req.GetParent()) - - params := url.Values{} - params.Add("$alt", "json;enum-encoding=int") - - baseUrl.RawQuery = params.Encode() - - // Build HTTP headers from client and context metadata. - hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v&%s=%v&%s=%v&%s=%v", "parent", url.QueryEscape(req.GetParent()), "project_id", url.QueryEscape(req.GetProjectId()), "zone", url.QueryEscape(req.GetZone()), "cluster_id", url.QueryEscape(req.GetClusterId()))} - - hds = append(c.xGoogHeaders, hds...) - hds = append(hds, "Content-Type", "application/json") - headers := gax.BuildHeaders(ctx, hds...) - if gax.IsFeatureEnabled("METRICS") || gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "rpc_method", "google.container.v1.ClusterManager/CreateNodePool") - ctx = callctx.WithTelemetryContext(ctx, "url_template", "/v1/{parent=projects/*/locations/*/clusters/*}/nodePools") - } - opts = append((*c.CallOptions).CreateNodePool[0:len((*c.CallOptions).CreateNodePool):len((*c.CallOptions).CreateNodePool)], opts...) - unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} - resp := &containerpb.Operation{} - e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - if settings.Path != "" { - baseUrl.Path = settings.Path - } - httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) - if err != nil { - return err - } - httpReq = httpReq.WithContext(ctx) - httpReq.Header = headers - - buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateNodePool") - if err != nil { - return err - } - - if err := unm.Unmarshal(buf, resp); err != nil { - return err - } - - return nil - }, opts...) - if e != nil { - return nil, e - } - return resp, nil -} - -// DeleteNodePool deletes a node pool from a cluster. -func (c *clusterManagerRESTClient) DeleteNodePool(ctx context.Context, req *containerpb.DeleteNodePoolRequest, opts ...gax.CallOption) (*containerpb.Operation, error) { - baseUrl, err := url.Parse(c.endpoint) - if err != nil { - return nil, err - } - baseUrl.Path += fmt.Sprintf("/v1/%v", req.GetName()) - - params := url.Values{} - params.Add("$alt", "json;enum-encoding=int") - if req.GetClusterId() != "" { - params.Add("clusterId", fmt.Sprintf("%v", req.GetClusterId())) - } - if req.GetNodePoolId() != "" { - params.Add("nodePoolId", fmt.Sprintf("%v", req.GetNodePoolId())) - } - if req.GetProjectId() != "" { - params.Add("projectId", fmt.Sprintf("%v", req.GetProjectId())) - } - if req.GetZone() != "" { - params.Add("zone", fmt.Sprintf("%v", req.GetZone())) - } - - baseUrl.RawQuery = params.Encode() - - // Build HTTP headers from client and context metadata. - hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v&%s=%v&%s=%v&%s=%v&%s=%v", "name", url.QueryEscape(req.GetName()), "project_id", url.QueryEscape(req.GetProjectId()), "zone", url.QueryEscape(req.GetZone()), "cluster_id", url.QueryEscape(req.GetClusterId()), "node_pool_id", url.QueryEscape(req.GetNodePoolId()))} - - hds = append(c.xGoogHeaders, hds...) - hds = append(hds, "Content-Type", "application/json") - headers := gax.BuildHeaders(ctx, hds...) - if gax.IsFeatureEnabled("METRICS") || gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "rpc_method", "google.container.v1.ClusterManager/DeleteNodePool") - ctx = callctx.WithTelemetryContext(ctx, "url_template", "/v1/{name=projects/*/locations/*/clusters/*/nodePools/*}") - } - opts = append((*c.CallOptions).DeleteNodePool[0:len((*c.CallOptions).DeleteNodePool):len((*c.CallOptions).DeleteNodePool)], opts...) - unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} - resp := &containerpb.Operation{} - e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - if settings.Path != "" { - baseUrl.Path = settings.Path - } - httpReq, err := http.NewRequest("DELETE", baseUrl.String(), nil) - if err != nil { - return err - } - httpReq = httpReq.WithContext(ctx) - httpReq.Header = headers - - buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteNodePool") - if err != nil { - return err - } - - if err := unm.Unmarshal(buf, resp); err != nil { - return err - } - - return nil - }, opts...) - if e != nil { - return nil, e - } - return resp, nil -} - -// CompleteNodePoolUpgrade completeNodePoolUpgrade will signal an on-going node pool upgrade to -// complete. -func (c *clusterManagerRESTClient) CompleteNodePoolUpgrade(ctx context.Context, req *containerpb.CompleteNodePoolUpgradeRequest, opts ...gax.CallOption) error { - m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} - jsonReq, err := m.Marshal(req) - if err != nil { - return err - } - - baseUrl, err := url.Parse(c.endpoint) - if err != nil { - return err - } - baseUrl.Path += fmt.Sprintf("/v1/%v:completeUpgrade", req.GetName()) - - params := url.Values{} - params.Add("$alt", "json;enum-encoding=int") - - baseUrl.RawQuery = params.Encode() - - // Build HTTP headers from client and context metadata. - hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))} - - hds = append(c.xGoogHeaders, hds...) - hds = append(hds, "Content-Type", "application/json") - headers := gax.BuildHeaders(ctx, hds...) - if gax.IsFeatureEnabled("METRICS") || gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "rpc_method", "google.container.v1.ClusterManager/CompleteNodePoolUpgrade") - ctx = callctx.WithTelemetryContext(ctx, "url_template", "/v1/{name=projects/*/locations/*/clusters/*/nodePools/*}:completeUpgrade") - } - return gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - if settings.Path != "" { - baseUrl.Path = settings.Path - } - httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) - if err != nil { - return err - } - httpReq = httpReq.WithContext(ctx) - httpReq.Header = headers - - _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CompleteNodePoolUpgrade") - return err - }, opts...) -} - -// RollbackNodePoolUpgrade rolls back a previously Aborted or Failed NodePool upgrade. -// This makes no changes if the last upgrade successfully completed. -func (c *clusterManagerRESTClient) RollbackNodePoolUpgrade(ctx context.Context, req *containerpb.RollbackNodePoolUpgradeRequest, opts ...gax.CallOption) (*containerpb.Operation, error) { - m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} - jsonReq, err := m.Marshal(req) - if err != nil { - return nil, err - } - - baseUrl, err := url.Parse(c.endpoint) - if err != nil { - return nil, err - } - baseUrl.Path += fmt.Sprintf("/v1/%v:rollback", req.GetName()) - - params := url.Values{} - params.Add("$alt", "json;enum-encoding=int") - - baseUrl.RawQuery = params.Encode() - - // Build HTTP headers from client and context metadata. - hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v&%s=%v&%s=%v&%s=%v&%s=%v", "name", url.QueryEscape(req.GetName()), "project_id", url.QueryEscape(req.GetProjectId()), "zone", url.QueryEscape(req.GetZone()), "cluster_id", url.QueryEscape(req.GetClusterId()), "node_pool_id", url.QueryEscape(req.GetNodePoolId()))} - - hds = append(c.xGoogHeaders, hds...) - hds = append(hds, "Content-Type", "application/json") - headers := gax.BuildHeaders(ctx, hds...) - if gax.IsFeatureEnabled("METRICS") || gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "rpc_method", "google.container.v1.ClusterManager/RollbackNodePoolUpgrade") - ctx = callctx.WithTelemetryContext(ctx, "url_template", "/v1/{name=projects/*/locations/*/clusters/*/nodePools/*}:rollback") - } - opts = append((*c.CallOptions).RollbackNodePoolUpgrade[0:len((*c.CallOptions).RollbackNodePoolUpgrade):len((*c.CallOptions).RollbackNodePoolUpgrade)], opts...) - unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} - resp := &containerpb.Operation{} - e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - if settings.Path != "" { - baseUrl.Path = settings.Path - } - httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) - if err != nil { - return err - } - httpReq = httpReq.WithContext(ctx) - httpReq.Header = headers - - buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "RollbackNodePoolUpgrade") - if err != nil { - return err - } - - if err := unm.Unmarshal(buf, resp); err != nil { - return err - } - - return nil - }, opts...) - if e != nil { - return nil, e - } - return resp, nil -} - -// SetNodePoolManagement sets the NodeManagement options for a node pool. -func (c *clusterManagerRESTClient) SetNodePoolManagement(ctx context.Context, req *containerpb.SetNodePoolManagementRequest, opts ...gax.CallOption) (*containerpb.Operation, error) { - m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} - jsonReq, err := m.Marshal(req) - if err != nil { - return nil, err - } - - baseUrl, err := url.Parse(c.endpoint) - if err != nil { - return nil, err - } - baseUrl.Path += fmt.Sprintf("/v1/%v:setManagement", req.GetName()) - - params := url.Values{} - params.Add("$alt", "json;enum-encoding=int") - - baseUrl.RawQuery = params.Encode() - - // Build HTTP headers from client and context metadata. - hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v&%s=%v&%s=%v&%s=%v&%s=%v", "name", url.QueryEscape(req.GetName()), "project_id", url.QueryEscape(req.GetProjectId()), "zone", url.QueryEscape(req.GetZone()), "cluster_id", url.QueryEscape(req.GetClusterId()), "node_pool_id", url.QueryEscape(req.GetNodePoolId()))} - - hds = append(c.xGoogHeaders, hds...) - hds = append(hds, "Content-Type", "application/json") - headers := gax.BuildHeaders(ctx, hds...) - if gax.IsFeatureEnabled("METRICS") || gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "rpc_method", "google.container.v1.ClusterManager/SetNodePoolManagement") - ctx = callctx.WithTelemetryContext(ctx, "url_template", "/v1/{name=projects/*/locations/*/clusters/*/nodePools/*}:setManagement") - } - opts = append((*c.CallOptions).SetNodePoolManagement[0:len((*c.CallOptions).SetNodePoolManagement):len((*c.CallOptions).SetNodePoolManagement)], opts...) - unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} - resp := &containerpb.Operation{} - e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - if settings.Path != "" { - baseUrl.Path = settings.Path - } - httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) - if err != nil { - return err - } - httpReq = httpReq.WithContext(ctx) - httpReq.Header = headers - - buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetNodePoolManagement") - if err != nil { - return err - } - - if err := unm.Unmarshal(buf, resp); err != nil { - return err - } - - return nil - }, opts...) - if e != nil { - return nil, e - } - return resp, nil -} - -// SetLabels sets labels on a cluster. -func (c *clusterManagerRESTClient) SetLabels(ctx context.Context, req *containerpb.SetLabelsRequest, opts ...gax.CallOption) (*containerpb.Operation, error) { - m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} - jsonReq, err := m.Marshal(req) - if err != nil { - return nil, err - } - - baseUrl, err := url.Parse(c.endpoint) - if err != nil { - return nil, err - } - baseUrl.Path += fmt.Sprintf("/v1/%v:setResourceLabels", req.GetName()) - - params := url.Values{} - params.Add("$alt", "json;enum-encoding=int") - - baseUrl.RawQuery = params.Encode() - - // Build HTTP headers from client and context metadata. - hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v&%s=%v&%s=%v&%s=%v", "name", url.QueryEscape(req.GetName()), "project_id", url.QueryEscape(req.GetProjectId()), "zone", url.QueryEscape(req.GetZone()), "cluster_id", url.QueryEscape(req.GetClusterId()))} - - hds = append(c.xGoogHeaders, hds...) - hds = append(hds, "Content-Type", "application/json") - headers := gax.BuildHeaders(ctx, hds...) - if gax.IsFeatureEnabled("METRICS") || gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "rpc_method", "google.container.v1.ClusterManager/SetLabels") - ctx = callctx.WithTelemetryContext(ctx, "url_template", "/v1/{name=projects/*/locations/*/clusters/*}:setResourceLabels") - } - opts = append((*c.CallOptions).SetLabels[0:len((*c.CallOptions).SetLabels):len((*c.CallOptions).SetLabels)], opts...) - unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} - resp := &containerpb.Operation{} - e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - if settings.Path != "" { - baseUrl.Path = settings.Path - } - httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) - if err != nil { - return err - } - httpReq = httpReq.WithContext(ctx) - httpReq.Header = headers - - buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetLabels") - if err != nil { - return err - } - - if err := unm.Unmarshal(buf, resp); err != nil { - return err - } - - return nil - }, opts...) - if e != nil { - return nil, e - } - return resp, nil -} - -// SetLegacyAbac enables or disables the ABAC authorization mechanism on a cluster. -func (c *clusterManagerRESTClient) SetLegacyAbac(ctx context.Context, req *containerpb.SetLegacyAbacRequest, opts ...gax.CallOption) (*containerpb.Operation, error) { - m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} - jsonReq, err := m.Marshal(req) - if err != nil { - return nil, err - } - - baseUrl, err := url.Parse(c.endpoint) - if err != nil { - return nil, err - } - baseUrl.Path += fmt.Sprintf("/v1/%v:setLegacyAbac", req.GetName()) - - params := url.Values{} - params.Add("$alt", "json;enum-encoding=int") - - baseUrl.RawQuery = params.Encode() - - // Build HTTP headers from client and context metadata. - hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v&%s=%v&%s=%v&%s=%v", "name", url.QueryEscape(req.GetName()), "project_id", url.QueryEscape(req.GetProjectId()), "zone", url.QueryEscape(req.GetZone()), "cluster_id", url.QueryEscape(req.GetClusterId()))} - - hds = append(c.xGoogHeaders, hds...) - hds = append(hds, "Content-Type", "application/json") - headers := gax.BuildHeaders(ctx, hds...) - if gax.IsFeatureEnabled("METRICS") || gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "rpc_method", "google.container.v1.ClusterManager/SetLegacyAbac") - ctx = callctx.WithTelemetryContext(ctx, "url_template", "/v1/{name=projects/*/locations/*/clusters/*}:setLegacyAbac") - } - opts = append((*c.CallOptions).SetLegacyAbac[0:len((*c.CallOptions).SetLegacyAbac):len((*c.CallOptions).SetLegacyAbac)], opts...) - unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} - resp := &containerpb.Operation{} - e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - if settings.Path != "" { - baseUrl.Path = settings.Path - } - httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) - if err != nil { - return err - } - httpReq = httpReq.WithContext(ctx) - httpReq.Header = headers - - buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetLegacyAbac") - if err != nil { - return err - } - - if err := unm.Unmarshal(buf, resp); err != nil { - return err - } - - return nil - }, opts...) - if e != nil { - return nil, e - } - return resp, nil -} - -// StartIPRotation starts master IP rotation. -func (c *clusterManagerRESTClient) StartIPRotation(ctx context.Context, req *containerpb.StartIPRotationRequest, opts ...gax.CallOption) (*containerpb.Operation, error) { - m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} - jsonReq, err := m.Marshal(req) - if err != nil { - return nil, err - } - - baseUrl, err := url.Parse(c.endpoint) - if err != nil { - return nil, err - } - baseUrl.Path += fmt.Sprintf("/v1/%v:startIpRotation", req.GetName()) - - params := url.Values{} - params.Add("$alt", "json;enum-encoding=int") - - baseUrl.RawQuery = params.Encode() - - // Build HTTP headers from client and context metadata. - hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v&%s=%v&%s=%v&%s=%v", "name", url.QueryEscape(req.GetName()), "project_id", url.QueryEscape(req.GetProjectId()), "zone", url.QueryEscape(req.GetZone()), "cluster_id", url.QueryEscape(req.GetClusterId()))} - - hds = append(c.xGoogHeaders, hds...) - hds = append(hds, "Content-Type", "application/json") - headers := gax.BuildHeaders(ctx, hds...) - if gax.IsFeatureEnabled("METRICS") || gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "rpc_method", "google.container.v1.ClusterManager/StartIPRotation") - ctx = callctx.WithTelemetryContext(ctx, "url_template", "/v1/{name=projects/*/locations/*/clusters/*}:startIpRotation") - } - opts = append((*c.CallOptions).StartIPRotation[0:len((*c.CallOptions).StartIPRotation):len((*c.CallOptions).StartIPRotation)], opts...) - unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} - resp := &containerpb.Operation{} - e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - if settings.Path != "" { - baseUrl.Path = settings.Path - } - httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) - if err != nil { - return err - } - httpReq = httpReq.WithContext(ctx) - httpReq.Header = headers - - buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "StartIPRotation") - if err != nil { - return err - } - - if err := unm.Unmarshal(buf, resp); err != nil { - return err - } - - return nil - }, opts...) - if e != nil { - return nil, e - } - return resp, nil -} - -// CompleteIPRotation completes master IP rotation. -func (c *clusterManagerRESTClient) CompleteIPRotation(ctx context.Context, req *containerpb.CompleteIPRotationRequest, opts ...gax.CallOption) (*containerpb.Operation, error) { - m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} - jsonReq, err := m.Marshal(req) - if err != nil { - return nil, err - } - - baseUrl, err := url.Parse(c.endpoint) - if err != nil { - return nil, err - } - baseUrl.Path += fmt.Sprintf("/v1/%v:completeIpRotation", req.GetName()) - - params := url.Values{} - params.Add("$alt", "json;enum-encoding=int") - - baseUrl.RawQuery = params.Encode() - - // Build HTTP headers from client and context metadata. - hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v&%s=%v&%s=%v&%s=%v", "name", url.QueryEscape(req.GetName()), "project_id", url.QueryEscape(req.GetProjectId()), "zone", url.QueryEscape(req.GetZone()), "cluster_id", url.QueryEscape(req.GetClusterId()))} - - hds = append(c.xGoogHeaders, hds...) - hds = append(hds, "Content-Type", "application/json") - headers := gax.BuildHeaders(ctx, hds...) - if gax.IsFeatureEnabled("METRICS") || gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "rpc_method", "google.container.v1.ClusterManager/CompleteIPRotation") - ctx = callctx.WithTelemetryContext(ctx, "url_template", "/v1/{name=projects/*/locations/*/clusters/*}:completeIpRotation") - } - opts = append((*c.CallOptions).CompleteIPRotation[0:len((*c.CallOptions).CompleteIPRotation):len((*c.CallOptions).CompleteIPRotation)], opts...) - unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} - resp := &containerpb.Operation{} - e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - if settings.Path != "" { - baseUrl.Path = settings.Path - } - httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) - if err != nil { - return err - } - httpReq = httpReq.WithContext(ctx) - httpReq.Header = headers - - buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CompleteIPRotation") - if err != nil { - return err - } - - if err := unm.Unmarshal(buf, resp); err != nil { - return err - } - - return nil - }, opts...) - if e != nil { - return nil, e - } - return resp, nil -} - -// SetNodePoolSize sets the size for a specific node pool. The new size will be used for all -// replicas, including future replicas created by modifying -// NodePool.locations. -func (c *clusterManagerRESTClient) SetNodePoolSize(ctx context.Context, req *containerpb.SetNodePoolSizeRequest, opts ...gax.CallOption) (*containerpb.Operation, error) { - m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} - jsonReq, err := m.Marshal(req) - if err != nil { - return nil, err - } - - baseUrl, err := url.Parse(c.endpoint) - if err != nil { - return nil, err - } - baseUrl.Path += fmt.Sprintf("/v1/%v:setSize", req.GetName()) - - params := url.Values{} - params.Add("$alt", "json;enum-encoding=int") - - baseUrl.RawQuery = params.Encode() - - // Build HTTP headers from client and context metadata. - hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v&%s=%v&%s=%v&%s=%v&%s=%v", "name", url.QueryEscape(req.GetName()), "project_id", url.QueryEscape(req.GetProjectId()), "zone", url.QueryEscape(req.GetZone()), "cluster_id", url.QueryEscape(req.GetClusterId()), "node_pool_id", url.QueryEscape(req.GetNodePoolId()))} - - hds = append(c.xGoogHeaders, hds...) - hds = append(hds, "Content-Type", "application/json") - headers := gax.BuildHeaders(ctx, hds...) - if gax.IsFeatureEnabled("METRICS") || gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "rpc_method", "google.container.v1.ClusterManager/SetNodePoolSize") - ctx = callctx.WithTelemetryContext(ctx, "url_template", "/v1/{name=projects/*/locations/*/clusters/*/nodePools/*}:setSize") - } - opts = append((*c.CallOptions).SetNodePoolSize[0:len((*c.CallOptions).SetNodePoolSize):len((*c.CallOptions).SetNodePoolSize)], opts...) - unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} - resp := &containerpb.Operation{} - e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - if settings.Path != "" { - baseUrl.Path = settings.Path - } - httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) - if err != nil { - return err - } - httpReq = httpReq.WithContext(ctx) - httpReq.Header = headers - - buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetNodePoolSize") - if err != nil { - return err - } - - if err := unm.Unmarshal(buf, resp); err != nil { - return err - } - - return nil - }, opts...) - if e != nil { - return nil, e - } - return resp, nil -} - -// SetNetworkPolicy enables or disables Network Policy for a cluster. -func (c *clusterManagerRESTClient) SetNetworkPolicy(ctx context.Context, req *containerpb.SetNetworkPolicyRequest, opts ...gax.CallOption) (*containerpb.Operation, error) { - m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} - jsonReq, err := m.Marshal(req) - if err != nil { - return nil, err - } - - baseUrl, err := url.Parse(c.endpoint) - if err != nil { - return nil, err - } - baseUrl.Path += fmt.Sprintf("/v1/%v:setNetworkPolicy", req.GetName()) - - params := url.Values{} - params.Add("$alt", "json;enum-encoding=int") - - baseUrl.RawQuery = params.Encode() - - // Build HTTP headers from client and context metadata. - hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v&%s=%v&%s=%v&%s=%v", "name", url.QueryEscape(req.GetName()), "project_id", url.QueryEscape(req.GetProjectId()), "zone", url.QueryEscape(req.GetZone()), "cluster_id", url.QueryEscape(req.GetClusterId()))} - - hds = append(c.xGoogHeaders, hds...) - hds = append(hds, "Content-Type", "application/json") - headers := gax.BuildHeaders(ctx, hds...) - if gax.IsFeatureEnabled("METRICS") || gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "rpc_method", "google.container.v1.ClusterManager/SetNetworkPolicy") - ctx = callctx.WithTelemetryContext(ctx, "url_template", "/v1/{name=projects/*/locations/*/clusters/*}:setNetworkPolicy") - } - opts = append((*c.CallOptions).SetNetworkPolicy[0:len((*c.CallOptions).SetNetworkPolicy):len((*c.CallOptions).SetNetworkPolicy)], opts...) - unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} - resp := &containerpb.Operation{} - e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - if settings.Path != "" { - baseUrl.Path = settings.Path - } - httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) - if err != nil { - return err - } - httpReq = httpReq.WithContext(ctx) - httpReq.Header = headers - - buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetNetworkPolicy") - if err != nil { - return err - } - - if err := unm.Unmarshal(buf, resp); err != nil { - return err - } - - return nil - }, opts...) - if e != nil { - return nil, e - } - return resp, nil -} - -// SetMaintenancePolicy sets the maintenance policy for a cluster. -func (c *clusterManagerRESTClient) SetMaintenancePolicy(ctx context.Context, req *containerpb.SetMaintenancePolicyRequest, opts ...gax.CallOption) (*containerpb.Operation, error) { - m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} - jsonReq, err := m.Marshal(req) - if err != nil { - return nil, err - } - - baseUrl, err := url.Parse(c.endpoint) - if err != nil { - return nil, err - } - baseUrl.Path += fmt.Sprintf("/v1/%v:setMaintenancePolicy", req.GetName()) - - params := url.Values{} - params.Add("$alt", "json;enum-encoding=int") - - baseUrl.RawQuery = params.Encode() - - // Build HTTP headers from client and context metadata. - hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v&%s=%v&%s=%v&%s=%v", "name", url.QueryEscape(req.GetName()), "project_id", url.QueryEscape(req.GetProjectId()), "zone", url.QueryEscape(req.GetZone()), "cluster_id", url.QueryEscape(req.GetClusterId()))} - - hds = append(c.xGoogHeaders, hds...) - hds = append(hds, "Content-Type", "application/json") - headers := gax.BuildHeaders(ctx, hds...) - if gax.IsFeatureEnabled("METRICS") || gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "rpc_method", "google.container.v1.ClusterManager/SetMaintenancePolicy") - ctx = callctx.WithTelemetryContext(ctx, "url_template", "/v1/{name=projects/*/locations/*/clusters/*}:setMaintenancePolicy") - } - opts = append((*c.CallOptions).SetMaintenancePolicy[0:len((*c.CallOptions).SetMaintenancePolicy):len((*c.CallOptions).SetMaintenancePolicy)], opts...) - unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} - resp := &containerpb.Operation{} - e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - if settings.Path != "" { - baseUrl.Path = settings.Path - } - httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) - if err != nil { - return err - } - httpReq = httpReq.WithContext(ctx) - httpReq.Header = headers - - buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetMaintenancePolicy") - if err != nil { - return err - } - - if err := unm.Unmarshal(buf, resp); err != nil { - return err - } - - return nil - }, opts...) - if e != nil { - return nil, e - } - return resp, nil -} - -// ListUsableSubnetworks lists subnetworks that are usable for creating clusters in a project. -func (c *clusterManagerRESTClient) ListUsableSubnetworks(ctx context.Context, req *containerpb.ListUsableSubnetworksRequest, opts ...gax.CallOption) *UsableSubnetworkIterator { - it := &UsableSubnetworkIterator{} - req = proto.Clone(req).(*containerpb.ListUsableSubnetworksRequest) - unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} - it.InternalFetch = func(pageSize int, pageToken string) ([]*containerpb.UsableSubnetwork, string, error) { - resp := &containerpb.ListUsableSubnetworksResponse{} - if pageToken != "" { - req.PageToken = pageToken - } - if pageSize > math.MaxInt32 { - req.PageSize = math.MaxInt32 - } else if pageSize != 0 { - req.PageSize = int32(pageSize) - } - baseUrl, err := url.Parse(c.endpoint) - if err != nil { - return nil, "", err - } - baseUrl.Path += fmt.Sprintf("/v1/%v/aggregated/usableSubnetworks", req.GetParent()) - - params := url.Values{} - params.Add("$alt", "json;enum-encoding=int") - if req.GetFilter() != "" { - params.Add("filter", fmt.Sprintf("%v", req.GetFilter())) - } - if req.GetPageSize() != 0 { - params.Add("pageSize", fmt.Sprintf("%v", req.GetPageSize())) - } - if req.GetPageToken() != "" { - params.Add("pageToken", fmt.Sprintf("%v", req.GetPageToken())) - } - - baseUrl.RawQuery = params.Encode() - - // Build HTTP headers from client and context metadata. - hds := append(c.xGoogHeaders, "Content-Type", "application/json") - headers := gax.BuildHeaders(ctx, hds...) - e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - if settings.Path != "" { - baseUrl.Path = settings.Path - } - httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) - if err != nil { - return err - } - httpReq.Header = headers - - buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListUsableSubnetworks") - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { - return err - } - - return nil - }, opts...) - if e != nil { - return nil, "", e - } - it.Response = resp - return resp.GetSubnetworks(), resp.GetNextPageToken(), nil - } - - fetch := func(pageSize int, pageToken string) (string, error) { - items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) - if err != nil { - return "", err - } - it.items = append(it.items, items...) - return nextPageToken, nil - } - - it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) - it.pageInfo.MaxSize = int(req.GetPageSize()) - it.pageInfo.Token = req.GetPageToken() - - return it -} - -// CheckAutopilotCompatibility checks the cluster compatibility with Autopilot mode, and returns a list of -// compatibility issues. -func (c *clusterManagerRESTClient) CheckAutopilotCompatibility(ctx context.Context, req *containerpb.CheckAutopilotCompatibilityRequest, opts ...gax.CallOption) (*containerpb.CheckAutopilotCompatibilityResponse, error) { - baseUrl, err := url.Parse(c.endpoint) - if err != nil { - return nil, err - } - baseUrl.Path += fmt.Sprintf("/v1/%v:checkAutopilotCompatibility", req.GetName()) - - params := url.Values{} - params.Add("$alt", "json;enum-encoding=int") - - baseUrl.RawQuery = params.Encode() - - // Build HTTP headers from client and context metadata. - hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))} - - hds = append(c.xGoogHeaders, hds...) - hds = append(hds, "Content-Type", "application/json") - headers := gax.BuildHeaders(ctx, hds...) - if gax.IsFeatureEnabled("METRICS") || gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "rpc_method", "google.container.v1.ClusterManager/CheckAutopilotCompatibility") - ctx = callctx.WithTelemetryContext(ctx, "url_template", "/v1/{name=projects/*/locations/*/clusters/*}:checkAutopilotCompatibility") - } - opts = append((*c.CallOptions).CheckAutopilotCompatibility[0:len((*c.CallOptions).CheckAutopilotCompatibility):len((*c.CallOptions).CheckAutopilotCompatibility)], opts...) - unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} - resp := &containerpb.CheckAutopilotCompatibilityResponse{} - e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - if settings.Path != "" { - baseUrl.Path = settings.Path - } - httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) - if err != nil { - return err - } - httpReq = httpReq.WithContext(ctx) - httpReq.Header = headers - - buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "CheckAutopilotCompatibility") - if err != nil { - return err - } - - if err := unm.Unmarshal(buf, resp); err != nil { - return err - } - - return nil - }, opts...) - if e != nil { - return nil, e - } - return resp, nil -} - -// FetchClusterUpgradeInfo fetch upgrade information of a specific cluster. -func (c *clusterManagerRESTClient) FetchClusterUpgradeInfo(ctx context.Context, req *containerpb.FetchClusterUpgradeInfoRequest, opts ...gax.CallOption) (*containerpb.ClusterUpgradeInfo, error) { - baseUrl, err := url.Parse(c.endpoint) - if err != nil { - return nil, err - } - baseUrl.Path += fmt.Sprintf("/v1/%v:fetchClusterUpgradeInfo", req.GetName()) - - params := url.Values{} - params.Add("$alt", "json;enum-encoding=int") - if req.GetVersion() != "" { - params.Add("version", fmt.Sprintf("%v", req.GetVersion())) - } - - baseUrl.RawQuery = params.Encode() - - // Build HTTP headers from client and context metadata. - hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))} - - hds = append(c.xGoogHeaders, hds...) - hds = append(hds, "Content-Type", "application/json") - headers := gax.BuildHeaders(ctx, hds...) - if gax.IsFeatureEnabled("METRICS") || gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "rpc_method", "google.container.v1.ClusterManager/FetchClusterUpgradeInfo") - ctx = callctx.WithTelemetryContext(ctx, "url_template", "/v1/{name=projects/*/locations/*/clusters/*}:fetchClusterUpgradeInfo") - } - opts = append((*c.CallOptions).FetchClusterUpgradeInfo[0:len((*c.CallOptions).FetchClusterUpgradeInfo):len((*c.CallOptions).FetchClusterUpgradeInfo)], opts...) - unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} - resp := &containerpb.ClusterUpgradeInfo{} - e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - if settings.Path != "" { - baseUrl.Path = settings.Path - } - httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) - if err != nil { - return err - } - httpReq = httpReq.WithContext(ctx) - httpReq.Header = headers - - buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "FetchClusterUpgradeInfo") - if err != nil { - return err - } - - if err := unm.Unmarshal(buf, resp); err != nil { - return err - } - - return nil - }, opts...) - if e != nil { - return nil, e - } - return resp, nil -} - -// FetchNodePoolUpgradeInfo fetch upgrade information of a specific nodepool. -func (c *clusterManagerRESTClient) FetchNodePoolUpgradeInfo(ctx context.Context, req *containerpb.FetchNodePoolUpgradeInfoRequest, opts ...gax.CallOption) (*containerpb.NodePoolUpgradeInfo, error) { - baseUrl, err := url.Parse(c.endpoint) - if err != nil { - return nil, err - } - baseUrl.Path += fmt.Sprintf("/v1/%v:fetchNodePoolUpgradeInfo", req.GetName()) - - params := url.Values{} - params.Add("$alt", "json;enum-encoding=int") - if req.GetVersion() != "" { - params.Add("version", fmt.Sprintf("%v", req.GetVersion())) - } - - baseUrl.RawQuery = params.Encode() - - // Build HTTP headers from client and context metadata. - hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))} - - hds = append(c.xGoogHeaders, hds...) - hds = append(hds, "Content-Type", "application/json") - headers := gax.BuildHeaders(ctx, hds...) - if gax.IsFeatureEnabled("METRICS") || gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "rpc_method", "google.container.v1.ClusterManager/FetchNodePoolUpgradeInfo") - ctx = callctx.WithTelemetryContext(ctx, "url_template", "/v1/{name=projects/*/locations/*/clusters/*/nodePools/*}:fetchNodePoolUpgradeInfo") - } - opts = append((*c.CallOptions).FetchNodePoolUpgradeInfo[0:len((*c.CallOptions).FetchNodePoolUpgradeInfo):len((*c.CallOptions).FetchNodePoolUpgradeInfo)], opts...) - unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} - resp := &containerpb.NodePoolUpgradeInfo{} - e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - if settings.Path != "" { - baseUrl.Path = settings.Path - } - httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) - if err != nil { - return err - } - httpReq = httpReq.WithContext(ctx) - httpReq.Header = headers - - buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "FetchNodePoolUpgradeInfo") - if err != nil { - return err - } - - if err := unm.Unmarshal(buf, resp); err != nil { - return err - } - - return nil - }, opts...) - if e != nil { - return nil, e - } - return resp, nil -} diff --git a/vendor/cloud.google.com/go/container/apiv1/containerpb/cluster_service.pb.go b/vendor/cloud.google.com/go/container/apiv1/containerpb/cluster_service.pb.go deleted file mode 100644 index 48239e7d7b..0000000000 --- a/vendor/cloud.google.com/go/container/apiv1/containerpb/cluster_service.pb.go +++ /dev/null @@ -1,28195 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.36.11 -// protoc v6.31.0 -// source: google/container/v1/cluster_service.proto - -package containerpb - -import ( - reflect "reflect" - sync "sync" - unsafe "unsafe" - - _ "google.golang.org/genproto/googleapis/api/annotations" - code "google.golang.org/genproto/googleapis/rpc/code" - status "google.golang.org/genproto/googleapis/rpc/status" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - durationpb "google.golang.org/protobuf/types/known/durationpb" - emptypb "google.golang.org/protobuf/types/known/emptypb" - timestamppb "google.golang.org/protobuf/types/known/timestamppb" - wrapperspb "google.golang.org/protobuf/types/known/wrapperspb" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// PrivateIPv6GoogleAccess controls whether and how the pods can communicate -// with Google Services through gRPC over IPv6. -type PrivateIPv6GoogleAccess int32 - -const ( - // Default value. Same as DISABLED - PrivateIPv6GoogleAccess_PRIVATE_IPV6_GOOGLE_ACCESS_UNSPECIFIED PrivateIPv6GoogleAccess = 0 - // No private access to or from Google Services - PrivateIPv6GoogleAccess_PRIVATE_IPV6_GOOGLE_ACCESS_DISABLED PrivateIPv6GoogleAccess = 1 - // Enables private IPv6 access to Google Services from GKE - PrivateIPv6GoogleAccess_PRIVATE_IPV6_GOOGLE_ACCESS_TO_GOOGLE PrivateIPv6GoogleAccess = 2 - // Enables private IPv6 access to and from Google Services - PrivateIPv6GoogleAccess_PRIVATE_IPV6_GOOGLE_ACCESS_BIDIRECTIONAL PrivateIPv6GoogleAccess = 3 -) - -// Enum value maps for PrivateIPv6GoogleAccess. -var ( - PrivateIPv6GoogleAccess_name = map[int32]string{ - 0: "PRIVATE_IPV6_GOOGLE_ACCESS_UNSPECIFIED", - 1: "PRIVATE_IPV6_GOOGLE_ACCESS_DISABLED", - 2: "PRIVATE_IPV6_GOOGLE_ACCESS_TO_GOOGLE", - 3: "PRIVATE_IPV6_GOOGLE_ACCESS_BIDIRECTIONAL", - } - PrivateIPv6GoogleAccess_value = map[string]int32{ - "PRIVATE_IPV6_GOOGLE_ACCESS_UNSPECIFIED": 0, - "PRIVATE_IPV6_GOOGLE_ACCESS_DISABLED": 1, - "PRIVATE_IPV6_GOOGLE_ACCESS_TO_GOOGLE": 2, - "PRIVATE_IPV6_GOOGLE_ACCESS_BIDIRECTIONAL": 3, - } -) - -func (x PrivateIPv6GoogleAccess) Enum() *PrivateIPv6GoogleAccess { - p := new(PrivateIPv6GoogleAccess) - *p = x - return p -} - -func (x PrivateIPv6GoogleAccess) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (PrivateIPv6GoogleAccess) Descriptor() protoreflect.EnumDescriptor { - return file_google_container_v1_cluster_service_proto_enumTypes[0].Descriptor() -} - -func (PrivateIPv6GoogleAccess) Type() protoreflect.EnumType { - return &file_google_container_v1_cluster_service_proto_enumTypes[0] -} - -func (x PrivateIPv6GoogleAccess) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use PrivateIPv6GoogleAccess.Descriptor instead. -func (PrivateIPv6GoogleAccess) EnumDescriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{0} -} - -// UpgradeResourceType is the resource type that is upgrading. It is used -// in upgrade notifications. -type UpgradeResourceType int32 - -const ( - // Default value. This shouldn't be used. - UpgradeResourceType_UPGRADE_RESOURCE_TYPE_UNSPECIFIED UpgradeResourceType = 0 - // Master / control plane - UpgradeResourceType_MASTER UpgradeResourceType = 1 - // Node pool - UpgradeResourceType_NODE_POOL UpgradeResourceType = 2 -) - -// Enum value maps for UpgradeResourceType. -var ( - UpgradeResourceType_name = map[int32]string{ - 0: "UPGRADE_RESOURCE_TYPE_UNSPECIFIED", - 1: "MASTER", - 2: "NODE_POOL", - } - UpgradeResourceType_value = map[string]int32{ - "UPGRADE_RESOURCE_TYPE_UNSPECIFIED": 0, - "MASTER": 1, - "NODE_POOL": 2, - } -) - -func (x UpgradeResourceType) Enum() *UpgradeResourceType { - p := new(UpgradeResourceType) - *p = x - return p -} - -func (x UpgradeResourceType) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (UpgradeResourceType) Descriptor() protoreflect.EnumDescriptor { - return file_google_container_v1_cluster_service_proto_enumTypes[1].Descriptor() -} - -func (UpgradeResourceType) Type() protoreflect.EnumType { - return &file_google_container_v1_cluster_service_proto_enumTypes[1] -} - -func (x UpgradeResourceType) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use UpgradeResourceType.Descriptor instead. -func (UpgradeResourceType) EnumDescriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{1} -} - -// The datapath provider selects the implementation of the Kubernetes networking -// model for service resolution and network policy enforcement. -type DatapathProvider int32 - -const ( - // Default value. - DatapathProvider_DATAPATH_PROVIDER_UNSPECIFIED DatapathProvider = 0 - // Use the IPTables implementation based on kube-proxy. - DatapathProvider_LEGACY_DATAPATH DatapathProvider = 1 - // Use the eBPF based GKE Dataplane V2 with additional features. See the [GKE - // Dataplane V2 - // documentation](https://cloud.google.com/kubernetes-engine/docs/how-to/dataplane-v2) - // for more. - DatapathProvider_ADVANCED_DATAPATH DatapathProvider = 2 -) - -// Enum value maps for DatapathProvider. -var ( - DatapathProvider_name = map[int32]string{ - 0: "DATAPATH_PROVIDER_UNSPECIFIED", - 1: "LEGACY_DATAPATH", - 2: "ADVANCED_DATAPATH", - } - DatapathProvider_value = map[string]int32{ - "DATAPATH_PROVIDER_UNSPECIFIED": 0, - "LEGACY_DATAPATH": 1, - "ADVANCED_DATAPATH": 2, - } -) - -func (x DatapathProvider) Enum() *DatapathProvider { - p := new(DatapathProvider) - *p = x - return p -} - -func (x DatapathProvider) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (DatapathProvider) Descriptor() protoreflect.EnumDescriptor { - return file_google_container_v1_cluster_service_proto_enumTypes[2].Descriptor() -} - -func (DatapathProvider) Type() protoreflect.EnumType { - return &file_google_container_v1_cluster_service_proto_enumTypes[2] -} - -func (x DatapathProvider) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use DatapathProvider.Descriptor instead. -func (DatapathProvider) EnumDescriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{2} -} - -// Strategy used for node pool update. -type NodePoolUpdateStrategy int32 - -const ( - // Default value if unset. GKE internally defaults the update strategy to - // SURGE for unspecified strategies. - NodePoolUpdateStrategy_NODE_POOL_UPDATE_STRATEGY_UNSPECIFIED NodePoolUpdateStrategy = 0 - // blue-green upgrade. - NodePoolUpdateStrategy_BLUE_GREEN NodePoolUpdateStrategy = 2 - // SURGE is the traditional way of upgrade a node pool. - // max_surge and max_unavailable determines the level of upgrade parallelism. - NodePoolUpdateStrategy_SURGE NodePoolUpdateStrategy = 3 - // SHORT_LIVED is the dedicated upgrade strategy for - // QueuedProvisioning and flex start nodepools scaled up only by enqueueing to - // the Dynamic Workload Scheduler (DWS). - NodePoolUpdateStrategy_SHORT_LIVED NodePoolUpdateStrategy = 5 -) - -// Enum value maps for NodePoolUpdateStrategy. -var ( - NodePoolUpdateStrategy_name = map[int32]string{ - 0: "NODE_POOL_UPDATE_STRATEGY_UNSPECIFIED", - 2: "BLUE_GREEN", - 3: "SURGE", - 5: "SHORT_LIVED", - } - NodePoolUpdateStrategy_value = map[string]int32{ - "NODE_POOL_UPDATE_STRATEGY_UNSPECIFIED": 0, - "BLUE_GREEN": 2, - "SURGE": 3, - "SHORT_LIVED": 5, - } -) - -func (x NodePoolUpdateStrategy) Enum() *NodePoolUpdateStrategy { - p := new(NodePoolUpdateStrategy) - *p = x - return p -} - -func (x NodePoolUpdateStrategy) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (NodePoolUpdateStrategy) Descriptor() protoreflect.EnumDescriptor { - return file_google_container_v1_cluster_service_proto_enumTypes[3].Descriptor() -} - -func (NodePoolUpdateStrategy) Type() protoreflect.EnumType { - return &file_google_container_v1_cluster_service_proto_enumTypes[3] -} - -func (x NodePoolUpdateStrategy) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use NodePoolUpdateStrategy.Descriptor instead. -func (NodePoolUpdateStrategy) EnumDescriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{3} -} - -// Possible values for IP stack type -type StackType int32 - -const ( - // Default value, will be defaulted as IPV4 only - StackType_STACK_TYPE_UNSPECIFIED StackType = 0 - // Cluster is IPV4 only - StackType_IPV4 StackType = 1 - // Cluster can use both IPv4 and IPv6 - StackType_IPV4_IPV6 StackType = 2 -) - -// Enum value maps for StackType. -var ( - StackType_name = map[int32]string{ - 0: "STACK_TYPE_UNSPECIFIED", - 1: "IPV4", - 2: "IPV4_IPV6", - } - StackType_value = map[string]int32{ - "STACK_TYPE_UNSPECIFIED": 0, - "IPV4": 1, - "IPV4_IPV6": 2, - } -) - -func (x StackType) Enum() *StackType { - p := new(StackType) - *p = x - return p -} - -func (x StackType) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (StackType) Descriptor() protoreflect.EnumDescriptor { - return file_google_container_v1_cluster_service_proto_enumTypes[4].Descriptor() -} - -func (StackType) Type() protoreflect.EnumType { - return &file_google_container_v1_cluster_service_proto_enumTypes[4] -} - -func (x StackType) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use StackType.Descriptor instead. -func (StackType) EnumDescriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{4} -} - -// Possible values for IPv6 access type -type IPv6AccessType int32 - -const ( - // Default value, will be defaulted as type external. - IPv6AccessType_IPV6_ACCESS_TYPE_UNSPECIFIED IPv6AccessType = 0 - // Access type internal (all v6 addresses are internal IPs) - IPv6AccessType_INTERNAL IPv6AccessType = 1 - // Access type external (all v6 addresses are external IPs) - IPv6AccessType_EXTERNAL IPv6AccessType = 2 -) - -// Enum value maps for IPv6AccessType. -var ( - IPv6AccessType_name = map[int32]string{ - 0: "IPV6_ACCESS_TYPE_UNSPECIFIED", - 1: "INTERNAL", - 2: "EXTERNAL", - } - IPv6AccessType_value = map[string]int32{ - "IPV6_ACCESS_TYPE_UNSPECIFIED": 0, - "INTERNAL": 1, - "EXTERNAL": 2, - } -) - -func (x IPv6AccessType) Enum() *IPv6AccessType { - p := new(IPv6AccessType) - *p = x - return p -} - -func (x IPv6AccessType) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (IPv6AccessType) Descriptor() protoreflect.EnumDescriptor { - return file_google_container_v1_cluster_service_proto_enumTypes[5].Descriptor() -} - -func (IPv6AccessType) Type() protoreflect.EnumType { - return &file_google_container_v1_cluster_service_proto_enumTypes[5] -} - -func (x IPv6AccessType) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use IPv6AccessType.Descriptor instead. -func (IPv6AccessType) EnumDescriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{5} -} - -// Options for in-transit encryption. -type InTransitEncryptionConfig int32 - -const ( - // Unspecified, will be inferred as default - - // IN_TRANSIT_ENCRYPTION_UNSPECIFIED. - InTransitEncryptionConfig_IN_TRANSIT_ENCRYPTION_CONFIG_UNSPECIFIED InTransitEncryptionConfig = 0 - // In-transit encryption is disabled. - InTransitEncryptionConfig_IN_TRANSIT_ENCRYPTION_DISABLED InTransitEncryptionConfig = 1 - // Data in-transit is encrypted using inter-node transparent encryption. - InTransitEncryptionConfig_IN_TRANSIT_ENCRYPTION_INTER_NODE_TRANSPARENT InTransitEncryptionConfig = 2 -) - -// Enum value maps for InTransitEncryptionConfig. -var ( - InTransitEncryptionConfig_name = map[int32]string{ - 0: "IN_TRANSIT_ENCRYPTION_CONFIG_UNSPECIFIED", - 1: "IN_TRANSIT_ENCRYPTION_DISABLED", - 2: "IN_TRANSIT_ENCRYPTION_INTER_NODE_TRANSPARENT", - } - InTransitEncryptionConfig_value = map[string]int32{ - "IN_TRANSIT_ENCRYPTION_CONFIG_UNSPECIFIED": 0, - "IN_TRANSIT_ENCRYPTION_DISABLED": 1, - "IN_TRANSIT_ENCRYPTION_INTER_NODE_TRANSPARENT": 2, - } -) - -func (x InTransitEncryptionConfig) Enum() *InTransitEncryptionConfig { - p := new(InTransitEncryptionConfig) - *p = x - return p -} - -func (x InTransitEncryptionConfig) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (InTransitEncryptionConfig) Descriptor() protoreflect.EnumDescriptor { - return file_google_container_v1_cluster_service_proto_enumTypes[6].Descriptor() -} - -func (InTransitEncryptionConfig) Type() protoreflect.EnumType { - return &file_google_container_v1_cluster_service_proto_enumTypes[6] -} - -func (x InTransitEncryptionConfig) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use InTransitEncryptionConfig.Descriptor instead. -func (InTransitEncryptionConfig) EnumDescriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{6} -} - -// Possible cgroup modes that can be used. -type LinuxNodeConfig_CgroupMode int32 - -const ( - // CGROUP_MODE_UNSPECIFIED is when unspecified cgroup configuration is used. - // The default for the GKE node OS image will be used. - LinuxNodeConfig_CGROUP_MODE_UNSPECIFIED LinuxNodeConfig_CgroupMode = 0 - // CGROUP_MODE_V1 specifies to use cgroupv1 for the cgroup configuration on - // the node image. - LinuxNodeConfig_CGROUP_MODE_V1 LinuxNodeConfig_CgroupMode = 1 - // CGROUP_MODE_V2 specifies to use cgroupv2 for the cgroup configuration on - // the node image. - LinuxNodeConfig_CGROUP_MODE_V2 LinuxNodeConfig_CgroupMode = 2 -) - -// Enum value maps for LinuxNodeConfig_CgroupMode. -var ( - LinuxNodeConfig_CgroupMode_name = map[int32]string{ - 0: "CGROUP_MODE_UNSPECIFIED", - 1: "CGROUP_MODE_V1", - 2: "CGROUP_MODE_V2", - } - LinuxNodeConfig_CgroupMode_value = map[string]int32{ - "CGROUP_MODE_UNSPECIFIED": 0, - "CGROUP_MODE_V1": 1, - "CGROUP_MODE_V2": 2, - } -) - -func (x LinuxNodeConfig_CgroupMode) Enum() *LinuxNodeConfig_CgroupMode { - p := new(LinuxNodeConfig_CgroupMode) - *p = x - return p -} - -func (x LinuxNodeConfig_CgroupMode) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (LinuxNodeConfig_CgroupMode) Descriptor() protoreflect.EnumDescriptor { - return file_google_container_v1_cluster_service_proto_enumTypes[7].Descriptor() -} - -func (LinuxNodeConfig_CgroupMode) Type() protoreflect.EnumType { - return &file_google_container_v1_cluster_service_proto_enumTypes[7] -} - -func (x LinuxNodeConfig_CgroupMode) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use LinuxNodeConfig_CgroupMode.Descriptor instead. -func (LinuxNodeConfig_CgroupMode) EnumDescriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{0, 0} -} - -// Possible values for transparent hugepage enabled support. -type LinuxNodeConfig_TransparentHugepageEnabled int32 - -const ( - // Default value. GKE will not modify the kernel configuration. - LinuxNodeConfig_TRANSPARENT_HUGEPAGE_ENABLED_UNSPECIFIED LinuxNodeConfig_TransparentHugepageEnabled = 0 - // Transparent hugepage support for anonymous memory is enabled system wide. - LinuxNodeConfig_TRANSPARENT_HUGEPAGE_ENABLED_ALWAYS LinuxNodeConfig_TransparentHugepageEnabled = 1 - // Transparent hugepage support for anonymous memory is enabled inside - // MADV_HUGEPAGE regions. This is the default kernel configuration. - LinuxNodeConfig_TRANSPARENT_HUGEPAGE_ENABLED_MADVISE LinuxNodeConfig_TransparentHugepageEnabled = 2 - // Transparent hugepage support for anonymous memory is disabled. - LinuxNodeConfig_TRANSPARENT_HUGEPAGE_ENABLED_NEVER LinuxNodeConfig_TransparentHugepageEnabled = 3 -) - -// Enum value maps for LinuxNodeConfig_TransparentHugepageEnabled. -var ( - LinuxNodeConfig_TransparentHugepageEnabled_name = map[int32]string{ - 0: "TRANSPARENT_HUGEPAGE_ENABLED_UNSPECIFIED", - 1: "TRANSPARENT_HUGEPAGE_ENABLED_ALWAYS", - 2: "TRANSPARENT_HUGEPAGE_ENABLED_MADVISE", - 3: "TRANSPARENT_HUGEPAGE_ENABLED_NEVER", - } - LinuxNodeConfig_TransparentHugepageEnabled_value = map[string]int32{ - "TRANSPARENT_HUGEPAGE_ENABLED_UNSPECIFIED": 0, - "TRANSPARENT_HUGEPAGE_ENABLED_ALWAYS": 1, - "TRANSPARENT_HUGEPAGE_ENABLED_MADVISE": 2, - "TRANSPARENT_HUGEPAGE_ENABLED_NEVER": 3, - } -) - -func (x LinuxNodeConfig_TransparentHugepageEnabled) Enum() *LinuxNodeConfig_TransparentHugepageEnabled { - p := new(LinuxNodeConfig_TransparentHugepageEnabled) - *p = x - return p -} - -func (x LinuxNodeConfig_TransparentHugepageEnabled) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (LinuxNodeConfig_TransparentHugepageEnabled) Descriptor() protoreflect.EnumDescriptor { - return file_google_container_v1_cluster_service_proto_enumTypes[8].Descriptor() -} - -func (LinuxNodeConfig_TransparentHugepageEnabled) Type() protoreflect.EnumType { - return &file_google_container_v1_cluster_service_proto_enumTypes[8] -} - -func (x LinuxNodeConfig_TransparentHugepageEnabled) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use LinuxNodeConfig_TransparentHugepageEnabled.Descriptor instead. -func (LinuxNodeConfig_TransparentHugepageEnabled) EnumDescriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{0, 1} -} - -// Possible values for transparent hugepage defrag support. -type LinuxNodeConfig_TransparentHugepageDefrag int32 - -const ( - // Default value. GKE will not modify the kernel configuration. - LinuxNodeConfig_TRANSPARENT_HUGEPAGE_DEFRAG_UNSPECIFIED LinuxNodeConfig_TransparentHugepageDefrag = 0 - // It means that an application requesting THP will stall on allocation - // failure and directly reclaim pages and compact memory in an effort to - // allocate a THP immediately. - LinuxNodeConfig_TRANSPARENT_HUGEPAGE_DEFRAG_ALWAYS LinuxNodeConfig_TransparentHugepageDefrag = 1 - // It means that an application will wake kswapd in the background to - // reclaim pages and wake kcompactd to compact memory so that THP is - // available in the near future. It's the responsibility of khugepaged to - // then install the THP pages later. - LinuxNodeConfig_TRANSPARENT_HUGEPAGE_DEFRAG_DEFER LinuxNodeConfig_TransparentHugepageDefrag = 2 - // It means that an application will enter direct reclaim and compaction - // like always, but only for regions that have used madvise(MADV_HUGEPAGE); - // all other regions will wake kswapd in the background to reclaim pages and - // wake kcompactd to compact memory so that THP is available in the near - // future. - LinuxNodeConfig_TRANSPARENT_HUGEPAGE_DEFRAG_DEFER_WITH_MADVISE LinuxNodeConfig_TransparentHugepageDefrag = 3 - // It means that an application will enter direct reclaim like always but - // only for regions that are have used madvise(MADV_HUGEPAGE). This is the - // default kernel configuration. - LinuxNodeConfig_TRANSPARENT_HUGEPAGE_DEFRAG_MADVISE LinuxNodeConfig_TransparentHugepageDefrag = 4 - // It means that an application will never enter direct reclaim or - // compaction. - LinuxNodeConfig_TRANSPARENT_HUGEPAGE_DEFRAG_NEVER LinuxNodeConfig_TransparentHugepageDefrag = 5 -) - -// Enum value maps for LinuxNodeConfig_TransparentHugepageDefrag. -var ( - LinuxNodeConfig_TransparentHugepageDefrag_name = map[int32]string{ - 0: "TRANSPARENT_HUGEPAGE_DEFRAG_UNSPECIFIED", - 1: "TRANSPARENT_HUGEPAGE_DEFRAG_ALWAYS", - 2: "TRANSPARENT_HUGEPAGE_DEFRAG_DEFER", - 3: "TRANSPARENT_HUGEPAGE_DEFRAG_DEFER_WITH_MADVISE", - 4: "TRANSPARENT_HUGEPAGE_DEFRAG_MADVISE", - 5: "TRANSPARENT_HUGEPAGE_DEFRAG_NEVER", - } - LinuxNodeConfig_TransparentHugepageDefrag_value = map[string]int32{ - "TRANSPARENT_HUGEPAGE_DEFRAG_UNSPECIFIED": 0, - "TRANSPARENT_HUGEPAGE_DEFRAG_ALWAYS": 1, - "TRANSPARENT_HUGEPAGE_DEFRAG_DEFER": 2, - "TRANSPARENT_HUGEPAGE_DEFRAG_DEFER_WITH_MADVISE": 3, - "TRANSPARENT_HUGEPAGE_DEFRAG_MADVISE": 4, - "TRANSPARENT_HUGEPAGE_DEFRAG_NEVER": 5, - } -) - -func (x LinuxNodeConfig_TransparentHugepageDefrag) Enum() *LinuxNodeConfig_TransparentHugepageDefrag { - p := new(LinuxNodeConfig_TransparentHugepageDefrag) - *p = x - return p -} - -func (x LinuxNodeConfig_TransparentHugepageDefrag) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (LinuxNodeConfig_TransparentHugepageDefrag) Descriptor() protoreflect.EnumDescriptor { - return file_google_container_v1_cluster_service_proto_enumTypes[9].Descriptor() -} - -func (LinuxNodeConfig_TransparentHugepageDefrag) Type() protoreflect.EnumType { - return &file_google_container_v1_cluster_service_proto_enumTypes[9] -} - -func (x LinuxNodeConfig_TransparentHugepageDefrag) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use LinuxNodeConfig_TransparentHugepageDefrag.Descriptor instead. -func (LinuxNodeConfig_TransparentHugepageDefrag) EnumDescriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{0, 2} -} - -// Defines the kernel module loading policy for nodes in the nodepool. -type LinuxNodeConfig_NodeKernelModuleLoading_Policy int32 - -const ( - // Default behavior. GKE selects the image based on node type. - // For CPU and TPU nodes, the image will not allow loading external - // kernel modules. - // For GPU nodes, the image will allow loading any module, whether it - // is signed or not. - LinuxNodeConfig_NodeKernelModuleLoading_POLICY_UNSPECIFIED LinuxNodeConfig_NodeKernelModuleLoading_Policy = 0 - // Enforced signature verification: Node pools will use a - // Container-Optimized OS image configured to allow loading of - // *Google-signed* external kernel modules. - // Loadpin is enabled but configured to exclude modules, and kernel - // module signature checking is enforced. - LinuxNodeConfig_NodeKernelModuleLoading_ENFORCE_SIGNED_MODULES LinuxNodeConfig_NodeKernelModuleLoading_Policy = 1 - // Mirrors existing DEFAULT behavior: - // For CPU and TPU nodes, the image will not allow loading external - // kernel modules. - // For GPU nodes, the image will allow loading any module, whether it - // is signed or not. - LinuxNodeConfig_NodeKernelModuleLoading_DO_NOT_ENFORCE_SIGNED_MODULES LinuxNodeConfig_NodeKernelModuleLoading_Policy = 2 -) - -// Enum value maps for LinuxNodeConfig_NodeKernelModuleLoading_Policy. -var ( - LinuxNodeConfig_NodeKernelModuleLoading_Policy_name = map[int32]string{ - 0: "POLICY_UNSPECIFIED", - 1: "ENFORCE_SIGNED_MODULES", - 2: "DO_NOT_ENFORCE_SIGNED_MODULES", - } - LinuxNodeConfig_NodeKernelModuleLoading_Policy_value = map[string]int32{ - "POLICY_UNSPECIFIED": 0, - "ENFORCE_SIGNED_MODULES": 1, - "DO_NOT_ENFORCE_SIGNED_MODULES": 2, - } -) - -func (x LinuxNodeConfig_NodeKernelModuleLoading_Policy) Enum() *LinuxNodeConfig_NodeKernelModuleLoading_Policy { - p := new(LinuxNodeConfig_NodeKernelModuleLoading_Policy) - *p = x - return p -} - -func (x LinuxNodeConfig_NodeKernelModuleLoading_Policy) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (LinuxNodeConfig_NodeKernelModuleLoading_Policy) Descriptor() protoreflect.EnumDescriptor { - return file_google_container_v1_cluster_service_proto_enumTypes[10].Descriptor() -} - -func (LinuxNodeConfig_NodeKernelModuleLoading_Policy) Type() protoreflect.EnumType { - return &file_google_container_v1_cluster_service_proto_enumTypes[10] -} - -func (x LinuxNodeConfig_NodeKernelModuleLoading_Policy) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use LinuxNodeConfig_NodeKernelModuleLoading_Policy.Descriptor instead. -func (LinuxNodeConfig_NodeKernelModuleLoading_Policy) EnumDescriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{0, 2, 0} -} - -// Possible OS version that can be used. -type WindowsNodeConfig_OSVersion int32 - -const ( - // When OSVersion is not specified. - WindowsNodeConfig_OS_VERSION_UNSPECIFIED WindowsNodeConfig_OSVersion = 0 - // LTSC2019 specifies to use LTSC2019 as the Windows Servercore Base Image. - WindowsNodeConfig_OS_VERSION_LTSC2019 WindowsNodeConfig_OSVersion = 1 - // LTSC2022 specifies to use LTSC2022 as the Windows Servercore Base Image. - WindowsNodeConfig_OS_VERSION_LTSC2022 WindowsNodeConfig_OSVersion = 2 -) - -// Enum value maps for WindowsNodeConfig_OSVersion. -var ( - WindowsNodeConfig_OSVersion_name = map[int32]string{ - 0: "OS_VERSION_UNSPECIFIED", - 1: "OS_VERSION_LTSC2019", - 2: "OS_VERSION_LTSC2022", - } - WindowsNodeConfig_OSVersion_value = map[string]int32{ - "OS_VERSION_UNSPECIFIED": 0, - "OS_VERSION_LTSC2019": 1, - "OS_VERSION_LTSC2022": 2, - } -) - -func (x WindowsNodeConfig_OSVersion) Enum() *WindowsNodeConfig_OSVersion { - p := new(WindowsNodeConfig_OSVersion) - *p = x - return p -} - -func (x WindowsNodeConfig_OSVersion) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (WindowsNodeConfig_OSVersion) Descriptor() protoreflect.EnumDescriptor { - return file_google_container_v1_cluster_service_proto_enumTypes[11].Descriptor() -} - -func (WindowsNodeConfig_OSVersion) Type() protoreflect.EnumType { - return &file_google_container_v1_cluster_service_proto_enumTypes[11] -} - -func (x WindowsNodeConfig_OSVersion) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use WindowsNodeConfig_OSVersion.Descriptor instead. -func (WindowsNodeConfig_OSVersion) EnumDescriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{1, 0} -} - -// LocalSsdEncryptionMode specifies the method used for encrypting the Local -// SSDs attached to the node. -type NodeConfig_LocalSsdEncryptionMode int32 - -const ( - // The given node will be encrypted using keys managed by Google - // infrastructure and the keys will be deleted when the node is - // deleted. - NodeConfig_LOCAL_SSD_ENCRYPTION_MODE_UNSPECIFIED NodeConfig_LocalSsdEncryptionMode = 0 - // The given node will be encrypted using keys managed by Google - // infrastructure and the keys will be deleted when the node is - // deleted. - NodeConfig_STANDARD_ENCRYPTION NodeConfig_LocalSsdEncryptionMode = 1 - // The given node will opt-in for using ephemeral key for - // encryption of Local SSDs. - // The Local SSDs will not be able to recover data in case of node - // crash. - NodeConfig_EPHEMERAL_KEY_ENCRYPTION NodeConfig_LocalSsdEncryptionMode = 2 -) - -// Enum value maps for NodeConfig_LocalSsdEncryptionMode. -var ( - NodeConfig_LocalSsdEncryptionMode_name = map[int32]string{ - 0: "LOCAL_SSD_ENCRYPTION_MODE_UNSPECIFIED", - 1: "STANDARD_ENCRYPTION", - 2: "EPHEMERAL_KEY_ENCRYPTION", - } - NodeConfig_LocalSsdEncryptionMode_value = map[string]int32{ - "LOCAL_SSD_ENCRYPTION_MODE_UNSPECIFIED": 0, - "STANDARD_ENCRYPTION": 1, - "EPHEMERAL_KEY_ENCRYPTION": 2, - } -) - -func (x NodeConfig_LocalSsdEncryptionMode) Enum() *NodeConfig_LocalSsdEncryptionMode { - p := new(NodeConfig_LocalSsdEncryptionMode) - *p = x - return p -} - -func (x NodeConfig_LocalSsdEncryptionMode) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (NodeConfig_LocalSsdEncryptionMode) Descriptor() protoreflect.EnumDescriptor { - return file_google_container_v1_cluster_service_proto_enumTypes[12].Descriptor() -} - -func (NodeConfig_LocalSsdEncryptionMode) Type() protoreflect.EnumType { - return &file_google_container_v1_cluster_service_proto_enumTypes[12] -} - -func (x NodeConfig_LocalSsdEncryptionMode) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use NodeConfig_LocalSsdEncryptionMode.Descriptor instead. -func (NodeConfig_LocalSsdEncryptionMode) EnumDescriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{8, 0} -} - -// Possible effective cgroup modes for the node. -type NodeConfig_EffectiveCgroupMode int32 - -const ( - // EFFECTIVE_CGROUP_MODE_UNSPECIFIED means the cgroup configuration for the - // node pool is unspecified, i.e. the node pool is a Windows node pool. - NodeConfig_EFFECTIVE_CGROUP_MODE_UNSPECIFIED NodeConfig_EffectiveCgroupMode = 0 - // CGROUP_MODE_V1 means the node pool is configured to use cgroupv1 for the - // cgroup configuration. - NodeConfig_EFFECTIVE_CGROUP_MODE_V1 NodeConfig_EffectiveCgroupMode = 1 - // CGROUP_MODE_V2 means the node pool is configured to use cgroupv2 for the - // cgroup configuration. - NodeConfig_EFFECTIVE_CGROUP_MODE_V2 NodeConfig_EffectiveCgroupMode = 2 -) - -// Enum value maps for NodeConfig_EffectiveCgroupMode. -var ( - NodeConfig_EffectiveCgroupMode_name = map[int32]string{ - 0: "EFFECTIVE_CGROUP_MODE_UNSPECIFIED", - 1: "EFFECTIVE_CGROUP_MODE_V1", - 2: "EFFECTIVE_CGROUP_MODE_V2", - } - NodeConfig_EffectiveCgroupMode_value = map[string]int32{ - "EFFECTIVE_CGROUP_MODE_UNSPECIFIED": 0, - "EFFECTIVE_CGROUP_MODE_V1": 1, - "EFFECTIVE_CGROUP_MODE_V2": 2, - } -) - -func (x NodeConfig_EffectiveCgroupMode) Enum() *NodeConfig_EffectiveCgroupMode { - p := new(NodeConfig_EffectiveCgroupMode) - *p = x - return p -} - -func (x NodeConfig_EffectiveCgroupMode) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (NodeConfig_EffectiveCgroupMode) Descriptor() protoreflect.EnumDescriptor { - return file_google_container_v1_cluster_service_proto_enumTypes[13].Descriptor() -} - -func (NodeConfig_EffectiveCgroupMode) Type() protoreflect.EnumType { - return &file_google_container_v1_cluster_service_proto_enumTypes[13] -} - -func (x NodeConfig_EffectiveCgroupMode) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use NodeConfig_EffectiveCgroupMode.Descriptor instead. -func (NodeConfig_EffectiveCgroupMode) EnumDescriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{8, 1} -} - -// Level of PMU access. -type AdvancedMachineFeatures_PerformanceMonitoringUnit int32 - -const ( - // PMU not enabled. - AdvancedMachineFeatures_PERFORMANCE_MONITORING_UNIT_UNSPECIFIED AdvancedMachineFeatures_PerformanceMonitoringUnit = 0 - // Architecturally defined non-LLC events. - AdvancedMachineFeatures_ARCHITECTURAL AdvancedMachineFeatures_PerformanceMonitoringUnit = 1 - // Most documented core/L2 events. - AdvancedMachineFeatures_STANDARD AdvancedMachineFeatures_PerformanceMonitoringUnit = 2 - // Most documented core/L2 and LLC events. - AdvancedMachineFeatures_ENHANCED AdvancedMachineFeatures_PerformanceMonitoringUnit = 3 -) - -// Enum value maps for AdvancedMachineFeatures_PerformanceMonitoringUnit. -var ( - AdvancedMachineFeatures_PerformanceMonitoringUnit_name = map[int32]string{ - 0: "PERFORMANCE_MONITORING_UNIT_UNSPECIFIED", - 1: "ARCHITECTURAL", - 2: "STANDARD", - 3: "ENHANCED", - } - AdvancedMachineFeatures_PerformanceMonitoringUnit_value = map[string]int32{ - "PERFORMANCE_MONITORING_UNIT_UNSPECIFIED": 0, - "ARCHITECTURAL": 1, - "STANDARD": 2, - "ENHANCED": 3, - } -) - -func (x AdvancedMachineFeatures_PerformanceMonitoringUnit) Enum() *AdvancedMachineFeatures_PerformanceMonitoringUnit { - p := new(AdvancedMachineFeatures_PerformanceMonitoringUnit) - *p = x - return p -} - -func (x AdvancedMachineFeatures_PerformanceMonitoringUnit) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (AdvancedMachineFeatures_PerformanceMonitoringUnit) Descriptor() protoreflect.EnumDescriptor { - return file_google_container_v1_cluster_service_proto_enumTypes[14].Descriptor() -} - -func (AdvancedMachineFeatures_PerformanceMonitoringUnit) Type() protoreflect.EnumType { - return &file_google_container_v1_cluster_service_proto_enumTypes[14] -} - -func (x AdvancedMachineFeatures_PerformanceMonitoringUnit) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use AdvancedMachineFeatures_PerformanceMonitoringUnit.Descriptor instead. -func (AdvancedMachineFeatures_PerformanceMonitoringUnit) EnumDescriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{9, 0} -} - -// Node network tier -type NodeNetworkConfig_NetworkPerformanceConfig_Tier int32 - -const ( - // Default value - NodeNetworkConfig_NetworkPerformanceConfig_TIER_UNSPECIFIED NodeNetworkConfig_NetworkPerformanceConfig_Tier = 0 - // Higher bandwidth, actual values based on VM size. - NodeNetworkConfig_NetworkPerformanceConfig_TIER_1 NodeNetworkConfig_NetworkPerformanceConfig_Tier = 1 -) - -// Enum value maps for NodeNetworkConfig_NetworkPerformanceConfig_Tier. -var ( - NodeNetworkConfig_NetworkPerformanceConfig_Tier_name = map[int32]string{ - 0: "TIER_UNSPECIFIED", - 1: "TIER_1", - } - NodeNetworkConfig_NetworkPerformanceConfig_Tier_value = map[string]int32{ - "TIER_UNSPECIFIED": 0, - "TIER_1": 1, - } -) - -func (x NodeNetworkConfig_NetworkPerformanceConfig_Tier) Enum() *NodeNetworkConfig_NetworkPerformanceConfig_Tier { - p := new(NodeNetworkConfig_NetworkPerformanceConfig_Tier) - *p = x - return p -} - -func (x NodeNetworkConfig_NetworkPerformanceConfig_Tier) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (NodeNetworkConfig_NetworkPerformanceConfig_Tier) Descriptor() protoreflect.EnumDescriptor { - return file_google_container_v1_cluster_service_proto_enumTypes[15].Descriptor() -} - -func (NodeNetworkConfig_NetworkPerformanceConfig_Tier) Type() protoreflect.EnumType { - return &file_google_container_v1_cluster_service_proto_enumTypes[15] -} - -func (x NodeNetworkConfig_NetworkPerformanceConfig_Tier) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use NodeNetworkConfig_NetworkPerformanceConfig_Tier.Descriptor instead. -func (NodeNetworkConfig_NetworkPerformanceConfig_Tier) EnumDescriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{10, 0, 0} -} - -// Possible types of sandboxes. -type SandboxConfig_Type int32 - -const ( - // Default value. This should not be used. - SandboxConfig_UNSPECIFIED SandboxConfig_Type = 0 - // Run sandbox using gvisor. - SandboxConfig_GVISOR SandboxConfig_Type = 1 -) - -// Enum value maps for SandboxConfig_Type. -var ( - SandboxConfig_Type_name = map[int32]string{ - 0: "UNSPECIFIED", - 1: "GVISOR", - } - SandboxConfig_Type_value = map[string]int32{ - "UNSPECIFIED": 0, - "GVISOR": 1, - } -) - -func (x SandboxConfig_Type) Enum() *SandboxConfig_Type { - p := new(SandboxConfig_Type) - *p = x - return p -} - -func (x SandboxConfig_Type) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (SandboxConfig_Type) Descriptor() protoreflect.EnumDescriptor { - return file_google_container_v1_cluster_service_proto_enumTypes[16].Descriptor() -} - -func (SandboxConfig_Type) Type() protoreflect.EnumType { - return &file_google_container_v1_cluster_service_proto_enumTypes[16] -} - -func (x SandboxConfig_Type) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use SandboxConfig_Type.Descriptor instead. -func (SandboxConfig_Type) EnumDescriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{14, 0} -} - -// Indicates whether to consume capacity from a reservation or not. -type ReservationAffinity_Type int32 - -const ( - // Default value. This should not be used. - ReservationAffinity_UNSPECIFIED ReservationAffinity_Type = 0 - // Do not consume from any reserved capacity. - ReservationAffinity_NO_RESERVATION ReservationAffinity_Type = 1 - // Consume any reservation available. - ReservationAffinity_ANY_RESERVATION ReservationAffinity_Type = 2 - // Must consume from a specific reservation. Must specify key value fields - // for specifying the reservations. - ReservationAffinity_SPECIFIC_RESERVATION ReservationAffinity_Type = 3 -) - -// Enum value maps for ReservationAffinity_Type. -var ( - ReservationAffinity_Type_name = map[int32]string{ - 0: "UNSPECIFIED", - 1: "NO_RESERVATION", - 2: "ANY_RESERVATION", - 3: "SPECIFIC_RESERVATION", - } - ReservationAffinity_Type_value = map[string]int32{ - "UNSPECIFIED": 0, - "NO_RESERVATION": 1, - "ANY_RESERVATION": 2, - "SPECIFIC_RESERVATION": 3, - } -) - -func (x ReservationAffinity_Type) Enum() *ReservationAffinity_Type { - p := new(ReservationAffinity_Type) - *p = x - return p -} - -func (x ReservationAffinity_Type) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (ReservationAffinity_Type) Descriptor() protoreflect.EnumDescriptor { - return file_google_container_v1_cluster_service_proto_enumTypes[17].Descriptor() -} - -func (ReservationAffinity_Type) Type() protoreflect.EnumType { - return &file_google_container_v1_cluster_service_proto_enumTypes[17] -} - -func (x ReservationAffinity_Type) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use ReservationAffinity_Type.Descriptor instead. -func (ReservationAffinity_Type) EnumDescriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{16, 0} -} - -// Operator allows user to specify affinity or anti-affinity for the -// given key values. -type SoleTenantConfig_NodeAffinity_Operator int32 - -const ( - // Invalid or unspecified affinity operator. - SoleTenantConfig_NodeAffinity_OPERATOR_UNSPECIFIED SoleTenantConfig_NodeAffinity_Operator = 0 - // Affinity operator. - SoleTenantConfig_NodeAffinity_IN SoleTenantConfig_NodeAffinity_Operator = 1 - // Anti-affinity operator. - SoleTenantConfig_NodeAffinity_NOT_IN SoleTenantConfig_NodeAffinity_Operator = 2 -) - -// Enum value maps for SoleTenantConfig_NodeAffinity_Operator. -var ( - SoleTenantConfig_NodeAffinity_Operator_name = map[int32]string{ - 0: "OPERATOR_UNSPECIFIED", - 1: "IN", - 2: "NOT_IN", - } - SoleTenantConfig_NodeAffinity_Operator_value = map[string]int32{ - "OPERATOR_UNSPECIFIED": 0, - "IN": 1, - "NOT_IN": 2, - } -) - -func (x SoleTenantConfig_NodeAffinity_Operator) Enum() *SoleTenantConfig_NodeAffinity_Operator { - p := new(SoleTenantConfig_NodeAffinity_Operator) - *p = x - return p -} - -func (x SoleTenantConfig_NodeAffinity_Operator) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (SoleTenantConfig_NodeAffinity_Operator) Descriptor() protoreflect.EnumDescriptor { - return file_google_container_v1_cluster_service_proto_enumTypes[18].Descriptor() -} - -func (SoleTenantConfig_NodeAffinity_Operator) Type() protoreflect.EnumType { - return &file_google_container_v1_cluster_service_proto_enumTypes[18] -} - -func (x SoleTenantConfig_NodeAffinity_Operator) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use SoleTenantConfig_NodeAffinity_Operator.Descriptor instead. -func (SoleTenantConfig_NodeAffinity_Operator) EnumDescriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{17, 0, 0} -} - -// HostCapability configures capabilities for the registry host. -type ContainerdConfig_RegistryHostConfig_HostCapability int32 - -const ( - // UNKNOWN should never be set. - ContainerdConfig_RegistryHostConfig_HOST_CAPABILITY_UNSPECIFIED ContainerdConfig_RegistryHostConfig_HostCapability = 0 - // Pull represents the capability to fetch manifests and blobs by digest. - ContainerdConfig_RegistryHostConfig_HOST_CAPABILITY_PULL ContainerdConfig_RegistryHostConfig_HostCapability = 1 - // Resolve represents the capability to fetch manifests by name. - ContainerdConfig_RegistryHostConfig_HOST_CAPABILITY_RESOLVE ContainerdConfig_RegistryHostConfig_HostCapability = 2 - // Push represents the capability to push blobs and manifests. - ContainerdConfig_RegistryHostConfig_HOST_CAPABILITY_PUSH ContainerdConfig_RegistryHostConfig_HostCapability = 3 -) - -// Enum value maps for ContainerdConfig_RegistryHostConfig_HostCapability. -var ( - ContainerdConfig_RegistryHostConfig_HostCapability_name = map[int32]string{ - 0: "HOST_CAPABILITY_UNSPECIFIED", - 1: "HOST_CAPABILITY_PULL", - 2: "HOST_CAPABILITY_RESOLVE", - 3: "HOST_CAPABILITY_PUSH", - } - ContainerdConfig_RegistryHostConfig_HostCapability_value = map[string]int32{ - "HOST_CAPABILITY_UNSPECIFIED": 0, - "HOST_CAPABILITY_PULL": 1, - "HOST_CAPABILITY_RESOLVE": 2, - "HOST_CAPABILITY_PUSH": 3, - } -) - -func (x ContainerdConfig_RegistryHostConfig_HostCapability) Enum() *ContainerdConfig_RegistryHostConfig_HostCapability { - p := new(ContainerdConfig_RegistryHostConfig_HostCapability) - *p = x - return p -} - -func (x ContainerdConfig_RegistryHostConfig_HostCapability) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (ContainerdConfig_RegistryHostConfig_HostCapability) Descriptor() protoreflect.EnumDescriptor { - return file_google_container_v1_cluster_service_proto_enumTypes[19].Descriptor() -} - -func (ContainerdConfig_RegistryHostConfig_HostCapability) Type() protoreflect.EnumType { - return &file_google_container_v1_cluster_service_proto_enumTypes[19] -} - -func (x ContainerdConfig_RegistryHostConfig_HostCapability) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use ContainerdConfig_RegistryHostConfig_HostCapability.Descriptor instead. -func (ContainerdConfig_RegistryHostConfig_HostCapability) EnumDescriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{18, 2, 0} -} - -// Possible values for Effect in taint. -type NodeTaint_Effect int32 - -const ( - // Not set - NodeTaint_EFFECT_UNSPECIFIED NodeTaint_Effect = 0 - // NoSchedule - NodeTaint_NO_SCHEDULE NodeTaint_Effect = 1 - // PreferNoSchedule - NodeTaint_PREFER_NO_SCHEDULE NodeTaint_Effect = 2 - // NoExecute - NodeTaint_NO_EXECUTE NodeTaint_Effect = 3 -) - -// Enum value maps for NodeTaint_Effect. -var ( - NodeTaint_Effect_name = map[int32]string{ - 0: "EFFECT_UNSPECIFIED", - 1: "NO_SCHEDULE", - 2: "PREFER_NO_SCHEDULE", - 3: "NO_EXECUTE", - } - NodeTaint_Effect_value = map[string]int32{ - "EFFECT_UNSPECIFIED": 0, - "NO_SCHEDULE": 1, - "PREFER_NO_SCHEDULE": 2, - "NO_EXECUTE": 3, - } -) - -func (x NodeTaint_Effect) Enum() *NodeTaint_Effect { - p := new(NodeTaint_Effect) - *p = x - return p -} - -func (x NodeTaint_Effect) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (NodeTaint_Effect) Descriptor() protoreflect.EnumDescriptor { - return file_google_container_v1_cluster_service_proto_enumTypes[20].Descriptor() -} - -func (NodeTaint_Effect) Type() protoreflect.EnumType { - return &file_google_container_v1_cluster_service_proto_enumTypes[20] -} - -func (x NodeTaint_Effect) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use NodeTaint_Effect.Descriptor instead. -func (NodeTaint_Effect) EnumDescriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{19, 0} -} - -// Load balancer type of ingress service of Cloud Run. -type CloudRunConfig_LoadBalancerType int32 - -const ( - // Load balancer type for Cloud Run is unspecified. - CloudRunConfig_LOAD_BALANCER_TYPE_UNSPECIFIED CloudRunConfig_LoadBalancerType = 0 - // Install external load balancer for Cloud Run. - CloudRunConfig_LOAD_BALANCER_TYPE_EXTERNAL CloudRunConfig_LoadBalancerType = 1 - // Install internal load balancer for Cloud Run. - CloudRunConfig_LOAD_BALANCER_TYPE_INTERNAL CloudRunConfig_LoadBalancerType = 2 -) - -// Enum value maps for CloudRunConfig_LoadBalancerType. -var ( - CloudRunConfig_LoadBalancerType_name = map[int32]string{ - 0: "LOAD_BALANCER_TYPE_UNSPECIFIED", - 1: "LOAD_BALANCER_TYPE_EXTERNAL", - 2: "LOAD_BALANCER_TYPE_INTERNAL", - } - CloudRunConfig_LoadBalancerType_value = map[string]int32{ - "LOAD_BALANCER_TYPE_UNSPECIFIED": 0, - "LOAD_BALANCER_TYPE_EXTERNAL": 1, - "LOAD_BALANCER_TYPE_INTERNAL": 2, - } -) - -func (x CloudRunConfig_LoadBalancerType) Enum() *CloudRunConfig_LoadBalancerType { - p := new(CloudRunConfig_LoadBalancerType) - *p = x - return p -} - -func (x CloudRunConfig_LoadBalancerType) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (CloudRunConfig_LoadBalancerType) Descriptor() protoreflect.EnumDescriptor { - return file_google_container_v1_cluster_service_proto_enumTypes[21].Descriptor() -} - -func (CloudRunConfig_LoadBalancerType) Type() protoreflect.EnumType { - return &file_google_container_v1_cluster_service_proto_enumTypes[21] -} - -func (x CloudRunConfig_LoadBalancerType) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use CloudRunConfig_LoadBalancerType.Descriptor instead. -func (CloudRunConfig_LoadBalancerType) EnumDescriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{35, 0} -} - -// Allowed Network Policy providers. -type NetworkPolicy_Provider int32 - -const ( - // Not set - NetworkPolicy_PROVIDER_UNSPECIFIED NetworkPolicy_Provider = 0 - // Tigera (Calico Felix). - NetworkPolicy_CALICO NetworkPolicy_Provider = 1 -) - -// Enum value maps for NetworkPolicy_Provider. -var ( - NetworkPolicy_Provider_name = map[int32]string{ - 0: "PROVIDER_UNSPECIFIED", - 1: "CALICO", - } - NetworkPolicy_Provider_value = map[string]int32{ - "PROVIDER_UNSPECIFIED": 0, - "CALICO": 1, - } -) - -func (x NetworkPolicy_Provider) Enum() *NetworkPolicy_Provider { - p := new(NetworkPolicy_Provider) - *p = x - return p -} - -func (x NetworkPolicy_Provider) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (NetworkPolicy_Provider) Descriptor() protoreflect.EnumDescriptor { - return file_google_container_v1_cluster_service_proto_enumTypes[22].Descriptor() -} - -func (NetworkPolicy_Provider) Type() protoreflect.EnumType { - return &file_google_container_v1_cluster_service_proto_enumTypes[22] -} - -func (x NetworkPolicy_Provider) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use NetworkPolicy_Provider.Descriptor instead. -func (NetworkPolicy_Provider) EnumDescriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{49, 0} -} - -// Binary Authorization mode of operation. -type BinaryAuthorization_EvaluationMode int32 - -const ( - // Default value - BinaryAuthorization_EVALUATION_MODE_UNSPECIFIED BinaryAuthorization_EvaluationMode = 0 - // Disable BinaryAuthorization - BinaryAuthorization_DISABLED BinaryAuthorization_EvaluationMode = 1 - // Enforce Kubernetes admission requests with BinaryAuthorization using the - // project's singleton policy. This is equivalent to setting the - // enabled boolean to true. - BinaryAuthorization_PROJECT_SINGLETON_POLICY_ENFORCE BinaryAuthorization_EvaluationMode = 2 -) - -// Enum value maps for BinaryAuthorization_EvaluationMode. -var ( - BinaryAuthorization_EvaluationMode_name = map[int32]string{ - 0: "EVALUATION_MODE_UNSPECIFIED", - 1: "DISABLED", - 2: "PROJECT_SINGLETON_POLICY_ENFORCE", - } - BinaryAuthorization_EvaluationMode_value = map[string]int32{ - "EVALUATION_MODE_UNSPECIFIED": 0, - "DISABLED": 1, - "PROJECT_SINGLETON_POLICY_ENFORCE": 2, - } -) - -func (x BinaryAuthorization_EvaluationMode) Enum() *BinaryAuthorization_EvaluationMode { - p := new(BinaryAuthorization_EvaluationMode) - *p = x - return p -} - -func (x BinaryAuthorization_EvaluationMode) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (BinaryAuthorization_EvaluationMode) Descriptor() protoreflect.EnumDescriptor { - return file_google_container_v1_cluster_service_proto_enumTypes[23].Descriptor() -} - -func (BinaryAuthorization_EvaluationMode) Type() protoreflect.EnumType { - return &file_google_container_v1_cluster_service_proto_enumTypes[23] -} - -func (x BinaryAuthorization_EvaluationMode) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use BinaryAuthorization_EvaluationMode.Descriptor instead. -func (BinaryAuthorization_EvaluationMode) EnumDescriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{50, 0} -} - -// The current status of the cluster. -type Cluster_Status int32 - -const ( - // Not set. - Cluster_STATUS_UNSPECIFIED Cluster_Status = 0 - // The PROVISIONING state indicates the cluster is being created. - Cluster_PROVISIONING Cluster_Status = 1 - // The RUNNING state indicates the cluster has been created and is fully - // usable. - Cluster_RUNNING Cluster_Status = 2 - // The RECONCILING state indicates that some work is actively being done on - // the cluster, such as upgrading the master or node software. Details can - // be found in the `statusMessage` field. - Cluster_RECONCILING Cluster_Status = 3 - // The STOPPING state indicates the cluster is being deleted. - Cluster_STOPPING Cluster_Status = 4 - // The ERROR state indicates the cluster is unusable. It will be - // automatically deleted. Details can be found in the `statusMessage` field. - Cluster_ERROR Cluster_Status = 5 - // The DEGRADED state indicates the cluster requires user action to restore - // full functionality. Details can be found in the `statusMessage` field. - Cluster_DEGRADED Cluster_Status = 6 -) - -// Enum value maps for Cluster_Status. -var ( - Cluster_Status_name = map[int32]string{ - 0: "STATUS_UNSPECIFIED", - 1: "PROVISIONING", - 2: "RUNNING", - 3: "RECONCILING", - 4: "STOPPING", - 5: "ERROR", - 6: "DEGRADED", - } - Cluster_Status_value = map[string]int32{ - "STATUS_UNSPECIFIED": 0, - "PROVISIONING": 1, - "RUNNING": 2, - "RECONCILING": 3, - "STOPPING": 4, - "ERROR": 5, - "DEGRADED": 6, - } -) - -func (x Cluster_Status) Enum() *Cluster_Status { - p := new(Cluster_Status) - *p = x - return p -} - -func (x Cluster_Status) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (Cluster_Status) Descriptor() protoreflect.EnumDescriptor { - return file_google_container_v1_cluster_service_proto_enumTypes[24].Descriptor() -} - -func (Cluster_Status) Type() protoreflect.EnumType { - return &file_google_container_v1_cluster_service_proto_enumTypes[24] -} - -func (x Cluster_Status) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use Cluster_Status.Descriptor instead. -func (Cluster_Status) EnumDescriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{53, 0} -} - -// Mode defines the mode of anonymous authentication -// allowed in the cluster. -type AnonymousAuthenticationConfig_Mode int32 - -const ( - // Default value not specified. - AnonymousAuthenticationConfig_MODE_UNSPECIFIED AnonymousAuthenticationConfig_Mode = 0 - // Anonymous authentication is allowed for all endpoints. - AnonymousAuthenticationConfig_ENABLED AnonymousAuthenticationConfig_Mode = 1 - // Anonymous authentication is allowed for only health check endpoints. - AnonymousAuthenticationConfig_LIMITED AnonymousAuthenticationConfig_Mode = 2 -) - -// Enum value maps for AnonymousAuthenticationConfig_Mode. -var ( - AnonymousAuthenticationConfig_Mode_name = map[int32]string{ - 0: "MODE_UNSPECIFIED", - 1: "ENABLED", - 2: "LIMITED", - } - AnonymousAuthenticationConfig_Mode_value = map[string]int32{ - "MODE_UNSPECIFIED": 0, - "ENABLED": 1, - "LIMITED": 2, - } -) - -func (x AnonymousAuthenticationConfig_Mode) Enum() *AnonymousAuthenticationConfig_Mode { - p := new(AnonymousAuthenticationConfig_Mode) - *p = x - return p -} - -func (x AnonymousAuthenticationConfig_Mode) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (AnonymousAuthenticationConfig_Mode) Descriptor() protoreflect.EnumDescriptor { - return file_google_container_v1_cluster_service_proto_enumTypes[25].Descriptor() -} - -func (AnonymousAuthenticationConfig_Mode) Type() protoreflect.EnumType { - return &file_google_container_v1_cluster_service_proto_enumTypes[25] -} - -func (x AnonymousAuthenticationConfig_Mode) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use AnonymousAuthenticationConfig_Mode.Descriptor instead. -func (AnonymousAuthenticationConfig_Mode) EnumDescriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{56, 0} -} - -// Mode defines enablement mode for Compliance Posture. -type CompliancePostureConfig_Mode int32 - -const ( - // Default value not specified. - CompliancePostureConfig_MODE_UNSPECIFIED CompliancePostureConfig_Mode = 0 - // Disables Compliance Posture features on the cluster. - CompliancePostureConfig_DISABLED CompliancePostureConfig_Mode = 1 - // Enables Compliance Posture features on the cluster. - CompliancePostureConfig_ENABLED CompliancePostureConfig_Mode = 2 -) - -// Enum value maps for CompliancePostureConfig_Mode. -var ( - CompliancePostureConfig_Mode_name = map[int32]string{ - 0: "MODE_UNSPECIFIED", - 1: "DISABLED", - 2: "ENABLED", - } - CompliancePostureConfig_Mode_value = map[string]int32{ - "MODE_UNSPECIFIED": 0, - "DISABLED": 1, - "ENABLED": 2, - } -) - -func (x CompliancePostureConfig_Mode) Enum() *CompliancePostureConfig_Mode { - p := new(CompliancePostureConfig_Mode) - *p = x - return p -} - -func (x CompliancePostureConfig_Mode) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (CompliancePostureConfig_Mode) Descriptor() protoreflect.EnumDescriptor { - return file_google_container_v1_cluster_service_proto_enumTypes[26].Descriptor() -} - -func (CompliancePostureConfig_Mode) Type() protoreflect.EnumType { - return &file_google_container_v1_cluster_service_proto_enumTypes[26] -} - -func (x CompliancePostureConfig_Mode) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use CompliancePostureConfig_Mode.Descriptor instead. -func (CompliancePostureConfig_Mode) EnumDescriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{57, 0} -} - -// Mode defines enablement mode for GKE Security posture features. -type SecurityPostureConfig_Mode int32 - -const ( - // Default value not specified. - SecurityPostureConfig_MODE_UNSPECIFIED SecurityPostureConfig_Mode = 0 - // Disables Security Posture features on the cluster. - SecurityPostureConfig_DISABLED SecurityPostureConfig_Mode = 1 - // Applies Security Posture features on the cluster. - SecurityPostureConfig_BASIC SecurityPostureConfig_Mode = 2 - // Applies the Security Posture off cluster Enterprise level features. - SecurityPostureConfig_ENTERPRISE SecurityPostureConfig_Mode = 3 -) - -// Enum value maps for SecurityPostureConfig_Mode. -var ( - SecurityPostureConfig_Mode_name = map[int32]string{ - 0: "MODE_UNSPECIFIED", - 1: "DISABLED", - 2: "BASIC", - 3: "ENTERPRISE", - } - SecurityPostureConfig_Mode_value = map[string]int32{ - "MODE_UNSPECIFIED": 0, - "DISABLED": 1, - "BASIC": 2, - "ENTERPRISE": 3, - } -) - -func (x SecurityPostureConfig_Mode) Enum() *SecurityPostureConfig_Mode { - p := new(SecurityPostureConfig_Mode) - *p = x - return p -} - -func (x SecurityPostureConfig_Mode) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (SecurityPostureConfig_Mode) Descriptor() protoreflect.EnumDescriptor { - return file_google_container_v1_cluster_service_proto_enumTypes[27].Descriptor() -} - -func (SecurityPostureConfig_Mode) Type() protoreflect.EnumType { - return &file_google_container_v1_cluster_service_proto_enumTypes[27] -} - -func (x SecurityPostureConfig_Mode) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use SecurityPostureConfig_Mode.Descriptor instead. -func (SecurityPostureConfig_Mode) EnumDescriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{59, 0} -} - -// VulnerabilityMode defines enablement mode for vulnerability scanning. -type SecurityPostureConfig_VulnerabilityMode int32 - -const ( - // Default value not specified. - SecurityPostureConfig_VULNERABILITY_MODE_UNSPECIFIED SecurityPostureConfig_VulnerabilityMode = 0 - // Disables vulnerability scanning on the cluster. - SecurityPostureConfig_VULNERABILITY_DISABLED SecurityPostureConfig_VulnerabilityMode = 1 - // Applies basic vulnerability scanning on the cluster. - SecurityPostureConfig_VULNERABILITY_BASIC SecurityPostureConfig_VulnerabilityMode = 2 - // Applies the Security Posture's vulnerability on cluster Enterprise level - // features. - SecurityPostureConfig_VULNERABILITY_ENTERPRISE SecurityPostureConfig_VulnerabilityMode = 3 -) - -// Enum value maps for SecurityPostureConfig_VulnerabilityMode. -var ( - SecurityPostureConfig_VulnerabilityMode_name = map[int32]string{ - 0: "VULNERABILITY_MODE_UNSPECIFIED", - 1: "VULNERABILITY_DISABLED", - 2: "VULNERABILITY_BASIC", - 3: "VULNERABILITY_ENTERPRISE", - } - SecurityPostureConfig_VulnerabilityMode_value = map[string]int32{ - "VULNERABILITY_MODE_UNSPECIFIED": 0, - "VULNERABILITY_DISABLED": 1, - "VULNERABILITY_BASIC": 2, - "VULNERABILITY_ENTERPRISE": 3, - } -) - -func (x SecurityPostureConfig_VulnerabilityMode) Enum() *SecurityPostureConfig_VulnerabilityMode { - p := new(SecurityPostureConfig_VulnerabilityMode) - *p = x - return p -} - -func (x SecurityPostureConfig_VulnerabilityMode) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (SecurityPostureConfig_VulnerabilityMode) Descriptor() protoreflect.EnumDescriptor { - return file_google_container_v1_cluster_service_proto_enumTypes[28].Descriptor() -} - -func (SecurityPostureConfig_VulnerabilityMode) Type() protoreflect.EnumType { - return &file_google_container_v1_cluster_service_proto_enumTypes[28] -} - -func (x SecurityPostureConfig_VulnerabilityMode) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use SecurityPostureConfig_VulnerabilityMode.Descriptor instead. -func (SecurityPostureConfig_VulnerabilityMode) EnumDescriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{59, 1} -} - -// Additional subnet with DRAINING status will not be selected during new node -// pool creation. To undrain the draining status, update the cluster to set -// the sunbet to ACTIVE status. To remove the additional subnet, use the -// update cluster API to remove the subnet from the -// desired_additional_ip_ranges list. IP ranges can be removed regardless of -// its status, as long as no node pools are using them. -type AdditionalIPRangesConfig_Status int32 - -const ( - // Not set, same as ACTIVE. - AdditionalIPRangesConfig_STATUS_UNSPECIFIED AdditionalIPRangesConfig_Status = 0 - // ACTIVE status indicates that the subnet is available for new node pool - // creation. - AdditionalIPRangesConfig_ACTIVE AdditionalIPRangesConfig_Status = 1 - // DRAINING status indicates that the subnet is not used for new node pool - // creation. - AdditionalIPRangesConfig_DRAINING AdditionalIPRangesConfig_Status = 2 -) - -// Enum value maps for AdditionalIPRangesConfig_Status. -var ( - AdditionalIPRangesConfig_Status_name = map[int32]string{ - 0: "STATUS_UNSPECIFIED", - 1: "ACTIVE", - 2: "DRAINING", - } - AdditionalIPRangesConfig_Status_value = map[string]int32{ - "STATUS_UNSPECIFIED": 0, - "ACTIVE": 1, - "DRAINING": 2, - } -) - -func (x AdditionalIPRangesConfig_Status) Enum() *AdditionalIPRangesConfig_Status { - p := new(AdditionalIPRangesConfig_Status) - *p = x - return p -} - -func (x AdditionalIPRangesConfig_Status) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (AdditionalIPRangesConfig_Status) Descriptor() protoreflect.EnumDescriptor { - return file_google_container_v1_cluster_service_proto_enumTypes[29].Descriptor() -} - -func (AdditionalIPRangesConfig_Status) Type() protoreflect.EnumType { - return &file_google_container_v1_cluster_service_proto_enumTypes[29] -} - -func (x AdditionalIPRangesConfig_Status) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use AdditionalIPRangesConfig_Status.Descriptor instead. -func (AdditionalIPRangesConfig_Status) EnumDescriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{65, 0} -} - -// Current status of the operation. -type Operation_Status int32 - -const ( - // Not set. - Operation_STATUS_UNSPECIFIED Operation_Status = 0 - // The operation has been created. - Operation_PENDING Operation_Status = 1 - // The operation is currently running. - Operation_RUNNING Operation_Status = 2 - // The operation is done, either cancelled or completed. - Operation_DONE Operation_Status = 3 - // The operation is aborting. - Operation_ABORTING Operation_Status = 4 -) - -// Enum value maps for Operation_Status. -var ( - Operation_Status_name = map[int32]string{ - 0: "STATUS_UNSPECIFIED", - 1: "PENDING", - 2: "RUNNING", - 3: "DONE", - 4: "ABORTING", - } - Operation_Status_value = map[string]int32{ - "STATUS_UNSPECIFIED": 0, - "PENDING": 1, - "RUNNING": 2, - "DONE": 3, - "ABORTING": 4, - } -) - -func (x Operation_Status) Enum() *Operation_Status { - p := new(Operation_Status) - *p = x - return p -} - -func (x Operation_Status) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (Operation_Status) Descriptor() protoreflect.EnumDescriptor { - return file_google_container_v1_cluster_service_proto_enumTypes[30].Descriptor() -} - -func (Operation_Status) Type() protoreflect.EnumType { - return &file_google_container_v1_cluster_service_proto_enumTypes[30] -} - -func (x Operation_Status) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use Operation_Status.Descriptor instead. -func (Operation_Status) EnumDescriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{70, 0} -} - -// Operation type categorizes the operation. -type Operation_Type int32 - -const ( - // Not set. - Operation_TYPE_UNSPECIFIED Operation_Type = 0 - // The cluster is being created. The cluster should be assumed to be - // unusable until the operation finishes. - // - // In the event of the operation failing, the cluster will enter the - // [ERROR state][google.container.v1.Cluster.Status.ERROR] and eventually be - // deleted. - Operation_CREATE_CLUSTER Operation_Type = 1 - // The cluster is being deleted. The cluster should be assumed to be - // unusable as soon as this operation starts. - // - // In the event of the operation failing, the cluster will enter the - // [ERROR state][google.container.v1.Cluster.Status.ERROR] and the deletion - // will be automatically retried until completed. - Operation_DELETE_CLUSTER Operation_Type = 2 - // The [cluster - // version][google.container.v1.ClusterUpdate.desired_master_version] is - // being updated. Note that this includes "upgrades" to the same version, - // which are simply a recreation. This also includes - // [auto-upgrades](https://cloud.google.com/kubernetes-engine/docs/concepts/cluster-upgrades#upgrading_automatically). - // For more details, see [documentation on cluster - // upgrades](https://cloud.google.com/kubernetes-engine/docs/concepts/cluster-upgrades#cluster_upgrades). - Operation_UPGRADE_MASTER Operation_Type = 3 - // A node pool is being updated. Despite calling this an "upgrade", this - // includes most forms of updates to node pools. This also includes - // [auto-upgrades](https://cloud.google.com/kubernetes-engine/docs/how-to/node-auto-upgrades). - // - // This operation sets the - // [progress][google.container.v1.Operation.progress] field and may be - // [canceled][google.container.v1.ClusterManager.CancelOperation]. - // - // The upgrade strategy depends on [node pool - // configuration](https://cloud.google.com/kubernetes-engine/docs/concepts/node-pool-upgrade-strategies). - // The nodes are generally still usable during this operation. - Operation_UPGRADE_NODES Operation_Type = 4 - // A problem has been detected with the control plane and is being repaired. - // This operation type is initiated by GKE. For more details, see - // [documentation on - // repairs](https://cloud.google.com/kubernetes-engine/docs/concepts/maintenance-windows-and-exclusions#repairs). - Operation_REPAIR_CLUSTER Operation_Type = 5 - // The cluster is being updated. This is a broad category of operations and - // includes operations that only change metadata as well as those that must - // recreate the entire cluster. If the control plane must be recreated, this - // will cause temporary downtime for zonal clusters. - // - // Some features require recreating the nodes as well. Those will be - // recreated as separate operations and the update may not be completely - // functional until the node pools recreations finish. Node recreations will - // generally follow [maintenance - // policies](https://cloud.google.com/kubernetes-engine/docs/concepts/maintenance-windows-and-exclusions). - // - // Some GKE-initiated operations use this type. This includes certain types - // of auto-upgrades and incident mitigations. - Operation_UPDATE_CLUSTER Operation_Type = 6 - // A node pool is being created. The node pool should be assumed to be - // unusable until this operation finishes. In the event of an error, the - // node pool may be partially created. - // - // If enabled, [node - // autoprovisioning](https://cloud.google.com/kubernetes-engine/docs/how-to/node-auto-provisioning) - // may have automatically initiated such operations. - Operation_CREATE_NODE_POOL Operation_Type = 7 - // The node pool is being deleted. The node pool should be assumed to be - // unusable as soon as this operation starts. - Operation_DELETE_NODE_POOL Operation_Type = 8 - // The node pool's [manamagent][google.container.v1.NodePool.management] - // field is being updated. These operations only update metadata and may be - // concurrent with most other operations. - Operation_SET_NODE_POOL_MANAGEMENT Operation_Type = 9 - // A problem has been detected with nodes and [they are being - // repaired](https://cloud.google.com/kubernetes-engine/docs/how-to/node-auto-repair). - // This operation type is initiated by GKE, typically automatically. This - // operation may be concurrent with other operations and there may be - // multiple repairs occurring on the same node pool. - Operation_AUTO_REPAIR_NODES Operation_Type = 10 - // Unused. Automatic node upgrade uses - // [UPGRADE_NODES][google.container.v1.Operation.Type.UPGRADE_NODES]. - // - // Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. - Operation_AUTO_UPGRADE_NODES Operation_Type = 11 - // Unused. Updating labels uses - // [UPDATE_CLUSTER][google.container.v1.Operation.Type.UPDATE_CLUSTER]. - // - // Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. - Operation_SET_LABELS Operation_Type = 12 - // Unused. Updating master auth uses - // [UPDATE_CLUSTER][google.container.v1.Operation.Type.UPDATE_CLUSTER]. - // - // Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. - Operation_SET_MASTER_AUTH Operation_Type = 13 - // The node pool is being resized. With the exception of resizing to or from - // size zero, the node pool is generally usable during this operation. - Operation_SET_NODE_POOL_SIZE Operation_Type = 14 - // Unused. Updating network policy uses - // [UPDATE_CLUSTER][google.container.v1.Operation.Type.UPDATE_CLUSTER]. - // - // Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. - Operation_SET_NETWORK_POLICY Operation_Type = 15 - // Unused. Updating maintenance policy uses - // [UPDATE_CLUSTER][google.container.v1.Operation.Type.UPDATE_CLUSTER]. - // - // Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. - Operation_SET_MAINTENANCE_POLICY Operation_Type = 16 - // The control plane is being resized. This operation type is initiated by - // GKE. These operations are often performed preemptively to ensure that the - // control plane has sufficient resources and is not typically an indication - // of issues. For more details, see - // [documentation on - // resizes](https://cloud.google.com/kubernetes-engine/docs/concepts/maintenance-windows-and-exclusions#repairs). - Operation_RESIZE_CLUSTER Operation_Type = 18 - // Fleet features of GKE Enterprise are being upgraded. The cluster should - // be assumed to be blocked for other upgrades until the operation finishes. - Operation_FLEET_FEATURE_UPGRADE Operation_Type = 19 -) - -// Enum value maps for Operation_Type. -var ( - Operation_Type_name = map[int32]string{ - 0: "TYPE_UNSPECIFIED", - 1: "CREATE_CLUSTER", - 2: "DELETE_CLUSTER", - 3: "UPGRADE_MASTER", - 4: "UPGRADE_NODES", - 5: "REPAIR_CLUSTER", - 6: "UPDATE_CLUSTER", - 7: "CREATE_NODE_POOL", - 8: "DELETE_NODE_POOL", - 9: "SET_NODE_POOL_MANAGEMENT", - 10: "AUTO_REPAIR_NODES", - 11: "AUTO_UPGRADE_NODES", - 12: "SET_LABELS", - 13: "SET_MASTER_AUTH", - 14: "SET_NODE_POOL_SIZE", - 15: "SET_NETWORK_POLICY", - 16: "SET_MAINTENANCE_POLICY", - 18: "RESIZE_CLUSTER", - 19: "FLEET_FEATURE_UPGRADE", - } - Operation_Type_value = map[string]int32{ - "TYPE_UNSPECIFIED": 0, - "CREATE_CLUSTER": 1, - "DELETE_CLUSTER": 2, - "UPGRADE_MASTER": 3, - "UPGRADE_NODES": 4, - "REPAIR_CLUSTER": 5, - "UPDATE_CLUSTER": 6, - "CREATE_NODE_POOL": 7, - "DELETE_NODE_POOL": 8, - "SET_NODE_POOL_MANAGEMENT": 9, - "AUTO_REPAIR_NODES": 10, - "AUTO_UPGRADE_NODES": 11, - "SET_LABELS": 12, - "SET_MASTER_AUTH": 13, - "SET_NODE_POOL_SIZE": 14, - "SET_NETWORK_POLICY": 15, - "SET_MAINTENANCE_POLICY": 16, - "RESIZE_CLUSTER": 18, - "FLEET_FEATURE_UPGRADE": 19, - } -) - -func (x Operation_Type) Enum() *Operation_Type { - p := new(Operation_Type) - *p = x - return p -} - -func (x Operation_Type) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (Operation_Type) Descriptor() protoreflect.EnumDescriptor { - return file_google_container_v1_cluster_service_proto_enumTypes[31].Descriptor() -} - -func (Operation_Type) Type() protoreflect.EnumType { - return &file_google_container_v1_cluster_service_proto_enumTypes[31] -} - -func (x Operation_Type) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use Operation_Type.Descriptor instead. -func (Operation_Type) EnumDescriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{70, 1} -} - -// Operation type: what type update to perform. -type SetMasterAuthRequest_Action int32 - -const ( - // Operation is unknown and will error out. - SetMasterAuthRequest_UNKNOWN SetMasterAuthRequest_Action = 0 - // Set the password to a user generated value. - SetMasterAuthRequest_SET_PASSWORD SetMasterAuthRequest_Action = 1 - // Generate a new password and set it to that. - SetMasterAuthRequest_GENERATE_PASSWORD SetMasterAuthRequest_Action = 2 - // Set the username. If an empty username is provided, basic authentication - // is disabled for the cluster. If a non-empty username is provided, basic - // authentication is enabled, with either a provided password or a generated - // one. - SetMasterAuthRequest_SET_USERNAME SetMasterAuthRequest_Action = 3 -) - -// Enum value maps for SetMasterAuthRequest_Action. -var ( - SetMasterAuthRequest_Action_name = map[int32]string{ - 0: "UNKNOWN", - 1: "SET_PASSWORD", - 2: "GENERATE_PASSWORD", - 3: "SET_USERNAME", - } - SetMasterAuthRequest_Action_value = map[string]int32{ - "UNKNOWN": 0, - "SET_PASSWORD": 1, - "GENERATE_PASSWORD": 2, - "SET_USERNAME": 3, - } -) - -func (x SetMasterAuthRequest_Action) Enum() *SetMasterAuthRequest_Action { - p := new(SetMasterAuthRequest_Action) - *p = x - return p -} - -func (x SetMasterAuthRequest_Action) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (SetMasterAuthRequest_Action) Descriptor() protoreflect.EnumDescriptor { - return file_google_container_v1_cluster_service_proto_enumTypes[32].Descriptor() -} - -func (SetMasterAuthRequest_Action) Type() protoreflect.EnumType { - return &file_google_container_v1_cluster_service_proto_enumTypes[32] -} - -func (x SetMasterAuthRequest_Action) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use SetMasterAuthRequest_Action.Descriptor instead. -func (SetMasterAuthRequest_Action) EnumDescriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{82, 0} -} - -// The current status of the node pool instance. -type NodePool_Status int32 - -const ( - // Not set. - NodePool_STATUS_UNSPECIFIED NodePool_Status = 0 - // The PROVISIONING state indicates the node pool is being created. - NodePool_PROVISIONING NodePool_Status = 1 - // The RUNNING state indicates the node pool has been created - // and is fully usable. - NodePool_RUNNING NodePool_Status = 2 - // The RUNNING_WITH_ERROR state indicates the node pool has been created - // and is partially usable. Some error state has occurred and some - // functionality may be impaired. Customer may need to reissue a request - // or trigger a new update. - NodePool_RUNNING_WITH_ERROR NodePool_Status = 3 - // The RECONCILING state indicates that some work is actively being done on - // the node pool, such as upgrading node software. Details can - // be found in the `statusMessage` field. - NodePool_RECONCILING NodePool_Status = 4 - // The STOPPING state indicates the node pool is being deleted. - NodePool_STOPPING NodePool_Status = 5 - // The ERROR state indicates the node pool may be unusable. Details - // can be found in the `statusMessage` field. - NodePool_ERROR NodePool_Status = 6 -) - -// Enum value maps for NodePool_Status. -var ( - NodePool_Status_name = map[int32]string{ - 0: "STATUS_UNSPECIFIED", - 1: "PROVISIONING", - 2: "RUNNING", - 3: "RUNNING_WITH_ERROR", - 4: "RECONCILING", - 5: "STOPPING", - 6: "ERROR", - } - NodePool_Status_value = map[string]int32{ - "STATUS_UNSPECIFIED": 0, - "PROVISIONING": 1, - "RUNNING": 2, - "RUNNING_WITH_ERROR": 3, - "RECONCILING": 4, - "STOPPING": 5, - "ERROR": 6, - } -) - -func (x NodePool_Status) Enum() *NodePool_Status { - p := new(NodePool_Status) - *p = x - return p -} - -func (x NodePool_Status) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (NodePool_Status) Descriptor() protoreflect.EnumDescriptor { - return file_google_container_v1_cluster_service_proto_enumTypes[33].Descriptor() -} - -func (NodePool_Status) Type() protoreflect.EnumType { - return &file_google_container_v1_cluster_service_proto_enumTypes[33] -} - -func (x NodePool_Status) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use NodePool_Status.Descriptor instead. -func (NodePool_Status) EnumDescriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{97, 0} -} - -// Phase represents the different stages blue-green upgrade is running in. -type NodePool_UpdateInfo_BlueGreenInfo_Phase int32 - -const ( - // Unspecified phase. - NodePool_UpdateInfo_BlueGreenInfo_PHASE_UNSPECIFIED NodePool_UpdateInfo_BlueGreenInfo_Phase = 0 - // blue-green upgrade has been initiated. - NodePool_UpdateInfo_BlueGreenInfo_UPDATE_STARTED NodePool_UpdateInfo_BlueGreenInfo_Phase = 1 - // Start creating green pool nodes. - NodePool_UpdateInfo_BlueGreenInfo_CREATING_GREEN_POOL NodePool_UpdateInfo_BlueGreenInfo_Phase = 2 - // Start cordoning blue pool nodes. - NodePool_UpdateInfo_BlueGreenInfo_CORDONING_BLUE_POOL NodePool_UpdateInfo_BlueGreenInfo_Phase = 3 - // Start draining blue pool nodes. - NodePool_UpdateInfo_BlueGreenInfo_DRAINING_BLUE_POOL NodePool_UpdateInfo_BlueGreenInfo_Phase = 4 - // Start soaking time after draining entire blue pool. - NodePool_UpdateInfo_BlueGreenInfo_NODE_POOL_SOAKING NodePool_UpdateInfo_BlueGreenInfo_Phase = 5 - // Start deleting blue nodes. - NodePool_UpdateInfo_BlueGreenInfo_DELETING_BLUE_POOL NodePool_UpdateInfo_BlueGreenInfo_Phase = 6 - // Rollback has been initiated. - NodePool_UpdateInfo_BlueGreenInfo_ROLLBACK_STARTED NodePool_UpdateInfo_BlueGreenInfo_Phase = 7 -) - -// Enum value maps for NodePool_UpdateInfo_BlueGreenInfo_Phase. -var ( - NodePool_UpdateInfo_BlueGreenInfo_Phase_name = map[int32]string{ - 0: "PHASE_UNSPECIFIED", - 1: "UPDATE_STARTED", - 2: "CREATING_GREEN_POOL", - 3: "CORDONING_BLUE_POOL", - 4: "DRAINING_BLUE_POOL", - 5: "NODE_POOL_SOAKING", - 6: "DELETING_BLUE_POOL", - 7: "ROLLBACK_STARTED", - } - NodePool_UpdateInfo_BlueGreenInfo_Phase_value = map[string]int32{ - "PHASE_UNSPECIFIED": 0, - "UPDATE_STARTED": 1, - "CREATING_GREEN_POOL": 2, - "CORDONING_BLUE_POOL": 3, - "DRAINING_BLUE_POOL": 4, - "NODE_POOL_SOAKING": 5, - "DELETING_BLUE_POOL": 6, - "ROLLBACK_STARTED": 7, - } -) - -func (x NodePool_UpdateInfo_BlueGreenInfo_Phase) Enum() *NodePool_UpdateInfo_BlueGreenInfo_Phase { - p := new(NodePool_UpdateInfo_BlueGreenInfo_Phase) - *p = x - return p -} - -func (x NodePool_UpdateInfo_BlueGreenInfo_Phase) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (NodePool_UpdateInfo_BlueGreenInfo_Phase) Descriptor() protoreflect.EnumDescriptor { - return file_google_container_v1_cluster_service_proto_enumTypes[34].Descriptor() -} - -func (NodePool_UpdateInfo_BlueGreenInfo_Phase) Type() protoreflect.EnumType { - return &file_google_container_v1_cluster_service_proto_enumTypes[34] -} - -func (x NodePool_UpdateInfo_BlueGreenInfo_Phase) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use NodePool_UpdateInfo_BlueGreenInfo_Phase.Descriptor instead. -func (NodePool_UpdateInfo_BlueGreenInfo_Phase) EnumDescriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{97, 1, 0, 0} -} - -// Type defines the type of placement policy. -type NodePool_PlacementPolicy_Type int32 - -const ( - // TYPE_UNSPECIFIED specifies no requirements on nodes - // placement. - NodePool_PlacementPolicy_TYPE_UNSPECIFIED NodePool_PlacementPolicy_Type = 0 - // COMPACT specifies node placement in the same availability domain to - // ensure low communication latency. - NodePool_PlacementPolicy_COMPACT NodePool_PlacementPolicy_Type = 1 -) - -// Enum value maps for NodePool_PlacementPolicy_Type. -var ( - NodePool_PlacementPolicy_Type_name = map[int32]string{ - 0: "TYPE_UNSPECIFIED", - 1: "COMPACT", - } - NodePool_PlacementPolicy_Type_value = map[string]int32{ - "TYPE_UNSPECIFIED": 0, - "COMPACT": 1, - } -) - -func (x NodePool_PlacementPolicy_Type) Enum() *NodePool_PlacementPolicy_Type { - p := new(NodePool_PlacementPolicy_Type) - *p = x - return p -} - -func (x NodePool_PlacementPolicy_Type) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (NodePool_PlacementPolicy_Type) Descriptor() protoreflect.EnumDescriptor { - return file_google_container_v1_cluster_service_proto_enumTypes[35].Descriptor() -} - -func (NodePool_PlacementPolicy_Type) Type() protoreflect.EnumType { - return &file_google_container_v1_cluster_service_proto_enumTypes[35] -} - -func (x NodePool_PlacementPolicy_Type) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use NodePool_PlacementPolicy_Type.Descriptor instead. -func (NodePool_PlacementPolicy_Type) EnumDescriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{97, 2, 0} -} - -// Scope of exclusion. -type MaintenanceExclusionOptions_Scope int32 - -const ( - // NO_UPGRADES excludes all upgrades, including patch upgrades and minor - // upgrades across control planes and nodes. This is the default exclusion - // behavior. - MaintenanceExclusionOptions_NO_UPGRADES MaintenanceExclusionOptions_Scope = 0 - // NO_MINOR_UPGRADES excludes all minor upgrades for the cluster, only - // patches are allowed. - MaintenanceExclusionOptions_NO_MINOR_UPGRADES MaintenanceExclusionOptions_Scope = 1 - // NO_MINOR_OR_NODE_UPGRADES excludes all minor upgrades for the cluster, - // and also exclude all node pool upgrades. Only control - // plane patches are allowed. - MaintenanceExclusionOptions_NO_MINOR_OR_NODE_UPGRADES MaintenanceExclusionOptions_Scope = 2 -) - -// Enum value maps for MaintenanceExclusionOptions_Scope. -var ( - MaintenanceExclusionOptions_Scope_name = map[int32]string{ - 0: "NO_UPGRADES", - 1: "NO_MINOR_UPGRADES", - 2: "NO_MINOR_OR_NODE_UPGRADES", - } - MaintenanceExclusionOptions_Scope_value = map[string]int32{ - "NO_UPGRADES": 0, - "NO_MINOR_UPGRADES": 1, - "NO_MINOR_OR_NODE_UPGRADES": 2, - } -) - -func (x MaintenanceExclusionOptions_Scope) Enum() *MaintenanceExclusionOptions_Scope { - p := new(MaintenanceExclusionOptions_Scope) - *p = x - return p -} - -func (x MaintenanceExclusionOptions_Scope) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (MaintenanceExclusionOptions_Scope) Descriptor() protoreflect.EnumDescriptor { - return file_google_container_v1_cluster_service_proto_enumTypes[36].Descriptor() -} - -func (MaintenanceExclusionOptions_Scope) Type() protoreflect.EnumType { - return &file_google_container_v1_cluster_service_proto_enumTypes[36] -} - -func (x MaintenanceExclusionOptions_Scope) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use MaintenanceExclusionOptions_Scope.Descriptor instead. -func (MaintenanceExclusionOptions_Scope) EnumDescriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{104, 0} -} - -// EndTimeBehavior specifies the behavior of the exclusion end time. -type MaintenanceExclusionOptions_EndTimeBehavior int32 - -const ( - // END_TIME_BEHAVIOR_UNSPECIFIED is the default behavior, which is fixed - // end time. - MaintenanceExclusionOptions_END_TIME_BEHAVIOR_UNSPECIFIED MaintenanceExclusionOptions_EndTimeBehavior = 0 - // UNTIL_END_OF_SUPPORT means the exclusion will be in effect until the end - // of the support of the cluster's current version. - MaintenanceExclusionOptions_UNTIL_END_OF_SUPPORT MaintenanceExclusionOptions_EndTimeBehavior = 1 -) - -// Enum value maps for MaintenanceExclusionOptions_EndTimeBehavior. -var ( - MaintenanceExclusionOptions_EndTimeBehavior_name = map[int32]string{ - 0: "END_TIME_BEHAVIOR_UNSPECIFIED", - 1: "UNTIL_END_OF_SUPPORT", - } - MaintenanceExclusionOptions_EndTimeBehavior_value = map[string]int32{ - "END_TIME_BEHAVIOR_UNSPECIFIED": 0, - "UNTIL_END_OF_SUPPORT": 1, - } -) - -func (x MaintenanceExclusionOptions_EndTimeBehavior) Enum() *MaintenanceExclusionOptions_EndTimeBehavior { - p := new(MaintenanceExclusionOptions_EndTimeBehavior) - *p = x - return p -} - -func (x MaintenanceExclusionOptions_EndTimeBehavior) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (MaintenanceExclusionOptions_EndTimeBehavior) Descriptor() protoreflect.EnumDescriptor { - return file_google_container_v1_cluster_service_proto_enumTypes[37].Descriptor() -} - -func (MaintenanceExclusionOptions_EndTimeBehavior) Type() protoreflect.EnumType { - return &file_google_container_v1_cluster_service_proto_enumTypes[37] -} - -func (x MaintenanceExclusionOptions_EndTimeBehavior) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use MaintenanceExclusionOptions_EndTimeBehavior.Descriptor instead. -func (MaintenanceExclusionOptions_EndTimeBehavior) EnumDescriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{104, 1} -} - -// Defines possible options for autoscaling_profile field. -type ClusterAutoscaling_AutoscalingProfile int32 - -const ( - // No change to autoscaling configuration. - ClusterAutoscaling_PROFILE_UNSPECIFIED ClusterAutoscaling_AutoscalingProfile = 0 - // Prioritize optimizing utilization of resources. - ClusterAutoscaling_OPTIMIZE_UTILIZATION ClusterAutoscaling_AutoscalingProfile = 1 - // Use default (balanced) autoscaling configuration. - ClusterAutoscaling_BALANCED ClusterAutoscaling_AutoscalingProfile = 2 -) - -// Enum value maps for ClusterAutoscaling_AutoscalingProfile. -var ( - ClusterAutoscaling_AutoscalingProfile_name = map[int32]string{ - 0: "PROFILE_UNSPECIFIED", - 1: "OPTIMIZE_UTILIZATION", - 2: "BALANCED", - } - ClusterAutoscaling_AutoscalingProfile_value = map[string]int32{ - "PROFILE_UNSPECIFIED": 0, - "OPTIMIZE_UTILIZATION": 1, - "BALANCED": 2, - } -) - -func (x ClusterAutoscaling_AutoscalingProfile) Enum() *ClusterAutoscaling_AutoscalingProfile { - p := new(ClusterAutoscaling_AutoscalingProfile) - *p = x - return p -} - -func (x ClusterAutoscaling_AutoscalingProfile) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (ClusterAutoscaling_AutoscalingProfile) Descriptor() protoreflect.EnumDescriptor { - return file_google_container_v1_cluster_service_proto_enumTypes[38].Descriptor() -} - -func (ClusterAutoscaling_AutoscalingProfile) Type() protoreflect.EnumType { - return &file_google_container_v1_cluster_service_proto_enumTypes[38] -} - -func (x ClusterAutoscaling_AutoscalingProfile) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use ClusterAutoscaling_AutoscalingProfile.Descriptor instead. -func (ClusterAutoscaling_AutoscalingProfile) EnumDescriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{112, 0} -} - -// Defines possible options for Autopilot general profile. -type ClusterAutoscaling_AutopilotGeneralProfile int32 - -const ( - // Use default configuration. - ClusterAutoscaling_AUTOPILOT_GENERAL_PROFILE_UNSPECIFIED ClusterAutoscaling_AutopilotGeneralProfile = 0 - // Avoid extra IP consumption. - ClusterAutoscaling_NO_PERFORMANCE ClusterAutoscaling_AutopilotGeneralProfile = 1 -) - -// Enum value maps for ClusterAutoscaling_AutopilotGeneralProfile. -var ( - ClusterAutoscaling_AutopilotGeneralProfile_name = map[int32]string{ - 0: "AUTOPILOT_GENERAL_PROFILE_UNSPECIFIED", - 1: "NO_PERFORMANCE", - } - ClusterAutoscaling_AutopilotGeneralProfile_value = map[string]int32{ - "AUTOPILOT_GENERAL_PROFILE_UNSPECIFIED": 0, - "NO_PERFORMANCE": 1, - } -) - -func (x ClusterAutoscaling_AutopilotGeneralProfile) Enum() *ClusterAutoscaling_AutopilotGeneralProfile { - p := new(ClusterAutoscaling_AutopilotGeneralProfile) - *p = x - return p -} - -func (x ClusterAutoscaling_AutopilotGeneralProfile) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (ClusterAutoscaling_AutopilotGeneralProfile) Descriptor() protoreflect.EnumDescriptor { - return file_google_container_v1_cluster_service_proto_enumTypes[39].Descriptor() -} - -func (ClusterAutoscaling_AutopilotGeneralProfile) Type() protoreflect.EnumType { - return &file_google_container_v1_cluster_service_proto_enumTypes[39] -} - -func (x ClusterAutoscaling_AutopilotGeneralProfile) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use ClusterAutoscaling_AutopilotGeneralProfile.Descriptor instead. -func (ClusterAutoscaling_AutopilotGeneralProfile) EnumDescriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{112, 1} -} - -// Location policy specifies how zones are picked when scaling up the -// nodepool. -type NodePoolAutoscaling_LocationPolicy int32 - -const ( - // Not set. - NodePoolAutoscaling_LOCATION_POLICY_UNSPECIFIED NodePoolAutoscaling_LocationPolicy = 0 - // BALANCED is a best effort policy that aims to balance the sizes of - // different zones. - NodePoolAutoscaling_BALANCED NodePoolAutoscaling_LocationPolicy = 1 - // ANY policy picks zones that have the highest capacity available. - NodePoolAutoscaling_ANY NodePoolAutoscaling_LocationPolicy = 2 -) - -// Enum value maps for NodePoolAutoscaling_LocationPolicy. -var ( - NodePoolAutoscaling_LocationPolicy_name = map[int32]string{ - 0: "LOCATION_POLICY_UNSPECIFIED", - 1: "BALANCED", - 2: "ANY", - } - NodePoolAutoscaling_LocationPolicy_value = map[string]int32{ - "LOCATION_POLICY_UNSPECIFIED": 0, - "BALANCED": 1, - "ANY": 2, - } -) - -func (x NodePoolAutoscaling_LocationPolicy) Enum() *NodePoolAutoscaling_LocationPolicy { - p := new(NodePoolAutoscaling_LocationPolicy) - *p = x - return p -} - -func (x NodePoolAutoscaling_LocationPolicy) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (NodePoolAutoscaling_LocationPolicy) Descriptor() protoreflect.EnumDescriptor { - return file_google_container_v1_cluster_service_proto_enumTypes[40].Descriptor() -} - -func (NodePoolAutoscaling_LocationPolicy) Type() protoreflect.EnumType { - return &file_google_container_v1_cluster_service_proto_enumTypes[40] -} - -func (x NodePoolAutoscaling_LocationPolicy) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use NodePoolAutoscaling_LocationPolicy.Descriptor instead. -func (NodePoolAutoscaling_LocationPolicy) EnumDescriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{116, 0} -} - -// The type of GPU sharing strategy currently provided. -type GPUSharingConfig_GPUSharingStrategy int32 - -const ( - // Default value. - GPUSharingConfig_GPU_SHARING_STRATEGY_UNSPECIFIED GPUSharingConfig_GPUSharingStrategy = 0 - // GPUs are time-shared between containers. - GPUSharingConfig_TIME_SHARING GPUSharingConfig_GPUSharingStrategy = 1 - // GPUs are shared between containers with NVIDIA MPS. - GPUSharingConfig_MPS GPUSharingConfig_GPUSharingStrategy = 2 -) - -// Enum value maps for GPUSharingConfig_GPUSharingStrategy. -var ( - GPUSharingConfig_GPUSharingStrategy_name = map[int32]string{ - 0: "GPU_SHARING_STRATEGY_UNSPECIFIED", - 1: "TIME_SHARING", - 2: "MPS", - } - GPUSharingConfig_GPUSharingStrategy_value = map[string]int32{ - "GPU_SHARING_STRATEGY_UNSPECIFIED": 0, - "TIME_SHARING": 1, - "MPS": 2, - } -) - -func (x GPUSharingConfig_GPUSharingStrategy) Enum() *GPUSharingConfig_GPUSharingStrategy { - p := new(GPUSharingConfig_GPUSharingStrategy) - *p = x - return p -} - -func (x GPUSharingConfig_GPUSharingStrategy) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (GPUSharingConfig_GPUSharingStrategy) Descriptor() protoreflect.EnumDescriptor { - return file_google_container_v1_cluster_service_proto_enumTypes[41].Descriptor() -} - -func (GPUSharingConfig_GPUSharingStrategy) Type() protoreflect.EnumType { - return &file_google_container_v1_cluster_service_proto_enumTypes[41] -} - -func (x GPUSharingConfig_GPUSharingStrategy) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use GPUSharingConfig_GPUSharingStrategy.Descriptor instead. -func (GPUSharingConfig_GPUSharingStrategy) EnumDescriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{122, 0} -} - -// The GPU driver version to install. -type GPUDriverInstallationConfig_GPUDriverVersion int32 - -const ( - // Default value is to not install any GPU driver. - GPUDriverInstallationConfig_GPU_DRIVER_VERSION_UNSPECIFIED GPUDriverInstallationConfig_GPUDriverVersion = 0 - // Disable GPU driver auto installation and needs manual installation - GPUDriverInstallationConfig_INSTALLATION_DISABLED GPUDriverInstallationConfig_GPUDriverVersion = 1 - // "Default" GPU driver in COS and Ubuntu. - GPUDriverInstallationConfig_DEFAULT GPUDriverInstallationConfig_GPUDriverVersion = 2 - // "Latest" GPU driver in COS. - GPUDriverInstallationConfig_LATEST GPUDriverInstallationConfig_GPUDriverVersion = 3 -) - -// Enum value maps for GPUDriverInstallationConfig_GPUDriverVersion. -var ( - GPUDriverInstallationConfig_GPUDriverVersion_name = map[int32]string{ - 0: "GPU_DRIVER_VERSION_UNSPECIFIED", - 1: "INSTALLATION_DISABLED", - 2: "DEFAULT", - 3: "LATEST", - } - GPUDriverInstallationConfig_GPUDriverVersion_value = map[string]int32{ - "GPU_DRIVER_VERSION_UNSPECIFIED": 0, - "INSTALLATION_DISABLED": 1, - "DEFAULT": 2, - "LATEST": 3, - } -) - -func (x GPUDriverInstallationConfig_GPUDriverVersion) Enum() *GPUDriverInstallationConfig_GPUDriverVersion { - p := new(GPUDriverInstallationConfig_GPUDriverVersion) - *p = x - return p -} - -func (x GPUDriverInstallationConfig_GPUDriverVersion) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (GPUDriverInstallationConfig_GPUDriverVersion) Descriptor() protoreflect.EnumDescriptor { - return file_google_container_v1_cluster_service_proto_enumTypes[42].Descriptor() -} - -func (GPUDriverInstallationConfig_GPUDriverVersion) Type() protoreflect.EnumType { - return &file_google_container_v1_cluster_service_proto_enumTypes[42] -} - -func (x GPUDriverInstallationConfig_GPUDriverVersion) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use GPUDriverInstallationConfig_GPUDriverVersion.Descriptor instead. -func (GPUDriverInstallationConfig_GPUDriverVersion) EnumDescriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{123, 0} -} - -// Mode is the configuration for how to expose metadata to workloads running -// on the node. -type WorkloadMetadataConfig_Mode int32 - -const ( - // Not set. - WorkloadMetadataConfig_MODE_UNSPECIFIED WorkloadMetadataConfig_Mode = 0 - // Expose all Compute Engine metadata to pods. - WorkloadMetadataConfig_GCE_METADATA WorkloadMetadataConfig_Mode = 1 - // Run the GKE Metadata Server on this node. The GKE Metadata Server exposes - // a metadata API to workloads that is compatible with the V1 Compute - // Metadata APIs exposed by the Compute Engine and App Engine Metadata - // Servers. This feature can only be enabled if Workload Identity is enabled - // at the cluster level. - WorkloadMetadataConfig_GKE_METADATA WorkloadMetadataConfig_Mode = 2 -) - -// Enum value maps for WorkloadMetadataConfig_Mode. -var ( - WorkloadMetadataConfig_Mode_name = map[int32]string{ - 0: "MODE_UNSPECIFIED", - 1: "GCE_METADATA", - 2: "GKE_METADATA", - } - WorkloadMetadataConfig_Mode_value = map[string]int32{ - "MODE_UNSPECIFIED": 0, - "GCE_METADATA": 1, - "GKE_METADATA": 2, - } -) - -func (x WorkloadMetadataConfig_Mode) Enum() *WorkloadMetadataConfig_Mode { - p := new(WorkloadMetadataConfig_Mode) - *p = x - return p -} - -func (x WorkloadMetadataConfig_Mode) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (WorkloadMetadataConfig_Mode) Descriptor() protoreflect.EnumDescriptor { - return file_google_container_v1_cluster_service_proto_enumTypes[43].Descriptor() -} - -func (WorkloadMetadataConfig_Mode) Type() protoreflect.EnumType { - return &file_google_container_v1_cluster_service_proto_enumTypes[43] -} - -func (x WorkloadMetadataConfig_Mode) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use WorkloadMetadataConfig_Mode.Descriptor instead. -func (WorkloadMetadataConfig_Mode) EnumDescriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{124, 0} -} - -// Code for each condition -type StatusCondition_Code int32 - -const ( - // UNKNOWN indicates a generic condition. - StatusCondition_UNKNOWN StatusCondition_Code = 0 - // GCE_STOCKOUT indicates that Google Compute Engine resources are - // temporarily unavailable. - StatusCondition_GCE_STOCKOUT StatusCondition_Code = 1 - // GKE_SERVICE_ACCOUNT_DELETED indicates that the user deleted their robot - // service account. - StatusCondition_GKE_SERVICE_ACCOUNT_DELETED StatusCondition_Code = 2 - // Google Compute Engine quota was exceeded. - StatusCondition_GCE_QUOTA_EXCEEDED StatusCondition_Code = 3 - // Cluster state was manually changed by an SRE due to a system logic error. - StatusCondition_SET_BY_OPERATOR StatusCondition_Code = 4 - // Unable to perform an encrypt operation against the CloudKMS key used for - // etcd level encryption. - StatusCondition_CLOUD_KMS_KEY_ERROR StatusCondition_Code = 7 - // Cluster CA is expiring soon. - StatusCondition_CA_EXPIRING StatusCondition_Code = 9 - // Node service account is missing permissions. - StatusCondition_NODE_SERVICE_ACCOUNT_MISSING_PERMISSIONS StatusCondition_Code = 10 - // Cloud KMS key version used for etcd level encryption has been destroyed. - // This is a permanent error. - StatusCondition_CLOUD_KMS_KEY_DESTROYED StatusCondition_Code = 11 -) - -// Enum value maps for StatusCondition_Code. -var ( - StatusCondition_Code_name = map[int32]string{ - 0: "UNKNOWN", - 1: "GCE_STOCKOUT", - 2: "GKE_SERVICE_ACCOUNT_DELETED", - 3: "GCE_QUOTA_EXCEEDED", - 4: "SET_BY_OPERATOR", - 7: "CLOUD_KMS_KEY_ERROR", - 9: "CA_EXPIRING", - 10: "NODE_SERVICE_ACCOUNT_MISSING_PERMISSIONS", - 11: "CLOUD_KMS_KEY_DESTROYED", - } - StatusCondition_Code_value = map[string]int32{ - "UNKNOWN": 0, - "GCE_STOCKOUT": 1, - "GKE_SERVICE_ACCOUNT_DELETED": 2, - "GCE_QUOTA_EXCEEDED": 3, - "SET_BY_OPERATOR": 4, - "CLOUD_KMS_KEY_ERROR": 7, - "CA_EXPIRING": 9, - "NODE_SERVICE_ACCOUNT_MISSING_PERMISSIONS": 10, - "CLOUD_KMS_KEY_DESTROYED": 11, - } -) - -func (x StatusCondition_Code) Enum() *StatusCondition_Code { - p := new(StatusCondition_Code) - *p = x - return p -} - -func (x StatusCondition_Code) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (StatusCondition_Code) Descriptor() protoreflect.EnumDescriptor { - return file_google_container_v1_cluster_service_proto_enumTypes[44].Descriptor() -} - -func (StatusCondition_Code) Type() protoreflect.EnumType { - return &file_google_container_v1_cluster_service_proto_enumTypes[44] -} - -func (x StatusCondition_Code) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use StatusCondition_Code.Descriptor instead. -func (StatusCondition_Code) EnumDescriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{127, 0} -} - -// Node network tier -type NetworkConfig_ClusterNetworkPerformanceConfig_Tier int32 - -const ( - // Default value - NetworkConfig_ClusterNetworkPerformanceConfig_TIER_UNSPECIFIED NetworkConfig_ClusterNetworkPerformanceConfig_Tier = 0 - // Higher bandwidth, actual values based on VM size. - NetworkConfig_ClusterNetworkPerformanceConfig_TIER_1 NetworkConfig_ClusterNetworkPerformanceConfig_Tier = 1 -) - -// Enum value maps for NetworkConfig_ClusterNetworkPerformanceConfig_Tier. -var ( - NetworkConfig_ClusterNetworkPerformanceConfig_Tier_name = map[int32]string{ - 0: "TIER_UNSPECIFIED", - 1: "TIER_1", - } - NetworkConfig_ClusterNetworkPerformanceConfig_Tier_value = map[string]int32{ - "TIER_UNSPECIFIED": 0, - "TIER_1": 1, - } -) - -func (x NetworkConfig_ClusterNetworkPerformanceConfig_Tier) Enum() *NetworkConfig_ClusterNetworkPerformanceConfig_Tier { - p := new(NetworkConfig_ClusterNetworkPerformanceConfig_Tier) - *p = x - return p -} - -func (x NetworkConfig_ClusterNetworkPerformanceConfig_Tier) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (NetworkConfig_ClusterNetworkPerformanceConfig_Tier) Descriptor() protoreflect.EnumDescriptor { - return file_google_container_v1_cluster_service_proto_enumTypes[45].Descriptor() -} - -func (NetworkConfig_ClusterNetworkPerformanceConfig_Tier) Type() protoreflect.EnumType { - return &file_google_container_v1_cluster_service_proto_enumTypes[45] -} - -func (x NetworkConfig_ClusterNetworkPerformanceConfig_Tier) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use NetworkConfig_ClusterNetworkPerformanceConfig_Tier.Descriptor instead. -func (NetworkConfig_ClusterNetworkPerformanceConfig_Tier) EnumDescriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{128, 0, 0} -} - -// Channel describes if/how Gateway API should be installed and implemented in -// a cluster. -type GatewayAPIConfig_Channel int32 - -const ( - // Default value. - GatewayAPIConfig_CHANNEL_UNSPECIFIED GatewayAPIConfig_Channel = 0 - // Gateway API support is disabled - GatewayAPIConfig_CHANNEL_DISABLED GatewayAPIConfig_Channel = 1 - // Deprecated: use CHANNEL_STANDARD instead. - // Gateway API support is enabled, experimental CRDs are installed - // - // Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. - GatewayAPIConfig_CHANNEL_EXPERIMENTAL GatewayAPIConfig_Channel = 3 - // Gateway API support is enabled, standard CRDs are installed - GatewayAPIConfig_CHANNEL_STANDARD GatewayAPIConfig_Channel = 4 -) - -// Enum value maps for GatewayAPIConfig_Channel. -var ( - GatewayAPIConfig_Channel_name = map[int32]string{ - 0: "CHANNEL_UNSPECIFIED", - 1: "CHANNEL_DISABLED", - 3: "CHANNEL_EXPERIMENTAL", - 4: "CHANNEL_STANDARD", - } - GatewayAPIConfig_Channel_value = map[string]int32{ - "CHANNEL_UNSPECIFIED": 0, - "CHANNEL_DISABLED": 1, - "CHANNEL_EXPERIMENTAL": 3, - "CHANNEL_STANDARD": 4, - } -) - -func (x GatewayAPIConfig_Channel) Enum() *GatewayAPIConfig_Channel { - p := new(GatewayAPIConfig_Channel) - *p = x - return p -} - -func (x GatewayAPIConfig_Channel) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (GatewayAPIConfig_Channel) Descriptor() protoreflect.EnumDescriptor { - return file_google_container_v1_cluster_service_proto_enumTypes[46].Descriptor() -} - -func (GatewayAPIConfig_Channel) Type() protoreflect.EnumType { - return &file_google_container_v1_cluster_service_proto_enumTypes[46] -} - -func (x GatewayAPIConfig_Channel) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use GatewayAPIConfig_Channel.Descriptor instead. -func (GatewayAPIConfig_Channel) EnumDescriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{129, 0} -} - -// The type of the reported issue. -type AutopilotCompatibilityIssue_IssueType int32 - -const ( - // Default value, should not be used. - AutopilotCompatibilityIssue_UNSPECIFIED AutopilotCompatibilityIssue_IssueType = 0 - // Indicates that the issue is a known incompatibility between the - // cluster and Autopilot mode. - AutopilotCompatibilityIssue_INCOMPATIBILITY AutopilotCompatibilityIssue_IssueType = 1 - // Indicates the issue is an incompatibility if customers take no further - // action to resolve. - AutopilotCompatibilityIssue_ADDITIONAL_CONFIG_REQUIRED AutopilotCompatibilityIssue_IssueType = 2 - // Indicates the issue is not an incompatibility, but depending on the - // workloads business logic, there is a potential that they won't work on - // Autopilot. - AutopilotCompatibilityIssue_PASSED_WITH_OPTIONAL_CONFIG AutopilotCompatibilityIssue_IssueType = 3 -) - -// Enum value maps for AutopilotCompatibilityIssue_IssueType. -var ( - AutopilotCompatibilityIssue_IssueType_name = map[int32]string{ - 0: "UNSPECIFIED", - 1: "INCOMPATIBILITY", - 2: "ADDITIONAL_CONFIG_REQUIRED", - 3: "PASSED_WITH_OPTIONAL_CONFIG", - } - AutopilotCompatibilityIssue_IssueType_value = map[string]int32{ - "UNSPECIFIED": 0, - "INCOMPATIBILITY": 1, - "ADDITIONAL_CONFIG_REQUIRED": 2, - "PASSED_WITH_OPTIONAL_CONFIG": 3, - } -) - -func (x AutopilotCompatibilityIssue_IssueType) Enum() *AutopilotCompatibilityIssue_IssueType { - p := new(AutopilotCompatibilityIssue_IssueType) - *p = x - return p -} - -func (x AutopilotCompatibilityIssue_IssueType) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (AutopilotCompatibilityIssue_IssueType) Descriptor() protoreflect.EnumDescriptor { - return file_google_container_v1_cluster_service_proto_enumTypes[47].Descriptor() -} - -func (AutopilotCompatibilityIssue_IssueType) Type() protoreflect.EnumType { - return &file_google_container_v1_cluster_service_proto_enumTypes[47] -} - -func (x AutopilotCompatibilityIssue_IssueType) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use AutopilotCompatibilityIssue_IssueType.Descriptor instead. -func (AutopilotCompatibilityIssue_IssueType) EnumDescriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{137, 0} -} - -// Possible values for 'channel'. -type ReleaseChannel_Channel int32 - -const ( - // No channel specified. - ReleaseChannel_UNSPECIFIED ReleaseChannel_Channel = 0 - // RAPID channel is offered on an early access basis for customers who want - // to test new releases. - // - // WARNING: Versions available in the RAPID Channel may be subject to - // unresolved issues with no known workaround and are not subject to any - // SLAs. - ReleaseChannel_RAPID ReleaseChannel_Channel = 1 - // Clusters subscribed to REGULAR receive versions that are considered GA - // quality. REGULAR is intended for production users who want to take - // advantage of new features. - ReleaseChannel_REGULAR ReleaseChannel_Channel = 2 - // Clusters subscribed to STABLE receive versions that are known to be - // stable and reliable in production. - ReleaseChannel_STABLE ReleaseChannel_Channel = 3 - // Clusters subscribed to EXTENDED receive extended support and availability - // for versions which are known to be stable and reliable in production. - ReleaseChannel_EXTENDED ReleaseChannel_Channel = 4 -) - -// Enum value maps for ReleaseChannel_Channel. -var ( - ReleaseChannel_Channel_name = map[int32]string{ - 0: "UNSPECIFIED", - 1: "RAPID", - 2: "REGULAR", - 3: "STABLE", - 4: "EXTENDED", - } - ReleaseChannel_Channel_value = map[string]int32{ - "UNSPECIFIED": 0, - "RAPID": 1, - "REGULAR": 2, - "STABLE": 3, - "EXTENDED": 4, - } -) - -func (x ReleaseChannel_Channel) Enum() *ReleaseChannel_Channel { - p := new(ReleaseChannel_Channel) - *p = x - return p -} - -func (x ReleaseChannel_Channel) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (ReleaseChannel_Channel) Descriptor() protoreflect.EnumDescriptor { - return file_google_container_v1_cluster_service_proto_enumTypes[48].Descriptor() -} - -func (ReleaseChannel_Channel) Type() protoreflect.EnumType { - return &file_google_container_v1_cluster_service_proto_enumTypes[48] -} - -func (x ReleaseChannel_Channel) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use ReleaseChannel_Channel.Descriptor instead. -func (ReleaseChannel_Channel) EnumDescriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{139, 0} -} - -// Provider lists the various in-cluster DNS providers. -type DNSConfig_Provider int32 - -const ( - // Default value - DNSConfig_PROVIDER_UNSPECIFIED DNSConfig_Provider = 0 - // Use GKE default DNS provider(kube-dns) for DNS resolution. - DNSConfig_PLATFORM_DEFAULT DNSConfig_Provider = 1 - // Use CloudDNS for DNS resolution. - DNSConfig_CLOUD_DNS DNSConfig_Provider = 2 - // Use KubeDNS for DNS resolution. - DNSConfig_KUBE_DNS DNSConfig_Provider = 3 -) - -// Enum value maps for DNSConfig_Provider. -var ( - DNSConfig_Provider_name = map[int32]string{ - 0: "PROVIDER_UNSPECIFIED", - 1: "PLATFORM_DEFAULT", - 2: "CLOUD_DNS", - 3: "KUBE_DNS", - } - DNSConfig_Provider_value = map[string]int32{ - "PROVIDER_UNSPECIFIED": 0, - "PLATFORM_DEFAULT": 1, - "CLOUD_DNS": 2, - "KUBE_DNS": 3, - } -) - -func (x DNSConfig_Provider) Enum() *DNSConfig_Provider { - p := new(DNSConfig_Provider) - *p = x - return p -} - -func (x DNSConfig_Provider) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (DNSConfig_Provider) Descriptor() protoreflect.EnumDescriptor { - return file_google_container_v1_cluster_service_proto_enumTypes[49].Descriptor() -} - -func (DNSConfig_Provider) Type() protoreflect.EnumType { - return &file_google_container_v1_cluster_service_proto_enumTypes[49] -} - -func (x DNSConfig_Provider) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use DNSConfig_Provider.Descriptor instead. -func (DNSConfig_Provider) EnumDescriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{143, 0} -} - -// DNSScope lists the various scopes of access to cluster DNS records. -type DNSConfig_DNSScope int32 - -const ( - // Default value, will be inferred as cluster scope. - DNSConfig_DNS_SCOPE_UNSPECIFIED DNSConfig_DNSScope = 0 - // DNS records are accessible from within the cluster. - DNSConfig_CLUSTER_SCOPE DNSConfig_DNSScope = 1 - // DNS records are accessible from within the VPC. - DNSConfig_VPC_SCOPE DNSConfig_DNSScope = 2 -) - -// Enum value maps for DNSConfig_DNSScope. -var ( - DNSConfig_DNSScope_name = map[int32]string{ - 0: "DNS_SCOPE_UNSPECIFIED", - 1: "CLUSTER_SCOPE", - 2: "VPC_SCOPE", - } - DNSConfig_DNSScope_value = map[string]int32{ - "DNS_SCOPE_UNSPECIFIED": 0, - "CLUSTER_SCOPE": 1, - "VPC_SCOPE": 2, - } -) - -func (x DNSConfig_DNSScope) Enum() *DNSConfig_DNSScope { - p := new(DNSConfig_DNSScope) - *p = x - return p -} - -func (x DNSConfig_DNSScope) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (DNSConfig_DNSScope) Descriptor() protoreflect.EnumDescriptor { - return file_google_container_v1_cluster_service_proto_enumTypes[50].Descriptor() -} - -func (DNSConfig_DNSScope) Type() protoreflect.EnumType { - return &file_google_container_v1_cluster_service_proto_enumTypes[50] -} - -func (x DNSConfig_DNSScope) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use DNSConfig_DNSScope.Descriptor instead. -func (DNSConfig_DNSScope) EnumDescriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{143, 1} -} - -// State of etcd encryption. -type DatabaseEncryption_State int32 - -const ( - // Should never be set - DatabaseEncryption_UNKNOWN DatabaseEncryption_State = 0 - // Secrets in etcd are encrypted. - DatabaseEncryption_ENCRYPTED DatabaseEncryption_State = 1 - // Secrets in etcd are stored in plain text (at etcd level) - this is - // unrelated to Compute Engine level full disk encryption. - DatabaseEncryption_DECRYPTED DatabaseEncryption_State = 2 -) - -// Enum value maps for DatabaseEncryption_State. -var ( - DatabaseEncryption_State_name = map[int32]string{ - 0: "UNKNOWN", - 1: "ENCRYPTED", - 2: "DECRYPTED", - } - DatabaseEncryption_State_value = map[string]int32{ - "UNKNOWN": 0, - "ENCRYPTED": 1, - "DECRYPTED": 2, - } -) - -func (x DatabaseEncryption_State) Enum() *DatabaseEncryption_State { - p := new(DatabaseEncryption_State) - *p = x - return p -} - -func (x DatabaseEncryption_State) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (DatabaseEncryption_State) Descriptor() protoreflect.EnumDescriptor { - return file_google_container_v1_cluster_service_proto_enumTypes[51].Descriptor() -} - -func (DatabaseEncryption_State) Type() protoreflect.EnumType { - return &file_google_container_v1_cluster_service_proto_enumTypes[51] -} - -func (x DatabaseEncryption_State) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use DatabaseEncryption_State.Descriptor instead. -func (DatabaseEncryption_State) EnumDescriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{148, 0} -} - -// Current State of etcd encryption. -type DatabaseEncryption_CurrentState int32 - -const ( - // Should never be set - DatabaseEncryption_CURRENT_STATE_UNSPECIFIED DatabaseEncryption_CurrentState = 0 - // Secrets in etcd are encrypted. - DatabaseEncryption_CURRENT_STATE_ENCRYPTED DatabaseEncryption_CurrentState = 7 - // Secrets in etcd are stored in plain text (at etcd level) - this is - // unrelated to Compute Engine level full disk encryption. - DatabaseEncryption_CURRENT_STATE_DECRYPTED DatabaseEncryption_CurrentState = 2 - // Encryption (or re-encryption with a different CloudKMS key) - // of Secrets is in progress. - DatabaseEncryption_CURRENT_STATE_ENCRYPTION_PENDING DatabaseEncryption_CurrentState = 3 - // Encryption (or re-encryption with a different CloudKMS key) of Secrets in - // etcd encountered an error. - DatabaseEncryption_CURRENT_STATE_ENCRYPTION_ERROR DatabaseEncryption_CurrentState = 4 - // De-crypting Secrets to plain text in etcd is in progress. - DatabaseEncryption_CURRENT_STATE_DECRYPTION_PENDING DatabaseEncryption_CurrentState = 5 - // De-crypting Secrets to plain text in etcd encountered an error. - DatabaseEncryption_CURRENT_STATE_DECRYPTION_ERROR DatabaseEncryption_CurrentState = 6 -) - -// Enum value maps for DatabaseEncryption_CurrentState. -var ( - DatabaseEncryption_CurrentState_name = map[int32]string{ - 0: "CURRENT_STATE_UNSPECIFIED", - 7: "CURRENT_STATE_ENCRYPTED", - 2: "CURRENT_STATE_DECRYPTED", - 3: "CURRENT_STATE_ENCRYPTION_PENDING", - 4: "CURRENT_STATE_ENCRYPTION_ERROR", - 5: "CURRENT_STATE_DECRYPTION_PENDING", - 6: "CURRENT_STATE_DECRYPTION_ERROR", - } - DatabaseEncryption_CurrentState_value = map[string]int32{ - "CURRENT_STATE_UNSPECIFIED": 0, - "CURRENT_STATE_ENCRYPTED": 7, - "CURRENT_STATE_DECRYPTED": 2, - "CURRENT_STATE_ENCRYPTION_PENDING": 3, - "CURRENT_STATE_ENCRYPTION_ERROR": 4, - "CURRENT_STATE_DECRYPTION_PENDING": 5, - "CURRENT_STATE_DECRYPTION_ERROR": 6, - } -) - -func (x DatabaseEncryption_CurrentState) Enum() *DatabaseEncryption_CurrentState { - p := new(DatabaseEncryption_CurrentState) - *p = x - return p -} - -func (x DatabaseEncryption_CurrentState) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (DatabaseEncryption_CurrentState) Descriptor() protoreflect.EnumDescriptor { - return file_google_container_v1_cluster_service_proto_enumTypes[52].Descriptor() -} - -func (DatabaseEncryption_CurrentState) Type() protoreflect.EnumType { - return &file_google_container_v1_cluster_service_proto_enumTypes[52] -} - -func (x DatabaseEncryption_CurrentState) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use DatabaseEncryption_CurrentState.Descriptor instead. -func (DatabaseEncryption_CurrentState) EnumDescriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{148, 1} -} - -// Status shows the current usage of a secondary IP range. -type UsableSubnetworkSecondaryRange_Status int32 - -const ( - // UNKNOWN is the zero value of the Status enum. It's not a valid status. - UsableSubnetworkSecondaryRange_UNKNOWN UsableSubnetworkSecondaryRange_Status = 0 - // UNUSED denotes that this range is unclaimed by any cluster. - UsableSubnetworkSecondaryRange_UNUSED UsableSubnetworkSecondaryRange_Status = 1 - // IN_USE_SERVICE denotes that this range is claimed by cluster(s) for - // services. User-managed services range can be shared between clusters - // within the same subnetwork. - UsableSubnetworkSecondaryRange_IN_USE_SERVICE UsableSubnetworkSecondaryRange_Status = 2 - // IN_USE_SHAREABLE_POD denotes this range was created by the network admin - // and is currently claimed by a cluster for pods. It can only be used by - // other clusters as a pod range. - UsableSubnetworkSecondaryRange_IN_USE_SHAREABLE_POD UsableSubnetworkSecondaryRange_Status = 3 - // IN_USE_MANAGED_POD denotes this range was created by GKE and is claimed - // for pods. It cannot be used for other clusters. - UsableSubnetworkSecondaryRange_IN_USE_MANAGED_POD UsableSubnetworkSecondaryRange_Status = 4 -) - -// Enum value maps for UsableSubnetworkSecondaryRange_Status. -var ( - UsableSubnetworkSecondaryRange_Status_name = map[int32]string{ - 0: "UNKNOWN", - 1: "UNUSED", - 2: "IN_USE_SERVICE", - 3: "IN_USE_SHAREABLE_POD", - 4: "IN_USE_MANAGED_POD", - } - UsableSubnetworkSecondaryRange_Status_value = map[string]int32{ - "UNKNOWN": 0, - "UNUSED": 1, - "IN_USE_SERVICE": 2, - "IN_USE_SHAREABLE_POD": 3, - "IN_USE_MANAGED_POD": 4, - } -) - -func (x UsableSubnetworkSecondaryRange_Status) Enum() *UsableSubnetworkSecondaryRange_Status { - p := new(UsableSubnetworkSecondaryRange_Status) - *p = x - return p -} - -func (x UsableSubnetworkSecondaryRange_Status) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (UsableSubnetworkSecondaryRange_Status) Descriptor() protoreflect.EnumDescriptor { - return file_google_container_v1_cluster_service_proto_enumTypes[53].Descriptor() -} - -func (UsableSubnetworkSecondaryRange_Status) Type() protoreflect.EnumType { - return &file_google_container_v1_cluster_service_proto_enumTypes[53] -} - -func (x UsableSubnetworkSecondaryRange_Status) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use UsableSubnetworkSecondaryRange_Status.Descriptor instead. -func (UsableSubnetworkSecondaryRange_Status) EnumDescriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{151, 0} -} - -// Option for GPU direct Strategies -type GPUDirectConfig_GPUDirectStrategy int32 - -const ( - // Default value. No GPU Direct strategy is enabled on the node. - GPUDirectConfig_GPU_DIRECT_STRATEGY_UNSPECIFIED GPUDirectConfig_GPUDirectStrategy = 0 - // GPUDirect-RDMA on A3 Ultra, and A4 machine types - GPUDirectConfig_RDMA GPUDirectConfig_GPUDirectStrategy = 2 -) - -// Enum value maps for GPUDirectConfig_GPUDirectStrategy. -var ( - GPUDirectConfig_GPUDirectStrategy_name = map[int32]string{ - 0: "GPU_DIRECT_STRATEGY_UNSPECIFIED", - 2: "RDMA", - } - GPUDirectConfig_GPUDirectStrategy_value = map[string]int32{ - "GPU_DIRECT_STRATEGY_UNSPECIFIED": 0, - "RDMA": 2, - } -) - -func (x GPUDirectConfig_GPUDirectStrategy) Enum() *GPUDirectConfig_GPUDirectStrategy { - p := new(GPUDirectConfig_GPUDirectStrategy) - *p = x - return p -} - -func (x GPUDirectConfig_GPUDirectStrategy) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (GPUDirectConfig_GPUDirectStrategy) Descriptor() protoreflect.EnumDescriptor { - return file_google_container_v1_cluster_service_proto_enumTypes[54].Descriptor() -} - -func (GPUDirectConfig_GPUDirectStrategy) Type() protoreflect.EnumType { - return &file_google_container_v1_cluster_service_proto_enumTypes[54] -} - -func (x GPUDirectConfig_GPUDirectStrategy) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use GPUDirectConfig_GPUDirectStrategy.Descriptor instead. -func (GPUDirectConfig_GPUDirectStrategy) EnumDescriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{159, 0} -} - -// Types of notifications currently supported. Can be used to filter what -// notifications are sent. -type NotificationConfig_EventType int32 - -const ( - // Not set, will be ignored. - NotificationConfig_EVENT_TYPE_UNSPECIFIED NotificationConfig_EventType = 0 - // Corresponds with UpgradeAvailableEvent. - NotificationConfig_UPGRADE_AVAILABLE_EVENT NotificationConfig_EventType = 1 - // Corresponds with UpgradeEvent. - NotificationConfig_UPGRADE_EVENT NotificationConfig_EventType = 2 - // Corresponds with SecurityBulletinEvent. - NotificationConfig_SECURITY_BULLETIN_EVENT NotificationConfig_EventType = 3 - // Corresponds with UpgradeInfoEvent. - NotificationConfig_UPGRADE_INFO_EVENT NotificationConfig_EventType = 4 -) - -// Enum value maps for NotificationConfig_EventType. -var ( - NotificationConfig_EventType_name = map[int32]string{ - 0: "EVENT_TYPE_UNSPECIFIED", - 1: "UPGRADE_AVAILABLE_EVENT", - 2: "UPGRADE_EVENT", - 3: "SECURITY_BULLETIN_EVENT", - 4: "UPGRADE_INFO_EVENT", - } - NotificationConfig_EventType_value = map[string]int32{ - "EVENT_TYPE_UNSPECIFIED": 0, - "UPGRADE_AVAILABLE_EVENT": 1, - "UPGRADE_EVENT": 2, - "SECURITY_BULLETIN_EVENT": 3, - "UPGRADE_INFO_EVENT": 4, - } -) - -func (x NotificationConfig_EventType) Enum() *NotificationConfig_EventType { - p := new(NotificationConfig_EventType) - *p = x - return p -} - -func (x NotificationConfig_EventType) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (NotificationConfig_EventType) Descriptor() protoreflect.EnumDescriptor { - return file_google_container_v1_cluster_service_proto_enumTypes[55].Descriptor() -} - -func (NotificationConfig_EventType) Type() protoreflect.EnumType { - return &file_google_container_v1_cluster_service_proto_enumTypes[55] -} - -func (x NotificationConfig_EventType) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use NotificationConfig_EventType.Descriptor instead. -func (NotificationConfig_EventType) EnumDescriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{160, 0} -} - -// The type of technology used by the confidential node. -type ConfidentialNodes_ConfidentialInstanceType int32 - -const ( - // No type specified. Do not use this value. - ConfidentialNodes_CONFIDENTIAL_INSTANCE_TYPE_UNSPECIFIED ConfidentialNodes_ConfidentialInstanceType = 0 - // AMD Secure Encrypted Virtualization. - ConfidentialNodes_SEV ConfidentialNodes_ConfidentialInstanceType = 1 - // AMD Secure Encrypted Virtualization - Secure Nested Paging. - ConfidentialNodes_SEV_SNP ConfidentialNodes_ConfidentialInstanceType = 2 - // Intel Trust Domain eXtension. - ConfidentialNodes_TDX ConfidentialNodes_ConfidentialInstanceType = 3 -) - -// Enum value maps for ConfidentialNodes_ConfidentialInstanceType. -var ( - ConfidentialNodes_ConfidentialInstanceType_name = map[int32]string{ - 0: "CONFIDENTIAL_INSTANCE_TYPE_UNSPECIFIED", - 1: "SEV", - 2: "SEV_SNP", - 3: "TDX", - } - ConfidentialNodes_ConfidentialInstanceType_value = map[string]int32{ - "CONFIDENTIAL_INSTANCE_TYPE_UNSPECIFIED": 0, - "SEV": 1, - "SEV_SNP": 2, - "TDX": 3, - } -) - -func (x ConfidentialNodes_ConfidentialInstanceType) Enum() *ConfidentialNodes_ConfidentialInstanceType { - p := new(ConfidentialNodes_ConfidentialInstanceType) - *p = x - return p -} - -func (x ConfidentialNodes_ConfidentialInstanceType) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (ConfidentialNodes_ConfidentialInstanceType) Descriptor() protoreflect.EnumDescriptor { - return file_google_container_v1_cluster_service_proto_enumTypes[56].Descriptor() -} - -func (ConfidentialNodes_ConfidentialInstanceType) Type() protoreflect.EnumType { - return &file_google_container_v1_cluster_service_proto_enumTypes[56] -} - -func (x ConfidentialNodes_ConfidentialInstanceType) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use ConfidentialNodes_ConfidentialInstanceType.Descriptor instead. -func (ConfidentialNodes_ConfidentialInstanceType) EnumDescriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{161, 0} -} - -// The state of the upgrade. -type UpgradeInfoEvent_State int32 - -const ( - // STATE_UNSPECIFIED indicates the state is unspecified. - UpgradeInfoEvent_STATE_UNSPECIFIED UpgradeInfoEvent_State = 0 - // STARTED indicates the upgrade has started. - UpgradeInfoEvent_STARTED UpgradeInfoEvent_State = 3 - // SUCCEEDED indicates the upgrade has completed successfully. - UpgradeInfoEvent_SUCCEEDED UpgradeInfoEvent_State = 4 - // FAILED indicates the upgrade has failed. - UpgradeInfoEvent_FAILED UpgradeInfoEvent_State = 5 - // CANCELED indicates the upgrade has canceled. - UpgradeInfoEvent_CANCELED UpgradeInfoEvent_State = 6 -) - -// Enum value maps for UpgradeInfoEvent_State. -var ( - UpgradeInfoEvent_State_name = map[int32]string{ - 0: "STATE_UNSPECIFIED", - 3: "STARTED", - 4: "SUCCEEDED", - 5: "FAILED", - 6: "CANCELED", - } - UpgradeInfoEvent_State_value = map[string]int32{ - "STATE_UNSPECIFIED": 0, - "STARTED": 3, - "SUCCEEDED": 4, - "FAILED": 5, - "CANCELED": 6, - } -) - -func (x UpgradeInfoEvent_State) Enum() *UpgradeInfoEvent_State { - p := new(UpgradeInfoEvent_State) - *p = x - return p -} - -func (x UpgradeInfoEvent_State) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (UpgradeInfoEvent_State) Descriptor() protoreflect.EnumDescriptor { - return file_google_container_v1_cluster_service_proto_enumTypes[57].Descriptor() -} - -func (UpgradeInfoEvent_State) Type() protoreflect.EnumType { - return &file_google_container_v1_cluster_service_proto_enumTypes[57] -} - -func (x UpgradeInfoEvent_State) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use UpgradeInfoEvent_State.Descriptor instead. -func (UpgradeInfoEvent_State) EnumDescriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{163, 0} -} - -// The type of the event. -type UpgradeInfoEvent_EventType int32 - -const ( - // EVENT_TYPE_UNSPECIFIED indicates the event type is unspecified. - UpgradeInfoEvent_EVENT_TYPE_UNSPECIFIED UpgradeInfoEvent_EventType = 0 - // END_OF_SUPPORT indicates GKE version reaches end of support, check - // standard_support_end_time and extended_support_end_time for more details. - UpgradeInfoEvent_END_OF_SUPPORT UpgradeInfoEvent_EventType = 1 - // COS_MILESTONE_VERSION_UPDATE indicates that the COS node image will - // update COS milestone version for new patch versions starting with - // the one in the description. - UpgradeInfoEvent_COS_MILESTONE_VERSION_UPDATE UpgradeInfoEvent_EventType = 2 - // UPGRADE_LIFECYCLE indicates the event is about the upgrade lifecycle. - UpgradeInfoEvent_UPGRADE_LIFECYCLE UpgradeInfoEvent_EventType = 3 - // DISRUPTION_EVENT indicates the event is about the disruption. - UpgradeInfoEvent_DISRUPTION_EVENT UpgradeInfoEvent_EventType = 4 -) - -// Enum value maps for UpgradeInfoEvent_EventType. -var ( - UpgradeInfoEvent_EventType_name = map[int32]string{ - 0: "EVENT_TYPE_UNSPECIFIED", - 1: "END_OF_SUPPORT", - 2: "COS_MILESTONE_VERSION_UPDATE", - 3: "UPGRADE_LIFECYCLE", - 4: "DISRUPTION_EVENT", - } - UpgradeInfoEvent_EventType_value = map[string]int32{ - "EVENT_TYPE_UNSPECIFIED": 0, - "END_OF_SUPPORT": 1, - "COS_MILESTONE_VERSION_UPDATE": 2, - "UPGRADE_LIFECYCLE": 3, - "DISRUPTION_EVENT": 4, - } -) - -func (x UpgradeInfoEvent_EventType) Enum() *UpgradeInfoEvent_EventType { - p := new(UpgradeInfoEvent_EventType) - *p = x - return p -} - -func (x UpgradeInfoEvent_EventType) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (UpgradeInfoEvent_EventType) Descriptor() protoreflect.EnumDescriptor { - return file_google_container_v1_cluster_service_proto_enumTypes[58].Descriptor() -} - -func (UpgradeInfoEvent_EventType) Type() protoreflect.EnumType { - return &file_google_container_v1_cluster_service_proto_enumTypes[58] -} - -func (x UpgradeInfoEvent_EventType) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use UpgradeInfoEvent_EventType.Descriptor instead. -func (UpgradeInfoEvent_EventType) EnumDescriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{163, 1} -} - -// The type of the disruption event. -type DisruptionEvent_DisruptionType int32 - -const ( - // DISRUPTION_TYPE_UNSPECIFIED indicates the disruption type is unspecified. - DisruptionEvent_DISRUPTION_TYPE_UNSPECIFIED DisruptionEvent_DisruptionType = 0 - // POD_NOT_ENOUGH_PDB indicates there are still running pods - // on the node during node drain because their evictions are blocked by PDB. - DisruptionEvent_POD_NOT_ENOUGH_PDB DisruptionEvent_DisruptionType = 1 - // POD_PDB_VIOLATION indicates that there are force pod - // evictions during node drain which violate the PDB. - DisruptionEvent_POD_PDB_VIOLATION DisruptionEvent_DisruptionType = 2 -) - -// Enum value maps for DisruptionEvent_DisruptionType. -var ( - DisruptionEvent_DisruptionType_name = map[int32]string{ - 0: "DISRUPTION_TYPE_UNSPECIFIED", - 1: "POD_NOT_ENOUGH_PDB", - 2: "POD_PDB_VIOLATION", - } - DisruptionEvent_DisruptionType_value = map[string]int32{ - "DISRUPTION_TYPE_UNSPECIFIED": 0, - "POD_NOT_ENOUGH_PDB": 1, - "POD_PDB_VIOLATION": 2, - } -) - -func (x DisruptionEvent_DisruptionType) Enum() *DisruptionEvent_DisruptionType { - p := new(DisruptionEvent_DisruptionType) - *p = x - return p -} - -func (x DisruptionEvent_DisruptionType) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (DisruptionEvent_DisruptionType) Descriptor() protoreflect.EnumDescriptor { - return file_google_container_v1_cluster_service_proto_enumTypes[59].Descriptor() -} - -func (DisruptionEvent_DisruptionType) Type() protoreflect.EnumType { - return &file_google_container_v1_cluster_service_proto_enumTypes[59] -} - -func (x DisruptionEvent_DisruptionType) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use DisruptionEvent_DisruptionType.Descriptor instead. -func (DisruptionEvent_DisruptionType) EnumDescriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{164, 0} -} - -// GKE components exposing logs -type LoggingComponentConfig_Component int32 - -const ( - // Default value. This shouldn't be used. - LoggingComponentConfig_COMPONENT_UNSPECIFIED LoggingComponentConfig_Component = 0 - // system components - LoggingComponentConfig_SYSTEM_COMPONENTS LoggingComponentConfig_Component = 1 - // workloads - LoggingComponentConfig_WORKLOADS LoggingComponentConfig_Component = 2 - // kube-apiserver - LoggingComponentConfig_APISERVER LoggingComponentConfig_Component = 3 - // kube-scheduler - LoggingComponentConfig_SCHEDULER LoggingComponentConfig_Component = 4 - // kube-controller-manager - LoggingComponentConfig_CONTROLLER_MANAGER LoggingComponentConfig_Component = 5 - // kcp-sshd - LoggingComponentConfig_KCP_SSHD LoggingComponentConfig_Component = 7 - // kcp connection logs - LoggingComponentConfig_KCP_CONNECTION LoggingComponentConfig_Component = 8 - // horizontal pod autoscaler decision logs - LoggingComponentConfig_KCP_HPA LoggingComponentConfig_Component = 9 -) - -// Enum value maps for LoggingComponentConfig_Component. -var ( - LoggingComponentConfig_Component_name = map[int32]string{ - 0: "COMPONENT_UNSPECIFIED", - 1: "SYSTEM_COMPONENTS", - 2: "WORKLOADS", - 3: "APISERVER", - 4: "SCHEDULER", - 5: "CONTROLLER_MANAGER", - 7: "KCP_SSHD", - 8: "KCP_CONNECTION", - 9: "KCP_HPA", - } - LoggingComponentConfig_Component_value = map[string]int32{ - "COMPONENT_UNSPECIFIED": 0, - "SYSTEM_COMPONENTS": 1, - "WORKLOADS": 2, - "APISERVER": 3, - "SCHEDULER": 4, - "CONTROLLER_MANAGER": 5, - "KCP_SSHD": 7, - "KCP_CONNECTION": 8, - "KCP_HPA": 9, - } -) - -func (x LoggingComponentConfig_Component) Enum() *LoggingComponentConfig_Component { - p := new(LoggingComponentConfig_Component) - *p = x - return p -} - -func (x LoggingComponentConfig_Component) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (LoggingComponentConfig_Component) Descriptor() protoreflect.EnumDescriptor { - return file_google_container_v1_cluster_service_proto_enumTypes[60].Descriptor() -} - -func (LoggingComponentConfig_Component) Type() protoreflect.EnumType { - return &file_google_container_v1_cluster_service_proto_enumTypes[60] -} - -func (x LoggingComponentConfig_Component) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use LoggingComponentConfig_Component.Descriptor instead. -func (LoggingComponentConfig_Component) EnumDescriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{171, 0} -} - -// Supported Relay modes -type AdvancedDatapathObservabilityConfig_RelayMode int32 - -const ( - // Default value. This shouldn't be used. - AdvancedDatapathObservabilityConfig_RELAY_MODE_UNSPECIFIED AdvancedDatapathObservabilityConfig_RelayMode = 0 - // disabled - AdvancedDatapathObservabilityConfig_DISABLED AdvancedDatapathObservabilityConfig_RelayMode = 1 - // exposed via internal load balancer - AdvancedDatapathObservabilityConfig_INTERNAL_VPC_LB AdvancedDatapathObservabilityConfig_RelayMode = 3 - // exposed via external load balancer - AdvancedDatapathObservabilityConfig_EXTERNAL_LB AdvancedDatapathObservabilityConfig_RelayMode = 4 -) - -// Enum value maps for AdvancedDatapathObservabilityConfig_RelayMode. -var ( - AdvancedDatapathObservabilityConfig_RelayMode_name = map[int32]string{ - 0: "RELAY_MODE_UNSPECIFIED", - 1: "DISABLED", - 3: "INTERNAL_VPC_LB", - 4: "EXTERNAL_LB", - } - AdvancedDatapathObservabilityConfig_RelayMode_value = map[string]int32{ - "RELAY_MODE_UNSPECIFIED": 0, - "DISABLED": 1, - "INTERNAL_VPC_LB": 3, - "EXTERNAL_LB": 4, - } -) - -func (x AdvancedDatapathObservabilityConfig_RelayMode) Enum() *AdvancedDatapathObservabilityConfig_RelayMode { - p := new(AdvancedDatapathObservabilityConfig_RelayMode) - *p = x - return p -} - -func (x AdvancedDatapathObservabilityConfig_RelayMode) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (AdvancedDatapathObservabilityConfig_RelayMode) Descriptor() protoreflect.EnumDescriptor { - return file_google_container_v1_cluster_service_proto_enumTypes[61].Descriptor() -} - -func (AdvancedDatapathObservabilityConfig_RelayMode) Type() protoreflect.EnumType { - return &file_google_container_v1_cluster_service_proto_enumTypes[61] -} - -func (x AdvancedDatapathObservabilityConfig_RelayMode) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use AdvancedDatapathObservabilityConfig_RelayMode.Descriptor instead. -func (AdvancedDatapathObservabilityConfig_RelayMode) EnumDescriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{174, 0} -} - -// Logging component variants. -type LoggingVariantConfig_Variant int32 - -const ( - // Default value. This shouldn't be used. - LoggingVariantConfig_VARIANT_UNSPECIFIED LoggingVariantConfig_Variant = 0 - // default logging variant. - LoggingVariantConfig_DEFAULT LoggingVariantConfig_Variant = 1 - // maximum logging throughput variant. - LoggingVariantConfig_MAX_THROUGHPUT LoggingVariantConfig_Variant = 2 -) - -// Enum value maps for LoggingVariantConfig_Variant. -var ( - LoggingVariantConfig_Variant_name = map[int32]string{ - 0: "VARIANT_UNSPECIFIED", - 1: "DEFAULT", - 2: "MAX_THROUGHPUT", - } - LoggingVariantConfig_Variant_value = map[string]int32{ - "VARIANT_UNSPECIFIED": 0, - "DEFAULT": 1, - "MAX_THROUGHPUT": 2, - } -) - -func (x LoggingVariantConfig_Variant) Enum() *LoggingVariantConfig_Variant { - p := new(LoggingVariantConfig_Variant) - *p = x - return p -} - -func (x LoggingVariantConfig_Variant) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (LoggingVariantConfig_Variant) Descriptor() protoreflect.EnumDescriptor { - return file_google_container_v1_cluster_service_proto_enumTypes[62].Descriptor() -} - -func (LoggingVariantConfig_Variant) Type() protoreflect.EnumType { - return &file_google_container_v1_cluster_service_proto_enumTypes[62] -} - -func (x LoggingVariantConfig_Variant) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use LoggingVariantConfig_Variant.Descriptor instead. -func (LoggingVariantConfig_Variant) EnumDescriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{177, 0} -} - -// GKE components exposing metrics -type MonitoringComponentConfig_Component int32 - -const ( - // Default value. This shouldn't be used. - MonitoringComponentConfig_COMPONENT_UNSPECIFIED MonitoringComponentConfig_Component = 0 - // system components - MonitoringComponentConfig_SYSTEM_COMPONENTS MonitoringComponentConfig_Component = 1 - // kube-apiserver - MonitoringComponentConfig_APISERVER MonitoringComponentConfig_Component = 3 - // kube-scheduler - MonitoringComponentConfig_SCHEDULER MonitoringComponentConfig_Component = 4 - // kube-controller-manager - MonitoringComponentConfig_CONTROLLER_MANAGER MonitoringComponentConfig_Component = 5 - // Storage - MonitoringComponentConfig_STORAGE MonitoringComponentConfig_Component = 7 - // Horizontal Pod Autoscaling - MonitoringComponentConfig_HPA MonitoringComponentConfig_Component = 8 - // Pod - MonitoringComponentConfig_POD MonitoringComponentConfig_Component = 9 - // DaemonSet - MonitoringComponentConfig_DAEMONSET MonitoringComponentConfig_Component = 10 - // Deployment - MonitoringComponentConfig_DEPLOYMENT MonitoringComponentConfig_Component = 11 - // Statefulset - MonitoringComponentConfig_STATEFULSET MonitoringComponentConfig_Component = 12 - // CADVISOR - MonitoringComponentConfig_CADVISOR MonitoringComponentConfig_Component = 13 - // KUBELET - MonitoringComponentConfig_KUBELET MonitoringComponentConfig_Component = 14 - // NVIDIA Data Center GPU Manager (DCGM) - MonitoringComponentConfig_DCGM MonitoringComponentConfig_Component = 15 - // JobSet - MonitoringComponentConfig_JOBSET MonitoringComponentConfig_Component = 16 -) - -// Enum value maps for MonitoringComponentConfig_Component. -var ( - MonitoringComponentConfig_Component_name = map[int32]string{ - 0: "COMPONENT_UNSPECIFIED", - 1: "SYSTEM_COMPONENTS", - 3: "APISERVER", - 4: "SCHEDULER", - 5: "CONTROLLER_MANAGER", - 7: "STORAGE", - 8: "HPA", - 9: "POD", - 10: "DAEMONSET", - 11: "DEPLOYMENT", - 12: "STATEFULSET", - 13: "CADVISOR", - 14: "KUBELET", - 15: "DCGM", - 16: "JOBSET", - } - MonitoringComponentConfig_Component_value = map[string]int32{ - "COMPONENT_UNSPECIFIED": 0, - "SYSTEM_COMPONENTS": 1, - "APISERVER": 3, - "SCHEDULER": 4, - "CONTROLLER_MANAGER": 5, - "STORAGE": 7, - "HPA": 8, - "POD": 9, - "DAEMONSET": 10, - "DEPLOYMENT": 11, - "STATEFULSET": 12, - "CADVISOR": 13, - "KUBELET": 14, - "DCGM": 15, - "JOBSET": 16, - } -) - -func (x MonitoringComponentConfig_Component) Enum() *MonitoringComponentConfig_Component { - p := new(MonitoringComponentConfig_Component) - *p = x - return p -} - -func (x MonitoringComponentConfig_Component) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (MonitoringComponentConfig_Component) Descriptor() protoreflect.EnumDescriptor { - return file_google_container_v1_cluster_service_proto_enumTypes[63].Descriptor() -} - -func (MonitoringComponentConfig_Component) Type() protoreflect.EnumType { - return &file_google_container_v1_cluster_service_proto_enumTypes[63] -} - -func (x MonitoringComponentConfig_Component) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use MonitoringComponentConfig_Component.Descriptor instead. -func (MonitoringComponentConfig_Component) EnumDescriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{178, 0} -} - -// Scope for applications monitored by Auto-Monitoring -type AutoMonitoringConfig_Scope int32 - -const ( - // Not set. - AutoMonitoringConfig_SCOPE_UNSPECIFIED AutoMonitoringConfig_Scope = 0 - // Auto-Monitoring is enabled for all supported applications. - AutoMonitoringConfig_ALL AutoMonitoringConfig_Scope = 1 - // Disable Auto-Monitoring. - AutoMonitoringConfig_NONE AutoMonitoringConfig_Scope = 2 -) - -// Enum value maps for AutoMonitoringConfig_Scope. -var ( - AutoMonitoringConfig_Scope_name = map[int32]string{ - 0: "SCOPE_UNSPECIFIED", - 1: "ALL", - 2: "NONE", - } - AutoMonitoringConfig_Scope_value = map[string]int32{ - "SCOPE_UNSPECIFIED": 0, - "ALL": 1, - "NONE": 2, - } -) - -func (x AutoMonitoringConfig_Scope) Enum() *AutoMonitoringConfig_Scope { - p := new(AutoMonitoringConfig_Scope) - *p = x - return p -} - -func (x AutoMonitoringConfig_Scope) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (AutoMonitoringConfig_Scope) Descriptor() protoreflect.EnumDescriptor { - return file_google_container_v1_cluster_service_proto_enumTypes[64].Descriptor() -} - -func (AutoMonitoringConfig_Scope) Type() protoreflect.EnumType { - return &file_google_container_v1_cluster_service_proto_enumTypes[64] -} - -func (x AutoMonitoringConfig_Scope) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use AutoMonitoringConfig_Scope.Descriptor instead. -func (AutoMonitoringConfig_Scope) EnumDescriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{180, 0} -} - -// Possible types of Horizontal Pod Autoscaling profile. -type PodAutoscaling_HPAProfile int32 - -const ( - // HPA_PROFILE_UNSPECIFIED is used when no custom HPA profile is set. - PodAutoscaling_HPA_PROFILE_UNSPECIFIED PodAutoscaling_HPAProfile = 0 - // Customers explicitly opt-out of HPA profiles. - PodAutoscaling_NONE PodAutoscaling_HPAProfile = 1 - // PERFORMANCE is used when customers opt-in to the performance HPA profile. - // In this profile we support a higher number of HPAs per cluster and faster - // metrics collection for workload autoscaling. - PodAutoscaling_PERFORMANCE PodAutoscaling_HPAProfile = 2 -) - -// Enum value maps for PodAutoscaling_HPAProfile. -var ( - PodAutoscaling_HPAProfile_name = map[int32]string{ - 0: "HPA_PROFILE_UNSPECIFIED", - 1: "NONE", - 2: "PERFORMANCE", - } - PodAutoscaling_HPAProfile_value = map[string]int32{ - "HPA_PROFILE_UNSPECIFIED": 0, - "NONE": 1, - "PERFORMANCE": 2, - } -) - -func (x PodAutoscaling_HPAProfile) Enum() *PodAutoscaling_HPAProfile { - p := new(PodAutoscaling_HPAProfile) - *p = x - return p -} - -func (x PodAutoscaling_HPAProfile) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (PodAutoscaling_HPAProfile) Descriptor() protoreflect.EnumDescriptor { - return file_google_container_v1_cluster_service_proto_enumTypes[65].Descriptor() -} - -func (PodAutoscaling_HPAProfile) Type() protoreflect.EnumType { - return &file_google_container_v1_cluster_service_proto_enumTypes[65] -} - -func (x PodAutoscaling_HPAProfile) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use PodAutoscaling_HPAProfile.Descriptor instead. -func (PodAutoscaling_HPAProfile) EnumDescriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{181, 0} -} - -// MembershipType describes if the membership supports all features or only -// lightweight compatible ones. -type Fleet_MembershipType int32 - -const ( - // The MembershipType is not set. - Fleet_MEMBERSHIP_TYPE_UNSPECIFIED Fleet_MembershipType = 0 - // The membership supports only lightweight compatible features. - Fleet_LIGHTWEIGHT Fleet_MembershipType = 1 -) - -// Enum value maps for Fleet_MembershipType. -var ( - Fleet_MembershipType_name = map[int32]string{ - 0: "MEMBERSHIP_TYPE_UNSPECIFIED", - 1: "LIGHTWEIGHT", - } - Fleet_MembershipType_value = map[string]int32{ - "MEMBERSHIP_TYPE_UNSPECIFIED": 0, - "LIGHTWEIGHT": 1, - } -) - -func (x Fleet_MembershipType) Enum() *Fleet_MembershipType { - p := new(Fleet_MembershipType) - *p = x - return p -} - -func (x Fleet_MembershipType) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (Fleet_MembershipType) Descriptor() protoreflect.EnumDescriptor { - return file_google_container_v1_cluster_service_proto_enumTypes[66].Descriptor() -} - -func (Fleet_MembershipType) Type() protoreflect.EnumType { - return &file_google_container_v1_cluster_service_proto_enumTypes[66] -} - -func (x Fleet_MembershipType) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use Fleet_MembershipType.Descriptor instead. -func (Fleet_MembershipType) EnumDescriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{182, 0} -} - -// Premium tiers for GKE Cluster. -// -// Deprecated: GKE Enterprise features are now available without an Enterprise -// tier. -// -// Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. -type EnterpriseConfig_ClusterTier int32 - -const ( - // CLUSTER_TIER_UNSPECIFIED is when cluster_tier is not set. - EnterpriseConfig_CLUSTER_TIER_UNSPECIFIED EnterpriseConfig_ClusterTier = 0 - // STANDARD indicates a standard GKE cluster. - EnterpriseConfig_STANDARD EnterpriseConfig_ClusterTier = 1 - // ENTERPRISE indicates a GKE Enterprise cluster. - EnterpriseConfig_ENTERPRISE EnterpriseConfig_ClusterTier = 2 -) - -// Enum value maps for EnterpriseConfig_ClusterTier. -var ( - EnterpriseConfig_ClusterTier_name = map[int32]string{ - 0: "CLUSTER_TIER_UNSPECIFIED", - 1: "STANDARD", - 2: "ENTERPRISE", - } - EnterpriseConfig_ClusterTier_value = map[string]int32{ - "CLUSTER_TIER_UNSPECIFIED": 0, - "STANDARD": 1, - "ENTERPRISE": 2, - } -) - -func (x EnterpriseConfig_ClusterTier) Enum() *EnterpriseConfig_ClusterTier { - p := new(EnterpriseConfig_ClusterTier) - *p = x - return p -} - -func (x EnterpriseConfig_ClusterTier) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (EnterpriseConfig_ClusterTier) Descriptor() protoreflect.EnumDescriptor { - return file_google_container_v1_cluster_service_proto_enumTypes[67].Descriptor() -} - -func (EnterpriseConfig_ClusterTier) Type() protoreflect.EnumType { - return &file_google_container_v1_cluster_service_proto_enumTypes[67] -} - -func (x EnterpriseConfig_ClusterTier) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use EnterpriseConfig_ClusterTier.Descriptor instead. -func (EnterpriseConfig_ClusterTier) EnumDescriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{187, 0} -} - -// Mode specifies how the secondary boot disk will be used. -// This triggers mode-specified logic in the control plane. -type SecondaryBootDisk_Mode int32 - -const ( - // MODE_UNSPECIFIED is when mode is not set. - SecondaryBootDisk_MODE_UNSPECIFIED SecondaryBootDisk_Mode = 0 - // CONTAINER_IMAGE_CACHE is for using the secondary boot disk as - // a container image cache. - SecondaryBootDisk_CONTAINER_IMAGE_CACHE SecondaryBootDisk_Mode = 1 -) - -// Enum value maps for SecondaryBootDisk_Mode. -var ( - SecondaryBootDisk_Mode_name = map[int32]string{ - 0: "MODE_UNSPECIFIED", - 1: "CONTAINER_IMAGE_CACHE", - } - SecondaryBootDisk_Mode_value = map[string]int32{ - "MODE_UNSPECIFIED": 0, - "CONTAINER_IMAGE_CACHE": 1, - } -) - -func (x SecondaryBootDisk_Mode) Enum() *SecondaryBootDisk_Mode { - p := new(SecondaryBootDisk_Mode) - *p = x - return p -} - -func (x SecondaryBootDisk_Mode) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (SecondaryBootDisk_Mode) Descriptor() protoreflect.EnumDescriptor { - return file_google_container_v1_cluster_service_proto_enumTypes[68].Descriptor() -} - -func (SecondaryBootDisk_Mode) Type() protoreflect.EnumType { - return &file_google_container_v1_cluster_service_proto_enumTypes[68] -} - -func (x SecondaryBootDisk_Mode) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use SecondaryBootDisk_Mode.Descriptor instead. -func (SecondaryBootDisk_Mode) EnumDescriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{190, 0} -} - -// AutoUpgradeStatus indicates the status of auto upgrade. -type ClusterUpgradeInfo_AutoUpgradeStatus int32 - -const ( - // UNKNOWN indicates an unknown status. - ClusterUpgradeInfo_UNKNOWN ClusterUpgradeInfo_AutoUpgradeStatus = 0 - // ACTIVE indicates an active status. - ClusterUpgradeInfo_ACTIVE ClusterUpgradeInfo_AutoUpgradeStatus = 1 - // MINOR_UPGRADE_PAUSED indicates the minor version upgrade is - // paused. - ClusterUpgradeInfo_MINOR_UPGRADE_PAUSED ClusterUpgradeInfo_AutoUpgradeStatus = 4 - // UPGRADE_PAUSED indicates the upgrade is paused. - ClusterUpgradeInfo_UPGRADE_PAUSED ClusterUpgradeInfo_AutoUpgradeStatus = 5 -) - -// Enum value maps for ClusterUpgradeInfo_AutoUpgradeStatus. -var ( - ClusterUpgradeInfo_AutoUpgradeStatus_name = map[int32]string{ - 0: "UNKNOWN", - 1: "ACTIVE", - 4: "MINOR_UPGRADE_PAUSED", - 5: "UPGRADE_PAUSED", - } - ClusterUpgradeInfo_AutoUpgradeStatus_value = map[string]int32{ - "UNKNOWN": 0, - "ACTIVE": 1, - "MINOR_UPGRADE_PAUSED": 4, - "UPGRADE_PAUSED": 5, - } -) - -func (x ClusterUpgradeInfo_AutoUpgradeStatus) Enum() *ClusterUpgradeInfo_AutoUpgradeStatus { - p := new(ClusterUpgradeInfo_AutoUpgradeStatus) - *p = x - return p -} - -func (x ClusterUpgradeInfo_AutoUpgradeStatus) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (ClusterUpgradeInfo_AutoUpgradeStatus) Descriptor() protoreflect.EnumDescriptor { - return file_google_container_v1_cluster_service_proto_enumTypes[69].Descriptor() -} - -func (ClusterUpgradeInfo_AutoUpgradeStatus) Type() protoreflect.EnumType { - return &file_google_container_v1_cluster_service_proto_enumTypes[69] -} - -func (x ClusterUpgradeInfo_AutoUpgradeStatus) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use ClusterUpgradeInfo_AutoUpgradeStatus.Descriptor instead. -func (ClusterUpgradeInfo_AutoUpgradeStatus) EnumDescriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{193, 0} -} - -// AutoUpgradePausedReason indicates the reason for auto upgrade paused -// status. -type ClusterUpgradeInfo_AutoUpgradePausedReason int32 - -const ( - // AUTO_UPGRADE_PAUSED_REASON_UNSPECIFIED indicates an unspecified reason. - ClusterUpgradeInfo_AUTO_UPGRADE_PAUSED_REASON_UNSPECIFIED ClusterUpgradeInfo_AutoUpgradePausedReason = 0 - // MAINTENANCE_WINDOW indicates the cluster is outside customer maintenance - // window. - ClusterUpgradeInfo_MAINTENANCE_WINDOW ClusterUpgradeInfo_AutoUpgradePausedReason = 1 - // MAINTENANCE_EXCLUSION_NO_UPGRADES indicates the cluster is in a - // maintenance exclusion with scope NO_UPGRADES. - ClusterUpgradeInfo_MAINTENANCE_EXCLUSION_NO_UPGRADES ClusterUpgradeInfo_AutoUpgradePausedReason = 5 - // MAINTENANCE_EXCLUSION_NO_MINOR_UPGRADES indicates the cluster is in a - // maintenance exclusion with scope NO_MINOR_UPGRADES. - ClusterUpgradeInfo_MAINTENANCE_EXCLUSION_NO_MINOR_UPGRADES ClusterUpgradeInfo_AutoUpgradePausedReason = 6 - // CLUSTER_DISRUPTION_BUDGET indicates the cluster is outside the cluster - // disruption budget. - ClusterUpgradeInfo_CLUSTER_DISRUPTION_BUDGET ClusterUpgradeInfo_AutoUpgradePausedReason = 4 - // CLUSTER_DISRUPTION_BUDGET_MINOR_UPGRADE indicates the cluster is outside - // the cluster disruption budget for minor version upgrade. - ClusterUpgradeInfo_CLUSTER_DISRUPTION_BUDGET_MINOR_UPGRADE ClusterUpgradeInfo_AutoUpgradePausedReason = 7 - // SYSTEM_CONFIG indicates the cluster upgrade is paused by system config. - ClusterUpgradeInfo_SYSTEM_CONFIG ClusterUpgradeInfo_AutoUpgradePausedReason = 8 -) - -// Enum value maps for ClusterUpgradeInfo_AutoUpgradePausedReason. -var ( - ClusterUpgradeInfo_AutoUpgradePausedReason_name = map[int32]string{ - 0: "AUTO_UPGRADE_PAUSED_REASON_UNSPECIFIED", - 1: "MAINTENANCE_WINDOW", - 5: "MAINTENANCE_EXCLUSION_NO_UPGRADES", - 6: "MAINTENANCE_EXCLUSION_NO_MINOR_UPGRADES", - 4: "CLUSTER_DISRUPTION_BUDGET", - 7: "CLUSTER_DISRUPTION_BUDGET_MINOR_UPGRADE", - 8: "SYSTEM_CONFIG", - } - ClusterUpgradeInfo_AutoUpgradePausedReason_value = map[string]int32{ - "AUTO_UPGRADE_PAUSED_REASON_UNSPECIFIED": 0, - "MAINTENANCE_WINDOW": 1, - "MAINTENANCE_EXCLUSION_NO_UPGRADES": 5, - "MAINTENANCE_EXCLUSION_NO_MINOR_UPGRADES": 6, - "CLUSTER_DISRUPTION_BUDGET": 4, - "CLUSTER_DISRUPTION_BUDGET_MINOR_UPGRADE": 7, - "SYSTEM_CONFIG": 8, - } -) - -func (x ClusterUpgradeInfo_AutoUpgradePausedReason) Enum() *ClusterUpgradeInfo_AutoUpgradePausedReason { - p := new(ClusterUpgradeInfo_AutoUpgradePausedReason) - *p = x - return p -} - -func (x ClusterUpgradeInfo_AutoUpgradePausedReason) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (ClusterUpgradeInfo_AutoUpgradePausedReason) Descriptor() protoreflect.EnumDescriptor { - return file_google_container_v1_cluster_service_proto_enumTypes[70].Descriptor() -} - -func (ClusterUpgradeInfo_AutoUpgradePausedReason) Type() protoreflect.EnumType { - return &file_google_container_v1_cluster_service_proto_enumTypes[70] -} - -func (x ClusterUpgradeInfo_AutoUpgradePausedReason) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use ClusterUpgradeInfo_AutoUpgradePausedReason.Descriptor instead. -func (ClusterUpgradeInfo_AutoUpgradePausedReason) EnumDescriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{193, 1} -} - -// State indicates the state of the upgrade. -type UpgradeDetails_State int32 - -const ( - // Upgrade state is unknown. - UpgradeDetails_UNKNOWN UpgradeDetails_State = 0 - // Upgrade has failed with an error. - UpgradeDetails_FAILED UpgradeDetails_State = 1 - // Upgrade has succeeded. - UpgradeDetails_SUCCEEDED UpgradeDetails_State = 2 - // Upgrade has been canceled. - UpgradeDetails_CANCELED UpgradeDetails_State = 3 - // Upgrade is running. - UpgradeDetails_RUNNING UpgradeDetails_State = 4 -) - -// Enum value maps for UpgradeDetails_State. -var ( - UpgradeDetails_State_name = map[int32]string{ - 0: "UNKNOWN", - 1: "FAILED", - 2: "SUCCEEDED", - 3: "CANCELED", - 4: "RUNNING", - } - UpgradeDetails_State_value = map[string]int32{ - "UNKNOWN": 0, - "FAILED": 1, - "SUCCEEDED": 2, - "CANCELED": 3, - "RUNNING": 4, - } -) - -func (x UpgradeDetails_State) Enum() *UpgradeDetails_State { - p := new(UpgradeDetails_State) - *p = x - return p -} - -func (x UpgradeDetails_State) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (UpgradeDetails_State) Descriptor() protoreflect.EnumDescriptor { - return file_google_container_v1_cluster_service_proto_enumTypes[71].Descriptor() -} - -func (UpgradeDetails_State) Type() protoreflect.EnumType { - return &file_google_container_v1_cluster_service_proto_enumTypes[71] -} - -func (x UpgradeDetails_State) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use UpgradeDetails_State.Descriptor instead. -func (UpgradeDetails_State) EnumDescriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{194, 0} -} - -// StartType indicates the type of starting the upgrade. -type UpgradeDetails_StartType int32 - -const ( - // Upgrade start type is unspecified. - UpgradeDetails_START_TYPE_UNSPECIFIED UpgradeDetails_StartType = 0 - // Upgrade started automatically. - UpgradeDetails_AUTOMATIC UpgradeDetails_StartType = 1 - // Upgrade started manually. - UpgradeDetails_MANUAL UpgradeDetails_StartType = 2 -) - -// Enum value maps for UpgradeDetails_StartType. -var ( - UpgradeDetails_StartType_name = map[int32]string{ - 0: "START_TYPE_UNSPECIFIED", - 1: "AUTOMATIC", - 2: "MANUAL", - } - UpgradeDetails_StartType_value = map[string]int32{ - "START_TYPE_UNSPECIFIED": 0, - "AUTOMATIC": 1, - "MANUAL": 2, - } -) - -func (x UpgradeDetails_StartType) Enum() *UpgradeDetails_StartType { - p := new(UpgradeDetails_StartType) - *p = x - return p -} - -func (x UpgradeDetails_StartType) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (UpgradeDetails_StartType) Descriptor() protoreflect.EnumDescriptor { - return file_google_container_v1_cluster_service_proto_enumTypes[72].Descriptor() -} - -func (UpgradeDetails_StartType) Type() protoreflect.EnumType { - return &file_google_container_v1_cluster_service_proto_enumTypes[72] -} - -func (x UpgradeDetails_StartType) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use UpgradeDetails_StartType.Descriptor instead. -func (UpgradeDetails_StartType) EnumDescriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{194, 1} -} - -// AutoUpgradeStatus indicates the status of auto upgrade. -type NodePoolUpgradeInfo_AutoUpgradeStatus int32 - -const ( - // UNKNOWN indicates an unknown status. - NodePoolUpgradeInfo_UNKNOWN NodePoolUpgradeInfo_AutoUpgradeStatus = 0 - // ACTIVE indicates an active status. - NodePoolUpgradeInfo_ACTIVE NodePoolUpgradeInfo_AutoUpgradeStatus = 1 - // MINOR_UPGRADE_PAUSED indicates the minor version upgrade is - // paused. - NodePoolUpgradeInfo_MINOR_UPGRADE_PAUSED NodePoolUpgradeInfo_AutoUpgradeStatus = 2 - // UPGRADE_PAUSED indicates the upgrade is paused. - NodePoolUpgradeInfo_UPGRADE_PAUSED NodePoolUpgradeInfo_AutoUpgradeStatus = 3 -) - -// Enum value maps for NodePoolUpgradeInfo_AutoUpgradeStatus. -var ( - NodePoolUpgradeInfo_AutoUpgradeStatus_name = map[int32]string{ - 0: "UNKNOWN", - 1: "ACTIVE", - 2: "MINOR_UPGRADE_PAUSED", - 3: "UPGRADE_PAUSED", - } - NodePoolUpgradeInfo_AutoUpgradeStatus_value = map[string]int32{ - "UNKNOWN": 0, - "ACTIVE": 1, - "MINOR_UPGRADE_PAUSED": 2, - "UPGRADE_PAUSED": 3, - } -) - -func (x NodePoolUpgradeInfo_AutoUpgradeStatus) Enum() *NodePoolUpgradeInfo_AutoUpgradeStatus { - p := new(NodePoolUpgradeInfo_AutoUpgradeStatus) - *p = x - return p -} - -func (x NodePoolUpgradeInfo_AutoUpgradeStatus) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (NodePoolUpgradeInfo_AutoUpgradeStatus) Descriptor() protoreflect.EnumDescriptor { - return file_google_container_v1_cluster_service_proto_enumTypes[73].Descriptor() -} - -func (NodePoolUpgradeInfo_AutoUpgradeStatus) Type() protoreflect.EnumType { - return &file_google_container_v1_cluster_service_proto_enumTypes[73] -} - -func (x NodePoolUpgradeInfo_AutoUpgradeStatus) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use NodePoolUpgradeInfo_AutoUpgradeStatus.Descriptor instead. -func (NodePoolUpgradeInfo_AutoUpgradeStatus) EnumDescriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{196, 0} -} - -// AutoUpgradePausedReason indicates the reason for auto upgrade paused -// status. -type NodePoolUpgradeInfo_AutoUpgradePausedReason int32 - -const ( - // AUTO_UPGRADE_PAUSED_REASON_UNSPECIFIED indicates an unspecified reason. - NodePoolUpgradeInfo_AUTO_UPGRADE_PAUSED_REASON_UNSPECIFIED NodePoolUpgradeInfo_AutoUpgradePausedReason = 0 - // MAINTENANCE_WINDOW indicates the cluster is outside customer maintenance - // window. - NodePoolUpgradeInfo_MAINTENANCE_WINDOW NodePoolUpgradeInfo_AutoUpgradePausedReason = 1 - // MAINTENANCE_EXCLUSION_NO_UPGRADES indicates the cluster is in a - // maintenance exclusion with scope NO_UPGRADES. - NodePoolUpgradeInfo_MAINTENANCE_EXCLUSION_NO_UPGRADES NodePoolUpgradeInfo_AutoUpgradePausedReason = 2 - // MAINTENANCE_EXCLUSION_NO_MINOR_UPGRADES indicates the cluster is in a - // maintenance exclusion with scope NO_MINOR_UPGRADES. - NodePoolUpgradeInfo_MAINTENANCE_EXCLUSION_NO_MINOR_UPGRADES NodePoolUpgradeInfo_AutoUpgradePausedReason = 3 - // SYSTEM_CONFIG indicates the cluster upgrade is paused by system config. - NodePoolUpgradeInfo_SYSTEM_CONFIG NodePoolUpgradeInfo_AutoUpgradePausedReason = 4 -) - -// Enum value maps for NodePoolUpgradeInfo_AutoUpgradePausedReason. -var ( - NodePoolUpgradeInfo_AutoUpgradePausedReason_name = map[int32]string{ - 0: "AUTO_UPGRADE_PAUSED_REASON_UNSPECIFIED", - 1: "MAINTENANCE_WINDOW", - 2: "MAINTENANCE_EXCLUSION_NO_UPGRADES", - 3: "MAINTENANCE_EXCLUSION_NO_MINOR_UPGRADES", - 4: "SYSTEM_CONFIG", - } - NodePoolUpgradeInfo_AutoUpgradePausedReason_value = map[string]int32{ - "AUTO_UPGRADE_PAUSED_REASON_UNSPECIFIED": 0, - "MAINTENANCE_WINDOW": 1, - "MAINTENANCE_EXCLUSION_NO_UPGRADES": 2, - "MAINTENANCE_EXCLUSION_NO_MINOR_UPGRADES": 3, - "SYSTEM_CONFIG": 4, - } -) - -func (x NodePoolUpgradeInfo_AutoUpgradePausedReason) Enum() *NodePoolUpgradeInfo_AutoUpgradePausedReason { - p := new(NodePoolUpgradeInfo_AutoUpgradePausedReason) - *p = x - return p -} - -func (x NodePoolUpgradeInfo_AutoUpgradePausedReason) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (NodePoolUpgradeInfo_AutoUpgradePausedReason) Descriptor() protoreflect.EnumDescriptor { - return file_google_container_v1_cluster_service_proto_enumTypes[74].Descriptor() -} - -func (NodePoolUpgradeInfo_AutoUpgradePausedReason) Type() protoreflect.EnumType { - return &file_google_container_v1_cluster_service_proto_enumTypes[74] -} - -func (x NodePoolUpgradeInfo_AutoUpgradePausedReason) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use NodePoolUpgradeInfo_AutoUpgradePausedReason.Descriptor instead. -func (NodePoolUpgradeInfo_AutoUpgradePausedReason) EnumDescriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{196, 1} -} - -// PatchMode specifies how auto upgrade patch builds should be -// selected. -type GkeAutoUpgradeConfig_PatchMode int32 - -const ( - // PATCH_MODE_UNSPECIFIED defaults to using the upgrade target from the - // channel's patch upgrade targets as the upgrade target for the - // version. - GkeAutoUpgradeConfig_PATCH_MODE_UNSPECIFIED GkeAutoUpgradeConfig_PatchMode = 0 - // ACCELERATED denotes that the latest patch build in the channel should be - // used as the upgrade target for the version. - GkeAutoUpgradeConfig_ACCELERATED GkeAutoUpgradeConfig_PatchMode = 1 -) - -// Enum value maps for GkeAutoUpgradeConfig_PatchMode. -var ( - GkeAutoUpgradeConfig_PatchMode_name = map[int32]string{ - 0: "PATCH_MODE_UNSPECIFIED", - 1: "ACCELERATED", - } - GkeAutoUpgradeConfig_PatchMode_value = map[string]int32{ - "PATCH_MODE_UNSPECIFIED": 0, - "ACCELERATED": 1, - } -) - -func (x GkeAutoUpgradeConfig_PatchMode) Enum() *GkeAutoUpgradeConfig_PatchMode { - p := new(GkeAutoUpgradeConfig_PatchMode) - *p = x - return p -} - -func (x GkeAutoUpgradeConfig_PatchMode) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (GkeAutoUpgradeConfig_PatchMode) Descriptor() protoreflect.EnumDescriptor { - return file_google_container_v1_cluster_service_proto_enumTypes[75].Descriptor() -} - -func (GkeAutoUpgradeConfig_PatchMode) Type() protoreflect.EnumType { - return &file_google_container_v1_cluster_service_proto_enumTypes[75] -} - -func (x GkeAutoUpgradeConfig_PatchMode) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use GkeAutoUpgradeConfig_PatchMode.Descriptor instead. -func (GkeAutoUpgradeConfig_PatchMode) EnumDescriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{197, 0} -} - -// Network tier configuration. -type NetworkTierConfig_NetworkTier int32 - -const ( - // By default, use project-level configuration. When unspecified, the - // behavior defaults to NETWORK_TIER_DEFAULT. For cluster updates, this - // implies no action (no-op). - NetworkTierConfig_NETWORK_TIER_UNSPECIFIED NetworkTierConfig_NetworkTier = 0 - // Default network tier. Use project-level configuration. User can specify - // this value, meaning they want to keep the same behaviour as before - // cluster level network tier configuration is introduced. This field - // ensures backward compatibility for the network tier of cluster resources, - // such as node pools and load balancers, for their external IP addresses. - NetworkTierConfig_NETWORK_TIER_DEFAULT NetworkTierConfig_NetworkTier = 1 - // Premium network tier. - NetworkTierConfig_NETWORK_TIER_PREMIUM NetworkTierConfig_NetworkTier = 2 - // Standard network tier. - NetworkTierConfig_NETWORK_TIER_STANDARD NetworkTierConfig_NetworkTier = 3 -) - -// Enum value maps for NetworkTierConfig_NetworkTier. -var ( - NetworkTierConfig_NetworkTier_name = map[int32]string{ - 0: "NETWORK_TIER_UNSPECIFIED", - 1: "NETWORK_TIER_DEFAULT", - 2: "NETWORK_TIER_PREMIUM", - 3: "NETWORK_TIER_STANDARD", - } - NetworkTierConfig_NetworkTier_value = map[string]int32{ - "NETWORK_TIER_UNSPECIFIED": 0, - "NETWORK_TIER_DEFAULT": 1, - "NETWORK_TIER_PREMIUM": 2, - "NETWORK_TIER_STANDARD": 3, - } -) - -func (x NetworkTierConfig_NetworkTier) Enum() *NetworkTierConfig_NetworkTier { - p := new(NetworkTierConfig_NetworkTier) - *p = x - return p -} - -func (x NetworkTierConfig_NetworkTier) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (NetworkTierConfig_NetworkTier) Descriptor() protoreflect.EnumDescriptor { - return file_google_container_v1_cluster_service_proto_enumTypes[76].Descriptor() -} - -func (NetworkTierConfig_NetworkTier) Type() protoreflect.EnumType { - return &file_google_container_v1_cluster_service_proto_enumTypes[76] -} - -func (x NetworkTierConfig_NetworkTier) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use NetworkTierConfig_NetworkTier.Descriptor instead. -func (NetworkTierConfig_NetworkTier) EnumDescriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{198, 0} -} - -// Scope is the scope of the Managed OpenTelemetry pipeline. -type ManagedOpenTelemetryConfig_Scope int32 - -const ( - // SCOPE_UNSPECIFIED is when the scope is not set. - ManagedOpenTelemetryConfig_SCOPE_UNSPECIFIED ManagedOpenTelemetryConfig_Scope = 0 - // NONE is used to disable the Managed OpenTelemetry pipeline. - ManagedOpenTelemetryConfig_NONE ManagedOpenTelemetryConfig_Scope = 1 - // COLLECTION_AND_INSTRUMENTATION_COMPONENTS is used to enable the Managed - // OpenTelemetry pipeline for collection and instrumentation components. - ManagedOpenTelemetryConfig_COLLECTION_AND_INSTRUMENTATION_COMPONENTS ManagedOpenTelemetryConfig_Scope = 2 -) - -// Enum value maps for ManagedOpenTelemetryConfig_Scope. -var ( - ManagedOpenTelemetryConfig_Scope_name = map[int32]string{ - 0: "SCOPE_UNSPECIFIED", - 1: "NONE", - 2: "COLLECTION_AND_INSTRUMENTATION_COMPONENTS", - } - ManagedOpenTelemetryConfig_Scope_value = map[string]int32{ - "SCOPE_UNSPECIFIED": 0, - "NONE": 1, - "COLLECTION_AND_INSTRUMENTATION_COMPONENTS": 2, - } -) - -func (x ManagedOpenTelemetryConfig_Scope) Enum() *ManagedOpenTelemetryConfig_Scope { - p := new(ManagedOpenTelemetryConfig_Scope) - *p = x - return p -} - -func (x ManagedOpenTelemetryConfig_Scope) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (ManagedOpenTelemetryConfig_Scope) Descriptor() protoreflect.EnumDescriptor { - return file_google_container_v1_cluster_service_proto_enumTypes[77].Descriptor() -} - -func (ManagedOpenTelemetryConfig_Scope) Type() protoreflect.EnumType { - return &file_google_container_v1_cluster_service_proto_enumTypes[77] -} - -func (x ManagedOpenTelemetryConfig_Scope) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use ManagedOpenTelemetryConfig_Scope.Descriptor instead. -func (ManagedOpenTelemetryConfig_Scope) EnumDescriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{199, 0} -} - -// Parameters that can be configured on Linux nodes. -type LinuxNodeConfig struct { - state protoimpl.MessageState `protogen:"open.v1"` - // The Linux kernel parameters to be applied to the nodes and all pods running - // on the nodes. - // - // The following parameters are supported. - // - // net.core.busy_poll - // net.core.busy_read - // net.core.netdev_max_backlog - // net.core.rmem_max - // net.core.rmem_default - // net.core.wmem_default - // net.core.wmem_max - // net.core.optmem_max - // net.core.somaxconn - // net.ipv4.tcp_rmem - // net.ipv4.tcp_wmem - // net.ipv4.tcp_tw_reuse - // net.ipv4.tcp_mtu_probing - // net.ipv4.tcp_max_orphans - // net.ipv4.tcp_max_tw_buckets - // net.ipv4.tcp_syn_retries - // net.ipv4.tcp_ecn - // net.ipv4.tcp_congestion_control - // net.netfilter.nf_conntrack_max - // net.netfilter.nf_conntrack_buckets - // net.netfilter.nf_conntrack_tcp_timeout_close_wait - // net.netfilter.nf_conntrack_tcp_timeout_time_wait - // net.netfilter.nf_conntrack_tcp_timeout_established - // net.netfilter.nf_conntrack_acct - // kernel.shmmni - // kernel.shmmax - // kernel.shmall - // kernel.perf_event_paranoid - // kernel.sched_rt_runtime_us - // kernel.softlockup_panic - // kernel.yama.ptrace_scope - // kernel.kptr_restrict - // kernel.dmesg_restrict - // kernel.sysrq - // fs.aio-max-nr - // fs.file-max - // fs.inotify.max_user_instances - // fs.inotify.max_user_watches - // fs.nr_open - // vm.dirty_background_ratio - // vm.dirty_background_bytes - // vm.dirty_expire_centisecs - // vm.dirty_ratio - // vm.dirty_bytes - // vm.dirty_writeback_centisecs - // vm.max_map_count - // vm.overcommit_memory - // vm.overcommit_ratio - // vm.vfs_cache_pressure - // vm.swappiness - // vm.watermark_scale_factor - // vm.min_free_kbytes - Sysctls map[string]string `protobuf:"bytes,1,rep,name=sysctls,proto3" json:"sysctls,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` - // cgroup_mode specifies the cgroup mode to be used on the node. - CgroupMode LinuxNodeConfig_CgroupMode `protobuf:"varint,2,opt,name=cgroup_mode,json=cgroupMode,proto3,enum=google.container.v1.LinuxNodeConfig_CgroupMode" json:"cgroup_mode,omitempty"` - // Optional. Amounts for 2M and 1G hugepages - Hugepages *LinuxNodeConfig_HugepagesConfig `protobuf:"bytes,3,opt,name=hugepages,proto3,oneof" json:"hugepages,omitempty"` - // Optional. Transparent hugepage support for anonymous memory can be entirely - // disabled (mostly for debugging purposes) or only enabled inside - // MADV_HUGEPAGE regions (to avoid the risk of consuming more memory - // resources) or enabled system wide. - // - // See https://docs.kernel.org/admin-guide/mm/transhuge.html - // for more details. - TransparentHugepageEnabled LinuxNodeConfig_TransparentHugepageEnabled `protobuf:"varint,4,opt,name=transparent_hugepage_enabled,json=transparentHugepageEnabled,proto3,enum=google.container.v1.LinuxNodeConfig_TransparentHugepageEnabled" json:"transparent_hugepage_enabled,omitempty"` - // Optional. Defines the transparent hugepage defrag configuration on the - // node. VM hugepage allocation can be managed by either limiting - // defragmentation for delayed allocation or skipping it entirely for - // immediate allocation only. - // - // See https://docs.kernel.org/admin-guide/mm/transhuge.html - // for more details. - TransparentHugepageDefrag LinuxNodeConfig_TransparentHugepageDefrag `protobuf:"varint,5,opt,name=transparent_hugepage_defrag,json=transparentHugepageDefrag,proto3,enum=google.container.v1.LinuxNodeConfig_TransparentHugepageDefrag" json:"transparent_hugepage_defrag,omitempty"` - // Optional. Enables and configures swap space on nodes. - // If omitted, swap is disabled. - SwapConfig *LinuxNodeConfig_SwapConfig `protobuf:"bytes,12,opt,name=swap_config,json=swapConfig,proto3,oneof" json:"swap_config,omitempty"` - // Optional. Configuration for kernel module loading on nodes. - // When enabled, the node pool will be provisioned with a Container-Optimized - // OS image that enforces kernel module signature verification. - NodeKernelModuleLoading *LinuxNodeConfig_NodeKernelModuleLoading `protobuf:"bytes,13,opt,name=node_kernel_module_loading,json=nodeKernelModuleLoading,proto3" json:"node_kernel_module_loading,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *LinuxNodeConfig) Reset() { - *x = LinuxNodeConfig{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *LinuxNodeConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*LinuxNodeConfig) ProtoMessage() {} - -func (x *LinuxNodeConfig) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[0] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use LinuxNodeConfig.ProtoReflect.Descriptor instead. -func (*LinuxNodeConfig) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{0} -} - -func (x *LinuxNodeConfig) GetSysctls() map[string]string { - if x != nil { - return x.Sysctls - } - return nil -} - -func (x *LinuxNodeConfig) GetCgroupMode() LinuxNodeConfig_CgroupMode { - if x != nil { - return x.CgroupMode - } - return LinuxNodeConfig_CGROUP_MODE_UNSPECIFIED -} - -func (x *LinuxNodeConfig) GetHugepages() *LinuxNodeConfig_HugepagesConfig { - if x != nil { - return x.Hugepages - } - return nil -} - -func (x *LinuxNodeConfig) GetTransparentHugepageEnabled() LinuxNodeConfig_TransparentHugepageEnabled { - if x != nil { - return x.TransparentHugepageEnabled - } - return LinuxNodeConfig_TRANSPARENT_HUGEPAGE_ENABLED_UNSPECIFIED -} - -func (x *LinuxNodeConfig) GetTransparentHugepageDefrag() LinuxNodeConfig_TransparentHugepageDefrag { - if x != nil { - return x.TransparentHugepageDefrag - } - return LinuxNodeConfig_TRANSPARENT_HUGEPAGE_DEFRAG_UNSPECIFIED -} - -func (x *LinuxNodeConfig) GetSwapConfig() *LinuxNodeConfig_SwapConfig { - if x != nil { - return x.SwapConfig - } - return nil -} - -func (x *LinuxNodeConfig) GetNodeKernelModuleLoading() *LinuxNodeConfig_NodeKernelModuleLoading { - if x != nil { - return x.NodeKernelModuleLoading - } - return nil -} - -// Parameters that can be configured on Windows nodes. -// Windows Node Config that define the parameters that will be used to -// configure the Windows node pool settings. -type WindowsNodeConfig struct { - state protoimpl.MessageState `protogen:"open.v1"` - // OSVersion specifies the Windows node config to be used on the node. - OsVersion WindowsNodeConfig_OSVersion `protobuf:"varint,1,opt,name=os_version,json=osVersion,proto3,enum=google.container.v1.WindowsNodeConfig_OSVersion" json:"os_version,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *WindowsNodeConfig) Reset() { - *x = WindowsNodeConfig{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *WindowsNodeConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*WindowsNodeConfig) ProtoMessage() {} - -func (x *WindowsNodeConfig) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[1] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use WindowsNodeConfig.ProtoReflect.Descriptor instead. -func (*WindowsNodeConfig) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{1} -} - -func (x *WindowsNodeConfig) GetOsVersion() WindowsNodeConfig_OSVersion { - if x != nil { - return x.OsVersion - } - return WindowsNodeConfig_OS_VERSION_UNSPECIFIED -} - -// Node kubelet configs. -type NodeKubeletConfig struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Control the CPU management policy on the node. - // See - // https://kubernetes.io/docs/tasks/administer-cluster/cpu-management-policies/ - // - // The following values are allowed. - // * "none": the default, which represents the existing scheduling behavior. - // * "static": allows pods with certain resource characteristics to be granted - // increased CPU affinity and exclusivity on the node. - // The default value is 'none' if unspecified. - CpuManagerPolicy string `protobuf:"bytes,1,opt,name=cpu_manager_policy,json=cpuManagerPolicy,proto3" json:"cpu_manager_policy,omitempty"` - // Optional. Controls Topology Manager configuration on the node. - // For more information, see: - // https://kubernetes.io/docs/tasks/administer-cluster/topology-manager/ - TopologyManager *TopologyManager `protobuf:"bytes,8,opt,name=topology_manager,json=topologyManager,proto3" json:"topology_manager,omitempty"` - // Optional. Controls NUMA-aware Memory Manager configuration on the - // node. For more information, see: - // https://kubernetes.io/docs/tasks/administer-cluster/memory-manager/ - MemoryManager *MemoryManager `protobuf:"bytes,9,opt,name=memory_manager,json=memoryManager,proto3" json:"memory_manager,omitempty"` - // Enable CPU CFS quota enforcement for containers that specify CPU limits. - // - // This option is enabled by default which makes kubelet use CFS quota - // (https://www.kernel.org/doc/Documentation/scheduler/sched-bwc.txt) to - // enforce container CPU limits. Otherwise, CPU limits will not be enforced at - // all. - // - // Disable this option to mitigate CPU throttling problems while still having - // your pods to be in Guaranteed QoS class by specifying the CPU limits. - // - // The default value is 'true' if unspecified. - CpuCfsQuota *wrapperspb.BoolValue `protobuf:"bytes,2,opt,name=cpu_cfs_quota,json=cpuCfsQuota,proto3" json:"cpu_cfs_quota,omitempty"` - // Set the CPU CFS quota period value 'cpu.cfs_period_us'. - // - // The string must be a sequence of decimal numbers, each with optional - // fraction and a unit suffix, such as "300ms". - // Valid time units are "ns", "us" (or "µs"), "ms", "s", "m", "h". - // The value must be a positive duration between 1ms and 1 second, inclusive. - CpuCfsQuotaPeriod string `protobuf:"bytes,3,opt,name=cpu_cfs_quota_period,json=cpuCfsQuotaPeriod,proto3" json:"cpu_cfs_quota_period,omitempty"` - // Set the Pod PID limits. See - // https://kubernetes.io/docs/concepts/policy/pid-limiting/#pod-pid-limits - // - // Controls the maximum number of processes allowed to run in a pod. The value - // must be greater than or equal to 1024 and less than 4194304. - PodPidsLimit int64 `protobuf:"varint,4,opt,name=pod_pids_limit,json=podPidsLimit,proto3" json:"pod_pids_limit,omitempty"` - // Enable or disable Kubelet read only port. - InsecureKubeletReadonlyPortEnabled *bool `protobuf:"varint,7,opt,name=insecure_kubelet_readonly_port_enabled,json=insecureKubeletReadonlyPortEnabled,proto3,oneof" json:"insecure_kubelet_readonly_port_enabled,omitempty"` - // Optional. Defines the percent of disk usage before which image garbage - // collection is never run. Lowest disk usage to garbage collect to. The - // percent is calculated as this field value out of 100. - // - // The value must be between 10 and 85, inclusive and smaller than - // image_gc_high_threshold_percent. - // - // The default value is 80 if unspecified. - ImageGcLowThresholdPercent int32 `protobuf:"varint,10,opt,name=image_gc_low_threshold_percent,json=imageGcLowThresholdPercent,proto3" json:"image_gc_low_threshold_percent,omitempty"` - // Optional. Defines the percent of disk usage after which image garbage - // collection is always run. The percent is calculated as this field value out - // of 100. - // - // The value must be between 10 and 85, inclusive and greater than - // image_gc_low_threshold_percent. - // - // The default value is 85 if unspecified. - ImageGcHighThresholdPercent int32 `protobuf:"varint,11,opt,name=image_gc_high_threshold_percent,json=imageGcHighThresholdPercent,proto3" json:"image_gc_high_threshold_percent,omitempty"` - // Optional. Defines the minimum age for an unused image before it is garbage - // collected. - // - // The string must be a sequence of decimal numbers, each with optional - // fraction and a unit suffix, such as "300s", "1.5h", and "2h45m". Valid time - // units are "ns", "us" (or "µs"), "ms", "s", "m", "h". - // - // The value must be a positive duration less than or equal to 2 minutes. - // - // The default value is "2m0s" if unspecified. - ImageMinimumGcAge string `protobuf:"bytes,12,opt,name=image_minimum_gc_age,json=imageMinimumGcAge,proto3" json:"image_minimum_gc_age,omitempty"` - // Optional. Defines the maximum age an image can be unused before it is - // garbage collected. The string must be a sequence of decimal numbers, each - // with optional fraction and a unit suffix, such as "300s", "1.5h", and - // "2h45m". Valid time units are "ns", "us" (or "µs"), "ms", "s", "m", "h". - // - // The value must be a positive duration greater than image_minimum_gc_age - // or "0s". - // - // The default value is "0s" if unspecified, which disables this field, - // meaning images won't be garbage collected based on being unused for too - // long. - ImageMaximumGcAge string `protobuf:"bytes,13,opt,name=image_maximum_gc_age,json=imageMaximumGcAge,proto3" json:"image_maximum_gc_age,omitempty"` - // Optional. Defines the maximum size of the container log file before it is - // rotated. See - // https://kubernetes.io/docs/concepts/cluster-administration/logging/#log-rotation - // - // Valid format is positive number + unit, e.g. 100Ki, 10Mi. Valid units are - // Ki, Mi, Gi. - // The value must be between 10Mi and 500Mi, inclusive. - // - // Note that the total container log size (container_log_max_size * - // container_log_max_files) cannot exceed 1% of the total - // storage of the node, to avoid disk pressure caused by log files. - // - // The default value is 10Mi if unspecified. - ContainerLogMaxSize string `protobuf:"bytes,14,opt,name=container_log_max_size,json=containerLogMaxSize,proto3" json:"container_log_max_size,omitempty"` - // Optional. Defines the maximum number of container log files that can be - // present for a container. See - // https://kubernetes.io/docs/concepts/cluster-administration/logging/#log-rotation - // - // The value must be an integer between 2 and 10, inclusive. - // The default value is 5 if unspecified. - ContainerLogMaxFiles int32 `protobuf:"varint,15,opt,name=container_log_max_files,json=containerLogMaxFiles,proto3" json:"container_log_max_files,omitempty"` - // Optional. Defines a comma-separated allowlist of unsafe sysctls or sysctl - // patterns (ending in `*`). - // - // The unsafe namespaced sysctl groups are `kernel.shm*`, `kernel.msg*`, - // `kernel.sem`, `fs.mqueue.*`, and `net.*`. Leaving this allowlist empty - // means they cannot be set on Pods. - // - // To allow certain sysctls or sysctl patterns to be set on Pods, list them - // separated by commas. - // For example: `kernel.msg*,net.ipv4.route.min_pmtu`. - // - // See https://kubernetes.io/docs/tasks/administer-cluster/sysctl-cluster/ - // for more details. - AllowedUnsafeSysctls []string `protobuf:"bytes,16,rep,name=allowed_unsafe_sysctls,json=allowedUnsafeSysctls,proto3" json:"allowed_unsafe_sysctls,omitempty"` - // Optional. eviction_soft is a map of signal names to quantities that defines - // soft eviction thresholds. Each signal is compared to its corresponding - // threshold to determine if a pod eviction should occur. - EvictionSoft *EvictionSignals `protobuf:"bytes,17,opt,name=eviction_soft,json=evictionSoft,proto3" json:"eviction_soft,omitempty"` - // Optional. eviction_soft_grace_period is a map of signal names to quantities - // that defines grace periods for each soft eviction signal. The grace period - // is the amount of time that a pod must be under pressure before an eviction - // occurs. - EvictionSoftGracePeriod *EvictionGracePeriod `protobuf:"bytes,18,opt,name=eviction_soft_grace_period,json=evictionSoftGracePeriod,proto3" json:"eviction_soft_grace_period,omitempty"` - // Optional. eviction_minimum_reclaim is a map of signal names to quantities - // that defines minimum reclaims, which describe the minimum amount of a given - // resource the kubelet will reclaim when performing a pod eviction while that - // resource is under pressure. - EvictionMinimumReclaim *EvictionMinimumReclaim `protobuf:"bytes,19,opt,name=eviction_minimum_reclaim,json=evictionMinimumReclaim,proto3" json:"eviction_minimum_reclaim,omitempty"` - // Optional. eviction_max_pod_grace_period_seconds is the maximum allowed - // grace period (in seconds) to use when terminating pods in response to a - // soft eviction threshold being met. This value effectively caps the Pod's - // terminationGracePeriodSeconds value during soft evictions. Default: 0. - // Range: [0, 300]. - EvictionMaxPodGracePeriodSeconds int32 `protobuf:"varint,20,opt,name=eviction_max_pod_grace_period_seconds,json=evictionMaxPodGracePeriodSeconds,proto3" json:"eviction_max_pod_grace_period_seconds,omitempty"` - // Optional. Defines the maximum number of image pulls in parallel. - // The range is 2 to 5, inclusive. - // The default value is 2 or 3 depending on the disk type. - // - // See - // https://kubernetes.io/docs/concepts/containers/images/#maximum-parallel-image-pulls - // for more details. - MaxParallelImagePulls int32 `protobuf:"varint,21,opt,name=max_parallel_image_pulls,json=maxParallelImagePulls,proto3" json:"max_parallel_image_pulls,omitempty"` - // Optional. Defines whether to enable single process OOM killer. - // If true, will prevent the memory.oom.group flag from being set for - // container cgroups in cgroups v2. This causes processes in the container to - // be OOM killed individually instead of as a group. - SingleProcessOomKill *bool `protobuf:"varint,22,opt,name=single_process_oom_kill,json=singleProcessOomKill,proto3,oneof" json:"single_process_oom_kill,omitempty"` - // Optional. shutdown_grace_period_seconds is the maximum allowed grace period - // (in seconds) the total duration that the node should delay the shutdown - // during a graceful shutdown. This is the total grace period for pod - // termination for both regular and critical pods. - // https://kubernetes.io/docs/concepts/cluster-administration/node-shutdown/ - // If set to 0, node will not enable the graceful node shutdown functionality. - // This field is only valid for Spot VMs. - // Allowed values: 0, 30, 120. - ShutdownGracePeriodSeconds *int32 `protobuf:"varint,26,opt,name=shutdown_grace_period_seconds,json=shutdownGracePeriodSeconds,proto3,oneof" json:"shutdown_grace_period_seconds,omitempty"` - // Optional. shutdown_grace_period_critical_pods_seconds is the maximum - // allowed grace period (in seconds) used to terminate critical pods during a - // node shutdown. This value should be <= shutdown_grace_period_seconds, and - // is only valid if shutdown_grace_period_seconds is set. - // https://kubernetes.io/docs/concepts/cluster-administration/node-shutdown/ - // Range: [0, 120]. - ShutdownGracePeriodCriticalPodsSeconds *int32 `protobuf:"varint,27,opt,name=shutdown_grace_period_critical_pods_seconds,json=shutdownGracePeriodCriticalPodsSeconds,proto3,oneof" json:"shutdown_grace_period_critical_pods_seconds,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *NodeKubeletConfig) Reset() { - *x = NodeKubeletConfig{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *NodeKubeletConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*NodeKubeletConfig) ProtoMessage() {} - -func (x *NodeKubeletConfig) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[2] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use NodeKubeletConfig.ProtoReflect.Descriptor instead. -func (*NodeKubeletConfig) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{2} -} - -func (x *NodeKubeletConfig) GetCpuManagerPolicy() string { - if x != nil { - return x.CpuManagerPolicy - } - return "" -} - -func (x *NodeKubeletConfig) GetTopologyManager() *TopologyManager { - if x != nil { - return x.TopologyManager - } - return nil -} - -func (x *NodeKubeletConfig) GetMemoryManager() *MemoryManager { - if x != nil { - return x.MemoryManager - } - return nil -} - -func (x *NodeKubeletConfig) GetCpuCfsQuota() *wrapperspb.BoolValue { - if x != nil { - return x.CpuCfsQuota - } - return nil -} - -func (x *NodeKubeletConfig) GetCpuCfsQuotaPeriod() string { - if x != nil { - return x.CpuCfsQuotaPeriod - } - return "" -} - -func (x *NodeKubeletConfig) GetPodPidsLimit() int64 { - if x != nil { - return x.PodPidsLimit - } - return 0 -} - -func (x *NodeKubeletConfig) GetInsecureKubeletReadonlyPortEnabled() bool { - if x != nil && x.InsecureKubeletReadonlyPortEnabled != nil { - return *x.InsecureKubeletReadonlyPortEnabled - } - return false -} - -func (x *NodeKubeletConfig) GetImageGcLowThresholdPercent() int32 { - if x != nil { - return x.ImageGcLowThresholdPercent - } - return 0 -} - -func (x *NodeKubeletConfig) GetImageGcHighThresholdPercent() int32 { - if x != nil { - return x.ImageGcHighThresholdPercent - } - return 0 -} - -func (x *NodeKubeletConfig) GetImageMinimumGcAge() string { - if x != nil { - return x.ImageMinimumGcAge - } - return "" -} - -func (x *NodeKubeletConfig) GetImageMaximumGcAge() string { - if x != nil { - return x.ImageMaximumGcAge - } - return "" -} - -func (x *NodeKubeletConfig) GetContainerLogMaxSize() string { - if x != nil { - return x.ContainerLogMaxSize - } - return "" -} - -func (x *NodeKubeletConfig) GetContainerLogMaxFiles() int32 { - if x != nil { - return x.ContainerLogMaxFiles - } - return 0 -} - -func (x *NodeKubeletConfig) GetAllowedUnsafeSysctls() []string { - if x != nil { - return x.AllowedUnsafeSysctls - } - return nil -} - -func (x *NodeKubeletConfig) GetEvictionSoft() *EvictionSignals { - if x != nil { - return x.EvictionSoft - } - return nil -} - -func (x *NodeKubeletConfig) GetEvictionSoftGracePeriod() *EvictionGracePeriod { - if x != nil { - return x.EvictionSoftGracePeriod - } - return nil -} - -func (x *NodeKubeletConfig) GetEvictionMinimumReclaim() *EvictionMinimumReclaim { - if x != nil { - return x.EvictionMinimumReclaim - } - return nil -} - -func (x *NodeKubeletConfig) GetEvictionMaxPodGracePeriodSeconds() int32 { - if x != nil { - return x.EvictionMaxPodGracePeriodSeconds - } - return 0 -} - -func (x *NodeKubeletConfig) GetMaxParallelImagePulls() int32 { - if x != nil { - return x.MaxParallelImagePulls - } - return 0 -} - -func (x *NodeKubeletConfig) GetSingleProcessOomKill() bool { - if x != nil && x.SingleProcessOomKill != nil { - return *x.SingleProcessOomKill - } - return false -} - -func (x *NodeKubeletConfig) GetShutdownGracePeriodSeconds() int32 { - if x != nil && x.ShutdownGracePeriodSeconds != nil { - return *x.ShutdownGracePeriodSeconds - } - return 0 -} - -func (x *NodeKubeletConfig) GetShutdownGracePeriodCriticalPodsSeconds() int32 { - if x != nil && x.ShutdownGracePeriodCriticalPodsSeconds != nil { - return *x.ShutdownGracePeriodCriticalPodsSeconds - } - return 0 -} - -// TopologyManager defines the configuration options for Topology Manager -// feature. See -// https://kubernetes.io/docs/tasks/administer-cluster/topology-manager/ -type TopologyManager struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Configures the strategy for resource alignment. - // Allowed values are: - // - // * none: the default policy, and does not perform any topology alignment. - // * restricted: the topology manager stores the preferred NUMA node affinity - // for the container, and will reject the pod if the affinity if not - // preferred. - // * best-effort: the topology manager stores the preferred NUMA node affinity - // for the container. If the affinity is not preferred, the topology manager - // will admit the pod to the node anyway. - // * single-numa-node: the topology manager determines if the single NUMA node - // affinity is possible. If it is, Topology Manager will store this and the - // Hint Providers can then use this information when making the resource - // allocation decision. If, however, this is not possible then the - // Topology Manager will reject the pod from the node. This will result in a - // pod in a Terminated state with a pod admission failure. - // - // The default policy value is 'none' if unspecified. - // Details about each strategy can be found - // [here](https://kubernetes.io/docs/tasks/administer-cluster/topology-manager/#topology-manager-policies). - Policy string `protobuf:"bytes,1,opt,name=policy,proto3" json:"policy,omitempty"` - // The Topology Manager aligns resources in following scopes: - // - // * container - // * pod - // - // The default scope is 'container' if unspecified. - // See - // https://kubernetes.io/docs/tasks/administer-cluster/topology-manager/#topology-manager-scopes - Scope string `protobuf:"bytes,2,opt,name=scope,proto3" json:"scope,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *TopologyManager) Reset() { - *x = TopologyManager{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *TopologyManager) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*TopologyManager) ProtoMessage() {} - -func (x *TopologyManager) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[3] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use TopologyManager.ProtoReflect.Descriptor instead. -func (*TopologyManager) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{3} -} - -func (x *TopologyManager) GetPolicy() string { - if x != nil { - return x.Policy - } - return "" -} - -func (x *TopologyManager) GetScope() string { - if x != nil { - return x.Scope - } - return "" -} - -// The option enables the Kubernetes NUMA-aware Memory Manager feature. -// Detailed description about the feature can be found -// [here](https://kubernetes.io/docs/tasks/administer-cluster/memory-manager/). -type MemoryManager struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Controls the memory management policy on the Node. - // See - // https://kubernetes.io/docs/tasks/administer-cluster/memory-manager/#policies - // - // The following values are allowed. - // * "none" - // * "static" - // The default value is 'none' if unspecified. - Policy string `protobuf:"bytes,1,opt,name=policy,proto3" json:"policy,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *MemoryManager) Reset() { - *x = MemoryManager{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *MemoryManager) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MemoryManager) ProtoMessage() {} - -func (x *MemoryManager) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[4] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use MemoryManager.ProtoReflect.Descriptor instead. -func (*MemoryManager) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{4} -} - -func (x *MemoryManager) GetPolicy() string { - if x != nil { - return x.Policy - } - return "" -} - -// Eviction signals are the current state of a particular resource at a specific -// point in time. The kubelet uses eviction signals to make eviction decisions -// by comparing the signals to eviction thresholds, which are the minimum amount -// of the resource that should be available on the node. -type EvictionSignals struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Optional. Memory available (i.e. capacity - workingSet), in bytes. Defines - // the amount of "memory.available" signal in kubelet. Default is unset, if - // not specified in the kubelet config. Format: positive number + unit, e.g. - // 100Ki, 10Mi, 5Gi. Valid units are Ki, Mi, Gi. Must be >= 100Mi and <= 50% - // of the node's memory. See - // https://kubernetes.io/docs/concepts/scheduling-eviction/node-pressure-eviction/#eviction-signals - MemoryAvailable string `protobuf:"bytes,1,opt,name=memory_available,json=memoryAvailable,proto3" json:"memory_available,omitempty"` - // Optional. Amount of storage available on filesystem that kubelet uses for - // volumes, daemon logs, etc. Defines the amount of "nodefs.available" signal - // in kubelet. Default is unset, if not specified in the kubelet config. It - // takses percentage value for now. Sample format: "30%". Must be >= 10% and - // <= 50%. See - // https://kubernetes.io/docs/concepts/scheduling-eviction/node-pressure-eviction/#eviction-signals - NodefsAvailable string `protobuf:"bytes,2,opt,name=nodefs_available,json=nodefsAvailable,proto3" json:"nodefs_available,omitempty"` - // Optional. Amount of inodes available on filesystem that kubelet uses for - // volumes, daemon logs, etc. Defines the amount of "nodefs.inodesFree" signal - // in kubelet. Default is unset, if not specified in the kubelet config. Linux - // only. It takses percentage value for now. Sample format: "30%". Must be >= - // 5% and <= 50%. See - // https://kubernetes.io/docs/concepts/scheduling-eviction/node-pressure-eviction/#eviction-signals - NodefsInodesFree string `protobuf:"bytes,3,opt,name=nodefs_inodes_free,json=nodefsInodesFree,proto3" json:"nodefs_inodes_free,omitempty"` - // Optional. Amount of storage available on filesystem that container runtime - // uses for storing images layers. If the container filesystem and image - // filesystem are not separate, then imagefs can store both image layers and - // writeable layers. Defines the amount of "imagefs.available" signal in - // kubelet. Default is unset, if not specified in the kubelet config. It - // takses percentage value for now. Sample format: "30%". Must be >= 15% and - // <= 50%. See - // https://kubernetes.io/docs/concepts/scheduling-eviction/node-pressure-eviction/#eviction-signals - ImagefsAvailable string `protobuf:"bytes,4,opt,name=imagefs_available,json=imagefsAvailable,proto3" json:"imagefs_available,omitempty"` - // Optional. Amount of inodes available on filesystem that container runtime - // uses for storing images layers. Defines the amount of "imagefs.inodesFree" - // signal in kubelet. Default is unset, if not specified in the kubelet - // config. Linux only. It takses percentage value for now. Sample format: - // "30%". Must be >= 5% and <= 50%. See - // https://kubernetes.io/docs/concepts/scheduling-eviction/node-pressure-eviction/#eviction-signals - ImagefsInodesFree string `protobuf:"bytes,5,opt,name=imagefs_inodes_free,json=imagefsInodesFree,proto3" json:"imagefs_inodes_free,omitempty"` - // Optional. Amount of PID available for pod allocation. Defines the amount of - // "pid.available" signal in kubelet. Default is unset, if not specified in - // the kubelet config. It takses percentage value for now. Sample format: - // "30%". Must be >= 10% and <= 50%. See - // https://kubernetes.io/docs/concepts/scheduling-eviction/node-pressure-eviction/#eviction-signals - PidAvailable string `protobuf:"bytes,6,opt,name=pid_available,json=pidAvailable,proto3" json:"pid_available,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *EvictionSignals) Reset() { - *x = EvictionSignals{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *EvictionSignals) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*EvictionSignals) ProtoMessage() {} - -func (x *EvictionSignals) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[5] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use EvictionSignals.ProtoReflect.Descriptor instead. -func (*EvictionSignals) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{5} -} - -func (x *EvictionSignals) GetMemoryAvailable() string { - if x != nil { - return x.MemoryAvailable - } - return "" -} - -func (x *EvictionSignals) GetNodefsAvailable() string { - if x != nil { - return x.NodefsAvailable - } - return "" -} - -func (x *EvictionSignals) GetNodefsInodesFree() string { - if x != nil { - return x.NodefsInodesFree - } - return "" -} - -func (x *EvictionSignals) GetImagefsAvailable() string { - if x != nil { - return x.ImagefsAvailable - } - return "" -} - -func (x *EvictionSignals) GetImagefsInodesFree() string { - if x != nil { - return x.ImagefsInodesFree - } - return "" -} - -func (x *EvictionSignals) GetPidAvailable() string { - if x != nil { - return x.PidAvailable - } - return "" -} - -// Eviction grace periods are grace periods for each eviction signal. -type EvictionGracePeriod struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Optional. Grace period for eviction due to memory available signal. Sample - // format: "10s". Must be >= 0. See - // https://kubernetes.io/docs/concepts/scheduling-eviction/node-pressure-eviction/#eviction-signals - MemoryAvailable string `protobuf:"bytes,1,opt,name=memory_available,json=memoryAvailable,proto3" json:"memory_available,omitempty"` - // Optional. Grace period for eviction due to nodefs available signal. Sample - // format: "10s". Must be >= 0. See - // https://kubernetes.io/docs/concepts/scheduling-eviction/node-pressure-eviction/#eviction-signals - NodefsAvailable string `protobuf:"bytes,2,opt,name=nodefs_available,json=nodefsAvailable,proto3" json:"nodefs_available,omitempty"` - // Optional. Grace period for eviction due to nodefs inodes free signal. - // Sample format: "10s". Must be >= 0. See - // https://kubernetes.io/docs/concepts/scheduling-eviction/node-pressure-eviction/#eviction-signals - NodefsInodesFree string `protobuf:"bytes,3,opt,name=nodefs_inodes_free,json=nodefsInodesFree,proto3" json:"nodefs_inodes_free,omitempty"` - // Optional. Grace period for eviction due to imagefs available signal. Sample - // format: "10s". Must be >= 0. See - // https://kubernetes.io/docs/concepts/scheduling-eviction/node-pressure-eviction/#eviction-signals - ImagefsAvailable string `protobuf:"bytes,4,opt,name=imagefs_available,json=imagefsAvailable,proto3" json:"imagefs_available,omitempty"` - // Optional. Grace period for eviction due to imagefs inodes free signal. - // Sample format: "10s". Must be >= 0. See - // https://kubernetes.io/docs/concepts/scheduling-eviction/node-pressure-eviction/#eviction-signals - ImagefsInodesFree string `protobuf:"bytes,5,opt,name=imagefs_inodes_free,json=imagefsInodesFree,proto3" json:"imagefs_inodes_free,omitempty"` - // Optional. Grace period for eviction due to pid available signal. Sample - // format: "10s". Must be >= 0. See - // https://kubernetes.io/docs/concepts/scheduling-eviction/node-pressure-eviction/#eviction-signals - PidAvailable string `protobuf:"bytes,6,opt,name=pid_available,json=pidAvailable,proto3" json:"pid_available,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *EvictionGracePeriod) Reset() { - *x = EvictionGracePeriod{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *EvictionGracePeriod) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*EvictionGracePeriod) ProtoMessage() {} - -func (x *EvictionGracePeriod) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[6] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use EvictionGracePeriod.ProtoReflect.Descriptor instead. -func (*EvictionGracePeriod) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{6} -} - -func (x *EvictionGracePeriod) GetMemoryAvailable() string { - if x != nil { - return x.MemoryAvailable - } - return "" -} - -func (x *EvictionGracePeriod) GetNodefsAvailable() string { - if x != nil { - return x.NodefsAvailable - } - return "" -} - -func (x *EvictionGracePeriod) GetNodefsInodesFree() string { - if x != nil { - return x.NodefsInodesFree - } - return "" -} - -func (x *EvictionGracePeriod) GetImagefsAvailable() string { - if x != nil { - return x.ImagefsAvailable - } - return "" -} - -func (x *EvictionGracePeriod) GetImagefsInodesFree() string { - if x != nil { - return x.ImagefsInodesFree - } - return "" -} - -func (x *EvictionGracePeriod) GetPidAvailable() string { - if x != nil { - return x.PidAvailable - } - return "" -} - -// Eviction minimum reclaims are the resource amounts of minimum reclaims for -// each eviction signal. -type EvictionMinimumReclaim struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Optional. Minimum reclaim for eviction due to memory available signal. Only - // take percentage value for now. Sample format: "10%". Must be <=10%. See - // https://kubernetes.io/docs/concepts/scheduling-eviction/node-pressure-eviction/#eviction-signals - MemoryAvailable string `protobuf:"bytes,1,opt,name=memory_available,json=memoryAvailable,proto3" json:"memory_available,omitempty"` - // Optional. Minimum reclaim for eviction due to nodefs available signal. Only - // take percentage value for now. Sample format: "10%". Must be <=10%. See - // https://kubernetes.io/docs/concepts/scheduling-eviction/node-pressure-eviction/#eviction-signals - NodefsAvailable string `protobuf:"bytes,2,opt,name=nodefs_available,json=nodefsAvailable,proto3" json:"nodefs_available,omitempty"` - // Optional. Minimum reclaim for eviction due to nodefs inodes free signal. - // Only take percentage value for now. Sample format: "10%". Must be <=10%. - // See - // https://kubernetes.io/docs/concepts/scheduling-eviction/node-pressure-eviction/#eviction-signals - NodefsInodesFree string `protobuf:"bytes,3,opt,name=nodefs_inodes_free,json=nodefsInodesFree,proto3" json:"nodefs_inodes_free,omitempty"` - // Optional. Minimum reclaim for eviction due to imagefs available signal. - // Only take percentage value for now. Sample format: "10%". Must be <=10%. - // See - // https://kubernetes.io/docs/concepts/scheduling-eviction/node-pressure-eviction/#eviction-signals - ImagefsAvailable string `protobuf:"bytes,4,opt,name=imagefs_available,json=imagefsAvailable,proto3" json:"imagefs_available,omitempty"` - // Optional. Minimum reclaim for eviction due to imagefs inodes free signal. - // Only take percentage value for now. Sample format: "10%". Must be <=10%. - // See - // https://kubernetes.io/docs/concepts/scheduling-eviction/node-pressure-eviction/#eviction-signals - ImagefsInodesFree string `protobuf:"bytes,5,opt,name=imagefs_inodes_free,json=imagefsInodesFree,proto3" json:"imagefs_inodes_free,omitempty"` - // Optional. Minimum reclaim for eviction due to pid available signal. Only - // take percentage value for now. Sample format: "10%". Must be <=10%. See - // https://kubernetes.io/docs/concepts/scheduling-eviction/node-pressure-eviction/#eviction-signals - PidAvailable string `protobuf:"bytes,6,opt,name=pid_available,json=pidAvailable,proto3" json:"pid_available,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *EvictionMinimumReclaim) Reset() { - *x = EvictionMinimumReclaim{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *EvictionMinimumReclaim) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*EvictionMinimumReclaim) ProtoMessage() {} - -func (x *EvictionMinimumReclaim) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[7] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use EvictionMinimumReclaim.ProtoReflect.Descriptor instead. -func (*EvictionMinimumReclaim) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{7} -} - -func (x *EvictionMinimumReclaim) GetMemoryAvailable() string { - if x != nil { - return x.MemoryAvailable - } - return "" -} - -func (x *EvictionMinimumReclaim) GetNodefsAvailable() string { - if x != nil { - return x.NodefsAvailable - } - return "" -} - -func (x *EvictionMinimumReclaim) GetNodefsInodesFree() string { - if x != nil { - return x.NodefsInodesFree - } - return "" -} - -func (x *EvictionMinimumReclaim) GetImagefsAvailable() string { - if x != nil { - return x.ImagefsAvailable - } - return "" -} - -func (x *EvictionMinimumReclaim) GetImagefsInodesFree() string { - if x != nil { - return x.ImagefsInodesFree - } - return "" -} - -func (x *EvictionMinimumReclaim) GetPidAvailable() string { - if x != nil { - return x.PidAvailable - } - return "" -} - -// Parameters that describe the nodes in a cluster. -// -// GKE Autopilot clusters do not -// recognize parameters in `NodeConfig`. Use -// [AutoprovisioningNodePoolDefaults][google.container.v1.AutoprovisioningNodePoolDefaults] -// instead. -type NodeConfig struct { - state protoimpl.MessageState `protogen:"open.v1"` - // The name of a Google Compute Engine [machine - // type](https://cloud.google.com/compute/docs/machine-types) - // - // If unspecified, the default machine type is `e2-medium`. - MachineType string `protobuf:"bytes,1,opt,name=machine_type,json=machineType,proto3" json:"machine_type,omitempty"` - // Size of the disk attached to each node, specified in GB. - // The smallest allowed disk size is 10GB. - // - // If unspecified, the default disk size is 100GB. - DiskSizeGb int32 `protobuf:"varint,2,opt,name=disk_size_gb,json=diskSizeGb,proto3" json:"disk_size_gb,omitempty"` - // The set of Google API scopes to be made available on all of the - // node VMs under the "default" service account. - // - // The following scopes are recommended, but not required, and by default are - // not included: - // - // * `https://www.googleapis.com/auth/compute` is required for mounting - // persistent storage on your nodes. - // * `https://www.googleapis.com/auth/devstorage.read_only` is required for - // communicating with **gcr.io** - // (the [Artifact Registry](https://cloud.google.com/artifact-registry/)). - // - // If unspecified, no scopes are added, unless Cloud Logging or Cloud - // Monitoring are enabled, in which case their required scopes will be added. - OauthScopes []string `protobuf:"bytes,3,rep,name=oauth_scopes,json=oauthScopes,proto3" json:"oauth_scopes,omitempty"` - // The Google Cloud Platform Service Account to be used by the node VMs. - // Specify the email address of the Service Account; otherwise, if no Service - // Account is specified, the "default" service account is used. - ServiceAccount string `protobuf:"bytes,9,opt,name=service_account,json=serviceAccount,proto3" json:"service_account,omitempty"` - // The metadata key/value pairs assigned to instances in the cluster. - // - // Keys must conform to the regexp `[a-zA-Z0-9-_]+` and be less than 128 bytes - // in length. These are reflected as part of a URL in the metadata server. - // Additionally, to avoid ambiguity, keys must not conflict with any other - // metadata keys for the project or be one of the reserved keys: - // - // - "cluster-location" - // - "cluster-name" - // - "cluster-uid" - // - "configure-sh" - // - "containerd-configure-sh" - // - "enable-os-login" - // - "gci-ensure-gke-docker" - // - "gci-metrics-enabled" - // - "gci-update-strategy" - // - "instance-template" - // - "kube-env" - // - "startup-script" - // - "user-data" - // - "disable-address-manager" - // - "windows-startup-script-ps1" - // - "common-psm1" - // - "k8s-node-setup-psm1" - // - "install-ssh-psm1" - // - "user-profile-psm1" - // - // Values are free-form strings, and only have meaning as interpreted by - // the image running in the instance. The only restriction placed on them is - // that each value's size must be less than or equal to 32 KB. - // - // The total size of all keys and values must be less than 512 KB. - Metadata map[string]string `protobuf:"bytes,4,rep,name=metadata,proto3" json:"metadata,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` - // The image type to use for this node. Note that for a given image type, - // the latest version of it will be used. Please see - // https://cloud.google.com/kubernetes-engine/docs/concepts/node-images - // for available image types. - ImageType string `protobuf:"bytes,5,opt,name=image_type,json=imageType,proto3" json:"image_type,omitempty"` - // The map of Kubernetes labels (key/value pairs) to be applied to each node. - // These will added in addition to any default label(s) that - // Kubernetes may apply to the node. - // In case of conflict in label keys, the applied set may differ depending on - // the Kubernetes version -- it's best to assume the behavior is undefined - // and conflicts should be avoided. - // For more information, including usage and the valid values, see: - // https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ - Labels map[string]string `protobuf:"bytes,6,rep,name=labels,proto3" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` - // The number of local SSD disks to be attached to the node. - // - // The limit for this value is dependent upon the maximum number of - // disks available on a machine per zone. See: - // https://cloud.google.com/compute/docs/disks/local-ssd - // for more information. - LocalSsdCount int32 `protobuf:"varint,7,opt,name=local_ssd_count,json=localSsdCount,proto3" json:"local_ssd_count,omitempty"` - // The list of instance tags applied to all nodes. Tags are used to identify - // valid sources or targets for network firewalls and are specified by - // the client during cluster or node pool creation. Each tag within the list - // must comply with RFC1035. - Tags []string `protobuf:"bytes,8,rep,name=tags,proto3" json:"tags,omitempty"` - // Whether the nodes are created as preemptible VM instances. See: - // https://cloud.google.com/compute/docs/instances/preemptible - // for more information about preemptible VM instances. - Preemptible bool `protobuf:"varint,10,opt,name=preemptible,proto3" json:"preemptible,omitempty"` - // A list of hardware accelerators to be attached to each node. - // See - // https://cloud.google.com/compute/docs/gpus - // for more information about support for GPUs. - Accelerators []*AcceleratorConfig `protobuf:"bytes,11,rep,name=accelerators,proto3" json:"accelerators,omitempty"` - // Type of the disk attached to each node (e.g. 'pd-standard', 'pd-ssd' or - // 'pd-balanced') - // - // If unspecified, the default disk type is 'pd-standard' - DiskType string `protobuf:"bytes,12,opt,name=disk_type,json=diskType,proto3" json:"disk_type,omitempty"` - // Minimum CPU platform to be used by this instance. The instance may be - // scheduled on the specified or newer CPU platform. Applicable values are the - // friendly names of CPU platforms, such as - // `minCpuPlatform: "Intel Haswell"` or - // `minCpuPlatform: "Intel Sandy Bridge"`. For more - // information, read [how to specify min CPU - // platform](https://cloud.google.com/compute/docs/instances/specify-min-cpu-platform) - MinCpuPlatform string `protobuf:"bytes,13,opt,name=min_cpu_platform,json=minCpuPlatform,proto3" json:"min_cpu_platform,omitempty"` - // The workload metadata configuration for this node. - WorkloadMetadataConfig *WorkloadMetadataConfig `protobuf:"bytes,14,opt,name=workload_metadata_config,json=workloadMetadataConfig,proto3" json:"workload_metadata_config,omitempty"` - // List of kubernetes taints to be applied to each node. - // - // For more information, including usage and the valid values, see: - // https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ - Taints []*NodeTaint `protobuf:"bytes,15,rep,name=taints,proto3" json:"taints,omitempty"` - // Sandbox configuration for this node. - SandboxConfig *SandboxConfig `protobuf:"bytes,17,opt,name=sandbox_config,json=sandboxConfig,proto3" json:"sandbox_config,omitempty"` - // Setting this field will assign instances of this - // pool to run on the specified node group. This is useful for running - // workloads on [sole tenant - // nodes](https://cloud.google.com/compute/docs/nodes/sole-tenant-nodes). - NodeGroup string `protobuf:"bytes,18,opt,name=node_group,json=nodeGroup,proto3" json:"node_group,omitempty"` - // The optional reservation affinity. Setting this field will apply - // the specified [Zonal Compute - // Reservation](https://cloud.google.com/compute/docs/instances/reserving-zonal-resources) - // to this node pool. - ReservationAffinity *ReservationAffinity `protobuf:"bytes,19,opt,name=reservation_affinity,json=reservationAffinity,proto3" json:"reservation_affinity,omitempty"` - // Shielded Instance options. - ShieldedInstanceConfig *ShieldedInstanceConfig `protobuf:"bytes,20,opt,name=shielded_instance_config,json=shieldedInstanceConfig,proto3" json:"shielded_instance_config,omitempty"` - // Parameters that can be configured on Linux nodes. - LinuxNodeConfig *LinuxNodeConfig `protobuf:"bytes,21,opt,name=linux_node_config,json=linuxNodeConfig,proto3" json:"linux_node_config,omitempty"` - // Node kubelet configs. - KubeletConfig *NodeKubeletConfig `protobuf:"bytes,22,opt,name=kubelet_config,json=kubeletConfig,proto3" json:"kubelet_config,omitempty"` - // The Customer Managed Encryption Key used to encrypt the boot disk attached - // to each node in the node pool. This should be of the form - // projects/[KEY_PROJECT_ID]/locations/[LOCATION]/keyRings/[RING_NAME]/cryptoKeys/[KEY_NAME]. - // For more information about protecting resources with Cloud KMS Keys please - // see: - // https://cloud.google.com/compute/docs/disks/customer-managed-encryption - BootDiskKmsKey string `protobuf:"bytes,23,opt,name=boot_disk_kms_key,json=bootDiskKmsKey,proto3" json:"boot_disk_kms_key,omitempty"` - // Google Container File System (image streaming) configs. - GcfsConfig *GcfsConfig `protobuf:"bytes,25,opt,name=gcfs_config,json=gcfsConfig,proto3" json:"gcfs_config,omitempty"` - // Advanced features for the Compute Engine VM. - AdvancedMachineFeatures *AdvancedMachineFeatures `protobuf:"bytes,26,opt,name=advanced_machine_features,json=advancedMachineFeatures,proto3" json:"advanced_machine_features,omitempty"` - // Enable or disable gvnic in the node pool. - Gvnic *VirtualNIC `protobuf:"bytes,29,opt,name=gvnic,proto3" json:"gvnic,omitempty"` - // Spot flag for enabling Spot VM, which is a rebrand of - // the existing preemptible flag. - Spot bool `protobuf:"varint,32,opt,name=spot,proto3" json:"spot,omitempty"` - // Confidential nodes config. - // All the nodes in the node pool will be Confidential VM once enabled. - ConfidentialNodes *ConfidentialNodes `protobuf:"bytes,35,opt,name=confidential_nodes,json=confidentialNodes,proto3" json:"confidential_nodes,omitempty"` - // Enable or disable NCCL fast socket for the node pool. - FastSocket *FastSocket `protobuf:"bytes,36,opt,name=fast_socket,json=fastSocket,proto3,oneof" json:"fast_socket,omitempty"` - // The resource labels for the node pool to use to annotate any related - // Google Compute Engine resources. - ResourceLabels map[string]string `protobuf:"bytes,37,rep,name=resource_labels,json=resourceLabels,proto3" json:"resource_labels,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` - // Logging configuration. - LoggingConfig *NodePoolLoggingConfig `protobuf:"bytes,38,opt,name=logging_config,json=loggingConfig,proto3" json:"logging_config,omitempty"` - // Parameters that can be configured on Windows nodes. - WindowsNodeConfig *WindowsNodeConfig `protobuf:"bytes,39,opt,name=windows_node_config,json=windowsNodeConfig,proto3" json:"windows_node_config,omitempty"` - // Parameters for using raw-block Local NVMe SSDs. - LocalNvmeSsdBlockConfig *LocalNvmeSsdBlockConfig `protobuf:"bytes,40,opt,name=local_nvme_ssd_block_config,json=localNvmeSsdBlockConfig,proto3" json:"local_nvme_ssd_block_config,omitempty"` - // Parameters for the node ephemeral storage using Local SSDs. - // If unspecified, ephemeral storage is backed by the boot disk. - EphemeralStorageLocalSsdConfig *EphemeralStorageLocalSsdConfig `protobuf:"bytes,41,opt,name=ephemeral_storage_local_ssd_config,json=ephemeralStorageLocalSsdConfig,proto3" json:"ephemeral_storage_local_ssd_config,omitempty"` - // Parameters for node pools to be backed by shared sole tenant node groups. - SoleTenantConfig *SoleTenantConfig `protobuf:"bytes,42,opt,name=sole_tenant_config,json=soleTenantConfig,proto3" json:"sole_tenant_config,omitempty"` - // Parameters for containerd customization. - ContainerdConfig *ContainerdConfig `protobuf:"bytes,43,opt,name=containerd_config,json=containerdConfig,proto3" json:"containerd_config,omitempty"` - // A map of resource manager tag keys and values to be attached to the nodes. - ResourceManagerTags *ResourceManagerTags `protobuf:"bytes,45,opt,name=resource_manager_tags,json=resourceManagerTags,proto3" json:"resource_manager_tags,omitempty"` - // Optional. Reserved for future use. - EnableConfidentialStorage bool `protobuf:"varint,46,opt,name=enable_confidential_storage,json=enableConfidentialStorage,proto3" json:"enable_confidential_storage,omitempty"` - // List of secondary boot disks attached to the nodes. - SecondaryBootDisks []*SecondaryBootDisk `protobuf:"bytes,48,rep,name=secondary_boot_disks,json=secondaryBootDisks,proto3" json:"secondary_boot_disks,omitempty"` - // List of Storage Pools where boot disks are provisioned. - StoragePools []string `protobuf:"bytes,49,rep,name=storage_pools,json=storagePools,proto3" json:"storage_pools,omitempty"` - // Secondary boot disk update strategy. - SecondaryBootDiskUpdateStrategy *SecondaryBootDiskUpdateStrategy `protobuf:"bytes,50,opt,name=secondary_boot_disk_update_strategy,json=secondaryBootDiskUpdateStrategy,proto3,oneof" json:"secondary_boot_disk_update_strategy,omitempty"` - // The configuration for GPU Direct - GpuDirectConfig *GPUDirectConfig `protobuf:"bytes,51,opt,name=gpu_direct_config,json=gpuDirectConfig,proto3,oneof" json:"gpu_direct_config,omitempty"` - // The maximum duration for the nodes to exist. - // If unspecified, the nodes can exist indefinitely. - MaxRunDuration *durationpb.Duration `protobuf:"bytes,53,opt,name=max_run_duration,json=maxRunDuration,proto3" json:"max_run_duration,omitempty"` - // Specifies which method should be used for encrypting the - // Local SSDs attached to the node. - LocalSsdEncryptionMode *NodeConfig_LocalSsdEncryptionMode `protobuf:"varint,54,opt,name=local_ssd_encryption_mode,json=localSsdEncryptionMode,proto3,enum=google.container.v1.NodeConfig_LocalSsdEncryptionMode,oneof" json:"local_ssd_encryption_mode,omitempty"` - // Output only. effective_cgroup_mode is the cgroup mode actually used by the - // node pool. It is determined by the cgroup mode specified in the - // LinuxNodeConfig or the default cgroup mode based on the cluster creation - // version. - EffectiveCgroupMode NodeConfig_EffectiveCgroupMode `protobuf:"varint,55,opt,name=effective_cgroup_mode,json=effectiveCgroupMode,proto3,enum=google.container.v1.NodeConfig_EffectiveCgroupMode" json:"effective_cgroup_mode,omitempty"` - // Flex Start flag for enabling Flex Start VM. - FlexStart *bool `protobuf:"varint,56,opt,name=flex_start,json=flexStart,proto3,oneof" json:"flex_start,omitempty"` - // The boot disk configuration for the node pool. - BootDisk *BootDisk `protobuf:"bytes,57,opt,name=boot_disk,json=bootDisk,proto3" json:"boot_disk,omitempty"` - // Consolidation delay defines duration after which the Cluster Autoscaler can - // scale down underutilized nodes. If not set, nodes are scaled down by - // default behavior, i.e. according to the chosen autoscaling profile. - ConsolidationDelay *durationpb.Duration `protobuf:"bytes,60,opt,name=consolidation_delay,json=consolidationDelay,proto3" json:"consolidation_delay,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *NodeConfig) Reset() { - *x = NodeConfig{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *NodeConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*NodeConfig) ProtoMessage() {} - -func (x *NodeConfig) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[8] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use NodeConfig.ProtoReflect.Descriptor instead. -func (*NodeConfig) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{8} -} - -func (x *NodeConfig) GetMachineType() string { - if x != nil { - return x.MachineType - } - return "" -} - -func (x *NodeConfig) GetDiskSizeGb() int32 { - if x != nil { - return x.DiskSizeGb - } - return 0 -} - -func (x *NodeConfig) GetOauthScopes() []string { - if x != nil { - return x.OauthScopes - } - return nil -} - -func (x *NodeConfig) GetServiceAccount() string { - if x != nil { - return x.ServiceAccount - } - return "" -} - -func (x *NodeConfig) GetMetadata() map[string]string { - if x != nil { - return x.Metadata - } - return nil -} - -func (x *NodeConfig) GetImageType() string { - if x != nil { - return x.ImageType - } - return "" -} - -func (x *NodeConfig) GetLabels() map[string]string { - if x != nil { - return x.Labels - } - return nil -} - -func (x *NodeConfig) GetLocalSsdCount() int32 { - if x != nil { - return x.LocalSsdCount - } - return 0 -} - -func (x *NodeConfig) GetTags() []string { - if x != nil { - return x.Tags - } - return nil -} - -func (x *NodeConfig) GetPreemptible() bool { - if x != nil { - return x.Preemptible - } - return false -} - -func (x *NodeConfig) GetAccelerators() []*AcceleratorConfig { - if x != nil { - return x.Accelerators - } - return nil -} - -func (x *NodeConfig) GetDiskType() string { - if x != nil { - return x.DiskType - } - return "" -} - -func (x *NodeConfig) GetMinCpuPlatform() string { - if x != nil { - return x.MinCpuPlatform - } - return "" -} - -func (x *NodeConfig) GetWorkloadMetadataConfig() *WorkloadMetadataConfig { - if x != nil { - return x.WorkloadMetadataConfig - } - return nil -} - -func (x *NodeConfig) GetTaints() []*NodeTaint { - if x != nil { - return x.Taints - } - return nil -} - -func (x *NodeConfig) GetSandboxConfig() *SandboxConfig { - if x != nil { - return x.SandboxConfig - } - return nil -} - -func (x *NodeConfig) GetNodeGroup() string { - if x != nil { - return x.NodeGroup - } - return "" -} - -func (x *NodeConfig) GetReservationAffinity() *ReservationAffinity { - if x != nil { - return x.ReservationAffinity - } - return nil -} - -func (x *NodeConfig) GetShieldedInstanceConfig() *ShieldedInstanceConfig { - if x != nil { - return x.ShieldedInstanceConfig - } - return nil -} - -func (x *NodeConfig) GetLinuxNodeConfig() *LinuxNodeConfig { - if x != nil { - return x.LinuxNodeConfig - } - return nil -} - -func (x *NodeConfig) GetKubeletConfig() *NodeKubeletConfig { - if x != nil { - return x.KubeletConfig - } - return nil -} - -func (x *NodeConfig) GetBootDiskKmsKey() string { - if x != nil { - return x.BootDiskKmsKey - } - return "" -} - -func (x *NodeConfig) GetGcfsConfig() *GcfsConfig { - if x != nil { - return x.GcfsConfig - } - return nil -} - -func (x *NodeConfig) GetAdvancedMachineFeatures() *AdvancedMachineFeatures { - if x != nil { - return x.AdvancedMachineFeatures - } - return nil -} - -func (x *NodeConfig) GetGvnic() *VirtualNIC { - if x != nil { - return x.Gvnic - } - return nil -} - -func (x *NodeConfig) GetSpot() bool { - if x != nil { - return x.Spot - } - return false -} - -func (x *NodeConfig) GetConfidentialNodes() *ConfidentialNodes { - if x != nil { - return x.ConfidentialNodes - } - return nil -} - -func (x *NodeConfig) GetFastSocket() *FastSocket { - if x != nil { - return x.FastSocket - } - return nil -} - -func (x *NodeConfig) GetResourceLabels() map[string]string { - if x != nil { - return x.ResourceLabels - } - return nil -} - -func (x *NodeConfig) GetLoggingConfig() *NodePoolLoggingConfig { - if x != nil { - return x.LoggingConfig - } - return nil -} - -func (x *NodeConfig) GetWindowsNodeConfig() *WindowsNodeConfig { - if x != nil { - return x.WindowsNodeConfig - } - return nil -} - -func (x *NodeConfig) GetLocalNvmeSsdBlockConfig() *LocalNvmeSsdBlockConfig { - if x != nil { - return x.LocalNvmeSsdBlockConfig - } - return nil -} - -func (x *NodeConfig) GetEphemeralStorageLocalSsdConfig() *EphemeralStorageLocalSsdConfig { - if x != nil { - return x.EphemeralStorageLocalSsdConfig - } - return nil -} - -func (x *NodeConfig) GetSoleTenantConfig() *SoleTenantConfig { - if x != nil { - return x.SoleTenantConfig - } - return nil -} - -func (x *NodeConfig) GetContainerdConfig() *ContainerdConfig { - if x != nil { - return x.ContainerdConfig - } - return nil -} - -func (x *NodeConfig) GetResourceManagerTags() *ResourceManagerTags { - if x != nil { - return x.ResourceManagerTags - } - return nil -} - -func (x *NodeConfig) GetEnableConfidentialStorage() bool { - if x != nil { - return x.EnableConfidentialStorage - } - return false -} - -func (x *NodeConfig) GetSecondaryBootDisks() []*SecondaryBootDisk { - if x != nil { - return x.SecondaryBootDisks - } - return nil -} - -func (x *NodeConfig) GetStoragePools() []string { - if x != nil { - return x.StoragePools - } - return nil -} - -func (x *NodeConfig) GetSecondaryBootDiskUpdateStrategy() *SecondaryBootDiskUpdateStrategy { - if x != nil { - return x.SecondaryBootDiskUpdateStrategy - } - return nil -} - -func (x *NodeConfig) GetGpuDirectConfig() *GPUDirectConfig { - if x != nil { - return x.GpuDirectConfig - } - return nil -} - -func (x *NodeConfig) GetMaxRunDuration() *durationpb.Duration { - if x != nil { - return x.MaxRunDuration - } - return nil -} - -func (x *NodeConfig) GetLocalSsdEncryptionMode() NodeConfig_LocalSsdEncryptionMode { - if x != nil && x.LocalSsdEncryptionMode != nil { - return *x.LocalSsdEncryptionMode - } - return NodeConfig_LOCAL_SSD_ENCRYPTION_MODE_UNSPECIFIED -} - -func (x *NodeConfig) GetEffectiveCgroupMode() NodeConfig_EffectiveCgroupMode { - if x != nil { - return x.EffectiveCgroupMode - } - return NodeConfig_EFFECTIVE_CGROUP_MODE_UNSPECIFIED -} - -func (x *NodeConfig) GetFlexStart() bool { - if x != nil && x.FlexStart != nil { - return *x.FlexStart - } - return false -} - -func (x *NodeConfig) GetBootDisk() *BootDisk { - if x != nil { - return x.BootDisk - } - return nil -} - -func (x *NodeConfig) GetConsolidationDelay() *durationpb.Duration { - if x != nil { - return x.ConsolidationDelay - } - return nil -} - -// Specifies options for controlling advanced machine features. -type AdvancedMachineFeatures struct { - state protoimpl.MessageState `protogen:"open.v1"` - // The number of threads per physical core. To disable simultaneous - // multithreading (SMT) set this to 1. If unset, the maximum number of threads - // supported per core by the underlying processor is assumed. - ThreadsPerCore *int64 `protobuf:"varint,1,opt,name=threads_per_core,json=threadsPerCore,proto3,oneof" json:"threads_per_core,omitempty"` - // Whether or not to enable nested virtualization (defaults to false). - EnableNestedVirtualization *bool `protobuf:"varint,2,opt,name=enable_nested_virtualization,json=enableNestedVirtualization,proto3,oneof" json:"enable_nested_virtualization,omitempty"` - // Type of Performance Monitoring Unit (PMU) requested on node pool instances. - // If unset, PMU will not be available to the node. - PerformanceMonitoringUnit *AdvancedMachineFeatures_PerformanceMonitoringUnit `protobuf:"varint,3,opt,name=performance_monitoring_unit,json=performanceMonitoringUnit,proto3,enum=google.container.v1.AdvancedMachineFeatures_PerformanceMonitoringUnit,oneof" json:"performance_monitoring_unit,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *AdvancedMachineFeatures) Reset() { - *x = AdvancedMachineFeatures{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *AdvancedMachineFeatures) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*AdvancedMachineFeatures) ProtoMessage() {} - -func (x *AdvancedMachineFeatures) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[9] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use AdvancedMachineFeatures.ProtoReflect.Descriptor instead. -func (*AdvancedMachineFeatures) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{9} -} - -func (x *AdvancedMachineFeatures) GetThreadsPerCore() int64 { - if x != nil && x.ThreadsPerCore != nil { - return *x.ThreadsPerCore - } - return 0 -} - -func (x *AdvancedMachineFeatures) GetEnableNestedVirtualization() bool { - if x != nil && x.EnableNestedVirtualization != nil { - return *x.EnableNestedVirtualization - } - return false -} - -func (x *AdvancedMachineFeatures) GetPerformanceMonitoringUnit() AdvancedMachineFeatures_PerformanceMonitoringUnit { - if x != nil && x.PerformanceMonitoringUnit != nil { - return *x.PerformanceMonitoringUnit - } - return AdvancedMachineFeatures_PERFORMANCE_MONITORING_UNIT_UNSPECIFIED -} - -// Parameters for node pool-level network config. -type NodeNetworkConfig struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Input only. Whether to create a new range for pod IPs in this node pool. - // Defaults are provided for `pod_range` and `pod_ipv4_cidr_block` if they - // are not specified. - // - // If neither `create_pod_range` or `pod_range` are specified, the - // cluster-level default (`ip_allocation_policy.cluster_ipv4_cidr_block`) is - // used. - // - // Only applicable if `ip_allocation_policy.use_ip_aliases` is true. - // - // This field cannot be changed after the node pool has been created. - CreatePodRange bool `protobuf:"varint,4,opt,name=create_pod_range,json=createPodRange,proto3" json:"create_pod_range,omitempty"` - // The ID of the secondary range for pod IPs. - // If `create_pod_range` is true, this ID is used for the new range. - // If `create_pod_range` is false, uses an existing secondary range with this - // ID. - // - // Only applicable if `ip_allocation_policy.use_ip_aliases` is true. - // - // This field cannot be changed after the node pool has been created. - PodRange string `protobuf:"bytes,5,opt,name=pod_range,json=podRange,proto3" json:"pod_range,omitempty"` - // The IP address range for pod IPs in this node pool. - // - // Only applicable if `create_pod_range` is true. - // - // Set to blank to have a range chosen with the default size. - // - // Set to /netmask (e.g. `/14`) to have a range chosen with a specific - // netmask. - // - // Set to a - // [CIDR](https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing) - // notation (e.g. `10.96.0.0/14`) to pick a specific range to use. - // - // Only applicable if `ip_allocation_policy.use_ip_aliases` is true. - // - // This field cannot be changed after the node pool has been created. - PodIpv4CidrBlock string `protobuf:"bytes,6,opt,name=pod_ipv4_cidr_block,json=podIpv4CidrBlock,proto3" json:"pod_ipv4_cidr_block,omitempty"` - // Whether nodes have internal IP addresses only. - // If enable_private_nodes is not specified, then the value is derived from - // [Cluster.NetworkConfig.default_enable_private_nodes][] - EnablePrivateNodes *bool `protobuf:"varint,9,opt,name=enable_private_nodes,json=enablePrivateNodes,proto3,oneof" json:"enable_private_nodes,omitempty"` - // Network bandwidth tier configuration. - NetworkPerformanceConfig *NodeNetworkConfig_NetworkPerformanceConfig `protobuf:"bytes,11,opt,name=network_performance_config,json=networkPerformanceConfig,proto3,oneof" json:"network_performance_config,omitempty"` - // [PRIVATE FIELD] - // Pod CIDR size overprovisioning config for the nodepool. - // - // Pod CIDR size per node depends on max_pods_per_node. By default, the value - // of max_pods_per_node is rounded off to next power of 2 and we then double - // that to get the size of pod CIDR block per node. - // Example: max_pods_per_node of 30 would result in 64 IPs (/26). - // - // This config can disable the doubling of IPs (we still round off to next - // power of 2) - // Example: max_pods_per_node of 30 will result in 32 IPs (/27) when - // overprovisioning is disabled. - PodCidrOverprovisionConfig *PodCIDROverprovisionConfig `protobuf:"bytes,13,opt,name=pod_cidr_overprovision_config,json=podCidrOverprovisionConfig,proto3" json:"pod_cidr_overprovision_config,omitempty"` - // We specify the additional node networks for this node pool using this list. - // Each node network corresponds to an additional interface - AdditionalNodeNetworkConfigs []*AdditionalNodeNetworkConfig `protobuf:"bytes,14,rep,name=additional_node_network_configs,json=additionalNodeNetworkConfigs,proto3" json:"additional_node_network_configs,omitempty"` - // We specify the additional pod networks for this node pool using this list. - // Each pod network corresponds to an additional alias IP range for the node - AdditionalPodNetworkConfigs []*AdditionalPodNetworkConfig `protobuf:"bytes,15,rep,name=additional_pod_network_configs,json=additionalPodNetworkConfigs,proto3" json:"additional_pod_network_configs,omitempty"` - // Output only. The utilization of the IPv4 range for the pod. - // The ratio is Usage/[Total number of IPs in the secondary range], - // Usage=numNodes*numZones*podIPsPerNode. - PodIpv4RangeUtilization float64 `protobuf:"fixed64,16,opt,name=pod_ipv4_range_utilization,json=podIpv4RangeUtilization,proto3" json:"pod_ipv4_range_utilization,omitempty"` - // Optional. The subnetwork name/path for the node pool. - // Format: projects/{project}/regions/{region}/subnetworks/{subnetwork} - // If the cluster is associated with multiple subnetworks, the subnetwork can - // be either: - // 1. A user supplied subnetwork name/full path during node pool creation. - // Example1: my-subnet - // Example2: projects/gke-project/regions/us-central1/subnetworks/my-subnet - // 2. A subnetwork path picked based on the IP utilization during node pool - // creation and is immutable. - Subnetwork string `protobuf:"bytes,19,opt,name=subnetwork,proto3" json:"subnetwork,omitempty"` - // Output only. The network tier configuration for the node pool inherits from - // the cluster-level configuration and remains immutable throughout the node - // pool's lifecycle, including during upgrades. - NetworkTierConfig *NetworkTierConfig `protobuf:"bytes,20,opt,name=network_tier_config,json=networkTierConfig,proto3" json:"network_tier_config,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *NodeNetworkConfig) Reset() { - *x = NodeNetworkConfig{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *NodeNetworkConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*NodeNetworkConfig) ProtoMessage() {} - -func (x *NodeNetworkConfig) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[10] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use NodeNetworkConfig.ProtoReflect.Descriptor instead. -func (*NodeNetworkConfig) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{10} -} - -func (x *NodeNetworkConfig) GetCreatePodRange() bool { - if x != nil { - return x.CreatePodRange - } - return false -} - -func (x *NodeNetworkConfig) GetPodRange() string { - if x != nil { - return x.PodRange - } - return "" -} - -func (x *NodeNetworkConfig) GetPodIpv4CidrBlock() string { - if x != nil { - return x.PodIpv4CidrBlock - } - return "" -} - -func (x *NodeNetworkConfig) GetEnablePrivateNodes() bool { - if x != nil && x.EnablePrivateNodes != nil { - return *x.EnablePrivateNodes - } - return false -} - -func (x *NodeNetworkConfig) GetNetworkPerformanceConfig() *NodeNetworkConfig_NetworkPerformanceConfig { - if x != nil { - return x.NetworkPerformanceConfig - } - return nil -} - -func (x *NodeNetworkConfig) GetPodCidrOverprovisionConfig() *PodCIDROverprovisionConfig { - if x != nil { - return x.PodCidrOverprovisionConfig - } - return nil -} - -func (x *NodeNetworkConfig) GetAdditionalNodeNetworkConfigs() []*AdditionalNodeNetworkConfig { - if x != nil { - return x.AdditionalNodeNetworkConfigs - } - return nil -} - -func (x *NodeNetworkConfig) GetAdditionalPodNetworkConfigs() []*AdditionalPodNetworkConfig { - if x != nil { - return x.AdditionalPodNetworkConfigs - } - return nil -} - -func (x *NodeNetworkConfig) GetPodIpv4RangeUtilization() float64 { - if x != nil { - return x.PodIpv4RangeUtilization - } - return 0 -} - -func (x *NodeNetworkConfig) GetSubnetwork() string { - if x != nil { - return x.Subnetwork - } - return "" -} - -func (x *NodeNetworkConfig) GetNetworkTierConfig() *NetworkTierConfig { - if x != nil { - return x.NetworkTierConfig - } - return nil -} - -// AdditionalNodeNetworkConfig is the configuration for additional node networks -// within the NodeNetworkConfig message -type AdditionalNodeNetworkConfig struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Name of the VPC where the additional interface belongs - Network string `protobuf:"bytes,1,opt,name=network,proto3" json:"network,omitempty"` - // Name of the subnetwork where the additional interface belongs - Subnetwork string `protobuf:"bytes,2,opt,name=subnetwork,proto3" json:"subnetwork,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *AdditionalNodeNetworkConfig) Reset() { - *x = AdditionalNodeNetworkConfig{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *AdditionalNodeNetworkConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*AdditionalNodeNetworkConfig) ProtoMessage() {} - -func (x *AdditionalNodeNetworkConfig) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[11] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use AdditionalNodeNetworkConfig.ProtoReflect.Descriptor instead. -func (*AdditionalNodeNetworkConfig) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{11} -} - -func (x *AdditionalNodeNetworkConfig) GetNetwork() string { - if x != nil { - return x.Network - } - return "" -} - -func (x *AdditionalNodeNetworkConfig) GetSubnetwork() string { - if x != nil { - return x.Subnetwork - } - return "" -} - -// AdditionalPodNetworkConfig is the configuration for additional pod networks -// within the NodeNetworkConfig message -type AdditionalPodNetworkConfig struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Name of the subnetwork where the additional pod network belongs. - Subnetwork string `protobuf:"bytes,1,opt,name=subnetwork,proto3" json:"subnetwork,omitempty"` - // The name of the secondary range on the subnet which provides IP address for - // this pod range. - SecondaryPodRange string `protobuf:"bytes,2,opt,name=secondary_pod_range,json=secondaryPodRange,proto3" json:"secondary_pod_range,omitempty"` - // The maximum number of pods per node which use this pod network. - MaxPodsPerNode *MaxPodsConstraint `protobuf:"bytes,3,opt,name=max_pods_per_node,json=maxPodsPerNode,proto3,oneof" json:"max_pods_per_node,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *AdditionalPodNetworkConfig) Reset() { - *x = AdditionalPodNetworkConfig{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *AdditionalPodNetworkConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*AdditionalPodNetworkConfig) ProtoMessage() {} - -func (x *AdditionalPodNetworkConfig) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[12] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use AdditionalPodNetworkConfig.ProtoReflect.Descriptor instead. -func (*AdditionalPodNetworkConfig) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{12} -} - -func (x *AdditionalPodNetworkConfig) GetSubnetwork() string { - if x != nil { - return x.Subnetwork - } - return "" -} - -func (x *AdditionalPodNetworkConfig) GetSecondaryPodRange() string { - if x != nil { - return x.SecondaryPodRange - } - return "" -} - -func (x *AdditionalPodNetworkConfig) GetMaxPodsPerNode() *MaxPodsConstraint { - if x != nil { - return x.MaxPodsPerNode - } - return nil -} - -// A set of Shielded Instance options. -type ShieldedInstanceConfig struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Defines whether the instance has Secure Boot enabled. - // - // Secure Boot helps ensure that the system only runs authentic software by - // verifying the digital signature of all boot components, and halting the - // boot process if signature verification fails. - EnableSecureBoot bool `protobuf:"varint,1,opt,name=enable_secure_boot,json=enableSecureBoot,proto3" json:"enable_secure_boot,omitempty"` - // Defines whether the instance has integrity monitoring enabled. - // - // Enables monitoring and attestation of the boot integrity of the instance. - // The attestation is performed against the integrity policy baseline. This - // baseline is initially derived from the implicitly trusted boot image when - // the instance is created. - EnableIntegrityMonitoring bool `protobuf:"varint,2,opt,name=enable_integrity_monitoring,json=enableIntegrityMonitoring,proto3" json:"enable_integrity_monitoring,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ShieldedInstanceConfig) Reset() { - *x = ShieldedInstanceConfig{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ShieldedInstanceConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ShieldedInstanceConfig) ProtoMessage() {} - -func (x *ShieldedInstanceConfig) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[13] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ShieldedInstanceConfig.ProtoReflect.Descriptor instead. -func (*ShieldedInstanceConfig) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{13} -} - -func (x *ShieldedInstanceConfig) GetEnableSecureBoot() bool { - if x != nil { - return x.EnableSecureBoot - } - return false -} - -func (x *ShieldedInstanceConfig) GetEnableIntegrityMonitoring() bool { - if x != nil { - return x.EnableIntegrityMonitoring - } - return false -} - -// SandboxConfig contains configurations of the sandbox to use for the node. -type SandboxConfig struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Type of the sandbox to use for the node. - Type SandboxConfig_Type `protobuf:"varint,2,opt,name=type,proto3,enum=google.container.v1.SandboxConfig_Type" json:"type,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *SandboxConfig) Reset() { - *x = SandboxConfig{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *SandboxConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SandboxConfig) ProtoMessage() {} - -func (x *SandboxConfig) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[14] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SandboxConfig.ProtoReflect.Descriptor instead. -func (*SandboxConfig) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{14} -} - -func (x *SandboxConfig) GetType() SandboxConfig_Type { - if x != nil { - return x.Type - } - return SandboxConfig_UNSPECIFIED -} - -// GcfsConfig contains configurations of Google Container File System -// (image streaming). -type GcfsConfig struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Whether to use GCFS. - Enabled bool `protobuf:"varint,1,opt,name=enabled,proto3" json:"enabled,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *GcfsConfig) Reset() { - *x = GcfsConfig{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *GcfsConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GcfsConfig) ProtoMessage() {} - -func (x *GcfsConfig) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[15] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GcfsConfig.ProtoReflect.Descriptor instead. -func (*GcfsConfig) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{15} -} - -func (x *GcfsConfig) GetEnabled() bool { - if x != nil { - return x.Enabled - } - return false -} - -// [ReservationAffinity](https://cloud.google.com/compute/docs/instances/reserving-zonal-resources) -// is the configuration of desired reservation which instances could take -// capacity from. -type ReservationAffinity struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Corresponds to the type of reservation consumption. - ConsumeReservationType ReservationAffinity_Type `protobuf:"varint,1,opt,name=consume_reservation_type,json=consumeReservationType,proto3,enum=google.container.v1.ReservationAffinity_Type" json:"consume_reservation_type,omitempty"` - // Corresponds to the label key of a reservation resource. To target a - // SPECIFIC_RESERVATION by name, specify - // "compute.googleapis.com/reservation-name" as the key and specify the name - // of your reservation as its value. - Key string `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"` - // Corresponds to the label value(s) of reservation resource(s). - Values []string `protobuf:"bytes,3,rep,name=values,proto3" json:"values,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ReservationAffinity) Reset() { - *x = ReservationAffinity{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ReservationAffinity) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ReservationAffinity) ProtoMessage() {} - -func (x *ReservationAffinity) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[16] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ReservationAffinity.ProtoReflect.Descriptor instead. -func (*ReservationAffinity) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{16} -} - -func (x *ReservationAffinity) GetConsumeReservationType() ReservationAffinity_Type { - if x != nil { - return x.ConsumeReservationType - } - return ReservationAffinity_UNSPECIFIED -} - -func (x *ReservationAffinity) GetKey() string { - if x != nil { - return x.Key - } - return "" -} - -func (x *ReservationAffinity) GetValues() []string { - if x != nil { - return x.Values - } - return nil -} - -// SoleTenantConfig contains the NodeAffinities to specify what shared sole -// tenant node groups should back the node pool. -type SoleTenantConfig struct { - state protoimpl.MessageState `protogen:"open.v1"` - // NodeAffinities used to match to a shared sole tenant node group. - NodeAffinities []*SoleTenantConfig_NodeAffinity `protobuf:"bytes,1,rep,name=node_affinities,json=nodeAffinities,proto3" json:"node_affinities,omitempty"` - // Optional. The minimum number of virtual CPUs this instance will consume - // when running on a sole-tenant node. This field can only be set if the node - // pool is created in a shared sole-tenant node group. - MinNodeCpus *int32 `protobuf:"varint,2,opt,name=min_node_cpus,json=minNodeCpus,proto3,oneof" json:"min_node_cpus,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *SoleTenantConfig) Reset() { - *x = SoleTenantConfig{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *SoleTenantConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SoleTenantConfig) ProtoMessage() {} - -func (x *SoleTenantConfig) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[17] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SoleTenantConfig.ProtoReflect.Descriptor instead. -func (*SoleTenantConfig) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{17} -} - -func (x *SoleTenantConfig) GetNodeAffinities() []*SoleTenantConfig_NodeAffinity { - if x != nil { - return x.NodeAffinities - } - return nil -} - -func (x *SoleTenantConfig) GetMinNodeCpus() int32 { - if x != nil && x.MinNodeCpus != nil { - return *x.MinNodeCpus - } - return 0 -} - -// ContainerdConfig contains configuration to customize containerd. -type ContainerdConfig struct { - state protoimpl.MessageState `protogen:"open.v1"` - // PrivateRegistryAccessConfig is used to configure access configuration - // for private container registries. - PrivateRegistryAccessConfig *ContainerdConfig_PrivateRegistryAccessConfig `protobuf:"bytes,1,opt,name=private_registry_access_config,json=privateRegistryAccessConfig,proto3" json:"private_registry_access_config,omitempty"` - // Optional. WritableCgroups defines writable cgroups configuration for the - // node pool. - WritableCgroups *ContainerdConfig_WritableCgroups `protobuf:"bytes,2,opt,name=writable_cgroups,json=writableCgroups,proto3" json:"writable_cgroups,omitempty"` - // RegistryHostConfig configures containerd registry host configuration. - // Each registry_hosts represents a hosts.toml file. - // At most 25 registry_hosts are allowed. - RegistryHosts []*ContainerdConfig_RegistryHostConfig `protobuf:"bytes,3,rep,name=registry_hosts,json=registryHosts,proto3" json:"registry_hosts,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ContainerdConfig) Reset() { - *x = ContainerdConfig{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ContainerdConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ContainerdConfig) ProtoMessage() {} - -func (x *ContainerdConfig) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[18] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ContainerdConfig.ProtoReflect.Descriptor instead. -func (*ContainerdConfig) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{18} -} - -func (x *ContainerdConfig) GetPrivateRegistryAccessConfig() *ContainerdConfig_PrivateRegistryAccessConfig { - if x != nil { - return x.PrivateRegistryAccessConfig - } - return nil -} - -func (x *ContainerdConfig) GetWritableCgroups() *ContainerdConfig_WritableCgroups { - if x != nil { - return x.WritableCgroups - } - return nil -} - -func (x *ContainerdConfig) GetRegistryHosts() []*ContainerdConfig_RegistryHostConfig { - if x != nil { - return x.RegistryHosts - } - return nil -} - -// Kubernetes taint is composed of three fields: key, value, and effect. Effect -// can only be one of three types: NoSchedule, PreferNoSchedule or NoExecute. -// -// See -// [here](https://kubernetes.io/docs/concepts/configuration/taint-and-toleration) -// for more information, including usage and the valid values. -type NodeTaint struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Key for taint. - Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` - // Value for taint. - Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` - // Effect for taint. - Effect NodeTaint_Effect `protobuf:"varint,3,opt,name=effect,proto3,enum=google.container.v1.NodeTaint_Effect" json:"effect,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *NodeTaint) Reset() { - *x = NodeTaint{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *NodeTaint) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*NodeTaint) ProtoMessage() {} - -func (x *NodeTaint) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[19] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use NodeTaint.ProtoReflect.Descriptor instead. -func (*NodeTaint) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{19} -} - -func (x *NodeTaint) GetKey() string { - if x != nil { - return x.Key - } - return "" -} - -func (x *NodeTaint) GetValue() string { - if x != nil { - return x.Value - } - return "" -} - -func (x *NodeTaint) GetEffect() NodeTaint_Effect { - if x != nil { - return x.Effect - } - return NodeTaint_EFFECT_UNSPECIFIED -} - -// Collection of Kubernetes [node -// taints](https://kubernetes.io/docs/concepts/configuration/taint-and-toleration). -type NodeTaints struct { - state protoimpl.MessageState `protogen:"open.v1"` - // List of node taints. - Taints []*NodeTaint `protobuf:"bytes,1,rep,name=taints,proto3" json:"taints,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *NodeTaints) Reset() { - *x = NodeTaints{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *NodeTaints) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*NodeTaints) ProtoMessage() {} - -func (x *NodeTaints) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[20] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use NodeTaints.ProtoReflect.Descriptor instead. -func (*NodeTaints) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{20} -} - -func (x *NodeTaints) GetTaints() []*NodeTaint { - if x != nil { - return x.Taints - } - return nil -} - -// Collection of node-level [Kubernetes -// labels](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels). -type NodeLabels struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Map of node label keys and node label values. - Labels map[string]string `protobuf:"bytes,1,rep,name=labels,proto3" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *NodeLabels) Reset() { - *x = NodeLabels{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *NodeLabels) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*NodeLabels) ProtoMessage() {} - -func (x *NodeLabels) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[21] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use NodeLabels.ProtoReflect.Descriptor instead. -func (*NodeLabels) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{21} -} - -func (x *NodeLabels) GetLabels() map[string]string { - if x != nil { - return x.Labels - } - return nil -} - -// Collection of [Resource Manager -// labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels). -type ResourceLabels struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Map of node label keys and node label values. - Labels map[string]string `protobuf:"bytes,1,rep,name=labels,proto3" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ResourceLabels) Reset() { - *x = ResourceLabels{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ResourceLabels) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ResourceLabels) ProtoMessage() {} - -func (x *ResourceLabels) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[22] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ResourceLabels.ProtoReflect.Descriptor instead. -func (*ResourceLabels) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{22} -} - -func (x *ResourceLabels) GetLabels() map[string]string { - if x != nil { - return x.Labels - } - return nil -} - -// Collection of Compute Engine network tags that can be applied to a node's -// underlying VM instance. -type NetworkTags struct { - state protoimpl.MessageState `protogen:"open.v1"` - // List of network tags. - Tags []string `protobuf:"bytes,1,rep,name=tags,proto3" json:"tags,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *NetworkTags) Reset() { - *x = NetworkTags{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *NetworkTags) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*NetworkTags) ProtoMessage() {} - -func (x *NetworkTags) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[23] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use NetworkTags.ProtoReflect.Descriptor instead. -func (*NetworkTags) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{23} -} - -func (x *NetworkTags) GetTags() []string { - if x != nil { - return x.Tags - } - return nil -} - -// The authentication information for accessing the master endpoint. -// Authentication can be done using HTTP basic auth or using client -// certificates. -type MasterAuth struct { - state protoimpl.MessageState `protogen:"open.v1"` - // The username to use for HTTP basic authentication to the master endpoint. - // For clusters v1.6.0 and later, basic authentication can be disabled by - // leaving username unspecified (or setting it to the empty string). - // - // Warning: basic authentication is deprecated, and will be removed in GKE - // control plane versions 1.19 and newer. For a list of recommended - // authentication methods, see: - // https://cloud.google.com/kubernetes-engine/docs/how-to/api-server-authentication - // - // Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. - Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"` - // The password to use for HTTP basic authentication to the master endpoint. - // Because the master endpoint is open to the Internet, you should create a - // strong password. If a password is provided for cluster creation, username - // must be non-empty. - // - // Warning: basic authentication is deprecated, and will be removed in GKE - // control plane versions 1.19 and newer. For a list of recommended - // authentication methods, see: - // https://cloud.google.com/kubernetes-engine/docs/how-to/api-server-authentication - // - // Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. - Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"` - // Configuration for client certificate authentication on the cluster. For - // clusters before v1.12, if no configuration is specified, a client - // certificate is issued. - ClientCertificateConfig *ClientCertificateConfig `protobuf:"bytes,3,opt,name=client_certificate_config,json=clientCertificateConfig,proto3" json:"client_certificate_config,omitempty"` - // Output only. Base64-encoded public certificate that is the root of - // trust for the cluster. - ClusterCaCertificate string `protobuf:"bytes,100,opt,name=cluster_ca_certificate,json=clusterCaCertificate,proto3" json:"cluster_ca_certificate,omitempty"` - // Output only. Base64-encoded public certificate used by clients to - // authenticate to the cluster endpoint. Issued only if - // client_certificate_config is set. - ClientCertificate string `protobuf:"bytes,101,opt,name=client_certificate,json=clientCertificate,proto3" json:"client_certificate,omitempty"` - // Output only. Base64-encoded private key used by clients to authenticate - // to the cluster endpoint. - ClientKey string `protobuf:"bytes,102,opt,name=client_key,json=clientKey,proto3" json:"client_key,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *MasterAuth) Reset() { - *x = MasterAuth{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *MasterAuth) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MasterAuth) ProtoMessage() {} - -func (x *MasterAuth) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[24] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use MasterAuth.ProtoReflect.Descriptor instead. -func (*MasterAuth) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{24} -} - -// Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. -func (x *MasterAuth) GetUsername() string { - if x != nil { - return x.Username - } - return "" -} - -// Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. -func (x *MasterAuth) GetPassword() string { - if x != nil { - return x.Password - } - return "" -} - -func (x *MasterAuth) GetClientCertificateConfig() *ClientCertificateConfig { - if x != nil { - return x.ClientCertificateConfig - } - return nil -} - -func (x *MasterAuth) GetClusterCaCertificate() string { - if x != nil { - return x.ClusterCaCertificate - } - return "" -} - -func (x *MasterAuth) GetClientCertificate() string { - if x != nil { - return x.ClientCertificate - } - return "" -} - -func (x *MasterAuth) GetClientKey() string { - if x != nil { - return x.ClientKey - } - return "" -} - -// Configuration for client certificates on the cluster. -type ClientCertificateConfig struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Issue a client certificate. - IssueClientCertificate bool `protobuf:"varint,1,opt,name=issue_client_certificate,json=issueClientCertificate,proto3" json:"issue_client_certificate,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ClientCertificateConfig) Reset() { - *x = ClientCertificateConfig{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ClientCertificateConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ClientCertificateConfig) ProtoMessage() {} - -func (x *ClientCertificateConfig) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[25] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ClientCertificateConfig.ProtoReflect.Descriptor instead. -func (*ClientCertificateConfig) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{25} -} - -func (x *ClientCertificateConfig) GetIssueClientCertificate() bool { - if x != nil { - return x.IssueClientCertificate - } - return false -} - -// Configuration for the addons that can be automatically spun up in the -// cluster, enabling additional functionality. -type AddonsConfig struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Configuration for the HTTP (L7) load balancing controller addon, which - // makes it easy to set up HTTP load balancers for services in a cluster. - HttpLoadBalancing *HttpLoadBalancing `protobuf:"bytes,1,opt,name=http_load_balancing,json=httpLoadBalancing,proto3" json:"http_load_balancing,omitempty"` - // Configuration for the horizontal pod autoscaling feature, which - // increases or decreases the number of replica pods a replication controller - // has based on the resource usage of the existing pods. - HorizontalPodAutoscaling *HorizontalPodAutoscaling `protobuf:"bytes,2,opt,name=horizontal_pod_autoscaling,json=horizontalPodAutoscaling,proto3" json:"horizontal_pod_autoscaling,omitempty"` - // Configuration for the Kubernetes Dashboard. - // This addon is deprecated, and will be disabled in 1.15. It is recommended - // to use the Cloud Console to manage and monitor your Kubernetes clusters, - // workloads and applications. For more information, see: - // https://cloud.google.com/kubernetes-engine/docs/concepts/dashboards - // - // Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. - KubernetesDashboard *KubernetesDashboard `protobuf:"bytes,3,opt,name=kubernetes_dashboard,json=kubernetesDashboard,proto3" json:"kubernetes_dashboard,omitempty"` - // Configuration for NetworkPolicy. This only tracks whether the addon - // is enabled or not on the Master, it does not track whether network policy - // is enabled for the nodes. - NetworkPolicyConfig *NetworkPolicyConfig `protobuf:"bytes,4,opt,name=network_policy_config,json=networkPolicyConfig,proto3" json:"network_policy_config,omitempty"` - // Configuration for the Cloud Run addon, which allows the user to use a - // managed Knative service. - CloudRunConfig *CloudRunConfig `protobuf:"bytes,7,opt,name=cloud_run_config,json=cloudRunConfig,proto3" json:"cloud_run_config,omitempty"` - // Configuration for NodeLocalDNS, a dns cache running on cluster nodes - DnsCacheConfig *DnsCacheConfig `protobuf:"bytes,8,opt,name=dns_cache_config,json=dnsCacheConfig,proto3" json:"dns_cache_config,omitempty"` - // Configuration for the ConfigConnector add-on, a Kubernetes - // extension to manage hosted Google Cloud services through the Kubernetes - // API. - ConfigConnectorConfig *ConfigConnectorConfig `protobuf:"bytes,10,opt,name=config_connector_config,json=configConnectorConfig,proto3" json:"config_connector_config,omitempty"` - // Configuration for the Compute Engine Persistent Disk CSI driver. - GcePersistentDiskCsiDriverConfig *GcePersistentDiskCsiDriverConfig `protobuf:"bytes,11,opt,name=gce_persistent_disk_csi_driver_config,json=gcePersistentDiskCsiDriverConfig,proto3" json:"gce_persistent_disk_csi_driver_config,omitempty"` - // Configuration for the Filestore CSI driver. - GcpFilestoreCsiDriverConfig *GcpFilestoreCsiDriverConfig `protobuf:"bytes,14,opt,name=gcp_filestore_csi_driver_config,json=gcpFilestoreCsiDriverConfig,proto3" json:"gcp_filestore_csi_driver_config,omitempty"` - // Configuration for the Backup for GKE agent addon. - GkeBackupAgentConfig *GkeBackupAgentConfig `protobuf:"bytes,16,opt,name=gke_backup_agent_config,json=gkeBackupAgentConfig,proto3" json:"gke_backup_agent_config,omitempty"` - // Configuration for the Cloud Storage Fuse CSI driver. - GcsFuseCsiDriverConfig *GcsFuseCsiDriverConfig `protobuf:"bytes,17,opt,name=gcs_fuse_csi_driver_config,json=gcsFuseCsiDriverConfig,proto3" json:"gcs_fuse_csi_driver_config,omitempty"` - // Optional. Configuration for the StatefulHA add-on. - StatefulHaConfig *StatefulHAConfig `protobuf:"bytes,18,opt,name=stateful_ha_config,json=statefulHaConfig,proto3" json:"stateful_ha_config,omitempty"` - // Configuration for the Cloud Storage Parallelstore CSI driver. - ParallelstoreCsiDriverConfig *ParallelstoreCsiDriverConfig `protobuf:"bytes,19,opt,name=parallelstore_csi_driver_config,json=parallelstoreCsiDriverConfig,proto3" json:"parallelstore_csi_driver_config,omitempty"` - // Optional. Configuration for Ray Operator addon. - RayOperatorConfig *RayOperatorConfig `protobuf:"bytes,21,opt,name=ray_operator_config,json=rayOperatorConfig,proto3" json:"ray_operator_config,omitempty"` - // Configuration for the High Scale Checkpointing add-on. - HighScaleCheckpointingConfig *HighScaleCheckpointingConfig `protobuf:"bytes,22,opt,name=high_scale_checkpointing_config,json=highScaleCheckpointingConfig,proto3" json:"high_scale_checkpointing_config,omitempty"` - // Configuration for the Lustre CSI driver. - LustreCsiDriverConfig *LustreCsiDriverConfig `protobuf:"bytes,23,opt,name=lustre_csi_driver_config,json=lustreCsiDriverConfig,proto3" json:"lustre_csi_driver_config,omitempty"` - // Optional. Configuration for the slice controller add-on. - SliceControllerConfig *SliceControllerConfig `protobuf:"bytes,26,opt,name=slice_controller_config,json=sliceControllerConfig,proto3" json:"slice_controller_config,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *AddonsConfig) Reset() { - *x = AddonsConfig{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *AddonsConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*AddonsConfig) ProtoMessage() {} - -func (x *AddonsConfig) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[26] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use AddonsConfig.ProtoReflect.Descriptor instead. -func (*AddonsConfig) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{26} -} - -func (x *AddonsConfig) GetHttpLoadBalancing() *HttpLoadBalancing { - if x != nil { - return x.HttpLoadBalancing - } - return nil -} - -func (x *AddonsConfig) GetHorizontalPodAutoscaling() *HorizontalPodAutoscaling { - if x != nil { - return x.HorizontalPodAutoscaling - } - return nil -} - -// Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. -func (x *AddonsConfig) GetKubernetesDashboard() *KubernetesDashboard { - if x != nil { - return x.KubernetesDashboard - } - return nil -} - -func (x *AddonsConfig) GetNetworkPolicyConfig() *NetworkPolicyConfig { - if x != nil { - return x.NetworkPolicyConfig - } - return nil -} - -func (x *AddonsConfig) GetCloudRunConfig() *CloudRunConfig { - if x != nil { - return x.CloudRunConfig - } - return nil -} - -func (x *AddonsConfig) GetDnsCacheConfig() *DnsCacheConfig { - if x != nil { - return x.DnsCacheConfig - } - return nil -} - -func (x *AddonsConfig) GetConfigConnectorConfig() *ConfigConnectorConfig { - if x != nil { - return x.ConfigConnectorConfig - } - return nil -} - -func (x *AddonsConfig) GetGcePersistentDiskCsiDriverConfig() *GcePersistentDiskCsiDriverConfig { - if x != nil { - return x.GcePersistentDiskCsiDriverConfig - } - return nil -} - -func (x *AddonsConfig) GetGcpFilestoreCsiDriverConfig() *GcpFilestoreCsiDriverConfig { - if x != nil { - return x.GcpFilestoreCsiDriverConfig - } - return nil -} - -func (x *AddonsConfig) GetGkeBackupAgentConfig() *GkeBackupAgentConfig { - if x != nil { - return x.GkeBackupAgentConfig - } - return nil -} - -func (x *AddonsConfig) GetGcsFuseCsiDriverConfig() *GcsFuseCsiDriverConfig { - if x != nil { - return x.GcsFuseCsiDriverConfig - } - return nil -} - -func (x *AddonsConfig) GetStatefulHaConfig() *StatefulHAConfig { - if x != nil { - return x.StatefulHaConfig - } - return nil -} - -func (x *AddonsConfig) GetParallelstoreCsiDriverConfig() *ParallelstoreCsiDriverConfig { - if x != nil { - return x.ParallelstoreCsiDriverConfig - } - return nil -} - -func (x *AddonsConfig) GetRayOperatorConfig() *RayOperatorConfig { - if x != nil { - return x.RayOperatorConfig - } - return nil -} - -func (x *AddonsConfig) GetHighScaleCheckpointingConfig() *HighScaleCheckpointingConfig { - if x != nil { - return x.HighScaleCheckpointingConfig - } - return nil -} - -func (x *AddonsConfig) GetLustreCsiDriverConfig() *LustreCsiDriverConfig { - if x != nil { - return x.LustreCsiDriverConfig - } - return nil -} - -func (x *AddonsConfig) GetSliceControllerConfig() *SliceControllerConfig { - if x != nil { - return x.SliceControllerConfig - } - return nil -} - -// Configuration options for the HTTP (L7) load balancing controller addon, -// which makes it easy to set up HTTP load balancers for services in a cluster. -type HttpLoadBalancing struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Whether the HTTP Load Balancing controller is enabled in the cluster. - // When enabled, it runs a small pod in the cluster that manages the load - // balancers. - Disabled bool `protobuf:"varint,1,opt,name=disabled,proto3" json:"disabled,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *HttpLoadBalancing) Reset() { - *x = HttpLoadBalancing{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *HttpLoadBalancing) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*HttpLoadBalancing) ProtoMessage() {} - -func (x *HttpLoadBalancing) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[27] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use HttpLoadBalancing.ProtoReflect.Descriptor instead. -func (*HttpLoadBalancing) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{27} -} - -func (x *HttpLoadBalancing) GetDisabled() bool { - if x != nil { - return x.Disabled - } - return false -} - -// Configuration options for the horizontal pod autoscaling feature, which -// increases or decreases the number of replica pods a replication controller -// has based on the resource usage of the existing pods. -type HorizontalPodAutoscaling struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Whether the Horizontal Pod Autoscaling feature is enabled in the cluster. - // When enabled, it ensures that metrics are collected into Stackdriver - // Monitoring. - Disabled bool `protobuf:"varint,1,opt,name=disabled,proto3" json:"disabled,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *HorizontalPodAutoscaling) Reset() { - *x = HorizontalPodAutoscaling{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *HorizontalPodAutoscaling) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*HorizontalPodAutoscaling) ProtoMessage() {} - -func (x *HorizontalPodAutoscaling) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[28] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use HorizontalPodAutoscaling.ProtoReflect.Descriptor instead. -func (*HorizontalPodAutoscaling) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{28} -} - -func (x *HorizontalPodAutoscaling) GetDisabled() bool { - if x != nil { - return x.Disabled - } - return false -} - -// Configuration for the Kubernetes Dashboard. -type KubernetesDashboard struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Whether the Kubernetes Dashboard is enabled for this cluster. - Disabled bool `protobuf:"varint,1,opt,name=disabled,proto3" json:"disabled,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *KubernetesDashboard) Reset() { - *x = KubernetesDashboard{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[29] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *KubernetesDashboard) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*KubernetesDashboard) ProtoMessage() {} - -func (x *KubernetesDashboard) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[29] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use KubernetesDashboard.ProtoReflect.Descriptor instead. -func (*KubernetesDashboard) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{29} -} - -func (x *KubernetesDashboard) GetDisabled() bool { - if x != nil { - return x.Disabled - } - return false -} - -// Configuration for NetworkPolicy. This only tracks whether the addon -// is enabled or not on the Master, it does not track whether network policy -// is enabled for the nodes. -type NetworkPolicyConfig struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Whether NetworkPolicy is enabled for this cluster. - Disabled bool `protobuf:"varint,1,opt,name=disabled,proto3" json:"disabled,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *NetworkPolicyConfig) Reset() { - *x = NetworkPolicyConfig{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[30] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *NetworkPolicyConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*NetworkPolicyConfig) ProtoMessage() {} - -func (x *NetworkPolicyConfig) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[30] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use NetworkPolicyConfig.ProtoReflect.Descriptor instead. -func (*NetworkPolicyConfig) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{30} -} - -func (x *NetworkPolicyConfig) GetDisabled() bool { - if x != nil { - return x.Disabled - } - return false -} - -// Configuration for NodeLocal DNSCache -type DnsCacheConfig struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Whether NodeLocal DNSCache is enabled for this cluster. - Enabled bool `protobuf:"varint,1,opt,name=enabled,proto3" json:"enabled,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *DnsCacheConfig) Reset() { - *x = DnsCacheConfig{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[31] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *DnsCacheConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DnsCacheConfig) ProtoMessage() {} - -func (x *DnsCacheConfig) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[31] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DnsCacheConfig.ProtoReflect.Descriptor instead. -func (*DnsCacheConfig) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{31} -} - -func (x *DnsCacheConfig) GetEnabled() bool { - if x != nil { - return x.Enabled - } - return false -} - -// Configuration for controlling master global access settings. -type PrivateClusterMasterGlobalAccessConfig struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Whenever master is accessible globally or not. - Enabled bool `protobuf:"varint,1,opt,name=enabled,proto3" json:"enabled,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *PrivateClusterMasterGlobalAccessConfig) Reset() { - *x = PrivateClusterMasterGlobalAccessConfig{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[32] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *PrivateClusterMasterGlobalAccessConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*PrivateClusterMasterGlobalAccessConfig) ProtoMessage() {} - -func (x *PrivateClusterMasterGlobalAccessConfig) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[32] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use PrivateClusterMasterGlobalAccessConfig.ProtoReflect.Descriptor instead. -func (*PrivateClusterMasterGlobalAccessConfig) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{32} -} - -func (x *PrivateClusterMasterGlobalAccessConfig) GetEnabled() bool { - if x != nil { - return x.Enabled - } - return false -} - -// Configuration options for private clusters. -type PrivateClusterConfig struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Whether nodes have internal IP addresses only. If enabled, all nodes are - // given only RFC 1918 private addresses and communicate with the master via - // private networking. - // - // Deprecated: Use - // [NetworkConfig.default_enable_private_nodes][google.container.v1.NetworkConfig.default_enable_private_nodes] - // instead. - // - // Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. - EnablePrivateNodes bool `protobuf:"varint,1,opt,name=enable_private_nodes,json=enablePrivateNodes,proto3" json:"enable_private_nodes,omitempty"` - // Whether the master's internal IP address is used as the cluster endpoint. - // - // Deprecated: Use - // [ControlPlaneEndpointsConfig.IPEndpointsConfig.enable_public_endpoint][google.container.v1.ControlPlaneEndpointsConfig.IPEndpointsConfig.enable_public_endpoint] - // instead. Note that the value of enable_public_endpoint is reversed: if - // enable_private_endpoint is false, then enable_public_endpoint will be true. - // - // Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. - EnablePrivateEndpoint bool `protobuf:"varint,2,opt,name=enable_private_endpoint,json=enablePrivateEndpoint,proto3" json:"enable_private_endpoint,omitempty"` - // The IP range in CIDR notation to use for the hosted master network. This - // range will be used for assigning internal IP addresses to the master or - // set of masters, as well as the ILB VIP. This range must not overlap with - // any other ranges in use within the cluster's network. - MasterIpv4CidrBlock string `protobuf:"bytes,3,opt,name=master_ipv4_cidr_block,json=masterIpv4CidrBlock,proto3" json:"master_ipv4_cidr_block,omitempty"` - // Output only. The internal IP address of this cluster's master endpoint. - // - // Deprecated: Use - // [ControlPlaneEndpointsConfig.IPEndpointsConfig.private_endpoint][google.container.v1.ControlPlaneEndpointsConfig.IPEndpointsConfig.private_endpoint] - // instead. - // - // Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. - PrivateEndpoint string `protobuf:"bytes,4,opt,name=private_endpoint,json=privateEndpoint,proto3" json:"private_endpoint,omitempty"` - // Output only. The external IP address of this cluster's master endpoint. - // - // Deprecated:Use - // [ControlPlaneEndpointsConfig.IPEndpointsConfig.public_endpoint][google.container.v1.ControlPlaneEndpointsConfig.IPEndpointsConfig.public_endpoint] - // instead. - // - // Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. - PublicEndpoint string `protobuf:"bytes,5,opt,name=public_endpoint,json=publicEndpoint,proto3" json:"public_endpoint,omitempty"` - // Output only. The peering name in the customer VPC used by this cluster. - PeeringName string `protobuf:"bytes,7,opt,name=peering_name,json=peeringName,proto3" json:"peering_name,omitempty"` - // Controls master global access settings. - // - // Deprecated: Use - // [ControlPlaneEndpointsConfig.IPEndpointsConfig.enable_global_access][] - // instead. - // - // Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. - MasterGlobalAccessConfig *PrivateClusterMasterGlobalAccessConfig `protobuf:"bytes,8,opt,name=master_global_access_config,json=masterGlobalAccessConfig,proto3" json:"master_global_access_config,omitempty"` - // Subnet to provision the master's private endpoint during cluster creation. - // Specified in projects/*/regions/*/subnetworks/* format. - // - // Deprecated: Use - // [ControlPlaneEndpointsConfig.IPEndpointsConfig.private_endpoint_subnetwork][google.container.v1.ControlPlaneEndpointsConfig.IPEndpointsConfig.private_endpoint_subnetwork] - // instead. - // - // Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. - PrivateEndpointSubnetwork string `protobuf:"bytes,10,opt,name=private_endpoint_subnetwork,json=privateEndpointSubnetwork,proto3" json:"private_endpoint_subnetwork,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *PrivateClusterConfig) Reset() { - *x = PrivateClusterConfig{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[33] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *PrivateClusterConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*PrivateClusterConfig) ProtoMessage() {} - -func (x *PrivateClusterConfig) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[33] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use PrivateClusterConfig.ProtoReflect.Descriptor instead. -func (*PrivateClusterConfig) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{33} -} - -// Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. -func (x *PrivateClusterConfig) GetEnablePrivateNodes() bool { - if x != nil { - return x.EnablePrivateNodes - } - return false -} - -// Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. -func (x *PrivateClusterConfig) GetEnablePrivateEndpoint() bool { - if x != nil { - return x.EnablePrivateEndpoint - } - return false -} - -func (x *PrivateClusterConfig) GetMasterIpv4CidrBlock() string { - if x != nil { - return x.MasterIpv4CidrBlock - } - return "" -} - -// Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. -func (x *PrivateClusterConfig) GetPrivateEndpoint() string { - if x != nil { - return x.PrivateEndpoint - } - return "" -} - -// Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. -func (x *PrivateClusterConfig) GetPublicEndpoint() string { - if x != nil { - return x.PublicEndpoint - } - return "" -} - -func (x *PrivateClusterConfig) GetPeeringName() string { - if x != nil { - return x.PeeringName - } - return "" -} - -// Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. -func (x *PrivateClusterConfig) GetMasterGlobalAccessConfig() *PrivateClusterMasterGlobalAccessConfig { - if x != nil { - return x.MasterGlobalAccessConfig - } - return nil -} - -// Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. -func (x *PrivateClusterConfig) GetPrivateEndpointSubnetwork() string { - if x != nil { - return x.PrivateEndpointSubnetwork - } - return "" -} - -// Configuration for returning group information from authenticators. -type AuthenticatorGroupsConfig struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Whether this cluster should return group membership lookups - // during authentication using a group of security groups. - Enabled bool `protobuf:"varint,1,opt,name=enabled,proto3" json:"enabled,omitempty"` - // The name of the security group-of-groups to be used. Only relevant - // if enabled = true. - SecurityGroup string `protobuf:"bytes,2,opt,name=security_group,json=securityGroup,proto3" json:"security_group,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *AuthenticatorGroupsConfig) Reset() { - *x = AuthenticatorGroupsConfig{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[34] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *AuthenticatorGroupsConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*AuthenticatorGroupsConfig) ProtoMessage() {} - -func (x *AuthenticatorGroupsConfig) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[34] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use AuthenticatorGroupsConfig.ProtoReflect.Descriptor instead. -func (*AuthenticatorGroupsConfig) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{34} -} - -func (x *AuthenticatorGroupsConfig) GetEnabled() bool { - if x != nil { - return x.Enabled - } - return false -} - -func (x *AuthenticatorGroupsConfig) GetSecurityGroup() string { - if x != nil { - return x.SecurityGroup - } - return "" -} - -// Configuration options for the Cloud Run feature. -type CloudRunConfig struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Whether Cloud Run addon is enabled for this cluster. - Disabled bool `protobuf:"varint,1,opt,name=disabled,proto3" json:"disabled,omitempty"` - // Which load balancer type is installed for Cloud Run. - LoadBalancerType CloudRunConfig_LoadBalancerType `protobuf:"varint,3,opt,name=load_balancer_type,json=loadBalancerType,proto3,enum=google.container.v1.CloudRunConfig_LoadBalancerType" json:"load_balancer_type,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *CloudRunConfig) Reset() { - *x = CloudRunConfig{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[35] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *CloudRunConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CloudRunConfig) ProtoMessage() {} - -func (x *CloudRunConfig) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[35] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CloudRunConfig.ProtoReflect.Descriptor instead. -func (*CloudRunConfig) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{35} -} - -func (x *CloudRunConfig) GetDisabled() bool { - if x != nil { - return x.Disabled - } - return false -} - -func (x *CloudRunConfig) GetLoadBalancerType() CloudRunConfig_LoadBalancerType { - if x != nil { - return x.LoadBalancerType - } - return CloudRunConfig_LOAD_BALANCER_TYPE_UNSPECIFIED -} - -// Configuration options for the Config Connector add-on. -type ConfigConnectorConfig struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Whether Cloud Connector is enabled for this cluster. - Enabled bool `protobuf:"varint,1,opt,name=enabled,proto3" json:"enabled,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ConfigConnectorConfig) Reset() { - *x = ConfigConnectorConfig{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[36] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ConfigConnectorConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ConfigConnectorConfig) ProtoMessage() {} - -func (x *ConfigConnectorConfig) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[36] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ConfigConnectorConfig.ProtoReflect.Descriptor instead. -func (*ConfigConnectorConfig) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{36} -} - -func (x *ConfigConnectorConfig) GetEnabled() bool { - if x != nil { - return x.Enabled - } - return false -} - -// Configuration for the Compute Engine PD CSI driver. -type GcePersistentDiskCsiDriverConfig struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Whether the Compute Engine PD CSI driver is enabled for this cluster. - Enabled bool `protobuf:"varint,1,opt,name=enabled,proto3" json:"enabled,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *GcePersistentDiskCsiDriverConfig) Reset() { - *x = GcePersistentDiskCsiDriverConfig{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[37] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *GcePersistentDiskCsiDriverConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GcePersistentDiskCsiDriverConfig) ProtoMessage() {} - -func (x *GcePersistentDiskCsiDriverConfig) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[37] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GcePersistentDiskCsiDriverConfig.ProtoReflect.Descriptor instead. -func (*GcePersistentDiskCsiDriverConfig) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{37} -} - -func (x *GcePersistentDiskCsiDriverConfig) GetEnabled() bool { - if x != nil { - return x.Enabled - } - return false -} - -// Configuration for the Filestore CSI driver. -type GcpFilestoreCsiDriverConfig struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Whether the Filestore CSI driver is enabled for this cluster. - Enabled bool `protobuf:"varint,1,opt,name=enabled,proto3" json:"enabled,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *GcpFilestoreCsiDriverConfig) Reset() { - *x = GcpFilestoreCsiDriverConfig{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[38] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *GcpFilestoreCsiDriverConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GcpFilestoreCsiDriverConfig) ProtoMessage() {} - -func (x *GcpFilestoreCsiDriverConfig) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[38] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GcpFilestoreCsiDriverConfig.ProtoReflect.Descriptor instead. -func (*GcpFilestoreCsiDriverConfig) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{38} -} - -func (x *GcpFilestoreCsiDriverConfig) GetEnabled() bool { - if x != nil { - return x.Enabled - } - return false -} - -// Configuration for the Cloud Storage Fuse CSI driver. -type GcsFuseCsiDriverConfig struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Whether the Cloud Storage Fuse CSI driver is enabled for this cluster. - Enabled bool `protobuf:"varint,1,opt,name=enabled,proto3" json:"enabled,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *GcsFuseCsiDriverConfig) Reset() { - *x = GcsFuseCsiDriverConfig{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[39] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *GcsFuseCsiDriverConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GcsFuseCsiDriverConfig) ProtoMessage() {} - -func (x *GcsFuseCsiDriverConfig) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[39] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GcsFuseCsiDriverConfig.ProtoReflect.Descriptor instead. -func (*GcsFuseCsiDriverConfig) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{39} -} - -func (x *GcsFuseCsiDriverConfig) GetEnabled() bool { - if x != nil { - return x.Enabled - } - return false -} - -// Configuration for the Cloud Storage Parallelstore CSI driver. -type ParallelstoreCsiDriverConfig struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Whether the Cloud Storage Parallelstore CSI driver is enabled for this - // cluster. - Enabled bool `protobuf:"varint,1,opt,name=enabled,proto3" json:"enabled,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ParallelstoreCsiDriverConfig) Reset() { - *x = ParallelstoreCsiDriverConfig{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[40] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ParallelstoreCsiDriverConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ParallelstoreCsiDriverConfig) ProtoMessage() {} - -func (x *ParallelstoreCsiDriverConfig) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[40] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ParallelstoreCsiDriverConfig.ProtoReflect.Descriptor instead. -func (*ParallelstoreCsiDriverConfig) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{40} -} - -func (x *ParallelstoreCsiDriverConfig) GetEnabled() bool { - if x != nil { - return x.Enabled - } - return false -} - -// Configuration for the High Scale Checkpointing. -type HighScaleCheckpointingConfig struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Whether the High Scale Checkpointing is enabled for this - // cluster. - Enabled bool `protobuf:"varint,1,opt,name=enabled,proto3" json:"enabled,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *HighScaleCheckpointingConfig) Reset() { - *x = HighScaleCheckpointingConfig{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[41] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *HighScaleCheckpointingConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*HighScaleCheckpointingConfig) ProtoMessage() {} - -func (x *HighScaleCheckpointingConfig) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[41] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use HighScaleCheckpointingConfig.ProtoReflect.Descriptor instead. -func (*HighScaleCheckpointingConfig) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{41} -} - -func (x *HighScaleCheckpointingConfig) GetEnabled() bool { - if x != nil { - return x.Enabled - } - return false -} - -// Configuration for the Lustre CSI driver. -type LustreCsiDriverConfig struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Whether the Lustre CSI driver is enabled for this cluster. - Enabled bool `protobuf:"varint,1,opt,name=enabled,proto3" json:"enabled,omitempty"` - // If set to true, the Lustre CSI driver will install Lustre kernel modules - // using port 6988. - // This serves as a workaround for a port conflict with the - // gke-metadata-server. This field is required ONLY under the following - // conditions: - // 1. The GKE node version is older than 1.33.2-gke.4655000. - // 2. You're connecting to a Lustre instance that has the - // 'gke-support-enabled' flag. - // Deprecated: This flag is no longer required as of GKE node version - // 1.33.2-gke.4655000, unless you are connecting to a Lustre instance - // that has the `gke-support-enabled` flag. - // - // Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. - EnableLegacyLustrePort bool `protobuf:"varint,3,opt,name=enable_legacy_lustre_port,json=enableLegacyLustrePort,proto3" json:"enable_legacy_lustre_port,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *LustreCsiDriverConfig) Reset() { - *x = LustreCsiDriverConfig{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[42] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *LustreCsiDriverConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*LustreCsiDriverConfig) ProtoMessage() {} - -func (x *LustreCsiDriverConfig) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[42] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use LustreCsiDriverConfig.ProtoReflect.Descriptor instead. -func (*LustreCsiDriverConfig) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{42} -} - -func (x *LustreCsiDriverConfig) GetEnabled() bool { - if x != nil { - return x.Enabled - } - return false -} - -// Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. -func (x *LustreCsiDriverConfig) GetEnableLegacyLustrePort() bool { - if x != nil { - return x.EnableLegacyLustrePort - } - return false -} - -// Configuration for the Slice Controller. -type SliceControllerConfig struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Optional. Indicates whether Slice Controller is enabled in the cluster. - Enabled bool `protobuf:"varint,1,opt,name=enabled,proto3" json:"enabled,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *SliceControllerConfig) Reset() { - *x = SliceControllerConfig{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[43] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *SliceControllerConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SliceControllerConfig) ProtoMessage() {} - -func (x *SliceControllerConfig) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[43] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SliceControllerConfig.ProtoReflect.Descriptor instead. -func (*SliceControllerConfig) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{43} -} - -func (x *SliceControllerConfig) GetEnabled() bool { - if x != nil { - return x.Enabled - } - return false -} - -// Configuration options for the Ray Operator add-on. -type RayOperatorConfig struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Whether the Ray Operator addon is enabled for this cluster. - Enabled bool `protobuf:"varint,1,opt,name=enabled,proto3" json:"enabled,omitempty"` - // Optional. Logging configuration for Ray clusters. - RayClusterLoggingConfig *RayClusterLoggingConfig `protobuf:"bytes,2,opt,name=ray_cluster_logging_config,json=rayClusterLoggingConfig,proto3" json:"ray_cluster_logging_config,omitempty"` - // Optional. Monitoring configuration for Ray clusters. - RayClusterMonitoringConfig *RayClusterMonitoringConfig `protobuf:"bytes,3,opt,name=ray_cluster_monitoring_config,json=rayClusterMonitoringConfig,proto3" json:"ray_cluster_monitoring_config,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *RayOperatorConfig) Reset() { - *x = RayOperatorConfig{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[44] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *RayOperatorConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RayOperatorConfig) ProtoMessage() {} - -func (x *RayOperatorConfig) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[44] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RayOperatorConfig.ProtoReflect.Descriptor instead. -func (*RayOperatorConfig) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{44} -} - -func (x *RayOperatorConfig) GetEnabled() bool { - if x != nil { - return x.Enabled - } - return false -} - -func (x *RayOperatorConfig) GetRayClusterLoggingConfig() *RayClusterLoggingConfig { - if x != nil { - return x.RayClusterLoggingConfig - } - return nil -} - -func (x *RayOperatorConfig) GetRayClusterMonitoringConfig() *RayClusterMonitoringConfig { - if x != nil { - return x.RayClusterMonitoringConfig - } - return nil -} - -// Configuration for the Backup for GKE Agent. -type GkeBackupAgentConfig struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Whether the Backup for GKE agent is enabled for this cluster. - Enabled bool `protobuf:"varint,1,opt,name=enabled,proto3" json:"enabled,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *GkeBackupAgentConfig) Reset() { - *x = GkeBackupAgentConfig{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[45] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *GkeBackupAgentConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GkeBackupAgentConfig) ProtoMessage() {} - -func (x *GkeBackupAgentConfig) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[45] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GkeBackupAgentConfig.ProtoReflect.Descriptor instead. -func (*GkeBackupAgentConfig) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{45} -} - -func (x *GkeBackupAgentConfig) GetEnabled() bool { - if x != nil { - return x.Enabled - } - return false -} - -// Configuration for the Stateful HA add-on. -type StatefulHAConfig struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Whether the Stateful HA add-on is enabled for this cluster. - Enabled bool `protobuf:"varint,1,opt,name=enabled,proto3" json:"enabled,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *StatefulHAConfig) Reset() { - *x = StatefulHAConfig{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[46] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *StatefulHAConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*StatefulHAConfig) ProtoMessage() {} - -func (x *StatefulHAConfig) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[46] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use StatefulHAConfig.ProtoReflect.Descriptor instead. -func (*StatefulHAConfig) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{46} -} - -func (x *StatefulHAConfig) GetEnabled() bool { - if x != nil { - return x.Enabled - } - return false -} - -// Configuration options for the master authorized networks feature. Enabled -// master authorized networks will disallow all external traffic to access -// Kubernetes master through HTTPS except traffic from the given CIDR blocks, -// Google Compute Engine Public IPs and Google Prod IPs. -type MasterAuthorizedNetworksConfig struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Whether or not master authorized networks is enabled. - Enabled bool `protobuf:"varint,1,opt,name=enabled,proto3" json:"enabled,omitempty"` - // cidr_blocks define up to 50 external networks that could access - // Kubernetes master through HTTPS. - CidrBlocks []*MasterAuthorizedNetworksConfig_CidrBlock `protobuf:"bytes,2,rep,name=cidr_blocks,json=cidrBlocks,proto3" json:"cidr_blocks,omitempty"` - // Whether master is accessible via Google Compute Engine Public IP addresses. - GcpPublicCidrsAccessEnabled *bool `protobuf:"varint,3,opt,name=gcp_public_cidrs_access_enabled,json=gcpPublicCidrsAccessEnabled,proto3,oneof" json:"gcp_public_cidrs_access_enabled,omitempty"` - // Whether master authorized networks is enforced on private endpoint or not. - PrivateEndpointEnforcementEnabled *bool `protobuf:"varint,5,opt,name=private_endpoint_enforcement_enabled,json=privateEndpointEnforcementEnabled,proto3,oneof" json:"private_endpoint_enforcement_enabled,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *MasterAuthorizedNetworksConfig) Reset() { - *x = MasterAuthorizedNetworksConfig{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[47] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *MasterAuthorizedNetworksConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MasterAuthorizedNetworksConfig) ProtoMessage() {} - -func (x *MasterAuthorizedNetworksConfig) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[47] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use MasterAuthorizedNetworksConfig.ProtoReflect.Descriptor instead. -func (*MasterAuthorizedNetworksConfig) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{47} -} - -func (x *MasterAuthorizedNetworksConfig) GetEnabled() bool { - if x != nil { - return x.Enabled - } - return false -} - -func (x *MasterAuthorizedNetworksConfig) GetCidrBlocks() []*MasterAuthorizedNetworksConfig_CidrBlock { - if x != nil { - return x.CidrBlocks - } - return nil -} - -func (x *MasterAuthorizedNetworksConfig) GetGcpPublicCidrsAccessEnabled() bool { - if x != nil && x.GcpPublicCidrsAccessEnabled != nil { - return *x.GcpPublicCidrsAccessEnabled - } - return false -} - -func (x *MasterAuthorizedNetworksConfig) GetPrivateEndpointEnforcementEnabled() bool { - if x != nil && x.PrivateEndpointEnforcementEnabled != nil { - return *x.PrivateEndpointEnforcementEnabled - } - return false -} - -// Configuration for the legacy Attribute Based Access Control authorization -// mode. -type LegacyAbac struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Whether the ABAC authorizer is enabled for this cluster. When enabled, - // identities in the system, including service accounts, nodes, and - // controllers, will have statically granted permissions beyond those - // provided by the RBAC configuration or IAM. - Enabled bool `protobuf:"varint,1,opt,name=enabled,proto3" json:"enabled,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *LegacyAbac) Reset() { - *x = LegacyAbac{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[48] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *LegacyAbac) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*LegacyAbac) ProtoMessage() {} - -func (x *LegacyAbac) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[48] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use LegacyAbac.ProtoReflect.Descriptor instead. -func (*LegacyAbac) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{48} -} - -func (x *LegacyAbac) GetEnabled() bool { - if x != nil { - return x.Enabled - } - return false -} - -// Configuration options for the NetworkPolicy feature. -// https://kubernetes.io/docs/concepts/services-networking/networkpolicies/ -type NetworkPolicy struct { - state protoimpl.MessageState `protogen:"open.v1"` - // The selected network policy provider. - Provider NetworkPolicy_Provider `protobuf:"varint,1,opt,name=provider,proto3,enum=google.container.v1.NetworkPolicy_Provider" json:"provider,omitempty"` - // Whether network policy is enabled on the cluster. - Enabled bool `protobuf:"varint,2,opt,name=enabled,proto3" json:"enabled,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *NetworkPolicy) Reset() { - *x = NetworkPolicy{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[49] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *NetworkPolicy) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*NetworkPolicy) ProtoMessage() {} - -func (x *NetworkPolicy) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[49] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use NetworkPolicy.ProtoReflect.Descriptor instead. -func (*NetworkPolicy) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{49} -} - -func (x *NetworkPolicy) GetProvider() NetworkPolicy_Provider { - if x != nil { - return x.Provider - } - return NetworkPolicy_PROVIDER_UNSPECIFIED -} - -func (x *NetworkPolicy) GetEnabled() bool { - if x != nil { - return x.Enabled - } - return false -} - -// Configuration for Binary Authorization. -type BinaryAuthorization struct { - state protoimpl.MessageState `protogen:"open.v1"` - // This field is deprecated. Leave this unset and instead configure - // BinaryAuthorization using evaluation_mode. If evaluation_mode is set to - // anything other than EVALUATION_MODE_UNSPECIFIED, this field is ignored. - // - // Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. - Enabled bool `protobuf:"varint,1,opt,name=enabled,proto3" json:"enabled,omitempty"` - // Mode of operation for binauthz policy evaluation. If unspecified, defaults - // to DISABLED. - EvaluationMode BinaryAuthorization_EvaluationMode `protobuf:"varint,2,opt,name=evaluation_mode,json=evaluationMode,proto3,enum=google.container.v1.BinaryAuthorization_EvaluationMode" json:"evaluation_mode,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *BinaryAuthorization) Reset() { - *x = BinaryAuthorization{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[50] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *BinaryAuthorization) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*BinaryAuthorization) ProtoMessage() {} - -func (x *BinaryAuthorization) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[50] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use BinaryAuthorization.ProtoReflect.Descriptor instead. -func (*BinaryAuthorization) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{50} -} - -// Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. -func (x *BinaryAuthorization) GetEnabled() bool { - if x != nil { - return x.Enabled - } - return false -} - -func (x *BinaryAuthorization) GetEvaluationMode() BinaryAuthorization_EvaluationMode { - if x != nil { - return x.EvaluationMode - } - return BinaryAuthorization_EVALUATION_MODE_UNSPECIFIED -} - -// [PRIVATE FIELD] -// Config for pod CIDR size overprovisioning. -type PodCIDROverprovisionConfig struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Whether Pod CIDR overprovisioning is disabled. - // Note: Pod CIDR overprovisioning is enabled by default. - Disable bool `protobuf:"varint,1,opt,name=disable,proto3" json:"disable,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *PodCIDROverprovisionConfig) Reset() { - *x = PodCIDROverprovisionConfig{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[51] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *PodCIDROverprovisionConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*PodCIDROverprovisionConfig) ProtoMessage() {} - -func (x *PodCIDROverprovisionConfig) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[51] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use PodCIDROverprovisionConfig.ProtoReflect.Descriptor instead. -func (*PodCIDROverprovisionConfig) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{51} -} - -func (x *PodCIDROverprovisionConfig) GetDisable() bool { - if x != nil { - return x.Disable - } - return false -} - -// Configuration for controlling how IPs are allocated in the cluster. -type IPAllocationPolicy struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Whether alias IPs will be used for pod IPs in the cluster. - // This is used in conjunction with use_routes. It cannot - // be true if use_routes is true. If both use_ip_aliases and use_routes are - // false, then the server picks the default IP allocation mode - UseIpAliases bool `protobuf:"varint,1,opt,name=use_ip_aliases,json=useIpAliases,proto3" json:"use_ip_aliases,omitempty"` - // Whether a new subnetwork will be created automatically for the cluster. - // - // This field is only applicable when `use_ip_aliases` is true. - CreateSubnetwork bool `protobuf:"varint,2,opt,name=create_subnetwork,json=createSubnetwork,proto3" json:"create_subnetwork,omitempty"` - // A custom subnetwork name to be used if `create_subnetwork` is true. If - // this field is empty, then an automatic name will be chosen for the new - // subnetwork. - SubnetworkName string `protobuf:"bytes,3,opt,name=subnetwork_name,json=subnetworkName,proto3" json:"subnetwork_name,omitempty"` - // This field is deprecated, use cluster_ipv4_cidr_block. - // - // Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. - ClusterIpv4Cidr string `protobuf:"bytes,4,opt,name=cluster_ipv4_cidr,json=clusterIpv4Cidr,proto3" json:"cluster_ipv4_cidr,omitempty"` - // This field is deprecated, use node_ipv4_cidr_block. - // - // Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. - NodeIpv4Cidr string `protobuf:"bytes,5,opt,name=node_ipv4_cidr,json=nodeIpv4Cidr,proto3" json:"node_ipv4_cidr,omitempty"` - // This field is deprecated, use services_ipv4_cidr_block. - // - // Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. - ServicesIpv4Cidr string `protobuf:"bytes,6,opt,name=services_ipv4_cidr,json=servicesIpv4Cidr,proto3" json:"services_ipv4_cidr,omitempty"` - // The name of the secondary range to be used for the cluster CIDR - // block. The secondary range will be used for pod IP - // addresses. This must be an existing secondary range associated - // with the cluster subnetwork. - // - // This field is only applicable with use_ip_aliases is true and - // create_subnetwork is false. - ClusterSecondaryRangeName string `protobuf:"bytes,7,opt,name=cluster_secondary_range_name,json=clusterSecondaryRangeName,proto3" json:"cluster_secondary_range_name,omitempty"` - // The name of the secondary range to be used as for the services - // CIDR block. The secondary range will be used for service - // ClusterIPs. This must be an existing secondary range associated - // with the cluster subnetwork. - // - // This field is only applicable with use_ip_aliases is true and - // create_subnetwork is false. - ServicesSecondaryRangeName string `protobuf:"bytes,8,opt,name=services_secondary_range_name,json=servicesSecondaryRangeName,proto3" json:"services_secondary_range_name,omitempty"` - // The IP address range for the cluster pod IPs. If this field is set, then - // `cluster.cluster_ipv4_cidr` must be left blank. - // - // This field is only applicable when `use_ip_aliases` is true. - // - // Set to blank to have a range chosen with the default size. - // - // Set to /netmask (e.g. `/14`) to have a range chosen with a specific - // netmask. - // - // Set to a - // [CIDR](https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing) - // notation (e.g. `10.96.0.0/14`) from the RFC-1918 private networks (e.g. - // `10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`) to pick a specific range - // to use. - ClusterIpv4CidrBlock string `protobuf:"bytes,9,opt,name=cluster_ipv4_cidr_block,json=clusterIpv4CidrBlock,proto3" json:"cluster_ipv4_cidr_block,omitempty"` - // The IP address range of the instance IPs in this cluster. - // - // This is applicable only if `create_subnetwork` is true. - // - // Set to blank to have a range chosen with the default size. - // - // Set to /netmask (e.g. `/14`) to have a range chosen with a specific - // netmask. - // - // Set to a - // [CIDR](https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing) - // notation (e.g. `10.96.0.0/14`) from the RFC-1918 private networks (e.g. - // `10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`) to pick a specific range - // to use. - NodeIpv4CidrBlock string `protobuf:"bytes,10,opt,name=node_ipv4_cidr_block,json=nodeIpv4CidrBlock,proto3" json:"node_ipv4_cidr_block,omitempty"` - // The IP address range of the services IPs in this cluster. If blank, a range - // will be automatically chosen with the default size. - // - // This field is only applicable when `use_ip_aliases` is true. - // - // Set to blank to have a range chosen with the default size. - // - // Set to /netmask (e.g. `/14`) to have a range chosen with a specific - // netmask. - // - // Set to a - // [CIDR](https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing) - // notation (e.g. `10.96.0.0/14`) from the RFC-1918 private networks (e.g. - // `10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`) to pick a specific range - // to use. - ServicesIpv4CidrBlock string `protobuf:"bytes,11,opt,name=services_ipv4_cidr_block,json=servicesIpv4CidrBlock,proto3" json:"services_ipv4_cidr_block,omitempty"` - // The IP address range of the Cloud TPUs in this cluster. If unspecified, a - // range will be automatically chosen with the default size. - // - // This field is only applicable when `use_ip_aliases` is true. - // - // If unspecified, the range will use the default size. - // - // Set to /netmask (e.g. `/14`) to have a range chosen with a specific - // netmask. - // - // Set to a - // [CIDR](https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing) - // notation (e.g. `10.96.0.0/14`) from the RFC-1918 private networks (e.g. - // `10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`) to pick a specific range - // to use. - // - // This field is deprecated due to the deprecation of 2VM TPU. The end of life - // date for 2VM TPU is 2025-04-25. - // - // Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. - TpuIpv4CidrBlock string `protobuf:"bytes,13,opt,name=tpu_ipv4_cidr_block,json=tpuIpv4CidrBlock,proto3" json:"tpu_ipv4_cidr_block,omitempty"` - // Whether routes will be used for pod IPs in the cluster. - // This is used in conjunction with use_ip_aliases. It cannot be true if - // use_ip_aliases is true. If both use_ip_aliases and use_routes are false, - // then the server picks the default IP allocation mode - UseRoutes bool `protobuf:"varint,15,opt,name=use_routes,json=useRoutes,proto3" json:"use_routes,omitempty"` - // The IP stack type of the cluster - StackType StackType `protobuf:"varint,16,opt,name=stack_type,json=stackType,proto3,enum=google.container.v1.StackType" json:"stack_type,omitempty"` - // The ipv6 access type (internal or external) when create_subnetwork is true - Ipv6AccessType IPv6AccessType `protobuf:"varint,17,opt,name=ipv6_access_type,json=ipv6AccessType,proto3,enum=google.container.v1.IPv6AccessType" json:"ipv6_access_type,omitempty"` - // [PRIVATE FIELD] - // Pod CIDR size overprovisioning config for the cluster. - // - // Pod CIDR size per node depends on max_pods_per_node. By default, the value - // of max_pods_per_node is doubled and then rounded off to next power of 2 to - // get the size of pod CIDR block per node. - // Example: max_pods_per_node of 30 would result in 64 IPs (/26). - // - // This config can disable the doubling of IPs (we still round off to next - // power of 2) - // Example: max_pods_per_node of 30 will result in 32 IPs (/27) when - // overprovisioning is disabled. - PodCidrOverprovisionConfig *PodCIDROverprovisionConfig `protobuf:"bytes,21,opt,name=pod_cidr_overprovision_config,json=podCidrOverprovisionConfig,proto3" json:"pod_cidr_overprovision_config,omitempty"` - // Output only. The subnet's IPv6 CIDR block used by nodes and pods. - SubnetIpv6CidrBlock string `protobuf:"bytes,22,opt,name=subnet_ipv6_cidr_block,json=subnetIpv6CidrBlock,proto3" json:"subnet_ipv6_cidr_block,omitempty"` - // Output only. The services IPv6 CIDR block for the cluster. - ServicesIpv6CidrBlock string `protobuf:"bytes,23,opt,name=services_ipv6_cidr_block,json=servicesIpv6CidrBlock,proto3" json:"services_ipv6_cidr_block,omitempty"` - // Output only. The additional pod ranges that are added to the cluster. - // These pod ranges can be used by new node pools to allocate pod IPs - // automatically. Once the range is removed it will not show up in - // IPAllocationPolicy. - AdditionalPodRangesConfig *AdditionalPodRangesConfig `protobuf:"bytes,24,opt,name=additional_pod_ranges_config,json=additionalPodRangesConfig,proto3" json:"additional_pod_ranges_config,omitempty"` - // Output only. The utilization of the cluster default IPv4 range for the - // pod. The ratio is Usage/[Total number of IPs in the secondary range], - // Usage=numNodes*numZones*podIPsPerNode. - DefaultPodIpv4RangeUtilization float64 `protobuf:"fixed64,25,opt,name=default_pod_ipv4_range_utilization,json=defaultPodIpv4RangeUtilization,proto3" json:"default_pod_ipv4_range_utilization,omitempty"` - // Output only. The additional IP ranges that are added to the cluster. - // These IP ranges can be used by new node pools to allocate node and pod IPs - // automatically. - // Each AdditionalIPRangesConfig corresponds to a single subnetwork. - // Once a range is removed it will not show up in IPAllocationPolicy. - AdditionalIpRangesConfigs []*AdditionalIPRangesConfig `protobuf:"bytes,29,rep,name=additional_ip_ranges_configs,json=additionalIpRangesConfigs,proto3" json:"additional_ip_ranges_configs,omitempty"` - // Optional. AutoIpamConfig contains all information related to Auto IPAM - AutoIpamConfig *AutoIpamConfig `protobuf:"bytes,30,opt,name=auto_ipam_config,json=autoIpamConfig,proto3" json:"auto_ipam_config,omitempty"` - // Cluster-level network tier configuration is used to determine the default - // network tier for external IP addresses on cluster resources, such as node - // pools and load balancers. - NetworkTierConfig *NetworkTierConfig `protobuf:"bytes,31,opt,name=network_tier_config,json=networkTierConfig,proto3" json:"network_tier_config,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *IPAllocationPolicy) Reset() { - *x = IPAllocationPolicy{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[52] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *IPAllocationPolicy) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*IPAllocationPolicy) ProtoMessage() {} - -func (x *IPAllocationPolicy) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[52] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use IPAllocationPolicy.ProtoReflect.Descriptor instead. -func (*IPAllocationPolicy) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{52} -} - -func (x *IPAllocationPolicy) GetUseIpAliases() bool { - if x != nil { - return x.UseIpAliases - } - return false -} - -func (x *IPAllocationPolicy) GetCreateSubnetwork() bool { - if x != nil { - return x.CreateSubnetwork - } - return false -} - -func (x *IPAllocationPolicy) GetSubnetworkName() string { - if x != nil { - return x.SubnetworkName - } - return "" -} - -// Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. -func (x *IPAllocationPolicy) GetClusterIpv4Cidr() string { - if x != nil { - return x.ClusterIpv4Cidr - } - return "" -} - -// Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. -func (x *IPAllocationPolicy) GetNodeIpv4Cidr() string { - if x != nil { - return x.NodeIpv4Cidr - } - return "" -} - -// Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. -func (x *IPAllocationPolicy) GetServicesIpv4Cidr() string { - if x != nil { - return x.ServicesIpv4Cidr - } - return "" -} - -func (x *IPAllocationPolicy) GetClusterSecondaryRangeName() string { - if x != nil { - return x.ClusterSecondaryRangeName - } - return "" -} - -func (x *IPAllocationPolicy) GetServicesSecondaryRangeName() string { - if x != nil { - return x.ServicesSecondaryRangeName - } - return "" -} - -func (x *IPAllocationPolicy) GetClusterIpv4CidrBlock() string { - if x != nil { - return x.ClusterIpv4CidrBlock - } - return "" -} - -func (x *IPAllocationPolicy) GetNodeIpv4CidrBlock() string { - if x != nil { - return x.NodeIpv4CidrBlock - } - return "" -} - -func (x *IPAllocationPolicy) GetServicesIpv4CidrBlock() string { - if x != nil { - return x.ServicesIpv4CidrBlock - } - return "" -} - -// Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. -func (x *IPAllocationPolicy) GetTpuIpv4CidrBlock() string { - if x != nil { - return x.TpuIpv4CidrBlock - } - return "" -} - -func (x *IPAllocationPolicy) GetUseRoutes() bool { - if x != nil { - return x.UseRoutes - } - return false -} - -func (x *IPAllocationPolicy) GetStackType() StackType { - if x != nil { - return x.StackType - } - return StackType_STACK_TYPE_UNSPECIFIED -} - -func (x *IPAllocationPolicy) GetIpv6AccessType() IPv6AccessType { - if x != nil { - return x.Ipv6AccessType - } - return IPv6AccessType_IPV6_ACCESS_TYPE_UNSPECIFIED -} - -func (x *IPAllocationPolicy) GetPodCidrOverprovisionConfig() *PodCIDROverprovisionConfig { - if x != nil { - return x.PodCidrOverprovisionConfig - } - return nil -} - -func (x *IPAllocationPolicy) GetSubnetIpv6CidrBlock() string { - if x != nil { - return x.SubnetIpv6CidrBlock - } - return "" -} - -func (x *IPAllocationPolicy) GetServicesIpv6CidrBlock() string { - if x != nil { - return x.ServicesIpv6CidrBlock - } - return "" -} - -func (x *IPAllocationPolicy) GetAdditionalPodRangesConfig() *AdditionalPodRangesConfig { - if x != nil { - return x.AdditionalPodRangesConfig - } - return nil -} - -func (x *IPAllocationPolicy) GetDefaultPodIpv4RangeUtilization() float64 { - if x != nil { - return x.DefaultPodIpv4RangeUtilization - } - return 0 -} - -func (x *IPAllocationPolicy) GetAdditionalIpRangesConfigs() []*AdditionalIPRangesConfig { - if x != nil { - return x.AdditionalIpRangesConfigs - } - return nil -} - -func (x *IPAllocationPolicy) GetAutoIpamConfig() *AutoIpamConfig { - if x != nil { - return x.AutoIpamConfig - } - return nil -} - -func (x *IPAllocationPolicy) GetNetworkTierConfig() *NetworkTierConfig { - if x != nil { - return x.NetworkTierConfig - } - return nil -} - -// A Google Kubernetes Engine cluster. -type Cluster struct { - state protoimpl.MessageState `protogen:"open.v1"` - // The name of this cluster. The name must be unique within this project - // and location (e.g. zone or region), and can be up to 40 characters with - // the following restrictions: - // - // * Lowercase letters, numbers, and hyphens only. - // * Must start with a letter. - // * Must end with a number or a letter. - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // An optional description of this cluster. - Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` - // The number of nodes to create in this cluster. You must ensure that your - // Compute Engine [resource - // quota](https://cloud.google.com/compute/quotas) - // is sufficient for this number of instances. You must also have available - // firewall and routes quota. - // For requests, this field should only be used in lieu of a - // "node_pool" object, since this configuration (along with the - // "node_config") will be used to create a "NodePool" object with an - // auto-generated name. Do not use this and a node_pool at the same time. - // - // This field is deprecated, use node_pool.initial_node_count instead. - // - // Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. - InitialNodeCount int32 `protobuf:"varint,3,opt,name=initial_node_count,json=initialNodeCount,proto3" json:"initial_node_count,omitempty"` - // Parameters used in creating the cluster's nodes. - // For requests, this field should only be used in lieu of a - // "node_pool" object, since this configuration (along with the - // "initial_node_count") will be used to create a "NodePool" object with an - // auto-generated name. Do not use this and a node_pool at the same time. - // For responses, this field will be populated with the node configuration of - // the first node pool. (For configuration of each node pool, see - // `node_pool.config`) - // - // If unspecified, the defaults are used. - // This field is deprecated, use node_pool.config instead. - // - // Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. - NodeConfig *NodeConfig `protobuf:"bytes,4,opt,name=node_config,json=nodeConfig,proto3" json:"node_config,omitempty"` - // The authentication information for accessing the master endpoint. - // If unspecified, the defaults are used: - // For clusters before v1.12, if master_auth is unspecified, `username` will - // be set to "admin", a random password will be generated, and a client - // certificate will be issued. - MasterAuth *MasterAuth `protobuf:"bytes,5,opt,name=master_auth,json=masterAuth,proto3" json:"master_auth,omitempty"` - // The logging service the cluster should use to write logs. - // Currently available options: - // - // * `logging.googleapis.com/kubernetes` - The Cloud Logging - // service with a Kubernetes-native resource model - // - `logging.googleapis.com` - The legacy Cloud Logging service (no longer - // available as of GKE 1.15). - // - `none` - no logs will be exported from the cluster. - // - // If left as an empty string,`logging.googleapis.com/kubernetes` will be - // used for GKE 1.14+ or `logging.googleapis.com` for earlier versions. - LoggingService string `protobuf:"bytes,6,opt,name=logging_service,json=loggingService,proto3" json:"logging_service,omitempty"` - // The monitoring service the cluster should use to write metrics. - // Currently available options: - // - // * `monitoring.googleapis.com/kubernetes` - The Cloud Monitoring - // service with a Kubernetes-native resource model - // - `monitoring.googleapis.com` - The legacy Cloud Monitoring service (no - // longer available as of GKE 1.15). - // - `none` - No metrics will be exported from the cluster. - // - // If left as an empty string,`monitoring.googleapis.com/kubernetes` will be - // used for GKE 1.14+ or `monitoring.googleapis.com` for earlier versions. - MonitoringService string `protobuf:"bytes,7,opt,name=monitoring_service,json=monitoringService,proto3" json:"monitoring_service,omitempty"` - // The name of the Google Compute Engine - // [network](https://cloud.google.com/compute/docs/networks-and-firewalls#networks) - // to which the cluster is connected. If left unspecified, the `default` - // network will be used. - Network string `protobuf:"bytes,8,opt,name=network,proto3" json:"network,omitempty"` - // The IP address range of the container pods in this cluster, in - // [CIDR](https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing) - // notation (e.g. `10.96.0.0/14`). Leave blank to have - // one automatically chosen or specify a `/14` block in `10.0.0.0/8`. - ClusterIpv4Cidr string `protobuf:"bytes,9,opt,name=cluster_ipv4_cidr,json=clusterIpv4Cidr,proto3" json:"cluster_ipv4_cidr,omitempty"` - // Configurations for the various addons available to run in the cluster. - AddonsConfig *AddonsConfig `protobuf:"bytes,10,opt,name=addons_config,json=addonsConfig,proto3" json:"addons_config,omitempty"` - // The name of the Google Compute Engine - // [subnetwork](https://cloud.google.com/compute/docs/subnetworks) - // to which the cluster is connected. - Subnetwork string `protobuf:"bytes,11,opt,name=subnetwork,proto3" json:"subnetwork,omitempty"` - // The node pools associated with this cluster. - // This field should not be set if "node_config" or "initial_node_count" are - // specified. - NodePools []*NodePool `protobuf:"bytes,12,rep,name=node_pools,json=nodePools,proto3" json:"node_pools,omitempty"` - // The list of Google Compute Engine - // [zones](https://cloud.google.com/compute/docs/zones#available) - // in which the cluster's nodes should be located. - // - // This field provides a default value if - // [NodePool.Locations](https://cloud.google.com/kubernetes-engine/docs/reference/rest/v1/projects.locations.clusters.nodePools#NodePool.FIELDS.locations) - // are not specified during node pool creation. - // - // Warning: changing cluster locations will update the - // [NodePool.Locations](https://cloud.google.com/kubernetes-engine/docs/reference/rest/v1/projects.locations.clusters.nodePools#NodePool.FIELDS.locations) - // of all node pools and will result in nodes being added and/or removed. - Locations []string `protobuf:"bytes,13,rep,name=locations,proto3" json:"locations,omitempty"` - // Kubernetes alpha features are enabled on this cluster. This includes alpha - // API groups (e.g. v1alpha1) and features that may not be production ready in - // the kubernetes version of the master and nodes. - // The cluster has no SLA for uptime and master/node upgrades are disabled. - // Alpha enabled clusters are automatically deleted thirty days after - // creation. - EnableKubernetesAlpha bool `protobuf:"varint,14,opt,name=enable_kubernetes_alpha,json=enableKubernetesAlpha,proto3" json:"enable_kubernetes_alpha,omitempty"` - // The list of user specified Kubernetes feature gates. - // Each string represents the activation status of a feature gate (e.g. - // "featureX=true" or "featureX=false") - AlphaClusterFeatureGates []string `protobuf:"bytes,160,rep,name=alpha_cluster_feature_gates,json=alphaClusterFeatureGates,proto3" json:"alpha_cluster_feature_gates,omitempty"` - // The resource labels for the cluster to use to annotate any related - // Google Compute Engine resources. - ResourceLabels map[string]string `protobuf:"bytes,15,rep,name=resource_labels,json=resourceLabels,proto3" json:"resource_labels,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` - // The fingerprint of the set of labels for this cluster. - LabelFingerprint string `protobuf:"bytes,16,opt,name=label_fingerprint,json=labelFingerprint,proto3" json:"label_fingerprint,omitempty"` - // Configuration for the legacy ABAC authorization mode. - LegacyAbac *LegacyAbac `protobuf:"bytes,18,opt,name=legacy_abac,json=legacyAbac,proto3" json:"legacy_abac,omitempty"` - // Configuration options for the NetworkPolicy feature. - NetworkPolicy *NetworkPolicy `protobuf:"bytes,19,opt,name=network_policy,json=networkPolicy,proto3" json:"network_policy,omitempty"` - // Configuration for cluster IP allocation. - IpAllocationPolicy *IPAllocationPolicy `protobuf:"bytes,20,opt,name=ip_allocation_policy,json=ipAllocationPolicy,proto3" json:"ip_allocation_policy,omitempty"` - // The configuration options for master authorized networks feature. - // - // Deprecated: Use - // [ControlPlaneEndpointsConfig.IPEndpointsConfig.authorized_networks_config][google.container.v1.ControlPlaneEndpointsConfig.IPEndpointsConfig.authorized_networks_config] - // instead. - // - // Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. - MasterAuthorizedNetworksConfig *MasterAuthorizedNetworksConfig `protobuf:"bytes,22,opt,name=master_authorized_networks_config,json=masterAuthorizedNetworksConfig,proto3" json:"master_authorized_networks_config,omitempty"` - // Configure the maintenance policy for this cluster. - MaintenancePolicy *MaintenancePolicy `protobuf:"bytes,23,opt,name=maintenance_policy,json=maintenancePolicy,proto3" json:"maintenance_policy,omitempty"` - // Configuration for Binary Authorization. - BinaryAuthorization *BinaryAuthorization `protobuf:"bytes,24,opt,name=binary_authorization,json=binaryAuthorization,proto3" json:"binary_authorization,omitempty"` - // Cluster-level autoscaling configuration. - Autoscaling *ClusterAutoscaling `protobuf:"bytes,26,opt,name=autoscaling,proto3" json:"autoscaling,omitempty"` - // Configuration for cluster networking. - NetworkConfig *NetworkConfig `protobuf:"bytes,27,opt,name=network_config,json=networkConfig,proto3" json:"network_config,omitempty"` - // The default constraint on the maximum number of pods that can be run - // simultaneously on a node in the node pool of this cluster. Only honored - // if cluster created with IP Alias support. - DefaultMaxPodsConstraint *MaxPodsConstraint `protobuf:"bytes,30,opt,name=default_max_pods_constraint,json=defaultMaxPodsConstraint,proto3" json:"default_max_pods_constraint,omitempty"` - // Configuration for exporting resource usages. Resource usage export is - // disabled when this config is unspecified. - ResourceUsageExportConfig *ResourceUsageExportConfig `protobuf:"bytes,33,opt,name=resource_usage_export_config,json=resourceUsageExportConfig,proto3" json:"resource_usage_export_config,omitempty"` - // Configuration controlling RBAC group membership information. - AuthenticatorGroupsConfig *AuthenticatorGroupsConfig `protobuf:"bytes,34,opt,name=authenticator_groups_config,json=authenticatorGroupsConfig,proto3" json:"authenticator_groups_config,omitempty"` - // Configuration for private cluster. - PrivateClusterConfig *PrivateClusterConfig `protobuf:"bytes,37,opt,name=private_cluster_config,json=privateClusterConfig,proto3" json:"private_cluster_config,omitempty"` - // Configuration of etcd encryption. - DatabaseEncryption *DatabaseEncryption `protobuf:"bytes,38,opt,name=database_encryption,json=databaseEncryption,proto3" json:"database_encryption,omitempty"` - // Cluster-level Vertical Pod Autoscaling configuration. - VerticalPodAutoscaling *VerticalPodAutoscaling `protobuf:"bytes,39,opt,name=vertical_pod_autoscaling,json=verticalPodAutoscaling,proto3" json:"vertical_pod_autoscaling,omitempty"` - // Shielded Nodes configuration. - ShieldedNodes *ShieldedNodes `protobuf:"bytes,40,opt,name=shielded_nodes,json=shieldedNodes,proto3" json:"shielded_nodes,omitempty"` - // Release channel configuration. If left unspecified on cluster creation and - // a version is specified, the cluster is enrolled in the most mature release - // channel where the version is available (first checking STABLE, then - // REGULAR, and finally RAPID). Otherwise, if no release channel - // configuration and no version is specified, the cluster is enrolled in the - // REGULAR channel with its default version. - ReleaseChannel *ReleaseChannel `protobuf:"bytes,41,opt,name=release_channel,json=releaseChannel,proto3" json:"release_channel,omitempty"` - // Configuration for the use of Kubernetes Service Accounts in IAM policies. - WorkloadIdentityConfig *WorkloadIdentityConfig `protobuf:"bytes,43,opt,name=workload_identity_config,json=workloadIdentityConfig,proto3" json:"workload_identity_config,omitempty"` - // Configuration for issuance of mTLS keys and certificates to Kubernetes - // pods. - MeshCertificates *MeshCertificates `protobuf:"bytes,67,opt,name=mesh_certificates,json=meshCertificates,proto3" json:"mesh_certificates,omitempty"` - // Configuration for the fine-grained cost management feature. - CostManagementConfig *CostManagementConfig `protobuf:"bytes,45,opt,name=cost_management_config,json=costManagementConfig,proto3" json:"cost_management_config,omitempty"` - // Notification configuration of the cluster. - NotificationConfig *NotificationConfig `protobuf:"bytes,49,opt,name=notification_config,json=notificationConfig,proto3" json:"notification_config,omitempty"` - // Configuration of Confidential Nodes. - // All the nodes in the cluster will be Confidential VM once enabled. - ConfidentialNodes *ConfidentialNodes `protobuf:"bytes,50,opt,name=confidential_nodes,json=confidentialNodes,proto3" json:"confidential_nodes,omitempty"` - // Configuration for Identity Service component. - IdentityServiceConfig *IdentityServiceConfig `protobuf:"bytes,54,opt,name=identity_service_config,json=identityServiceConfig,proto3" json:"identity_service_config,omitempty"` - // Output only. Server-defined URL for the resource. - SelfLink string `protobuf:"bytes,100,opt,name=self_link,json=selfLink,proto3" json:"self_link,omitempty"` - // Output only. The name of the Google Compute Engine - // [zone](https://cloud.google.com/compute/docs/zones#available) - // in which the cluster resides. This field is deprecated, use location - // instead. - // - // Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. - Zone string `protobuf:"bytes,101,opt,name=zone,proto3" json:"zone,omitempty"` - // Output only. The IP address of this cluster's master endpoint. - // The endpoint can be accessed from the internet at - // `https://username:password@endpoint/`. - // - // See the `masterAuth` property of this resource for username and - // password information. - Endpoint string `protobuf:"bytes,102,opt,name=endpoint,proto3" json:"endpoint,omitempty"` - // The initial Kubernetes version for this cluster. Valid versions are those - // found in validMasterVersions returned by getServerConfig. The version can - // be upgraded over time; such upgrades are reflected in - // currentMasterVersion and currentNodeVersion. - // - // Users may specify either explicit versions offered by - // Kubernetes Engine or version aliases, which have the following behavior: - // - // - "latest": picks the highest valid Kubernetes version - // - "1.X": picks the highest valid patch+gke.N patch in the 1.X version - // - "1.X.Y": picks the highest valid gke.N patch in the 1.X.Y version - // - "1.X.Y-gke.N": picks an explicit Kubernetes version - // - "","-": picks the default Kubernetes version - InitialClusterVersion string `protobuf:"bytes,103,opt,name=initial_cluster_version,json=initialClusterVersion,proto3" json:"initial_cluster_version,omitempty"` - // Output only. The current software version of the master endpoint. - CurrentMasterVersion string `protobuf:"bytes,104,opt,name=current_master_version,json=currentMasterVersion,proto3" json:"current_master_version,omitempty"` - // Output only. Deprecated, use - // [NodePools.version](https://cloud.google.com/kubernetes-engine/docs/reference/rest/v1/projects.locations.clusters.nodePools) - // instead. The current version of the node software components. If they are - // currently at multiple versions because they're in the process of being - // upgraded, this reflects the minimum version of all nodes. - // - // Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. - CurrentNodeVersion string `protobuf:"bytes,105,opt,name=current_node_version,json=currentNodeVersion,proto3" json:"current_node_version,omitempty"` - // Output only. The time the cluster was created, in - // [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format. - CreateTime string `protobuf:"bytes,106,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"` - // Output only. The current status of this cluster. - Status Cluster_Status `protobuf:"varint,107,opt,name=status,proto3,enum=google.container.v1.Cluster_Status" json:"status,omitempty"` - // Output only. Deprecated. Use conditions instead. - // Additional information about the current status of this - // cluster, if available. - // - // Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. - StatusMessage string `protobuf:"bytes,108,opt,name=status_message,json=statusMessage,proto3" json:"status_message,omitempty"` - // Output only. The size of the address space on each node for hosting - // containers. This is provisioned from within the `container_ipv4_cidr` - // range. This field will only be set when cluster is in route-based network - // mode. - NodeIpv4CidrSize int32 `protobuf:"varint,109,opt,name=node_ipv4_cidr_size,json=nodeIpv4CidrSize,proto3" json:"node_ipv4_cidr_size,omitempty"` - // Output only. The IP address range of the Kubernetes services in - // this cluster, in - // [CIDR](https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing) - // notation (e.g. `1.2.3.4/29`). Service addresses are - // typically put in the last `/16` from the container CIDR. - ServicesIpv4Cidr string `protobuf:"bytes,110,opt,name=services_ipv4_cidr,json=servicesIpv4Cidr,proto3" json:"services_ipv4_cidr,omitempty"` - // Output only. Deprecated. Use node_pools.instance_group_urls. - // - // Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. - InstanceGroupUrls []string `protobuf:"bytes,111,rep,name=instance_group_urls,json=instanceGroupUrls,proto3" json:"instance_group_urls,omitempty"` - // Output only. The number of nodes currently in the cluster. Deprecated. - // Call Kubernetes API directly to retrieve node information. - // - // Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. - CurrentNodeCount int32 `protobuf:"varint,112,opt,name=current_node_count,json=currentNodeCount,proto3" json:"current_node_count,omitempty"` - // Output only. The time the cluster will be automatically - // deleted in [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format. - ExpireTime string `protobuf:"bytes,113,opt,name=expire_time,json=expireTime,proto3" json:"expire_time,omitempty"` - // Output only. The name of the Google Compute Engine - // [zone](https://cloud.google.com/compute/docs/regions-zones/regions-zones#available) - // or - // [region](https://cloud.google.com/compute/docs/regions-zones/regions-zones#available) - // in which the cluster resides. - Location string `protobuf:"bytes,114,opt,name=location,proto3" json:"location,omitempty"` - // Enable the ability to use Cloud TPUs in this cluster. - // This field is deprecated due to the deprecation of 2VM TPU. The end of life - // date for 2VM TPU is 2025-04-25. - // - // Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. - EnableTpu bool `protobuf:"varint,115,opt,name=enable_tpu,json=enableTpu,proto3" json:"enable_tpu,omitempty"` - // Output only. The IP address range of the Cloud TPUs in this cluster, in - // [CIDR](https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing) - // notation (e.g. `1.2.3.4/29`). - // This field is deprecated due to the deprecation of 2VM TPU. The end of life - // date for 2VM TPU is 2025-04-25. - // - // Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. - TpuIpv4CidrBlock string `protobuf:"bytes,116,opt,name=tpu_ipv4_cidr_block,json=tpuIpv4CidrBlock,proto3" json:"tpu_ipv4_cidr_block,omitempty"` - // Which conditions caused the current cluster state. - Conditions []*StatusCondition `protobuf:"bytes,118,rep,name=conditions,proto3" json:"conditions,omitempty"` - // Autopilot configuration for the cluster. - Autopilot *Autopilot `protobuf:"bytes,128,opt,name=autopilot,proto3" json:"autopilot,omitempty"` - // Output only. Unique id for the cluster. - Id string `protobuf:"bytes,129,opt,name=id,proto3" json:"id,omitempty"` - // Default NodePool settings for the entire cluster. These settings are - // overridden if specified on the specific NodePool object. - NodePoolDefaults *NodePoolDefaults `protobuf:"bytes,131,opt,name=node_pool_defaults,json=nodePoolDefaults,proto3,oneof" json:"node_pool_defaults,omitempty"` - // Logging configuration for the cluster. - LoggingConfig *LoggingConfig `protobuf:"bytes,132,opt,name=logging_config,json=loggingConfig,proto3" json:"logging_config,omitempty"` - // Monitoring configuration for the cluster. - MonitoringConfig *MonitoringConfig `protobuf:"bytes,133,opt,name=monitoring_config,json=monitoringConfig,proto3" json:"monitoring_config,omitempty"` - // Node pool configs that apply to all auto-provisioned node pools - // in autopilot clusters and node auto-provisioning enabled clusters. - NodePoolAutoConfig *NodePoolAutoConfig `protobuf:"bytes,136,opt,name=node_pool_auto_config,json=nodePoolAutoConfig,proto3" json:"node_pool_auto_config,omitempty"` - // The config for pod autoscaling. - PodAutoscaling *PodAutoscaling `protobuf:"bytes,138,opt,name=pod_autoscaling,json=podAutoscaling,proto3" json:"pod_autoscaling,omitempty"` - // This checksum is computed by the server based on the value of cluster - // fields, and may be sent on update requests to ensure the client has an - // up-to-date value before proceeding. - Etag string `protobuf:"bytes,139,opt,name=etag,proto3" json:"etag,omitempty"` - // Fleet information for the cluster. - Fleet *Fleet `protobuf:"bytes,140,opt,name=fleet,proto3" json:"fleet,omitempty"` - // Enable/Disable Security Posture API features for the cluster. - SecurityPostureConfig *SecurityPostureConfig `protobuf:"bytes,145,opt,name=security_posture_config,json=securityPostureConfig,proto3" json:"security_posture_config,omitempty"` - // Configuration for all cluster's control plane endpoints. - ControlPlaneEndpointsConfig *ControlPlaneEndpointsConfig `protobuf:"bytes,146,opt,name=control_plane_endpoints_config,json=controlPlaneEndpointsConfig,proto3" json:"control_plane_endpoints_config,omitempty"` - // Beta APIs Config - EnableK8SBetaApis *K8SBetaAPIConfig `protobuf:"bytes,143,opt,name=enable_k8s_beta_apis,json=enableK8sBetaApis,proto3" json:"enable_k8s_beta_apis,omitempty"` - // GKE Enterprise Configuration. - // - // Deprecated: GKE Enterprise features are now available without an Enterprise - // tier. - // - // Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. - EnterpriseConfig *EnterpriseConfig `protobuf:"bytes,149,opt,name=enterprise_config,json=enterpriseConfig,proto3" json:"enterprise_config,omitempty"` - // Secret CSI driver configuration. - SecretManagerConfig *SecretManagerConfig `protobuf:"bytes,150,opt,name=secret_manager_config,json=secretManagerConfig,proto3" json:"secret_manager_config,omitempty"` - // Enable/Disable Compliance Posture features for the cluster. - CompliancePostureConfig *CompliancePostureConfig `protobuf:"bytes,151,opt,name=compliance_posture_config,json=compliancePostureConfig,proto3" json:"compliance_posture_config,omitempty"` - // Output only. Reserved for future use. - SatisfiesPzs *bool `protobuf:"varint,152,opt,name=satisfies_pzs,json=satisfiesPzs,proto3,oneof" json:"satisfies_pzs,omitempty"` - // Output only. Reserved for future use. - SatisfiesPzi *bool `protobuf:"varint,153,opt,name=satisfies_pzi,json=satisfiesPzi,proto3,oneof" json:"satisfies_pzi,omitempty"` - // The Custom keys configuration for the cluster. - UserManagedKeysConfig *UserManagedKeysConfig `protobuf:"bytes,154,opt,name=user_managed_keys_config,json=userManagedKeysConfig,proto3,oneof" json:"user_managed_keys_config,omitempty"` - // RBACBindingConfig allows user to restrict ClusterRoleBindings an - // RoleBindings that can be created. - RbacBindingConfig *RBACBindingConfig `protobuf:"bytes,156,opt,name=rbac_binding_config,json=rbacBindingConfig,proto3,oneof" json:"rbac_binding_config,omitempty"` - // Configuration for GKE auto upgrades. - GkeAutoUpgradeConfig *GkeAutoUpgradeConfig `protobuf:"bytes,163,opt,name=gke_auto_upgrade_config,json=gkeAutoUpgradeConfig,proto3" json:"gke_auto_upgrade_config,omitempty"` - // Configuration for limiting anonymous access to all endpoints except the - // health checks. - AnonymousAuthenticationConfig *AnonymousAuthenticationConfig `protobuf:"bytes,164,opt,name=anonymous_authentication_config,json=anonymousAuthenticationConfig,proto3" json:"anonymous_authentication_config,omitempty"` - // Configuration for Managed OpenTelemetry pipeline. - ManagedOpentelemetryConfig *ManagedOpenTelemetryConfig `protobuf:"bytes,168,opt,name=managed_opentelemetry_config,json=managedOpentelemetryConfig,proto3" json:"managed_opentelemetry_config,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *Cluster) Reset() { - *x = Cluster{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[53] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *Cluster) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Cluster) ProtoMessage() {} - -func (x *Cluster) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[53] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Cluster.ProtoReflect.Descriptor instead. -func (*Cluster) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{53} -} - -func (x *Cluster) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *Cluster) GetDescription() string { - if x != nil { - return x.Description - } - return "" -} - -// Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. -func (x *Cluster) GetInitialNodeCount() int32 { - if x != nil { - return x.InitialNodeCount - } - return 0 -} - -// Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. -func (x *Cluster) GetNodeConfig() *NodeConfig { - if x != nil { - return x.NodeConfig - } - return nil -} - -func (x *Cluster) GetMasterAuth() *MasterAuth { - if x != nil { - return x.MasterAuth - } - return nil -} - -func (x *Cluster) GetLoggingService() string { - if x != nil { - return x.LoggingService - } - return "" -} - -func (x *Cluster) GetMonitoringService() string { - if x != nil { - return x.MonitoringService - } - return "" -} - -func (x *Cluster) GetNetwork() string { - if x != nil { - return x.Network - } - return "" -} - -func (x *Cluster) GetClusterIpv4Cidr() string { - if x != nil { - return x.ClusterIpv4Cidr - } - return "" -} - -func (x *Cluster) GetAddonsConfig() *AddonsConfig { - if x != nil { - return x.AddonsConfig - } - return nil -} - -func (x *Cluster) GetSubnetwork() string { - if x != nil { - return x.Subnetwork - } - return "" -} - -func (x *Cluster) GetNodePools() []*NodePool { - if x != nil { - return x.NodePools - } - return nil -} - -func (x *Cluster) GetLocations() []string { - if x != nil { - return x.Locations - } - return nil -} - -func (x *Cluster) GetEnableKubernetesAlpha() bool { - if x != nil { - return x.EnableKubernetesAlpha - } - return false -} - -func (x *Cluster) GetAlphaClusterFeatureGates() []string { - if x != nil { - return x.AlphaClusterFeatureGates - } - return nil -} - -func (x *Cluster) GetResourceLabels() map[string]string { - if x != nil { - return x.ResourceLabels - } - return nil -} - -func (x *Cluster) GetLabelFingerprint() string { - if x != nil { - return x.LabelFingerprint - } - return "" -} - -func (x *Cluster) GetLegacyAbac() *LegacyAbac { - if x != nil { - return x.LegacyAbac - } - return nil -} - -func (x *Cluster) GetNetworkPolicy() *NetworkPolicy { - if x != nil { - return x.NetworkPolicy - } - return nil -} - -func (x *Cluster) GetIpAllocationPolicy() *IPAllocationPolicy { - if x != nil { - return x.IpAllocationPolicy - } - return nil -} - -// Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. -func (x *Cluster) GetMasterAuthorizedNetworksConfig() *MasterAuthorizedNetworksConfig { - if x != nil { - return x.MasterAuthorizedNetworksConfig - } - return nil -} - -func (x *Cluster) GetMaintenancePolicy() *MaintenancePolicy { - if x != nil { - return x.MaintenancePolicy - } - return nil -} - -func (x *Cluster) GetBinaryAuthorization() *BinaryAuthorization { - if x != nil { - return x.BinaryAuthorization - } - return nil -} - -func (x *Cluster) GetAutoscaling() *ClusterAutoscaling { - if x != nil { - return x.Autoscaling - } - return nil -} - -func (x *Cluster) GetNetworkConfig() *NetworkConfig { - if x != nil { - return x.NetworkConfig - } - return nil -} - -func (x *Cluster) GetDefaultMaxPodsConstraint() *MaxPodsConstraint { - if x != nil { - return x.DefaultMaxPodsConstraint - } - return nil -} - -func (x *Cluster) GetResourceUsageExportConfig() *ResourceUsageExportConfig { - if x != nil { - return x.ResourceUsageExportConfig - } - return nil -} - -func (x *Cluster) GetAuthenticatorGroupsConfig() *AuthenticatorGroupsConfig { - if x != nil { - return x.AuthenticatorGroupsConfig - } - return nil -} - -func (x *Cluster) GetPrivateClusterConfig() *PrivateClusterConfig { - if x != nil { - return x.PrivateClusterConfig - } - return nil -} - -func (x *Cluster) GetDatabaseEncryption() *DatabaseEncryption { - if x != nil { - return x.DatabaseEncryption - } - return nil -} - -func (x *Cluster) GetVerticalPodAutoscaling() *VerticalPodAutoscaling { - if x != nil { - return x.VerticalPodAutoscaling - } - return nil -} - -func (x *Cluster) GetShieldedNodes() *ShieldedNodes { - if x != nil { - return x.ShieldedNodes - } - return nil -} - -func (x *Cluster) GetReleaseChannel() *ReleaseChannel { - if x != nil { - return x.ReleaseChannel - } - return nil -} - -func (x *Cluster) GetWorkloadIdentityConfig() *WorkloadIdentityConfig { - if x != nil { - return x.WorkloadIdentityConfig - } - return nil -} - -func (x *Cluster) GetMeshCertificates() *MeshCertificates { - if x != nil { - return x.MeshCertificates - } - return nil -} - -func (x *Cluster) GetCostManagementConfig() *CostManagementConfig { - if x != nil { - return x.CostManagementConfig - } - return nil -} - -func (x *Cluster) GetNotificationConfig() *NotificationConfig { - if x != nil { - return x.NotificationConfig - } - return nil -} - -func (x *Cluster) GetConfidentialNodes() *ConfidentialNodes { - if x != nil { - return x.ConfidentialNodes - } - return nil -} - -func (x *Cluster) GetIdentityServiceConfig() *IdentityServiceConfig { - if x != nil { - return x.IdentityServiceConfig - } - return nil -} - -func (x *Cluster) GetSelfLink() string { - if x != nil { - return x.SelfLink - } - return "" -} - -// Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. -func (x *Cluster) GetZone() string { - if x != nil { - return x.Zone - } - return "" -} - -func (x *Cluster) GetEndpoint() string { - if x != nil { - return x.Endpoint - } - return "" -} - -func (x *Cluster) GetInitialClusterVersion() string { - if x != nil { - return x.InitialClusterVersion - } - return "" -} - -func (x *Cluster) GetCurrentMasterVersion() string { - if x != nil { - return x.CurrentMasterVersion - } - return "" -} - -// Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. -func (x *Cluster) GetCurrentNodeVersion() string { - if x != nil { - return x.CurrentNodeVersion - } - return "" -} - -func (x *Cluster) GetCreateTime() string { - if x != nil { - return x.CreateTime - } - return "" -} - -func (x *Cluster) GetStatus() Cluster_Status { - if x != nil { - return x.Status - } - return Cluster_STATUS_UNSPECIFIED -} - -// Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. -func (x *Cluster) GetStatusMessage() string { - if x != nil { - return x.StatusMessage - } - return "" -} - -func (x *Cluster) GetNodeIpv4CidrSize() int32 { - if x != nil { - return x.NodeIpv4CidrSize - } - return 0 -} - -func (x *Cluster) GetServicesIpv4Cidr() string { - if x != nil { - return x.ServicesIpv4Cidr - } - return "" -} - -// Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. -func (x *Cluster) GetInstanceGroupUrls() []string { - if x != nil { - return x.InstanceGroupUrls - } - return nil -} - -// Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. -func (x *Cluster) GetCurrentNodeCount() int32 { - if x != nil { - return x.CurrentNodeCount - } - return 0 -} - -func (x *Cluster) GetExpireTime() string { - if x != nil { - return x.ExpireTime - } - return "" -} - -func (x *Cluster) GetLocation() string { - if x != nil { - return x.Location - } - return "" -} - -// Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. -func (x *Cluster) GetEnableTpu() bool { - if x != nil { - return x.EnableTpu - } - return false -} - -// Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. -func (x *Cluster) GetTpuIpv4CidrBlock() string { - if x != nil { - return x.TpuIpv4CidrBlock - } - return "" -} - -func (x *Cluster) GetConditions() []*StatusCondition { - if x != nil { - return x.Conditions - } - return nil -} - -func (x *Cluster) GetAutopilot() *Autopilot { - if x != nil { - return x.Autopilot - } - return nil -} - -func (x *Cluster) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -func (x *Cluster) GetNodePoolDefaults() *NodePoolDefaults { - if x != nil { - return x.NodePoolDefaults - } - return nil -} - -func (x *Cluster) GetLoggingConfig() *LoggingConfig { - if x != nil { - return x.LoggingConfig - } - return nil -} - -func (x *Cluster) GetMonitoringConfig() *MonitoringConfig { - if x != nil { - return x.MonitoringConfig - } - return nil -} - -func (x *Cluster) GetNodePoolAutoConfig() *NodePoolAutoConfig { - if x != nil { - return x.NodePoolAutoConfig - } - return nil -} - -func (x *Cluster) GetPodAutoscaling() *PodAutoscaling { - if x != nil { - return x.PodAutoscaling - } - return nil -} - -func (x *Cluster) GetEtag() string { - if x != nil { - return x.Etag - } - return "" -} - -func (x *Cluster) GetFleet() *Fleet { - if x != nil { - return x.Fleet - } - return nil -} - -func (x *Cluster) GetSecurityPostureConfig() *SecurityPostureConfig { - if x != nil { - return x.SecurityPostureConfig - } - return nil -} - -func (x *Cluster) GetControlPlaneEndpointsConfig() *ControlPlaneEndpointsConfig { - if x != nil { - return x.ControlPlaneEndpointsConfig - } - return nil -} - -func (x *Cluster) GetEnableK8SBetaApis() *K8SBetaAPIConfig { - if x != nil { - return x.EnableK8SBetaApis - } - return nil -} - -// Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. -func (x *Cluster) GetEnterpriseConfig() *EnterpriseConfig { - if x != nil { - return x.EnterpriseConfig - } - return nil -} - -func (x *Cluster) GetSecretManagerConfig() *SecretManagerConfig { - if x != nil { - return x.SecretManagerConfig - } - return nil -} - -func (x *Cluster) GetCompliancePostureConfig() *CompliancePostureConfig { - if x != nil { - return x.CompliancePostureConfig - } - return nil -} - -func (x *Cluster) GetSatisfiesPzs() bool { - if x != nil && x.SatisfiesPzs != nil { - return *x.SatisfiesPzs - } - return false -} - -func (x *Cluster) GetSatisfiesPzi() bool { - if x != nil && x.SatisfiesPzi != nil { - return *x.SatisfiesPzi - } - return false -} - -func (x *Cluster) GetUserManagedKeysConfig() *UserManagedKeysConfig { - if x != nil { - return x.UserManagedKeysConfig - } - return nil -} - -func (x *Cluster) GetRbacBindingConfig() *RBACBindingConfig { - if x != nil { - return x.RbacBindingConfig - } - return nil -} - -func (x *Cluster) GetGkeAutoUpgradeConfig() *GkeAutoUpgradeConfig { - if x != nil { - return x.GkeAutoUpgradeConfig - } - return nil -} - -func (x *Cluster) GetAnonymousAuthenticationConfig() *AnonymousAuthenticationConfig { - if x != nil { - return x.AnonymousAuthenticationConfig - } - return nil -} - -func (x *Cluster) GetManagedOpentelemetryConfig() *ManagedOpenTelemetryConfig { - if x != nil { - return x.ManagedOpentelemetryConfig - } - return nil -} - -// RBACBindingConfig allows user to restrict ClusterRoleBindings an RoleBindings -// that can be created. -type RBACBindingConfig struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Setting this to true will allow any ClusterRoleBinding and RoleBinding - // with subjets system:anonymous or system:unauthenticated. - EnableInsecureBindingSystemUnauthenticated *bool `protobuf:"varint,1,opt,name=enable_insecure_binding_system_unauthenticated,json=enableInsecureBindingSystemUnauthenticated,proto3,oneof" json:"enable_insecure_binding_system_unauthenticated,omitempty"` - // Setting this to true will allow any ClusterRoleBinding and RoleBinding - // with subjects system:authenticated. - EnableInsecureBindingSystemAuthenticated *bool `protobuf:"varint,2,opt,name=enable_insecure_binding_system_authenticated,json=enableInsecureBindingSystemAuthenticated,proto3,oneof" json:"enable_insecure_binding_system_authenticated,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *RBACBindingConfig) Reset() { - *x = RBACBindingConfig{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[54] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *RBACBindingConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RBACBindingConfig) ProtoMessage() {} - -func (x *RBACBindingConfig) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[54] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RBACBindingConfig.ProtoReflect.Descriptor instead. -func (*RBACBindingConfig) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{54} -} - -func (x *RBACBindingConfig) GetEnableInsecureBindingSystemUnauthenticated() bool { - if x != nil && x.EnableInsecureBindingSystemUnauthenticated != nil { - return *x.EnableInsecureBindingSystemUnauthenticated - } - return false -} - -func (x *RBACBindingConfig) GetEnableInsecureBindingSystemAuthenticated() bool { - if x != nil && x.EnableInsecureBindingSystemAuthenticated != nil { - return *x.EnableInsecureBindingSystemAuthenticated - } - return false -} - -// UserManagedKeysConfig holds the resource address to Keys which are used -// for signing certs and token that are used for communication within cluster. -type UserManagedKeysConfig struct { - state protoimpl.MessageState `protogen:"open.v1"` - // The Certificate Authority Service caPool to use for the cluster CA in this - // cluster. - ClusterCa string `protobuf:"bytes,10,opt,name=cluster_ca,json=clusterCa,proto3" json:"cluster_ca,omitempty"` - // Resource path of the Certificate Authority Service caPool to use for the - // etcd API CA in this cluster. - EtcdApiCa string `protobuf:"bytes,11,opt,name=etcd_api_ca,json=etcdApiCa,proto3" json:"etcd_api_ca,omitempty"` - // Resource path of the Certificate Authority Service caPool to use for the - // etcd peer CA in this cluster. - EtcdPeerCa string `protobuf:"bytes,12,opt,name=etcd_peer_ca,json=etcdPeerCa,proto3" json:"etcd_peer_ca,omitempty"` - // The Cloud KMS cryptoKeyVersions to use for signing service account JWTs - // issued by this cluster. - // - // Format: - // `projects/{project}/locations/{location}/keyRings/{keyring}/cryptoKeys/{cryptoKey}/cryptoKeyVersions/{cryptoKeyVersion}` - ServiceAccountSigningKeys []string `protobuf:"bytes,13,rep,name=service_account_signing_keys,json=serviceAccountSigningKeys,proto3" json:"service_account_signing_keys,omitempty"` - // The Cloud KMS cryptoKeyVersions to use for verifying service account JWTs - // issued by this cluster. - // - // Format: - // `projects/{project}/locations/{location}/keyRings/{keyring}/cryptoKeys/{cryptoKey}/cryptoKeyVersions/{cryptoKeyVersion}` - ServiceAccountVerificationKeys []string `protobuf:"bytes,14,rep,name=service_account_verification_keys,json=serviceAccountVerificationKeys,proto3" json:"service_account_verification_keys,omitempty"` - // The Certificate Authority Service caPool to use for the aggregation CA in - // this cluster. - AggregationCa string `protobuf:"bytes,15,opt,name=aggregation_ca,json=aggregationCa,proto3" json:"aggregation_ca,omitempty"` - // The Cloud KMS cryptoKey to use for Confidential Hyperdisk on the control - // plane nodes. - ControlPlaneDiskEncryptionKey string `protobuf:"bytes,16,opt,name=control_plane_disk_encryption_key,json=controlPlaneDiskEncryptionKey,proto3" json:"control_plane_disk_encryption_key,omitempty"` - // Output only. All of the versions of the Cloud KMS cryptoKey that are used - // by Confidential Hyperdisks on the control plane nodes. - ControlPlaneDiskEncryptionKeyVersions []string `protobuf:"bytes,18,rep,name=control_plane_disk_encryption_key_versions,json=controlPlaneDiskEncryptionKeyVersions,proto3" json:"control_plane_disk_encryption_key_versions,omitempty"` - // Resource path of the Cloud KMS cryptoKey to use for encryption of internal - // etcd backups. - GkeopsEtcdBackupEncryptionKey string `protobuf:"bytes,17,opt,name=gkeops_etcd_backup_encryption_key,json=gkeopsEtcdBackupEncryptionKey,proto3" json:"gkeops_etcd_backup_encryption_key,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *UserManagedKeysConfig) Reset() { - *x = UserManagedKeysConfig{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[55] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *UserManagedKeysConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UserManagedKeysConfig) ProtoMessage() {} - -func (x *UserManagedKeysConfig) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[55] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use UserManagedKeysConfig.ProtoReflect.Descriptor instead. -func (*UserManagedKeysConfig) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{55} -} - -func (x *UserManagedKeysConfig) GetClusterCa() string { - if x != nil { - return x.ClusterCa - } - return "" -} - -func (x *UserManagedKeysConfig) GetEtcdApiCa() string { - if x != nil { - return x.EtcdApiCa - } - return "" -} - -func (x *UserManagedKeysConfig) GetEtcdPeerCa() string { - if x != nil { - return x.EtcdPeerCa - } - return "" -} - -func (x *UserManagedKeysConfig) GetServiceAccountSigningKeys() []string { - if x != nil { - return x.ServiceAccountSigningKeys - } - return nil -} - -func (x *UserManagedKeysConfig) GetServiceAccountVerificationKeys() []string { - if x != nil { - return x.ServiceAccountVerificationKeys - } - return nil -} - -func (x *UserManagedKeysConfig) GetAggregationCa() string { - if x != nil { - return x.AggregationCa - } - return "" -} - -func (x *UserManagedKeysConfig) GetControlPlaneDiskEncryptionKey() string { - if x != nil { - return x.ControlPlaneDiskEncryptionKey - } - return "" -} - -func (x *UserManagedKeysConfig) GetControlPlaneDiskEncryptionKeyVersions() []string { - if x != nil { - return x.ControlPlaneDiskEncryptionKeyVersions - } - return nil -} - -func (x *UserManagedKeysConfig) GetGkeopsEtcdBackupEncryptionKey() string { - if x != nil { - return x.GkeopsEtcdBackupEncryptionKey - } - return "" -} - -// AnonymousAuthenticationConfig defines the settings needed to limit endpoints -// that allow anonymous authentication. -type AnonymousAuthenticationConfig struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Defines the mode of limiting anonymous access in the cluster. - Mode AnonymousAuthenticationConfig_Mode `protobuf:"varint,1,opt,name=mode,proto3,enum=google.container.v1.AnonymousAuthenticationConfig_Mode" json:"mode,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *AnonymousAuthenticationConfig) Reset() { - *x = AnonymousAuthenticationConfig{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[56] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *AnonymousAuthenticationConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*AnonymousAuthenticationConfig) ProtoMessage() {} - -func (x *AnonymousAuthenticationConfig) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[56] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use AnonymousAuthenticationConfig.ProtoReflect.Descriptor instead. -func (*AnonymousAuthenticationConfig) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{56} -} - -func (x *AnonymousAuthenticationConfig) GetMode() AnonymousAuthenticationConfig_Mode { - if x != nil { - return x.Mode - } - return AnonymousAuthenticationConfig_MODE_UNSPECIFIED -} - -// CompliancePostureConfig defines the settings needed to enable/disable -// features for the Compliance Posture. -type CompliancePostureConfig struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Defines the enablement mode for Compliance Posture. - Mode *CompliancePostureConfig_Mode `protobuf:"varint,1,opt,name=mode,proto3,enum=google.container.v1.CompliancePostureConfig_Mode,oneof" json:"mode,omitempty"` - // List of enabled compliance standards. - ComplianceStandards []*CompliancePostureConfig_ComplianceStandard `protobuf:"bytes,2,rep,name=compliance_standards,json=complianceStandards,proto3" json:"compliance_standards,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *CompliancePostureConfig) Reset() { - *x = CompliancePostureConfig{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[57] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *CompliancePostureConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CompliancePostureConfig) ProtoMessage() {} - -func (x *CompliancePostureConfig) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[57] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CompliancePostureConfig.ProtoReflect.Descriptor instead. -func (*CompliancePostureConfig) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{57} -} - -func (x *CompliancePostureConfig) GetMode() CompliancePostureConfig_Mode { - if x != nil && x.Mode != nil { - return *x.Mode - } - return CompliancePostureConfig_MODE_UNSPECIFIED -} - -func (x *CompliancePostureConfig) GetComplianceStandards() []*CompliancePostureConfig_ComplianceStandard { - if x != nil { - return x.ComplianceStandards - } - return nil -} - -// K8sBetaAPIConfig , configuration for beta APIs -type K8SBetaAPIConfig struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Enabled k8s beta APIs. - EnabledApis []string `protobuf:"bytes,1,rep,name=enabled_apis,json=enabledApis,proto3" json:"enabled_apis,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *K8SBetaAPIConfig) Reset() { - *x = K8SBetaAPIConfig{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[58] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *K8SBetaAPIConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*K8SBetaAPIConfig) ProtoMessage() {} - -func (x *K8SBetaAPIConfig) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[58] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use K8SBetaAPIConfig.ProtoReflect.Descriptor instead. -func (*K8SBetaAPIConfig) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{58} -} - -func (x *K8SBetaAPIConfig) GetEnabledApis() []string { - if x != nil { - return x.EnabledApis - } - return nil -} - -// SecurityPostureConfig defines the flags needed to enable/disable features for -// the Security Posture API. -type SecurityPostureConfig struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Sets which mode to use for Security Posture features. - Mode *SecurityPostureConfig_Mode `protobuf:"varint,1,opt,name=mode,proto3,enum=google.container.v1.SecurityPostureConfig_Mode,oneof" json:"mode,omitempty"` - // Sets which mode to use for vulnerability scanning. - VulnerabilityMode *SecurityPostureConfig_VulnerabilityMode `protobuf:"varint,2,opt,name=vulnerability_mode,json=vulnerabilityMode,proto3,enum=google.container.v1.SecurityPostureConfig_VulnerabilityMode,oneof" json:"vulnerability_mode,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *SecurityPostureConfig) Reset() { - *x = SecurityPostureConfig{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[59] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *SecurityPostureConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SecurityPostureConfig) ProtoMessage() {} - -func (x *SecurityPostureConfig) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[59] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SecurityPostureConfig.ProtoReflect.Descriptor instead. -func (*SecurityPostureConfig) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{59} -} - -func (x *SecurityPostureConfig) GetMode() SecurityPostureConfig_Mode { - if x != nil && x.Mode != nil { - return *x.Mode - } - return SecurityPostureConfig_MODE_UNSPECIFIED -} - -func (x *SecurityPostureConfig) GetVulnerabilityMode() SecurityPostureConfig_VulnerabilityMode { - if x != nil && x.VulnerabilityMode != nil { - return *x.VulnerabilityMode - } - return SecurityPostureConfig_VULNERABILITY_MODE_UNSPECIFIED -} - -// Node pool configs that apply to all auto-provisioned node pools -// in autopilot clusters and node auto-provisioning enabled clusters. -type NodePoolAutoConfig struct { - state protoimpl.MessageState `protogen:"open.v1"` - // The list of instance tags applied to all nodes. Tags are used to identify - // valid sources or targets for network firewalls and are specified by - // the client during cluster creation. Each tag within the list - // must comply with RFC1035. - NetworkTags *NetworkTags `protobuf:"bytes,1,opt,name=network_tags,json=networkTags,proto3" json:"network_tags,omitempty"` - // Resource manager tag keys and values to be attached to the nodes - // for managing Compute Engine firewalls using Network Firewall Policies. - ResourceManagerTags *ResourceManagerTags `protobuf:"bytes,2,opt,name=resource_manager_tags,json=resourceManagerTags,proto3" json:"resource_manager_tags,omitempty"` - // NodeKubeletConfig controls the defaults for autoprovisioned node-pools. - // - // Currently only `insecure_kubelet_readonly_port_enabled` can be set here. - NodeKubeletConfig *NodeKubeletConfig `protobuf:"bytes,3,opt,name=node_kubelet_config,json=nodeKubeletConfig,proto3" json:"node_kubelet_config,omitempty"` - // Output only. Configuration options for Linux nodes. - LinuxNodeConfig *LinuxNodeConfig `protobuf:"bytes,4,opt,name=linux_node_config,json=linuxNodeConfig,proto3" json:"linux_node_config,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *NodePoolAutoConfig) Reset() { - *x = NodePoolAutoConfig{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[60] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *NodePoolAutoConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*NodePoolAutoConfig) ProtoMessage() {} - -func (x *NodePoolAutoConfig) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[60] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use NodePoolAutoConfig.ProtoReflect.Descriptor instead. -func (*NodePoolAutoConfig) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{60} -} - -func (x *NodePoolAutoConfig) GetNetworkTags() *NetworkTags { - if x != nil { - return x.NetworkTags - } - return nil -} - -func (x *NodePoolAutoConfig) GetResourceManagerTags() *ResourceManagerTags { - if x != nil { - return x.ResourceManagerTags - } - return nil -} - -func (x *NodePoolAutoConfig) GetNodeKubeletConfig() *NodeKubeletConfig { - if x != nil { - return x.NodeKubeletConfig - } - return nil -} - -func (x *NodePoolAutoConfig) GetLinuxNodeConfig() *LinuxNodeConfig { - if x != nil { - return x.LinuxNodeConfig - } - return nil -} - -// Subset of Nodepool message that has defaults. -type NodePoolDefaults struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Subset of NodeConfig message that has defaults. - NodeConfigDefaults *NodeConfigDefaults `protobuf:"bytes,1,opt,name=node_config_defaults,json=nodeConfigDefaults,proto3" json:"node_config_defaults,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *NodePoolDefaults) Reset() { - *x = NodePoolDefaults{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[61] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *NodePoolDefaults) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*NodePoolDefaults) ProtoMessage() {} - -func (x *NodePoolDefaults) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[61] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use NodePoolDefaults.ProtoReflect.Descriptor instead. -func (*NodePoolDefaults) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{61} -} - -func (x *NodePoolDefaults) GetNodeConfigDefaults() *NodeConfigDefaults { - if x != nil { - return x.NodeConfigDefaults - } - return nil -} - -// Subset of NodeConfig message that has defaults. -type NodeConfigDefaults struct { - state protoimpl.MessageState `protogen:"open.v1"` - // GCFS (Google Container File System, also known as Riptide) options. - GcfsConfig *GcfsConfig `protobuf:"bytes,1,opt,name=gcfs_config,json=gcfsConfig,proto3" json:"gcfs_config,omitempty"` - // Logging configuration for node pools. - LoggingConfig *NodePoolLoggingConfig `protobuf:"bytes,3,opt,name=logging_config,json=loggingConfig,proto3" json:"logging_config,omitempty"` - // Parameters for containerd customization. - ContainerdConfig *ContainerdConfig `protobuf:"bytes,4,opt,name=containerd_config,json=containerdConfig,proto3" json:"containerd_config,omitempty"` - // NodeKubeletConfig controls the defaults for new node-pools. - // - // Currently only `insecure_kubelet_readonly_port_enabled` can be set here. - NodeKubeletConfig *NodeKubeletConfig `protobuf:"bytes,6,opt,name=node_kubelet_config,json=nodeKubeletConfig,proto3" json:"node_kubelet_config,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *NodeConfigDefaults) Reset() { - *x = NodeConfigDefaults{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[62] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *NodeConfigDefaults) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*NodeConfigDefaults) ProtoMessage() {} - -func (x *NodeConfigDefaults) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[62] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use NodeConfigDefaults.ProtoReflect.Descriptor instead. -func (*NodeConfigDefaults) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{62} -} - -func (x *NodeConfigDefaults) GetGcfsConfig() *GcfsConfig { - if x != nil { - return x.GcfsConfig - } - return nil -} - -func (x *NodeConfigDefaults) GetLoggingConfig() *NodePoolLoggingConfig { - if x != nil { - return x.LoggingConfig - } - return nil -} - -func (x *NodeConfigDefaults) GetContainerdConfig() *ContainerdConfig { - if x != nil { - return x.ContainerdConfig - } - return nil -} - -func (x *NodeConfigDefaults) GetNodeKubeletConfig() *NodeKubeletConfig { - if x != nil { - return x.NodeKubeletConfig - } - return nil -} - -// ClusterUpdate describes an update to the cluster. Exactly one update can -// be applied to a cluster with each request, so at most one field can be -// provided. -type ClusterUpdate struct { - state protoimpl.MessageState `protogen:"open.v1"` - // The Kubernetes version to change the nodes to (typically an - // upgrade). - // - // Users may specify either explicit versions offered by - // Kubernetes Engine or version aliases, which have the following behavior: - // - // - "latest": picks the highest valid Kubernetes version - // - "1.X": picks the highest valid patch+gke.N patch in the 1.X version - // - "1.X.Y": picks the highest valid gke.N patch in the 1.X.Y version - // - "1.X.Y-gke.N": picks an explicit Kubernetes version - // - "-": picks the Kubernetes master version - DesiredNodeVersion string `protobuf:"bytes,4,opt,name=desired_node_version,json=desiredNodeVersion,proto3" json:"desired_node_version,omitempty"` - // The monitoring service the cluster should use to write metrics. - // Currently available options: - // - // * `monitoring.googleapis.com/kubernetes` - The Cloud Monitoring - // service with a Kubernetes-native resource model - // - `monitoring.googleapis.com` - The legacy Cloud Monitoring service (no - // longer available as of GKE 1.15). - // - `none` - No metrics will be exported from the cluster. - // - // If left as an empty string,`monitoring.googleapis.com/kubernetes` will be - // used for GKE 1.14+ or `monitoring.googleapis.com` for earlier versions. - DesiredMonitoringService string `protobuf:"bytes,5,opt,name=desired_monitoring_service,json=desiredMonitoringService,proto3" json:"desired_monitoring_service,omitempty"` - // Configurations for the various addons available to run in the cluster. - DesiredAddonsConfig *AddonsConfig `protobuf:"bytes,6,opt,name=desired_addons_config,json=desiredAddonsConfig,proto3" json:"desired_addons_config,omitempty"` - // The node pool to be upgraded. This field is mandatory if - // "desired_node_version", "desired_image_family" or - // "desired_node_pool_autoscaling" is specified and there is more than one - // node pool on the cluster. - DesiredNodePoolId string `protobuf:"bytes,7,opt,name=desired_node_pool_id,json=desiredNodePoolId,proto3" json:"desired_node_pool_id,omitempty"` - // The desired image type for the node pool. - // NOTE: Set the "desired_node_pool" field as well. - DesiredImageType string `protobuf:"bytes,8,opt,name=desired_image_type,json=desiredImageType,proto3" json:"desired_image_type,omitempty"` - // Configuration of etcd encryption. - DesiredDatabaseEncryption *DatabaseEncryption `protobuf:"bytes,46,opt,name=desired_database_encryption,json=desiredDatabaseEncryption,proto3" json:"desired_database_encryption,omitempty"` - // Configuration for Workload Identity. - DesiredWorkloadIdentityConfig *WorkloadIdentityConfig `protobuf:"bytes,47,opt,name=desired_workload_identity_config,json=desiredWorkloadIdentityConfig,proto3" json:"desired_workload_identity_config,omitempty"` - // Configuration for issuance of mTLS keys and certificates to Kubernetes - // pods. - DesiredMeshCertificates *MeshCertificates `protobuf:"bytes,67,opt,name=desired_mesh_certificates,json=desiredMeshCertificates,proto3" json:"desired_mesh_certificates,omitempty"` - // Configuration for Shielded Nodes. - DesiredShieldedNodes *ShieldedNodes `protobuf:"bytes,48,opt,name=desired_shielded_nodes,json=desiredShieldedNodes,proto3" json:"desired_shielded_nodes,omitempty"` - // The desired configuration for the fine-grained cost management feature. - DesiredCostManagementConfig *CostManagementConfig `protobuf:"bytes,49,opt,name=desired_cost_management_config,json=desiredCostManagementConfig,proto3" json:"desired_cost_management_config,omitempty"` - // DNSConfig contains clusterDNS config for this cluster. - DesiredDnsConfig *DNSConfig `protobuf:"bytes,53,opt,name=desired_dns_config,json=desiredDnsConfig,proto3" json:"desired_dns_config,omitempty"` - // Autoscaler configuration for the node pool specified in - // desired_node_pool_id. If there is only one pool in the - // cluster and desired_node_pool_id is not provided then - // the change applies to that single node pool. - DesiredNodePoolAutoscaling *NodePoolAutoscaling `protobuf:"bytes,9,opt,name=desired_node_pool_autoscaling,json=desiredNodePoolAutoscaling,proto3" json:"desired_node_pool_autoscaling,omitempty"` - // The desired list of Google Compute Engine - // [zones](https://cloud.google.com/compute/docs/zones#available) - // in which the cluster's nodes should be located. - // - // This list must always include the cluster's primary zone. - // - // Warning: changing cluster locations will update the locations of all node - // pools and will result in nodes being added and/or removed. - DesiredLocations []string `protobuf:"bytes,10,rep,name=desired_locations,json=desiredLocations,proto3" json:"desired_locations,omitempty"` - // The desired configuration options for master authorized networks feature. - // - // Deprecated: Use - // desired_control_plane_endpoints_config.ip_endpoints_config.authorized_networks_config - // instead. - // - // Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. - DesiredMasterAuthorizedNetworksConfig *MasterAuthorizedNetworksConfig `protobuf:"bytes,12,opt,name=desired_master_authorized_networks_config,json=desiredMasterAuthorizedNetworksConfig,proto3" json:"desired_master_authorized_networks_config,omitempty"` - // Cluster-level autoscaling configuration. - DesiredClusterAutoscaling *ClusterAutoscaling `protobuf:"bytes,15,opt,name=desired_cluster_autoscaling,json=desiredClusterAutoscaling,proto3" json:"desired_cluster_autoscaling,omitempty"` - // The desired configuration options for the Binary Authorization feature. - DesiredBinaryAuthorization *BinaryAuthorization `protobuf:"bytes,16,opt,name=desired_binary_authorization,json=desiredBinaryAuthorization,proto3" json:"desired_binary_authorization,omitempty"` - // The logging service the cluster should use to write logs. - // Currently available options: - // - // * `logging.googleapis.com/kubernetes` - The Cloud Logging - // service with a Kubernetes-native resource model - // - `logging.googleapis.com` - The legacy Cloud Logging service (no longer - // available as of GKE 1.15). - // - `none` - no logs will be exported from the cluster. - // - // If left as an empty string,`logging.googleapis.com/kubernetes` will be - // used for GKE 1.14+ or `logging.googleapis.com` for earlier versions. - DesiredLoggingService string `protobuf:"bytes,19,opt,name=desired_logging_service,json=desiredLoggingService,proto3" json:"desired_logging_service,omitempty"` - // The desired configuration for exporting resource usage. - DesiredResourceUsageExportConfig *ResourceUsageExportConfig `protobuf:"bytes,21,opt,name=desired_resource_usage_export_config,json=desiredResourceUsageExportConfig,proto3" json:"desired_resource_usage_export_config,omitempty"` - // Cluster-level Vertical Pod Autoscaling configuration. - DesiredVerticalPodAutoscaling *VerticalPodAutoscaling `protobuf:"bytes,22,opt,name=desired_vertical_pod_autoscaling,json=desiredVerticalPodAutoscaling,proto3" json:"desired_vertical_pod_autoscaling,omitempty"` - // The desired private cluster configuration. master_global_access_config is - // the only field that can be changed via this field. - // See also - // [ClusterUpdate.desired_enable_private_endpoint][google.container.v1.ClusterUpdate.desired_enable_private_endpoint] - // for modifying other fields within - // [PrivateClusterConfig][google.container.v1.PrivateClusterConfig]. - // - // Deprecated: Use - // desired_control_plane_endpoints_config.ip_endpoints_config.global_access - // instead. - // - // Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. - DesiredPrivateClusterConfig *PrivateClusterConfig `protobuf:"bytes,25,opt,name=desired_private_cluster_config,json=desiredPrivateClusterConfig,proto3" json:"desired_private_cluster_config,omitempty"` - // The desired config of Intra-node visibility. - DesiredIntraNodeVisibilityConfig *IntraNodeVisibilityConfig `protobuf:"bytes,26,opt,name=desired_intra_node_visibility_config,json=desiredIntraNodeVisibilityConfig,proto3" json:"desired_intra_node_visibility_config,omitempty"` - // The desired status of whether to disable default sNAT for this cluster. - DesiredDefaultSnatStatus *DefaultSnatStatus `protobuf:"bytes,28,opt,name=desired_default_snat_status,json=desiredDefaultSnatStatus,proto3" json:"desired_default_snat_status,omitempty"` - // The desired release channel configuration. - DesiredReleaseChannel *ReleaseChannel `protobuf:"bytes,31,opt,name=desired_release_channel,json=desiredReleaseChannel,proto3" json:"desired_release_channel,omitempty"` - // The desired L4 Internal Load Balancer Subsetting configuration. - DesiredL4IlbSubsettingConfig *ILBSubsettingConfig `protobuf:"bytes,39,opt,name=desired_l4ilb_subsetting_config,json=desiredL4ilbSubsettingConfig,proto3" json:"desired_l4ilb_subsetting_config,omitempty"` - // The desired datapath provider for the cluster. - DesiredDatapathProvider DatapathProvider `protobuf:"varint,50,opt,name=desired_datapath_provider,json=desiredDatapathProvider,proto3,enum=google.container.v1.DatapathProvider" json:"desired_datapath_provider,omitempty"` - // The desired state of IPv6 connectivity to Google Services. - DesiredPrivateIpv6GoogleAccess PrivateIPv6GoogleAccess `protobuf:"varint,51,opt,name=desired_private_ipv6_google_access,json=desiredPrivateIpv6GoogleAccess,proto3,enum=google.container.v1.PrivateIPv6GoogleAccess" json:"desired_private_ipv6_google_access,omitempty"` - // The desired notification configuration. - DesiredNotificationConfig *NotificationConfig `protobuf:"bytes,55,opt,name=desired_notification_config,json=desiredNotificationConfig,proto3" json:"desired_notification_config,omitempty"` - // The desired authenticator groups config for the cluster. - DesiredAuthenticatorGroupsConfig *AuthenticatorGroupsConfig `protobuf:"bytes,63,opt,name=desired_authenticator_groups_config,json=desiredAuthenticatorGroupsConfig,proto3" json:"desired_authenticator_groups_config,omitempty"` - // The desired logging configuration. - DesiredLoggingConfig *LoggingConfig `protobuf:"bytes,64,opt,name=desired_logging_config,json=desiredLoggingConfig,proto3" json:"desired_logging_config,omitempty"` - // The desired monitoring configuration. - DesiredMonitoringConfig *MonitoringConfig `protobuf:"bytes,65,opt,name=desired_monitoring_config,json=desiredMonitoringConfig,proto3" json:"desired_monitoring_config,omitempty"` - // The desired Identity Service component configuration. - DesiredIdentityServiceConfig *IdentityServiceConfig `protobuf:"bytes,66,opt,name=desired_identity_service_config,json=desiredIdentityServiceConfig,proto3" json:"desired_identity_service_config,omitempty"` - // ServiceExternalIPsConfig specifies the config for the use of Services with - // ExternalIPs field. - DesiredServiceExternalIpsConfig *ServiceExternalIPsConfig `protobuf:"bytes,60,opt,name=desired_service_external_ips_config,json=desiredServiceExternalIpsConfig,proto3" json:"desired_service_external_ips_config,omitempty"` - // Enable/Disable private endpoint for the cluster's master. - // - // Deprecated: Use - // desired_control_plane_endpoints_config.ip_endpoints_config.enable_public_endpoint - // instead. Note that the value of enable_public_endpoint is reversed: if - // enable_private_endpoint is false, then enable_public_endpoint will be true. - // - // Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. - DesiredEnablePrivateEndpoint *bool `protobuf:"varint,71,opt,name=desired_enable_private_endpoint,json=desiredEnablePrivateEndpoint,proto3,oneof" json:"desired_enable_private_endpoint,omitempty"` - // Override the default setting of whether future created - // nodes have private IP addresses only, namely - // [NetworkConfig.default_enable_private_nodes][google.container.v1.NetworkConfig.default_enable_private_nodes] - DesiredDefaultEnablePrivateNodes *bool `protobuf:"varint,72,opt,name=desired_default_enable_private_nodes,json=desiredDefaultEnablePrivateNodes,proto3,oneof" json:"desired_default_enable_private_nodes,omitempty"` - // [Control plane - // endpoints][google.container.v1.Cluster.control_plane_endpoints_config] - // configuration. - DesiredControlPlaneEndpointsConfig *ControlPlaneEndpointsConfig `protobuf:"bytes,73,opt,name=desired_control_plane_endpoints_config,json=desiredControlPlaneEndpointsConfig,proto3" json:"desired_control_plane_endpoints_config,omitempty"` - // The Kubernetes version to change the master to. - // - // Users may specify either explicit versions offered by - // Kubernetes Engine or version aliases, which have the following behavior: - // - // - "latest": picks the highest valid Kubernetes version - // - "1.X": picks the highest valid patch+gke.N patch in the 1.X version - // - "1.X.Y": picks the highest valid gke.N patch in the 1.X.Y version - // - "1.X.Y-gke.N": picks an explicit Kubernetes version - // - "-": picks the default Kubernetes version - DesiredMasterVersion string `protobuf:"bytes,100,opt,name=desired_master_version,json=desiredMasterVersion,proto3" json:"desired_master_version,omitempty"` - // The desired GCFS config for the cluster - DesiredGcfsConfig *GcfsConfig `protobuf:"bytes,109,opt,name=desired_gcfs_config,json=desiredGcfsConfig,proto3" json:"desired_gcfs_config,omitempty"` - // The desired network tags that apply to all auto-provisioned node pools - // in autopilot clusters and node auto-provisioning enabled clusters. - DesiredNodePoolAutoConfigNetworkTags *NetworkTags `protobuf:"bytes,110,opt,name=desired_node_pool_auto_config_network_tags,json=desiredNodePoolAutoConfigNetworkTags,proto3" json:"desired_node_pool_auto_config_network_tags,omitempty"` - // The desired config for pod autoscaling. - DesiredPodAutoscaling *PodAutoscaling `protobuf:"bytes,113,opt,name=desired_pod_autoscaling,json=desiredPodAutoscaling,proto3" json:"desired_pod_autoscaling,omitempty"` - // The desired config of Gateway API on this cluster. - DesiredGatewayApiConfig *GatewayAPIConfig `protobuf:"bytes,114,opt,name=desired_gateway_api_config,json=desiredGatewayApiConfig,proto3" json:"desired_gateway_api_config,omitempty"` - // The current etag of the cluster. - // If an etag is provided and does not match the current etag of the cluster, - // update will be blocked and an ABORTED error will be returned. - Etag string `protobuf:"bytes,115,opt,name=etag,proto3" json:"etag,omitempty"` - // The desired node pool logging configuration defaults for the cluster. - DesiredNodePoolLoggingConfig *NodePoolLoggingConfig `protobuf:"bytes,116,opt,name=desired_node_pool_logging_config,json=desiredNodePoolLoggingConfig,proto3" json:"desired_node_pool_logging_config,omitempty"` - // The desired fleet configuration for the cluster. - DesiredFleet *Fleet `protobuf:"bytes,117,opt,name=desired_fleet,json=desiredFleet,proto3" json:"desired_fleet,omitempty"` - // The desired stack type of the cluster. - // If a stack type is provided and does not match the current stack type of - // the cluster, update will attempt to change the stack type to the new type. - DesiredStackType StackType `protobuf:"varint,119,opt,name=desired_stack_type,json=desiredStackType,proto3,enum=google.container.v1.StackType" json:"desired_stack_type,omitempty"` - // The additional pod ranges to be added to the cluster. These pod ranges - // can be used by node pools to allocate pod IPs. - AdditionalPodRangesConfig *AdditionalPodRangesConfig `protobuf:"bytes,120,opt,name=additional_pod_ranges_config,json=additionalPodRangesConfig,proto3" json:"additional_pod_ranges_config,omitempty"` - // The additional pod ranges that are to be removed from the cluster. - // The pod ranges specified here must have been specified earlier in the - // 'additional_pod_ranges_config' argument. - RemovedAdditionalPodRangesConfig *AdditionalPodRangesConfig `protobuf:"bytes,121,opt,name=removed_additional_pod_ranges_config,json=removedAdditionalPodRangesConfig,proto3" json:"removed_additional_pod_ranges_config,omitempty"` - // Kubernetes open source beta apis enabled on the cluster. Only beta apis - EnableK8SBetaApis *K8SBetaAPIConfig `protobuf:"bytes,122,opt,name=enable_k8s_beta_apis,json=enableK8sBetaApis,proto3" json:"enable_k8s_beta_apis,omitempty"` - // Enable/Disable Security Posture API features for the cluster. - DesiredSecurityPostureConfig *SecurityPostureConfig `protobuf:"bytes,124,opt,name=desired_security_posture_config,json=desiredSecurityPostureConfig,proto3" json:"desired_security_posture_config,omitempty"` - // The desired network performance config. - DesiredNetworkPerformanceConfig *NetworkConfig_ClusterNetworkPerformanceConfig `protobuf:"bytes,125,opt,name=desired_network_performance_config,json=desiredNetworkPerformanceConfig,proto3" json:"desired_network_performance_config,omitempty"` - // Enable/Disable FQDN Network Policy for the cluster. - DesiredEnableFqdnNetworkPolicy *bool `protobuf:"varint,126,opt,name=desired_enable_fqdn_network_policy,json=desiredEnableFqdnNetworkPolicy,proto3,oneof" json:"desired_enable_fqdn_network_policy,omitempty"` - // WorkloadPolicyConfig is the configuration related to GCW workload policy - DesiredAutopilotWorkloadPolicyConfig *WorkloadPolicyConfig `protobuf:"bytes,128,opt,name=desired_autopilot_workload_policy_config,json=desiredAutopilotWorkloadPolicyConfig,proto3" json:"desired_autopilot_workload_policy_config,omitempty"` - // Desired Beta APIs to be enabled for cluster. - DesiredK8SBetaApis *K8SBetaAPIConfig `protobuf:"bytes,131,opt,name=desired_k8s_beta_apis,json=desiredK8sBetaApis,proto3" json:"desired_k8s_beta_apis,omitempty"` - // The desired containerd config for the cluster. - DesiredContainerdConfig *ContainerdConfig `protobuf:"bytes,134,opt,name=desired_containerd_config,json=desiredContainerdConfig,proto3" json:"desired_containerd_config,omitempty"` - // Enable/Disable Multi-Networking for the cluster - DesiredEnableMultiNetworking *bool `protobuf:"varint,135,opt,name=desired_enable_multi_networking,json=desiredEnableMultiNetworking,proto3,oneof" json:"desired_enable_multi_networking,omitempty"` - // The desired resource manager tags that apply to all auto-provisioned node - // pools in autopilot clusters and node auto-provisioning enabled clusters. - DesiredNodePoolAutoConfigResourceManagerTags *ResourceManagerTags `protobuf:"bytes,136,opt,name=desired_node_pool_auto_config_resource_manager_tags,json=desiredNodePoolAutoConfigResourceManagerTags,proto3" json:"desired_node_pool_auto_config_resource_manager_tags,omitempty"` - // Specify the details of in-transit encryption. - DesiredInTransitEncryptionConfig *InTransitEncryptionConfig `protobuf:"varint,137,opt,name=desired_in_transit_encryption_config,json=desiredInTransitEncryptionConfig,proto3,enum=google.container.v1.InTransitEncryptionConfig,oneof" json:"desired_in_transit_encryption_config,omitempty"` - // Enable/Disable Cilium Clusterwide Network Policy for the cluster. - DesiredEnableCiliumClusterwideNetworkPolicy *bool `protobuf:"varint,138,opt,name=desired_enable_cilium_clusterwide_network_policy,json=desiredEnableCiliumClusterwideNetworkPolicy,proto3,oneof" json:"desired_enable_cilium_clusterwide_network_policy,omitempty"` - // Enable/Disable Secret Manager Config. - DesiredSecretManagerConfig *SecretManagerConfig `protobuf:"bytes,139,opt,name=desired_secret_manager_config,json=desiredSecretManagerConfig,proto3,oneof" json:"desired_secret_manager_config,omitempty"` - // Enable/Disable Compliance Posture features for the cluster. - DesiredCompliancePostureConfig *CompliancePostureConfig `protobuf:"bytes,140,opt,name=desired_compliance_posture_config,json=desiredCompliancePostureConfig,proto3,oneof" json:"desired_compliance_posture_config,omitempty"` - // The desired node kubelet config for the cluster. - DesiredNodeKubeletConfig *NodeKubeletConfig `protobuf:"bytes,141,opt,name=desired_node_kubelet_config,json=desiredNodeKubeletConfig,proto3" json:"desired_node_kubelet_config,omitempty"` - // The desired node kubelet config for all auto-provisioned node pools - // in autopilot clusters and node auto-provisioning enabled clusters. - DesiredNodePoolAutoConfigKubeletConfig *NodeKubeletConfig `protobuf:"bytes,142,opt,name=desired_node_pool_auto_config_kubelet_config,json=desiredNodePoolAutoConfigKubeletConfig,proto3" json:"desired_node_pool_auto_config_kubelet_config,omitempty"` - // The Custom keys configuration for the cluster. - // - // This field is deprecated. - // Use - // [ClusterUpdate.desired_user_managed_keys_config][google.container.v1.ClusterUpdate.desired_user_managed_keys_config] - // instead. - // - // Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. - UserManagedKeysConfig *UserManagedKeysConfig `protobuf:"bytes,143,opt,name=user_managed_keys_config,json=userManagedKeysConfig,proto3" json:"user_managed_keys_config,omitempty"` - // RBACBindingConfig allows user to restrict ClusterRoleBindings an - // RoleBindings that can be created. - DesiredRbacBindingConfig *RBACBindingConfig `protobuf:"bytes,144,opt,name=desired_rbac_binding_config,json=desiredRbacBindingConfig,proto3,oneof" json:"desired_rbac_binding_config,omitempty"` - // The desired config for additional subnetworks attached to the cluster. - DesiredAdditionalIpRangesConfig *DesiredAdditionalIPRangesConfig `protobuf:"bytes,145,opt,name=desired_additional_ip_ranges_config,json=desiredAdditionalIpRangesConfig,proto3" json:"desired_additional_ip_ranges_config,omitempty"` - // The desired enterprise configuration for the cluster. - // - // Deprecated: GKE Enterprise features are now available without an Enterprise - // tier. - // - // Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. - DesiredEnterpriseConfig *DesiredEnterpriseConfig `protobuf:"bytes,147,opt,name=desired_enterprise_config,json=desiredEnterpriseConfig,proto3" json:"desired_enterprise_config,omitempty"` - // AutoIpamConfig contains all information related to Auto IPAM - DesiredAutoIpamConfig *AutoIpamConfig `protobuf:"bytes,148,opt,name=desired_auto_ipam_config,json=desiredAutoIpamConfig,proto3" json:"desired_auto_ipam_config,omitempty"` - // Enable/Disable L4 LB VPC firewall reconciliation for the cluster. - DesiredDisableL4LbFirewallReconciliation *bool `protobuf:"varint,149,opt,name=desired_disable_l4_lb_firewall_reconciliation,json=desiredDisableL4LbFirewallReconciliation,proto3,oneof" json:"desired_disable_l4_lb_firewall_reconciliation,omitempty"` - // The desired Linux node config for all auto-provisioned node pools - // in autopilot clusters and node auto-provisioning enabled clusters. - // - // Currently only `cgroup_mode` can be set here. - DesiredNodePoolAutoConfigLinuxNodeConfig *LinuxNodeConfig `protobuf:"bytes,150,opt,name=desired_node_pool_auto_config_linux_node_config,json=desiredNodePoolAutoConfigLinuxNodeConfig,proto3" json:"desired_node_pool_auto_config_linux_node_config,omitempty"` - // The desired user managed keys config for the cluster. - DesiredUserManagedKeysConfig *UserManagedKeysConfig `protobuf:"bytes,152,opt,name=desired_user_managed_keys_config,json=desiredUserManagedKeysConfig,proto3" json:"desired_user_managed_keys_config,omitempty"` - // Configuration for limiting anonymous access to all endpoints except the - // health checks. - DesiredAnonymousAuthenticationConfig *AnonymousAuthenticationConfig `protobuf:"bytes,156,opt,name=desired_anonymous_authentication_config,json=desiredAnonymousAuthenticationConfig,proto3" json:"desired_anonymous_authentication_config,omitempty"` - // Configuration for GKE auto upgrade. - GkeAutoUpgradeConfig *GkeAutoUpgradeConfig `protobuf:"bytes,154,opt,name=gke_auto_upgrade_config,json=gkeAutoUpgradeConfig,proto3" json:"gke_auto_upgrade_config,omitempty"` - // The desired network tier configuration for the cluster. - DesiredNetworkTierConfig *NetworkTierConfig `protobuf:"bytes,155,opt,name=desired_network_tier_config,json=desiredNetworkTierConfig,proto3" json:"desired_network_tier_config,omitempty"` - // The desired privileged admission config for the cluster. - DesiredPrivilegedAdmissionConfig *PrivilegedAdmissionConfig `protobuf:"bytes,159,opt,name=desired_privileged_admission_config,json=desiredPrivilegedAdmissionConfig,proto3" json:"desired_privileged_admission_config,omitempty"` - // The desired managed open telemetry configuration. - DesiredManagedOpentelemetryConfig *ManagedOpenTelemetryConfig `protobuf:"bytes,163,opt,name=desired_managed_opentelemetry_config,json=desiredManagedOpentelemetryConfig,proto3" json:"desired_managed_opentelemetry_config,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ClusterUpdate) Reset() { - *x = ClusterUpdate{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[63] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ClusterUpdate) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ClusterUpdate) ProtoMessage() {} - -func (x *ClusterUpdate) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[63] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ClusterUpdate.ProtoReflect.Descriptor instead. -func (*ClusterUpdate) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{63} -} - -func (x *ClusterUpdate) GetDesiredNodeVersion() string { - if x != nil { - return x.DesiredNodeVersion - } - return "" -} - -func (x *ClusterUpdate) GetDesiredMonitoringService() string { - if x != nil { - return x.DesiredMonitoringService - } - return "" -} - -func (x *ClusterUpdate) GetDesiredAddonsConfig() *AddonsConfig { - if x != nil { - return x.DesiredAddonsConfig - } - return nil -} - -func (x *ClusterUpdate) GetDesiredNodePoolId() string { - if x != nil { - return x.DesiredNodePoolId - } - return "" -} - -func (x *ClusterUpdate) GetDesiredImageType() string { - if x != nil { - return x.DesiredImageType - } - return "" -} - -func (x *ClusterUpdate) GetDesiredDatabaseEncryption() *DatabaseEncryption { - if x != nil { - return x.DesiredDatabaseEncryption - } - return nil -} - -func (x *ClusterUpdate) GetDesiredWorkloadIdentityConfig() *WorkloadIdentityConfig { - if x != nil { - return x.DesiredWorkloadIdentityConfig - } - return nil -} - -func (x *ClusterUpdate) GetDesiredMeshCertificates() *MeshCertificates { - if x != nil { - return x.DesiredMeshCertificates - } - return nil -} - -func (x *ClusterUpdate) GetDesiredShieldedNodes() *ShieldedNodes { - if x != nil { - return x.DesiredShieldedNodes - } - return nil -} - -func (x *ClusterUpdate) GetDesiredCostManagementConfig() *CostManagementConfig { - if x != nil { - return x.DesiredCostManagementConfig - } - return nil -} - -func (x *ClusterUpdate) GetDesiredDnsConfig() *DNSConfig { - if x != nil { - return x.DesiredDnsConfig - } - return nil -} - -func (x *ClusterUpdate) GetDesiredNodePoolAutoscaling() *NodePoolAutoscaling { - if x != nil { - return x.DesiredNodePoolAutoscaling - } - return nil -} - -func (x *ClusterUpdate) GetDesiredLocations() []string { - if x != nil { - return x.DesiredLocations - } - return nil -} - -// Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. -func (x *ClusterUpdate) GetDesiredMasterAuthorizedNetworksConfig() *MasterAuthorizedNetworksConfig { - if x != nil { - return x.DesiredMasterAuthorizedNetworksConfig - } - return nil -} - -func (x *ClusterUpdate) GetDesiredClusterAutoscaling() *ClusterAutoscaling { - if x != nil { - return x.DesiredClusterAutoscaling - } - return nil -} - -func (x *ClusterUpdate) GetDesiredBinaryAuthorization() *BinaryAuthorization { - if x != nil { - return x.DesiredBinaryAuthorization - } - return nil -} - -func (x *ClusterUpdate) GetDesiredLoggingService() string { - if x != nil { - return x.DesiredLoggingService - } - return "" -} - -func (x *ClusterUpdate) GetDesiredResourceUsageExportConfig() *ResourceUsageExportConfig { - if x != nil { - return x.DesiredResourceUsageExportConfig - } - return nil -} - -func (x *ClusterUpdate) GetDesiredVerticalPodAutoscaling() *VerticalPodAutoscaling { - if x != nil { - return x.DesiredVerticalPodAutoscaling - } - return nil -} - -// Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. -func (x *ClusterUpdate) GetDesiredPrivateClusterConfig() *PrivateClusterConfig { - if x != nil { - return x.DesiredPrivateClusterConfig - } - return nil -} - -func (x *ClusterUpdate) GetDesiredIntraNodeVisibilityConfig() *IntraNodeVisibilityConfig { - if x != nil { - return x.DesiredIntraNodeVisibilityConfig - } - return nil -} - -func (x *ClusterUpdate) GetDesiredDefaultSnatStatus() *DefaultSnatStatus { - if x != nil { - return x.DesiredDefaultSnatStatus - } - return nil -} - -func (x *ClusterUpdate) GetDesiredReleaseChannel() *ReleaseChannel { - if x != nil { - return x.DesiredReleaseChannel - } - return nil -} - -func (x *ClusterUpdate) GetDesiredL4IlbSubsettingConfig() *ILBSubsettingConfig { - if x != nil { - return x.DesiredL4IlbSubsettingConfig - } - return nil -} - -func (x *ClusterUpdate) GetDesiredDatapathProvider() DatapathProvider { - if x != nil { - return x.DesiredDatapathProvider - } - return DatapathProvider_DATAPATH_PROVIDER_UNSPECIFIED -} - -func (x *ClusterUpdate) GetDesiredPrivateIpv6GoogleAccess() PrivateIPv6GoogleAccess { - if x != nil { - return x.DesiredPrivateIpv6GoogleAccess - } - return PrivateIPv6GoogleAccess_PRIVATE_IPV6_GOOGLE_ACCESS_UNSPECIFIED -} - -func (x *ClusterUpdate) GetDesiredNotificationConfig() *NotificationConfig { - if x != nil { - return x.DesiredNotificationConfig - } - return nil -} - -func (x *ClusterUpdate) GetDesiredAuthenticatorGroupsConfig() *AuthenticatorGroupsConfig { - if x != nil { - return x.DesiredAuthenticatorGroupsConfig - } - return nil -} - -func (x *ClusterUpdate) GetDesiredLoggingConfig() *LoggingConfig { - if x != nil { - return x.DesiredLoggingConfig - } - return nil -} - -func (x *ClusterUpdate) GetDesiredMonitoringConfig() *MonitoringConfig { - if x != nil { - return x.DesiredMonitoringConfig - } - return nil -} - -func (x *ClusterUpdate) GetDesiredIdentityServiceConfig() *IdentityServiceConfig { - if x != nil { - return x.DesiredIdentityServiceConfig - } - return nil -} - -func (x *ClusterUpdate) GetDesiredServiceExternalIpsConfig() *ServiceExternalIPsConfig { - if x != nil { - return x.DesiredServiceExternalIpsConfig - } - return nil -} - -// Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. -func (x *ClusterUpdate) GetDesiredEnablePrivateEndpoint() bool { - if x != nil && x.DesiredEnablePrivateEndpoint != nil { - return *x.DesiredEnablePrivateEndpoint - } - return false -} - -func (x *ClusterUpdate) GetDesiredDefaultEnablePrivateNodes() bool { - if x != nil && x.DesiredDefaultEnablePrivateNodes != nil { - return *x.DesiredDefaultEnablePrivateNodes - } - return false -} - -func (x *ClusterUpdate) GetDesiredControlPlaneEndpointsConfig() *ControlPlaneEndpointsConfig { - if x != nil { - return x.DesiredControlPlaneEndpointsConfig - } - return nil -} - -func (x *ClusterUpdate) GetDesiredMasterVersion() string { - if x != nil { - return x.DesiredMasterVersion - } - return "" -} - -func (x *ClusterUpdate) GetDesiredGcfsConfig() *GcfsConfig { - if x != nil { - return x.DesiredGcfsConfig - } - return nil -} - -func (x *ClusterUpdate) GetDesiredNodePoolAutoConfigNetworkTags() *NetworkTags { - if x != nil { - return x.DesiredNodePoolAutoConfigNetworkTags - } - return nil -} - -func (x *ClusterUpdate) GetDesiredPodAutoscaling() *PodAutoscaling { - if x != nil { - return x.DesiredPodAutoscaling - } - return nil -} - -func (x *ClusterUpdate) GetDesiredGatewayApiConfig() *GatewayAPIConfig { - if x != nil { - return x.DesiredGatewayApiConfig - } - return nil -} - -func (x *ClusterUpdate) GetEtag() string { - if x != nil { - return x.Etag - } - return "" -} - -func (x *ClusterUpdate) GetDesiredNodePoolLoggingConfig() *NodePoolLoggingConfig { - if x != nil { - return x.DesiredNodePoolLoggingConfig - } - return nil -} - -func (x *ClusterUpdate) GetDesiredFleet() *Fleet { - if x != nil { - return x.DesiredFleet - } - return nil -} - -func (x *ClusterUpdate) GetDesiredStackType() StackType { - if x != nil { - return x.DesiredStackType - } - return StackType_STACK_TYPE_UNSPECIFIED -} - -func (x *ClusterUpdate) GetAdditionalPodRangesConfig() *AdditionalPodRangesConfig { - if x != nil { - return x.AdditionalPodRangesConfig - } - return nil -} - -func (x *ClusterUpdate) GetRemovedAdditionalPodRangesConfig() *AdditionalPodRangesConfig { - if x != nil { - return x.RemovedAdditionalPodRangesConfig - } - return nil -} - -func (x *ClusterUpdate) GetEnableK8SBetaApis() *K8SBetaAPIConfig { - if x != nil { - return x.EnableK8SBetaApis - } - return nil -} - -func (x *ClusterUpdate) GetDesiredSecurityPostureConfig() *SecurityPostureConfig { - if x != nil { - return x.DesiredSecurityPostureConfig - } - return nil -} - -func (x *ClusterUpdate) GetDesiredNetworkPerformanceConfig() *NetworkConfig_ClusterNetworkPerformanceConfig { - if x != nil { - return x.DesiredNetworkPerformanceConfig - } - return nil -} - -func (x *ClusterUpdate) GetDesiredEnableFqdnNetworkPolicy() bool { - if x != nil && x.DesiredEnableFqdnNetworkPolicy != nil { - return *x.DesiredEnableFqdnNetworkPolicy - } - return false -} - -func (x *ClusterUpdate) GetDesiredAutopilotWorkloadPolicyConfig() *WorkloadPolicyConfig { - if x != nil { - return x.DesiredAutopilotWorkloadPolicyConfig - } - return nil -} - -func (x *ClusterUpdate) GetDesiredK8SBetaApis() *K8SBetaAPIConfig { - if x != nil { - return x.DesiredK8SBetaApis - } - return nil -} - -func (x *ClusterUpdate) GetDesiredContainerdConfig() *ContainerdConfig { - if x != nil { - return x.DesiredContainerdConfig - } - return nil -} - -func (x *ClusterUpdate) GetDesiredEnableMultiNetworking() bool { - if x != nil && x.DesiredEnableMultiNetworking != nil { - return *x.DesiredEnableMultiNetworking - } - return false -} - -func (x *ClusterUpdate) GetDesiredNodePoolAutoConfigResourceManagerTags() *ResourceManagerTags { - if x != nil { - return x.DesiredNodePoolAutoConfigResourceManagerTags - } - return nil -} - -func (x *ClusterUpdate) GetDesiredInTransitEncryptionConfig() InTransitEncryptionConfig { - if x != nil && x.DesiredInTransitEncryptionConfig != nil { - return *x.DesiredInTransitEncryptionConfig - } - return InTransitEncryptionConfig_IN_TRANSIT_ENCRYPTION_CONFIG_UNSPECIFIED -} - -func (x *ClusterUpdate) GetDesiredEnableCiliumClusterwideNetworkPolicy() bool { - if x != nil && x.DesiredEnableCiliumClusterwideNetworkPolicy != nil { - return *x.DesiredEnableCiliumClusterwideNetworkPolicy - } - return false -} - -func (x *ClusterUpdate) GetDesiredSecretManagerConfig() *SecretManagerConfig { - if x != nil { - return x.DesiredSecretManagerConfig - } - return nil -} - -func (x *ClusterUpdate) GetDesiredCompliancePostureConfig() *CompliancePostureConfig { - if x != nil { - return x.DesiredCompliancePostureConfig - } - return nil -} - -func (x *ClusterUpdate) GetDesiredNodeKubeletConfig() *NodeKubeletConfig { - if x != nil { - return x.DesiredNodeKubeletConfig - } - return nil -} - -func (x *ClusterUpdate) GetDesiredNodePoolAutoConfigKubeletConfig() *NodeKubeletConfig { - if x != nil { - return x.DesiredNodePoolAutoConfigKubeletConfig - } - return nil -} - -// Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. -func (x *ClusterUpdate) GetUserManagedKeysConfig() *UserManagedKeysConfig { - if x != nil { - return x.UserManagedKeysConfig - } - return nil -} - -func (x *ClusterUpdate) GetDesiredRbacBindingConfig() *RBACBindingConfig { - if x != nil { - return x.DesiredRbacBindingConfig - } - return nil -} - -func (x *ClusterUpdate) GetDesiredAdditionalIpRangesConfig() *DesiredAdditionalIPRangesConfig { - if x != nil { - return x.DesiredAdditionalIpRangesConfig - } - return nil -} - -// Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. -func (x *ClusterUpdate) GetDesiredEnterpriseConfig() *DesiredEnterpriseConfig { - if x != nil { - return x.DesiredEnterpriseConfig - } - return nil -} - -func (x *ClusterUpdate) GetDesiredAutoIpamConfig() *AutoIpamConfig { - if x != nil { - return x.DesiredAutoIpamConfig - } - return nil -} - -func (x *ClusterUpdate) GetDesiredDisableL4LbFirewallReconciliation() bool { - if x != nil && x.DesiredDisableL4LbFirewallReconciliation != nil { - return *x.DesiredDisableL4LbFirewallReconciliation - } - return false -} - -func (x *ClusterUpdate) GetDesiredNodePoolAutoConfigLinuxNodeConfig() *LinuxNodeConfig { - if x != nil { - return x.DesiredNodePoolAutoConfigLinuxNodeConfig - } - return nil -} - -func (x *ClusterUpdate) GetDesiredUserManagedKeysConfig() *UserManagedKeysConfig { - if x != nil { - return x.DesiredUserManagedKeysConfig - } - return nil -} - -func (x *ClusterUpdate) GetDesiredAnonymousAuthenticationConfig() *AnonymousAuthenticationConfig { - if x != nil { - return x.DesiredAnonymousAuthenticationConfig - } - return nil -} - -func (x *ClusterUpdate) GetGkeAutoUpgradeConfig() *GkeAutoUpgradeConfig { - if x != nil { - return x.GkeAutoUpgradeConfig - } - return nil -} - -func (x *ClusterUpdate) GetDesiredNetworkTierConfig() *NetworkTierConfig { - if x != nil { - return x.DesiredNetworkTierConfig - } - return nil -} - -func (x *ClusterUpdate) GetDesiredPrivilegedAdmissionConfig() *PrivilegedAdmissionConfig { - if x != nil { - return x.DesiredPrivilegedAdmissionConfig - } - return nil -} - -func (x *ClusterUpdate) GetDesiredManagedOpentelemetryConfig() *ManagedOpenTelemetryConfig { - if x != nil { - return x.DesiredManagedOpentelemetryConfig - } - return nil -} - -// AdditionalPodRangesConfig is the configuration for additional pod secondary -// ranges supporting the ClusterUpdate message. -type AdditionalPodRangesConfig struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Name for pod secondary ipv4 range which has the actual range defined ahead. - PodRangeNames []string `protobuf:"bytes,1,rep,name=pod_range_names,json=podRangeNames,proto3" json:"pod_range_names,omitempty"` - // Output only. Information for additional pod range. - PodRangeInfo []*RangeInfo `protobuf:"bytes,2,rep,name=pod_range_info,json=podRangeInfo,proto3" json:"pod_range_info,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *AdditionalPodRangesConfig) Reset() { - *x = AdditionalPodRangesConfig{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[64] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *AdditionalPodRangesConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*AdditionalPodRangesConfig) ProtoMessage() {} - -func (x *AdditionalPodRangesConfig) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[64] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use AdditionalPodRangesConfig.ProtoReflect.Descriptor instead. -func (*AdditionalPodRangesConfig) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{64} -} - -func (x *AdditionalPodRangesConfig) GetPodRangeNames() []string { - if x != nil { - return x.PodRangeNames - } - return nil -} - -func (x *AdditionalPodRangesConfig) GetPodRangeInfo() []*RangeInfo { - if x != nil { - return x.PodRangeInfo - } - return nil -} - -// AdditionalIPRangesConfig is the configuration for individual additional -// subnetwork attached to the cluster -type AdditionalIPRangesConfig struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Name of the subnetwork. This can be the full path of the subnetwork or - // just the name. - // Example1: my-subnet - // Example2: projects/gke-project/regions/us-central1/subnetworks/my-subnet - Subnetwork string `protobuf:"bytes,1,opt,name=subnetwork,proto3" json:"subnetwork,omitempty"` - // List of secondary ranges names within this subnetwork that can be used for - // pod IPs. - // Example1: gke-pod-range1 - // Example2: gke-pod-range1,gke-pod-range2 - PodIpv4RangeNames []string `protobuf:"bytes,2,rep,name=pod_ipv4_range_names,json=podIpv4RangeNames,proto3" json:"pod_ipv4_range_names,omitempty"` - // Draining status of the additional subnet. - Status AdditionalIPRangesConfig_Status `protobuf:"varint,3,opt,name=status,proto3,enum=google.container.v1.AdditionalIPRangesConfig_Status" json:"status,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *AdditionalIPRangesConfig) Reset() { - *x = AdditionalIPRangesConfig{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[65] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *AdditionalIPRangesConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*AdditionalIPRangesConfig) ProtoMessage() {} - -func (x *AdditionalIPRangesConfig) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[65] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use AdditionalIPRangesConfig.ProtoReflect.Descriptor instead. -func (*AdditionalIPRangesConfig) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{65} -} - -func (x *AdditionalIPRangesConfig) GetSubnetwork() string { - if x != nil { - return x.Subnetwork - } - return "" -} - -func (x *AdditionalIPRangesConfig) GetPodIpv4RangeNames() []string { - if x != nil { - return x.PodIpv4RangeNames - } - return nil -} - -func (x *AdditionalIPRangesConfig) GetStatus() AdditionalIPRangesConfig_Status { - if x != nil { - return x.Status - } - return AdditionalIPRangesConfig_STATUS_UNSPECIFIED -} - -// DesiredAdditionalIPRangesConfig is a wrapper used for cluster update -// operation and contains multiple AdditionalIPRangesConfigs. -type DesiredAdditionalIPRangesConfig struct { - state protoimpl.MessageState `protogen:"open.v1"` - // List of additional IP ranges configs where each AdditionalIPRangesConfig - // corresponds to one subnetwork's IP ranges - AdditionalIpRangesConfigs []*AdditionalIPRangesConfig `protobuf:"bytes,1,rep,name=additional_ip_ranges_configs,json=additionalIpRangesConfigs,proto3" json:"additional_ip_ranges_configs,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *DesiredAdditionalIPRangesConfig) Reset() { - *x = DesiredAdditionalIPRangesConfig{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[66] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *DesiredAdditionalIPRangesConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DesiredAdditionalIPRangesConfig) ProtoMessage() {} - -func (x *DesiredAdditionalIPRangesConfig) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[66] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DesiredAdditionalIPRangesConfig.ProtoReflect.Descriptor instead. -func (*DesiredAdditionalIPRangesConfig) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{66} -} - -func (x *DesiredAdditionalIPRangesConfig) GetAdditionalIpRangesConfigs() []*AdditionalIPRangesConfig { - if x != nil { - return x.AdditionalIpRangesConfigs - } - return nil -} - -// AutoIpamConfig contains all information related to Auto IPAM -type AutoIpamConfig struct { - state protoimpl.MessageState `protogen:"open.v1"` - // The flag that enables Auto IPAM on this cluster - Enabled *bool `protobuf:"varint,1,opt,name=enabled,proto3,oneof" json:"enabled,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *AutoIpamConfig) Reset() { - *x = AutoIpamConfig{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[67] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *AutoIpamConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*AutoIpamConfig) ProtoMessage() {} - -func (x *AutoIpamConfig) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[67] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use AutoIpamConfig.ProtoReflect.Descriptor instead. -func (*AutoIpamConfig) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{67} -} - -func (x *AutoIpamConfig) GetEnabled() bool { - if x != nil && x.Enabled != nil { - return *x.Enabled - } - return false -} - -// RangeInfo contains the range name and the range utilization by this cluster. -type RangeInfo struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Output only. Name of a range. - RangeName string `protobuf:"bytes,1,opt,name=range_name,json=rangeName,proto3" json:"range_name,omitempty"` - // Output only. The utilization of the range. - Utilization float64 `protobuf:"fixed64,2,opt,name=utilization,proto3" json:"utilization,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *RangeInfo) Reset() { - *x = RangeInfo{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[68] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *RangeInfo) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RangeInfo) ProtoMessage() {} - -func (x *RangeInfo) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[68] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RangeInfo.ProtoReflect.Descriptor instead. -func (*RangeInfo) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{68} -} - -func (x *RangeInfo) GetRangeName() string { - if x != nil { - return x.RangeName - } - return "" -} - -func (x *RangeInfo) GetUtilization() float64 { - if x != nil { - return x.Utilization - } - return 0 -} - -// DesiredEnterpriseConfig is a wrapper used for updating enterprise_config. -// -// Deprecated: GKE Enterprise features are now available without an Enterprise -// tier. -// -// Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. -type DesiredEnterpriseConfig struct { - state protoimpl.MessageState `protogen:"open.v1"` - // desired_tier specifies the desired tier of the cluster. - DesiredTier EnterpriseConfig_ClusterTier `protobuf:"varint,1,opt,name=desired_tier,json=desiredTier,proto3,enum=google.container.v1.EnterpriseConfig_ClusterTier" json:"desired_tier,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *DesiredEnterpriseConfig) Reset() { - *x = DesiredEnterpriseConfig{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[69] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *DesiredEnterpriseConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DesiredEnterpriseConfig) ProtoMessage() {} - -func (x *DesiredEnterpriseConfig) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[69] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DesiredEnterpriseConfig.ProtoReflect.Descriptor instead. -func (*DesiredEnterpriseConfig) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{69} -} - -func (x *DesiredEnterpriseConfig) GetDesiredTier() EnterpriseConfig_ClusterTier { - if x != nil { - return x.DesiredTier - } - return EnterpriseConfig_CLUSTER_TIER_UNSPECIFIED -} - -// This operation resource represents operations that may have happened or are -// happening on the cluster. All fields are output only. -type Operation struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Output only. The server-assigned ID for the operation. - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // Output only. The name of the Google Compute Engine - // [zone](https://cloud.google.com/compute/docs/zones#available) - // in which the operation is taking place. This field is deprecated, use - // location instead. - // - // Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. - Zone string `protobuf:"bytes,2,opt,name=zone,proto3" json:"zone,omitempty"` - // Output only. The operation type. - OperationType Operation_Type `protobuf:"varint,3,opt,name=operation_type,json=operationType,proto3,enum=google.container.v1.Operation_Type" json:"operation_type,omitempty"` - // Output only. The current status of the operation. - Status Operation_Status `protobuf:"varint,4,opt,name=status,proto3,enum=google.container.v1.Operation_Status" json:"status,omitempty"` - // Output only. Detailed operation progress, if available. - Detail string `protobuf:"bytes,8,opt,name=detail,proto3" json:"detail,omitempty"` - // Output only. If an error has occurred, a textual description of the error. - // Deprecated. Use the field error instead. - // - // Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. - StatusMessage string `protobuf:"bytes,5,opt,name=status_message,json=statusMessage,proto3" json:"status_message,omitempty"` - // Output only. Server-defined URI for the operation. Example: - // `https://container.googleapis.com/v1alpha1/projects/123/locations/us-central1/operations/operation-123`. - SelfLink string `protobuf:"bytes,6,opt,name=self_link,json=selfLink,proto3" json:"self_link,omitempty"` - // Output only. Server-defined URI for the target of the operation. The format - // of this is a URI to the resource being modified (such as a cluster, node - // pool, or node). For node pool repairs, there may be multiple nodes being - // repaired, but only one will be the target. - // - // Examples: - // - // - - // ## - // `https://container.googleapis.com/v1/projects/123/locations/us-central1/clusters/my-cluster` - // - // ## - // `https://container.googleapis.com/v1/projects/123/zones/us-central1-c/clusters/my-cluster/nodePools/my-np` - // - // `https://container.googleapis.com/v1/projects/123/zones/us-central1-c/clusters/my-cluster/nodePools/my-np/node/my-node` - TargetLink string `protobuf:"bytes,7,opt,name=target_link,json=targetLink,proto3" json:"target_link,omitempty"` - // Output only. The name of the Google Compute Engine - // [zone](https://cloud.google.com/compute/docs/regions-zones/regions-zones#available) - // or - // [region](https://cloud.google.com/compute/docs/regions-zones/regions-zones#available) - // in which the cluster resides. - Location string `protobuf:"bytes,9,opt,name=location,proto3" json:"location,omitempty"` - // Output only. The time the operation started, in - // [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format. - StartTime string `protobuf:"bytes,10,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"` - // Output only. The time the operation completed, in - // [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format. - EndTime string `protobuf:"bytes,11,opt,name=end_time,json=endTime,proto3" json:"end_time,omitempty"` - // Output only. Progress information for an operation. - Progress *OperationProgress `protobuf:"bytes,12,opt,name=progress,proto3" json:"progress,omitempty"` - // Which conditions caused the current cluster state. - // Deprecated. Use field error instead. - // - // Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. - ClusterConditions []*StatusCondition `protobuf:"bytes,13,rep,name=cluster_conditions,json=clusterConditions,proto3" json:"cluster_conditions,omitempty"` - // Which conditions caused the current node pool state. - // Deprecated. Use field error instead. - // - // Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. - NodepoolConditions []*StatusCondition `protobuf:"bytes,14,rep,name=nodepool_conditions,json=nodepoolConditions,proto3" json:"nodepool_conditions,omitempty"` - // The error result of the operation in case of failure. - Error *status.Status `protobuf:"bytes,15,opt,name=error,proto3" json:"error,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *Operation) Reset() { - *x = Operation{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[70] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *Operation) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Operation) ProtoMessage() {} - -func (x *Operation) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[70] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Operation.ProtoReflect.Descriptor instead. -func (*Operation) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{70} -} - -func (x *Operation) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -// Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. -func (x *Operation) GetZone() string { - if x != nil { - return x.Zone - } - return "" -} - -func (x *Operation) GetOperationType() Operation_Type { - if x != nil { - return x.OperationType - } - return Operation_TYPE_UNSPECIFIED -} - -func (x *Operation) GetStatus() Operation_Status { - if x != nil { - return x.Status - } - return Operation_STATUS_UNSPECIFIED -} - -func (x *Operation) GetDetail() string { - if x != nil { - return x.Detail - } - return "" -} - -// Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. -func (x *Operation) GetStatusMessage() string { - if x != nil { - return x.StatusMessage - } - return "" -} - -func (x *Operation) GetSelfLink() string { - if x != nil { - return x.SelfLink - } - return "" -} - -func (x *Operation) GetTargetLink() string { - if x != nil { - return x.TargetLink - } - return "" -} - -func (x *Operation) GetLocation() string { - if x != nil { - return x.Location - } - return "" -} - -func (x *Operation) GetStartTime() string { - if x != nil { - return x.StartTime - } - return "" -} - -func (x *Operation) GetEndTime() string { - if x != nil { - return x.EndTime - } - return "" -} - -func (x *Operation) GetProgress() *OperationProgress { - if x != nil { - return x.Progress - } - return nil -} - -// Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. -func (x *Operation) GetClusterConditions() []*StatusCondition { - if x != nil { - return x.ClusterConditions - } - return nil -} - -// Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. -func (x *Operation) GetNodepoolConditions() []*StatusCondition { - if x != nil { - return x.NodepoolConditions - } - return nil -} - -func (x *Operation) GetError() *status.Status { - if x != nil { - return x.Error - } - return nil -} - -// Information about operation (or operation stage) progress. -type OperationProgress struct { - state protoimpl.MessageState `protogen:"open.v1"` - // A non-parameterized string describing an operation stage. - // Unset for single-stage operations. - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // Status of an operation stage. - // Unset for single-stage operations. - Status Operation_Status `protobuf:"varint,2,opt,name=status,proto3,enum=google.container.v1.Operation_Status" json:"status,omitempty"` - // Progress metric bundle, for example: - // - // metrics: [{name: "nodes done", int_value: 15}, - // {name: "nodes total", int_value: 32}] - // - // or - // - // metrics: [{name: "progress", double_value: 0.56}, - // {name: "progress scale", double_value: 1.0}] - Metrics []*OperationProgress_Metric `protobuf:"bytes,3,rep,name=metrics,proto3" json:"metrics,omitempty"` - // Substages of an operation or a stage. - Stages []*OperationProgress `protobuf:"bytes,4,rep,name=stages,proto3" json:"stages,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *OperationProgress) Reset() { - *x = OperationProgress{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[71] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *OperationProgress) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*OperationProgress) ProtoMessage() {} - -func (x *OperationProgress) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[71] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use OperationProgress.ProtoReflect.Descriptor instead. -func (*OperationProgress) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{71} -} - -func (x *OperationProgress) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *OperationProgress) GetStatus() Operation_Status { - if x != nil { - return x.Status - } - return Operation_STATUS_UNSPECIFIED -} - -func (x *OperationProgress) GetMetrics() []*OperationProgress_Metric { - if x != nil { - return x.Metrics - } - return nil -} - -func (x *OperationProgress) GetStages() []*OperationProgress { - if x != nil { - return x.Stages - } - return nil -} - -// CreateClusterRequest creates a cluster. -type CreateClusterRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Deprecated. The Google Developers Console [project ID or project - // number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). - // This field has been deprecated and replaced by the parent field. - // - // Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. - ProjectId string `protobuf:"bytes,1,opt,name=project_id,json=projectId,proto3" json:"project_id,omitempty"` - // Deprecated. The name of the Google Compute Engine - // [zone](https://cloud.google.com/compute/docs/zones#available) - // in which the cluster resides. This field has been deprecated and replaced - // by the parent field. - // - // Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. - Zone string `protobuf:"bytes,2,opt,name=zone,proto3" json:"zone,omitempty"` - // Required. A [cluster - // resource](https://cloud.google.com/container-engine/reference/rest/v1/projects.locations.clusters) - Cluster *Cluster `protobuf:"bytes,3,opt,name=cluster,proto3" json:"cluster,omitempty"` - // The parent (project and location) where the cluster will be created. - // Specified in the format `projects/*/locations/*`. - Parent string `protobuf:"bytes,5,opt,name=parent,proto3" json:"parent,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *CreateClusterRequest) Reset() { - *x = CreateClusterRequest{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[72] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *CreateClusterRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CreateClusterRequest) ProtoMessage() {} - -func (x *CreateClusterRequest) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[72] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CreateClusterRequest.ProtoReflect.Descriptor instead. -func (*CreateClusterRequest) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{72} -} - -// Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. -func (x *CreateClusterRequest) GetProjectId() string { - if x != nil { - return x.ProjectId - } - return "" -} - -// Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. -func (x *CreateClusterRequest) GetZone() string { - if x != nil { - return x.Zone - } - return "" -} - -func (x *CreateClusterRequest) GetCluster() *Cluster { - if x != nil { - return x.Cluster - } - return nil -} - -func (x *CreateClusterRequest) GetParent() string { - if x != nil { - return x.Parent - } - return "" -} - -// GetClusterRequest gets the settings of a cluster. -type GetClusterRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Deprecated. The Google Developers Console [project ID or project - // number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). - // This field has been deprecated and replaced by the name field. - // - // Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. - ProjectId string `protobuf:"bytes,1,opt,name=project_id,json=projectId,proto3" json:"project_id,omitempty"` - // Deprecated. The name of the Google Compute Engine - // [zone](https://cloud.google.com/compute/docs/zones#available) - // in which the cluster resides. This field has been deprecated and replaced - // by the name field. - // - // Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. - Zone string `protobuf:"bytes,2,opt,name=zone,proto3" json:"zone,omitempty"` - // Deprecated. The name of the cluster to retrieve. - // This field has been deprecated and replaced by the name field. - // - // Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. - ClusterId string `protobuf:"bytes,3,opt,name=cluster_id,json=clusterId,proto3" json:"cluster_id,omitempty"` - // The name (project, location, cluster) of the cluster to retrieve. - // Specified in the format `projects/*/locations/*/clusters/*`. - Name string `protobuf:"bytes,5,opt,name=name,proto3" json:"name,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *GetClusterRequest) Reset() { - *x = GetClusterRequest{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[73] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *GetClusterRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetClusterRequest) ProtoMessage() {} - -func (x *GetClusterRequest) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[73] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetClusterRequest.ProtoReflect.Descriptor instead. -func (*GetClusterRequest) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{73} -} - -// Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. -func (x *GetClusterRequest) GetProjectId() string { - if x != nil { - return x.ProjectId - } - return "" -} - -// Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. -func (x *GetClusterRequest) GetZone() string { - if x != nil { - return x.Zone - } - return "" -} - -// Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. -func (x *GetClusterRequest) GetClusterId() string { - if x != nil { - return x.ClusterId - } - return "" -} - -func (x *GetClusterRequest) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -// UpdateClusterRequest updates the settings of a cluster. -type UpdateClusterRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Deprecated. The Google Developers Console [project ID or project - // number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). - // This field has been deprecated and replaced by the name field. - // - // Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. - ProjectId string `protobuf:"bytes,1,opt,name=project_id,json=projectId,proto3" json:"project_id,omitempty"` - // Deprecated. The name of the Google Compute Engine - // [zone](https://cloud.google.com/compute/docs/zones#available) - // in which the cluster resides. This field has been deprecated and replaced - // by the name field. - // - // Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. - Zone string `protobuf:"bytes,2,opt,name=zone,proto3" json:"zone,omitempty"` - // Deprecated. The name of the cluster to upgrade. - // This field has been deprecated and replaced by the name field. - // - // Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. - ClusterId string `protobuf:"bytes,3,opt,name=cluster_id,json=clusterId,proto3" json:"cluster_id,omitempty"` - // Required. A description of the update. - Update *ClusterUpdate `protobuf:"bytes,4,opt,name=update,proto3" json:"update,omitempty"` - // The name (project, location, cluster) of the cluster to update. - // Specified in the format `projects/*/locations/*/clusters/*`. - Name string `protobuf:"bytes,5,opt,name=name,proto3" json:"name,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *UpdateClusterRequest) Reset() { - *x = UpdateClusterRequest{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[74] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *UpdateClusterRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UpdateClusterRequest) ProtoMessage() {} - -func (x *UpdateClusterRequest) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[74] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use UpdateClusterRequest.ProtoReflect.Descriptor instead. -func (*UpdateClusterRequest) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{74} -} - -// Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. -func (x *UpdateClusterRequest) GetProjectId() string { - if x != nil { - return x.ProjectId - } - return "" -} - -// Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. -func (x *UpdateClusterRequest) GetZone() string { - if x != nil { - return x.Zone - } - return "" -} - -// Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. -func (x *UpdateClusterRequest) GetClusterId() string { - if x != nil { - return x.ClusterId - } - return "" -} - -func (x *UpdateClusterRequest) GetUpdate() *ClusterUpdate { - if x != nil { - return x.Update - } - return nil -} - -func (x *UpdateClusterRequest) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -// UpdateNodePoolRequests update a node pool's image and/or version. -type UpdateNodePoolRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Deprecated. The Google Developers Console [project ID or project - // number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). - // This field has been deprecated and replaced by the name field. - // - // Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. - ProjectId string `protobuf:"bytes,1,opt,name=project_id,json=projectId,proto3" json:"project_id,omitempty"` - // Deprecated. The name of the Google Compute Engine - // [zone](https://cloud.google.com/compute/docs/zones#available) - // in which the cluster resides. This field has been deprecated and replaced - // by the name field. - // - // Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. - Zone string `protobuf:"bytes,2,opt,name=zone,proto3" json:"zone,omitempty"` - // Deprecated. The name of the cluster to upgrade. - // This field has been deprecated and replaced by the name field. - // - // Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. - ClusterId string `protobuf:"bytes,3,opt,name=cluster_id,json=clusterId,proto3" json:"cluster_id,omitempty"` - // Deprecated. The name of the node pool to upgrade. - // This field has been deprecated and replaced by the name field. - // - // Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. - NodePoolId string `protobuf:"bytes,4,opt,name=node_pool_id,json=nodePoolId,proto3" json:"node_pool_id,omitempty"` - // Required. The Kubernetes version to change the nodes to (typically an - // upgrade). - // - // Users may specify either explicit versions offered by Kubernetes Engine or - // version aliases, which have the following behavior: - // - // - "latest": picks the highest valid Kubernetes version - // - "1.X": picks the highest valid patch+gke.N patch in the 1.X version - // - "1.X.Y": picks the highest valid gke.N patch in the 1.X.Y version - // - "1.X.Y-gke.N": picks an explicit Kubernetes version - // - "-": picks the Kubernetes master version - NodeVersion string `protobuf:"bytes,5,opt,name=node_version,json=nodeVersion,proto3" json:"node_version,omitempty"` - // Required. The desired image type for the node pool. Please see - // https://cloud.google.com/kubernetes-engine/docs/concepts/node-images - // for available image types. - ImageType string `protobuf:"bytes,6,opt,name=image_type,json=imageType,proto3" json:"image_type,omitempty"` - // The name (project, location, cluster, node pool) of the node pool to - // update. Specified in the format - // `projects/*/locations/*/clusters/*/nodePools/*`. - Name string `protobuf:"bytes,8,opt,name=name,proto3" json:"name,omitempty"` - // The desired list of Google Compute Engine - // [zones](https://cloud.google.com/compute/docs/zones#available) - // in which the node pool's nodes should be located. Changing the locations - // for a node pool will result in nodes being either created or removed from - // the node pool, depending on whether locations are being added or removed. - // - // Warning: It is recommended to update node pool locations in a standalone - // API call. Do not combine a location update with changes to other fields - // (such as `tags`, `labels`, `taints`, etc.) in the same request. - // Otherwise, the API performs a structural modification where changes to - // other fields will only apply to newly created nodes and will not be - // applied to existing nodes in the node pool. To ensure all nodes are updated - // consistently, use a separate API call for location changes. - Locations []string `protobuf:"bytes,13,rep,name=locations,proto3" json:"locations,omitempty"` - // The desired workload metadata config for the node pool. - WorkloadMetadataConfig *WorkloadMetadataConfig `protobuf:"bytes,14,opt,name=workload_metadata_config,json=workloadMetadataConfig,proto3" json:"workload_metadata_config,omitempty"` - // Upgrade settings control disruption and speed of the upgrade. - UpgradeSettings *NodePool_UpgradeSettings `protobuf:"bytes,15,opt,name=upgrade_settings,json=upgradeSettings,proto3" json:"upgrade_settings,omitempty"` - // The desired network tags to be applied to all nodes in the node pool. - // If this field is not present, the tags will not be changed. Otherwise, - // the existing network tags will be *replaced* with the provided tags. - Tags *NetworkTags `protobuf:"bytes,16,opt,name=tags,proto3" json:"tags,omitempty"` - // The desired node taints to be applied to all nodes in the node pool. - // If this field is not present, the taints will not be changed. Otherwise, - // the existing node taints will be *replaced* with the provided taints. - Taints *NodeTaints `protobuf:"bytes,17,opt,name=taints,proto3" json:"taints,omitempty"` - // The desired node labels to be applied to all nodes in the node pool. - // If this field is not present, the labels will not be changed. Otherwise, - // the existing node labels will be *replaced* with the provided labels. - Labels *NodeLabels `protobuf:"bytes,18,opt,name=labels,proto3" json:"labels,omitempty"` - // Parameters that can be configured on Linux nodes. - LinuxNodeConfig *LinuxNodeConfig `protobuf:"bytes,19,opt,name=linux_node_config,json=linuxNodeConfig,proto3" json:"linux_node_config,omitempty"` - // Node kubelet configs. - KubeletConfig *NodeKubeletConfig `protobuf:"bytes,20,opt,name=kubelet_config,json=kubeletConfig,proto3" json:"kubelet_config,omitempty"` - // Node network config. - NodeNetworkConfig *NodeNetworkConfig `protobuf:"bytes,21,opt,name=node_network_config,json=nodeNetworkConfig,proto3" json:"node_network_config,omitempty"` - // GCFS config. - GcfsConfig *GcfsConfig `protobuf:"bytes,22,opt,name=gcfs_config,json=gcfsConfig,proto3" json:"gcfs_config,omitempty"` - // Confidential nodes config. - // All the nodes in the node pool will be Confidential VM once enabled. - ConfidentialNodes *ConfidentialNodes `protobuf:"bytes,23,opt,name=confidential_nodes,json=confidentialNodes,proto3" json:"confidential_nodes,omitempty"` - // Enable or disable gvnic on the node pool. - Gvnic *VirtualNIC `protobuf:"bytes,29,opt,name=gvnic,proto3" json:"gvnic,omitempty"` - // The current etag of the node pool. - // If an etag is provided and does not match the current etag of the node - // pool, update will be blocked and an ABORTED error will be returned. - Etag string `protobuf:"bytes,30,opt,name=etag,proto3" json:"etag,omitempty"` - // Enable or disable NCCL fast socket for the node pool. - FastSocket *FastSocket `protobuf:"bytes,31,opt,name=fast_socket,json=fastSocket,proto3" json:"fast_socket,omitempty"` - // Logging configuration. - LoggingConfig *NodePoolLoggingConfig `protobuf:"bytes,32,opt,name=logging_config,json=loggingConfig,proto3" json:"logging_config,omitempty"` - // The resource labels for the node pool to use to annotate any related - // Google Compute Engine resources. - ResourceLabels *ResourceLabels `protobuf:"bytes,33,opt,name=resource_labels,json=resourceLabels,proto3" json:"resource_labels,omitempty"` - // Parameters that can be configured on Windows nodes. - WindowsNodeConfig *WindowsNodeConfig `protobuf:"bytes,34,opt,name=windows_node_config,json=windowsNodeConfig,proto3" json:"windows_node_config,omitempty"` - // A list of hardware accelerators to be attached to each node. - // See - // https://cloud.google.com/compute/docs/gpus - // for more information about support for GPUs. - Accelerators []*AcceleratorConfig `protobuf:"bytes,35,rep,name=accelerators,proto3" json:"accelerators,omitempty"` - // Optional. The desired [Google Compute Engine machine - // type](https://cloud.google.com/compute/docs/machine-types) - // for nodes in the node pool. Initiates an upgrade operation that migrates - // the nodes in the node pool to the specified machine type. - MachineType string `protobuf:"bytes,36,opt,name=machine_type,json=machineType,proto3" json:"machine_type,omitempty"` - // Optional. The desired disk type (e.g. 'pd-standard', 'pd-ssd' or - // 'pd-balanced') for nodes in the node pool. - // Initiates an upgrade operation that migrates the nodes in the - // node pool to the specified disk type. - DiskType string `protobuf:"bytes,37,opt,name=disk_type,json=diskType,proto3" json:"disk_type,omitempty"` - // Optional. The desired disk size for nodes in the node pool specified in GB. - // The smallest allowed disk size is 10GB. - // Initiates an upgrade operation that migrates the nodes in the - // node pool to the specified disk size. - DiskSizeGb int64 `protobuf:"varint,38,opt,name=disk_size_gb,json=diskSizeGb,proto3" json:"disk_size_gb,omitempty"` - // Desired resource manager tag keys and values to be attached to the nodes - // for managing Compute Engine firewalls using Network Firewall Policies. - // Existing tags will be replaced with new values. - ResourceManagerTags *ResourceManagerTags `protobuf:"bytes,39,opt,name=resource_manager_tags,json=resourceManagerTags,proto3" json:"resource_manager_tags,omitempty"` - // The desired containerd config for nodes in the node pool. - // Initiates an upgrade operation that recreates the nodes with the new - // config. - ContainerdConfig *ContainerdConfig `protobuf:"bytes,40,opt,name=containerd_config,json=containerdConfig,proto3" json:"containerd_config,omitempty"` - // Specifies the configuration of queued provisioning. - QueuedProvisioning *NodePool_QueuedProvisioning `protobuf:"bytes,42,opt,name=queued_provisioning,json=queuedProvisioning,proto3" json:"queued_provisioning,omitempty"` - // List of Storage Pools where boot disks are provisioned. - // Existing Storage Pools will be replaced with storage-pools. - StoragePools []string `protobuf:"bytes,43,rep,name=storage_pools,json=storagePools,proto3" json:"storage_pools,omitempty"` - // The maximum duration for the nodes to exist. - // If unspecified, the nodes can exist indefinitely. - MaxRunDuration *durationpb.Duration `protobuf:"bytes,45,opt,name=max_run_duration,json=maxRunDuration,proto3" json:"max_run_duration,omitempty"` - // Flex Start flag for enabling Flex Start VM. - FlexStart *bool `protobuf:"varint,46,opt,name=flex_start,json=flexStart,proto3,oneof" json:"flex_start,omitempty"` - // The desired boot disk config for nodes in the node pool. - // Initiates an upgrade operation that migrates the nodes in the - // node pool to the specified boot disk config. - BootDisk *BootDisk `protobuf:"bytes,47,opt,name=boot_disk,json=bootDisk,proto3" json:"boot_disk,omitempty"` - // The desired node drain configuration for nodes in the node pool. - NodeDrainConfig *NodePool_NodeDrainConfig `protobuf:"bytes,48,opt,name=node_drain_config,json=nodeDrainConfig,proto3" json:"node_drain_config,omitempty"` - // Consolidation delay defines duration after which the Cluster Autoscaler can - // scale down underutilized nodes. If not set, nodes are scaled down by - // default behavior, i.e. according to the chosen autoscaling profile. - ConsolidationDelay *durationpb.Duration `protobuf:"bytes,49,opt,name=consolidation_delay,json=consolidationDelay,proto3" json:"consolidation_delay,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *UpdateNodePoolRequest) Reset() { - *x = UpdateNodePoolRequest{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[75] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *UpdateNodePoolRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UpdateNodePoolRequest) ProtoMessage() {} - -func (x *UpdateNodePoolRequest) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[75] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use UpdateNodePoolRequest.ProtoReflect.Descriptor instead. -func (*UpdateNodePoolRequest) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{75} -} - -// Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. -func (x *UpdateNodePoolRequest) GetProjectId() string { - if x != nil { - return x.ProjectId - } - return "" -} - -// Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. -func (x *UpdateNodePoolRequest) GetZone() string { - if x != nil { - return x.Zone - } - return "" -} - -// Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. -func (x *UpdateNodePoolRequest) GetClusterId() string { - if x != nil { - return x.ClusterId - } - return "" -} - -// Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. -func (x *UpdateNodePoolRequest) GetNodePoolId() string { - if x != nil { - return x.NodePoolId - } - return "" -} - -func (x *UpdateNodePoolRequest) GetNodeVersion() string { - if x != nil { - return x.NodeVersion - } - return "" -} - -func (x *UpdateNodePoolRequest) GetImageType() string { - if x != nil { - return x.ImageType - } - return "" -} - -func (x *UpdateNodePoolRequest) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *UpdateNodePoolRequest) GetLocations() []string { - if x != nil { - return x.Locations - } - return nil -} - -func (x *UpdateNodePoolRequest) GetWorkloadMetadataConfig() *WorkloadMetadataConfig { - if x != nil { - return x.WorkloadMetadataConfig - } - return nil -} - -func (x *UpdateNodePoolRequest) GetUpgradeSettings() *NodePool_UpgradeSettings { - if x != nil { - return x.UpgradeSettings - } - return nil -} - -func (x *UpdateNodePoolRequest) GetTags() *NetworkTags { - if x != nil { - return x.Tags - } - return nil -} - -func (x *UpdateNodePoolRequest) GetTaints() *NodeTaints { - if x != nil { - return x.Taints - } - return nil -} - -func (x *UpdateNodePoolRequest) GetLabels() *NodeLabels { - if x != nil { - return x.Labels - } - return nil -} - -func (x *UpdateNodePoolRequest) GetLinuxNodeConfig() *LinuxNodeConfig { - if x != nil { - return x.LinuxNodeConfig - } - return nil -} - -func (x *UpdateNodePoolRequest) GetKubeletConfig() *NodeKubeletConfig { - if x != nil { - return x.KubeletConfig - } - return nil -} - -func (x *UpdateNodePoolRequest) GetNodeNetworkConfig() *NodeNetworkConfig { - if x != nil { - return x.NodeNetworkConfig - } - return nil -} - -func (x *UpdateNodePoolRequest) GetGcfsConfig() *GcfsConfig { - if x != nil { - return x.GcfsConfig - } - return nil -} - -func (x *UpdateNodePoolRequest) GetConfidentialNodes() *ConfidentialNodes { - if x != nil { - return x.ConfidentialNodes - } - return nil -} - -func (x *UpdateNodePoolRequest) GetGvnic() *VirtualNIC { - if x != nil { - return x.Gvnic - } - return nil -} - -func (x *UpdateNodePoolRequest) GetEtag() string { - if x != nil { - return x.Etag - } - return "" -} - -func (x *UpdateNodePoolRequest) GetFastSocket() *FastSocket { - if x != nil { - return x.FastSocket - } - return nil -} - -func (x *UpdateNodePoolRequest) GetLoggingConfig() *NodePoolLoggingConfig { - if x != nil { - return x.LoggingConfig - } - return nil -} - -func (x *UpdateNodePoolRequest) GetResourceLabels() *ResourceLabels { - if x != nil { - return x.ResourceLabels - } - return nil -} - -func (x *UpdateNodePoolRequest) GetWindowsNodeConfig() *WindowsNodeConfig { - if x != nil { - return x.WindowsNodeConfig - } - return nil -} - -func (x *UpdateNodePoolRequest) GetAccelerators() []*AcceleratorConfig { - if x != nil { - return x.Accelerators - } - return nil -} - -func (x *UpdateNodePoolRequest) GetMachineType() string { - if x != nil { - return x.MachineType - } - return "" -} - -func (x *UpdateNodePoolRequest) GetDiskType() string { - if x != nil { - return x.DiskType - } - return "" -} - -func (x *UpdateNodePoolRequest) GetDiskSizeGb() int64 { - if x != nil { - return x.DiskSizeGb - } - return 0 -} - -func (x *UpdateNodePoolRequest) GetResourceManagerTags() *ResourceManagerTags { - if x != nil { - return x.ResourceManagerTags - } - return nil -} - -func (x *UpdateNodePoolRequest) GetContainerdConfig() *ContainerdConfig { - if x != nil { - return x.ContainerdConfig - } - return nil -} - -func (x *UpdateNodePoolRequest) GetQueuedProvisioning() *NodePool_QueuedProvisioning { - if x != nil { - return x.QueuedProvisioning - } - return nil -} - -func (x *UpdateNodePoolRequest) GetStoragePools() []string { - if x != nil { - return x.StoragePools - } - return nil -} - -func (x *UpdateNodePoolRequest) GetMaxRunDuration() *durationpb.Duration { - if x != nil { - return x.MaxRunDuration - } - return nil -} - -func (x *UpdateNodePoolRequest) GetFlexStart() bool { - if x != nil && x.FlexStart != nil { - return *x.FlexStart - } - return false -} - -func (x *UpdateNodePoolRequest) GetBootDisk() *BootDisk { - if x != nil { - return x.BootDisk - } - return nil -} - -func (x *UpdateNodePoolRequest) GetNodeDrainConfig() *NodePool_NodeDrainConfig { - if x != nil { - return x.NodeDrainConfig - } - return nil -} - -func (x *UpdateNodePoolRequest) GetConsolidationDelay() *durationpb.Duration { - if x != nil { - return x.ConsolidationDelay - } - return nil -} - -// SetNodePoolAutoscalingRequest sets the autoscaler settings of a node pool. -type SetNodePoolAutoscalingRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Deprecated. The Google Developers Console [project ID or project - // number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). - // This field has been deprecated and replaced by the name field. - // - // Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. - ProjectId string `protobuf:"bytes,1,opt,name=project_id,json=projectId,proto3" json:"project_id,omitempty"` - // Deprecated. The name of the Google Compute Engine - // [zone](https://cloud.google.com/compute/docs/zones#available) - // in which the cluster resides. This field has been deprecated and replaced - // by the name field. - // - // Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. - Zone string `protobuf:"bytes,2,opt,name=zone,proto3" json:"zone,omitempty"` - // Deprecated. The name of the cluster to upgrade. - // This field has been deprecated and replaced by the name field. - // - // Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. - ClusterId string `protobuf:"bytes,3,opt,name=cluster_id,json=clusterId,proto3" json:"cluster_id,omitempty"` - // Deprecated. The name of the node pool to upgrade. - // This field has been deprecated and replaced by the name field. - // - // Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. - NodePoolId string `protobuf:"bytes,4,opt,name=node_pool_id,json=nodePoolId,proto3" json:"node_pool_id,omitempty"` - // Required. Autoscaling configuration for the node pool. - Autoscaling *NodePoolAutoscaling `protobuf:"bytes,5,opt,name=autoscaling,proto3" json:"autoscaling,omitempty"` - // The name (project, location, cluster, node pool) of the node pool to set - // autoscaler settings. Specified in the format - // `projects/*/locations/*/clusters/*/nodePools/*`. - Name string `protobuf:"bytes,6,opt,name=name,proto3" json:"name,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *SetNodePoolAutoscalingRequest) Reset() { - *x = SetNodePoolAutoscalingRequest{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[76] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *SetNodePoolAutoscalingRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SetNodePoolAutoscalingRequest) ProtoMessage() {} - -func (x *SetNodePoolAutoscalingRequest) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[76] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SetNodePoolAutoscalingRequest.ProtoReflect.Descriptor instead. -func (*SetNodePoolAutoscalingRequest) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{76} -} - -// Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. -func (x *SetNodePoolAutoscalingRequest) GetProjectId() string { - if x != nil { - return x.ProjectId - } - return "" -} - -// Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. -func (x *SetNodePoolAutoscalingRequest) GetZone() string { - if x != nil { - return x.Zone - } - return "" -} - -// Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. -func (x *SetNodePoolAutoscalingRequest) GetClusterId() string { - if x != nil { - return x.ClusterId - } - return "" -} - -// Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. -func (x *SetNodePoolAutoscalingRequest) GetNodePoolId() string { - if x != nil { - return x.NodePoolId - } - return "" -} - -func (x *SetNodePoolAutoscalingRequest) GetAutoscaling() *NodePoolAutoscaling { - if x != nil { - return x.Autoscaling - } - return nil -} - -func (x *SetNodePoolAutoscalingRequest) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -// SetLoggingServiceRequest sets the logging service of a cluster. -type SetLoggingServiceRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Deprecated. The Google Developers Console [project ID or project - // number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). - // This field has been deprecated and replaced by the name field. - // - // Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. - ProjectId string `protobuf:"bytes,1,opt,name=project_id,json=projectId,proto3" json:"project_id,omitempty"` - // Deprecated. The name of the Google Compute Engine - // [zone](https://cloud.google.com/compute/docs/zones#available) - // in which the cluster resides. This field has been deprecated and replaced - // by the name field. - // - // Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. - Zone string `protobuf:"bytes,2,opt,name=zone,proto3" json:"zone,omitempty"` - // Deprecated. The name of the cluster to upgrade. - // This field has been deprecated and replaced by the name field. - // - // Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. - ClusterId string `protobuf:"bytes,3,opt,name=cluster_id,json=clusterId,proto3" json:"cluster_id,omitempty"` - // Required. The logging service the cluster should use to write logs. - // Currently available options: - // - // * `logging.googleapis.com/kubernetes` - The Cloud Logging - // service with a Kubernetes-native resource model - // - `logging.googleapis.com` - The legacy Cloud Logging service (no longer - // available as of GKE 1.15). - // - `none` - no logs will be exported from the cluster. - // - // If left as an empty string,`logging.googleapis.com/kubernetes` will be - // used for GKE 1.14+ or `logging.googleapis.com` for earlier versions. - LoggingService string `protobuf:"bytes,4,opt,name=logging_service,json=loggingService,proto3" json:"logging_service,omitempty"` - // The name (project, location, cluster) of the cluster to set logging. - // Specified in the format `projects/*/locations/*/clusters/*`. - Name string `protobuf:"bytes,5,opt,name=name,proto3" json:"name,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *SetLoggingServiceRequest) Reset() { - *x = SetLoggingServiceRequest{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[77] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *SetLoggingServiceRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SetLoggingServiceRequest) ProtoMessage() {} - -func (x *SetLoggingServiceRequest) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[77] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SetLoggingServiceRequest.ProtoReflect.Descriptor instead. -func (*SetLoggingServiceRequest) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{77} -} - -// Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. -func (x *SetLoggingServiceRequest) GetProjectId() string { - if x != nil { - return x.ProjectId - } - return "" -} - -// Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. -func (x *SetLoggingServiceRequest) GetZone() string { - if x != nil { - return x.Zone - } - return "" -} - -// Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. -func (x *SetLoggingServiceRequest) GetClusterId() string { - if x != nil { - return x.ClusterId - } - return "" -} - -func (x *SetLoggingServiceRequest) GetLoggingService() string { - if x != nil { - return x.LoggingService - } - return "" -} - -func (x *SetLoggingServiceRequest) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -// SetMonitoringServiceRequest sets the monitoring service of a cluster. -type SetMonitoringServiceRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Deprecated. The Google Developers Console [project ID or project - // number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). - // This field has been deprecated and replaced by the name field. - // - // Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. - ProjectId string `protobuf:"bytes,1,opt,name=project_id,json=projectId,proto3" json:"project_id,omitempty"` - // Deprecated. The name of the Google Compute Engine - // [zone](https://cloud.google.com/compute/docs/zones#available) - // in which the cluster resides. This field has been deprecated and replaced - // by the name field. - // - // Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. - Zone string `protobuf:"bytes,2,opt,name=zone,proto3" json:"zone,omitempty"` - // Deprecated. The name of the cluster to upgrade. - // This field has been deprecated and replaced by the name field. - // - // Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. - ClusterId string `protobuf:"bytes,3,opt,name=cluster_id,json=clusterId,proto3" json:"cluster_id,omitempty"` - // Required. The monitoring service the cluster should use to write metrics. - // Currently available options: - // - // * `monitoring.googleapis.com/kubernetes` - The Cloud Monitoring - // service with a Kubernetes-native resource model - // - `monitoring.googleapis.com` - The legacy Cloud Monitoring service (no - // longer available as of GKE 1.15). - // - `none` - No metrics will be exported from the cluster. - // - // If left as an empty string,`monitoring.googleapis.com/kubernetes` will be - // used for GKE 1.14+ or `monitoring.googleapis.com` for earlier versions. - MonitoringService string `protobuf:"bytes,4,opt,name=monitoring_service,json=monitoringService,proto3" json:"monitoring_service,omitempty"` - // The name (project, location, cluster) of the cluster to set monitoring. - // Specified in the format `projects/*/locations/*/clusters/*`. - Name string `protobuf:"bytes,6,opt,name=name,proto3" json:"name,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *SetMonitoringServiceRequest) Reset() { - *x = SetMonitoringServiceRequest{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[78] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *SetMonitoringServiceRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SetMonitoringServiceRequest) ProtoMessage() {} - -func (x *SetMonitoringServiceRequest) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[78] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SetMonitoringServiceRequest.ProtoReflect.Descriptor instead. -func (*SetMonitoringServiceRequest) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{78} -} - -// Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. -func (x *SetMonitoringServiceRequest) GetProjectId() string { - if x != nil { - return x.ProjectId - } - return "" -} - -// Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. -func (x *SetMonitoringServiceRequest) GetZone() string { - if x != nil { - return x.Zone - } - return "" -} - -// Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. -func (x *SetMonitoringServiceRequest) GetClusterId() string { - if x != nil { - return x.ClusterId - } - return "" -} - -func (x *SetMonitoringServiceRequest) GetMonitoringService() string { - if x != nil { - return x.MonitoringService - } - return "" -} - -func (x *SetMonitoringServiceRequest) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -// SetAddonsConfigRequest sets the addons associated with the cluster. -type SetAddonsConfigRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Deprecated. The Google Developers Console [project ID or project - // number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). - // This field has been deprecated and replaced by the name field. - // - // Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. - ProjectId string `protobuf:"bytes,1,opt,name=project_id,json=projectId,proto3" json:"project_id,omitempty"` - // Deprecated. The name of the Google Compute Engine - // [zone](https://cloud.google.com/compute/docs/zones#available) - // in which the cluster resides. This field has been deprecated and replaced - // by the name field. - // - // Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. - Zone string `protobuf:"bytes,2,opt,name=zone,proto3" json:"zone,omitempty"` - // Deprecated. The name of the cluster to upgrade. - // This field has been deprecated and replaced by the name field. - // - // Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. - ClusterId string `protobuf:"bytes,3,opt,name=cluster_id,json=clusterId,proto3" json:"cluster_id,omitempty"` - // Required. The desired configurations for the various addons available to - // run in the cluster. - AddonsConfig *AddonsConfig `protobuf:"bytes,4,opt,name=addons_config,json=addonsConfig,proto3" json:"addons_config,omitempty"` - // The name (project, location, cluster) of the cluster to set addons. - // Specified in the format `projects/*/locations/*/clusters/*`. - Name string `protobuf:"bytes,6,opt,name=name,proto3" json:"name,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *SetAddonsConfigRequest) Reset() { - *x = SetAddonsConfigRequest{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[79] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *SetAddonsConfigRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SetAddonsConfigRequest) ProtoMessage() {} - -func (x *SetAddonsConfigRequest) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[79] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SetAddonsConfigRequest.ProtoReflect.Descriptor instead. -func (*SetAddonsConfigRequest) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{79} -} - -// Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. -func (x *SetAddonsConfigRequest) GetProjectId() string { - if x != nil { - return x.ProjectId - } - return "" -} - -// Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. -func (x *SetAddonsConfigRequest) GetZone() string { - if x != nil { - return x.Zone - } - return "" -} - -// Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. -func (x *SetAddonsConfigRequest) GetClusterId() string { - if x != nil { - return x.ClusterId - } - return "" -} - -func (x *SetAddonsConfigRequest) GetAddonsConfig() *AddonsConfig { - if x != nil { - return x.AddonsConfig - } - return nil -} - -func (x *SetAddonsConfigRequest) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -// SetLocationsRequest sets the locations of the cluster. -type SetLocationsRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Deprecated. The Google Developers Console [project ID or project - // number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). - // This field has been deprecated and replaced by the name field. - // - // Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. - ProjectId string `protobuf:"bytes,1,opt,name=project_id,json=projectId,proto3" json:"project_id,omitempty"` - // Deprecated. The name of the Google Compute Engine - // [zone](https://cloud.google.com/compute/docs/zones#available) - // in which the cluster resides. This field has been deprecated and replaced - // by the name field. - // - // Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. - Zone string `protobuf:"bytes,2,opt,name=zone,proto3" json:"zone,omitempty"` - // Deprecated. The name of the cluster to upgrade. - // This field has been deprecated and replaced by the name field. - // - // Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. - ClusterId string `protobuf:"bytes,3,opt,name=cluster_id,json=clusterId,proto3" json:"cluster_id,omitempty"` - // Required. The desired list of Google Compute Engine - // [zones](https://cloud.google.com/compute/docs/zones#available) - // in which the cluster's nodes should be located. Changing the locations a - // cluster is in will result in nodes being either created or removed from the - // cluster, depending on whether locations are being added or removed. - // - // This list must always include the cluster's primary zone. - Locations []string `protobuf:"bytes,4,rep,name=locations,proto3" json:"locations,omitempty"` - // The name (project, location, cluster) of the cluster to set locations. - // Specified in the format `projects/*/locations/*/clusters/*`. - Name string `protobuf:"bytes,6,opt,name=name,proto3" json:"name,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *SetLocationsRequest) Reset() { - *x = SetLocationsRequest{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[80] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *SetLocationsRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SetLocationsRequest) ProtoMessage() {} - -func (x *SetLocationsRequest) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[80] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SetLocationsRequest.ProtoReflect.Descriptor instead. -func (*SetLocationsRequest) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{80} -} - -// Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. -func (x *SetLocationsRequest) GetProjectId() string { - if x != nil { - return x.ProjectId - } - return "" -} - -// Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. -func (x *SetLocationsRequest) GetZone() string { - if x != nil { - return x.Zone - } - return "" -} - -// Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. -func (x *SetLocationsRequest) GetClusterId() string { - if x != nil { - return x.ClusterId - } - return "" -} - -func (x *SetLocationsRequest) GetLocations() []string { - if x != nil { - return x.Locations - } - return nil -} - -func (x *SetLocationsRequest) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -// UpdateMasterRequest updates the master of the cluster. -type UpdateMasterRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Deprecated. The Google Developers Console [project ID or project - // number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). - // This field has been deprecated and replaced by the name field. - // - // Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. - ProjectId string `protobuf:"bytes,1,opt,name=project_id,json=projectId,proto3" json:"project_id,omitempty"` - // Deprecated. The name of the Google Compute Engine - // [zone](https://cloud.google.com/compute/docs/zones#available) - // in which the cluster resides. This field has been deprecated and replaced - // by the name field. - // - // Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. - Zone string `protobuf:"bytes,2,opt,name=zone,proto3" json:"zone,omitempty"` - // Deprecated. The name of the cluster to upgrade. - // This field has been deprecated and replaced by the name field. - // - // Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. - ClusterId string `protobuf:"bytes,3,opt,name=cluster_id,json=clusterId,proto3" json:"cluster_id,omitempty"` - // Required. The Kubernetes version to change the master to. - // - // Users may specify either explicit versions offered by Kubernetes Engine or - // version aliases, which have the following behavior: - // - // - "latest": picks the highest valid Kubernetes version - // - "1.X": picks the highest valid patch+gke.N patch in the 1.X version - // - "1.X.Y": picks the highest valid gke.N patch in the 1.X.Y version - // - "1.X.Y-gke.N": picks an explicit Kubernetes version - // - "-": picks the default Kubernetes version - MasterVersion string `protobuf:"bytes,4,opt,name=master_version,json=masterVersion,proto3" json:"master_version,omitempty"` - // The name (project, location, cluster) of the cluster to update. - // Specified in the format `projects/*/locations/*/clusters/*`. - Name string `protobuf:"bytes,7,opt,name=name,proto3" json:"name,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *UpdateMasterRequest) Reset() { - *x = UpdateMasterRequest{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[81] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *UpdateMasterRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UpdateMasterRequest) ProtoMessage() {} - -func (x *UpdateMasterRequest) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[81] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use UpdateMasterRequest.ProtoReflect.Descriptor instead. -func (*UpdateMasterRequest) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{81} -} - -// Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. -func (x *UpdateMasterRequest) GetProjectId() string { - if x != nil { - return x.ProjectId - } - return "" -} - -// Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. -func (x *UpdateMasterRequest) GetZone() string { - if x != nil { - return x.Zone - } - return "" -} - -// Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. -func (x *UpdateMasterRequest) GetClusterId() string { - if x != nil { - return x.ClusterId - } - return "" -} - -func (x *UpdateMasterRequest) GetMasterVersion() string { - if x != nil { - return x.MasterVersion - } - return "" -} - -func (x *UpdateMasterRequest) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -// SetMasterAuthRequest updates the admin password of a cluster. -type SetMasterAuthRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Deprecated. The Google Developers Console [project ID or project - // number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). - // This field has been deprecated and replaced by the name field. - // - // Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. - ProjectId string `protobuf:"bytes,1,opt,name=project_id,json=projectId,proto3" json:"project_id,omitempty"` - // Deprecated. The name of the Google Compute Engine - // [zone](https://cloud.google.com/compute/docs/zones#available) - // in which the cluster resides. This field has been deprecated and replaced - // by the name field. - // - // Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. - Zone string `protobuf:"bytes,2,opt,name=zone,proto3" json:"zone,omitempty"` - // Deprecated. The name of the cluster to upgrade. - // This field has been deprecated and replaced by the name field. - // - // Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. - ClusterId string `protobuf:"bytes,3,opt,name=cluster_id,json=clusterId,proto3" json:"cluster_id,omitempty"` - // Required. The exact form of action to be taken on the master auth. - Action SetMasterAuthRequest_Action `protobuf:"varint,4,opt,name=action,proto3,enum=google.container.v1.SetMasterAuthRequest_Action" json:"action,omitempty"` - // Required. A description of the update. - Update *MasterAuth `protobuf:"bytes,5,opt,name=update,proto3" json:"update,omitempty"` - // The name (project, location, cluster) of the cluster to set auth. - // Specified in the format `projects/*/locations/*/clusters/*`. - Name string `protobuf:"bytes,7,opt,name=name,proto3" json:"name,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *SetMasterAuthRequest) Reset() { - *x = SetMasterAuthRequest{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[82] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *SetMasterAuthRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SetMasterAuthRequest) ProtoMessage() {} - -func (x *SetMasterAuthRequest) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[82] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SetMasterAuthRequest.ProtoReflect.Descriptor instead. -func (*SetMasterAuthRequest) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{82} -} - -// Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. -func (x *SetMasterAuthRequest) GetProjectId() string { - if x != nil { - return x.ProjectId - } - return "" -} - -// Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. -func (x *SetMasterAuthRequest) GetZone() string { - if x != nil { - return x.Zone - } - return "" -} - -// Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. -func (x *SetMasterAuthRequest) GetClusterId() string { - if x != nil { - return x.ClusterId - } - return "" -} - -func (x *SetMasterAuthRequest) GetAction() SetMasterAuthRequest_Action { - if x != nil { - return x.Action - } - return SetMasterAuthRequest_UNKNOWN -} - -func (x *SetMasterAuthRequest) GetUpdate() *MasterAuth { - if x != nil { - return x.Update - } - return nil -} - -func (x *SetMasterAuthRequest) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -// DeleteClusterRequest deletes a cluster. -type DeleteClusterRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Deprecated. The Google Developers Console [project ID or project - // number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). - // This field has been deprecated and replaced by the name field. - // - // Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. - ProjectId string `protobuf:"bytes,1,opt,name=project_id,json=projectId,proto3" json:"project_id,omitempty"` - // Deprecated. The name of the Google Compute Engine - // [zone](https://cloud.google.com/compute/docs/zones#available) - // in which the cluster resides. This field has been deprecated and replaced - // by the name field. - // - // Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. - Zone string `protobuf:"bytes,2,opt,name=zone,proto3" json:"zone,omitempty"` - // Deprecated. The name of the cluster to delete. - // This field has been deprecated and replaced by the name field. - // - // Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. - ClusterId string `protobuf:"bytes,3,opt,name=cluster_id,json=clusterId,proto3" json:"cluster_id,omitempty"` - // The name (project, location, cluster) of the cluster to delete. - // Specified in the format `projects/*/locations/*/clusters/*`. - Name string `protobuf:"bytes,4,opt,name=name,proto3" json:"name,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *DeleteClusterRequest) Reset() { - *x = DeleteClusterRequest{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[83] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *DeleteClusterRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DeleteClusterRequest) ProtoMessage() {} - -func (x *DeleteClusterRequest) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[83] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DeleteClusterRequest.ProtoReflect.Descriptor instead. -func (*DeleteClusterRequest) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{83} -} - -// Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. -func (x *DeleteClusterRequest) GetProjectId() string { - if x != nil { - return x.ProjectId - } - return "" -} - -// Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. -func (x *DeleteClusterRequest) GetZone() string { - if x != nil { - return x.Zone - } - return "" -} - -// Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. -func (x *DeleteClusterRequest) GetClusterId() string { - if x != nil { - return x.ClusterId - } - return "" -} - -func (x *DeleteClusterRequest) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -// ListClustersRequest lists clusters. -type ListClustersRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Deprecated. The Google Developers Console [project ID or project - // number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). - // This field has been deprecated and replaced by the parent field. - // - // Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. - ProjectId string `protobuf:"bytes,1,opt,name=project_id,json=projectId,proto3" json:"project_id,omitempty"` - // Deprecated. The name of the Google Compute Engine - // [zone](https://cloud.google.com/compute/docs/zones#available) - // in which the cluster resides, or "-" for all zones. This field has been - // deprecated and replaced by the parent field. - // - // Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. - Zone string `protobuf:"bytes,2,opt,name=zone,proto3" json:"zone,omitempty"` - // The parent (project and location) where the clusters will be listed. - // Specified in the format `projects/*/locations/*`. - // Location "-" matches all zones and all regions. - Parent string `protobuf:"bytes,4,opt,name=parent,proto3" json:"parent,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ListClustersRequest) Reset() { - *x = ListClustersRequest{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[84] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ListClustersRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListClustersRequest) ProtoMessage() {} - -func (x *ListClustersRequest) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[84] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ListClustersRequest.ProtoReflect.Descriptor instead. -func (*ListClustersRequest) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{84} -} - -// Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. -func (x *ListClustersRequest) GetProjectId() string { - if x != nil { - return x.ProjectId - } - return "" -} - -// Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. -func (x *ListClustersRequest) GetZone() string { - if x != nil { - return x.Zone - } - return "" -} - -func (x *ListClustersRequest) GetParent() string { - if x != nil { - return x.Parent - } - return "" -} - -// ListClustersResponse is the result of ListClustersRequest. -type ListClustersResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - // A list of clusters in the project in the specified zone, or - // across all ones. - Clusters []*Cluster `protobuf:"bytes,1,rep,name=clusters,proto3" json:"clusters,omitempty"` - // If any zones are listed here, the list of clusters returned - // may be missing those zones. - MissingZones []string `protobuf:"bytes,2,rep,name=missing_zones,json=missingZones,proto3" json:"missing_zones,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ListClustersResponse) Reset() { - *x = ListClustersResponse{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[85] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ListClustersResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListClustersResponse) ProtoMessage() {} - -func (x *ListClustersResponse) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[85] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ListClustersResponse.ProtoReflect.Descriptor instead. -func (*ListClustersResponse) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{85} -} - -func (x *ListClustersResponse) GetClusters() []*Cluster { - if x != nil { - return x.Clusters - } - return nil -} - -func (x *ListClustersResponse) GetMissingZones() []string { - if x != nil { - return x.MissingZones - } - return nil -} - -// GetOperationRequest gets a single operation. -type GetOperationRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Deprecated. The Google Developers Console [project ID or project - // number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). - // This field has been deprecated and replaced by the name field. - // - // Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. - ProjectId string `protobuf:"bytes,1,opt,name=project_id,json=projectId,proto3" json:"project_id,omitempty"` - // Deprecated. The name of the Google Compute Engine - // [zone](https://cloud.google.com/compute/docs/zones#available) - // in which the cluster resides. This field has been deprecated and replaced - // by the name field. - // - // Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. - Zone string `protobuf:"bytes,2,opt,name=zone,proto3" json:"zone,omitempty"` - // Deprecated. The server-assigned `name` of the operation. - // This field has been deprecated and replaced by the name field. - // - // Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. - OperationId string `protobuf:"bytes,3,opt,name=operation_id,json=operationId,proto3" json:"operation_id,omitempty"` - // The name (project, location, operation id) of the operation to get. - // Specified in the format `projects/*/locations/*/operations/*`. - Name string `protobuf:"bytes,5,opt,name=name,proto3" json:"name,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *GetOperationRequest) Reset() { - *x = GetOperationRequest{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[86] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *GetOperationRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetOperationRequest) ProtoMessage() {} - -func (x *GetOperationRequest) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[86] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetOperationRequest.ProtoReflect.Descriptor instead. -func (*GetOperationRequest) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{86} -} - -// Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. -func (x *GetOperationRequest) GetProjectId() string { - if x != nil { - return x.ProjectId - } - return "" -} - -// Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. -func (x *GetOperationRequest) GetZone() string { - if x != nil { - return x.Zone - } - return "" -} - -// Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. -func (x *GetOperationRequest) GetOperationId() string { - if x != nil { - return x.OperationId - } - return "" -} - -func (x *GetOperationRequest) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -// ListOperationsRequest lists operations. -type ListOperationsRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Deprecated. The Google Developers Console [project ID or project - // number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). - // This field has been deprecated and replaced by the parent field. - // - // Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. - ProjectId string `protobuf:"bytes,1,opt,name=project_id,json=projectId,proto3" json:"project_id,omitempty"` - // Deprecated. The name of the Google Compute Engine - // [zone](https://cloud.google.com/compute/docs/zones#available) - // to return operations for, or `-` for all zones. This field has been - // deprecated and replaced by the parent field. - // - // Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. - Zone string `protobuf:"bytes,2,opt,name=zone,proto3" json:"zone,omitempty"` - // The parent (project and location) where the operations will be listed. - // Specified in the format `projects/*/locations/*`. - // Location "-" matches all zones and all regions. - Parent string `protobuf:"bytes,4,opt,name=parent,proto3" json:"parent,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ListOperationsRequest) Reset() { - *x = ListOperationsRequest{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[87] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ListOperationsRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListOperationsRequest) ProtoMessage() {} - -func (x *ListOperationsRequest) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[87] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ListOperationsRequest.ProtoReflect.Descriptor instead. -func (*ListOperationsRequest) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{87} -} - -// Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. -func (x *ListOperationsRequest) GetProjectId() string { - if x != nil { - return x.ProjectId - } - return "" -} - -// Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. -func (x *ListOperationsRequest) GetZone() string { - if x != nil { - return x.Zone - } - return "" -} - -func (x *ListOperationsRequest) GetParent() string { - if x != nil { - return x.Parent - } - return "" -} - -// CancelOperationRequest cancels a single operation. -type CancelOperationRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Deprecated. The Google Developers Console [project ID or project - // number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). - // This field has been deprecated and replaced by the name field. - // - // Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. - ProjectId string `protobuf:"bytes,1,opt,name=project_id,json=projectId,proto3" json:"project_id,omitempty"` - // Deprecated. The name of the Google Compute Engine - // [zone](https://cloud.google.com/compute/docs/zones#available) - // in which the operation resides. This field has been deprecated and replaced - // by the name field. - // - // Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. - Zone string `protobuf:"bytes,2,opt,name=zone,proto3" json:"zone,omitempty"` - // Deprecated. The server-assigned `name` of the operation. - // This field has been deprecated and replaced by the name field. - // - // Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. - OperationId string `protobuf:"bytes,3,opt,name=operation_id,json=operationId,proto3" json:"operation_id,omitempty"` - // The name (project, location, operation id) of the operation to cancel. - // Specified in the format `projects/*/locations/*/operations/*`. - Name string `protobuf:"bytes,4,opt,name=name,proto3" json:"name,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *CancelOperationRequest) Reset() { - *x = CancelOperationRequest{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[88] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *CancelOperationRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CancelOperationRequest) ProtoMessage() {} - -func (x *CancelOperationRequest) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[88] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CancelOperationRequest.ProtoReflect.Descriptor instead. -func (*CancelOperationRequest) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{88} -} - -// Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. -func (x *CancelOperationRequest) GetProjectId() string { - if x != nil { - return x.ProjectId - } - return "" -} - -// Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. -func (x *CancelOperationRequest) GetZone() string { - if x != nil { - return x.Zone - } - return "" -} - -// Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. -func (x *CancelOperationRequest) GetOperationId() string { - if x != nil { - return x.OperationId - } - return "" -} - -func (x *CancelOperationRequest) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -// ListOperationsResponse is the result of ListOperationsRequest. -type ListOperationsResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - // A list of operations in the project in the specified zone. - Operations []*Operation `protobuf:"bytes,1,rep,name=operations,proto3" json:"operations,omitempty"` - // If any zones are listed here, the list of operations returned - // may be missing the operations from those zones. - MissingZones []string `protobuf:"bytes,2,rep,name=missing_zones,json=missingZones,proto3" json:"missing_zones,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ListOperationsResponse) Reset() { - *x = ListOperationsResponse{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[89] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ListOperationsResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListOperationsResponse) ProtoMessage() {} - -func (x *ListOperationsResponse) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[89] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ListOperationsResponse.ProtoReflect.Descriptor instead. -func (*ListOperationsResponse) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{89} -} - -func (x *ListOperationsResponse) GetOperations() []*Operation { - if x != nil { - return x.Operations - } - return nil -} - -func (x *ListOperationsResponse) GetMissingZones() []string { - if x != nil { - return x.MissingZones - } - return nil -} - -// Gets the current Kubernetes Engine service configuration. -type GetServerConfigRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Deprecated. The Google Developers Console [project ID or project - // number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). - // This field has been deprecated and replaced by the name field. - // - // Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. - ProjectId string `protobuf:"bytes,1,opt,name=project_id,json=projectId,proto3" json:"project_id,omitempty"` - // Deprecated. The name of the Google Compute Engine - // [zone](https://cloud.google.com/compute/docs/zones#available) - // to return operations for. This field has been deprecated and replaced by - // the name field. - // - // Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. - Zone string `protobuf:"bytes,2,opt,name=zone,proto3" json:"zone,omitempty"` - // The name (project and location) of the server config to get, - // specified in the format `projects/*/locations/*`. - Name string `protobuf:"bytes,4,opt,name=name,proto3" json:"name,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *GetServerConfigRequest) Reset() { - *x = GetServerConfigRequest{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[90] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *GetServerConfigRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetServerConfigRequest) ProtoMessage() {} - -func (x *GetServerConfigRequest) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[90] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetServerConfigRequest.ProtoReflect.Descriptor instead. -func (*GetServerConfigRequest) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{90} -} - -// Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. -func (x *GetServerConfigRequest) GetProjectId() string { - if x != nil { - return x.ProjectId - } - return "" -} - -// Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. -func (x *GetServerConfigRequest) GetZone() string { - if x != nil { - return x.Zone - } - return "" -} - -func (x *GetServerConfigRequest) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -// Kubernetes Engine service configuration. -type ServerConfig struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Version of Kubernetes the service deploys by default. - DefaultClusterVersion string `protobuf:"bytes,1,opt,name=default_cluster_version,json=defaultClusterVersion,proto3" json:"default_cluster_version,omitempty"` - // List of valid node upgrade target versions, in descending order. - ValidNodeVersions []string `protobuf:"bytes,3,rep,name=valid_node_versions,json=validNodeVersions,proto3" json:"valid_node_versions,omitempty"` - // Default image type. - DefaultImageType string `protobuf:"bytes,4,opt,name=default_image_type,json=defaultImageType,proto3" json:"default_image_type,omitempty"` - // List of valid image types. - ValidImageTypes []string `protobuf:"bytes,5,rep,name=valid_image_types,json=validImageTypes,proto3" json:"valid_image_types,omitempty"` - // List of valid master versions, in descending order. - ValidMasterVersions []string `protobuf:"bytes,6,rep,name=valid_master_versions,json=validMasterVersions,proto3" json:"valid_master_versions,omitempty"` - // List of release channel configurations. - Channels []*ServerConfig_ReleaseChannelConfig `protobuf:"bytes,9,rep,name=channels,proto3" json:"channels,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ServerConfig) Reset() { - *x = ServerConfig{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[91] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ServerConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ServerConfig) ProtoMessage() {} - -func (x *ServerConfig) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[91] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ServerConfig.ProtoReflect.Descriptor instead. -func (*ServerConfig) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{91} -} - -func (x *ServerConfig) GetDefaultClusterVersion() string { - if x != nil { - return x.DefaultClusterVersion - } - return "" -} - -func (x *ServerConfig) GetValidNodeVersions() []string { - if x != nil { - return x.ValidNodeVersions - } - return nil -} - -func (x *ServerConfig) GetDefaultImageType() string { - if x != nil { - return x.DefaultImageType - } - return "" -} - -func (x *ServerConfig) GetValidImageTypes() []string { - if x != nil { - return x.ValidImageTypes - } - return nil -} - -func (x *ServerConfig) GetValidMasterVersions() []string { - if x != nil { - return x.ValidMasterVersions - } - return nil -} - -func (x *ServerConfig) GetChannels() []*ServerConfig_ReleaseChannelConfig { - if x != nil { - return x.Channels - } - return nil -} - -// CreateNodePoolRequest creates a node pool for a cluster. -type CreateNodePoolRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Deprecated. The Google Developers Console [project ID or project - // number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). - // This field has been deprecated and replaced by the parent field. - // - // Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. - ProjectId string `protobuf:"bytes,1,opt,name=project_id,json=projectId,proto3" json:"project_id,omitempty"` - // Deprecated. The name of the Google Compute Engine - // [zone](https://cloud.google.com/compute/docs/zones#available) - // in which the cluster resides. This field has been deprecated and replaced - // by the parent field. - // - // Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. - Zone string `protobuf:"bytes,2,opt,name=zone,proto3" json:"zone,omitempty"` - // Deprecated. The name of the cluster. - // This field has been deprecated and replaced by the parent field. - // - // Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. - ClusterId string `protobuf:"bytes,3,opt,name=cluster_id,json=clusterId,proto3" json:"cluster_id,omitempty"` - // Required. The node pool to create. - NodePool *NodePool `protobuf:"bytes,4,opt,name=node_pool,json=nodePool,proto3" json:"node_pool,omitempty"` - // The parent (project, location, cluster name) where the node pool will be - // created. Specified in the format - // `projects/*/locations/*/clusters/*`. - Parent string `protobuf:"bytes,6,opt,name=parent,proto3" json:"parent,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *CreateNodePoolRequest) Reset() { - *x = CreateNodePoolRequest{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[92] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *CreateNodePoolRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CreateNodePoolRequest) ProtoMessage() {} - -func (x *CreateNodePoolRequest) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[92] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CreateNodePoolRequest.ProtoReflect.Descriptor instead. -func (*CreateNodePoolRequest) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{92} -} - -// Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. -func (x *CreateNodePoolRequest) GetProjectId() string { - if x != nil { - return x.ProjectId - } - return "" -} - -// Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. -func (x *CreateNodePoolRequest) GetZone() string { - if x != nil { - return x.Zone - } - return "" -} - -// Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. -func (x *CreateNodePoolRequest) GetClusterId() string { - if x != nil { - return x.ClusterId - } - return "" -} - -func (x *CreateNodePoolRequest) GetNodePool() *NodePool { - if x != nil { - return x.NodePool - } - return nil -} - -func (x *CreateNodePoolRequest) GetParent() string { - if x != nil { - return x.Parent - } - return "" -} - -// DeleteNodePoolRequest deletes a node pool for a cluster. -type DeleteNodePoolRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Deprecated. The Google Developers Console [project ID or project - // number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). - // This field has been deprecated and replaced by the name field. - // - // Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. - ProjectId string `protobuf:"bytes,1,opt,name=project_id,json=projectId,proto3" json:"project_id,omitempty"` - // Deprecated. The name of the Google Compute Engine - // [zone](https://cloud.google.com/compute/docs/zones#available) - // in which the cluster resides. This field has been deprecated and replaced - // by the name field. - // - // Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. - Zone string `protobuf:"bytes,2,opt,name=zone,proto3" json:"zone,omitempty"` - // Deprecated. The name of the cluster. - // This field has been deprecated and replaced by the name field. - // - // Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. - ClusterId string `protobuf:"bytes,3,opt,name=cluster_id,json=clusterId,proto3" json:"cluster_id,omitempty"` - // Deprecated. The name of the node pool to delete. - // This field has been deprecated and replaced by the name field. - // - // Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. - NodePoolId string `protobuf:"bytes,4,opt,name=node_pool_id,json=nodePoolId,proto3" json:"node_pool_id,omitempty"` - // The name (project, location, cluster, node pool id) of the node pool to - // delete. Specified in the format - // `projects/*/locations/*/clusters/*/nodePools/*`. - Name string `protobuf:"bytes,6,opt,name=name,proto3" json:"name,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *DeleteNodePoolRequest) Reset() { - *x = DeleteNodePoolRequest{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[93] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *DeleteNodePoolRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DeleteNodePoolRequest) ProtoMessage() {} - -func (x *DeleteNodePoolRequest) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[93] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DeleteNodePoolRequest.ProtoReflect.Descriptor instead. -func (*DeleteNodePoolRequest) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{93} -} - -// Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. -func (x *DeleteNodePoolRequest) GetProjectId() string { - if x != nil { - return x.ProjectId - } - return "" -} - -// Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. -func (x *DeleteNodePoolRequest) GetZone() string { - if x != nil { - return x.Zone - } - return "" -} - -// Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. -func (x *DeleteNodePoolRequest) GetClusterId() string { - if x != nil { - return x.ClusterId - } - return "" -} - -// Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. -func (x *DeleteNodePoolRequest) GetNodePoolId() string { - if x != nil { - return x.NodePoolId - } - return "" -} - -func (x *DeleteNodePoolRequest) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -// ListNodePoolsRequest lists the node pool(s) for a cluster. -type ListNodePoolsRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Deprecated. The Google Developers Console [project ID or project - // number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). - // This field has been deprecated and replaced by the parent field. - // - // Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. - ProjectId string `protobuf:"bytes,1,opt,name=project_id,json=projectId,proto3" json:"project_id,omitempty"` - // Deprecated. The name of the Google Compute Engine - // [zone](https://cloud.google.com/compute/docs/zones#available) - // in which the cluster resides. This field has been deprecated and replaced - // by the parent field. - // - // Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. - Zone string `protobuf:"bytes,2,opt,name=zone,proto3" json:"zone,omitempty"` - // Deprecated. The name of the cluster. - // This field has been deprecated and replaced by the parent field. - // - // Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. - ClusterId string `protobuf:"bytes,3,opt,name=cluster_id,json=clusterId,proto3" json:"cluster_id,omitempty"` - // The parent (project, location, cluster name) where the node pools will be - // listed. Specified in the format `projects/*/locations/*/clusters/*`. - Parent string `protobuf:"bytes,5,opt,name=parent,proto3" json:"parent,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ListNodePoolsRequest) Reset() { - *x = ListNodePoolsRequest{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[94] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ListNodePoolsRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListNodePoolsRequest) ProtoMessage() {} - -func (x *ListNodePoolsRequest) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[94] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ListNodePoolsRequest.ProtoReflect.Descriptor instead. -func (*ListNodePoolsRequest) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{94} -} - -// Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. -func (x *ListNodePoolsRequest) GetProjectId() string { - if x != nil { - return x.ProjectId - } - return "" -} - -// Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. -func (x *ListNodePoolsRequest) GetZone() string { - if x != nil { - return x.Zone - } - return "" -} - -// Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. -func (x *ListNodePoolsRequest) GetClusterId() string { - if x != nil { - return x.ClusterId - } - return "" -} - -func (x *ListNodePoolsRequest) GetParent() string { - if x != nil { - return x.Parent - } - return "" -} - -// GetNodePoolRequest retrieves a node pool for a cluster. -type GetNodePoolRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Deprecated. The Google Developers Console [project ID or project - // number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). - // This field has been deprecated and replaced by the name field. - // - // Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. - ProjectId string `protobuf:"bytes,1,opt,name=project_id,json=projectId,proto3" json:"project_id,omitempty"` - // Deprecated. The name of the Google Compute Engine - // [zone](https://cloud.google.com/compute/docs/zones#available) - // in which the cluster resides. This field has been deprecated and replaced - // by the name field. - // - // Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. - Zone string `protobuf:"bytes,2,opt,name=zone,proto3" json:"zone,omitempty"` - // Deprecated. The name of the cluster. - // This field has been deprecated and replaced by the name field. - // - // Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. - ClusterId string `protobuf:"bytes,3,opt,name=cluster_id,json=clusterId,proto3" json:"cluster_id,omitempty"` - // Deprecated. The name of the node pool. - // This field has been deprecated and replaced by the name field. - // - // Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. - NodePoolId string `protobuf:"bytes,4,opt,name=node_pool_id,json=nodePoolId,proto3" json:"node_pool_id,omitempty"` - // The name (project, location, cluster, node pool id) of the node pool to - // get. Specified in the format - // `projects/*/locations/*/clusters/*/nodePools/*`. - Name string `protobuf:"bytes,6,opt,name=name,proto3" json:"name,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *GetNodePoolRequest) Reset() { - *x = GetNodePoolRequest{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[95] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *GetNodePoolRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetNodePoolRequest) ProtoMessage() {} - -func (x *GetNodePoolRequest) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[95] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetNodePoolRequest.ProtoReflect.Descriptor instead. -func (*GetNodePoolRequest) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{95} -} - -// Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. -func (x *GetNodePoolRequest) GetProjectId() string { - if x != nil { - return x.ProjectId - } - return "" -} - -// Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. -func (x *GetNodePoolRequest) GetZone() string { - if x != nil { - return x.Zone - } - return "" -} - -// Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. -func (x *GetNodePoolRequest) GetClusterId() string { - if x != nil { - return x.ClusterId - } - return "" -} - -// Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. -func (x *GetNodePoolRequest) GetNodePoolId() string { - if x != nil { - return x.NodePoolId - } - return "" -} - -func (x *GetNodePoolRequest) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -// Settings for blue-green upgrade. -type BlueGreenSettings struct { - state protoimpl.MessageState `protogen:"open.v1"` - // The rollout policy controls the general rollout progress of blue-green. - // - // Types that are valid to be assigned to RolloutPolicy: - // - // *BlueGreenSettings_StandardRolloutPolicy_ - // *BlueGreenSettings_AutoscaledRolloutPolicy_ - RolloutPolicy isBlueGreenSettings_RolloutPolicy `protobuf_oneof:"rollout_policy"` - // Time needed after draining entire blue pool. After this period, blue pool - // will be cleaned up. - NodePoolSoakDuration *durationpb.Duration `protobuf:"bytes,2,opt,name=node_pool_soak_duration,json=nodePoolSoakDuration,proto3,oneof" json:"node_pool_soak_duration,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *BlueGreenSettings) Reset() { - *x = BlueGreenSettings{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[96] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *BlueGreenSettings) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*BlueGreenSettings) ProtoMessage() {} - -func (x *BlueGreenSettings) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[96] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use BlueGreenSettings.ProtoReflect.Descriptor instead. -func (*BlueGreenSettings) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{96} -} - -func (x *BlueGreenSettings) GetRolloutPolicy() isBlueGreenSettings_RolloutPolicy { - if x != nil { - return x.RolloutPolicy - } - return nil -} - -func (x *BlueGreenSettings) GetStandardRolloutPolicy() *BlueGreenSettings_StandardRolloutPolicy { - if x != nil { - if x, ok := x.RolloutPolicy.(*BlueGreenSettings_StandardRolloutPolicy_); ok { - return x.StandardRolloutPolicy - } - } - return nil -} - -func (x *BlueGreenSettings) GetAutoscaledRolloutPolicy() *BlueGreenSettings_AutoscaledRolloutPolicy { - if x != nil { - if x, ok := x.RolloutPolicy.(*BlueGreenSettings_AutoscaledRolloutPolicy_); ok { - return x.AutoscaledRolloutPolicy - } - } - return nil -} - -func (x *BlueGreenSettings) GetNodePoolSoakDuration() *durationpb.Duration { - if x != nil { - return x.NodePoolSoakDuration - } - return nil -} - -type isBlueGreenSettings_RolloutPolicy interface { - isBlueGreenSettings_RolloutPolicy() -} - -type BlueGreenSettings_StandardRolloutPolicy_ struct { - // Standard policy for the blue-green upgrade. - StandardRolloutPolicy *BlueGreenSettings_StandardRolloutPolicy `protobuf:"bytes,1,opt,name=standard_rollout_policy,json=standardRolloutPolicy,proto3,oneof"` -} - -type BlueGreenSettings_AutoscaledRolloutPolicy_ struct { - // Autoscaled policy for cluster autoscaler enabled blue-green upgrade. - AutoscaledRolloutPolicy *BlueGreenSettings_AutoscaledRolloutPolicy `protobuf:"bytes,3,opt,name=autoscaled_rollout_policy,json=autoscaledRolloutPolicy,proto3,oneof"` -} - -func (*BlueGreenSettings_StandardRolloutPolicy_) isBlueGreenSettings_RolloutPolicy() {} - -func (*BlueGreenSettings_AutoscaledRolloutPolicy_) isBlueGreenSettings_RolloutPolicy() {} - -// NodePool contains the name and configuration for a cluster's node pool. -// Node pools are a set of nodes (i.e. VM's), with a common configuration and -// specification, under the control of the cluster master. They may have a set -// of Kubernetes labels applied to them, which may be used to reference them -// during pod scheduling. They may also be resized up or down, to accommodate -// the workload. -type NodePool struct { - state protoimpl.MessageState `protogen:"open.v1"` - // The name of the node pool. - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // The node configuration of the pool. - Config *NodeConfig `protobuf:"bytes,2,opt,name=config,proto3" json:"config,omitempty"` - // The initial node count for the pool. You must ensure that your - // Compute Engine [resource - // quota](https://cloud.google.com/compute/quotas) - // is sufficient for this number of instances. You must also have available - // firewall and routes quota. - InitialNodeCount int32 `protobuf:"varint,3,opt,name=initial_node_count,json=initialNodeCount,proto3" json:"initial_node_count,omitempty"` - // The list of Google Compute Engine - // [zones](https://cloud.google.com/compute/docs/zones#available) - // in which the NodePool's nodes should be located. - // - // If this value is unspecified during node pool creation, the - // [Cluster.Locations](https://cloud.google.com/kubernetes-engine/docs/reference/rest/v1/projects.locations.clusters#Cluster.FIELDS.locations) - // value will be used, instead. - // - // Warning: changing node pool locations will result in nodes being added - // and/or removed. - Locations []string `protobuf:"bytes,13,rep,name=locations,proto3" json:"locations,omitempty"` - // Networking configuration for this NodePool. If specified, it overrides the - // cluster-level defaults. - NetworkConfig *NodeNetworkConfig `protobuf:"bytes,14,opt,name=network_config,json=networkConfig,proto3" json:"network_config,omitempty"` - // Output only. Server-defined URL for the resource. - SelfLink string `protobuf:"bytes,100,opt,name=self_link,json=selfLink,proto3" json:"self_link,omitempty"` - // The version of Kubernetes running on this NodePool's nodes. If unspecified, - // it defaults as described - // [here](https://cloud.google.com/kubernetes-engine/versioning#specifying_node_version). - Version string `protobuf:"bytes,101,opt,name=version,proto3" json:"version,omitempty"` - // Output only. The resource URLs of the [managed instance - // groups](https://cloud.google.com/compute/docs/instance-groups/creating-groups-of-managed-instances) - // associated with this node pool. - // During the node pool blue-green upgrade operation, the URLs contain both - // blue and green resources. - InstanceGroupUrls []string `protobuf:"bytes,102,rep,name=instance_group_urls,json=instanceGroupUrls,proto3" json:"instance_group_urls,omitempty"` - // Output only. The status of the nodes in this pool instance. - Status NodePool_Status `protobuf:"varint,103,opt,name=status,proto3,enum=google.container.v1.NodePool_Status" json:"status,omitempty"` - // Output only. Deprecated. Use conditions instead. - // Additional information about the current status of this - // node pool instance, if available. - // - // Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. - StatusMessage string `protobuf:"bytes,104,opt,name=status_message,json=statusMessage,proto3" json:"status_message,omitempty"` - // Autoscaler configuration for this NodePool. Autoscaler is enabled - // only if a valid configuration is present. - Autoscaling *NodePoolAutoscaling `protobuf:"bytes,4,opt,name=autoscaling,proto3" json:"autoscaling,omitempty"` - // NodeManagement configuration for this NodePool. - Management *NodeManagement `protobuf:"bytes,5,opt,name=management,proto3" json:"management,omitempty"` - // The constraint on the maximum number of pods that can be run - // simultaneously on a node in the node pool. - MaxPodsConstraint *MaxPodsConstraint `protobuf:"bytes,6,opt,name=max_pods_constraint,json=maxPodsConstraint,proto3" json:"max_pods_constraint,omitempty"` - // Which conditions caused the current node pool state. - Conditions []*StatusCondition `protobuf:"bytes,105,rep,name=conditions,proto3" json:"conditions,omitempty"` - // Output only. The pod CIDR block size per node in this node pool. - PodIpv4CidrSize int32 `protobuf:"varint,7,opt,name=pod_ipv4_cidr_size,json=podIpv4CidrSize,proto3" json:"pod_ipv4_cidr_size,omitempty"` - // Upgrade settings control disruption and speed of the upgrade. - UpgradeSettings *NodePool_UpgradeSettings `protobuf:"bytes,107,opt,name=upgrade_settings,json=upgradeSettings,proto3" json:"upgrade_settings,omitempty"` - // Specifies the node placement policy. - PlacementPolicy *NodePool_PlacementPolicy `protobuf:"bytes,108,opt,name=placement_policy,json=placementPolicy,proto3" json:"placement_policy,omitempty"` - // Output only. Update info contains relevant information during a node - // pool update. - UpdateInfo *NodePool_UpdateInfo `protobuf:"bytes,109,opt,name=update_info,json=updateInfo,proto3" json:"update_info,omitempty"` - // This checksum is computed by the server based on the value of node pool - // fields, and may be sent on update requests to ensure the client has an - // up-to-date value before proceeding. - Etag string `protobuf:"bytes,110,opt,name=etag,proto3" json:"etag,omitempty"` - // Specifies the configuration of queued provisioning. - QueuedProvisioning *NodePool_QueuedProvisioning `protobuf:"bytes,112,opt,name=queued_provisioning,json=queuedProvisioning,proto3" json:"queued_provisioning,omitempty"` - // Enable best effort provisioning for nodes - BestEffortProvisioning *BestEffortProvisioning `protobuf:"bytes,113,opt,name=best_effort_provisioning,json=bestEffortProvisioning,proto3" json:"best_effort_provisioning,omitempty"` - // Specifies the node drain configuration for this node pool. - NodeDrainConfig *NodePool_NodeDrainConfig `protobuf:"bytes,116,opt,name=node_drain_config,json=nodeDrainConfig,proto3" json:"node_drain_config,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *NodePool) Reset() { - *x = NodePool{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[97] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *NodePool) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*NodePool) ProtoMessage() {} - -func (x *NodePool) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[97] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use NodePool.ProtoReflect.Descriptor instead. -func (*NodePool) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{97} -} - -func (x *NodePool) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *NodePool) GetConfig() *NodeConfig { - if x != nil { - return x.Config - } - return nil -} - -func (x *NodePool) GetInitialNodeCount() int32 { - if x != nil { - return x.InitialNodeCount - } - return 0 -} - -func (x *NodePool) GetLocations() []string { - if x != nil { - return x.Locations - } - return nil -} - -func (x *NodePool) GetNetworkConfig() *NodeNetworkConfig { - if x != nil { - return x.NetworkConfig - } - return nil -} - -func (x *NodePool) GetSelfLink() string { - if x != nil { - return x.SelfLink - } - return "" -} - -func (x *NodePool) GetVersion() string { - if x != nil { - return x.Version - } - return "" -} - -func (x *NodePool) GetInstanceGroupUrls() []string { - if x != nil { - return x.InstanceGroupUrls - } - return nil -} - -func (x *NodePool) GetStatus() NodePool_Status { - if x != nil { - return x.Status - } - return NodePool_STATUS_UNSPECIFIED -} - -// Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. -func (x *NodePool) GetStatusMessage() string { - if x != nil { - return x.StatusMessage - } - return "" -} - -func (x *NodePool) GetAutoscaling() *NodePoolAutoscaling { - if x != nil { - return x.Autoscaling - } - return nil -} - -func (x *NodePool) GetManagement() *NodeManagement { - if x != nil { - return x.Management - } - return nil -} - -func (x *NodePool) GetMaxPodsConstraint() *MaxPodsConstraint { - if x != nil { - return x.MaxPodsConstraint - } - return nil -} - -func (x *NodePool) GetConditions() []*StatusCondition { - if x != nil { - return x.Conditions - } - return nil -} - -func (x *NodePool) GetPodIpv4CidrSize() int32 { - if x != nil { - return x.PodIpv4CidrSize - } - return 0 -} - -func (x *NodePool) GetUpgradeSettings() *NodePool_UpgradeSettings { - if x != nil { - return x.UpgradeSettings - } - return nil -} - -func (x *NodePool) GetPlacementPolicy() *NodePool_PlacementPolicy { - if x != nil { - return x.PlacementPolicy - } - return nil -} - -func (x *NodePool) GetUpdateInfo() *NodePool_UpdateInfo { - if x != nil { - return x.UpdateInfo - } - return nil -} - -func (x *NodePool) GetEtag() string { - if x != nil { - return x.Etag - } - return "" -} - -func (x *NodePool) GetQueuedProvisioning() *NodePool_QueuedProvisioning { - if x != nil { - return x.QueuedProvisioning - } - return nil -} - -func (x *NodePool) GetBestEffortProvisioning() *BestEffortProvisioning { - if x != nil { - return x.BestEffortProvisioning - } - return nil -} - -func (x *NodePool) GetNodeDrainConfig() *NodePool_NodeDrainConfig { - if x != nil { - return x.NodeDrainConfig - } - return nil -} - -// NodeManagement defines the set of node management services turned on for the -// node pool. -type NodeManagement struct { - state protoimpl.MessageState `protogen:"open.v1"` - // A flag that specifies whether node auto-upgrade is enabled for the node - // pool. If enabled, node auto-upgrade helps keep the nodes in your node pool - // up to date with the latest release version of Kubernetes. - AutoUpgrade bool `protobuf:"varint,1,opt,name=auto_upgrade,json=autoUpgrade,proto3" json:"auto_upgrade,omitempty"` - // A flag that specifies whether the node auto-repair is enabled for the node - // pool. If enabled, the nodes in this node pool will be monitored and, if - // they fail health checks too many times, an automatic repair action will be - // triggered. - AutoRepair bool `protobuf:"varint,2,opt,name=auto_repair,json=autoRepair,proto3" json:"auto_repair,omitempty"` - // Specifies the Auto Upgrade knobs for the node pool. - UpgradeOptions *AutoUpgradeOptions `protobuf:"bytes,10,opt,name=upgrade_options,json=upgradeOptions,proto3" json:"upgrade_options,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *NodeManagement) Reset() { - *x = NodeManagement{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[98] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *NodeManagement) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*NodeManagement) ProtoMessage() {} - -func (x *NodeManagement) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[98] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use NodeManagement.ProtoReflect.Descriptor instead. -func (*NodeManagement) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{98} -} - -func (x *NodeManagement) GetAutoUpgrade() bool { - if x != nil { - return x.AutoUpgrade - } - return false -} - -func (x *NodeManagement) GetAutoRepair() bool { - if x != nil { - return x.AutoRepair - } - return false -} - -func (x *NodeManagement) GetUpgradeOptions() *AutoUpgradeOptions { - if x != nil { - return x.UpgradeOptions - } - return nil -} - -// Best effort provisioning. -type BestEffortProvisioning struct { - state protoimpl.MessageState `protogen:"open.v1"` - // When this is enabled, cluster/node pool creations will ignore non-fatal - // errors like stockout to best provision as many nodes as possible right now - // and eventually bring up all target number of nodes - Enabled bool `protobuf:"varint,1,opt,name=enabled,proto3" json:"enabled,omitempty"` - // Minimum number of nodes to be provisioned to be considered as succeeded, - // and the rest of nodes will be provisioned gradually and eventually when - // stockout issue has been resolved. - MinProvisionNodes int32 `protobuf:"varint,2,opt,name=min_provision_nodes,json=minProvisionNodes,proto3" json:"min_provision_nodes,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *BestEffortProvisioning) Reset() { - *x = BestEffortProvisioning{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[99] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *BestEffortProvisioning) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*BestEffortProvisioning) ProtoMessage() {} - -func (x *BestEffortProvisioning) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[99] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use BestEffortProvisioning.ProtoReflect.Descriptor instead. -func (*BestEffortProvisioning) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{99} -} - -func (x *BestEffortProvisioning) GetEnabled() bool { - if x != nil { - return x.Enabled - } - return false -} - -func (x *BestEffortProvisioning) GetMinProvisionNodes() int32 { - if x != nil { - return x.MinProvisionNodes - } - return 0 -} - -// AutoUpgradeOptions defines the set of options for the user to control how -// the Auto Upgrades will proceed. -type AutoUpgradeOptions struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Output only. This field is set when upgrades are about to commence - // with the approximate start time for the upgrades, in - // [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format. - AutoUpgradeStartTime string `protobuf:"bytes,1,opt,name=auto_upgrade_start_time,json=autoUpgradeStartTime,proto3" json:"auto_upgrade_start_time,omitempty"` - // Output only. This field is set when upgrades are about to commence - // with the description of the upgrade. - Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *AutoUpgradeOptions) Reset() { - *x = AutoUpgradeOptions{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[100] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *AutoUpgradeOptions) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*AutoUpgradeOptions) ProtoMessage() {} - -func (x *AutoUpgradeOptions) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[100] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use AutoUpgradeOptions.ProtoReflect.Descriptor instead. -func (*AutoUpgradeOptions) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{100} -} - -func (x *AutoUpgradeOptions) GetAutoUpgradeStartTime() string { - if x != nil { - return x.AutoUpgradeStartTime - } - return "" -} - -func (x *AutoUpgradeOptions) GetDescription() string { - if x != nil { - return x.Description - } - return "" -} - -// MaintenancePolicy defines the maintenance policy to be used for the cluster. -type MaintenancePolicy struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Specifies the maintenance window in which maintenance may be performed. - Window *MaintenanceWindow `protobuf:"bytes,1,opt,name=window,proto3" json:"window,omitempty"` - // A hash identifying the version of this policy, so that updates to fields of - // the policy won't accidentally undo intermediate changes (and so that users - // of the API unaware of some fields won't accidentally remove other fields). - // Make a `get()` request to the cluster to get the current - // resource version and include it with requests to set the policy. - ResourceVersion string `protobuf:"bytes,3,opt,name=resource_version,json=resourceVersion,proto3" json:"resource_version,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *MaintenancePolicy) Reset() { - *x = MaintenancePolicy{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[101] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *MaintenancePolicy) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MaintenancePolicy) ProtoMessage() {} - -func (x *MaintenancePolicy) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[101] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use MaintenancePolicy.ProtoReflect.Descriptor instead. -func (*MaintenancePolicy) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{101} -} - -func (x *MaintenancePolicy) GetWindow() *MaintenanceWindow { - if x != nil { - return x.Window - } - return nil -} - -func (x *MaintenancePolicy) GetResourceVersion() string { - if x != nil { - return x.ResourceVersion - } - return "" -} - -// MaintenanceWindow defines the maintenance window to be used for the cluster. -type MaintenanceWindow struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Types that are valid to be assigned to Policy: - // - // *MaintenanceWindow_DailyMaintenanceWindow - // *MaintenanceWindow_RecurringWindow - Policy isMaintenanceWindow_Policy `protobuf_oneof:"policy"` - // Exceptions to maintenance window. Non-emergency maintenance should not - // occur in these windows. - MaintenanceExclusions map[string]*TimeWindow `protobuf:"bytes,4,rep,name=maintenance_exclusions,json=maintenanceExclusions,proto3" json:"maintenance_exclusions,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *MaintenanceWindow) Reset() { - *x = MaintenanceWindow{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[102] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *MaintenanceWindow) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MaintenanceWindow) ProtoMessage() {} - -func (x *MaintenanceWindow) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[102] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use MaintenanceWindow.ProtoReflect.Descriptor instead. -func (*MaintenanceWindow) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{102} -} - -func (x *MaintenanceWindow) GetPolicy() isMaintenanceWindow_Policy { - if x != nil { - return x.Policy - } - return nil -} - -func (x *MaintenanceWindow) GetDailyMaintenanceWindow() *DailyMaintenanceWindow { - if x != nil { - if x, ok := x.Policy.(*MaintenanceWindow_DailyMaintenanceWindow); ok { - return x.DailyMaintenanceWindow - } - } - return nil -} - -func (x *MaintenanceWindow) GetRecurringWindow() *RecurringTimeWindow { - if x != nil { - if x, ok := x.Policy.(*MaintenanceWindow_RecurringWindow); ok { - return x.RecurringWindow - } - } - return nil -} - -func (x *MaintenanceWindow) GetMaintenanceExclusions() map[string]*TimeWindow { - if x != nil { - return x.MaintenanceExclusions - } - return nil -} - -type isMaintenanceWindow_Policy interface { - isMaintenanceWindow_Policy() -} - -type MaintenanceWindow_DailyMaintenanceWindow struct { - // DailyMaintenanceWindow specifies a daily maintenance operation window. - DailyMaintenanceWindow *DailyMaintenanceWindow `protobuf:"bytes,2,opt,name=daily_maintenance_window,json=dailyMaintenanceWindow,proto3,oneof"` -} - -type MaintenanceWindow_RecurringWindow struct { - // RecurringWindow specifies some number of recurring time periods for - // maintenance to occur. The time windows may be overlapping. If no - // maintenance windows are set, maintenance can occur at any time. - RecurringWindow *RecurringTimeWindow `protobuf:"bytes,3,opt,name=recurring_window,json=recurringWindow,proto3,oneof"` -} - -func (*MaintenanceWindow_DailyMaintenanceWindow) isMaintenanceWindow_Policy() {} - -func (*MaintenanceWindow_RecurringWindow) isMaintenanceWindow_Policy() {} - -// Represents an arbitrary window of time. -type TimeWindow struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Types that are valid to be assigned to Options: - // - // *TimeWindow_MaintenanceExclusionOptions - Options isTimeWindow_Options `protobuf_oneof:"options"` - // The time that the window first starts. - StartTime *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"` - // The time that the window ends. The end time should take place after the - // start time. - EndTime *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=end_time,json=endTime,proto3" json:"end_time,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *TimeWindow) Reset() { - *x = TimeWindow{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[103] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *TimeWindow) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*TimeWindow) ProtoMessage() {} - -func (x *TimeWindow) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[103] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use TimeWindow.ProtoReflect.Descriptor instead. -func (*TimeWindow) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{103} -} - -func (x *TimeWindow) GetOptions() isTimeWindow_Options { - if x != nil { - return x.Options - } - return nil -} - -func (x *TimeWindow) GetMaintenanceExclusionOptions() *MaintenanceExclusionOptions { - if x != nil { - if x, ok := x.Options.(*TimeWindow_MaintenanceExclusionOptions); ok { - return x.MaintenanceExclusionOptions - } - } - return nil -} - -func (x *TimeWindow) GetStartTime() *timestamppb.Timestamp { - if x != nil { - return x.StartTime - } - return nil -} - -func (x *TimeWindow) GetEndTime() *timestamppb.Timestamp { - if x != nil { - return x.EndTime - } - return nil -} - -type isTimeWindow_Options interface { - isTimeWindow_Options() -} - -type TimeWindow_MaintenanceExclusionOptions struct { - // MaintenanceExclusionOptions provides maintenance exclusion related - // options. - MaintenanceExclusionOptions *MaintenanceExclusionOptions `protobuf:"bytes,3,opt,name=maintenance_exclusion_options,json=maintenanceExclusionOptions,proto3,oneof"` -} - -func (*TimeWindow_MaintenanceExclusionOptions) isTimeWindow_Options() {} - -// Represents the Maintenance exclusion option. -type MaintenanceExclusionOptions struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Scope specifies the upgrade scope which upgrades are blocked by the - // exclusion. - Scope MaintenanceExclusionOptions_Scope `protobuf:"varint,1,opt,name=scope,proto3,enum=google.container.v1.MaintenanceExclusionOptions_Scope" json:"scope,omitempty"` - // EndTimeBehavior specifies the behavior of the exclusion end time. - EndTimeBehavior MaintenanceExclusionOptions_EndTimeBehavior `protobuf:"varint,2,opt,name=end_time_behavior,json=endTimeBehavior,proto3,enum=google.container.v1.MaintenanceExclusionOptions_EndTimeBehavior" json:"end_time_behavior,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *MaintenanceExclusionOptions) Reset() { - *x = MaintenanceExclusionOptions{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[104] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *MaintenanceExclusionOptions) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MaintenanceExclusionOptions) ProtoMessage() {} - -func (x *MaintenanceExclusionOptions) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[104] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use MaintenanceExclusionOptions.ProtoReflect.Descriptor instead. -func (*MaintenanceExclusionOptions) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{104} -} - -func (x *MaintenanceExclusionOptions) GetScope() MaintenanceExclusionOptions_Scope { - if x != nil { - return x.Scope - } - return MaintenanceExclusionOptions_NO_UPGRADES -} - -func (x *MaintenanceExclusionOptions) GetEndTimeBehavior() MaintenanceExclusionOptions_EndTimeBehavior { - if x != nil { - return x.EndTimeBehavior - } - return MaintenanceExclusionOptions_END_TIME_BEHAVIOR_UNSPECIFIED -} - -// Represents an arbitrary window of time that recurs. -type RecurringTimeWindow struct { - state protoimpl.MessageState `protogen:"open.v1"` - // The window of the first recurrence. - Window *TimeWindow `protobuf:"bytes,1,opt,name=window,proto3" json:"window,omitempty"` - // An RRULE (https://tools.ietf.org/html/rfc5545#section-3.8.5.3) for how - // this window recurs. They go on for the span of time between the start and - // end time. - // - // For example, to have something repeat every weekday, you'd use: - // `FREQ=WEEKLY;BYDAY=MO,TU,WE,TH,FR` - // - // To repeat some window daily (equivalent to the DailyMaintenanceWindow): - // `FREQ=DAILY` - // - // For the first weekend of every month: - // `FREQ=MONTHLY;BYSETPOS=1;BYDAY=SA,SU` - // - // This specifies how frequently the window starts. Eg, if you wanted to have - // a 9-5 UTC-4 window every weekday, you'd use something like: - // ``` - // start time = 2019-01-01T09:00:00-0400 - // end time = 2019-01-01T17:00:00-0400 - // recurrence = FREQ=WEEKLY;BYDAY=MO,TU,WE,TH,FR - // ``` - // - // Windows can span multiple days. Eg, to make the window encompass every - // weekend from midnight Saturday till the last minute of Sunday UTC: - // ``` - // start time = 2019-01-05T00:00:00Z - // end time = 2019-01-07T23:59:00Z - // recurrence = FREQ=WEEKLY;BYDAY=SA - // ``` - // - // Note the start and end time's specific dates are largely arbitrary except - // to specify duration of the window and when it first starts. - // The FREQ values of HOURLY, MINUTELY, and SECONDLY are not supported. - Recurrence string `protobuf:"bytes,2,opt,name=recurrence,proto3" json:"recurrence,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *RecurringTimeWindow) Reset() { - *x = RecurringTimeWindow{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[105] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *RecurringTimeWindow) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RecurringTimeWindow) ProtoMessage() {} - -func (x *RecurringTimeWindow) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[105] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RecurringTimeWindow.ProtoReflect.Descriptor instead. -func (*RecurringTimeWindow) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{105} -} - -func (x *RecurringTimeWindow) GetWindow() *TimeWindow { - if x != nil { - return x.Window - } - return nil -} - -func (x *RecurringTimeWindow) GetRecurrence() string { - if x != nil { - return x.Recurrence - } - return "" -} - -// Time window specified for daily maintenance operations. -type DailyMaintenanceWindow struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Time within the maintenance window to start the maintenance operations. - // Time format should be in [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) - // format "HH:MM", where HH : [00-23] and MM : [00-59] GMT. - StartTime string `protobuf:"bytes,2,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"` - // Output only. Duration of the time window, automatically chosen to be - // smallest possible in the given scenario. - // Duration will be in [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) - // format "PTnHnMnS". - Duration string `protobuf:"bytes,3,opt,name=duration,proto3" json:"duration,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *DailyMaintenanceWindow) Reset() { - *x = DailyMaintenanceWindow{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[106] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *DailyMaintenanceWindow) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DailyMaintenanceWindow) ProtoMessage() {} - -func (x *DailyMaintenanceWindow) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[106] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DailyMaintenanceWindow.ProtoReflect.Descriptor instead. -func (*DailyMaintenanceWindow) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{106} -} - -func (x *DailyMaintenanceWindow) GetStartTime() string { - if x != nil { - return x.StartTime - } - return "" -} - -func (x *DailyMaintenanceWindow) GetDuration() string { - if x != nil { - return x.Duration - } - return "" -} - -// SetNodePoolManagementRequest sets the node management properties of a node -// pool. -type SetNodePoolManagementRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Deprecated. The Google Developers Console [project ID or project - // number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). - // This field has been deprecated and replaced by the name field. - // - // Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. - ProjectId string `protobuf:"bytes,1,opt,name=project_id,json=projectId,proto3" json:"project_id,omitempty"` - // Deprecated. The name of the Google Compute Engine - // [zone](https://cloud.google.com/compute/docs/zones#available) - // in which the cluster resides. This field has been deprecated and replaced - // by the name field. - // - // Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. - Zone string `protobuf:"bytes,2,opt,name=zone,proto3" json:"zone,omitempty"` - // Deprecated. The name of the cluster to update. - // This field has been deprecated and replaced by the name field. - // - // Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. - ClusterId string `protobuf:"bytes,3,opt,name=cluster_id,json=clusterId,proto3" json:"cluster_id,omitempty"` - // Deprecated. The name of the node pool to update. - // This field has been deprecated and replaced by the name field. - // - // Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. - NodePoolId string `protobuf:"bytes,4,opt,name=node_pool_id,json=nodePoolId,proto3" json:"node_pool_id,omitempty"` - // Required. NodeManagement configuration for the node pool. - Management *NodeManagement `protobuf:"bytes,5,opt,name=management,proto3" json:"management,omitempty"` - // The name (project, location, cluster, node pool id) of the node pool to set - // management properties. Specified in the format - // `projects/*/locations/*/clusters/*/nodePools/*`. - Name string `protobuf:"bytes,7,opt,name=name,proto3" json:"name,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *SetNodePoolManagementRequest) Reset() { - *x = SetNodePoolManagementRequest{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[107] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *SetNodePoolManagementRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SetNodePoolManagementRequest) ProtoMessage() {} - -func (x *SetNodePoolManagementRequest) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[107] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SetNodePoolManagementRequest.ProtoReflect.Descriptor instead. -func (*SetNodePoolManagementRequest) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{107} -} - -// Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. -func (x *SetNodePoolManagementRequest) GetProjectId() string { - if x != nil { - return x.ProjectId - } - return "" -} - -// Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. -func (x *SetNodePoolManagementRequest) GetZone() string { - if x != nil { - return x.Zone - } - return "" -} - -// Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. -func (x *SetNodePoolManagementRequest) GetClusterId() string { - if x != nil { - return x.ClusterId - } - return "" -} - -// Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. -func (x *SetNodePoolManagementRequest) GetNodePoolId() string { - if x != nil { - return x.NodePoolId - } - return "" -} - -func (x *SetNodePoolManagementRequest) GetManagement() *NodeManagement { - if x != nil { - return x.Management - } - return nil -} - -func (x *SetNodePoolManagementRequest) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -// SetNodePoolSizeRequest sets the size of a node pool. -type SetNodePoolSizeRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Deprecated. The Google Developers Console [project ID or project - // number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). - // This field has been deprecated and replaced by the name field. - // - // Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. - ProjectId string `protobuf:"bytes,1,opt,name=project_id,json=projectId,proto3" json:"project_id,omitempty"` - // Deprecated. The name of the Google Compute Engine - // [zone](https://cloud.google.com/compute/docs/zones#available) - // in which the cluster resides. This field has been deprecated and replaced - // by the name field. - // - // Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. - Zone string `protobuf:"bytes,2,opt,name=zone,proto3" json:"zone,omitempty"` - // Deprecated. The name of the cluster to update. - // This field has been deprecated and replaced by the name field. - // - // Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. - ClusterId string `protobuf:"bytes,3,opt,name=cluster_id,json=clusterId,proto3" json:"cluster_id,omitempty"` - // Deprecated. The name of the node pool to update. - // This field has been deprecated and replaced by the name field. - // - // Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. - NodePoolId string `protobuf:"bytes,4,opt,name=node_pool_id,json=nodePoolId,proto3" json:"node_pool_id,omitempty"` - // Required. The desired node count for the pool. - NodeCount int32 `protobuf:"varint,5,opt,name=node_count,json=nodeCount,proto3" json:"node_count,omitempty"` - // The name (project, location, cluster, node pool id) of the node pool to set - // size. - // Specified in the format `projects/*/locations/*/clusters/*/nodePools/*`. - Name string `protobuf:"bytes,7,opt,name=name,proto3" json:"name,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *SetNodePoolSizeRequest) Reset() { - *x = SetNodePoolSizeRequest{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[108] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *SetNodePoolSizeRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SetNodePoolSizeRequest) ProtoMessage() {} - -func (x *SetNodePoolSizeRequest) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[108] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SetNodePoolSizeRequest.ProtoReflect.Descriptor instead. -func (*SetNodePoolSizeRequest) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{108} -} - -// Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. -func (x *SetNodePoolSizeRequest) GetProjectId() string { - if x != nil { - return x.ProjectId - } - return "" -} - -// Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. -func (x *SetNodePoolSizeRequest) GetZone() string { - if x != nil { - return x.Zone - } - return "" -} - -// Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. -func (x *SetNodePoolSizeRequest) GetClusterId() string { - if x != nil { - return x.ClusterId - } - return "" -} - -// Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. -func (x *SetNodePoolSizeRequest) GetNodePoolId() string { - if x != nil { - return x.NodePoolId - } - return "" -} - -func (x *SetNodePoolSizeRequest) GetNodeCount() int32 { - if x != nil { - return x.NodeCount - } - return 0 -} - -func (x *SetNodePoolSizeRequest) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -// CompleteNodePoolUpgradeRequest sets the name of target node pool to complete -// upgrade. -type CompleteNodePoolUpgradeRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - // The name (project, location, cluster, node pool id) of the node pool to - // complete upgrade. - // Specified in the format `projects/*/locations/*/clusters/*/nodePools/*`. - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *CompleteNodePoolUpgradeRequest) Reset() { - *x = CompleteNodePoolUpgradeRequest{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[109] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *CompleteNodePoolUpgradeRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CompleteNodePoolUpgradeRequest) ProtoMessage() {} - -func (x *CompleteNodePoolUpgradeRequest) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[109] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CompleteNodePoolUpgradeRequest.ProtoReflect.Descriptor instead. -func (*CompleteNodePoolUpgradeRequest) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{109} -} - -func (x *CompleteNodePoolUpgradeRequest) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -// RollbackNodePoolUpgradeRequest rollbacks the previously Aborted or Failed -// -// NodePool upgrade. This will be an no-op if the last upgrade successfully -// completed. -type RollbackNodePoolUpgradeRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Deprecated. The Google Developers Console [project ID or project - // number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). - // This field has been deprecated and replaced by the name field. - // - // Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. - ProjectId string `protobuf:"bytes,1,opt,name=project_id,json=projectId,proto3" json:"project_id,omitempty"` - // Deprecated. The name of the Google Compute Engine - // [zone](https://cloud.google.com/compute/docs/zones#available) - // in which the cluster resides. This field has been deprecated and replaced - // by the name field. - // - // Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. - Zone string `protobuf:"bytes,2,opt,name=zone,proto3" json:"zone,omitempty"` - // Deprecated. The name of the cluster to rollback. - // This field has been deprecated and replaced by the name field. - // - // Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. - ClusterId string `protobuf:"bytes,3,opt,name=cluster_id,json=clusterId,proto3" json:"cluster_id,omitempty"` - // Deprecated. The name of the node pool to rollback. - // This field has been deprecated and replaced by the name field. - // - // Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. - NodePoolId string `protobuf:"bytes,4,opt,name=node_pool_id,json=nodePoolId,proto3" json:"node_pool_id,omitempty"` - // The name (project, location, cluster, node pool id) of the node poll to - // rollback upgrade. - // Specified in the format `projects/*/locations/*/clusters/*/nodePools/*`. - Name string `protobuf:"bytes,6,opt,name=name,proto3" json:"name,omitempty"` - // Option for rollback to ignore the PodDisruptionBudget. - // Default value is false. - RespectPdb bool `protobuf:"varint,7,opt,name=respect_pdb,json=respectPdb,proto3" json:"respect_pdb,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *RollbackNodePoolUpgradeRequest) Reset() { - *x = RollbackNodePoolUpgradeRequest{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[110] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *RollbackNodePoolUpgradeRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RollbackNodePoolUpgradeRequest) ProtoMessage() {} - -func (x *RollbackNodePoolUpgradeRequest) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[110] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RollbackNodePoolUpgradeRequest.ProtoReflect.Descriptor instead. -func (*RollbackNodePoolUpgradeRequest) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{110} -} - -// Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. -func (x *RollbackNodePoolUpgradeRequest) GetProjectId() string { - if x != nil { - return x.ProjectId - } - return "" -} - -// Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. -func (x *RollbackNodePoolUpgradeRequest) GetZone() string { - if x != nil { - return x.Zone - } - return "" -} - -// Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. -func (x *RollbackNodePoolUpgradeRequest) GetClusterId() string { - if x != nil { - return x.ClusterId - } - return "" -} - -// Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. -func (x *RollbackNodePoolUpgradeRequest) GetNodePoolId() string { - if x != nil { - return x.NodePoolId - } - return "" -} - -func (x *RollbackNodePoolUpgradeRequest) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *RollbackNodePoolUpgradeRequest) GetRespectPdb() bool { - if x != nil { - return x.RespectPdb - } - return false -} - -// ListNodePoolsResponse is the result of ListNodePoolsRequest. -type ListNodePoolsResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - // A list of node pools for a cluster. - NodePools []*NodePool `protobuf:"bytes,1,rep,name=node_pools,json=nodePools,proto3" json:"node_pools,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ListNodePoolsResponse) Reset() { - *x = ListNodePoolsResponse{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[111] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ListNodePoolsResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListNodePoolsResponse) ProtoMessage() {} - -func (x *ListNodePoolsResponse) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[111] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ListNodePoolsResponse.ProtoReflect.Descriptor instead. -func (*ListNodePoolsResponse) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{111} -} - -func (x *ListNodePoolsResponse) GetNodePools() []*NodePool { - if x != nil { - return x.NodePools - } - return nil -} - -// ClusterAutoscaling contains global, per-cluster information -// required by Cluster Autoscaler to automatically adjust -// the size of the cluster and create/delete -// node pools based on the current needs. -type ClusterAutoscaling struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Enables automatic node pool creation and deletion. - EnableNodeAutoprovisioning bool `protobuf:"varint,1,opt,name=enable_node_autoprovisioning,json=enableNodeAutoprovisioning,proto3" json:"enable_node_autoprovisioning,omitempty"` - // Contains global constraints regarding minimum and maximum - // amount of resources in the cluster. - ResourceLimits []*ResourceLimit `protobuf:"bytes,2,rep,name=resource_limits,json=resourceLimits,proto3" json:"resource_limits,omitempty"` - // Defines autoscaling behaviour. - AutoscalingProfile ClusterAutoscaling_AutoscalingProfile `protobuf:"varint,3,opt,name=autoscaling_profile,json=autoscalingProfile,proto3,enum=google.container.v1.ClusterAutoscaling_AutoscalingProfile" json:"autoscaling_profile,omitempty"` - // AutoprovisioningNodePoolDefaults contains defaults for a node pool - // created by NAP. - AutoprovisioningNodePoolDefaults *AutoprovisioningNodePoolDefaults `protobuf:"bytes,4,opt,name=autoprovisioning_node_pool_defaults,json=autoprovisioningNodePoolDefaults,proto3" json:"autoprovisioning_node_pool_defaults,omitempty"` - // The list of Google Compute Engine - // [zones](https://cloud.google.com/compute/docs/zones#available) - // in which the NodePool's nodes can be created by NAP. - AutoprovisioningLocations []string `protobuf:"bytes,5,rep,name=autoprovisioning_locations,json=autoprovisioningLocations,proto3" json:"autoprovisioning_locations,omitempty"` - // Default compute class is a configuration for default compute class. - DefaultComputeClassConfig *DefaultComputeClassConfig `protobuf:"bytes,9,opt,name=default_compute_class_config,json=defaultComputeClassConfig,proto3" json:"default_compute_class_config,omitempty"` - // Autopilot general profile for the cluster, which defines the - // configuration for the cluster. - AutopilotGeneralProfile ClusterAutoscaling_AutopilotGeneralProfile `protobuf:"varint,14,opt,name=autopilot_general_profile,json=autopilotGeneralProfile,proto3,enum=google.container.v1.ClusterAutoscaling_AutopilotGeneralProfile" json:"autopilot_general_profile,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ClusterAutoscaling) Reset() { - *x = ClusterAutoscaling{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[112] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ClusterAutoscaling) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ClusterAutoscaling) ProtoMessage() {} - -func (x *ClusterAutoscaling) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[112] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ClusterAutoscaling.ProtoReflect.Descriptor instead. -func (*ClusterAutoscaling) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{112} -} - -func (x *ClusterAutoscaling) GetEnableNodeAutoprovisioning() bool { - if x != nil { - return x.EnableNodeAutoprovisioning - } - return false -} - -func (x *ClusterAutoscaling) GetResourceLimits() []*ResourceLimit { - if x != nil { - return x.ResourceLimits - } - return nil -} - -func (x *ClusterAutoscaling) GetAutoscalingProfile() ClusterAutoscaling_AutoscalingProfile { - if x != nil { - return x.AutoscalingProfile - } - return ClusterAutoscaling_PROFILE_UNSPECIFIED -} - -func (x *ClusterAutoscaling) GetAutoprovisioningNodePoolDefaults() *AutoprovisioningNodePoolDefaults { - if x != nil { - return x.AutoprovisioningNodePoolDefaults - } - return nil -} - -func (x *ClusterAutoscaling) GetAutoprovisioningLocations() []string { - if x != nil { - return x.AutoprovisioningLocations - } - return nil -} - -func (x *ClusterAutoscaling) GetDefaultComputeClassConfig() *DefaultComputeClassConfig { - if x != nil { - return x.DefaultComputeClassConfig - } - return nil -} - -func (x *ClusterAutoscaling) GetAutopilotGeneralProfile() ClusterAutoscaling_AutopilotGeneralProfile { - if x != nil { - return x.AutopilotGeneralProfile - } - return ClusterAutoscaling_AUTOPILOT_GENERAL_PROFILE_UNSPECIFIED -} - -// AutoprovisioningNodePoolDefaults contains defaults for a node pool created -// by NAP. -type AutoprovisioningNodePoolDefaults struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Scopes that are used by NAP when creating node pools. - OauthScopes []string `protobuf:"bytes,1,rep,name=oauth_scopes,json=oauthScopes,proto3" json:"oauth_scopes,omitempty"` - // The Google Cloud Platform Service Account to be used by the node VMs. - ServiceAccount string `protobuf:"bytes,2,opt,name=service_account,json=serviceAccount,proto3" json:"service_account,omitempty"` - // Specifies the upgrade settings for NAP created node pools - UpgradeSettings *NodePool_UpgradeSettings `protobuf:"bytes,3,opt,name=upgrade_settings,json=upgradeSettings,proto3" json:"upgrade_settings,omitempty"` - // Specifies the node management options for NAP created node-pools. - Management *NodeManagement `protobuf:"bytes,4,opt,name=management,proto3" json:"management,omitempty"` - // Deprecated. Minimum CPU platform to be used for NAP created node pools. - // The instance may be scheduled on the specified or newer CPU platform. - // Applicable values are the friendly names of CPU platforms, such as - // minCpuPlatform: Intel Haswell or - // minCpuPlatform: Intel Sandy Bridge. For more - // information, read [how to specify min CPU - // platform](https://cloud.google.com/compute/docs/instances/specify-min-cpu-platform). - // This field is deprecated, min_cpu_platform should be specified using - // `cloud.google.com/requested-min-cpu-platform` label selector on the pod. - // To unset the min cpu platform field pass "automatic" - // as field value. - // - // Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. - MinCpuPlatform string `protobuf:"bytes,5,opt,name=min_cpu_platform,json=minCpuPlatform,proto3" json:"min_cpu_platform,omitempty"` - // Size of the disk attached to each node, specified in GB. - // The smallest allowed disk size is 10GB. - // - // If unspecified, the default disk size is 100GB. - DiskSizeGb int32 `protobuf:"varint,6,opt,name=disk_size_gb,json=diskSizeGb,proto3" json:"disk_size_gb,omitempty"` - // Type of the disk attached to each node (e.g. 'pd-standard', 'pd-ssd' or - // 'pd-balanced') - // - // If unspecified, the default disk type is 'pd-standard' - DiskType string `protobuf:"bytes,7,opt,name=disk_type,json=diskType,proto3" json:"disk_type,omitempty"` - // Shielded Instance options. - ShieldedInstanceConfig *ShieldedInstanceConfig `protobuf:"bytes,8,opt,name=shielded_instance_config,json=shieldedInstanceConfig,proto3" json:"shielded_instance_config,omitempty"` - // The Customer Managed Encryption Key used to encrypt the boot disk attached - // to each node in the node pool. This should be of the form - // projects/[KEY_PROJECT_ID]/locations/[LOCATION]/keyRings/[RING_NAME]/cryptoKeys/[KEY_NAME]. - // For more information about protecting resources with Cloud KMS Keys please - // see: - // https://cloud.google.com/compute/docs/disks/customer-managed-encryption - BootDiskKmsKey string `protobuf:"bytes,9,opt,name=boot_disk_kms_key,json=bootDiskKmsKey,proto3" json:"boot_disk_kms_key,omitempty"` - // The image type to use for NAP created node. Please see - // https://cloud.google.com/kubernetes-engine/docs/concepts/node-images - // for available image types. - ImageType string `protobuf:"bytes,10,opt,name=image_type,json=imageType,proto3" json:"image_type,omitempty"` - // DEPRECATED. Use NodePoolAutoConfig.NodeKubeletConfig instead. - InsecureKubeletReadonlyPortEnabled *bool `protobuf:"varint,13,opt,name=insecure_kubelet_readonly_port_enabled,json=insecureKubeletReadonlyPortEnabled,proto3,oneof" json:"insecure_kubelet_readonly_port_enabled,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *AutoprovisioningNodePoolDefaults) Reset() { - *x = AutoprovisioningNodePoolDefaults{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[113] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *AutoprovisioningNodePoolDefaults) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*AutoprovisioningNodePoolDefaults) ProtoMessage() {} - -func (x *AutoprovisioningNodePoolDefaults) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[113] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use AutoprovisioningNodePoolDefaults.ProtoReflect.Descriptor instead. -func (*AutoprovisioningNodePoolDefaults) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{113} -} - -func (x *AutoprovisioningNodePoolDefaults) GetOauthScopes() []string { - if x != nil { - return x.OauthScopes - } - return nil -} - -func (x *AutoprovisioningNodePoolDefaults) GetServiceAccount() string { - if x != nil { - return x.ServiceAccount - } - return "" -} - -func (x *AutoprovisioningNodePoolDefaults) GetUpgradeSettings() *NodePool_UpgradeSettings { - if x != nil { - return x.UpgradeSettings - } - return nil -} - -func (x *AutoprovisioningNodePoolDefaults) GetManagement() *NodeManagement { - if x != nil { - return x.Management - } - return nil -} - -// Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. -func (x *AutoprovisioningNodePoolDefaults) GetMinCpuPlatform() string { - if x != nil { - return x.MinCpuPlatform - } - return "" -} - -func (x *AutoprovisioningNodePoolDefaults) GetDiskSizeGb() int32 { - if x != nil { - return x.DiskSizeGb - } - return 0 -} - -func (x *AutoprovisioningNodePoolDefaults) GetDiskType() string { - if x != nil { - return x.DiskType - } - return "" -} - -func (x *AutoprovisioningNodePoolDefaults) GetShieldedInstanceConfig() *ShieldedInstanceConfig { - if x != nil { - return x.ShieldedInstanceConfig - } - return nil -} - -func (x *AutoprovisioningNodePoolDefaults) GetBootDiskKmsKey() string { - if x != nil { - return x.BootDiskKmsKey - } - return "" -} - -func (x *AutoprovisioningNodePoolDefaults) GetImageType() string { - if x != nil { - return x.ImageType - } - return "" -} - -func (x *AutoprovisioningNodePoolDefaults) GetInsecureKubeletReadonlyPortEnabled() bool { - if x != nil && x.InsecureKubeletReadonlyPortEnabled != nil { - return *x.InsecureKubeletReadonlyPortEnabled - } - return false -} - -// Contains information about amount of some resource in the cluster. -// For memory, value should be in GB. -type ResourceLimit struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Resource name "cpu", "memory" or gpu-specific string. - ResourceType string `protobuf:"bytes,1,opt,name=resource_type,json=resourceType,proto3" json:"resource_type,omitempty"` - // Minimum amount of the resource in the cluster. - Minimum int64 `protobuf:"varint,2,opt,name=minimum,proto3" json:"minimum,omitempty"` - // Maximum amount of the resource in the cluster. - Maximum int64 `protobuf:"varint,3,opt,name=maximum,proto3" json:"maximum,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ResourceLimit) Reset() { - *x = ResourceLimit{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[114] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ResourceLimit) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ResourceLimit) ProtoMessage() {} - -func (x *ResourceLimit) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[114] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ResourceLimit.ProtoReflect.Descriptor instead. -func (*ResourceLimit) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{114} -} - -func (x *ResourceLimit) GetResourceType() string { - if x != nil { - return x.ResourceType - } - return "" -} - -func (x *ResourceLimit) GetMinimum() int64 { - if x != nil { - return x.Minimum - } - return 0 -} - -func (x *ResourceLimit) GetMaximum() int64 { - if x != nil { - return x.Maximum - } - return 0 -} - -// DefaultComputeClassConfig defines default compute class -// -// configuration. -type DefaultComputeClassConfig struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Enables default compute class. - Enabled bool `protobuf:"varint,1,opt,name=enabled,proto3" json:"enabled,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *DefaultComputeClassConfig) Reset() { - *x = DefaultComputeClassConfig{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[115] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *DefaultComputeClassConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DefaultComputeClassConfig) ProtoMessage() {} - -func (x *DefaultComputeClassConfig) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[115] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DefaultComputeClassConfig.ProtoReflect.Descriptor instead. -func (*DefaultComputeClassConfig) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{115} -} - -func (x *DefaultComputeClassConfig) GetEnabled() bool { - if x != nil { - return x.Enabled - } - return false -} - -// NodePoolAutoscaling contains information required by cluster autoscaler to -// adjust the size of the node pool to the current cluster usage. -type NodePoolAutoscaling struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Is autoscaling enabled for this node pool. - Enabled bool `protobuf:"varint,1,opt,name=enabled,proto3" json:"enabled,omitempty"` - // Minimum number of nodes for one location in the node pool. Must be greater - // than or equal to 0 and less than or equal to max_node_count. - MinNodeCount int32 `protobuf:"varint,2,opt,name=min_node_count,json=minNodeCount,proto3" json:"min_node_count,omitempty"` - // Maximum number of nodes for one location in the node pool. Must be >= - // min_node_count. There has to be enough quota to scale up the cluster. - MaxNodeCount int32 `protobuf:"varint,3,opt,name=max_node_count,json=maxNodeCount,proto3" json:"max_node_count,omitempty"` - // Can this node pool be deleted automatically. - Autoprovisioned bool `protobuf:"varint,4,opt,name=autoprovisioned,proto3" json:"autoprovisioned,omitempty"` - // Location policy used when scaling up a nodepool. - LocationPolicy NodePoolAutoscaling_LocationPolicy `protobuf:"varint,5,opt,name=location_policy,json=locationPolicy,proto3,enum=google.container.v1.NodePoolAutoscaling_LocationPolicy" json:"location_policy,omitempty"` - // Minimum number of nodes in the node pool. Must be greater than or equal - // to 0 and less than or equal to total_max_node_count. - // The total_*_node_count fields are mutually exclusive with the *_node_count - // fields. - TotalMinNodeCount int32 `protobuf:"varint,6,opt,name=total_min_node_count,json=totalMinNodeCount,proto3" json:"total_min_node_count,omitempty"` - // Maximum number of nodes in the node pool. Must be greater than or equal to - // total_min_node_count. There has to be enough quota to scale up the cluster. - // The total_*_node_count fields are mutually exclusive with the *_node_count - // fields. - TotalMaxNodeCount int32 `protobuf:"varint,7,opt,name=total_max_node_count,json=totalMaxNodeCount,proto3" json:"total_max_node_count,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *NodePoolAutoscaling) Reset() { - *x = NodePoolAutoscaling{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[116] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *NodePoolAutoscaling) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*NodePoolAutoscaling) ProtoMessage() {} - -func (x *NodePoolAutoscaling) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[116] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use NodePoolAutoscaling.ProtoReflect.Descriptor instead. -func (*NodePoolAutoscaling) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{116} -} - -func (x *NodePoolAutoscaling) GetEnabled() bool { - if x != nil { - return x.Enabled - } - return false -} - -func (x *NodePoolAutoscaling) GetMinNodeCount() int32 { - if x != nil { - return x.MinNodeCount - } - return 0 -} - -func (x *NodePoolAutoscaling) GetMaxNodeCount() int32 { - if x != nil { - return x.MaxNodeCount - } - return 0 -} - -func (x *NodePoolAutoscaling) GetAutoprovisioned() bool { - if x != nil { - return x.Autoprovisioned - } - return false -} - -func (x *NodePoolAutoscaling) GetLocationPolicy() NodePoolAutoscaling_LocationPolicy { - if x != nil { - return x.LocationPolicy - } - return NodePoolAutoscaling_LOCATION_POLICY_UNSPECIFIED -} - -func (x *NodePoolAutoscaling) GetTotalMinNodeCount() int32 { - if x != nil { - return x.TotalMinNodeCount - } - return 0 -} - -func (x *NodePoolAutoscaling) GetTotalMaxNodeCount() int32 { - if x != nil { - return x.TotalMaxNodeCount - } - return 0 -} - -// SetLabelsRequest sets the Google Cloud Platform labels on a Google Container -// Engine cluster, which will in turn set them for Google Compute Engine -// resources used by that cluster -type SetLabelsRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Deprecated. The Google Developers Console [project ID or project - // number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). - // This field has been deprecated and replaced by the name field. - // - // Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. - ProjectId string `protobuf:"bytes,1,opt,name=project_id,json=projectId,proto3" json:"project_id,omitempty"` - // Deprecated. The name of the Google Compute Engine - // [zone](https://cloud.google.com/compute/docs/zones#available) - // in which the cluster resides. This field has been deprecated and replaced - // by the name field. - // - // Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. - Zone string `protobuf:"bytes,2,opt,name=zone,proto3" json:"zone,omitempty"` - // Deprecated. The name of the cluster. - // This field has been deprecated and replaced by the name field. - // - // Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. - ClusterId string `protobuf:"bytes,3,opt,name=cluster_id,json=clusterId,proto3" json:"cluster_id,omitempty"` - // Required. The labels to set for that cluster. - ResourceLabels map[string]string `protobuf:"bytes,4,rep,name=resource_labels,json=resourceLabels,proto3" json:"resource_labels,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` - // Required. The fingerprint of the previous set of labels for this resource, - // used to detect conflicts. The fingerprint is initially generated by - // Kubernetes Engine and changes after every request to modify or update - // labels. You must always provide an up-to-date fingerprint hash when - // updating or changing labels. Make a `get()` request to the - // resource to get the latest fingerprint. - LabelFingerprint string `protobuf:"bytes,5,opt,name=label_fingerprint,json=labelFingerprint,proto3" json:"label_fingerprint,omitempty"` - // The name (project, location, cluster name) of the cluster to set labels. - // Specified in the format `projects/*/locations/*/clusters/*`. - Name string `protobuf:"bytes,7,opt,name=name,proto3" json:"name,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *SetLabelsRequest) Reset() { - *x = SetLabelsRequest{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[117] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *SetLabelsRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SetLabelsRequest) ProtoMessage() {} - -func (x *SetLabelsRequest) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[117] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SetLabelsRequest.ProtoReflect.Descriptor instead. -func (*SetLabelsRequest) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{117} -} - -// Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. -func (x *SetLabelsRequest) GetProjectId() string { - if x != nil { - return x.ProjectId - } - return "" -} - -// Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. -func (x *SetLabelsRequest) GetZone() string { - if x != nil { - return x.Zone - } - return "" -} - -// Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. -func (x *SetLabelsRequest) GetClusterId() string { - if x != nil { - return x.ClusterId - } - return "" -} - -func (x *SetLabelsRequest) GetResourceLabels() map[string]string { - if x != nil { - return x.ResourceLabels - } - return nil -} - -func (x *SetLabelsRequest) GetLabelFingerprint() string { - if x != nil { - return x.LabelFingerprint - } - return "" -} - -func (x *SetLabelsRequest) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -// SetLegacyAbacRequest enables or disables the ABAC authorization mechanism for -// a cluster. -type SetLegacyAbacRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Deprecated. The Google Developers Console [project ID or project - // number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). - // This field has been deprecated and replaced by the name field. - // - // Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. - ProjectId string `protobuf:"bytes,1,opt,name=project_id,json=projectId,proto3" json:"project_id,omitempty"` - // Deprecated. The name of the Google Compute Engine - // [zone](https://cloud.google.com/compute/docs/zones#available) - // in which the cluster resides. This field has been deprecated and replaced - // by the name field. - // - // Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. - Zone string `protobuf:"bytes,2,opt,name=zone,proto3" json:"zone,omitempty"` - // Deprecated. The name of the cluster to update. - // This field has been deprecated and replaced by the name field. - // - // Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. - ClusterId string `protobuf:"bytes,3,opt,name=cluster_id,json=clusterId,proto3" json:"cluster_id,omitempty"` - // Required. Whether ABAC authorization will be enabled in the cluster. - Enabled bool `protobuf:"varint,4,opt,name=enabled,proto3" json:"enabled,omitempty"` - // The name (project, location, cluster name) of the cluster to set legacy - // abac. Specified in the format `projects/*/locations/*/clusters/*`. - Name string `protobuf:"bytes,6,opt,name=name,proto3" json:"name,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *SetLegacyAbacRequest) Reset() { - *x = SetLegacyAbacRequest{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[118] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *SetLegacyAbacRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SetLegacyAbacRequest) ProtoMessage() {} - -func (x *SetLegacyAbacRequest) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[118] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SetLegacyAbacRequest.ProtoReflect.Descriptor instead. -func (*SetLegacyAbacRequest) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{118} -} - -// Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. -func (x *SetLegacyAbacRequest) GetProjectId() string { - if x != nil { - return x.ProjectId - } - return "" -} - -// Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. -func (x *SetLegacyAbacRequest) GetZone() string { - if x != nil { - return x.Zone - } - return "" -} - -// Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. -func (x *SetLegacyAbacRequest) GetClusterId() string { - if x != nil { - return x.ClusterId - } - return "" -} - -func (x *SetLegacyAbacRequest) GetEnabled() bool { - if x != nil { - return x.Enabled - } - return false -} - -func (x *SetLegacyAbacRequest) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -// StartIPRotationRequest creates a new IP for the cluster and then performs -// a node upgrade on each node pool to point to the new IP. -type StartIPRotationRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Deprecated. The Google Developers Console [project ID or project - // number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). - // This field has been deprecated and replaced by the name field. - // - // Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. - ProjectId string `protobuf:"bytes,1,opt,name=project_id,json=projectId,proto3" json:"project_id,omitempty"` - // Deprecated. The name of the Google Compute Engine - // [zone](https://cloud.google.com/compute/docs/zones#available) - // in which the cluster resides. This field has been deprecated and replaced - // by the name field. - // - // Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. - Zone string `protobuf:"bytes,2,opt,name=zone,proto3" json:"zone,omitempty"` - // Deprecated. The name of the cluster. - // This field has been deprecated and replaced by the name field. - // - // Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. - ClusterId string `protobuf:"bytes,3,opt,name=cluster_id,json=clusterId,proto3" json:"cluster_id,omitempty"` - // The name (project, location, cluster name) of the cluster to start IP - // rotation. Specified in the format `projects/*/locations/*/clusters/*`. - Name string `protobuf:"bytes,6,opt,name=name,proto3" json:"name,omitempty"` - // Whether to rotate credentials during IP rotation. - RotateCredentials bool `protobuf:"varint,7,opt,name=rotate_credentials,json=rotateCredentials,proto3" json:"rotate_credentials,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *StartIPRotationRequest) Reset() { - *x = StartIPRotationRequest{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[119] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *StartIPRotationRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*StartIPRotationRequest) ProtoMessage() {} - -func (x *StartIPRotationRequest) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[119] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use StartIPRotationRequest.ProtoReflect.Descriptor instead. -func (*StartIPRotationRequest) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{119} -} - -// Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. -func (x *StartIPRotationRequest) GetProjectId() string { - if x != nil { - return x.ProjectId - } - return "" -} - -// Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. -func (x *StartIPRotationRequest) GetZone() string { - if x != nil { - return x.Zone - } - return "" -} - -// Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. -func (x *StartIPRotationRequest) GetClusterId() string { - if x != nil { - return x.ClusterId - } - return "" -} - -func (x *StartIPRotationRequest) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *StartIPRotationRequest) GetRotateCredentials() bool { - if x != nil { - return x.RotateCredentials - } - return false -} - -// CompleteIPRotationRequest moves the cluster master back into single-IP mode. -type CompleteIPRotationRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Deprecated. The Google Developers Console [project ID or project - // number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). - // This field has been deprecated and replaced by the name field. - // - // Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. - ProjectId string `protobuf:"bytes,1,opt,name=project_id,json=projectId,proto3" json:"project_id,omitempty"` - // Deprecated. The name of the Google Compute Engine - // [zone](https://cloud.google.com/compute/docs/zones#available) - // in which the cluster resides. This field has been deprecated and replaced - // by the name field. - // - // Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. - Zone string `protobuf:"bytes,2,opt,name=zone,proto3" json:"zone,omitempty"` - // Deprecated. The name of the cluster. - // This field has been deprecated and replaced by the name field. - // - // Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. - ClusterId string `protobuf:"bytes,3,opt,name=cluster_id,json=clusterId,proto3" json:"cluster_id,omitempty"` - // The name (project, location, cluster name) of the cluster to complete IP - // rotation. Specified in the format `projects/*/locations/*/clusters/*`. - Name string `protobuf:"bytes,7,opt,name=name,proto3" json:"name,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *CompleteIPRotationRequest) Reset() { - *x = CompleteIPRotationRequest{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[120] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *CompleteIPRotationRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CompleteIPRotationRequest) ProtoMessage() {} - -func (x *CompleteIPRotationRequest) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[120] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CompleteIPRotationRequest.ProtoReflect.Descriptor instead. -func (*CompleteIPRotationRequest) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{120} -} - -// Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. -func (x *CompleteIPRotationRequest) GetProjectId() string { - if x != nil { - return x.ProjectId - } - return "" -} - -// Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. -func (x *CompleteIPRotationRequest) GetZone() string { - if x != nil { - return x.Zone - } - return "" -} - -// Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. -func (x *CompleteIPRotationRequest) GetClusterId() string { - if x != nil { - return x.ClusterId - } - return "" -} - -func (x *CompleteIPRotationRequest) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -// AcceleratorConfig represents a Hardware Accelerator request. -type AcceleratorConfig struct { - state protoimpl.MessageState `protogen:"open.v1"` - // The number of the accelerator cards exposed to an instance. - AcceleratorCount int64 `protobuf:"varint,1,opt,name=accelerator_count,json=acceleratorCount,proto3" json:"accelerator_count,omitempty"` - // The accelerator type resource name. List of supported accelerators - // [here](https://cloud.google.com/compute/docs/gpus) - AcceleratorType string `protobuf:"bytes,2,opt,name=accelerator_type,json=acceleratorType,proto3" json:"accelerator_type,omitempty"` - // Size of partitions to create on the GPU. Valid values are described in the - // NVIDIA [mig user - // guide](https://docs.nvidia.com/datacenter/tesla/mig-user-guide/#partitioning). - GpuPartitionSize string `protobuf:"bytes,3,opt,name=gpu_partition_size,json=gpuPartitionSize,proto3" json:"gpu_partition_size,omitempty"` - // The configuration for GPU sharing options. - GpuSharingConfig *GPUSharingConfig `protobuf:"bytes,5,opt,name=gpu_sharing_config,json=gpuSharingConfig,proto3,oneof" json:"gpu_sharing_config,omitempty"` - // The configuration for auto installation of GPU driver. - GpuDriverInstallationConfig *GPUDriverInstallationConfig `protobuf:"bytes,6,opt,name=gpu_driver_installation_config,json=gpuDriverInstallationConfig,proto3,oneof" json:"gpu_driver_installation_config,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *AcceleratorConfig) Reset() { - *x = AcceleratorConfig{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[121] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *AcceleratorConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*AcceleratorConfig) ProtoMessage() {} - -func (x *AcceleratorConfig) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[121] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use AcceleratorConfig.ProtoReflect.Descriptor instead. -func (*AcceleratorConfig) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{121} -} - -func (x *AcceleratorConfig) GetAcceleratorCount() int64 { - if x != nil { - return x.AcceleratorCount - } - return 0 -} - -func (x *AcceleratorConfig) GetAcceleratorType() string { - if x != nil { - return x.AcceleratorType - } - return "" -} - -func (x *AcceleratorConfig) GetGpuPartitionSize() string { - if x != nil { - return x.GpuPartitionSize - } - return "" -} - -func (x *AcceleratorConfig) GetGpuSharingConfig() *GPUSharingConfig { - if x != nil { - return x.GpuSharingConfig - } - return nil -} - -func (x *AcceleratorConfig) GetGpuDriverInstallationConfig() *GPUDriverInstallationConfig { - if x != nil { - return x.GpuDriverInstallationConfig - } - return nil -} - -// GPUSharingConfig represents the GPU sharing configuration for Hardware -// Accelerators. -type GPUSharingConfig struct { - state protoimpl.MessageState `protogen:"open.v1"` - // The max number of containers that can share a physical GPU. - MaxSharedClientsPerGpu int64 `protobuf:"varint,1,opt,name=max_shared_clients_per_gpu,json=maxSharedClientsPerGpu,proto3" json:"max_shared_clients_per_gpu,omitempty"` - // The type of GPU sharing strategy to enable on the GPU node. - GpuSharingStrategy *GPUSharingConfig_GPUSharingStrategy `protobuf:"varint,2,opt,name=gpu_sharing_strategy,json=gpuSharingStrategy,proto3,enum=google.container.v1.GPUSharingConfig_GPUSharingStrategy,oneof" json:"gpu_sharing_strategy,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *GPUSharingConfig) Reset() { - *x = GPUSharingConfig{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[122] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *GPUSharingConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GPUSharingConfig) ProtoMessage() {} - -func (x *GPUSharingConfig) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[122] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GPUSharingConfig.ProtoReflect.Descriptor instead. -func (*GPUSharingConfig) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{122} -} - -func (x *GPUSharingConfig) GetMaxSharedClientsPerGpu() int64 { - if x != nil { - return x.MaxSharedClientsPerGpu - } - return 0 -} - -func (x *GPUSharingConfig) GetGpuSharingStrategy() GPUSharingConfig_GPUSharingStrategy { - if x != nil && x.GpuSharingStrategy != nil { - return *x.GpuSharingStrategy - } - return GPUSharingConfig_GPU_SHARING_STRATEGY_UNSPECIFIED -} - -// GPUDriverInstallationConfig specifies the version of GPU driver to be auto -// installed. -type GPUDriverInstallationConfig struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Mode for how the GPU driver is installed. - GpuDriverVersion *GPUDriverInstallationConfig_GPUDriverVersion `protobuf:"varint,1,opt,name=gpu_driver_version,json=gpuDriverVersion,proto3,enum=google.container.v1.GPUDriverInstallationConfig_GPUDriverVersion,oneof" json:"gpu_driver_version,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *GPUDriverInstallationConfig) Reset() { - *x = GPUDriverInstallationConfig{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[123] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *GPUDriverInstallationConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GPUDriverInstallationConfig) ProtoMessage() {} - -func (x *GPUDriverInstallationConfig) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[123] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GPUDriverInstallationConfig.ProtoReflect.Descriptor instead. -func (*GPUDriverInstallationConfig) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{123} -} - -func (x *GPUDriverInstallationConfig) GetGpuDriverVersion() GPUDriverInstallationConfig_GPUDriverVersion { - if x != nil && x.GpuDriverVersion != nil { - return *x.GpuDriverVersion - } - return GPUDriverInstallationConfig_GPU_DRIVER_VERSION_UNSPECIFIED -} - -// WorkloadMetadataConfig defines the metadata configuration to expose to -// workloads on the node pool. -type WorkloadMetadataConfig struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Mode is the configuration for how to expose metadata to workloads running - // on the node pool. - Mode WorkloadMetadataConfig_Mode `protobuf:"varint,2,opt,name=mode,proto3,enum=google.container.v1.WorkloadMetadataConfig_Mode" json:"mode,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *WorkloadMetadataConfig) Reset() { - *x = WorkloadMetadataConfig{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[124] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *WorkloadMetadataConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*WorkloadMetadataConfig) ProtoMessage() {} - -func (x *WorkloadMetadataConfig) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[124] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use WorkloadMetadataConfig.ProtoReflect.Descriptor instead. -func (*WorkloadMetadataConfig) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{124} -} - -func (x *WorkloadMetadataConfig) GetMode() WorkloadMetadataConfig_Mode { - if x != nil { - return x.Mode - } - return WorkloadMetadataConfig_MODE_UNSPECIFIED -} - -// SetNetworkPolicyRequest enables/disables network policy for a cluster. -type SetNetworkPolicyRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Deprecated. The Google Developers Console [project ID or project - // number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). - // This field has been deprecated and replaced by the name field. - // - // Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. - ProjectId string `protobuf:"bytes,1,opt,name=project_id,json=projectId,proto3" json:"project_id,omitempty"` - // Deprecated. The name of the Google Compute Engine - // [zone](https://cloud.google.com/compute/docs/zones#available) - // in which the cluster resides. This field has been deprecated and replaced - // by the name field. - // - // Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. - Zone string `protobuf:"bytes,2,opt,name=zone,proto3" json:"zone,omitempty"` - // Deprecated. The name of the cluster. - // This field has been deprecated and replaced by the name field. - // - // Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. - ClusterId string `protobuf:"bytes,3,opt,name=cluster_id,json=clusterId,proto3" json:"cluster_id,omitempty"` - // Required. Configuration options for the NetworkPolicy feature. - NetworkPolicy *NetworkPolicy `protobuf:"bytes,4,opt,name=network_policy,json=networkPolicy,proto3" json:"network_policy,omitempty"` - // The name (project, location, cluster name) of the cluster to set networking - // policy. Specified in the format `projects/*/locations/*/clusters/*`. - Name string `protobuf:"bytes,6,opt,name=name,proto3" json:"name,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *SetNetworkPolicyRequest) Reset() { - *x = SetNetworkPolicyRequest{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[125] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *SetNetworkPolicyRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SetNetworkPolicyRequest) ProtoMessage() {} - -func (x *SetNetworkPolicyRequest) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[125] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SetNetworkPolicyRequest.ProtoReflect.Descriptor instead. -func (*SetNetworkPolicyRequest) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{125} -} - -// Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. -func (x *SetNetworkPolicyRequest) GetProjectId() string { - if x != nil { - return x.ProjectId - } - return "" -} - -// Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. -func (x *SetNetworkPolicyRequest) GetZone() string { - if x != nil { - return x.Zone - } - return "" -} - -// Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. -func (x *SetNetworkPolicyRequest) GetClusterId() string { - if x != nil { - return x.ClusterId - } - return "" -} - -func (x *SetNetworkPolicyRequest) GetNetworkPolicy() *NetworkPolicy { - if x != nil { - return x.NetworkPolicy - } - return nil -} - -func (x *SetNetworkPolicyRequest) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -// SetMaintenancePolicyRequest sets the maintenance policy for a cluster. -type SetMaintenancePolicyRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Required. The Google Developers Console [project ID or project - // number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). - ProjectId string `protobuf:"bytes,1,opt,name=project_id,json=projectId,proto3" json:"project_id,omitempty"` - // Required. The name of the Google Compute Engine - // [zone](https://cloud.google.com/compute/docs/zones#available) - // in which the cluster resides. - Zone string `protobuf:"bytes,2,opt,name=zone,proto3" json:"zone,omitempty"` - // Required. The name of the cluster to update. - ClusterId string `protobuf:"bytes,3,opt,name=cluster_id,json=clusterId,proto3" json:"cluster_id,omitempty"` - // Required. The maintenance policy to be set for the cluster. An empty field - // clears the existing maintenance policy. - MaintenancePolicy *MaintenancePolicy `protobuf:"bytes,4,opt,name=maintenance_policy,json=maintenancePolicy,proto3" json:"maintenance_policy,omitempty"` - // The name (project, location, cluster name) of the cluster to set - // maintenance policy. - // Specified in the format `projects/*/locations/*/clusters/*`. - Name string `protobuf:"bytes,5,opt,name=name,proto3" json:"name,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *SetMaintenancePolicyRequest) Reset() { - *x = SetMaintenancePolicyRequest{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[126] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *SetMaintenancePolicyRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SetMaintenancePolicyRequest) ProtoMessage() {} - -func (x *SetMaintenancePolicyRequest) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[126] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SetMaintenancePolicyRequest.ProtoReflect.Descriptor instead. -func (*SetMaintenancePolicyRequest) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{126} -} - -func (x *SetMaintenancePolicyRequest) GetProjectId() string { - if x != nil { - return x.ProjectId - } - return "" -} - -func (x *SetMaintenancePolicyRequest) GetZone() string { - if x != nil { - return x.Zone - } - return "" -} - -func (x *SetMaintenancePolicyRequest) GetClusterId() string { - if x != nil { - return x.ClusterId - } - return "" -} - -func (x *SetMaintenancePolicyRequest) GetMaintenancePolicy() *MaintenancePolicy { - if x != nil { - return x.MaintenancePolicy - } - return nil -} - -func (x *SetMaintenancePolicyRequest) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -// StatusCondition describes why a cluster or a node pool has a certain status -// (e.g., ERROR or DEGRADED). -type StatusCondition struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Machine-friendly representation of the condition - // Deprecated. Use canonical_code instead. - // - // Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. - Code StatusCondition_Code `protobuf:"varint,1,opt,name=code,proto3,enum=google.container.v1.StatusCondition_Code" json:"code,omitempty"` - // Human-friendly representation of the condition - Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` - // Canonical code of the condition. - CanonicalCode code.Code `protobuf:"varint,3,opt,name=canonical_code,json=canonicalCode,proto3,enum=google.rpc.Code" json:"canonical_code,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *StatusCondition) Reset() { - *x = StatusCondition{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[127] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *StatusCondition) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*StatusCondition) ProtoMessage() {} - -func (x *StatusCondition) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[127] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use StatusCondition.ProtoReflect.Descriptor instead. -func (*StatusCondition) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{127} -} - -// Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. -func (x *StatusCondition) GetCode() StatusCondition_Code { - if x != nil { - return x.Code - } - return StatusCondition_UNKNOWN -} - -func (x *StatusCondition) GetMessage() string { - if x != nil { - return x.Message - } - return "" -} - -func (x *StatusCondition) GetCanonicalCode() code.Code { - if x != nil { - return x.CanonicalCode - } - return code.Code(0) -} - -// NetworkConfig reports the relative names of network & subnetwork. -type NetworkConfig struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Output only. The relative name of the Google Compute Engine - // [network](https://cloud.google.com/compute/docs/networks-and-firewalls#networks) - // to which the cluster is connected. Example: - // projects/my-project/global/networks/my-network - Network string `protobuf:"bytes,1,opt,name=network,proto3" json:"network,omitempty"` - // Output only. The relative name of the Google Compute Engine - // [subnetwork](https://cloud.google.com/compute/docs/vpc) - // to which the cluster is connected. Example: - // projects/my-project/regions/us-central1/subnetworks/my-subnet - Subnetwork string `protobuf:"bytes,2,opt,name=subnetwork,proto3" json:"subnetwork,omitempty"` - // Whether Intra-node visibility is enabled for this cluster. - // This makes same node pod to pod traffic visible for VPC network. - EnableIntraNodeVisibility bool `protobuf:"varint,5,opt,name=enable_intra_node_visibility,json=enableIntraNodeVisibility,proto3" json:"enable_intra_node_visibility,omitempty"` - // Whether the cluster disables default in-node sNAT rules. In-node sNAT rules - // will be disabled when default_snat_status is disabled. When disabled is set - // to false, default IP masquerade rules will be applied to the nodes to - // prevent sNAT on cluster internal traffic. - DefaultSnatStatus *DefaultSnatStatus `protobuf:"bytes,7,opt,name=default_snat_status,json=defaultSnatStatus,proto3" json:"default_snat_status,omitempty"` - // Whether L4ILB Subsetting is enabled for this cluster. - EnableL4IlbSubsetting bool `protobuf:"varint,10,opt,name=enable_l4ilb_subsetting,json=enableL4ilbSubsetting,proto3" json:"enable_l4ilb_subsetting,omitempty"` - // The desired datapath provider for this cluster. By default, uses the - // IPTables-based kube-proxy implementation. - DatapathProvider DatapathProvider `protobuf:"varint,11,opt,name=datapath_provider,json=datapathProvider,proto3,enum=google.container.v1.DatapathProvider" json:"datapath_provider,omitempty"` - // The desired state of IPv6 connectivity to Google Services. - // By default, no private IPv6 access to or from Google Services (all access - // will be via IPv4) - PrivateIpv6GoogleAccess PrivateIPv6GoogleAccess `protobuf:"varint,12,opt,name=private_ipv6_google_access,json=privateIpv6GoogleAccess,proto3,enum=google.container.v1.PrivateIPv6GoogleAccess" json:"private_ipv6_google_access,omitempty"` - // DNSConfig contains clusterDNS config for this cluster. - DnsConfig *DNSConfig `protobuf:"bytes,13,opt,name=dns_config,json=dnsConfig,proto3" json:"dns_config,omitempty"` - // ServiceExternalIPsConfig specifies if services with externalIPs field are - // blocked or not. - ServiceExternalIpsConfig *ServiceExternalIPsConfig `protobuf:"bytes,15,opt,name=service_external_ips_config,json=serviceExternalIpsConfig,proto3" json:"service_external_ips_config,omitempty"` - // GatewayAPIConfig contains the desired config of Gateway API on this - // cluster. - GatewayApiConfig *GatewayAPIConfig `protobuf:"bytes,16,opt,name=gateway_api_config,json=gatewayApiConfig,proto3" json:"gateway_api_config,omitempty"` - // Whether multi-networking is enabled for this cluster. - EnableMultiNetworking bool `protobuf:"varint,17,opt,name=enable_multi_networking,json=enableMultiNetworking,proto3" json:"enable_multi_networking,omitempty"` - // Network bandwidth tier configuration. - NetworkPerformanceConfig *NetworkConfig_ClusterNetworkPerformanceConfig `protobuf:"bytes,18,opt,name=network_performance_config,json=networkPerformanceConfig,proto3" json:"network_performance_config,omitempty"` - // Whether FQDN Network Policy is enabled on this cluster. - EnableFqdnNetworkPolicy *bool `protobuf:"varint,19,opt,name=enable_fqdn_network_policy,json=enableFqdnNetworkPolicy,proto3,oneof" json:"enable_fqdn_network_policy,omitempty"` - // Specify the details of in-transit encryption. - // Now named inter-node transparent encryption. - InTransitEncryptionConfig *InTransitEncryptionConfig `protobuf:"varint,20,opt,name=in_transit_encryption_config,json=inTransitEncryptionConfig,proto3,enum=google.container.v1.InTransitEncryptionConfig,oneof" json:"in_transit_encryption_config,omitempty"` - // Whether CiliumClusterwideNetworkPolicy is enabled on this cluster. - EnableCiliumClusterwideNetworkPolicy *bool `protobuf:"varint,21,opt,name=enable_cilium_clusterwide_network_policy,json=enableCiliumClusterwideNetworkPolicy,proto3,oneof" json:"enable_cilium_clusterwide_network_policy,omitempty"` - // Controls whether by default nodes have private IP addresses only. - // It is invalid to specify both [PrivateClusterConfig.enablePrivateNodes][] - // and this field at the same time. - // To update the default setting, use - // [ClusterUpdate.desired_default_enable_private_nodes][google.container.v1.ClusterUpdate.desired_default_enable_private_nodes] - DefaultEnablePrivateNodes *bool `protobuf:"varint,22,opt,name=default_enable_private_nodes,json=defaultEnablePrivateNodes,proto3,oneof" json:"default_enable_private_nodes,omitempty"` - // Disable L4 load balancer VPC firewalls to enable firewall policies. - DisableL4LbFirewallReconciliation *bool `protobuf:"varint,24,opt,name=disable_l4_lb_firewall_reconciliation,json=disableL4LbFirewallReconciliation,proto3,oneof" json:"disable_l4_lb_firewall_reconciliation,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *NetworkConfig) Reset() { - *x = NetworkConfig{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[128] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *NetworkConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*NetworkConfig) ProtoMessage() {} - -func (x *NetworkConfig) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[128] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use NetworkConfig.ProtoReflect.Descriptor instead. -func (*NetworkConfig) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{128} -} - -func (x *NetworkConfig) GetNetwork() string { - if x != nil { - return x.Network - } - return "" -} - -func (x *NetworkConfig) GetSubnetwork() string { - if x != nil { - return x.Subnetwork - } - return "" -} - -func (x *NetworkConfig) GetEnableIntraNodeVisibility() bool { - if x != nil { - return x.EnableIntraNodeVisibility - } - return false -} - -func (x *NetworkConfig) GetDefaultSnatStatus() *DefaultSnatStatus { - if x != nil { - return x.DefaultSnatStatus - } - return nil -} - -func (x *NetworkConfig) GetEnableL4IlbSubsetting() bool { - if x != nil { - return x.EnableL4IlbSubsetting - } - return false -} - -func (x *NetworkConfig) GetDatapathProvider() DatapathProvider { - if x != nil { - return x.DatapathProvider - } - return DatapathProvider_DATAPATH_PROVIDER_UNSPECIFIED -} - -func (x *NetworkConfig) GetPrivateIpv6GoogleAccess() PrivateIPv6GoogleAccess { - if x != nil { - return x.PrivateIpv6GoogleAccess - } - return PrivateIPv6GoogleAccess_PRIVATE_IPV6_GOOGLE_ACCESS_UNSPECIFIED -} - -func (x *NetworkConfig) GetDnsConfig() *DNSConfig { - if x != nil { - return x.DnsConfig - } - return nil -} - -func (x *NetworkConfig) GetServiceExternalIpsConfig() *ServiceExternalIPsConfig { - if x != nil { - return x.ServiceExternalIpsConfig - } - return nil -} - -func (x *NetworkConfig) GetGatewayApiConfig() *GatewayAPIConfig { - if x != nil { - return x.GatewayApiConfig - } - return nil -} - -func (x *NetworkConfig) GetEnableMultiNetworking() bool { - if x != nil { - return x.EnableMultiNetworking - } - return false -} - -func (x *NetworkConfig) GetNetworkPerformanceConfig() *NetworkConfig_ClusterNetworkPerformanceConfig { - if x != nil { - return x.NetworkPerformanceConfig - } - return nil -} - -func (x *NetworkConfig) GetEnableFqdnNetworkPolicy() bool { - if x != nil && x.EnableFqdnNetworkPolicy != nil { - return *x.EnableFqdnNetworkPolicy - } - return false -} - -func (x *NetworkConfig) GetInTransitEncryptionConfig() InTransitEncryptionConfig { - if x != nil && x.InTransitEncryptionConfig != nil { - return *x.InTransitEncryptionConfig - } - return InTransitEncryptionConfig_IN_TRANSIT_ENCRYPTION_CONFIG_UNSPECIFIED -} - -func (x *NetworkConfig) GetEnableCiliumClusterwideNetworkPolicy() bool { - if x != nil && x.EnableCiliumClusterwideNetworkPolicy != nil { - return *x.EnableCiliumClusterwideNetworkPolicy - } - return false -} - -func (x *NetworkConfig) GetDefaultEnablePrivateNodes() bool { - if x != nil && x.DefaultEnablePrivateNodes != nil { - return *x.DefaultEnablePrivateNodes - } - return false -} - -func (x *NetworkConfig) GetDisableL4LbFirewallReconciliation() bool { - if x != nil && x.DisableL4LbFirewallReconciliation != nil { - return *x.DisableL4LbFirewallReconciliation - } - return false -} - -// GatewayAPIConfig contains the desired config of Gateway API on this cluster. -type GatewayAPIConfig struct { - state protoimpl.MessageState `protogen:"open.v1"` - // The Gateway API release channel to use for Gateway API. - Channel GatewayAPIConfig_Channel `protobuf:"varint,1,opt,name=channel,proto3,enum=google.container.v1.GatewayAPIConfig_Channel" json:"channel,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *GatewayAPIConfig) Reset() { - *x = GatewayAPIConfig{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[129] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *GatewayAPIConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GatewayAPIConfig) ProtoMessage() {} - -func (x *GatewayAPIConfig) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[129] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GatewayAPIConfig.ProtoReflect.Descriptor instead. -func (*GatewayAPIConfig) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{129} -} - -func (x *GatewayAPIConfig) GetChannel() GatewayAPIConfig_Channel { - if x != nil { - return x.Channel - } - return GatewayAPIConfig_CHANNEL_UNSPECIFIED -} - -// Config to block services with externalIPs field. -type ServiceExternalIPsConfig struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Whether Services with ExternalIPs field are allowed or not. - Enabled bool `protobuf:"varint,1,opt,name=enabled,proto3" json:"enabled,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ServiceExternalIPsConfig) Reset() { - *x = ServiceExternalIPsConfig{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[130] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ServiceExternalIPsConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ServiceExternalIPsConfig) ProtoMessage() {} - -func (x *ServiceExternalIPsConfig) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[130] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ServiceExternalIPsConfig.ProtoReflect.Descriptor instead. -func (*ServiceExternalIPsConfig) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{130} -} - -func (x *ServiceExternalIPsConfig) GetEnabled() bool { - if x != nil { - return x.Enabled - } - return false -} - -// GetOpenIDConfigRequest gets the OIDC discovery document for the -// cluster. See the OpenID Connect Discovery 1.0 specification for details. -type GetOpenIDConfigRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - // The cluster (project, location, cluster name) to get the discovery document - // for. Specified in the format `projects/*/locations/*/clusters/*`. - Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *GetOpenIDConfigRequest) Reset() { - *x = GetOpenIDConfigRequest{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[131] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *GetOpenIDConfigRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetOpenIDConfigRequest) ProtoMessage() {} - -func (x *GetOpenIDConfigRequest) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[131] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetOpenIDConfigRequest.ProtoReflect.Descriptor instead. -func (*GetOpenIDConfigRequest) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{131} -} - -func (x *GetOpenIDConfigRequest) GetParent() string { - if x != nil { - return x.Parent - } - return "" -} - -// GetOpenIDConfigResponse is an OIDC discovery document for the cluster. -// See the OpenID Connect Discovery 1.0 specification for details. -type GetOpenIDConfigResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - // OIDC Issuer. - Issuer string `protobuf:"bytes,1,opt,name=issuer,proto3" json:"issuer,omitempty"` - // JSON Web Key uri. - JwksUri string `protobuf:"bytes,2,opt,name=jwks_uri,proto3" json:"jwks_uri,omitempty"` - // Supported response types. - ResponseTypesSupported []string `protobuf:"bytes,3,rep,name=response_types_supported,proto3" json:"response_types_supported,omitempty"` - // Supported subject types. - SubjectTypesSupported []string `protobuf:"bytes,4,rep,name=subject_types_supported,proto3" json:"subject_types_supported,omitempty"` - // supported ID Token signing Algorithms. - IdTokenSigningAlgValuesSupported []string `protobuf:"bytes,5,rep,name=id_token_signing_alg_values_supported,proto3" json:"id_token_signing_alg_values_supported,omitempty"` - // Supported claims. - ClaimsSupported []string `protobuf:"bytes,6,rep,name=claims_supported,proto3" json:"claims_supported,omitempty"` - // Supported grant types. - GrantTypes []string `protobuf:"bytes,7,rep,name=grant_types,proto3" json:"grant_types,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *GetOpenIDConfigResponse) Reset() { - *x = GetOpenIDConfigResponse{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[132] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *GetOpenIDConfigResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetOpenIDConfigResponse) ProtoMessage() {} - -func (x *GetOpenIDConfigResponse) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[132] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetOpenIDConfigResponse.ProtoReflect.Descriptor instead. -func (*GetOpenIDConfigResponse) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{132} -} - -func (x *GetOpenIDConfigResponse) GetIssuer() string { - if x != nil { - return x.Issuer - } - return "" -} - -func (x *GetOpenIDConfigResponse) GetJwksUri() string { - if x != nil { - return x.JwksUri - } - return "" -} - -func (x *GetOpenIDConfigResponse) GetResponseTypesSupported() []string { - if x != nil { - return x.ResponseTypesSupported - } - return nil -} - -func (x *GetOpenIDConfigResponse) GetSubjectTypesSupported() []string { - if x != nil { - return x.SubjectTypesSupported - } - return nil -} - -func (x *GetOpenIDConfigResponse) GetIdTokenSigningAlgValuesSupported() []string { - if x != nil { - return x.IdTokenSigningAlgValuesSupported - } - return nil -} - -func (x *GetOpenIDConfigResponse) GetClaimsSupported() []string { - if x != nil { - return x.ClaimsSupported - } - return nil -} - -func (x *GetOpenIDConfigResponse) GetGrantTypes() []string { - if x != nil { - return x.GrantTypes - } - return nil -} - -// GetJSONWebKeysRequest gets the public component of the keys used by the -// cluster to sign token requests. This will be the jwks_uri for the discover -// document returned by getOpenIDConfig. See the OpenID Connect -// Discovery 1.0 specification for details. -type GetJSONWebKeysRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - // The cluster (project, location, cluster name) to get keys for. Specified in - // the format `projects/*/locations/*/clusters/*`. - Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *GetJSONWebKeysRequest) Reset() { - *x = GetJSONWebKeysRequest{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[133] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *GetJSONWebKeysRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetJSONWebKeysRequest) ProtoMessage() {} - -func (x *GetJSONWebKeysRequest) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[133] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetJSONWebKeysRequest.ProtoReflect.Descriptor instead. -func (*GetJSONWebKeysRequest) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{133} -} - -func (x *GetJSONWebKeysRequest) GetParent() string { - if x != nil { - return x.Parent - } - return "" -} - -// Jwk is a JSON Web Key as specified in RFC 7517 -type Jwk struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Key Type. - Kty string `protobuf:"bytes,1,opt,name=kty,proto3" json:"kty,omitempty"` - // Algorithm. - Alg string `protobuf:"bytes,2,opt,name=alg,proto3" json:"alg,omitempty"` - // Permitted uses for the public keys. - Use string `protobuf:"bytes,3,opt,name=use,proto3" json:"use,omitempty"` - // Key ID. - Kid string `protobuf:"bytes,4,opt,name=kid,proto3" json:"kid,omitempty"` - // Used for RSA keys. - N string `protobuf:"bytes,5,opt,name=n,proto3" json:"n,omitempty"` - // Used for RSA keys. - E string `protobuf:"bytes,6,opt,name=e,proto3" json:"e,omitempty"` - // Used for ECDSA keys. - X string `protobuf:"bytes,7,opt,name=x,proto3" json:"x,omitempty"` - // Used for ECDSA keys. - Y string `protobuf:"bytes,8,opt,name=y,proto3" json:"y,omitempty"` - // Used for ECDSA keys. - Crv string `protobuf:"bytes,9,opt,name=crv,proto3" json:"crv,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *Jwk) Reset() { - *x = Jwk{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[134] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *Jwk) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Jwk) ProtoMessage() {} - -func (x *Jwk) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[134] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Jwk.ProtoReflect.Descriptor instead. -func (*Jwk) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{134} -} - -func (x *Jwk) GetKty() string { - if x != nil { - return x.Kty - } - return "" -} - -func (x *Jwk) GetAlg() string { - if x != nil { - return x.Alg - } - return "" -} - -func (x *Jwk) GetUse() string { - if x != nil { - return x.Use - } - return "" -} - -func (x *Jwk) GetKid() string { - if x != nil { - return x.Kid - } - return "" -} - -func (x *Jwk) GetN() string { - if x != nil { - return x.N - } - return "" -} - -func (x *Jwk) GetE() string { - if x != nil { - return x.E - } - return "" -} - -func (x *Jwk) GetX() string { - if x != nil { - return x.X - } - return "" -} - -func (x *Jwk) GetY() string { - if x != nil { - return x.Y - } - return "" -} - -func (x *Jwk) GetCrv() string { - if x != nil { - return x.Crv - } - return "" -} - -// GetJSONWebKeysResponse is a valid JSON Web Key Set as specified in rfc 7517 -type GetJSONWebKeysResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - // The public component of the keys used by the cluster to sign token - // requests. - Keys []*Jwk `protobuf:"bytes,1,rep,name=keys,proto3" json:"keys,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *GetJSONWebKeysResponse) Reset() { - *x = GetJSONWebKeysResponse{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[135] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *GetJSONWebKeysResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetJSONWebKeysResponse) ProtoMessage() {} - -func (x *GetJSONWebKeysResponse) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[135] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetJSONWebKeysResponse.ProtoReflect.Descriptor instead. -func (*GetJSONWebKeysResponse) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{135} -} - -func (x *GetJSONWebKeysResponse) GetKeys() []*Jwk { - if x != nil { - return x.Keys - } - return nil -} - -// CheckAutopilotCompatibilityRequest requests getting the blockers for the -// given operation in the cluster. -type CheckAutopilotCompatibilityRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - // The name (project, location, cluster) of the cluster to retrieve. - // Specified in the format `projects/*/locations/*/clusters/*`. - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *CheckAutopilotCompatibilityRequest) Reset() { - *x = CheckAutopilotCompatibilityRequest{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[136] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *CheckAutopilotCompatibilityRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CheckAutopilotCompatibilityRequest) ProtoMessage() {} - -func (x *CheckAutopilotCompatibilityRequest) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[136] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CheckAutopilotCompatibilityRequest.ProtoReflect.Descriptor instead. -func (*CheckAutopilotCompatibilityRequest) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{136} -} - -func (x *CheckAutopilotCompatibilityRequest) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -// AutopilotCompatibilityIssue contains information about a specific -// compatibility issue with Autopilot mode. -type AutopilotCompatibilityIssue struct { - state protoimpl.MessageState `protogen:"open.v1"` - // The last time when this issue was observed. - LastObservation *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=last_observation,json=lastObservation,proto3" json:"last_observation,omitempty"` - // The constraint type of the issue. - ConstraintType string `protobuf:"bytes,2,opt,name=constraint_type,json=constraintType,proto3" json:"constraint_type,omitempty"` - // The incompatibility type of this issue. - IncompatibilityType AutopilotCompatibilityIssue_IssueType `protobuf:"varint,3,opt,name=incompatibility_type,json=incompatibilityType,proto3,enum=google.container.v1.AutopilotCompatibilityIssue_IssueType" json:"incompatibility_type,omitempty"` - // The name of the resources which are subject to this issue. - Subjects []string `protobuf:"bytes,4,rep,name=subjects,proto3" json:"subjects,omitempty"` - // A URL to a public documentation, which addresses resolving this issue. - DocumentationUrl string `protobuf:"bytes,5,opt,name=documentation_url,json=documentationUrl,proto3" json:"documentation_url,omitempty"` - // The description of the issue. - Description string `protobuf:"bytes,6,opt,name=description,proto3" json:"description,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *AutopilotCompatibilityIssue) Reset() { - *x = AutopilotCompatibilityIssue{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[137] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *AutopilotCompatibilityIssue) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*AutopilotCompatibilityIssue) ProtoMessage() {} - -func (x *AutopilotCompatibilityIssue) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[137] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use AutopilotCompatibilityIssue.ProtoReflect.Descriptor instead. -func (*AutopilotCompatibilityIssue) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{137} -} - -func (x *AutopilotCompatibilityIssue) GetLastObservation() *timestamppb.Timestamp { - if x != nil { - return x.LastObservation - } - return nil -} - -func (x *AutopilotCompatibilityIssue) GetConstraintType() string { - if x != nil { - return x.ConstraintType - } - return "" -} - -func (x *AutopilotCompatibilityIssue) GetIncompatibilityType() AutopilotCompatibilityIssue_IssueType { - if x != nil { - return x.IncompatibilityType - } - return AutopilotCompatibilityIssue_UNSPECIFIED -} - -func (x *AutopilotCompatibilityIssue) GetSubjects() []string { - if x != nil { - return x.Subjects - } - return nil -} - -func (x *AutopilotCompatibilityIssue) GetDocumentationUrl() string { - if x != nil { - return x.DocumentationUrl - } - return "" -} - -func (x *AutopilotCompatibilityIssue) GetDescription() string { - if x != nil { - return x.Description - } - return "" -} - -// CheckAutopilotCompatibilityResponse has a list of compatibility issues. -type CheckAutopilotCompatibilityResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - // The list of issues for the given operation. - Issues []*AutopilotCompatibilityIssue `protobuf:"bytes,1,rep,name=issues,proto3" json:"issues,omitempty"` - // The summary of the autopilot compatibility response. - Summary string `protobuf:"bytes,2,opt,name=summary,proto3" json:"summary,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *CheckAutopilotCompatibilityResponse) Reset() { - *x = CheckAutopilotCompatibilityResponse{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[138] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *CheckAutopilotCompatibilityResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CheckAutopilotCompatibilityResponse) ProtoMessage() {} - -func (x *CheckAutopilotCompatibilityResponse) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[138] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CheckAutopilotCompatibilityResponse.ProtoReflect.Descriptor instead. -func (*CheckAutopilotCompatibilityResponse) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{138} -} - -func (x *CheckAutopilotCompatibilityResponse) GetIssues() []*AutopilotCompatibilityIssue { - if x != nil { - return x.Issues - } - return nil -} - -func (x *CheckAutopilotCompatibilityResponse) GetSummary() string { - if x != nil { - return x.Summary - } - return "" -} - -// ReleaseChannel indicates which release channel a cluster is -// subscribed to. Release channels are arranged in order of risk. -// -// When a cluster is subscribed to a release channel, Google maintains -// both the master version and the node version. Node auto-upgrade -// defaults to true and cannot be disabled. -type ReleaseChannel struct { - state protoimpl.MessageState `protogen:"open.v1"` - // channel specifies which release channel the cluster is subscribed to. - Channel ReleaseChannel_Channel `protobuf:"varint,1,opt,name=channel,proto3,enum=google.container.v1.ReleaseChannel_Channel" json:"channel,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ReleaseChannel) Reset() { - *x = ReleaseChannel{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[139] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ReleaseChannel) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ReleaseChannel) ProtoMessage() {} - -func (x *ReleaseChannel) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[139] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ReleaseChannel.ProtoReflect.Descriptor instead. -func (*ReleaseChannel) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{139} -} - -func (x *ReleaseChannel) GetChannel() ReleaseChannel_Channel { - if x != nil { - return x.Channel - } - return ReleaseChannel_UNSPECIFIED -} - -// Configuration for fine-grained cost management feature. -type CostManagementConfig struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Whether the feature is enabled or not. - Enabled bool `protobuf:"varint,1,opt,name=enabled,proto3" json:"enabled,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *CostManagementConfig) Reset() { - *x = CostManagementConfig{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[140] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *CostManagementConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CostManagementConfig) ProtoMessage() {} - -func (x *CostManagementConfig) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[140] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CostManagementConfig.ProtoReflect.Descriptor instead. -func (*CostManagementConfig) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{140} -} - -func (x *CostManagementConfig) GetEnabled() bool { - if x != nil { - return x.Enabled - } - return false -} - -// IntraNodeVisibilityConfig contains the desired config of the intra-node -// visibility on this cluster. -type IntraNodeVisibilityConfig struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Enables intra node visibility for this cluster. - Enabled bool `protobuf:"varint,1,opt,name=enabled,proto3" json:"enabled,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *IntraNodeVisibilityConfig) Reset() { - *x = IntraNodeVisibilityConfig{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[141] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *IntraNodeVisibilityConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*IntraNodeVisibilityConfig) ProtoMessage() {} - -func (x *IntraNodeVisibilityConfig) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[141] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use IntraNodeVisibilityConfig.ProtoReflect.Descriptor instead. -func (*IntraNodeVisibilityConfig) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{141} -} - -func (x *IntraNodeVisibilityConfig) GetEnabled() bool { - if x != nil { - return x.Enabled - } - return false -} - -// ILBSubsettingConfig contains the desired config of L4 Internal LoadBalancer -// subsetting on this cluster. -type ILBSubsettingConfig struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Enables l4 ILB subsetting for this cluster. - Enabled bool `protobuf:"varint,1,opt,name=enabled,proto3" json:"enabled,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ILBSubsettingConfig) Reset() { - *x = ILBSubsettingConfig{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[142] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ILBSubsettingConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ILBSubsettingConfig) ProtoMessage() {} - -func (x *ILBSubsettingConfig) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[142] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ILBSubsettingConfig.ProtoReflect.Descriptor instead. -func (*ILBSubsettingConfig) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{142} -} - -func (x *ILBSubsettingConfig) GetEnabled() bool { - if x != nil { - return x.Enabled - } - return false -} - -// DNSConfig contains the desired set of options for configuring clusterDNS. -type DNSConfig struct { - state protoimpl.MessageState `protogen:"open.v1"` - // cluster_dns indicates which in-cluster DNS provider should be used. - ClusterDns DNSConfig_Provider `protobuf:"varint,1,opt,name=cluster_dns,json=clusterDns,proto3,enum=google.container.v1.DNSConfig_Provider" json:"cluster_dns,omitempty"` - // cluster_dns_scope indicates the scope of access to cluster DNS records. - ClusterDnsScope DNSConfig_DNSScope `protobuf:"varint,2,opt,name=cluster_dns_scope,json=clusterDnsScope,proto3,enum=google.container.v1.DNSConfig_DNSScope" json:"cluster_dns_scope,omitempty"` - // cluster_dns_domain is the suffix used for all cluster service records. - ClusterDnsDomain string `protobuf:"bytes,3,opt,name=cluster_dns_domain,json=clusterDnsDomain,proto3" json:"cluster_dns_domain,omitempty"` - // Optional. The domain used in Additive VPC scope. - AdditiveVpcScopeDnsDomain string `protobuf:"bytes,5,opt,name=additive_vpc_scope_dns_domain,json=additiveVpcScopeDnsDomain,proto3" json:"additive_vpc_scope_dns_domain,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *DNSConfig) Reset() { - *x = DNSConfig{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[143] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *DNSConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DNSConfig) ProtoMessage() {} - -func (x *DNSConfig) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[143] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DNSConfig.ProtoReflect.Descriptor instead. -func (*DNSConfig) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{143} -} - -func (x *DNSConfig) GetClusterDns() DNSConfig_Provider { - if x != nil { - return x.ClusterDns - } - return DNSConfig_PROVIDER_UNSPECIFIED -} - -func (x *DNSConfig) GetClusterDnsScope() DNSConfig_DNSScope { - if x != nil { - return x.ClusterDnsScope - } - return DNSConfig_DNS_SCOPE_UNSPECIFIED -} - -func (x *DNSConfig) GetClusterDnsDomain() string { - if x != nil { - return x.ClusterDnsDomain - } - return "" -} - -func (x *DNSConfig) GetAdditiveVpcScopeDnsDomain() string { - if x != nil { - return x.AdditiveVpcScopeDnsDomain - } - return "" -} - -// Constraints applied to pods. -type MaxPodsConstraint struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Constraint enforced on the max num of pods per node. - MaxPodsPerNode int64 `protobuf:"varint,1,opt,name=max_pods_per_node,json=maxPodsPerNode,proto3" json:"max_pods_per_node,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *MaxPodsConstraint) Reset() { - *x = MaxPodsConstraint{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[144] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *MaxPodsConstraint) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MaxPodsConstraint) ProtoMessage() {} - -func (x *MaxPodsConstraint) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[144] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use MaxPodsConstraint.ProtoReflect.Descriptor instead. -func (*MaxPodsConstraint) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{144} -} - -func (x *MaxPodsConstraint) GetMaxPodsPerNode() int64 { - if x != nil { - return x.MaxPodsPerNode - } - return 0 -} - -// Configuration for the use of Kubernetes Service Accounts in IAM policies. -type WorkloadIdentityConfig struct { - state protoimpl.MessageState `protogen:"open.v1"` - // The workload pool to attach all Kubernetes service accounts to. - WorkloadPool string `protobuf:"bytes,2,opt,name=workload_pool,json=workloadPool,proto3" json:"workload_pool,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *WorkloadIdentityConfig) Reset() { - *x = WorkloadIdentityConfig{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[145] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *WorkloadIdentityConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*WorkloadIdentityConfig) ProtoMessage() {} - -func (x *WorkloadIdentityConfig) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[145] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use WorkloadIdentityConfig.ProtoReflect.Descriptor instead. -func (*WorkloadIdentityConfig) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{145} -} - -func (x *WorkloadIdentityConfig) GetWorkloadPool() string { - if x != nil { - return x.WorkloadPool - } - return "" -} - -// IdentityServiceConfig is configuration for Identity Service which allows -// customers to use external identity providers with the K8S API -type IdentityServiceConfig struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Whether to enable the Identity Service component - Enabled bool `protobuf:"varint,1,opt,name=enabled,proto3" json:"enabled,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *IdentityServiceConfig) Reset() { - *x = IdentityServiceConfig{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[146] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *IdentityServiceConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*IdentityServiceConfig) ProtoMessage() {} - -func (x *IdentityServiceConfig) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[146] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use IdentityServiceConfig.ProtoReflect.Descriptor instead. -func (*IdentityServiceConfig) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{146} -} - -func (x *IdentityServiceConfig) GetEnabled() bool { - if x != nil { - return x.Enabled - } - return false -} - -// Configuration for issuance of mTLS keys and certificates to Kubernetes pods. -type MeshCertificates struct { - state protoimpl.MessageState `protogen:"open.v1"` - // enable_certificates controls issuance of workload mTLS certificates. - // - // If set, the GKE Workload Identity Certificates controller and node agent - // will be deployed in the cluster, which can then be configured by creating a - // WorkloadCertificateConfig Custom Resource. - // - // Requires Workload Identity - // ([workload_pool][google.container.v1.WorkloadIdentityConfig.workload_pool] - // must be non-empty). - EnableCertificates *wrapperspb.BoolValue `protobuf:"bytes,1,opt,name=enable_certificates,json=enableCertificates,proto3" json:"enable_certificates,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *MeshCertificates) Reset() { - *x = MeshCertificates{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[147] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *MeshCertificates) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MeshCertificates) ProtoMessage() {} - -func (x *MeshCertificates) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[147] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use MeshCertificates.ProtoReflect.Descriptor instead. -func (*MeshCertificates) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{147} -} - -func (x *MeshCertificates) GetEnableCertificates() *wrapperspb.BoolValue { - if x != nil { - return x.EnableCertificates - } - return nil -} - -// Configuration of etcd encryption. -type DatabaseEncryption struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Name of CloudKMS key to use for the encryption of secrets in etcd. - // Ex. projects/my-project/locations/global/keyRings/my-ring/cryptoKeys/my-key - KeyName string `protobuf:"bytes,1,opt,name=key_name,json=keyName,proto3" json:"key_name,omitempty"` - // The desired state of etcd encryption. - State DatabaseEncryption_State `protobuf:"varint,2,opt,name=state,proto3,enum=google.container.v1.DatabaseEncryption_State" json:"state,omitempty"` - // Output only. The current state of etcd encryption. - CurrentState *DatabaseEncryption_CurrentState `protobuf:"varint,3,opt,name=current_state,json=currentState,proto3,enum=google.container.v1.DatabaseEncryption_CurrentState,oneof" json:"current_state,omitempty"` - // Output only. Keys in use by the cluster for decrypting - // existing objects, in addition to the key in `key_name`. - // - // Each item is a CloudKMS key resource. - DecryptionKeys []string `protobuf:"bytes,4,rep,name=decryption_keys,json=decryptionKeys,proto3" json:"decryption_keys,omitempty"` - // Output only. Records errors seen during DatabaseEncryption update - // operations. - LastOperationErrors []*DatabaseEncryption_OperationError `protobuf:"bytes,5,rep,name=last_operation_errors,json=lastOperationErrors,proto3" json:"last_operation_errors,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *DatabaseEncryption) Reset() { - *x = DatabaseEncryption{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[148] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *DatabaseEncryption) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DatabaseEncryption) ProtoMessage() {} - -func (x *DatabaseEncryption) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[148] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DatabaseEncryption.ProtoReflect.Descriptor instead. -func (*DatabaseEncryption) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{148} -} - -func (x *DatabaseEncryption) GetKeyName() string { - if x != nil { - return x.KeyName - } - return "" -} - -func (x *DatabaseEncryption) GetState() DatabaseEncryption_State { - if x != nil { - return x.State - } - return DatabaseEncryption_UNKNOWN -} - -func (x *DatabaseEncryption) GetCurrentState() DatabaseEncryption_CurrentState { - if x != nil && x.CurrentState != nil { - return *x.CurrentState - } - return DatabaseEncryption_CURRENT_STATE_UNSPECIFIED -} - -func (x *DatabaseEncryption) GetDecryptionKeys() []string { - if x != nil { - return x.DecryptionKeys - } - return nil -} - -func (x *DatabaseEncryption) GetLastOperationErrors() []*DatabaseEncryption_OperationError { - if x != nil { - return x.LastOperationErrors - } - return nil -} - -// ListUsableSubnetworksRequest requests the list of usable subnetworks -// available to a user for creating clusters. -type ListUsableSubnetworksRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - // The parent project where subnetworks are usable. - // Specified in the format `projects/*`. - Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` - // Filtering currently only supports equality on the networkProjectId and must - // be in the form: "networkProjectId=[PROJECTID]", where `networkProjectId` - // is the project which owns the listed subnetworks. This defaults to the - // parent project ID. - Filter string `protobuf:"bytes,2,opt,name=filter,proto3" json:"filter,omitempty"` - // The max number of results per page that should be returned. If the number - // of available results is larger than `page_size`, a `next_page_token` is - // returned which can be used to get the next page of results in subsequent - // requests. Acceptable values are 0 to 500, inclusive. (Default: 500) - PageSize int32 `protobuf:"varint,3,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` - // Specifies a page token to use. Set this to the nextPageToken returned by - // previous list requests to get the next page of results. - PageToken string `protobuf:"bytes,4,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ListUsableSubnetworksRequest) Reset() { - *x = ListUsableSubnetworksRequest{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[149] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ListUsableSubnetworksRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListUsableSubnetworksRequest) ProtoMessage() {} - -func (x *ListUsableSubnetworksRequest) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[149] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ListUsableSubnetworksRequest.ProtoReflect.Descriptor instead. -func (*ListUsableSubnetworksRequest) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{149} -} - -func (x *ListUsableSubnetworksRequest) GetParent() string { - if x != nil { - return x.Parent - } - return "" -} - -func (x *ListUsableSubnetworksRequest) GetFilter() string { - if x != nil { - return x.Filter - } - return "" -} - -func (x *ListUsableSubnetworksRequest) GetPageSize() int32 { - if x != nil { - return x.PageSize - } - return 0 -} - -func (x *ListUsableSubnetworksRequest) GetPageToken() string { - if x != nil { - return x.PageToken - } - return "" -} - -// ListUsableSubnetworksResponse is the response of -// ListUsableSubnetworksRequest. -type ListUsableSubnetworksResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - // A list of usable subnetworks in the specified network project. - Subnetworks []*UsableSubnetwork `protobuf:"bytes,1,rep,name=subnetworks,proto3" json:"subnetworks,omitempty"` - // This token allows you to get the next page of results for list requests. - // If the number of results is larger than `page_size`, use the - // `next_page_token` as a value for the query parameter `page_token` in the - // next request. The value will become empty when there are no more pages. - NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ListUsableSubnetworksResponse) Reset() { - *x = ListUsableSubnetworksResponse{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[150] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ListUsableSubnetworksResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListUsableSubnetworksResponse) ProtoMessage() {} - -func (x *ListUsableSubnetworksResponse) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[150] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ListUsableSubnetworksResponse.ProtoReflect.Descriptor instead. -func (*ListUsableSubnetworksResponse) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{150} -} - -func (x *ListUsableSubnetworksResponse) GetSubnetworks() []*UsableSubnetwork { - if x != nil { - return x.Subnetworks - } - return nil -} - -func (x *ListUsableSubnetworksResponse) GetNextPageToken() string { - if x != nil { - return x.NextPageToken - } - return "" -} - -// Secondary IP range of a usable subnetwork. -type UsableSubnetworkSecondaryRange struct { - state protoimpl.MessageState `protogen:"open.v1"` - // The name associated with this subnetwork secondary range, used when adding - // an alias IP range to a VM instance. - RangeName string `protobuf:"bytes,1,opt,name=range_name,json=rangeName,proto3" json:"range_name,omitempty"` - // The range of IP addresses belonging to this subnetwork secondary range. - IpCidrRange string `protobuf:"bytes,2,opt,name=ip_cidr_range,json=ipCidrRange,proto3" json:"ip_cidr_range,omitempty"` - // This field is to determine the status of the secondary range programmably. - Status UsableSubnetworkSecondaryRange_Status `protobuf:"varint,3,opt,name=status,proto3,enum=google.container.v1.UsableSubnetworkSecondaryRange_Status" json:"status,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *UsableSubnetworkSecondaryRange) Reset() { - *x = UsableSubnetworkSecondaryRange{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[151] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *UsableSubnetworkSecondaryRange) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UsableSubnetworkSecondaryRange) ProtoMessage() {} - -func (x *UsableSubnetworkSecondaryRange) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[151] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use UsableSubnetworkSecondaryRange.ProtoReflect.Descriptor instead. -func (*UsableSubnetworkSecondaryRange) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{151} -} - -func (x *UsableSubnetworkSecondaryRange) GetRangeName() string { - if x != nil { - return x.RangeName - } - return "" -} - -func (x *UsableSubnetworkSecondaryRange) GetIpCidrRange() string { - if x != nil { - return x.IpCidrRange - } - return "" -} - -func (x *UsableSubnetworkSecondaryRange) GetStatus() UsableSubnetworkSecondaryRange_Status { - if x != nil { - return x.Status - } - return UsableSubnetworkSecondaryRange_UNKNOWN -} - -// UsableSubnetwork resource returns the subnetwork name, its associated network -// and the primary CIDR range. -type UsableSubnetwork struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Subnetwork Name. - // Example: projects/my-project/regions/us-central1/subnetworks/my-subnet - Subnetwork string `protobuf:"bytes,1,opt,name=subnetwork,proto3" json:"subnetwork,omitempty"` - // Network Name. - // Example: projects/my-project/global/networks/my-network - Network string `protobuf:"bytes,2,opt,name=network,proto3" json:"network,omitempty"` - // The range of internal addresses that are owned by this subnetwork. - IpCidrRange string `protobuf:"bytes,3,opt,name=ip_cidr_range,json=ipCidrRange,proto3" json:"ip_cidr_range,omitempty"` - // Secondary IP ranges. - SecondaryIpRanges []*UsableSubnetworkSecondaryRange `protobuf:"bytes,4,rep,name=secondary_ip_ranges,json=secondaryIpRanges,proto3" json:"secondary_ip_ranges,omitempty"` - // A human readable status message representing the reasons for cases where - // the caller cannot use the secondary ranges under the subnet. For example if - // the secondary_ip_ranges is empty due to a permission issue, an insufficient - // permission message will be given by status_message. - StatusMessage string `protobuf:"bytes,5,opt,name=status_message,json=statusMessage,proto3" json:"status_message,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *UsableSubnetwork) Reset() { - *x = UsableSubnetwork{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[152] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *UsableSubnetwork) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UsableSubnetwork) ProtoMessage() {} - -func (x *UsableSubnetwork) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[152] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use UsableSubnetwork.ProtoReflect.Descriptor instead. -func (*UsableSubnetwork) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{152} -} - -func (x *UsableSubnetwork) GetSubnetwork() string { - if x != nil { - return x.Subnetwork - } - return "" -} - -func (x *UsableSubnetwork) GetNetwork() string { - if x != nil { - return x.Network - } - return "" -} - -func (x *UsableSubnetwork) GetIpCidrRange() string { - if x != nil { - return x.IpCidrRange - } - return "" -} - -func (x *UsableSubnetwork) GetSecondaryIpRanges() []*UsableSubnetworkSecondaryRange { - if x != nil { - return x.SecondaryIpRanges - } - return nil -} - -func (x *UsableSubnetwork) GetStatusMessage() string { - if x != nil { - return x.StatusMessage - } - return "" -} - -// Configuration for exporting cluster resource usages. -type ResourceUsageExportConfig struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Configuration to use BigQuery as usage export destination. - BigqueryDestination *ResourceUsageExportConfig_BigQueryDestination `protobuf:"bytes,1,opt,name=bigquery_destination,json=bigqueryDestination,proto3" json:"bigquery_destination,omitempty"` - // Whether to enable network egress metering for this cluster. If enabled, a - // daemonset will be created in the cluster to meter network egress traffic. - EnableNetworkEgressMetering bool `protobuf:"varint,2,opt,name=enable_network_egress_metering,json=enableNetworkEgressMetering,proto3" json:"enable_network_egress_metering,omitempty"` - // Configuration to enable resource consumption metering. - ConsumptionMeteringConfig *ResourceUsageExportConfig_ConsumptionMeteringConfig `protobuf:"bytes,3,opt,name=consumption_metering_config,json=consumptionMeteringConfig,proto3" json:"consumption_metering_config,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ResourceUsageExportConfig) Reset() { - *x = ResourceUsageExportConfig{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[153] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ResourceUsageExportConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ResourceUsageExportConfig) ProtoMessage() {} - -func (x *ResourceUsageExportConfig) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[153] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ResourceUsageExportConfig.ProtoReflect.Descriptor instead. -func (*ResourceUsageExportConfig) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{153} -} - -func (x *ResourceUsageExportConfig) GetBigqueryDestination() *ResourceUsageExportConfig_BigQueryDestination { - if x != nil { - return x.BigqueryDestination - } - return nil -} - -func (x *ResourceUsageExportConfig) GetEnableNetworkEgressMetering() bool { - if x != nil { - return x.EnableNetworkEgressMetering - } - return false -} - -func (x *ResourceUsageExportConfig) GetConsumptionMeteringConfig() *ResourceUsageExportConfig_ConsumptionMeteringConfig { - if x != nil { - return x.ConsumptionMeteringConfig - } - return nil -} - -// VerticalPodAutoscaling contains global, per-cluster information -// required by Vertical Pod Autoscaler to automatically adjust -// the resources of pods controlled by it. -type VerticalPodAutoscaling struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Enables vertical pod autoscaling. - Enabled bool `protobuf:"varint,1,opt,name=enabled,proto3" json:"enabled,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *VerticalPodAutoscaling) Reset() { - *x = VerticalPodAutoscaling{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[154] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *VerticalPodAutoscaling) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*VerticalPodAutoscaling) ProtoMessage() {} - -func (x *VerticalPodAutoscaling) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[154] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use VerticalPodAutoscaling.ProtoReflect.Descriptor instead. -func (*VerticalPodAutoscaling) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{154} -} - -func (x *VerticalPodAutoscaling) GetEnabled() bool { - if x != nil { - return x.Enabled - } - return false -} - -// DefaultSnatStatus contains the desired state of whether default sNAT should -// be disabled on the cluster. -type DefaultSnatStatus struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Disables cluster default sNAT rules. - Disabled bool `protobuf:"varint,1,opt,name=disabled,proto3" json:"disabled,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *DefaultSnatStatus) Reset() { - *x = DefaultSnatStatus{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[155] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *DefaultSnatStatus) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DefaultSnatStatus) ProtoMessage() {} - -func (x *DefaultSnatStatus) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[155] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DefaultSnatStatus.ProtoReflect.Descriptor instead. -func (*DefaultSnatStatus) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{155} -} - -func (x *DefaultSnatStatus) GetDisabled() bool { - if x != nil { - return x.Disabled - } - return false -} - -// Configuration of Shielded Nodes feature. -type ShieldedNodes struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Whether Shielded Nodes features are enabled on all nodes in this cluster. - Enabled bool `protobuf:"varint,1,opt,name=enabled,proto3" json:"enabled,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ShieldedNodes) Reset() { - *x = ShieldedNodes{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[156] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ShieldedNodes) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ShieldedNodes) ProtoMessage() {} - -func (x *ShieldedNodes) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[156] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ShieldedNodes.ProtoReflect.Descriptor instead. -func (*ShieldedNodes) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{156} -} - -func (x *ShieldedNodes) GetEnabled() bool { - if x != nil { - return x.Enabled - } - return false -} - -// Configuration of gVNIC feature. -type VirtualNIC struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Whether gVNIC features are enabled in the node pool. - Enabled bool `protobuf:"varint,1,opt,name=enabled,proto3" json:"enabled,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *VirtualNIC) Reset() { - *x = VirtualNIC{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[157] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *VirtualNIC) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*VirtualNIC) ProtoMessage() {} - -func (x *VirtualNIC) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[157] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use VirtualNIC.ProtoReflect.Descriptor instead. -func (*VirtualNIC) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{157} -} - -func (x *VirtualNIC) GetEnabled() bool { - if x != nil { - return x.Enabled - } - return false -} - -// Configuration of Fast Socket feature. -type FastSocket struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Whether Fast Socket features are enabled in the node pool. - Enabled bool `protobuf:"varint,1,opt,name=enabled,proto3" json:"enabled,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *FastSocket) Reset() { - *x = FastSocket{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[158] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *FastSocket) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*FastSocket) ProtoMessage() {} - -func (x *FastSocket) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[158] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use FastSocket.ProtoReflect.Descriptor instead. -func (*FastSocket) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{158} -} - -func (x *FastSocket) GetEnabled() bool { - if x != nil { - return x.Enabled - } - return false -} - -// GPUDirectConfig specifies the GPU direct strategy on the node pool. -type GPUDirectConfig struct { - state protoimpl.MessageState `protogen:"open.v1"` - // The type of GPU direct strategy to enable on the node pool. - GpuDirectStrategy *GPUDirectConfig_GPUDirectStrategy `protobuf:"varint,1,opt,name=gpu_direct_strategy,json=gpuDirectStrategy,proto3,enum=google.container.v1.GPUDirectConfig_GPUDirectStrategy,oneof" json:"gpu_direct_strategy,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *GPUDirectConfig) Reset() { - *x = GPUDirectConfig{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[159] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *GPUDirectConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GPUDirectConfig) ProtoMessage() {} - -func (x *GPUDirectConfig) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[159] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GPUDirectConfig.ProtoReflect.Descriptor instead. -func (*GPUDirectConfig) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{159} -} - -func (x *GPUDirectConfig) GetGpuDirectStrategy() GPUDirectConfig_GPUDirectStrategy { - if x != nil && x.GpuDirectStrategy != nil { - return *x.GpuDirectStrategy - } - return GPUDirectConfig_GPU_DIRECT_STRATEGY_UNSPECIFIED -} - -// NotificationConfig is the configuration of notifications. -type NotificationConfig struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Notification config for Pub/Sub. - Pubsub *NotificationConfig_PubSub `protobuf:"bytes,1,opt,name=pubsub,proto3" json:"pubsub,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *NotificationConfig) Reset() { - *x = NotificationConfig{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[160] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *NotificationConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*NotificationConfig) ProtoMessage() {} - -func (x *NotificationConfig) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[160] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use NotificationConfig.ProtoReflect.Descriptor instead. -func (*NotificationConfig) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{160} -} - -func (x *NotificationConfig) GetPubsub() *NotificationConfig_PubSub { - if x != nil { - return x.Pubsub - } - return nil -} - -// ConfidentialNodes is configuration for the confidential nodes feature, which -// makes nodes run on confidential VMs. -type ConfidentialNodes struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Whether Confidential Nodes feature is enabled. - Enabled bool `protobuf:"varint,1,opt,name=enabled,proto3" json:"enabled,omitempty"` - // Defines the type of technology used by the confidential node. - ConfidentialInstanceType ConfidentialNodes_ConfidentialInstanceType `protobuf:"varint,2,opt,name=confidential_instance_type,json=confidentialInstanceType,proto3,enum=google.container.v1.ConfidentialNodes_ConfidentialInstanceType" json:"confidential_instance_type,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ConfidentialNodes) Reset() { - *x = ConfidentialNodes{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[161] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ConfidentialNodes) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ConfidentialNodes) ProtoMessage() {} - -func (x *ConfidentialNodes) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[161] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ConfidentialNodes.ProtoReflect.Descriptor instead. -func (*ConfidentialNodes) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{161} -} - -func (x *ConfidentialNodes) GetEnabled() bool { - if x != nil { - return x.Enabled - } - return false -} - -func (x *ConfidentialNodes) GetConfidentialInstanceType() ConfidentialNodes_ConfidentialInstanceType { - if x != nil { - return x.ConfidentialInstanceType - } - return ConfidentialNodes_CONFIDENTIAL_INSTANCE_TYPE_UNSPECIFIED -} - -// UpgradeEvent is a notification sent to customers by the cluster server when -// a resource is upgrading. -type UpgradeEvent struct { - state protoimpl.MessageState `protogen:"open.v1"` - // The resource type that is upgrading. - ResourceType UpgradeResourceType `protobuf:"varint,1,opt,name=resource_type,json=resourceType,proto3,enum=google.container.v1.UpgradeResourceType" json:"resource_type,omitempty"` - // The operation associated with this upgrade. - Operation string `protobuf:"bytes,2,opt,name=operation,proto3" json:"operation,omitempty"` - // The time when the operation was started. - OperationStartTime *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=operation_start_time,json=operationStartTime,proto3" json:"operation_start_time,omitempty"` - // The current version before the upgrade. - CurrentVersion string `protobuf:"bytes,4,opt,name=current_version,json=currentVersion,proto3" json:"current_version,omitempty"` - // The target version for the upgrade. - TargetVersion string `protobuf:"bytes,5,opt,name=target_version,json=targetVersion,proto3" json:"target_version,omitempty"` - // Optional relative path to the resource. For example in node pool upgrades, - // the relative path of the node pool. - Resource string `protobuf:"bytes,6,opt,name=resource,proto3" json:"resource,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *UpgradeEvent) Reset() { - *x = UpgradeEvent{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[162] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *UpgradeEvent) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UpgradeEvent) ProtoMessage() {} - -func (x *UpgradeEvent) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[162] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use UpgradeEvent.ProtoReflect.Descriptor instead. -func (*UpgradeEvent) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{162} -} - -func (x *UpgradeEvent) GetResourceType() UpgradeResourceType { - if x != nil { - return x.ResourceType - } - return UpgradeResourceType_UPGRADE_RESOURCE_TYPE_UNSPECIFIED -} - -func (x *UpgradeEvent) GetOperation() string { - if x != nil { - return x.Operation - } - return "" -} - -func (x *UpgradeEvent) GetOperationStartTime() *timestamppb.Timestamp { - if x != nil { - return x.OperationStartTime - } - return nil -} - -func (x *UpgradeEvent) GetCurrentVersion() string { - if x != nil { - return x.CurrentVersion - } - return "" -} - -func (x *UpgradeEvent) GetTargetVersion() string { - if x != nil { - return x.TargetVersion - } - return "" -} - -func (x *UpgradeEvent) GetResource() string { - if x != nil { - return x.Resource - } - return "" -} - -// UpgradeInfoEvent is a notification sent to customers about the upgrade -// information of a resource. -type UpgradeInfoEvent struct { - state protoimpl.MessageState `protogen:"open.v1"` - // The resource type associated with the upgrade. - ResourceType UpgradeResourceType `protobuf:"varint,1,opt,name=resource_type,json=resourceType,proto3,enum=google.container.v1.UpgradeResourceType" json:"resource_type,omitempty"` - // The operation associated with this upgrade. - Operation string `protobuf:"bytes,2,opt,name=operation,proto3" json:"operation,omitempty"` - // The time when the operation was started. - StartTime *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"` - // The time when the operation ended. - EndTime *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=end_time,json=endTime,proto3" json:"end_time,omitempty"` - // The current version before the upgrade. - CurrentVersion string `protobuf:"bytes,5,opt,name=current_version,json=currentVersion,proto3" json:"current_version,omitempty"` - // The target version for the upgrade. - TargetVersion string `protobuf:"bytes,6,opt,name=target_version,json=targetVersion,proto3" json:"target_version,omitempty"` - // Optional relative path to the resource. For example in node pool upgrades, - // the relative path of the node pool. - Resource string `protobuf:"bytes,7,opt,name=resource,proto3" json:"resource,omitempty"` - // Output only. The state of the upgrade. - State UpgradeInfoEvent_State `protobuf:"varint,8,opt,name=state,proto3,enum=google.container.v1.UpgradeInfoEvent_State" json:"state,omitempty"` - // The end of standard support timestamp. - StandardSupportEndTime *timestamppb.Timestamp `protobuf:"bytes,9,opt,name=standard_support_end_time,json=standardSupportEndTime,proto3,oneof" json:"standard_support_end_time,omitempty"` - // The end of extended support timestamp. - ExtendedSupportEndTime *timestamppb.Timestamp `protobuf:"bytes,10,opt,name=extended_support_end_time,json=extendedSupportEndTime,proto3,oneof" json:"extended_support_end_time,omitempty"` - // A brief description of the event. - Description string `protobuf:"bytes,11,opt,name=description,proto3" json:"description,omitempty"` - // The type of the event. - EventType UpgradeInfoEvent_EventType `protobuf:"varint,12,opt,name=event_type,json=eventType,proto3,enum=google.container.v1.UpgradeInfoEvent_EventType" json:"event_type,omitempty"` - // The information about the disruption event. This field is only populated - // when event_type is DISRUPTION_EVENT. - DisruptionEvent *DisruptionEvent `protobuf:"bytes,14,opt,name=disruption_event,json=disruptionEvent,proto3,oneof" json:"disruption_event,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *UpgradeInfoEvent) Reset() { - *x = UpgradeInfoEvent{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[163] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *UpgradeInfoEvent) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UpgradeInfoEvent) ProtoMessage() {} - -func (x *UpgradeInfoEvent) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[163] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use UpgradeInfoEvent.ProtoReflect.Descriptor instead. -func (*UpgradeInfoEvent) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{163} -} - -func (x *UpgradeInfoEvent) GetResourceType() UpgradeResourceType { - if x != nil { - return x.ResourceType - } - return UpgradeResourceType_UPGRADE_RESOURCE_TYPE_UNSPECIFIED -} - -func (x *UpgradeInfoEvent) GetOperation() string { - if x != nil { - return x.Operation - } - return "" -} - -func (x *UpgradeInfoEvent) GetStartTime() *timestamppb.Timestamp { - if x != nil { - return x.StartTime - } - return nil -} - -func (x *UpgradeInfoEvent) GetEndTime() *timestamppb.Timestamp { - if x != nil { - return x.EndTime - } - return nil -} - -func (x *UpgradeInfoEvent) GetCurrentVersion() string { - if x != nil { - return x.CurrentVersion - } - return "" -} - -func (x *UpgradeInfoEvent) GetTargetVersion() string { - if x != nil { - return x.TargetVersion - } - return "" -} - -func (x *UpgradeInfoEvent) GetResource() string { - if x != nil { - return x.Resource - } - return "" -} - -func (x *UpgradeInfoEvent) GetState() UpgradeInfoEvent_State { - if x != nil { - return x.State - } - return UpgradeInfoEvent_STATE_UNSPECIFIED -} - -func (x *UpgradeInfoEvent) GetStandardSupportEndTime() *timestamppb.Timestamp { - if x != nil { - return x.StandardSupportEndTime - } - return nil -} - -func (x *UpgradeInfoEvent) GetExtendedSupportEndTime() *timestamppb.Timestamp { - if x != nil { - return x.ExtendedSupportEndTime - } - return nil -} - -func (x *UpgradeInfoEvent) GetDescription() string { - if x != nil { - return x.Description - } - return "" -} - -func (x *UpgradeInfoEvent) GetEventType() UpgradeInfoEvent_EventType { - if x != nil { - return x.EventType - } - return UpgradeInfoEvent_EVENT_TYPE_UNSPECIFIED -} - -func (x *UpgradeInfoEvent) GetDisruptionEvent() *DisruptionEvent { - if x != nil { - return x.DisruptionEvent - } - return nil -} - -// DisruptionEvent is a notification sent to customers about the disruption -// event of a resource. -type DisruptionEvent struct { - state protoimpl.MessageState `protogen:"open.v1"` - // The type of the disruption event. - DisruptionType DisruptionEvent_DisruptionType `protobuf:"varint,1,opt,name=disruption_type,json=disruptionType,proto3,enum=google.container.v1.DisruptionEvent_DisruptionType" json:"disruption_type,omitempty"` - // The node whose drain is blocked by PDB. This field is set for both - // POD_PDB_VIOLATION and POD_NOT_ENOUGH_PDB event. - PdbBlockedNode string `protobuf:"bytes,2,opt,name=pdb_blocked_node,json=pdbBlockedNode,proto3" json:"pdb_blocked_node,omitempty"` - // The pods whose evictions are blocked by PDB. This field is set for - // both POD_PDB_VIOLATION and POD_NOT_ENOUGH_PDB event. - PdbBlockedPod []*DisruptionEvent_PdbBlockedPod `protobuf:"bytes,3,rep,name=pdb_blocked_pod,json=pdbBlockedPod,proto3" json:"pdb_blocked_pod,omitempty"` - // The timeout in seconds for which the node drain is blocked by PDB. - // After this timeout, pods are forcefully evicted. - // This field is only populated when event_type is - // POD_PDB_VIOLATION. - PdbViolationTimeout *durationpb.Duration `protobuf:"bytes,4,opt,name=pdb_violation_timeout,json=pdbViolationTimeout,proto3,oneof" json:"pdb_violation_timeout,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *DisruptionEvent) Reset() { - *x = DisruptionEvent{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[164] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *DisruptionEvent) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DisruptionEvent) ProtoMessage() {} - -func (x *DisruptionEvent) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[164] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DisruptionEvent.ProtoReflect.Descriptor instead. -func (*DisruptionEvent) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{164} -} - -func (x *DisruptionEvent) GetDisruptionType() DisruptionEvent_DisruptionType { - if x != nil { - return x.DisruptionType - } - return DisruptionEvent_DISRUPTION_TYPE_UNSPECIFIED -} - -func (x *DisruptionEvent) GetPdbBlockedNode() string { - if x != nil { - return x.PdbBlockedNode - } - return "" -} - -func (x *DisruptionEvent) GetPdbBlockedPod() []*DisruptionEvent_PdbBlockedPod { - if x != nil { - return x.PdbBlockedPod - } - return nil -} - -func (x *DisruptionEvent) GetPdbViolationTimeout() *durationpb.Duration { - if x != nil { - return x.PdbViolationTimeout - } - return nil -} - -// UpgradeAvailableEvent is a notification sent to customers when a new -// available version is released. -type UpgradeAvailableEvent struct { - state protoimpl.MessageState `protogen:"open.v1"` - // The release version available for upgrade. - Version string `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"` - // The resource type of the release version. - ResourceType UpgradeResourceType `protobuf:"varint,2,opt,name=resource_type,json=resourceType,proto3,enum=google.container.v1.UpgradeResourceType" json:"resource_type,omitempty"` - // The release channel of the version. If empty, it means a non-channel - // release. - ReleaseChannel *ReleaseChannel `protobuf:"bytes,3,opt,name=release_channel,json=releaseChannel,proto3" json:"release_channel,omitempty"` - // Optional relative path to the resource. For example, the relative path of - // the node pool. - Resource string `protobuf:"bytes,4,opt,name=resource,proto3" json:"resource,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *UpgradeAvailableEvent) Reset() { - *x = UpgradeAvailableEvent{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[165] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *UpgradeAvailableEvent) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UpgradeAvailableEvent) ProtoMessage() {} - -func (x *UpgradeAvailableEvent) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[165] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use UpgradeAvailableEvent.ProtoReflect.Descriptor instead. -func (*UpgradeAvailableEvent) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{165} -} - -func (x *UpgradeAvailableEvent) GetVersion() string { - if x != nil { - return x.Version - } - return "" -} - -func (x *UpgradeAvailableEvent) GetResourceType() UpgradeResourceType { - if x != nil { - return x.ResourceType - } - return UpgradeResourceType_UPGRADE_RESOURCE_TYPE_UNSPECIFIED -} - -func (x *UpgradeAvailableEvent) GetReleaseChannel() *ReleaseChannel { - if x != nil { - return x.ReleaseChannel - } - return nil -} - -func (x *UpgradeAvailableEvent) GetResource() string { - if x != nil { - return x.Resource - } - return "" -} - -// SecurityBulletinEvent is a notification sent to customers when a security -// bulletin has been posted that they are vulnerable to. -type SecurityBulletinEvent struct { - state protoimpl.MessageState `protogen:"open.v1"` - // The resource type (node/control plane) that has the vulnerability. Multiple - // notifications (1 notification per resource type) will be sent for a - // vulnerability that affects > 1 resource type. - ResourceTypeAffected string `protobuf:"bytes,1,opt,name=resource_type_affected,json=resourceTypeAffected,proto3" json:"resource_type_affected,omitempty"` - // The ID of the bulletin corresponding to the vulnerability. - BulletinId string `protobuf:"bytes,2,opt,name=bulletin_id,json=bulletinId,proto3" json:"bulletin_id,omitempty"` - // The CVEs associated with this bulletin. - CveIds []string `protobuf:"bytes,3,rep,name=cve_ids,json=cveIds,proto3" json:"cve_ids,omitempty"` - // The severity of this bulletin as it relates to GKE. - Severity string `protobuf:"bytes,4,opt,name=severity,proto3" json:"severity,omitempty"` - // The URI link to the bulletin on the website for more information. - BulletinUri string `protobuf:"bytes,5,opt,name=bulletin_uri,json=bulletinUri,proto3" json:"bulletin_uri,omitempty"` - // A brief description of the bulletin. See the bulletin pointed to by the - // bulletin_uri field for an expanded description. - BriefDescription string `protobuf:"bytes,6,opt,name=brief_description,json=briefDescription,proto3" json:"brief_description,omitempty"` - // The GKE minor versions affected by this vulnerability. - AffectedSupportedMinors []string `protobuf:"bytes,7,rep,name=affected_supported_minors,json=affectedSupportedMinors,proto3" json:"affected_supported_minors,omitempty"` - // The GKE versions where this vulnerability is patched. - PatchedVersions []string `protobuf:"bytes,8,rep,name=patched_versions,json=patchedVersions,proto3" json:"patched_versions,omitempty"` - // This represents a version selected from the patched_versions field that - // the cluster receiving this notification should most likely want to upgrade - // to based on its current version. Note that if this notification is being - // received by a given cluster, it means that this version is currently - // available as an upgrade target in that cluster's location. - SuggestedUpgradeTarget string `protobuf:"bytes,9,opt,name=suggested_upgrade_target,json=suggestedUpgradeTarget,proto3" json:"suggested_upgrade_target,omitempty"` - // If this field is specified, it means there are manual steps that the user - // must take to make their clusters safe. - ManualStepsRequired bool `protobuf:"varint,10,opt,name=manual_steps_required,json=manualStepsRequired,proto3" json:"manual_steps_required,omitempty"` - // The GKE versions where this vulnerability is mitigated. - MitigatedVersions []string `protobuf:"bytes,11,rep,name=mitigated_versions,json=mitigatedVersions,proto3" json:"mitigated_versions,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *SecurityBulletinEvent) Reset() { - *x = SecurityBulletinEvent{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[166] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *SecurityBulletinEvent) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SecurityBulletinEvent) ProtoMessage() {} - -func (x *SecurityBulletinEvent) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[166] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SecurityBulletinEvent.ProtoReflect.Descriptor instead. -func (*SecurityBulletinEvent) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{166} -} - -func (x *SecurityBulletinEvent) GetResourceTypeAffected() string { - if x != nil { - return x.ResourceTypeAffected - } - return "" -} - -func (x *SecurityBulletinEvent) GetBulletinId() string { - if x != nil { - return x.BulletinId - } - return "" -} - -func (x *SecurityBulletinEvent) GetCveIds() []string { - if x != nil { - return x.CveIds - } - return nil -} - -func (x *SecurityBulletinEvent) GetSeverity() string { - if x != nil { - return x.Severity - } - return "" -} - -func (x *SecurityBulletinEvent) GetBulletinUri() string { - if x != nil { - return x.BulletinUri - } - return "" -} - -func (x *SecurityBulletinEvent) GetBriefDescription() string { - if x != nil { - return x.BriefDescription - } - return "" -} - -func (x *SecurityBulletinEvent) GetAffectedSupportedMinors() []string { - if x != nil { - return x.AffectedSupportedMinors - } - return nil -} - -func (x *SecurityBulletinEvent) GetPatchedVersions() []string { - if x != nil { - return x.PatchedVersions - } - return nil -} - -func (x *SecurityBulletinEvent) GetSuggestedUpgradeTarget() string { - if x != nil { - return x.SuggestedUpgradeTarget - } - return "" -} - -func (x *SecurityBulletinEvent) GetManualStepsRequired() bool { - if x != nil { - return x.ManualStepsRequired - } - return false -} - -func (x *SecurityBulletinEvent) GetMitigatedVersions() []string { - if x != nil { - return x.MitigatedVersions - } - return nil -} - -// Autopilot is the configuration for Autopilot settings on the cluster. -type Autopilot struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Enable Autopilot - Enabled bool `protobuf:"varint,1,opt,name=enabled,proto3" json:"enabled,omitempty"` - // WorkloadPolicyConfig is the configuration related to GCW workload policy - WorkloadPolicyConfig *WorkloadPolicyConfig `protobuf:"bytes,2,opt,name=workload_policy_config,json=workloadPolicyConfig,proto3" json:"workload_policy_config,omitempty"` - // PrivilegedAdmissionConfig is the configuration related to privileged - // admission control. - PrivilegedAdmissionConfig *PrivilegedAdmissionConfig `protobuf:"bytes,4,opt,name=privileged_admission_config,json=privilegedAdmissionConfig,proto3" json:"privileged_admission_config,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *Autopilot) Reset() { - *x = Autopilot{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[167] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *Autopilot) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Autopilot) ProtoMessage() {} - -func (x *Autopilot) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[167] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Autopilot.ProtoReflect.Descriptor instead. -func (*Autopilot) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{167} -} - -func (x *Autopilot) GetEnabled() bool { - if x != nil { - return x.Enabled - } - return false -} - -func (x *Autopilot) GetWorkloadPolicyConfig() *WorkloadPolicyConfig { - if x != nil { - return x.WorkloadPolicyConfig - } - return nil -} - -func (x *Autopilot) GetPrivilegedAdmissionConfig() *PrivilegedAdmissionConfig { - if x != nil { - return x.PrivilegedAdmissionConfig - } - return nil -} - -// PrivilegedAdmissionConfig stores the list of authorized allowlist -// paths for the cluster. -type PrivilegedAdmissionConfig struct { - state protoimpl.MessageState `protogen:"open.v1"` - // The customer allowlist Cloud Storage paths for the cluster. These paths are - // used with the `--autopilot-privileged-admission` flag to authorize - // privileged workloads in Autopilot clusters. - // - // Paths can be GKE-owned, in the format - // `gke:////`, or customer-owned, in - // the format `gs:///`. - // - // Wildcards (`*`) are supported to authorize all allowlists under specific - // paths or directories. Example: `gs://my-bucket/*` will authorize all - // allowlists under the `my-bucket` bucket. - AllowlistPaths []string `protobuf:"bytes,1,rep,name=allowlist_paths,json=allowlistPaths,proto3" json:"allowlist_paths,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *PrivilegedAdmissionConfig) Reset() { - *x = PrivilegedAdmissionConfig{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[168] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *PrivilegedAdmissionConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*PrivilegedAdmissionConfig) ProtoMessage() {} - -func (x *PrivilegedAdmissionConfig) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[168] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use PrivilegedAdmissionConfig.ProtoReflect.Descriptor instead. -func (*PrivilegedAdmissionConfig) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{168} -} - -func (x *PrivilegedAdmissionConfig) GetAllowlistPaths() []string { - if x != nil { - return x.AllowlistPaths - } - return nil -} - -// WorkloadPolicyConfig is the configuration related to GCW workload policy -type WorkloadPolicyConfig struct { - state protoimpl.MessageState `protogen:"open.v1"` - // If true, workloads can use NET_ADMIN capability. - AllowNetAdmin *bool `protobuf:"varint,1,opt,name=allow_net_admin,json=allowNetAdmin,proto3,oneof" json:"allow_net_admin,omitempty"` - // If true, enables the GCW Auditor that audits workloads on - // standard clusters. - AutopilotCompatibilityAuditingEnabled *bool `protobuf:"varint,2,opt,name=autopilot_compatibility_auditing_enabled,json=autopilotCompatibilityAuditingEnabled,proto3,oneof" json:"autopilot_compatibility_auditing_enabled,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *WorkloadPolicyConfig) Reset() { - *x = WorkloadPolicyConfig{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[169] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *WorkloadPolicyConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*WorkloadPolicyConfig) ProtoMessage() {} - -func (x *WorkloadPolicyConfig) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[169] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use WorkloadPolicyConfig.ProtoReflect.Descriptor instead. -func (*WorkloadPolicyConfig) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{169} -} - -func (x *WorkloadPolicyConfig) GetAllowNetAdmin() bool { - if x != nil && x.AllowNetAdmin != nil { - return *x.AllowNetAdmin - } - return false -} - -func (x *WorkloadPolicyConfig) GetAutopilotCompatibilityAuditingEnabled() bool { - if x != nil && x.AutopilotCompatibilityAuditingEnabled != nil { - return *x.AutopilotCompatibilityAuditingEnabled - } - return false -} - -// LoggingConfig is cluster logging configuration. -type LoggingConfig struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Logging components configuration - ComponentConfig *LoggingComponentConfig `protobuf:"bytes,1,opt,name=component_config,json=componentConfig,proto3" json:"component_config,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *LoggingConfig) Reset() { - *x = LoggingConfig{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[170] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *LoggingConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*LoggingConfig) ProtoMessage() {} - -func (x *LoggingConfig) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[170] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use LoggingConfig.ProtoReflect.Descriptor instead. -func (*LoggingConfig) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{170} -} - -func (x *LoggingConfig) GetComponentConfig() *LoggingComponentConfig { - if x != nil { - return x.ComponentConfig - } - return nil -} - -// LoggingComponentConfig is cluster logging component configuration. -type LoggingComponentConfig struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Select components to collect logs. An empty set would disable all logging. - EnableComponents []LoggingComponentConfig_Component `protobuf:"varint,1,rep,packed,name=enable_components,json=enableComponents,proto3,enum=google.container.v1.LoggingComponentConfig_Component" json:"enable_components,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *LoggingComponentConfig) Reset() { - *x = LoggingComponentConfig{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[171] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *LoggingComponentConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*LoggingComponentConfig) ProtoMessage() {} - -func (x *LoggingComponentConfig) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[171] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use LoggingComponentConfig.ProtoReflect.Descriptor instead. -func (*LoggingComponentConfig) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{171} -} - -func (x *LoggingComponentConfig) GetEnableComponents() []LoggingComponentConfig_Component { - if x != nil { - return x.EnableComponents - } - return nil -} - -// RayClusterLoggingConfig specifies configuration of Ray logging. -type RayClusterLoggingConfig struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Enable log collection for Ray clusters. - Enabled bool `protobuf:"varint,1,opt,name=enabled,proto3" json:"enabled,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *RayClusterLoggingConfig) Reset() { - *x = RayClusterLoggingConfig{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[172] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *RayClusterLoggingConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RayClusterLoggingConfig) ProtoMessage() {} - -func (x *RayClusterLoggingConfig) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[172] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RayClusterLoggingConfig.ProtoReflect.Descriptor instead. -func (*RayClusterLoggingConfig) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{172} -} - -func (x *RayClusterLoggingConfig) GetEnabled() bool { - if x != nil { - return x.Enabled - } - return false -} - -// MonitoringConfig is cluster monitoring configuration. -type MonitoringConfig struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Monitoring components configuration - ComponentConfig *MonitoringComponentConfig `protobuf:"bytes,1,opt,name=component_config,json=componentConfig,proto3" json:"component_config,omitempty"` - // Enable Google Cloud Managed Service for Prometheus - // in the cluster. - ManagedPrometheusConfig *ManagedPrometheusConfig `protobuf:"bytes,2,opt,name=managed_prometheus_config,json=managedPrometheusConfig,proto3" json:"managed_prometheus_config,omitempty"` - // Configuration of Advanced Datapath Observability features. - AdvancedDatapathObservabilityConfig *AdvancedDatapathObservabilityConfig `protobuf:"bytes,3,opt,name=advanced_datapath_observability_config,json=advancedDatapathObservabilityConfig,proto3" json:"advanced_datapath_observability_config,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *MonitoringConfig) Reset() { - *x = MonitoringConfig{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[173] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *MonitoringConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MonitoringConfig) ProtoMessage() {} - -func (x *MonitoringConfig) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[173] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use MonitoringConfig.ProtoReflect.Descriptor instead. -func (*MonitoringConfig) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{173} -} - -func (x *MonitoringConfig) GetComponentConfig() *MonitoringComponentConfig { - if x != nil { - return x.ComponentConfig - } - return nil -} - -func (x *MonitoringConfig) GetManagedPrometheusConfig() *ManagedPrometheusConfig { - if x != nil { - return x.ManagedPrometheusConfig - } - return nil -} - -func (x *MonitoringConfig) GetAdvancedDatapathObservabilityConfig() *AdvancedDatapathObservabilityConfig { - if x != nil { - return x.AdvancedDatapathObservabilityConfig - } - return nil -} - -// AdvancedDatapathObservabilityConfig specifies configuration of observability -// features of advanced datapath. -type AdvancedDatapathObservabilityConfig struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Expose flow metrics on nodes - EnableMetrics bool `protobuf:"varint,1,opt,name=enable_metrics,json=enableMetrics,proto3" json:"enable_metrics,omitempty"` - // Method used to make Relay available - RelayMode AdvancedDatapathObservabilityConfig_RelayMode `protobuf:"varint,2,opt,name=relay_mode,json=relayMode,proto3,enum=google.container.v1.AdvancedDatapathObservabilityConfig_RelayMode" json:"relay_mode,omitempty"` - // Enable Relay component - EnableRelay *bool `protobuf:"varint,3,opt,name=enable_relay,json=enableRelay,proto3,oneof" json:"enable_relay,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *AdvancedDatapathObservabilityConfig) Reset() { - *x = AdvancedDatapathObservabilityConfig{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[174] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *AdvancedDatapathObservabilityConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*AdvancedDatapathObservabilityConfig) ProtoMessage() {} - -func (x *AdvancedDatapathObservabilityConfig) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[174] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use AdvancedDatapathObservabilityConfig.ProtoReflect.Descriptor instead. -func (*AdvancedDatapathObservabilityConfig) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{174} -} - -func (x *AdvancedDatapathObservabilityConfig) GetEnableMetrics() bool { - if x != nil { - return x.EnableMetrics - } - return false -} - -func (x *AdvancedDatapathObservabilityConfig) GetRelayMode() AdvancedDatapathObservabilityConfig_RelayMode { - if x != nil { - return x.RelayMode - } - return AdvancedDatapathObservabilityConfig_RELAY_MODE_UNSPECIFIED -} - -func (x *AdvancedDatapathObservabilityConfig) GetEnableRelay() bool { - if x != nil && x.EnableRelay != nil { - return *x.EnableRelay - } - return false -} - -// RayClusterMonitoringConfig specifies monitoring configuration for Ray -// clusters. -type RayClusterMonitoringConfig struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Enable metrics collection for Ray clusters. - Enabled bool `protobuf:"varint,1,opt,name=enabled,proto3" json:"enabled,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *RayClusterMonitoringConfig) Reset() { - *x = RayClusterMonitoringConfig{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[175] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *RayClusterMonitoringConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RayClusterMonitoringConfig) ProtoMessage() {} - -func (x *RayClusterMonitoringConfig) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[175] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RayClusterMonitoringConfig.ProtoReflect.Descriptor instead. -func (*RayClusterMonitoringConfig) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{175} -} - -func (x *RayClusterMonitoringConfig) GetEnabled() bool { - if x != nil { - return x.Enabled - } - return false -} - -// NodePoolLoggingConfig specifies logging configuration for nodepools. -type NodePoolLoggingConfig struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Logging variant configuration. - VariantConfig *LoggingVariantConfig `protobuf:"bytes,1,opt,name=variant_config,json=variantConfig,proto3" json:"variant_config,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *NodePoolLoggingConfig) Reset() { - *x = NodePoolLoggingConfig{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[176] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *NodePoolLoggingConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*NodePoolLoggingConfig) ProtoMessage() {} - -func (x *NodePoolLoggingConfig) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[176] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use NodePoolLoggingConfig.ProtoReflect.Descriptor instead. -func (*NodePoolLoggingConfig) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{176} -} - -func (x *NodePoolLoggingConfig) GetVariantConfig() *LoggingVariantConfig { - if x != nil { - return x.VariantConfig - } - return nil -} - -// LoggingVariantConfig specifies the behaviour of the logging component. -type LoggingVariantConfig struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Logging variant deployed on nodes. - Variant LoggingVariantConfig_Variant `protobuf:"varint,1,opt,name=variant,proto3,enum=google.container.v1.LoggingVariantConfig_Variant" json:"variant,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *LoggingVariantConfig) Reset() { - *x = LoggingVariantConfig{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[177] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *LoggingVariantConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*LoggingVariantConfig) ProtoMessage() {} - -func (x *LoggingVariantConfig) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[177] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use LoggingVariantConfig.ProtoReflect.Descriptor instead. -func (*LoggingVariantConfig) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{177} -} - -func (x *LoggingVariantConfig) GetVariant() LoggingVariantConfig_Variant { - if x != nil { - return x.Variant - } - return LoggingVariantConfig_VARIANT_UNSPECIFIED -} - -// MonitoringComponentConfig is cluster monitoring component configuration. -type MonitoringComponentConfig struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Select components to collect metrics. An empty set would disable all - // monitoring. - EnableComponents []MonitoringComponentConfig_Component `protobuf:"varint,1,rep,packed,name=enable_components,json=enableComponents,proto3,enum=google.container.v1.MonitoringComponentConfig_Component" json:"enable_components,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *MonitoringComponentConfig) Reset() { - *x = MonitoringComponentConfig{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[178] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *MonitoringComponentConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MonitoringComponentConfig) ProtoMessage() {} - -func (x *MonitoringComponentConfig) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[178] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use MonitoringComponentConfig.ProtoReflect.Descriptor instead. -func (*MonitoringComponentConfig) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{178} -} - -func (x *MonitoringComponentConfig) GetEnableComponents() []MonitoringComponentConfig_Component { - if x != nil { - return x.EnableComponents - } - return nil -} - -// ManagedPrometheusConfig defines the configuration for -// Google Cloud Managed Service for Prometheus. -type ManagedPrometheusConfig struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Enable Managed Collection. - Enabled bool `protobuf:"varint,1,opt,name=enabled,proto3" json:"enabled,omitempty"` - // GKE Workload Auto-Monitoring Configuration. - AutoMonitoringConfig *AutoMonitoringConfig `protobuf:"bytes,2,opt,name=auto_monitoring_config,json=autoMonitoringConfig,proto3" json:"auto_monitoring_config,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ManagedPrometheusConfig) Reset() { - *x = ManagedPrometheusConfig{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[179] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ManagedPrometheusConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ManagedPrometheusConfig) ProtoMessage() {} - -func (x *ManagedPrometheusConfig) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[179] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ManagedPrometheusConfig.ProtoReflect.Descriptor instead. -func (*ManagedPrometheusConfig) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{179} -} - -func (x *ManagedPrometheusConfig) GetEnabled() bool { - if x != nil { - return x.Enabled - } - return false -} - -func (x *ManagedPrometheusConfig) GetAutoMonitoringConfig() *AutoMonitoringConfig { - if x != nil { - return x.AutoMonitoringConfig - } - return nil -} - -// AutoMonitoringConfig defines the configuration for GKE Workload -// Auto-Monitoring. -type AutoMonitoringConfig struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Scope for GKE Workload Auto-Monitoring. - Scope AutoMonitoringConfig_Scope `protobuf:"varint,1,opt,name=scope,proto3,enum=google.container.v1.AutoMonitoringConfig_Scope" json:"scope,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *AutoMonitoringConfig) Reset() { - *x = AutoMonitoringConfig{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[180] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *AutoMonitoringConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*AutoMonitoringConfig) ProtoMessage() {} - -func (x *AutoMonitoringConfig) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[180] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use AutoMonitoringConfig.ProtoReflect.Descriptor instead. -func (*AutoMonitoringConfig) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{180} -} - -func (x *AutoMonitoringConfig) GetScope() AutoMonitoringConfig_Scope { - if x != nil { - return x.Scope - } - return AutoMonitoringConfig_SCOPE_UNSPECIFIED -} - -// PodAutoscaling is used for configuration of parameters -// for workload autoscaling. -type PodAutoscaling struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Selected Horizontal Pod Autoscaling profile. - HpaProfile *PodAutoscaling_HPAProfile `protobuf:"varint,2,opt,name=hpa_profile,json=hpaProfile,proto3,enum=google.container.v1.PodAutoscaling_HPAProfile,oneof" json:"hpa_profile,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *PodAutoscaling) Reset() { - *x = PodAutoscaling{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[181] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *PodAutoscaling) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*PodAutoscaling) ProtoMessage() {} - -func (x *PodAutoscaling) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[181] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use PodAutoscaling.ProtoReflect.Descriptor instead. -func (*PodAutoscaling) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{181} -} - -func (x *PodAutoscaling) GetHpaProfile() PodAutoscaling_HPAProfile { - if x != nil && x.HpaProfile != nil { - return *x.HpaProfile - } - return PodAutoscaling_HPA_PROFILE_UNSPECIFIED -} - -// Fleet is the fleet configuration for the cluster. -type Fleet struct { - state protoimpl.MessageState `protogen:"open.v1"` - // The Fleet host project(project ID or project number) where this cluster - // will be registered to. This field cannot be changed after the cluster has - // been registered. - Project string `protobuf:"bytes,1,opt,name=project,proto3" json:"project,omitempty"` - // Output only. The full resource name of the registered fleet membership of - // the cluster, in the format - // `//gkehub.googleapis.com/projects/*/locations/*/memberships/*`. - Membership string `protobuf:"bytes,2,opt,name=membership,proto3" json:"membership,omitempty"` - // Output only. Whether the cluster has been registered through the fleet - // API. - PreRegistered bool `protobuf:"varint,3,opt,name=pre_registered,json=preRegistered,proto3" json:"pre_registered,omitempty"` - // The type of the cluster's fleet membership. - MembershipType Fleet_MembershipType `protobuf:"varint,4,opt,name=membership_type,json=membershipType,proto3,enum=google.container.v1.Fleet_MembershipType" json:"membership_type,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *Fleet) Reset() { - *x = Fleet{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[182] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *Fleet) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Fleet) ProtoMessage() {} - -func (x *Fleet) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[182] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Fleet.ProtoReflect.Descriptor instead. -func (*Fleet) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{182} -} - -func (x *Fleet) GetProject() string { - if x != nil { - return x.Project - } - return "" -} - -func (x *Fleet) GetMembership() string { - if x != nil { - return x.Membership - } - return "" -} - -func (x *Fleet) GetPreRegistered() bool { - if x != nil { - return x.PreRegistered - } - return false -} - -func (x *Fleet) GetMembershipType() Fleet_MembershipType { - if x != nil { - return x.MembershipType - } - return Fleet_MEMBERSHIP_TYPE_UNSPECIFIED -} - -// Configuration for all of the cluster's control plane endpoints. -type ControlPlaneEndpointsConfig struct { - state protoimpl.MessageState `protogen:"open.v1"` - // DNS endpoint configuration. - DnsEndpointConfig *ControlPlaneEndpointsConfig_DNSEndpointConfig `protobuf:"bytes,1,opt,name=dns_endpoint_config,json=dnsEndpointConfig,proto3" json:"dns_endpoint_config,omitempty"` - // IP endpoints configuration. - IpEndpointsConfig *ControlPlaneEndpointsConfig_IPEndpointsConfig `protobuf:"bytes,3,opt,name=ip_endpoints_config,json=ipEndpointsConfig,proto3" json:"ip_endpoints_config,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ControlPlaneEndpointsConfig) Reset() { - *x = ControlPlaneEndpointsConfig{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[183] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ControlPlaneEndpointsConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ControlPlaneEndpointsConfig) ProtoMessage() {} - -func (x *ControlPlaneEndpointsConfig) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[183] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ControlPlaneEndpointsConfig.ProtoReflect.Descriptor instead. -func (*ControlPlaneEndpointsConfig) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{183} -} - -func (x *ControlPlaneEndpointsConfig) GetDnsEndpointConfig() *ControlPlaneEndpointsConfig_DNSEndpointConfig { - if x != nil { - return x.DnsEndpointConfig - } - return nil -} - -func (x *ControlPlaneEndpointsConfig) GetIpEndpointsConfig() *ControlPlaneEndpointsConfig_IPEndpointsConfig { - if x != nil { - return x.IpEndpointsConfig - } - return nil -} - -// LocalNvmeSsdBlockConfig contains configuration for using raw-block local -// NVMe SSDs -type LocalNvmeSsdBlockConfig struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Number of local NVMe SSDs to use. The limit for this value is dependent - // upon the maximum number of disk available on a machine per zone. See: - // https://cloud.google.com/compute/docs/disks/local-ssd - // for more information. - // - // A zero (or unset) value has different meanings depending on machine type - // being used: - // 1. For pre-Gen3 machines, which support flexible numbers of local ssds, - // zero (or unset) means to disable using local SSDs as ephemeral storage. - // 2. For Gen3 machines which dictate a specific number of local ssds, zero - // (or unset) means to use the default number of local ssds that goes with - // that machine type. For example, for a c3-standard-8-lssd machine, 2 local - // ssds would be provisioned. For c3-standard-8 (which doesn't support local - // ssds), 0 will be provisioned. See - // https://cloud.google.com/compute/docs/disks/local-ssd#choose_number_local_ssds - // for more info. - LocalSsdCount int32 `protobuf:"varint,1,opt,name=local_ssd_count,json=localSsdCount,proto3" json:"local_ssd_count,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *LocalNvmeSsdBlockConfig) Reset() { - *x = LocalNvmeSsdBlockConfig{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[184] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *LocalNvmeSsdBlockConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*LocalNvmeSsdBlockConfig) ProtoMessage() {} - -func (x *LocalNvmeSsdBlockConfig) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[184] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use LocalNvmeSsdBlockConfig.ProtoReflect.Descriptor instead. -func (*LocalNvmeSsdBlockConfig) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{184} -} - -func (x *LocalNvmeSsdBlockConfig) GetLocalSsdCount() int32 { - if x != nil { - return x.LocalSsdCount - } - return 0 -} - -// EphemeralStorageLocalSsdConfig contains configuration for the node ephemeral -// storage using Local SSDs. -type EphemeralStorageLocalSsdConfig struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Number of local SSDs to use to back ephemeral storage. Uses NVMe - // interfaces. - // - // A zero (or unset) value has different meanings depending on machine type - // being used: - // 1. For pre-Gen3 machines, which support flexible numbers of local ssds, - // zero (or unset) means to disable using local SSDs as ephemeral storage. The - // limit for this value is dependent upon the maximum number of disk - // available on a machine per zone. See: - // https://cloud.google.com/compute/docs/disks/local-ssd - // for more information. - // 2. For Gen3 machines which dictate a specific number of local ssds, zero - // (or unset) means to use the default number of local ssds that goes with - // that machine type. For example, for a c3-standard-8-lssd machine, 2 local - // ssds would be provisioned. For c3-standard-8 (which doesn't support local - // ssds), 0 will be provisioned. See - // https://cloud.google.com/compute/docs/disks/local-ssd#choose_number_local_ssds - // for more info. - LocalSsdCount int32 `protobuf:"varint,1,opt,name=local_ssd_count,json=localSsdCount,proto3" json:"local_ssd_count,omitempty"` - // Number of local SSDs to use for GKE Data Cache. - DataCacheCount int32 `protobuf:"varint,2,opt,name=data_cache_count,json=dataCacheCount,proto3" json:"data_cache_count,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *EphemeralStorageLocalSsdConfig) Reset() { - *x = EphemeralStorageLocalSsdConfig{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[185] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *EphemeralStorageLocalSsdConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*EphemeralStorageLocalSsdConfig) ProtoMessage() {} - -func (x *EphemeralStorageLocalSsdConfig) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[185] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use EphemeralStorageLocalSsdConfig.ProtoReflect.Descriptor instead. -func (*EphemeralStorageLocalSsdConfig) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{185} -} - -func (x *EphemeralStorageLocalSsdConfig) GetLocalSsdCount() int32 { - if x != nil { - return x.LocalSsdCount - } - return 0 -} - -func (x *EphemeralStorageLocalSsdConfig) GetDataCacheCount() int32 { - if x != nil { - return x.DataCacheCount - } - return 0 -} - -// A map of resource manager tag keys and values to be attached to the nodes -// for managing Compute Engine firewalls using Network Firewall Policies. -// Tags must be according to specifications in -// https://cloud.google.com/vpc/docs/tags-firewalls-overview#specifications. -// A maximum of 5 tag key-value pairs can be specified. -// Existing tags will be replaced with new values. -type ResourceManagerTags struct { - state protoimpl.MessageState `protogen:"open.v1"` - // TagKeyValue must be in one of the following formats ([KEY]=[VALUE]) - // 1. `tagKeys/{tag_key_id}=tagValues/{tag_value_id}` - // 2. `{org_id}/{tag_key_name}={tag_value_name}` - // 3. `{project_id}/{tag_key_name}={tag_value_name}` - Tags map[string]string `protobuf:"bytes,1,rep,name=tags,proto3" json:"tags,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ResourceManagerTags) Reset() { - *x = ResourceManagerTags{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[186] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ResourceManagerTags) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ResourceManagerTags) ProtoMessage() {} - -func (x *ResourceManagerTags) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[186] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ResourceManagerTags.ProtoReflect.Descriptor instead. -func (*ResourceManagerTags) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{186} -} - -func (x *ResourceManagerTags) GetTags() map[string]string { - if x != nil { - return x.Tags - } - return nil -} - -// EnterpriseConfig is the cluster enterprise configuration. -// -// Deprecated: GKE Enterprise features are now available without an Enterprise -// tier. -// -// Deprecated: Marked as deprecated in google/container/v1/cluster_service.proto. -type EnterpriseConfig struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Output only. cluster_tier indicates the effective tier of the cluster. - ClusterTier EnterpriseConfig_ClusterTier `protobuf:"varint,1,opt,name=cluster_tier,json=clusterTier,proto3,enum=google.container.v1.EnterpriseConfig_ClusterTier" json:"cluster_tier,omitempty"` - // desired_tier specifies the desired tier of the cluster. - DesiredTier EnterpriseConfig_ClusterTier `protobuf:"varint,2,opt,name=desired_tier,json=desiredTier,proto3,enum=google.container.v1.EnterpriseConfig_ClusterTier" json:"desired_tier,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *EnterpriseConfig) Reset() { - *x = EnterpriseConfig{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[187] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *EnterpriseConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*EnterpriseConfig) ProtoMessage() {} - -func (x *EnterpriseConfig) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[187] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use EnterpriseConfig.ProtoReflect.Descriptor instead. -func (*EnterpriseConfig) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{187} -} - -func (x *EnterpriseConfig) GetClusterTier() EnterpriseConfig_ClusterTier { - if x != nil { - return x.ClusterTier - } - return EnterpriseConfig_CLUSTER_TIER_UNSPECIFIED -} - -func (x *EnterpriseConfig) GetDesiredTier() EnterpriseConfig_ClusterTier { - if x != nil { - return x.DesiredTier - } - return EnterpriseConfig_CLUSTER_TIER_UNSPECIFIED -} - -// SecretManagerConfig is config for secret manager enablement. -type SecretManagerConfig struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Enable/Disable Secret Manager Config. - Enabled *bool `protobuf:"varint,1,opt,name=enabled,proto3,oneof" json:"enabled,omitempty"` - // Rotation config for secret manager. - RotationConfig *SecretManagerConfig_RotationConfig `protobuf:"bytes,2,opt,name=rotation_config,json=rotationConfig,proto3,oneof" json:"rotation_config,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *SecretManagerConfig) Reset() { - *x = SecretManagerConfig{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[188] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *SecretManagerConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SecretManagerConfig) ProtoMessage() {} - -func (x *SecretManagerConfig) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[188] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SecretManagerConfig.ProtoReflect.Descriptor instead. -func (*SecretManagerConfig) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{188} -} - -func (x *SecretManagerConfig) GetEnabled() bool { - if x != nil && x.Enabled != nil { - return *x.Enabled - } - return false -} - -func (x *SecretManagerConfig) GetRotationConfig() *SecretManagerConfig_RotationConfig { - if x != nil { - return x.RotationConfig - } - return nil -} - -// BootDisk specifies the boot disk configuration for nodepools. -type BootDisk struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Disk type of the boot disk. - // (i.e. Hyperdisk-Balanced, PD-Balanced, etc.) - DiskType string `protobuf:"bytes,1,opt,name=disk_type,json=diskType,proto3" json:"disk_type,omitempty"` - // Disk size in GB. Replaces NodeConfig.disk_size_gb - SizeGb int64 `protobuf:"varint,2,opt,name=size_gb,json=sizeGb,proto3" json:"size_gb,omitempty"` - // For Hyperdisk-Balanced only, the provisioned IOPS config value. - ProvisionedIops int64 `protobuf:"varint,3,opt,name=provisioned_iops,json=provisionedIops,proto3" json:"provisioned_iops,omitempty"` - // For Hyperdisk-Balanced only, the provisioned throughput config value. - ProvisionedThroughput int64 `protobuf:"varint,4,opt,name=provisioned_throughput,json=provisionedThroughput,proto3" json:"provisioned_throughput,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *BootDisk) Reset() { - *x = BootDisk{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[189] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *BootDisk) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*BootDisk) ProtoMessage() {} - -func (x *BootDisk) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[189] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use BootDisk.ProtoReflect.Descriptor instead. -func (*BootDisk) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{189} -} - -func (x *BootDisk) GetDiskType() string { - if x != nil { - return x.DiskType - } - return "" -} - -func (x *BootDisk) GetSizeGb() int64 { - if x != nil { - return x.SizeGb - } - return 0 -} - -func (x *BootDisk) GetProvisionedIops() int64 { - if x != nil { - return x.ProvisionedIops - } - return 0 -} - -func (x *BootDisk) GetProvisionedThroughput() int64 { - if x != nil { - return x.ProvisionedThroughput - } - return 0 -} - -// SecondaryBootDisk represents a persistent disk attached to a node -// with special configurations based on its mode. -type SecondaryBootDisk struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Disk mode (container image cache, etc.) - Mode SecondaryBootDisk_Mode `protobuf:"varint,1,opt,name=mode,proto3,enum=google.container.v1.SecondaryBootDisk_Mode" json:"mode,omitempty"` - // Fully-qualified resource ID for an existing disk image. - DiskImage string `protobuf:"bytes,2,opt,name=disk_image,json=diskImage,proto3" json:"disk_image,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *SecondaryBootDisk) Reset() { - *x = SecondaryBootDisk{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[190] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *SecondaryBootDisk) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SecondaryBootDisk) ProtoMessage() {} - -func (x *SecondaryBootDisk) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[190] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SecondaryBootDisk.ProtoReflect.Descriptor instead. -func (*SecondaryBootDisk) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{190} -} - -func (x *SecondaryBootDisk) GetMode() SecondaryBootDisk_Mode { - if x != nil { - return x.Mode - } - return SecondaryBootDisk_MODE_UNSPECIFIED -} - -func (x *SecondaryBootDisk) GetDiskImage() string { - if x != nil { - return x.DiskImage - } - return "" -} - -// SecondaryBootDiskUpdateStrategy is a placeholder which will be extended -// in the future to define different options for updating secondary boot disks. -type SecondaryBootDiskUpdateStrategy struct { - state protoimpl.MessageState `protogen:"open.v1"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *SecondaryBootDiskUpdateStrategy) Reset() { - *x = SecondaryBootDiskUpdateStrategy{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[191] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *SecondaryBootDiskUpdateStrategy) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SecondaryBootDiskUpdateStrategy) ProtoMessage() {} - -func (x *SecondaryBootDiskUpdateStrategy) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[191] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SecondaryBootDiskUpdateStrategy.ProtoReflect.Descriptor instead. -func (*SecondaryBootDiskUpdateStrategy) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{191} -} - -// FetchClusterUpgradeInfoRequest fetches the upgrade information of a cluster. -type FetchClusterUpgradeInfoRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Required. The name (project, location, cluster) of the cluster to get. - // Specified in the format `projects/*/locations/*/clusters/*` or - // `projects/*/zones/*/clusters/*`. - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // API request version that initiates this operation. - Version string `protobuf:"bytes,100,opt,name=version,proto3" json:"version,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *FetchClusterUpgradeInfoRequest) Reset() { - *x = FetchClusterUpgradeInfoRequest{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[192] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *FetchClusterUpgradeInfoRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*FetchClusterUpgradeInfoRequest) ProtoMessage() {} - -func (x *FetchClusterUpgradeInfoRequest) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[192] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use FetchClusterUpgradeInfoRequest.ProtoReflect.Descriptor instead. -func (*FetchClusterUpgradeInfoRequest) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{192} -} - -func (x *FetchClusterUpgradeInfoRequest) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *FetchClusterUpgradeInfoRequest) GetVersion() string { - if x != nil { - return x.Version - } - return "" -} - -// ClusterUpgradeInfo contains the upgrade information of a cluster. -type ClusterUpgradeInfo struct { - state protoimpl.MessageState `protogen:"open.v1"` - // minor_target_version indicates the target version for minor upgrade. - MinorTargetVersion *string `protobuf:"bytes,7,opt,name=minor_target_version,json=minorTargetVersion,proto3,oneof" json:"minor_target_version,omitempty"` - // patch_target_version indicates the target version for patch upgrade. - PatchTargetVersion *string `protobuf:"bytes,8,opt,name=patch_target_version,json=patchTargetVersion,proto3,oneof" json:"patch_target_version,omitempty"` - // The auto upgrade status. - AutoUpgradeStatus []ClusterUpgradeInfo_AutoUpgradeStatus `protobuf:"varint,2,rep,packed,name=auto_upgrade_status,json=autoUpgradeStatus,proto3,enum=google.container.v1.ClusterUpgradeInfo_AutoUpgradeStatus" json:"auto_upgrade_status,omitempty"` - // The auto upgrade paused reason. - PausedReason []ClusterUpgradeInfo_AutoUpgradePausedReason `protobuf:"varint,3,rep,packed,name=paused_reason,json=pausedReason,proto3,enum=google.container.v1.ClusterUpgradeInfo_AutoUpgradePausedReason" json:"paused_reason,omitempty"` - // The list of past auto upgrades. - UpgradeDetails []*UpgradeDetails `protobuf:"bytes,4,rep,name=upgrade_details,json=upgradeDetails,proto3" json:"upgrade_details,omitempty"` - // The cluster's current minor version's end of standard support timestamp. - EndOfStandardSupportTimestamp *string `protobuf:"bytes,5,opt,name=end_of_standard_support_timestamp,json=endOfStandardSupportTimestamp,proto3,oneof" json:"end_of_standard_support_timestamp,omitempty"` - // The cluster's current minor version's end of extended support timestamp. - EndOfExtendedSupportTimestamp *string `protobuf:"bytes,6,opt,name=end_of_extended_support_timestamp,json=endOfExtendedSupportTimestamp,proto3,oneof" json:"end_of_extended_support_timestamp,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ClusterUpgradeInfo) Reset() { - *x = ClusterUpgradeInfo{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[193] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ClusterUpgradeInfo) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ClusterUpgradeInfo) ProtoMessage() {} - -func (x *ClusterUpgradeInfo) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[193] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ClusterUpgradeInfo.ProtoReflect.Descriptor instead. -func (*ClusterUpgradeInfo) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{193} -} - -func (x *ClusterUpgradeInfo) GetMinorTargetVersion() string { - if x != nil && x.MinorTargetVersion != nil { - return *x.MinorTargetVersion - } - return "" -} - -func (x *ClusterUpgradeInfo) GetPatchTargetVersion() string { - if x != nil && x.PatchTargetVersion != nil { - return *x.PatchTargetVersion - } - return "" -} - -func (x *ClusterUpgradeInfo) GetAutoUpgradeStatus() []ClusterUpgradeInfo_AutoUpgradeStatus { - if x != nil { - return x.AutoUpgradeStatus - } - return nil -} - -func (x *ClusterUpgradeInfo) GetPausedReason() []ClusterUpgradeInfo_AutoUpgradePausedReason { - if x != nil { - return x.PausedReason - } - return nil -} - -func (x *ClusterUpgradeInfo) GetUpgradeDetails() []*UpgradeDetails { - if x != nil { - return x.UpgradeDetails - } - return nil -} - -func (x *ClusterUpgradeInfo) GetEndOfStandardSupportTimestamp() string { - if x != nil && x.EndOfStandardSupportTimestamp != nil { - return *x.EndOfStandardSupportTimestamp - } - return "" -} - -func (x *ClusterUpgradeInfo) GetEndOfExtendedSupportTimestamp() string { - if x != nil && x.EndOfExtendedSupportTimestamp != nil { - return *x.EndOfExtendedSupportTimestamp - } - return "" -} - -// UpgradeDetails contains detailed information of each individual upgrade -// operation. -type UpgradeDetails struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Output only. The state of the upgrade. - State UpgradeDetails_State `protobuf:"varint,1,opt,name=state,proto3,enum=google.container.v1.UpgradeDetails_State" json:"state,omitempty"` - // The start timestamp of the upgrade. - StartTime *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=start_time,json=startTime,proto3,oneof" json:"start_time,omitempty"` - // The end timestamp of the upgrade. - EndTime *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=end_time,json=endTime,proto3,oneof" json:"end_time,omitempty"` - // The version before the upgrade. - InitialVersion string `protobuf:"bytes,4,opt,name=initial_version,json=initialVersion,proto3" json:"initial_version,omitempty"` - // The version after the upgrade. - TargetVersion string `protobuf:"bytes,5,opt,name=target_version,json=targetVersion,proto3" json:"target_version,omitempty"` - // The start type of the upgrade. - StartType UpgradeDetails_StartType `protobuf:"varint,6,opt,name=start_type,json=startType,proto3,enum=google.container.v1.UpgradeDetails_StartType" json:"start_type,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *UpgradeDetails) Reset() { - *x = UpgradeDetails{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[194] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *UpgradeDetails) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UpgradeDetails) ProtoMessage() {} - -func (x *UpgradeDetails) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[194] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use UpgradeDetails.ProtoReflect.Descriptor instead. -func (*UpgradeDetails) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{194} -} - -func (x *UpgradeDetails) GetState() UpgradeDetails_State { - if x != nil { - return x.State - } - return UpgradeDetails_UNKNOWN -} - -func (x *UpgradeDetails) GetStartTime() *timestamppb.Timestamp { - if x != nil { - return x.StartTime - } - return nil -} - -func (x *UpgradeDetails) GetEndTime() *timestamppb.Timestamp { - if x != nil { - return x.EndTime - } - return nil -} - -func (x *UpgradeDetails) GetInitialVersion() string { - if x != nil { - return x.InitialVersion - } - return "" -} - -func (x *UpgradeDetails) GetTargetVersion() string { - if x != nil { - return x.TargetVersion - } - return "" -} - -func (x *UpgradeDetails) GetStartType() UpgradeDetails_StartType { - if x != nil { - return x.StartType - } - return UpgradeDetails_START_TYPE_UNSPECIFIED -} - -// FetchNodePoolUpgradeInfoRequest fetches the upgrade information of a -// nodepool. -type FetchNodePoolUpgradeInfoRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Required. The name (project, location, cluster, nodepool) of the nodepool - // to get. Specified in the format - // `projects/*/locations/*/clusters/*/nodePools/*` or - // `projects/*/zones/*/clusters/*/nodePools/*`. - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // API request version that initiates this operation. - Version string `protobuf:"bytes,100,opt,name=version,proto3" json:"version,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *FetchNodePoolUpgradeInfoRequest) Reset() { - *x = FetchNodePoolUpgradeInfoRequest{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[195] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *FetchNodePoolUpgradeInfoRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*FetchNodePoolUpgradeInfoRequest) ProtoMessage() {} - -func (x *FetchNodePoolUpgradeInfoRequest) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[195] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use FetchNodePoolUpgradeInfoRequest.ProtoReflect.Descriptor instead. -func (*FetchNodePoolUpgradeInfoRequest) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{195} -} - -func (x *FetchNodePoolUpgradeInfoRequest) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *FetchNodePoolUpgradeInfoRequest) GetVersion() string { - if x != nil { - return x.Version - } - return "" -} - -// NodePoolUpgradeInfo contains the upgrade information of a nodepool. -type NodePoolUpgradeInfo struct { - state protoimpl.MessageState `protogen:"open.v1"` - // minor_target_version indicates the target version for minor upgrade. - MinorTargetVersion *string `protobuf:"bytes,1,opt,name=minor_target_version,json=minorTargetVersion,proto3,oneof" json:"minor_target_version,omitempty"` - // patch_target_version indicates the target version for patch upgrade. - PatchTargetVersion *string `protobuf:"bytes,2,opt,name=patch_target_version,json=patchTargetVersion,proto3,oneof" json:"patch_target_version,omitempty"` - // The auto upgrade status. - AutoUpgradeStatus []NodePoolUpgradeInfo_AutoUpgradeStatus `protobuf:"varint,3,rep,packed,name=auto_upgrade_status,json=autoUpgradeStatus,proto3,enum=google.container.v1.NodePoolUpgradeInfo_AutoUpgradeStatus" json:"auto_upgrade_status,omitempty"` - // The auto upgrade paused reason. - PausedReason []NodePoolUpgradeInfo_AutoUpgradePausedReason `protobuf:"varint,4,rep,packed,name=paused_reason,json=pausedReason,proto3,enum=google.container.v1.NodePoolUpgradeInfo_AutoUpgradePausedReason" json:"paused_reason,omitempty"` - // The list of past auto upgrades. - UpgradeDetails []*UpgradeDetails `protobuf:"bytes,5,rep,name=upgrade_details,json=upgradeDetails,proto3" json:"upgrade_details,omitempty"` - // The nodepool's current minor version's end of standard support timestamp. - EndOfStandardSupportTimestamp *string `protobuf:"bytes,6,opt,name=end_of_standard_support_timestamp,json=endOfStandardSupportTimestamp,proto3,oneof" json:"end_of_standard_support_timestamp,omitempty"` - // The nodepool's current minor version's end of extended support timestamp. - EndOfExtendedSupportTimestamp *string `protobuf:"bytes,7,opt,name=end_of_extended_support_timestamp,json=endOfExtendedSupportTimestamp,proto3,oneof" json:"end_of_extended_support_timestamp,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *NodePoolUpgradeInfo) Reset() { - *x = NodePoolUpgradeInfo{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[196] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *NodePoolUpgradeInfo) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*NodePoolUpgradeInfo) ProtoMessage() {} - -func (x *NodePoolUpgradeInfo) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[196] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use NodePoolUpgradeInfo.ProtoReflect.Descriptor instead. -func (*NodePoolUpgradeInfo) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{196} -} - -func (x *NodePoolUpgradeInfo) GetMinorTargetVersion() string { - if x != nil && x.MinorTargetVersion != nil { - return *x.MinorTargetVersion - } - return "" -} - -func (x *NodePoolUpgradeInfo) GetPatchTargetVersion() string { - if x != nil && x.PatchTargetVersion != nil { - return *x.PatchTargetVersion - } - return "" -} - -func (x *NodePoolUpgradeInfo) GetAutoUpgradeStatus() []NodePoolUpgradeInfo_AutoUpgradeStatus { - if x != nil { - return x.AutoUpgradeStatus - } - return nil -} - -func (x *NodePoolUpgradeInfo) GetPausedReason() []NodePoolUpgradeInfo_AutoUpgradePausedReason { - if x != nil { - return x.PausedReason - } - return nil -} - -func (x *NodePoolUpgradeInfo) GetUpgradeDetails() []*UpgradeDetails { - if x != nil { - return x.UpgradeDetails - } - return nil -} - -func (x *NodePoolUpgradeInfo) GetEndOfStandardSupportTimestamp() string { - if x != nil && x.EndOfStandardSupportTimestamp != nil { - return *x.EndOfStandardSupportTimestamp - } - return "" -} - -func (x *NodePoolUpgradeInfo) GetEndOfExtendedSupportTimestamp() string { - if x != nil && x.EndOfExtendedSupportTimestamp != nil { - return *x.EndOfExtendedSupportTimestamp - } - return "" -} - -// GkeAutoUpgradeConfig is the configuration for GKE auto upgrades. -type GkeAutoUpgradeConfig struct { - state protoimpl.MessageState `protogen:"open.v1"` - // PatchMode specifies how auto upgrade patch builds should be - // selected. - PatchMode GkeAutoUpgradeConfig_PatchMode `protobuf:"varint,1,opt,name=patch_mode,json=patchMode,proto3,enum=google.container.v1.GkeAutoUpgradeConfig_PatchMode" json:"patch_mode,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *GkeAutoUpgradeConfig) Reset() { - *x = GkeAutoUpgradeConfig{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[197] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *GkeAutoUpgradeConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GkeAutoUpgradeConfig) ProtoMessage() {} - -func (x *GkeAutoUpgradeConfig) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[197] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GkeAutoUpgradeConfig.ProtoReflect.Descriptor instead. -func (*GkeAutoUpgradeConfig) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{197} -} - -func (x *GkeAutoUpgradeConfig) GetPatchMode() GkeAutoUpgradeConfig_PatchMode { - if x != nil { - return x.PatchMode - } - return GkeAutoUpgradeConfig_PATCH_MODE_UNSPECIFIED -} - -// NetworkTierConfig contains network tier information. -type NetworkTierConfig struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Network tier configuration. - NetworkTier NetworkTierConfig_NetworkTier `protobuf:"varint,1,opt,name=network_tier,json=networkTier,proto3,enum=google.container.v1.NetworkTierConfig_NetworkTier" json:"network_tier,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *NetworkTierConfig) Reset() { - *x = NetworkTierConfig{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[198] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *NetworkTierConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*NetworkTierConfig) ProtoMessage() {} - -func (x *NetworkTierConfig) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[198] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use NetworkTierConfig.ProtoReflect.Descriptor instead. -func (*NetworkTierConfig) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{198} -} - -func (x *NetworkTierConfig) GetNetworkTier() NetworkTierConfig_NetworkTier { - if x != nil { - return x.NetworkTier - } - return NetworkTierConfig_NETWORK_TIER_UNSPECIFIED -} - -// ManagedOpenTelemetryConfig is the configuration for the GKE Managed -// OpenTelemetry pipeline. -type ManagedOpenTelemetryConfig struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Scope of the Managed OpenTelemetry pipeline. - Scope *ManagedOpenTelemetryConfig_Scope `protobuf:"varint,1,opt,name=scope,proto3,enum=google.container.v1.ManagedOpenTelemetryConfig_Scope,oneof" json:"scope,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ManagedOpenTelemetryConfig) Reset() { - *x = ManagedOpenTelemetryConfig{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[199] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ManagedOpenTelemetryConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ManagedOpenTelemetryConfig) ProtoMessage() {} - -func (x *ManagedOpenTelemetryConfig) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[199] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ManagedOpenTelemetryConfig.ProtoReflect.Descriptor instead. -func (*ManagedOpenTelemetryConfig) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{199} -} - -func (x *ManagedOpenTelemetryConfig) GetScope() ManagedOpenTelemetryConfig_Scope { - if x != nil && x.Scope != nil { - return *x.Scope - } - return ManagedOpenTelemetryConfig_SCOPE_UNSPECIFIED -} - -// Hugepages amount in both 2m and 1g size -type LinuxNodeConfig_HugepagesConfig struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Optional. Amount of 2M hugepages - HugepageSize2M *int32 `protobuf:"varint,1,opt,name=hugepage_size2m,json=hugepageSize2m,proto3,oneof" json:"hugepage_size2m,omitempty"` - // Optional. Amount of 1G hugepages - HugepageSize1G *int32 `protobuf:"varint,2,opt,name=hugepage_size1g,json=hugepageSize1g,proto3,oneof" json:"hugepage_size1g,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *LinuxNodeConfig_HugepagesConfig) Reset() { - *x = LinuxNodeConfig_HugepagesConfig{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[200] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *LinuxNodeConfig_HugepagesConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*LinuxNodeConfig_HugepagesConfig) ProtoMessage() {} - -func (x *LinuxNodeConfig_HugepagesConfig) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[200] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use LinuxNodeConfig_HugepagesConfig.ProtoReflect.Descriptor instead. -func (*LinuxNodeConfig_HugepagesConfig) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{0, 0} -} - -func (x *LinuxNodeConfig_HugepagesConfig) GetHugepageSize2M() int32 { - if x != nil && x.HugepageSize2M != nil { - return *x.HugepageSize2M - } - return 0 -} - -func (x *LinuxNodeConfig_HugepagesConfig) GetHugepageSize1G() int32 { - if x != nil && x.HugepageSize1G != nil { - return *x.HugepageSize1G - } - return 0 -} - -// Configuration for swap memory on a node pool. -type LinuxNodeConfig_SwapConfig struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Optional. Enables or disables swap for the node pool. - Enabled *bool `protobuf:"varint,1,opt,name=enabled,proto3,oneof" json:"enabled,omitempty"` - // Optional. If omitted, swap space is encrypted by default. - EncryptionConfig *LinuxNodeConfig_SwapConfig_EncryptionConfig `protobuf:"bytes,2,opt,name=encryption_config,json=encryptionConfig,proto3,oneof" json:"encryption_config,omitempty"` - // Optional. Defines the backing storage for the swap space. - // If omitted, defaults to the 'boot_disk_profile'. - // - // Types that are valid to be assigned to PerformanceProfile: - // - // *LinuxNodeConfig_SwapConfig_BootDiskProfile_ - // *LinuxNodeConfig_SwapConfig_EphemeralLocalSsdProfile_ - // *LinuxNodeConfig_SwapConfig_DedicatedLocalSsdProfile_ - PerformanceProfile isLinuxNodeConfig_SwapConfig_PerformanceProfile `protobuf_oneof:"performance_profile"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *LinuxNodeConfig_SwapConfig) Reset() { - *x = LinuxNodeConfig_SwapConfig{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[201] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *LinuxNodeConfig_SwapConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*LinuxNodeConfig_SwapConfig) ProtoMessage() {} - -func (x *LinuxNodeConfig_SwapConfig) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[201] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use LinuxNodeConfig_SwapConfig.ProtoReflect.Descriptor instead. -func (*LinuxNodeConfig_SwapConfig) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{0, 1} -} - -func (x *LinuxNodeConfig_SwapConfig) GetEnabled() bool { - if x != nil && x.Enabled != nil { - return *x.Enabled - } - return false -} - -func (x *LinuxNodeConfig_SwapConfig) GetEncryptionConfig() *LinuxNodeConfig_SwapConfig_EncryptionConfig { - if x != nil { - return x.EncryptionConfig - } - return nil -} - -func (x *LinuxNodeConfig_SwapConfig) GetPerformanceProfile() isLinuxNodeConfig_SwapConfig_PerformanceProfile { - if x != nil { - return x.PerformanceProfile - } - return nil -} - -func (x *LinuxNodeConfig_SwapConfig) GetBootDiskProfile() *LinuxNodeConfig_SwapConfig_BootDiskProfile { - if x != nil { - if x, ok := x.PerformanceProfile.(*LinuxNodeConfig_SwapConfig_BootDiskProfile_); ok { - return x.BootDiskProfile - } - } - return nil -} - -func (x *LinuxNodeConfig_SwapConfig) GetEphemeralLocalSsdProfile() *LinuxNodeConfig_SwapConfig_EphemeralLocalSsdProfile { - if x != nil { - if x, ok := x.PerformanceProfile.(*LinuxNodeConfig_SwapConfig_EphemeralLocalSsdProfile_); ok { - return x.EphemeralLocalSsdProfile - } - } - return nil -} - -func (x *LinuxNodeConfig_SwapConfig) GetDedicatedLocalSsdProfile() *LinuxNodeConfig_SwapConfig_DedicatedLocalSsdProfile { - if x != nil { - if x, ok := x.PerformanceProfile.(*LinuxNodeConfig_SwapConfig_DedicatedLocalSsdProfile_); ok { - return x.DedicatedLocalSsdProfile - } - } - return nil -} - -type isLinuxNodeConfig_SwapConfig_PerformanceProfile interface { - isLinuxNodeConfig_SwapConfig_PerformanceProfile() -} - -type LinuxNodeConfig_SwapConfig_BootDiskProfile_ struct { - // Swap on the node's boot disk. - BootDiskProfile *LinuxNodeConfig_SwapConfig_BootDiskProfile `protobuf:"bytes,3,opt,name=boot_disk_profile,json=bootDiskProfile,proto3,oneof"` -} - -type LinuxNodeConfig_SwapConfig_EphemeralLocalSsdProfile_ struct { - // Swap on the local SSD shared with pod ephemeral storage. - EphemeralLocalSsdProfile *LinuxNodeConfig_SwapConfig_EphemeralLocalSsdProfile `protobuf:"bytes,4,opt,name=ephemeral_local_ssd_profile,json=ephemeralLocalSsdProfile,proto3,oneof"` -} - -type LinuxNodeConfig_SwapConfig_DedicatedLocalSsdProfile_ struct { - // Provisions a new, separate local NVMe SSD exclusively for swap. - DedicatedLocalSsdProfile *LinuxNodeConfig_SwapConfig_DedicatedLocalSsdProfile `protobuf:"bytes,5,opt,name=dedicated_local_ssd_profile,json=dedicatedLocalSsdProfile,proto3,oneof"` -} - -func (*LinuxNodeConfig_SwapConfig_BootDiskProfile_) isLinuxNodeConfig_SwapConfig_PerformanceProfile() { -} - -func (*LinuxNodeConfig_SwapConfig_EphemeralLocalSsdProfile_) isLinuxNodeConfig_SwapConfig_PerformanceProfile() { -} - -func (*LinuxNodeConfig_SwapConfig_DedicatedLocalSsdProfile_) isLinuxNodeConfig_SwapConfig_PerformanceProfile() { -} - -// Configuration for kernel module loading on nodes. -type LinuxNodeConfig_NodeKernelModuleLoading struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Set the node module loading policy for nodes in the node pool. - Policy LinuxNodeConfig_NodeKernelModuleLoading_Policy `protobuf:"varint,1,opt,name=policy,proto3,enum=google.container.v1.LinuxNodeConfig_NodeKernelModuleLoading_Policy" json:"policy,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *LinuxNodeConfig_NodeKernelModuleLoading) Reset() { - *x = LinuxNodeConfig_NodeKernelModuleLoading{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[202] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *LinuxNodeConfig_NodeKernelModuleLoading) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*LinuxNodeConfig_NodeKernelModuleLoading) ProtoMessage() {} - -func (x *LinuxNodeConfig_NodeKernelModuleLoading) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[202] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use LinuxNodeConfig_NodeKernelModuleLoading.ProtoReflect.Descriptor instead. -func (*LinuxNodeConfig_NodeKernelModuleLoading) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{0, 2} -} - -func (x *LinuxNodeConfig_NodeKernelModuleLoading) GetPolicy() LinuxNodeConfig_NodeKernelModuleLoading_Policy { - if x != nil { - return x.Policy - } - return LinuxNodeConfig_NodeKernelModuleLoading_POLICY_UNSPECIFIED -} - -// Defines encryption settings for the swap space. -type LinuxNodeConfig_SwapConfig_EncryptionConfig struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Optional. If true, swap space will not be encrypted. - // Defaults to false (encrypted). - Disabled *bool `protobuf:"varint,1,opt,name=disabled,proto3,oneof" json:"disabled,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *LinuxNodeConfig_SwapConfig_EncryptionConfig) Reset() { - *x = LinuxNodeConfig_SwapConfig_EncryptionConfig{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[204] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *LinuxNodeConfig_SwapConfig_EncryptionConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*LinuxNodeConfig_SwapConfig_EncryptionConfig) ProtoMessage() {} - -func (x *LinuxNodeConfig_SwapConfig_EncryptionConfig) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[204] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use LinuxNodeConfig_SwapConfig_EncryptionConfig.ProtoReflect.Descriptor instead. -func (*LinuxNodeConfig_SwapConfig_EncryptionConfig) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{0, 1, 0} -} - -func (x *LinuxNodeConfig_SwapConfig_EncryptionConfig) GetDisabled() bool { - if x != nil && x.Disabled != nil { - return *x.Disabled - } - return false -} - -// Swap on the node's boot disk. -type LinuxNodeConfig_SwapConfig_BootDiskProfile struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Optional. Specifies the size of the swap space. If omitted, GKE - // determines an optimal size based on node memory. - // - // Types that are valid to be assigned to SwapSize: - // - // *LinuxNodeConfig_SwapConfig_BootDiskProfile_SwapSizeGib - // *LinuxNodeConfig_SwapConfig_BootDiskProfile_SwapSizePercent - SwapSize isLinuxNodeConfig_SwapConfig_BootDiskProfile_SwapSize `protobuf_oneof:"swap_size"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *LinuxNodeConfig_SwapConfig_BootDiskProfile) Reset() { - *x = LinuxNodeConfig_SwapConfig_BootDiskProfile{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[205] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *LinuxNodeConfig_SwapConfig_BootDiskProfile) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*LinuxNodeConfig_SwapConfig_BootDiskProfile) ProtoMessage() {} - -func (x *LinuxNodeConfig_SwapConfig_BootDiskProfile) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[205] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use LinuxNodeConfig_SwapConfig_BootDiskProfile.ProtoReflect.Descriptor instead. -func (*LinuxNodeConfig_SwapConfig_BootDiskProfile) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{0, 1, 1} -} - -func (x *LinuxNodeConfig_SwapConfig_BootDiskProfile) GetSwapSize() isLinuxNodeConfig_SwapConfig_BootDiskProfile_SwapSize { - if x != nil { - return x.SwapSize - } - return nil -} - -func (x *LinuxNodeConfig_SwapConfig_BootDiskProfile) GetSwapSizeGib() int64 { - if x != nil { - if x, ok := x.SwapSize.(*LinuxNodeConfig_SwapConfig_BootDiskProfile_SwapSizeGib); ok { - return x.SwapSizeGib - } - } - return 0 -} - -func (x *LinuxNodeConfig_SwapConfig_BootDiskProfile) GetSwapSizePercent() int32 { - if x != nil { - if x, ok := x.SwapSize.(*LinuxNodeConfig_SwapConfig_BootDiskProfile_SwapSizePercent); ok { - return x.SwapSizePercent - } - } - return 0 -} - -type isLinuxNodeConfig_SwapConfig_BootDiskProfile_SwapSize interface { - isLinuxNodeConfig_SwapConfig_BootDiskProfile_SwapSize() -} - -type LinuxNodeConfig_SwapConfig_BootDiskProfile_SwapSizeGib struct { - // Specifies the size of the swap space in gibibytes (GiB). - SwapSizeGib int64 `protobuf:"varint,1,opt,name=swap_size_gib,json=swapSizeGib,proto3,oneof"` -} - -type LinuxNodeConfig_SwapConfig_BootDiskProfile_SwapSizePercent struct { - // Specifies the size of the swap space as a percentage of the boot disk - // size. - SwapSizePercent int32 `protobuf:"varint,2,opt,name=swap_size_percent,json=swapSizePercent,proto3,oneof"` -} - -func (*LinuxNodeConfig_SwapConfig_BootDiskProfile_SwapSizeGib) isLinuxNodeConfig_SwapConfig_BootDiskProfile_SwapSize() { -} - -func (*LinuxNodeConfig_SwapConfig_BootDiskProfile_SwapSizePercent) isLinuxNodeConfig_SwapConfig_BootDiskProfile_SwapSize() { -} - -// Swap on the local SSD shared with pod ephemeral storage. -type LinuxNodeConfig_SwapConfig_EphemeralLocalSsdProfile struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Specifies the size of the swap space to be provisioned. - // - // Types that are valid to be assigned to SwapSize: - // - // *LinuxNodeConfig_SwapConfig_EphemeralLocalSsdProfile_SwapSizeGib - // *LinuxNodeConfig_SwapConfig_EphemeralLocalSsdProfile_SwapSizePercent - SwapSize isLinuxNodeConfig_SwapConfig_EphemeralLocalSsdProfile_SwapSize `protobuf_oneof:"swap_size"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *LinuxNodeConfig_SwapConfig_EphemeralLocalSsdProfile) Reset() { - *x = LinuxNodeConfig_SwapConfig_EphemeralLocalSsdProfile{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[206] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *LinuxNodeConfig_SwapConfig_EphemeralLocalSsdProfile) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*LinuxNodeConfig_SwapConfig_EphemeralLocalSsdProfile) ProtoMessage() {} - -func (x *LinuxNodeConfig_SwapConfig_EphemeralLocalSsdProfile) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[206] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use LinuxNodeConfig_SwapConfig_EphemeralLocalSsdProfile.ProtoReflect.Descriptor instead. -func (*LinuxNodeConfig_SwapConfig_EphemeralLocalSsdProfile) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{0, 1, 2} -} - -func (x *LinuxNodeConfig_SwapConfig_EphemeralLocalSsdProfile) GetSwapSize() isLinuxNodeConfig_SwapConfig_EphemeralLocalSsdProfile_SwapSize { - if x != nil { - return x.SwapSize - } - return nil -} - -func (x *LinuxNodeConfig_SwapConfig_EphemeralLocalSsdProfile) GetSwapSizeGib() int64 { - if x != nil { - if x, ok := x.SwapSize.(*LinuxNodeConfig_SwapConfig_EphemeralLocalSsdProfile_SwapSizeGib); ok { - return x.SwapSizeGib - } - } - return 0 -} - -func (x *LinuxNodeConfig_SwapConfig_EphemeralLocalSsdProfile) GetSwapSizePercent() int32 { - if x != nil { - if x, ok := x.SwapSize.(*LinuxNodeConfig_SwapConfig_EphemeralLocalSsdProfile_SwapSizePercent); ok { - return x.SwapSizePercent - } - } - return 0 -} - -type isLinuxNodeConfig_SwapConfig_EphemeralLocalSsdProfile_SwapSize interface { - isLinuxNodeConfig_SwapConfig_EphemeralLocalSsdProfile_SwapSize() -} - -type LinuxNodeConfig_SwapConfig_EphemeralLocalSsdProfile_SwapSizeGib struct { - // Specifies the size of the swap space in gibibytes (GiB). - SwapSizeGib int64 `protobuf:"varint,1,opt,name=swap_size_gib,json=swapSizeGib,proto3,oneof"` -} - -type LinuxNodeConfig_SwapConfig_EphemeralLocalSsdProfile_SwapSizePercent struct { - // Specifies the size of the swap space as a percentage of the ephemeral - // local SSD capacity. - SwapSizePercent int32 `protobuf:"varint,2,opt,name=swap_size_percent,json=swapSizePercent,proto3,oneof"` -} - -func (*LinuxNodeConfig_SwapConfig_EphemeralLocalSsdProfile_SwapSizeGib) isLinuxNodeConfig_SwapConfig_EphemeralLocalSsdProfile_SwapSize() { -} - -func (*LinuxNodeConfig_SwapConfig_EphemeralLocalSsdProfile_SwapSizePercent) isLinuxNodeConfig_SwapConfig_EphemeralLocalSsdProfile_SwapSize() { -} - -// Provisions a new, separate local NVMe SSD exclusively for swap. -type LinuxNodeConfig_SwapConfig_DedicatedLocalSsdProfile struct { - state protoimpl.MessageState `protogen:"open.v1"` - // The number of physical local NVMe SSD disks to attach. - DiskCount int64 `protobuf:"varint,1,opt,name=disk_count,json=diskCount,proto3" json:"disk_count,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *LinuxNodeConfig_SwapConfig_DedicatedLocalSsdProfile) Reset() { - *x = LinuxNodeConfig_SwapConfig_DedicatedLocalSsdProfile{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[207] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *LinuxNodeConfig_SwapConfig_DedicatedLocalSsdProfile) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*LinuxNodeConfig_SwapConfig_DedicatedLocalSsdProfile) ProtoMessage() {} - -func (x *LinuxNodeConfig_SwapConfig_DedicatedLocalSsdProfile) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[207] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use LinuxNodeConfig_SwapConfig_DedicatedLocalSsdProfile.ProtoReflect.Descriptor instead. -func (*LinuxNodeConfig_SwapConfig_DedicatedLocalSsdProfile) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{0, 1, 3} -} - -func (x *LinuxNodeConfig_SwapConfig_DedicatedLocalSsdProfile) GetDiskCount() int64 { - if x != nil { - return x.DiskCount - } - return 0 -} - -// Configuration of all network bandwidth tiers -type NodeNetworkConfig_NetworkPerformanceConfig struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Specifies the total network bandwidth tier for the NodePool. - TotalEgressBandwidthTier *NodeNetworkConfig_NetworkPerformanceConfig_Tier `protobuf:"varint,1,opt,name=total_egress_bandwidth_tier,json=totalEgressBandwidthTier,proto3,enum=google.container.v1.NodeNetworkConfig_NetworkPerformanceConfig_Tier,oneof" json:"total_egress_bandwidth_tier,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *NodeNetworkConfig_NetworkPerformanceConfig) Reset() { - *x = NodeNetworkConfig_NetworkPerformanceConfig{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[211] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *NodeNetworkConfig_NetworkPerformanceConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*NodeNetworkConfig_NetworkPerformanceConfig) ProtoMessage() {} - -func (x *NodeNetworkConfig_NetworkPerformanceConfig) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[211] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use NodeNetworkConfig_NetworkPerformanceConfig.ProtoReflect.Descriptor instead. -func (*NodeNetworkConfig_NetworkPerformanceConfig) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{10, 0} -} - -func (x *NodeNetworkConfig_NetworkPerformanceConfig) GetTotalEgressBandwidthTier() NodeNetworkConfig_NetworkPerformanceConfig_Tier { - if x != nil && x.TotalEgressBandwidthTier != nil { - return *x.TotalEgressBandwidthTier - } - return NodeNetworkConfig_NetworkPerformanceConfig_TIER_UNSPECIFIED -} - -// Specifies the NodeAffinity key, values, and affinity operator according to -// [shared sole tenant node group -// affinities](https://cloud.google.com/compute/docs/nodes/sole-tenant-nodes#node_affinity_and_anti-affinity). -type SoleTenantConfig_NodeAffinity struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Key for NodeAffinity. - Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` - // Operator for NodeAffinity. - Operator SoleTenantConfig_NodeAffinity_Operator `protobuf:"varint,2,opt,name=operator,proto3,enum=google.container.v1.SoleTenantConfig_NodeAffinity_Operator" json:"operator,omitempty"` - // Values for NodeAffinity. - Values []string `protobuf:"bytes,3,rep,name=values,proto3" json:"values,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *SoleTenantConfig_NodeAffinity) Reset() { - *x = SoleTenantConfig_NodeAffinity{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[212] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *SoleTenantConfig_NodeAffinity) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SoleTenantConfig_NodeAffinity) ProtoMessage() {} - -func (x *SoleTenantConfig_NodeAffinity) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[212] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SoleTenantConfig_NodeAffinity.ProtoReflect.Descriptor instead. -func (*SoleTenantConfig_NodeAffinity) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{17, 0} -} - -func (x *SoleTenantConfig_NodeAffinity) GetKey() string { - if x != nil { - return x.Key - } - return "" -} - -func (x *SoleTenantConfig_NodeAffinity) GetOperator() SoleTenantConfig_NodeAffinity_Operator { - if x != nil { - return x.Operator - } - return SoleTenantConfig_NodeAffinity_OPERATOR_UNSPECIFIED -} - -func (x *SoleTenantConfig_NodeAffinity) GetValues() []string { - if x != nil { - return x.Values - } - return nil -} - -// PrivateRegistryAccessConfig contains access configuration for -// private container registries. -type ContainerdConfig_PrivateRegistryAccessConfig struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Private registry access is enabled. - Enabled bool `protobuf:"varint,1,opt,name=enabled,proto3" json:"enabled,omitempty"` - // Private registry access configuration. - CertificateAuthorityDomainConfig []*ContainerdConfig_PrivateRegistryAccessConfig_CertificateAuthorityDomainConfig `protobuf:"bytes,2,rep,name=certificate_authority_domain_config,json=certificateAuthorityDomainConfig,proto3" json:"certificate_authority_domain_config,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ContainerdConfig_PrivateRegistryAccessConfig) Reset() { - *x = ContainerdConfig_PrivateRegistryAccessConfig{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[213] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ContainerdConfig_PrivateRegistryAccessConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ContainerdConfig_PrivateRegistryAccessConfig) ProtoMessage() {} - -func (x *ContainerdConfig_PrivateRegistryAccessConfig) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[213] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ContainerdConfig_PrivateRegistryAccessConfig.ProtoReflect.Descriptor instead. -func (*ContainerdConfig_PrivateRegistryAccessConfig) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{18, 0} -} - -func (x *ContainerdConfig_PrivateRegistryAccessConfig) GetEnabled() bool { - if x != nil { - return x.Enabled - } - return false -} - -func (x *ContainerdConfig_PrivateRegistryAccessConfig) GetCertificateAuthorityDomainConfig() []*ContainerdConfig_PrivateRegistryAccessConfig_CertificateAuthorityDomainConfig { - if x != nil { - return x.CertificateAuthorityDomainConfig - } - return nil -} - -// Defines writable cgroups configuration. -type ContainerdConfig_WritableCgroups struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Optional. Whether writable cgroups is enabled. - Enabled bool `protobuf:"varint,1,opt,name=enabled,proto3" json:"enabled,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ContainerdConfig_WritableCgroups) Reset() { - *x = ContainerdConfig_WritableCgroups{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[214] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ContainerdConfig_WritableCgroups) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ContainerdConfig_WritableCgroups) ProtoMessage() {} - -func (x *ContainerdConfig_WritableCgroups) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[214] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ContainerdConfig_WritableCgroups.ProtoReflect.Descriptor instead. -func (*ContainerdConfig_WritableCgroups) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{18, 1} -} - -func (x *ContainerdConfig_WritableCgroups) GetEnabled() bool { - if x != nil { - return x.Enabled - } - return false -} - -// RegistryHostConfig configures the top-level structure for a single -// containerd registry server's configuration, which represents one hosts.toml -// file on the node. It will override the same fqdns in -// PrivateRegistryAccessConfig. -type ContainerdConfig_RegistryHostConfig struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Defines the host name of the registry server, which will be used to - // create configuration file as /etc/containerd/hosts.d//hosts.toml. - // It supports fully qualified domain names (FQDN) and IP addresses: - // Specifying port is supported. - // Wildcards are NOT supported. - // Examples: - // - my.customdomain.com - // - 10.0.1.2:5000 - Server string `protobuf:"bytes,1,opt,name=server,proto3" json:"server,omitempty"` - // HostConfig configures a list of host-specific configurations for the - // server. - // Each server can have at most 10 host configurations. - Hosts []*ContainerdConfig_RegistryHostConfig_HostConfig `protobuf:"bytes,2,rep,name=hosts,proto3" json:"hosts,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ContainerdConfig_RegistryHostConfig) Reset() { - *x = ContainerdConfig_RegistryHostConfig{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[215] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ContainerdConfig_RegistryHostConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ContainerdConfig_RegistryHostConfig) ProtoMessage() {} - -func (x *ContainerdConfig_RegistryHostConfig) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[215] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ContainerdConfig_RegistryHostConfig.ProtoReflect.Descriptor instead. -func (*ContainerdConfig_RegistryHostConfig) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{18, 2} -} - -func (x *ContainerdConfig_RegistryHostConfig) GetServer() string { - if x != nil { - return x.Server - } - return "" -} - -func (x *ContainerdConfig_RegistryHostConfig) GetHosts() []*ContainerdConfig_RegistryHostConfig_HostConfig { - if x != nil { - return x.Hosts - } - return nil -} - -// CertificateAuthorityDomainConfig configures one or more fully qualified -// domain names (FQDN) to a specific certificate. -type ContainerdConfig_PrivateRegistryAccessConfig_CertificateAuthorityDomainConfig struct { - state protoimpl.MessageState `protogen:"open.v1"` - // List of fully qualified domain names (FQDN). - // Specifying port is supported. - // Wildcards are NOT supported. - // Examples: - // - my.customdomain.com - // - 10.0.1.2:5000 - Fqdns []string `protobuf:"bytes,1,rep,name=fqdns,proto3" json:"fqdns,omitempty"` - // Certificate access config. The following are supported: - // - GCPSecretManagerCertificateConfig - // - // Types that are valid to be assigned to CertificateConfig: - // - // *ContainerdConfig_PrivateRegistryAccessConfig_CertificateAuthorityDomainConfig_GcpSecretManagerCertificateConfig - CertificateConfig isContainerdConfig_PrivateRegistryAccessConfig_CertificateAuthorityDomainConfig_CertificateConfig `protobuf_oneof:"certificate_config"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ContainerdConfig_PrivateRegistryAccessConfig_CertificateAuthorityDomainConfig) Reset() { - *x = ContainerdConfig_PrivateRegistryAccessConfig_CertificateAuthorityDomainConfig{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[216] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ContainerdConfig_PrivateRegistryAccessConfig_CertificateAuthorityDomainConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ContainerdConfig_PrivateRegistryAccessConfig_CertificateAuthorityDomainConfig) ProtoMessage() { -} - -func (x *ContainerdConfig_PrivateRegistryAccessConfig_CertificateAuthorityDomainConfig) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[216] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ContainerdConfig_PrivateRegistryAccessConfig_CertificateAuthorityDomainConfig.ProtoReflect.Descriptor instead. -func (*ContainerdConfig_PrivateRegistryAccessConfig_CertificateAuthorityDomainConfig) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{18, 0, 0} -} - -func (x *ContainerdConfig_PrivateRegistryAccessConfig_CertificateAuthorityDomainConfig) GetFqdns() []string { - if x != nil { - return x.Fqdns - } - return nil -} - -func (x *ContainerdConfig_PrivateRegistryAccessConfig_CertificateAuthorityDomainConfig) GetCertificateConfig() isContainerdConfig_PrivateRegistryAccessConfig_CertificateAuthorityDomainConfig_CertificateConfig { - if x != nil { - return x.CertificateConfig - } - return nil -} - -func (x *ContainerdConfig_PrivateRegistryAccessConfig_CertificateAuthorityDomainConfig) GetGcpSecretManagerCertificateConfig() *ContainerdConfig_PrivateRegistryAccessConfig_CertificateAuthorityDomainConfig_GCPSecretManagerCertificateConfig { - if x != nil { - if x, ok := x.CertificateConfig.(*ContainerdConfig_PrivateRegistryAccessConfig_CertificateAuthorityDomainConfig_GcpSecretManagerCertificateConfig); ok { - return x.GcpSecretManagerCertificateConfig - } - } - return nil -} - -type isContainerdConfig_PrivateRegistryAccessConfig_CertificateAuthorityDomainConfig_CertificateConfig interface { - isContainerdConfig_PrivateRegistryAccessConfig_CertificateAuthorityDomainConfig_CertificateConfig() -} - -type ContainerdConfig_PrivateRegistryAccessConfig_CertificateAuthorityDomainConfig_GcpSecretManagerCertificateConfig struct { - // Secret Manager certificate configuration. - GcpSecretManagerCertificateConfig *ContainerdConfig_PrivateRegistryAccessConfig_CertificateAuthorityDomainConfig_GCPSecretManagerCertificateConfig `protobuf:"bytes,2,opt,name=gcp_secret_manager_certificate_config,json=gcpSecretManagerCertificateConfig,proto3,oneof"` -} - -func (*ContainerdConfig_PrivateRegistryAccessConfig_CertificateAuthorityDomainConfig_GcpSecretManagerCertificateConfig) isContainerdConfig_PrivateRegistryAccessConfig_CertificateAuthorityDomainConfig_CertificateConfig() { -} - -// GCPSecretManagerCertificateConfig configures a secret from -// [Secret Manager](https://cloud.google.com/secret-manager). -type ContainerdConfig_PrivateRegistryAccessConfig_CertificateAuthorityDomainConfig_GCPSecretManagerCertificateConfig struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Secret URI, in the form - // "projects/$PROJECT_ID/secrets/$SECRET_NAME/versions/$VERSION". - // Version can be fixed (e.g. "2") or "latest" - SecretUri string `protobuf:"bytes,1,opt,name=secret_uri,json=secretUri,proto3" json:"secret_uri,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ContainerdConfig_PrivateRegistryAccessConfig_CertificateAuthorityDomainConfig_GCPSecretManagerCertificateConfig) Reset() { - *x = ContainerdConfig_PrivateRegistryAccessConfig_CertificateAuthorityDomainConfig_GCPSecretManagerCertificateConfig{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[217] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ContainerdConfig_PrivateRegistryAccessConfig_CertificateAuthorityDomainConfig_GCPSecretManagerCertificateConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ContainerdConfig_PrivateRegistryAccessConfig_CertificateAuthorityDomainConfig_GCPSecretManagerCertificateConfig) ProtoMessage() { -} - -func (x *ContainerdConfig_PrivateRegistryAccessConfig_CertificateAuthorityDomainConfig_GCPSecretManagerCertificateConfig) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[217] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ContainerdConfig_PrivateRegistryAccessConfig_CertificateAuthorityDomainConfig_GCPSecretManagerCertificateConfig.ProtoReflect.Descriptor instead. -func (*ContainerdConfig_PrivateRegistryAccessConfig_CertificateAuthorityDomainConfig_GCPSecretManagerCertificateConfig) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{18, 0, 0, 0} -} - -func (x *ContainerdConfig_PrivateRegistryAccessConfig_CertificateAuthorityDomainConfig_GCPSecretManagerCertificateConfig) GetSecretUri() string { - if x != nil { - return x.SecretUri - } - return "" -} - -// CertificateConfig configures certificate for the registry. -type ContainerdConfig_RegistryHostConfig_CertificateConfig struct { - state protoimpl.MessageState `protogen:"open.v1"` - // One of the methods to configure the certificate. - // - // Types that are valid to be assigned to Certificate: - // - // *ContainerdConfig_RegistryHostConfig_CertificateConfig_GcpSecretManagerSecretUri - Certificate isContainerdConfig_RegistryHostConfig_CertificateConfig_Certificate `protobuf_oneof:"certificate"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ContainerdConfig_RegistryHostConfig_CertificateConfig) Reset() { - *x = ContainerdConfig_RegistryHostConfig_CertificateConfig{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[218] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ContainerdConfig_RegistryHostConfig_CertificateConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ContainerdConfig_RegistryHostConfig_CertificateConfig) ProtoMessage() {} - -func (x *ContainerdConfig_RegistryHostConfig_CertificateConfig) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[218] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ContainerdConfig_RegistryHostConfig_CertificateConfig.ProtoReflect.Descriptor instead. -func (*ContainerdConfig_RegistryHostConfig_CertificateConfig) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{18, 2, 0} -} - -func (x *ContainerdConfig_RegistryHostConfig_CertificateConfig) GetCertificate() isContainerdConfig_RegistryHostConfig_CertificateConfig_Certificate { - if x != nil { - return x.Certificate - } - return nil -} - -func (x *ContainerdConfig_RegistryHostConfig_CertificateConfig) GetGcpSecretManagerSecretUri() string { - if x != nil { - if x, ok := x.Certificate.(*ContainerdConfig_RegistryHostConfig_CertificateConfig_GcpSecretManagerSecretUri); ok { - return x.GcpSecretManagerSecretUri - } - } - return "" -} - -type isContainerdConfig_RegistryHostConfig_CertificateConfig_Certificate interface { - isContainerdConfig_RegistryHostConfig_CertificateConfig_Certificate() -} - -type ContainerdConfig_RegistryHostConfig_CertificateConfig_GcpSecretManagerSecretUri struct { - // The URI configures a secret from - // [Secret Manager](https://cloud.google.com/secret-manager) - // in the format - // "projects/$PROJECT_ID/secrets/$SECRET_NAME/versions/$VERSION" for - // global secret or - // "projects/$PROJECT_ID/locations/$REGION/secrets/$SECRET_NAME/versions/$VERSION" - // for regional secret. Version can be fixed (e.g. "2") or "latest" - GcpSecretManagerSecretUri string `protobuf:"bytes,1,opt,name=gcp_secret_manager_secret_uri,json=gcpSecretManagerSecretUri,proto3,oneof"` -} - -func (*ContainerdConfig_RegistryHostConfig_CertificateConfig_GcpSecretManagerSecretUri) isContainerdConfig_RegistryHostConfig_CertificateConfig_Certificate() { -} - -// CertificateConfigPair configures pairs of certificates, which is used for -// client certificate and key pairs under a registry. -type ContainerdConfig_RegistryHostConfig_CertificateConfigPair struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Cert configures the client certificate. - Cert *ContainerdConfig_RegistryHostConfig_CertificateConfig `protobuf:"bytes,1,opt,name=cert,proto3" json:"cert,omitempty"` - // Key configures the client private key. Optional. - Key *ContainerdConfig_RegistryHostConfig_CertificateConfig `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ContainerdConfig_RegistryHostConfig_CertificateConfigPair) Reset() { - *x = ContainerdConfig_RegistryHostConfig_CertificateConfigPair{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[219] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ContainerdConfig_RegistryHostConfig_CertificateConfigPair) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ContainerdConfig_RegistryHostConfig_CertificateConfigPair) ProtoMessage() {} - -func (x *ContainerdConfig_RegistryHostConfig_CertificateConfigPair) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[219] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ContainerdConfig_RegistryHostConfig_CertificateConfigPair.ProtoReflect.Descriptor instead. -func (*ContainerdConfig_RegistryHostConfig_CertificateConfigPair) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{18, 2, 1} -} - -func (x *ContainerdConfig_RegistryHostConfig_CertificateConfigPair) GetCert() *ContainerdConfig_RegistryHostConfig_CertificateConfig { - if x != nil { - return x.Cert - } - return nil -} - -func (x *ContainerdConfig_RegistryHostConfig_CertificateConfigPair) GetKey() *ContainerdConfig_RegistryHostConfig_CertificateConfig { - if x != nil { - return x.Key - } - return nil -} - -// RegistryHeader configures headers for the registry. -type ContainerdConfig_RegistryHostConfig_RegistryHeader struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Key configures the header key. - Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` - // Value configures the header value. - Value []string `protobuf:"bytes,2,rep,name=value,proto3" json:"value,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ContainerdConfig_RegistryHostConfig_RegistryHeader) Reset() { - *x = ContainerdConfig_RegistryHostConfig_RegistryHeader{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[220] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ContainerdConfig_RegistryHostConfig_RegistryHeader) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ContainerdConfig_RegistryHostConfig_RegistryHeader) ProtoMessage() {} - -func (x *ContainerdConfig_RegistryHostConfig_RegistryHeader) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[220] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ContainerdConfig_RegistryHostConfig_RegistryHeader.ProtoReflect.Descriptor instead. -func (*ContainerdConfig_RegistryHostConfig_RegistryHeader) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{18, 2, 2} -} - -func (x *ContainerdConfig_RegistryHostConfig_RegistryHeader) GetKey() string { - if x != nil { - return x.Key - } - return "" -} - -func (x *ContainerdConfig_RegistryHostConfig_RegistryHeader) GetValue() []string { - if x != nil { - return x.Value - } - return nil -} - -// HostConfig configures the registry host under a given Server. -type ContainerdConfig_RegistryHostConfig_HostConfig struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Host configures the registry host/mirror. - // It supports fully qualified domain names (FQDN) and IP addresses: - // Specifying port is supported. - // Wildcards are NOT supported. - // Examples: - // - my.customdomain.com - // - 10.0.1.2:5000 - Host string `protobuf:"bytes,1,opt,name=host,proto3" json:"host,omitempty"` - // Capabilities represent the capabilities of the registry host, - // specifying what operations a host is capable of performing. - // If not set, containerd enables all capabilities by default. - Capabilities []ContainerdConfig_RegistryHostConfig_HostCapability `protobuf:"varint,2,rep,packed,name=capabilities,proto3,enum=google.container.v1.ContainerdConfig_RegistryHostConfig_HostCapability" json:"capabilities,omitempty"` - // OverridePath is used to indicate the host's API root endpoint is - // defined in the URL path rather than by the API specification. This may - // be used with non-compliant OCI registries which are missing the /v2 - // prefix. - // If not set, containerd sets default false. - OverridePath bool `protobuf:"varint,3,opt,name=override_path,json=overridePath,proto3" json:"override_path,omitempty"` - // Header configures the registry host headers. - Header []*ContainerdConfig_RegistryHostConfig_RegistryHeader `protobuf:"bytes,4,rep,name=header,proto3" json:"header,omitempty"` - // CA configures the registry host certificate. - Ca []*ContainerdConfig_RegistryHostConfig_CertificateConfig `protobuf:"bytes,5,rep,name=ca,proto3" json:"ca,omitempty"` - // Client configures the registry host client certificate and key. - Client []*ContainerdConfig_RegistryHostConfig_CertificateConfigPair `protobuf:"bytes,6,rep,name=client,proto3" json:"client,omitempty"` - // Specifies the maximum duration allowed for a connection attempt to - // complete. A shorter timeout helps reduce delays when falling back to - // the original registry if the mirror is unreachable. - // Maximum allowed value is 180s. If not set, containerd sets default 30s. - // The value should be a decimal number of seconds with an `s` suffix. - DialTimeout *durationpb.Duration `protobuf:"bytes,7,opt,name=dial_timeout,json=dialTimeout,proto3" json:"dial_timeout,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ContainerdConfig_RegistryHostConfig_HostConfig) Reset() { - *x = ContainerdConfig_RegistryHostConfig_HostConfig{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[221] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ContainerdConfig_RegistryHostConfig_HostConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ContainerdConfig_RegistryHostConfig_HostConfig) ProtoMessage() {} - -func (x *ContainerdConfig_RegistryHostConfig_HostConfig) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[221] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ContainerdConfig_RegistryHostConfig_HostConfig.ProtoReflect.Descriptor instead. -func (*ContainerdConfig_RegistryHostConfig_HostConfig) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{18, 2, 3} -} - -func (x *ContainerdConfig_RegistryHostConfig_HostConfig) GetHost() string { - if x != nil { - return x.Host - } - return "" -} - -func (x *ContainerdConfig_RegistryHostConfig_HostConfig) GetCapabilities() []ContainerdConfig_RegistryHostConfig_HostCapability { - if x != nil { - return x.Capabilities - } - return nil -} - -func (x *ContainerdConfig_RegistryHostConfig_HostConfig) GetOverridePath() bool { - if x != nil { - return x.OverridePath - } - return false -} - -func (x *ContainerdConfig_RegistryHostConfig_HostConfig) GetHeader() []*ContainerdConfig_RegistryHostConfig_RegistryHeader { - if x != nil { - return x.Header - } - return nil -} - -func (x *ContainerdConfig_RegistryHostConfig_HostConfig) GetCa() []*ContainerdConfig_RegistryHostConfig_CertificateConfig { - if x != nil { - return x.Ca - } - return nil -} - -func (x *ContainerdConfig_RegistryHostConfig_HostConfig) GetClient() []*ContainerdConfig_RegistryHostConfig_CertificateConfigPair { - if x != nil { - return x.Client - } - return nil -} - -func (x *ContainerdConfig_RegistryHostConfig_HostConfig) GetDialTimeout() *durationpb.Duration { - if x != nil { - return x.DialTimeout - } - return nil -} - -// CidrBlock contains an optional name and one CIDR block. -type MasterAuthorizedNetworksConfig_CidrBlock struct { - state protoimpl.MessageState `protogen:"open.v1"` - // display_name is an optional field for users to identify CIDR blocks. - DisplayName string `protobuf:"bytes,1,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"` - // cidr_block must be specified in CIDR notation. - CidrBlock string `protobuf:"bytes,2,opt,name=cidr_block,json=cidrBlock,proto3" json:"cidr_block,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *MasterAuthorizedNetworksConfig_CidrBlock) Reset() { - *x = MasterAuthorizedNetworksConfig_CidrBlock{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[224] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *MasterAuthorizedNetworksConfig_CidrBlock) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MasterAuthorizedNetworksConfig_CidrBlock) ProtoMessage() {} - -func (x *MasterAuthorizedNetworksConfig_CidrBlock) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[224] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use MasterAuthorizedNetworksConfig_CidrBlock.ProtoReflect.Descriptor instead. -func (*MasterAuthorizedNetworksConfig_CidrBlock) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{47, 0} -} - -func (x *MasterAuthorizedNetworksConfig_CidrBlock) GetDisplayName() string { - if x != nil { - return x.DisplayName - } - return "" -} - -func (x *MasterAuthorizedNetworksConfig_CidrBlock) GetCidrBlock() string { - if x != nil { - return x.CidrBlock - } - return "" -} - -// Defines the details of a compliance standard. -type CompliancePostureConfig_ComplianceStandard struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Name of the compliance standard. - Standard *string `protobuf:"bytes,1,opt,name=standard,proto3,oneof" json:"standard,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *CompliancePostureConfig_ComplianceStandard) Reset() { - *x = CompliancePostureConfig_ComplianceStandard{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[226] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *CompliancePostureConfig_ComplianceStandard) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CompliancePostureConfig_ComplianceStandard) ProtoMessage() {} - -func (x *CompliancePostureConfig_ComplianceStandard) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[226] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CompliancePostureConfig_ComplianceStandard.ProtoReflect.Descriptor instead. -func (*CompliancePostureConfig_ComplianceStandard) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{57, 0} -} - -func (x *CompliancePostureConfig_ComplianceStandard) GetStandard() string { - if x != nil && x.Standard != nil { - return *x.Standard - } - return "" -} - -// Progress metric is (string, int|float|string) pair. -type OperationProgress_Metric struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Required. Metric name, e.g., "nodes total", "percent done". - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // Strictly one of the values is required. - // - // Types that are valid to be assigned to Value: - // - // *OperationProgress_Metric_IntValue - // *OperationProgress_Metric_DoubleValue - // *OperationProgress_Metric_StringValue - Value isOperationProgress_Metric_Value `protobuf_oneof:"value"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *OperationProgress_Metric) Reset() { - *x = OperationProgress_Metric{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[227] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *OperationProgress_Metric) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*OperationProgress_Metric) ProtoMessage() {} - -func (x *OperationProgress_Metric) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[227] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use OperationProgress_Metric.ProtoReflect.Descriptor instead. -func (*OperationProgress_Metric) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{71, 0} -} - -func (x *OperationProgress_Metric) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *OperationProgress_Metric) GetValue() isOperationProgress_Metric_Value { - if x != nil { - return x.Value - } - return nil -} - -func (x *OperationProgress_Metric) GetIntValue() int64 { - if x != nil { - if x, ok := x.Value.(*OperationProgress_Metric_IntValue); ok { - return x.IntValue - } - } - return 0 -} - -func (x *OperationProgress_Metric) GetDoubleValue() float64 { - if x != nil { - if x, ok := x.Value.(*OperationProgress_Metric_DoubleValue); ok { - return x.DoubleValue - } - } - return 0 -} - -func (x *OperationProgress_Metric) GetStringValue() string { - if x != nil { - if x, ok := x.Value.(*OperationProgress_Metric_StringValue); ok { - return x.StringValue - } - } - return "" -} - -type isOperationProgress_Metric_Value interface { - isOperationProgress_Metric_Value() -} - -type OperationProgress_Metric_IntValue struct { - // For metrics with integer value. - IntValue int64 `protobuf:"varint,2,opt,name=int_value,json=intValue,proto3,oneof"` -} - -type OperationProgress_Metric_DoubleValue struct { - // For metrics with floating point value. - DoubleValue float64 `protobuf:"fixed64,3,opt,name=double_value,json=doubleValue,proto3,oneof"` -} - -type OperationProgress_Metric_StringValue struct { - // For metrics with custom values (ratios, visual progress, etc.). - StringValue string `protobuf:"bytes,4,opt,name=string_value,json=stringValue,proto3,oneof"` -} - -func (*OperationProgress_Metric_IntValue) isOperationProgress_Metric_Value() {} - -func (*OperationProgress_Metric_DoubleValue) isOperationProgress_Metric_Value() {} - -func (*OperationProgress_Metric_StringValue) isOperationProgress_Metric_Value() {} - -// ReleaseChannelConfig exposes configuration for a release channel. -type ServerConfig_ReleaseChannelConfig struct { - state protoimpl.MessageState `protogen:"open.v1"` - // The release channel this configuration applies to. - Channel ReleaseChannel_Channel `protobuf:"varint,1,opt,name=channel,proto3,enum=google.container.v1.ReleaseChannel_Channel" json:"channel,omitempty"` - // The default version for newly created clusters on the channel. - DefaultVersion string `protobuf:"bytes,2,opt,name=default_version,json=defaultVersion,proto3" json:"default_version,omitempty"` - // List of valid versions for the channel. - ValidVersions []string `protobuf:"bytes,4,rep,name=valid_versions,json=validVersions,proto3" json:"valid_versions,omitempty"` - // The auto upgrade target version for clusters on the channel. - UpgradeTargetVersion string `protobuf:"bytes,5,opt,name=upgrade_target_version,json=upgradeTargetVersion,proto3" json:"upgrade_target_version,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ServerConfig_ReleaseChannelConfig) Reset() { - *x = ServerConfig_ReleaseChannelConfig{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[228] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ServerConfig_ReleaseChannelConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ServerConfig_ReleaseChannelConfig) ProtoMessage() {} - -func (x *ServerConfig_ReleaseChannelConfig) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[228] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ServerConfig_ReleaseChannelConfig.ProtoReflect.Descriptor instead. -func (*ServerConfig_ReleaseChannelConfig) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{91, 0} -} - -func (x *ServerConfig_ReleaseChannelConfig) GetChannel() ReleaseChannel_Channel { - if x != nil { - return x.Channel - } - return ReleaseChannel_UNSPECIFIED -} - -func (x *ServerConfig_ReleaseChannelConfig) GetDefaultVersion() string { - if x != nil { - return x.DefaultVersion - } - return "" -} - -func (x *ServerConfig_ReleaseChannelConfig) GetValidVersions() []string { - if x != nil { - return x.ValidVersions - } - return nil -} - -func (x *ServerConfig_ReleaseChannelConfig) GetUpgradeTargetVersion() string { - if x != nil { - return x.UpgradeTargetVersion - } - return "" -} - -// Standard rollout policy is the default policy for blue-green. -type BlueGreenSettings_StandardRolloutPolicy struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Blue pool size to drain in a batch. - // - // Types that are valid to be assigned to UpdateBatchSize: - // - // *BlueGreenSettings_StandardRolloutPolicy_BatchPercentage - // *BlueGreenSettings_StandardRolloutPolicy_BatchNodeCount - UpdateBatchSize isBlueGreenSettings_StandardRolloutPolicy_UpdateBatchSize `protobuf_oneof:"update_batch_size"` - // Soak time after each batch gets drained. Default to zero. - BatchSoakDuration *durationpb.Duration `protobuf:"bytes,3,opt,name=batch_soak_duration,json=batchSoakDuration,proto3,oneof" json:"batch_soak_duration,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *BlueGreenSettings_StandardRolloutPolicy) Reset() { - *x = BlueGreenSettings_StandardRolloutPolicy{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[229] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *BlueGreenSettings_StandardRolloutPolicy) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*BlueGreenSettings_StandardRolloutPolicy) ProtoMessage() {} - -func (x *BlueGreenSettings_StandardRolloutPolicy) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[229] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use BlueGreenSettings_StandardRolloutPolicy.ProtoReflect.Descriptor instead. -func (*BlueGreenSettings_StandardRolloutPolicy) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{96, 0} -} - -func (x *BlueGreenSettings_StandardRolloutPolicy) GetUpdateBatchSize() isBlueGreenSettings_StandardRolloutPolicy_UpdateBatchSize { - if x != nil { - return x.UpdateBatchSize - } - return nil -} - -func (x *BlueGreenSettings_StandardRolloutPolicy) GetBatchPercentage() float32 { - if x != nil { - if x, ok := x.UpdateBatchSize.(*BlueGreenSettings_StandardRolloutPolicy_BatchPercentage); ok { - return x.BatchPercentage - } - } - return 0 -} - -func (x *BlueGreenSettings_StandardRolloutPolicy) GetBatchNodeCount() int32 { - if x != nil { - if x, ok := x.UpdateBatchSize.(*BlueGreenSettings_StandardRolloutPolicy_BatchNodeCount); ok { - return x.BatchNodeCount - } - } - return 0 -} - -func (x *BlueGreenSettings_StandardRolloutPolicy) GetBatchSoakDuration() *durationpb.Duration { - if x != nil { - return x.BatchSoakDuration - } - return nil -} - -type isBlueGreenSettings_StandardRolloutPolicy_UpdateBatchSize interface { - isBlueGreenSettings_StandardRolloutPolicy_UpdateBatchSize() -} - -type BlueGreenSettings_StandardRolloutPolicy_BatchPercentage struct { - // Percentage of the blue pool nodes to drain in a batch. - // The range of this field should be (0.0, 1.0]. - BatchPercentage float32 `protobuf:"fixed32,1,opt,name=batch_percentage,json=batchPercentage,proto3,oneof"` -} - -type BlueGreenSettings_StandardRolloutPolicy_BatchNodeCount struct { - // Number of blue nodes to drain in a batch. - BatchNodeCount int32 `protobuf:"varint,2,opt,name=batch_node_count,json=batchNodeCount,proto3,oneof"` -} - -func (*BlueGreenSettings_StandardRolloutPolicy_BatchPercentage) isBlueGreenSettings_StandardRolloutPolicy_UpdateBatchSize() { -} - -func (*BlueGreenSettings_StandardRolloutPolicy_BatchNodeCount) isBlueGreenSettings_StandardRolloutPolicy_UpdateBatchSize() { -} - -// Autoscaled rollout policy utilizes the cluster autoscaler during -// blue-green upgrade to scale both the blue and green pools. -type BlueGreenSettings_AutoscaledRolloutPolicy struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Optional. Time to wait after cordoning the blue pool before draining the - // nodes. Defaults to 3 days. The value can be set between 0 and 7 days, - // inclusive. - WaitForDrainDuration *durationpb.Duration `protobuf:"bytes,1,opt,name=wait_for_drain_duration,json=waitForDrainDuration,proto3" json:"wait_for_drain_duration,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *BlueGreenSettings_AutoscaledRolloutPolicy) Reset() { - *x = BlueGreenSettings_AutoscaledRolloutPolicy{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[230] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *BlueGreenSettings_AutoscaledRolloutPolicy) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*BlueGreenSettings_AutoscaledRolloutPolicy) ProtoMessage() {} - -func (x *BlueGreenSettings_AutoscaledRolloutPolicy) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[230] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use BlueGreenSettings_AutoscaledRolloutPolicy.ProtoReflect.Descriptor instead. -func (*BlueGreenSettings_AutoscaledRolloutPolicy) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{96, 1} -} - -func (x *BlueGreenSettings_AutoscaledRolloutPolicy) GetWaitForDrainDuration() *durationpb.Duration { - if x != nil { - return x.WaitForDrainDuration - } - return nil -} - -// These upgrade settings control the level of parallelism and the level of -// disruption caused by an upgrade. -// -// maxUnavailable controls the number of nodes that can be simultaneously -// unavailable. -// -// maxSurge controls the number of additional nodes that can be added to the -// node pool temporarily for the time of the upgrade to increase the number of -// available nodes. -// -// (maxUnavailable + maxSurge) determines the level of parallelism (how many -// nodes are being upgraded at the same time). -// -// Note: upgrades inevitably introduce some disruption since workloads need to -// be moved from old nodes to new, upgraded ones. Even if maxUnavailable=0, -// this holds true. (Disruption stays within the limits of -// PodDisruptionBudget, if it is configured.) -// -// Consider a hypothetical node pool with 5 nodes having maxSurge=2, -// maxUnavailable=1. This means the upgrade process upgrades 3 nodes -// simultaneously. It creates 2 additional (upgraded) nodes, then it brings -// down 3 old (not yet upgraded) nodes at the same time. This ensures that -// there are always at least 4 nodes available. -// -// These upgrade settings configure the upgrade strategy for the node pool. -// Use strategy to switch between the strategies applied to the node pool. -// -// If the strategy is ROLLING, use max_surge and max_unavailable to control -// the level of parallelism and the level of disruption caused by upgrade. -// 1. maxSurge controls the number of additional nodes that can be added to -// the node pool temporarily for the time of the upgrade to increase the -// number of available nodes. -// 2. maxUnavailable controls the number of nodes that can be simultaneously -// unavailable. -// 3. (maxUnavailable + maxSurge) determines the level of parallelism (how -// many nodes are being upgraded at the same time). -// -// If the strategy is BLUE_GREEN, use blue_green_settings to configure the -// blue-green upgrade related settings. -// 1. standard_rollout_policy is the default policy. The policy is used to -// control the way blue pool gets drained. The draining is executed in the -// batch mode. The batch size could be specified as either percentage of the -// node pool size or the number of nodes. batch_soak_duration is the soak -// time after each batch gets drained. -// 2. node_pool_soak_duration is the soak time after all blue nodes are -// drained. After this period, the blue pool nodes will be deleted. -type NodePool_UpgradeSettings struct { - state protoimpl.MessageState `protogen:"open.v1"` - // The maximum number of nodes that can be created beyond the current size - // of the node pool during the upgrade process. - MaxSurge int32 `protobuf:"varint,1,opt,name=max_surge,json=maxSurge,proto3" json:"max_surge,omitempty"` - // The maximum number of nodes that can be simultaneously unavailable during - // the upgrade process. A node is considered available if its status is - // Ready. - MaxUnavailable int32 `protobuf:"varint,2,opt,name=max_unavailable,json=maxUnavailable,proto3" json:"max_unavailable,omitempty"` - // Update strategy of the node pool. - Strategy *NodePoolUpdateStrategy `protobuf:"varint,3,opt,name=strategy,proto3,enum=google.container.v1.NodePoolUpdateStrategy,oneof" json:"strategy,omitempty"` - // Settings for blue-green upgrade strategy. - BlueGreenSettings *BlueGreenSettings `protobuf:"bytes,4,opt,name=blue_green_settings,json=blueGreenSettings,proto3,oneof" json:"blue_green_settings,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *NodePool_UpgradeSettings) Reset() { - *x = NodePool_UpgradeSettings{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[231] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *NodePool_UpgradeSettings) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*NodePool_UpgradeSettings) ProtoMessage() {} - -func (x *NodePool_UpgradeSettings) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[231] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use NodePool_UpgradeSettings.ProtoReflect.Descriptor instead. -func (*NodePool_UpgradeSettings) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{97, 0} -} - -func (x *NodePool_UpgradeSettings) GetMaxSurge() int32 { - if x != nil { - return x.MaxSurge - } - return 0 -} - -func (x *NodePool_UpgradeSettings) GetMaxUnavailable() int32 { - if x != nil { - return x.MaxUnavailable - } - return 0 -} - -func (x *NodePool_UpgradeSettings) GetStrategy() NodePoolUpdateStrategy { - if x != nil && x.Strategy != nil { - return *x.Strategy - } - return NodePoolUpdateStrategy_NODE_POOL_UPDATE_STRATEGY_UNSPECIFIED -} - -func (x *NodePool_UpgradeSettings) GetBlueGreenSettings() *BlueGreenSettings { - if x != nil { - return x.BlueGreenSettings - } - return nil -} - -// UpdateInfo contains resource (instance groups, etc), status and other -// intermediate information relevant to a node pool upgrade. -type NodePool_UpdateInfo struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Information of a blue-green upgrade. - BlueGreenInfo *NodePool_UpdateInfo_BlueGreenInfo `protobuf:"bytes,1,opt,name=blue_green_info,json=blueGreenInfo,proto3" json:"blue_green_info,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *NodePool_UpdateInfo) Reset() { - *x = NodePool_UpdateInfo{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[232] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *NodePool_UpdateInfo) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*NodePool_UpdateInfo) ProtoMessage() {} - -func (x *NodePool_UpdateInfo) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[232] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use NodePool_UpdateInfo.ProtoReflect.Descriptor instead. -func (*NodePool_UpdateInfo) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{97, 1} -} - -func (x *NodePool_UpdateInfo) GetBlueGreenInfo() *NodePool_UpdateInfo_BlueGreenInfo { - if x != nil { - return x.BlueGreenInfo - } - return nil -} - -// PlacementPolicy defines the placement policy used by the node pool. -type NodePool_PlacementPolicy struct { - state protoimpl.MessageState `protogen:"open.v1"` - // The type of placement. - Type NodePool_PlacementPolicy_Type `protobuf:"varint,1,opt,name=type,proto3,enum=google.container.v1.NodePool_PlacementPolicy_Type" json:"type,omitempty"` - // Optional. TPU placement topology for pod slice node pool. - // https://cloud.google.com/tpu/docs/types-topologies#tpu_topologies - TpuTopology string `protobuf:"bytes,2,opt,name=tpu_topology,json=tpuTopology,proto3" json:"tpu_topology,omitempty"` - // If set, refers to the name of a custom resource policy supplied by the - // user. The resource policy must be in the same project and region as the - // node pool. If not found, InvalidArgument error is returned. - PolicyName string `protobuf:"bytes,3,opt,name=policy_name,json=policyName,proto3" json:"policy_name,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *NodePool_PlacementPolicy) Reset() { - *x = NodePool_PlacementPolicy{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[233] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *NodePool_PlacementPolicy) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*NodePool_PlacementPolicy) ProtoMessage() {} - -func (x *NodePool_PlacementPolicy) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[233] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use NodePool_PlacementPolicy.ProtoReflect.Descriptor instead. -func (*NodePool_PlacementPolicy) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{97, 2} -} - -func (x *NodePool_PlacementPolicy) GetType() NodePool_PlacementPolicy_Type { - if x != nil { - return x.Type - } - return NodePool_PlacementPolicy_TYPE_UNSPECIFIED -} - -func (x *NodePool_PlacementPolicy) GetTpuTopology() string { - if x != nil { - return x.TpuTopology - } - return "" -} - -func (x *NodePool_PlacementPolicy) GetPolicyName() string { - if x != nil { - return x.PolicyName - } - return "" -} - -// QueuedProvisioning defines the queued provisioning used by the node pool. -type NodePool_QueuedProvisioning struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Denotes that this nodepool is QRM specific, meaning nodes can be only - // obtained through queuing via the Cluster Autoscaler ProvisioningRequest - // API. - Enabled bool `protobuf:"varint,1,opt,name=enabled,proto3" json:"enabled,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *NodePool_QueuedProvisioning) Reset() { - *x = NodePool_QueuedProvisioning{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[234] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *NodePool_QueuedProvisioning) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*NodePool_QueuedProvisioning) ProtoMessage() {} - -func (x *NodePool_QueuedProvisioning) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[234] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use NodePool_QueuedProvisioning.ProtoReflect.Descriptor instead. -func (*NodePool_QueuedProvisioning) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{97, 3} -} - -func (x *NodePool_QueuedProvisioning) GetEnabled() bool { - if x != nil { - return x.Enabled - } - return false -} - -// NodeDrainConfig contains the node drain related configurations for this -// nodepool. -type NodePool_NodeDrainConfig struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Whether to respect PDB during node pool deletion. - RespectPdbDuringNodePoolDeletion *bool `protobuf:"varint,3,opt,name=respect_pdb_during_node_pool_deletion,json=respectPdbDuringNodePoolDeletion,proto3,oneof" json:"respect_pdb_during_node_pool_deletion,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *NodePool_NodeDrainConfig) Reset() { - *x = NodePool_NodeDrainConfig{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[235] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *NodePool_NodeDrainConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*NodePool_NodeDrainConfig) ProtoMessage() {} - -func (x *NodePool_NodeDrainConfig) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[235] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use NodePool_NodeDrainConfig.ProtoReflect.Descriptor instead. -func (*NodePool_NodeDrainConfig) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{97, 4} -} - -func (x *NodePool_NodeDrainConfig) GetRespectPdbDuringNodePoolDeletion() bool { - if x != nil && x.RespectPdbDuringNodePoolDeletion != nil { - return *x.RespectPdbDuringNodePoolDeletion - } - return false -} - -// Information relevant to blue-green upgrade. -type NodePool_UpdateInfo_BlueGreenInfo struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Current blue-green upgrade phase. - Phase NodePool_UpdateInfo_BlueGreenInfo_Phase `protobuf:"varint,1,opt,name=phase,proto3,enum=google.container.v1.NodePool_UpdateInfo_BlueGreenInfo_Phase" json:"phase,omitempty"` - // The resource URLs of the [managed instance groups] - // (/compute/docs/instance-groups/creating-groups-of-managed-instances) - // associated with blue pool. - BlueInstanceGroupUrls []string `protobuf:"bytes,2,rep,name=blue_instance_group_urls,json=blueInstanceGroupUrls,proto3" json:"blue_instance_group_urls,omitempty"` - // The resource URLs of the [managed instance groups] - // (/compute/docs/instance-groups/creating-groups-of-managed-instances) - // associated with green pool. - GreenInstanceGroupUrls []string `protobuf:"bytes,3,rep,name=green_instance_group_urls,json=greenInstanceGroupUrls,proto3" json:"green_instance_group_urls,omitempty"` - // Time to start deleting blue pool to complete blue-green upgrade, - // in [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format. - BluePoolDeletionStartTime string `protobuf:"bytes,4,opt,name=blue_pool_deletion_start_time,json=bluePoolDeletionStartTime,proto3" json:"blue_pool_deletion_start_time,omitempty"` - // Version of green pool. - GreenPoolVersion string `protobuf:"bytes,5,opt,name=green_pool_version,json=greenPoolVersion,proto3" json:"green_pool_version,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *NodePool_UpdateInfo_BlueGreenInfo) Reset() { - *x = NodePool_UpdateInfo_BlueGreenInfo{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[236] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *NodePool_UpdateInfo_BlueGreenInfo) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*NodePool_UpdateInfo_BlueGreenInfo) ProtoMessage() {} - -func (x *NodePool_UpdateInfo_BlueGreenInfo) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[236] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use NodePool_UpdateInfo_BlueGreenInfo.ProtoReflect.Descriptor instead. -func (*NodePool_UpdateInfo_BlueGreenInfo) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{97, 1, 0} -} - -func (x *NodePool_UpdateInfo_BlueGreenInfo) GetPhase() NodePool_UpdateInfo_BlueGreenInfo_Phase { - if x != nil { - return x.Phase - } - return NodePool_UpdateInfo_BlueGreenInfo_PHASE_UNSPECIFIED -} - -func (x *NodePool_UpdateInfo_BlueGreenInfo) GetBlueInstanceGroupUrls() []string { - if x != nil { - return x.BlueInstanceGroupUrls - } - return nil -} - -func (x *NodePool_UpdateInfo_BlueGreenInfo) GetGreenInstanceGroupUrls() []string { - if x != nil { - return x.GreenInstanceGroupUrls - } - return nil -} - -func (x *NodePool_UpdateInfo_BlueGreenInfo) GetBluePoolDeletionStartTime() string { - if x != nil { - return x.BluePoolDeletionStartTime - } - return "" -} - -func (x *NodePool_UpdateInfo_BlueGreenInfo) GetGreenPoolVersion() string { - if x != nil { - return x.GreenPoolVersion - } - return "" -} - -// Configuration of network bandwidth tiers -type NetworkConfig_ClusterNetworkPerformanceConfig struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Specifies the total network bandwidth tier for NodePools in the cluster. - TotalEgressBandwidthTier *NetworkConfig_ClusterNetworkPerformanceConfig_Tier `protobuf:"varint,1,opt,name=total_egress_bandwidth_tier,json=totalEgressBandwidthTier,proto3,enum=google.container.v1.NetworkConfig_ClusterNetworkPerformanceConfig_Tier,oneof" json:"total_egress_bandwidth_tier,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *NetworkConfig_ClusterNetworkPerformanceConfig) Reset() { - *x = NetworkConfig_ClusterNetworkPerformanceConfig{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[239] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *NetworkConfig_ClusterNetworkPerformanceConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*NetworkConfig_ClusterNetworkPerformanceConfig) ProtoMessage() {} - -func (x *NetworkConfig_ClusterNetworkPerformanceConfig) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[239] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use NetworkConfig_ClusterNetworkPerformanceConfig.ProtoReflect.Descriptor instead. -func (*NetworkConfig_ClusterNetworkPerformanceConfig) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{128, 0} -} - -func (x *NetworkConfig_ClusterNetworkPerformanceConfig) GetTotalEgressBandwidthTier() NetworkConfig_ClusterNetworkPerformanceConfig_Tier { - if x != nil && x.TotalEgressBandwidthTier != nil { - return *x.TotalEgressBandwidthTier - } - return NetworkConfig_ClusterNetworkPerformanceConfig_TIER_UNSPECIFIED -} - -// OperationError records errors seen from CloudKMS keys -// encountered during updates to DatabaseEncryption configuration. -type DatabaseEncryption_OperationError struct { - state protoimpl.MessageState `protogen:"open.v1"` - // CloudKMS key resource that had the error. - KeyName string `protobuf:"bytes,1,opt,name=key_name,json=keyName,proto3" json:"key_name,omitempty"` - // Description of the error seen during the operation. - ErrorMessage string `protobuf:"bytes,2,opt,name=error_message,json=errorMessage,proto3" json:"error_message,omitempty"` - // Time when the CloudKMS error was seen. - Timestamp *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=timestamp,proto3" json:"timestamp,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *DatabaseEncryption_OperationError) Reset() { - *x = DatabaseEncryption_OperationError{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[240] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *DatabaseEncryption_OperationError) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DatabaseEncryption_OperationError) ProtoMessage() {} - -func (x *DatabaseEncryption_OperationError) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[240] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DatabaseEncryption_OperationError.ProtoReflect.Descriptor instead. -func (*DatabaseEncryption_OperationError) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{148, 0} -} - -func (x *DatabaseEncryption_OperationError) GetKeyName() string { - if x != nil { - return x.KeyName - } - return "" -} - -func (x *DatabaseEncryption_OperationError) GetErrorMessage() string { - if x != nil { - return x.ErrorMessage - } - return "" -} - -func (x *DatabaseEncryption_OperationError) GetTimestamp() *timestamppb.Timestamp { - if x != nil { - return x.Timestamp - } - return nil -} - -// Parameters for using BigQuery as the destination of resource usage export. -type ResourceUsageExportConfig_BigQueryDestination struct { - state protoimpl.MessageState `protogen:"open.v1"` - // The ID of a BigQuery Dataset. - DatasetId string `protobuf:"bytes,1,opt,name=dataset_id,json=datasetId,proto3" json:"dataset_id,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ResourceUsageExportConfig_BigQueryDestination) Reset() { - *x = ResourceUsageExportConfig_BigQueryDestination{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[241] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ResourceUsageExportConfig_BigQueryDestination) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ResourceUsageExportConfig_BigQueryDestination) ProtoMessage() {} - -func (x *ResourceUsageExportConfig_BigQueryDestination) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[241] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ResourceUsageExportConfig_BigQueryDestination.ProtoReflect.Descriptor instead. -func (*ResourceUsageExportConfig_BigQueryDestination) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{153, 0} -} - -func (x *ResourceUsageExportConfig_BigQueryDestination) GetDatasetId() string { - if x != nil { - return x.DatasetId - } - return "" -} - -// Parameters for controlling consumption metering. -type ResourceUsageExportConfig_ConsumptionMeteringConfig struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Whether to enable consumption metering for this cluster. If enabled, a - // second BigQuery table will be created to hold resource consumption - // records. - Enabled bool `protobuf:"varint,1,opt,name=enabled,proto3" json:"enabled,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ResourceUsageExportConfig_ConsumptionMeteringConfig) Reset() { - *x = ResourceUsageExportConfig_ConsumptionMeteringConfig{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[242] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ResourceUsageExportConfig_ConsumptionMeteringConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ResourceUsageExportConfig_ConsumptionMeteringConfig) ProtoMessage() {} - -func (x *ResourceUsageExportConfig_ConsumptionMeteringConfig) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[242] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ResourceUsageExportConfig_ConsumptionMeteringConfig.ProtoReflect.Descriptor instead. -func (*ResourceUsageExportConfig_ConsumptionMeteringConfig) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{153, 1} -} - -func (x *ResourceUsageExportConfig_ConsumptionMeteringConfig) GetEnabled() bool { - if x != nil { - return x.Enabled - } - return false -} - -// Pub/Sub specific notification config. -type NotificationConfig_PubSub struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Enable notifications for Pub/Sub. - Enabled bool `protobuf:"varint,1,opt,name=enabled,proto3" json:"enabled,omitempty"` - // The desired Pub/Sub topic to which notifications will be - // sent by GKE. Format is `projects/{project}/topics/{topic}`. - Topic string `protobuf:"bytes,2,opt,name=topic,proto3" json:"topic,omitempty"` - // Allows filtering to one or more specific event types. If no filter is - // specified, or if a filter is specified with no event types, all event - // types will be sent - Filter *NotificationConfig_Filter `protobuf:"bytes,3,opt,name=filter,proto3" json:"filter,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *NotificationConfig_PubSub) Reset() { - *x = NotificationConfig_PubSub{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[243] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *NotificationConfig_PubSub) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*NotificationConfig_PubSub) ProtoMessage() {} - -func (x *NotificationConfig_PubSub) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[243] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use NotificationConfig_PubSub.ProtoReflect.Descriptor instead. -func (*NotificationConfig_PubSub) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{160, 0} -} - -func (x *NotificationConfig_PubSub) GetEnabled() bool { - if x != nil { - return x.Enabled - } - return false -} - -func (x *NotificationConfig_PubSub) GetTopic() string { - if x != nil { - return x.Topic - } - return "" -} - -func (x *NotificationConfig_PubSub) GetFilter() *NotificationConfig_Filter { - if x != nil { - return x.Filter - } - return nil -} - -// Allows filtering to one or more specific event types. If event types are -// present, those and only those event types will be transmitted to the -// cluster. Other types will be skipped. If no filter is specified, or no -// event types are present, all event types will be sent -type NotificationConfig_Filter struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Event types to allowlist. - EventType []NotificationConfig_EventType `protobuf:"varint,1,rep,packed,name=event_type,json=eventType,proto3,enum=google.container.v1.NotificationConfig_EventType" json:"event_type,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *NotificationConfig_Filter) Reset() { - *x = NotificationConfig_Filter{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[244] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *NotificationConfig_Filter) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*NotificationConfig_Filter) ProtoMessage() {} - -func (x *NotificationConfig_Filter) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[244] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use NotificationConfig_Filter.ProtoReflect.Descriptor instead. -func (*NotificationConfig_Filter) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{160, 1} -} - -func (x *NotificationConfig_Filter) GetEventType() []NotificationConfig_EventType { - if x != nil { - return x.EventType - } - return nil -} - -// The namespace/name of the pod whose eviction is blocked by PDB. -type DisruptionEvent_PdbBlockedPod struct { - state protoimpl.MessageState `protogen:"open.v1"` - // The namespace of the pod. - Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` - // The name of the pod. - Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *DisruptionEvent_PdbBlockedPod) Reset() { - *x = DisruptionEvent_PdbBlockedPod{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[245] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *DisruptionEvent_PdbBlockedPod) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DisruptionEvent_PdbBlockedPod) ProtoMessage() {} - -func (x *DisruptionEvent_PdbBlockedPod) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[245] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DisruptionEvent_PdbBlockedPod.ProtoReflect.Descriptor instead. -func (*DisruptionEvent_PdbBlockedPod) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{164, 0} -} - -func (x *DisruptionEvent_PdbBlockedPod) GetNamespace() string { - if x != nil { - return x.Namespace - } - return "" -} - -func (x *DisruptionEvent_PdbBlockedPod) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -// Describes the configuration of a DNS endpoint. -type ControlPlaneEndpointsConfig_DNSEndpointConfig struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Output only. The cluster's DNS endpoint configuration. - // A DNS format address. This is accessible from the public internet. - // Ex: uid.us-central1.gke.goog. - // Always present, but the behavior may change according to the value of - // [DNSEndpointConfig.allow_external_traffic][google.container.v1.ControlPlaneEndpointsConfig.DNSEndpointConfig.allow_external_traffic]. - Endpoint string `protobuf:"bytes,2,opt,name=endpoint,proto3" json:"endpoint,omitempty"` - // Controls whether user traffic is allowed over this endpoint. Note that - // Google-managed services may still use the endpoint even if this is false. - AllowExternalTraffic *bool `protobuf:"varint,3,opt,name=allow_external_traffic,json=allowExternalTraffic,proto3,oneof" json:"allow_external_traffic,omitempty"` - // Controls whether the k8s token auth is allowed via DNS. - EnableK8STokensViaDns *bool `protobuf:"varint,5,opt,name=enable_k8s_tokens_via_dns,json=enableK8sTokensViaDns,proto3,oneof" json:"enable_k8s_tokens_via_dns,omitempty"` - // Controls whether the k8s certs auth is allowed via DNS. - EnableK8SCertsViaDns *bool `protobuf:"varint,6,opt,name=enable_k8s_certs_via_dns,json=enableK8sCertsViaDns,proto3,oneof" json:"enable_k8s_certs_via_dns,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ControlPlaneEndpointsConfig_DNSEndpointConfig) Reset() { - *x = ControlPlaneEndpointsConfig_DNSEndpointConfig{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[246] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ControlPlaneEndpointsConfig_DNSEndpointConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ControlPlaneEndpointsConfig_DNSEndpointConfig) ProtoMessage() {} - -func (x *ControlPlaneEndpointsConfig_DNSEndpointConfig) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[246] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ControlPlaneEndpointsConfig_DNSEndpointConfig.ProtoReflect.Descriptor instead. -func (*ControlPlaneEndpointsConfig_DNSEndpointConfig) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{183, 0} -} - -func (x *ControlPlaneEndpointsConfig_DNSEndpointConfig) GetEndpoint() string { - if x != nil { - return x.Endpoint - } - return "" -} - -func (x *ControlPlaneEndpointsConfig_DNSEndpointConfig) GetAllowExternalTraffic() bool { - if x != nil && x.AllowExternalTraffic != nil { - return *x.AllowExternalTraffic - } - return false -} - -func (x *ControlPlaneEndpointsConfig_DNSEndpointConfig) GetEnableK8STokensViaDns() bool { - if x != nil && x.EnableK8STokensViaDns != nil { - return *x.EnableK8STokensViaDns - } - return false -} - -func (x *ControlPlaneEndpointsConfig_DNSEndpointConfig) GetEnableK8SCertsViaDns() bool { - if x != nil && x.EnableK8SCertsViaDns != nil { - return *x.EnableK8SCertsViaDns - } - return false -} - -// IP endpoints configuration. -type ControlPlaneEndpointsConfig_IPEndpointsConfig struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Controls whether to allow direct IP access. - Enabled *bool `protobuf:"varint,1,opt,name=enabled,proto3,oneof" json:"enabled,omitempty"` - // Controls whether the control plane allows access through a public IP. - // It is invalid to specify both - // [PrivateClusterConfig.enablePrivateEndpoint][] and this field at the same - // time. - EnablePublicEndpoint *bool `protobuf:"varint,2,opt,name=enable_public_endpoint,json=enablePublicEndpoint,proto3,oneof" json:"enable_public_endpoint,omitempty"` - // Controls whether the control plane's private endpoint is accessible from - // sources in other regions. - // It is invalid to specify both - // [PrivateClusterMasterGlobalAccessConfig.enabled][google.container.v1.PrivateClusterMasterGlobalAccessConfig.enabled] - // and this field at the same time. - GlobalAccess *bool `protobuf:"varint,3,opt,name=global_access,json=globalAccess,proto3,oneof" json:"global_access,omitempty"` - // Configuration of authorized networks. If enabled, restricts access to the - // control plane based on source IP. - // It is invalid to specify both - // [Cluster.masterAuthorizedNetworksConfig][] and this field at the same - // time. - AuthorizedNetworksConfig *MasterAuthorizedNetworksConfig `protobuf:"bytes,4,opt,name=authorized_networks_config,json=authorizedNetworksConfig,proto3" json:"authorized_networks_config,omitempty"` - // Output only. The external IP address of this cluster's control plane. - // Only populated if enabled. - PublicEndpoint string `protobuf:"bytes,5,opt,name=public_endpoint,json=publicEndpoint,proto3" json:"public_endpoint,omitempty"` - // Output only. The internal IP address of this cluster's control plane. - // Only populated if enabled. - PrivateEndpoint string `protobuf:"bytes,6,opt,name=private_endpoint,json=privateEndpoint,proto3" json:"private_endpoint,omitempty"` - // Subnet to provision the master's private endpoint during cluster - // creation. Specified in projects/*/regions/*/subnetworks/* format. It is - // invalid to specify both - // [PrivateClusterConfig.privateEndpointSubnetwork][] and this field at the - // same time. - PrivateEndpointSubnetwork string `protobuf:"bytes,7,opt,name=private_endpoint_subnetwork,json=privateEndpointSubnetwork,proto3" json:"private_endpoint_subnetwork,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ControlPlaneEndpointsConfig_IPEndpointsConfig) Reset() { - *x = ControlPlaneEndpointsConfig_IPEndpointsConfig{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[247] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ControlPlaneEndpointsConfig_IPEndpointsConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ControlPlaneEndpointsConfig_IPEndpointsConfig) ProtoMessage() {} - -func (x *ControlPlaneEndpointsConfig_IPEndpointsConfig) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[247] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ControlPlaneEndpointsConfig_IPEndpointsConfig.ProtoReflect.Descriptor instead. -func (*ControlPlaneEndpointsConfig_IPEndpointsConfig) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{183, 1} -} - -func (x *ControlPlaneEndpointsConfig_IPEndpointsConfig) GetEnabled() bool { - if x != nil && x.Enabled != nil { - return *x.Enabled - } - return false -} - -func (x *ControlPlaneEndpointsConfig_IPEndpointsConfig) GetEnablePublicEndpoint() bool { - if x != nil && x.EnablePublicEndpoint != nil { - return *x.EnablePublicEndpoint - } - return false -} - -func (x *ControlPlaneEndpointsConfig_IPEndpointsConfig) GetGlobalAccess() bool { - if x != nil && x.GlobalAccess != nil { - return *x.GlobalAccess - } - return false -} - -func (x *ControlPlaneEndpointsConfig_IPEndpointsConfig) GetAuthorizedNetworksConfig() *MasterAuthorizedNetworksConfig { - if x != nil { - return x.AuthorizedNetworksConfig - } - return nil -} - -func (x *ControlPlaneEndpointsConfig_IPEndpointsConfig) GetPublicEndpoint() string { - if x != nil { - return x.PublicEndpoint - } - return "" -} - -func (x *ControlPlaneEndpointsConfig_IPEndpointsConfig) GetPrivateEndpoint() string { - if x != nil { - return x.PrivateEndpoint - } - return "" -} - -func (x *ControlPlaneEndpointsConfig_IPEndpointsConfig) GetPrivateEndpointSubnetwork() string { - if x != nil { - return x.PrivateEndpointSubnetwork - } - return "" -} - -// RotationConfig is config for secret manager auto rotation. -type SecretManagerConfig_RotationConfig struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Whether the rotation is enabled. - Enabled *bool `protobuf:"varint,1,opt,name=enabled,proto3,oneof" json:"enabled,omitempty"` - // The interval between two consecutive rotations. Default rotation interval - // is 2 minutes. - RotationInterval *durationpb.Duration `protobuf:"bytes,2,opt,name=rotation_interval,json=rotationInterval,proto3,oneof" json:"rotation_interval,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *SecretManagerConfig_RotationConfig) Reset() { - *x = SecretManagerConfig_RotationConfig{} - mi := &file_google_container_v1_cluster_service_proto_msgTypes[249] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *SecretManagerConfig_RotationConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SecretManagerConfig_RotationConfig) ProtoMessage() {} - -func (x *SecretManagerConfig_RotationConfig) ProtoReflect() protoreflect.Message { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[249] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SecretManagerConfig_RotationConfig.ProtoReflect.Descriptor instead. -func (*SecretManagerConfig_RotationConfig) Descriptor() ([]byte, []int) { - return file_google_container_v1_cluster_service_proto_rawDescGZIP(), []int{188, 0} -} - -func (x *SecretManagerConfig_RotationConfig) GetEnabled() bool { - if x != nil && x.Enabled != nil { - return *x.Enabled - } - return false -} - -func (x *SecretManagerConfig_RotationConfig) GetRotationInterval() *durationpb.Duration { - if x != nil { - return x.RotationInterval - } - return nil -} - -var File_google_container_v1_cluster_service_proto protoreflect.FileDescriptor - -const file_google_container_v1_cluster_service_proto_rawDesc = "" + - "\n" + - ")google/container/v1/cluster_service.proto\x12\x13google.container.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1egoogle/protobuf/wrappers.proto\x1a\x15google/rpc/code.proto\x1a\x17google/rpc/status.proto\"\xe7\x15\n" + - "\x0fLinuxNodeConfig\x12K\n" + - "\asysctls\x18\x01 \x03(\v21.google.container.v1.LinuxNodeConfig.SysctlsEntryR\asysctls\x12P\n" + - "\vcgroup_mode\x18\x02 \x01(\x0e2/.google.container.v1.LinuxNodeConfig.CgroupModeR\n" + - "cgroupMode\x12\\\n" + - "\thugepages\x18\x03 \x01(\v24.google.container.v1.LinuxNodeConfig.HugepagesConfigB\x03\xe0A\x01H\x00R\thugepages\x88\x01\x01\x12\x86\x01\n" + - "\x1ctransparent_hugepage_enabled\x18\x04 \x01(\x0e2?.google.container.v1.LinuxNodeConfig.TransparentHugepageEnabledB\x03\xe0A\x01R\x1atransparentHugepageEnabled\x12\x83\x01\n" + - "\x1btransparent_hugepage_defrag\x18\x05 \x01(\x0e2>.google.container.v1.LinuxNodeConfig.TransparentHugepageDefragB\x03\xe0A\x01R\x19transparentHugepageDefrag\x12Z\n" + - "\vswap_config\x18\f \x01(\v2/.google.container.v1.LinuxNodeConfig.SwapConfigB\x03\xe0A\x01H\x01R\n" + - "swapConfig\x88\x01\x01\x12~\n" + - "\x1anode_kernel_module_loading\x18\r \x01(\v2<.google.container.v1.LinuxNodeConfig.NodeKernelModuleLoadingB\x03\xe0A\x01R\x17nodeKernelModuleLoading\x1a\x9f\x01\n" + - "\x0fHugepagesConfig\x121\n" + - "\x0fhugepage_size2m\x18\x01 \x01(\x05B\x03\xe0A\x01H\x00R\x0ehugepageSize2m\x88\x01\x01\x121\n" + - "\x0fhugepage_size1g\x18\x02 \x01(\x05B\x03\xe0A\x01H\x01R\x0ehugepageSize1g\x88\x01\x01B\x12\n" + - "\x10_hugepage_size2mB\x12\n" + - "\x10_hugepage_size1g\x1a\xdc\a\n" + - "\n" + - "SwapConfig\x12\"\n" + - "\aenabled\x18\x01 \x01(\bB\x03\xe0A\x01H\x01R\aenabled\x88\x01\x01\x12w\n" + - "\x11encryption_config\x18\x02 \x01(\v2@.google.container.v1.LinuxNodeConfig.SwapConfig.EncryptionConfigB\x03\xe0A\x01H\x02R\x10encryptionConfig\x88\x01\x01\x12m\n" + - "\x11boot_disk_profile\x18\x03 \x01(\v2?.google.container.v1.LinuxNodeConfig.SwapConfig.BootDiskProfileH\x00R\x0fbootDiskProfile\x12\x89\x01\n" + - "\x1bephemeral_local_ssd_profile\x18\x04 \x01(\v2H.google.container.v1.LinuxNodeConfig.SwapConfig.EphemeralLocalSsdProfileH\x00R\x18ephemeralLocalSsdProfile\x12\x89\x01\n" + - "\x1bdedicated_local_ssd_profile\x18\x05 \x01(\v2H.google.container.v1.LinuxNodeConfig.SwapConfig.DedicatedLocalSsdProfileH\x00R\x18dedicatedLocalSsdProfile\x1aE\n" + - "\x10EncryptionConfig\x12$\n" + - "\bdisabled\x18\x01 \x01(\bB\x03\xe0A\x01H\x00R\bdisabled\x88\x01\x01B\v\n" + - "\t_disabled\x1ar\n" + - "\x0fBootDiskProfile\x12$\n" + - "\rswap_size_gib\x18\x01 \x01(\x03H\x00R\vswapSizeGib\x12,\n" + - "\x11swap_size_percent\x18\x02 \x01(\x05H\x00R\x0fswapSizePercentB\v\n" + - "\tswap_size\x1a{\n" + - "\x18EphemeralLocalSsdProfile\x12$\n" + - "\rswap_size_gib\x18\x01 \x01(\x03H\x00R\vswapSizeGib\x12,\n" + - "\x11swap_size_percent\x18\x02 \x01(\x05H\x00R\x0fswapSizePercentB\v\n" + - "\tswap_size\x1a9\n" + - "\x18DedicatedLocalSsdProfile\x12\x1d\n" + - "\n" + - "disk_count\x18\x01 \x01(\x03R\tdiskCountB\x15\n" + - "\x13performance_profileB\n" + - "\n" + - "\b_enabledB\x14\n" + - "\x12_encryption_config\x1a\xd7\x01\n" + - "\x17NodeKernelModuleLoading\x12[\n" + - "\x06policy\x18\x01 \x01(\x0e2C.google.container.v1.LinuxNodeConfig.NodeKernelModuleLoading.PolicyR\x06policy\"_\n" + - "\x06Policy\x12\x16\n" + - "\x12POLICY_UNSPECIFIED\x10\x00\x12\x1a\n" + - "\x16ENFORCE_SIGNED_MODULES\x10\x01\x12!\n" + - "\x1dDO_NOT_ENFORCE_SIGNED_MODULES\x10\x02\x1a:\n" + - "\fSysctlsEntry\x12\x10\n" + - "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" + - "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\"Q\n" + - "\n" + - "CgroupMode\x12\x1b\n" + - "\x17CGROUP_MODE_UNSPECIFIED\x10\x00\x12\x12\n" + - "\x0eCGROUP_MODE_V1\x10\x01\x12\x12\n" + - "\x0eCGROUP_MODE_V2\x10\x02\"\xc5\x01\n" + - "\x1aTransparentHugepageEnabled\x12,\n" + - "(TRANSPARENT_HUGEPAGE_ENABLED_UNSPECIFIED\x10\x00\x12'\n" + - "#TRANSPARENT_HUGEPAGE_ENABLED_ALWAYS\x10\x01\x12(\n" + - "$TRANSPARENT_HUGEPAGE_ENABLED_MADVISE\x10\x02\x12&\n" + - "\"TRANSPARENT_HUGEPAGE_ENABLED_NEVER\x10\x03\"\x9b\x02\n" + - "\x19TransparentHugepageDefrag\x12+\n" + - "'TRANSPARENT_HUGEPAGE_DEFRAG_UNSPECIFIED\x10\x00\x12&\n" + - "\"TRANSPARENT_HUGEPAGE_DEFRAG_ALWAYS\x10\x01\x12%\n" + - "!TRANSPARENT_HUGEPAGE_DEFRAG_DEFER\x10\x02\x122\n" + - ".TRANSPARENT_HUGEPAGE_DEFRAG_DEFER_WITH_MADVISE\x10\x03\x12'\n" + - "#TRANSPARENT_HUGEPAGE_DEFRAG_MADVISE\x10\x04\x12%\n" + - "!TRANSPARENT_HUGEPAGE_DEFRAG_NEVER\x10\x05B\f\n" + - "\n" + - "_hugepagesB\x0e\n" + - "\f_swap_config\"\xbf\x01\n" + - "\x11WindowsNodeConfig\x12O\n" + - "\n" + - "os_version\x18\x01 \x01(\x0e20.google.container.v1.WindowsNodeConfig.OSVersionR\tosVersion\"Y\n" + - "\tOSVersion\x12\x1a\n" + - "\x16OS_VERSION_UNSPECIFIED\x10\x00\x12\x17\n" + - "\x13OS_VERSION_LTSC2019\x10\x01\x12\x17\n" + - "\x13OS_VERSION_LTSC2022\x10\x02\"\xd2\r\n" + - "\x11NodeKubeletConfig\x12,\n" + - "\x12cpu_manager_policy\x18\x01 \x01(\tR\x10cpuManagerPolicy\x12T\n" + - "\x10topology_manager\x18\b \x01(\v2$.google.container.v1.TopologyManagerB\x03\xe0A\x01R\x0ftopologyManager\x12N\n" + - "\x0ememory_manager\x18\t \x01(\v2\".google.container.v1.MemoryManagerB\x03\xe0A\x01R\rmemoryManager\x12>\n" + - "\rcpu_cfs_quota\x18\x02 \x01(\v2\x1a.google.protobuf.BoolValueR\vcpuCfsQuota\x12/\n" + - "\x14cpu_cfs_quota_period\x18\x03 \x01(\tR\x11cpuCfsQuotaPeriod\x12$\n" + - "\x0epod_pids_limit\x18\x04 \x01(\x03R\fpodPidsLimit\x12W\n" + - "&insecure_kubelet_readonly_port_enabled\x18\a \x01(\bH\x00R\"insecureKubeletReadonlyPortEnabled\x88\x01\x01\x12G\n" + - "\x1eimage_gc_low_threshold_percent\x18\n" + - " \x01(\x05B\x03\xe0A\x01R\x1aimageGcLowThresholdPercent\x12I\n" + - "\x1fimage_gc_high_threshold_percent\x18\v \x01(\x05B\x03\xe0A\x01R\x1bimageGcHighThresholdPercent\x124\n" + - "\x14image_minimum_gc_age\x18\f \x01(\tB\x03\xe0A\x01R\x11imageMinimumGcAge\x124\n" + - "\x14image_maximum_gc_age\x18\r \x01(\tB\x03\xe0A\x01R\x11imageMaximumGcAge\x128\n" + - "\x16container_log_max_size\x18\x0e \x01(\tB\x03\xe0A\x01R\x13containerLogMaxSize\x12:\n" + - "\x17container_log_max_files\x18\x0f \x01(\x05B\x03\xe0A\x01R\x14containerLogMaxFiles\x129\n" + - "\x16allowed_unsafe_sysctls\x18\x10 \x03(\tB\x03\xe0A\x01R\x14allowedUnsafeSysctls\x12N\n" + - "\reviction_soft\x18\x11 \x01(\v2$.google.container.v1.EvictionSignalsB\x03\xe0A\x01R\fevictionSoft\x12j\n" + - "\x1aeviction_soft_grace_period\x18\x12 \x01(\v2(.google.container.v1.EvictionGracePeriodB\x03\xe0A\x01R\x17evictionSoftGracePeriod\x12j\n" + - "\x18eviction_minimum_reclaim\x18\x13 \x01(\v2+.google.container.v1.EvictionMinimumReclaimB\x03\xe0A\x01R\x16evictionMinimumReclaim\x12T\n" + - "%eviction_max_pod_grace_period_seconds\x18\x14 \x01(\x05B\x03\xe0A\x01R evictionMaxPodGracePeriodSeconds\x12<\n" + - "\x18max_parallel_image_pulls\x18\x15 \x01(\x05B\x03\xe0A\x01R\x15maxParallelImagePulls\x12?\n" + - "\x17single_process_oom_kill\x18\x16 \x01(\bB\x03\xe0A\x01H\x01R\x14singleProcessOomKill\x88\x01\x01\x12K\n" + - "\x1dshutdown_grace_period_seconds\x18\x1a \x01(\x05B\x03\xe0A\x01H\x02R\x1ashutdownGracePeriodSeconds\x88\x01\x01\x12e\n" + - "+shutdown_grace_period_critical_pods_seconds\x18\x1b \x01(\x05B\x03\xe0A\x01H\x03R&shutdownGracePeriodCriticalPodsSeconds\x88\x01\x01B)\n" + - "'_insecure_kubelet_readonly_port_enabledB\x1a\n" + - "\x18_single_process_oom_killB \n" + - "\x1e_shutdown_grace_period_secondsB.\n" + - ",_shutdown_grace_period_critical_pods_seconds\"?\n" + - "\x0fTopologyManager\x12\x16\n" + - "\x06policy\x18\x01 \x01(\tR\x06policy\x12\x14\n" + - "\x05scope\x18\x02 \x01(\tR\x05scope\"'\n" + - "\rMemoryManager\x12\x16\n" + - "\x06policy\x18\x01 \x01(\tR\x06policy\"\xb5\x02\n" + - "\x0fEvictionSignals\x12.\n" + - "\x10memory_available\x18\x01 \x01(\tB\x03\xe0A\x01R\x0fmemoryAvailable\x12.\n" + - "\x10nodefs_available\x18\x02 \x01(\tB\x03\xe0A\x01R\x0fnodefsAvailable\x121\n" + - "\x12nodefs_inodes_free\x18\x03 \x01(\tB\x03\xe0A\x01R\x10nodefsInodesFree\x120\n" + - "\x11imagefs_available\x18\x04 \x01(\tB\x03\xe0A\x01R\x10imagefsAvailable\x123\n" + - "\x13imagefs_inodes_free\x18\x05 \x01(\tB\x03\xe0A\x01R\x11imagefsInodesFree\x12(\n" + - "\rpid_available\x18\x06 \x01(\tB\x03\xe0A\x01R\fpidAvailable\"\xb9\x02\n" + - "\x13EvictionGracePeriod\x12.\n" + - "\x10memory_available\x18\x01 \x01(\tB\x03\xe0A\x01R\x0fmemoryAvailable\x12.\n" + - "\x10nodefs_available\x18\x02 \x01(\tB\x03\xe0A\x01R\x0fnodefsAvailable\x121\n" + - "\x12nodefs_inodes_free\x18\x03 \x01(\tB\x03\xe0A\x01R\x10nodefsInodesFree\x120\n" + - "\x11imagefs_available\x18\x04 \x01(\tB\x03\xe0A\x01R\x10imagefsAvailable\x123\n" + - "\x13imagefs_inodes_free\x18\x05 \x01(\tB\x03\xe0A\x01R\x11imagefsInodesFree\x12(\n" + - "\rpid_available\x18\x06 \x01(\tB\x03\xe0A\x01R\fpidAvailable\"\xbc\x02\n" + - "\x16EvictionMinimumReclaim\x12.\n" + - "\x10memory_available\x18\x01 \x01(\tB\x03\xe0A\x01R\x0fmemoryAvailable\x12.\n" + - "\x10nodefs_available\x18\x02 \x01(\tB\x03\xe0A\x01R\x0fnodefsAvailable\x121\n" + - "\x12nodefs_inodes_free\x18\x03 \x01(\tB\x03\xe0A\x01R\x10nodefsInodesFree\x120\n" + - "\x11imagefs_available\x18\x04 \x01(\tB\x03\xe0A\x01R\x10imagefsAvailable\x123\n" + - "\x13imagefs_inodes_free\x18\x05 \x01(\tB\x03\xe0A\x01R\x11imagefsInodesFree\x12(\n" + - "\rpid_available\x18\x06 \x01(\tB\x03\xe0A\x01R\fpidAvailable\"\x90\x1e\n" + - "\n" + - "NodeConfig\x12!\n" + - "\fmachine_type\x18\x01 \x01(\tR\vmachineType\x12 \n" + - "\fdisk_size_gb\x18\x02 \x01(\x05R\n" + - "diskSizeGb\x12!\n" + - "\foauth_scopes\x18\x03 \x03(\tR\voauthScopes\x12'\n" + - "\x0fservice_account\x18\t \x01(\tR\x0eserviceAccount\x12I\n" + - "\bmetadata\x18\x04 \x03(\v2-.google.container.v1.NodeConfig.MetadataEntryR\bmetadata\x12\x1d\n" + - "\n" + - "image_type\x18\x05 \x01(\tR\timageType\x12C\n" + - "\x06labels\x18\x06 \x03(\v2+.google.container.v1.NodeConfig.LabelsEntryR\x06labels\x12&\n" + - "\x0flocal_ssd_count\x18\a \x01(\x05R\rlocalSsdCount\x12\x12\n" + - "\x04tags\x18\b \x03(\tR\x04tags\x12 \n" + - "\vpreemptible\x18\n" + - " \x01(\bR\vpreemptible\x12J\n" + - "\faccelerators\x18\v \x03(\v2&.google.container.v1.AcceleratorConfigR\faccelerators\x12\x1b\n" + - "\tdisk_type\x18\f \x01(\tR\bdiskType\x12(\n" + - "\x10min_cpu_platform\x18\r \x01(\tR\x0eminCpuPlatform\x12e\n" + - "\x18workload_metadata_config\x18\x0e \x01(\v2+.google.container.v1.WorkloadMetadataConfigR\x16workloadMetadataConfig\x126\n" + - "\x06taints\x18\x0f \x03(\v2\x1e.google.container.v1.NodeTaintR\x06taints\x12I\n" + - "\x0esandbox_config\x18\x11 \x01(\v2\".google.container.v1.SandboxConfigR\rsandboxConfig\x12\x1d\n" + - "\n" + - "node_group\x18\x12 \x01(\tR\tnodeGroup\x12[\n" + - "\x14reservation_affinity\x18\x13 \x01(\v2(.google.container.v1.ReservationAffinityR\x13reservationAffinity\x12e\n" + - "\x18shielded_instance_config\x18\x14 \x01(\v2+.google.container.v1.ShieldedInstanceConfigR\x16shieldedInstanceConfig\x12P\n" + - "\x11linux_node_config\x18\x15 \x01(\v2$.google.container.v1.LinuxNodeConfigR\x0flinuxNodeConfig\x12M\n" + - "\x0ekubelet_config\x18\x16 \x01(\v2&.google.container.v1.NodeKubeletConfigR\rkubeletConfig\x12)\n" + - "\x11boot_disk_kms_key\x18\x17 \x01(\tR\x0ebootDiskKmsKey\x12@\n" + - "\vgcfs_config\x18\x19 \x01(\v2\x1f.google.container.v1.GcfsConfigR\n" + - "gcfsConfig\x12h\n" + - "\x19advanced_machine_features\x18\x1a \x01(\v2,.google.container.v1.AdvancedMachineFeaturesR\x17advancedMachineFeatures\x125\n" + - "\x05gvnic\x18\x1d \x01(\v2\x1f.google.container.v1.VirtualNICR\x05gvnic\x12\x12\n" + - "\x04spot\x18 \x01(\bR\x04spot\x12U\n" + - "\x12confidential_nodes\x18# \x01(\v2&.google.container.v1.ConfidentialNodesR\x11confidentialNodes\x12E\n" + - "\vfast_socket\x18$ \x01(\v2\x1f.google.container.v1.FastSocketH\x00R\n" + - "fastSocket\x88\x01\x01\x12\\\n" + - "\x0fresource_labels\x18% \x03(\v23.google.container.v1.NodeConfig.ResourceLabelsEntryR\x0eresourceLabels\x12Q\n" + - "\x0elogging_config\x18& \x01(\v2*.google.container.v1.NodePoolLoggingConfigR\rloggingConfig\x12V\n" + - "\x13windows_node_config\x18' \x01(\v2&.google.container.v1.WindowsNodeConfigR\x11windowsNodeConfig\x12j\n" + - "\x1blocal_nvme_ssd_block_config\x18( \x01(\v2,.google.container.v1.LocalNvmeSsdBlockConfigR\x17localNvmeSsdBlockConfig\x12\x7f\n" + - "\"ephemeral_storage_local_ssd_config\x18) \x01(\v23.google.container.v1.EphemeralStorageLocalSsdConfigR\x1eephemeralStorageLocalSsdConfig\x12S\n" + - "\x12sole_tenant_config\x18* \x01(\v2%.google.container.v1.SoleTenantConfigR\x10soleTenantConfig\x12R\n" + - "\x11containerd_config\x18+ \x01(\v2%.google.container.v1.ContainerdConfigR\x10containerdConfig\x12\\\n" + - "\x15resource_manager_tags\x18- \x01(\v2(.google.container.v1.ResourceManagerTagsR\x13resourceManagerTags\x12C\n" + - "\x1benable_confidential_storage\x18. \x01(\bB\x03\xe0A\x01R\x19enableConfidentialStorage\x12X\n" + - "\x14secondary_boot_disks\x180 \x03(\v2&.google.container.v1.SecondaryBootDiskR\x12secondaryBootDisks\x12#\n" + - "\rstorage_pools\x181 \x03(\tR\fstoragePools\x12\x87\x01\n" + - "#secondary_boot_disk_update_strategy\x182 \x01(\v24.google.container.v1.SecondaryBootDiskUpdateStrategyH\x01R\x1fsecondaryBootDiskUpdateStrategy\x88\x01\x01\x12U\n" + - "\x11gpu_direct_config\x183 \x01(\v2$.google.container.v1.GPUDirectConfigH\x02R\x0fgpuDirectConfig\x88\x01\x01\x12C\n" + - "\x10max_run_duration\x185 \x01(\v2\x19.google.protobuf.DurationR\x0emaxRunDuration\x12v\n" + - "\x19local_ssd_encryption_mode\x186 \x01(\x0e26.google.container.v1.NodeConfig.LocalSsdEncryptionModeH\x03R\x16localSsdEncryptionMode\x88\x01\x01\x12l\n" + - "\x15effective_cgroup_mode\x187 \x01(\x0e23.google.container.v1.NodeConfig.EffectiveCgroupModeB\x03\xe0A\x03R\x13effectiveCgroupMode\x12\"\n" + - "\n" + - "flex_start\x188 \x01(\bH\x04R\tflexStart\x88\x01\x01\x12:\n" + - "\tboot_disk\x189 \x01(\v2\x1d.google.container.v1.BootDiskR\bbootDisk\x12J\n" + - "\x13consolidation_delay\x18< \x01(\v2\x19.google.protobuf.DurationR\x12consolidationDelay\x1a;\n" + - "\rMetadataEntry\x12\x10\n" + - "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" + - "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\x1a9\n" + - "\vLabelsEntry\x12\x10\n" + - "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" + - "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\x1aA\n" + - "\x13ResourceLabelsEntry\x12\x10\n" + - "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" + - "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\"z\n" + - "\x16LocalSsdEncryptionMode\x12)\n" + - "%LOCAL_SSD_ENCRYPTION_MODE_UNSPECIFIED\x10\x00\x12\x17\n" + - "\x13STANDARD_ENCRYPTION\x10\x01\x12\x1c\n" + - "\x18EPHEMERAL_KEY_ENCRYPTION\x10\x02\"x\n" + - "\x13EffectiveCgroupMode\x12%\n" + - "!EFFECTIVE_CGROUP_MODE_UNSPECIFIED\x10\x00\x12\x1c\n" + - "\x18EFFECTIVE_CGROUP_MODE_V1\x10\x01\x12\x1c\n" + - "\x18EFFECTIVE_CGROUP_MODE_V2\x10\x02B\x0e\n" + - "\f_fast_socketB&\n" + - "$_secondary_boot_disk_update_strategyB\x14\n" + - "\x12_gpu_direct_configB\x1c\n" + - "\x1a_local_ssd_encryption_modeB\r\n" + - "\v_flex_start\"\xec\x03\n" + - "\x17AdvancedMachineFeatures\x12-\n" + - "\x10threads_per_core\x18\x01 \x01(\x03H\x00R\x0ethreadsPerCore\x88\x01\x01\x12E\n" + - "\x1cenable_nested_virtualization\x18\x02 \x01(\bH\x01R\x1aenableNestedVirtualization\x88\x01\x01\x12\x8b\x01\n" + - "\x1bperformance_monitoring_unit\x18\x03 \x01(\x0e2F.google.container.v1.AdvancedMachineFeatures.PerformanceMonitoringUnitH\x02R\x19performanceMonitoringUnit\x88\x01\x01\"w\n" + - "\x19PerformanceMonitoringUnit\x12+\n" + - "'PERFORMANCE_MONITORING_UNIT_UNSPECIFIED\x10\x00\x12\x11\n" + - "\rARCHITECTURAL\x10\x01\x12\f\n" + - "\bSTANDARD\x10\x02\x12\f\n" + - "\bENHANCED\x10\x03B\x13\n" + - "\x11_threads_per_coreB\x1f\n" + - "\x1d_enable_nested_virtualizationB\x1e\n" + - "\x1c_performance_monitoring_unit\"\xc1\t\n" + - "\x11NodeNetworkConfig\x12-\n" + - "\x10create_pod_range\x18\x04 \x01(\bB\x03\xe0A\x04R\x0ecreatePodRange\x12\x1b\n" + - "\tpod_range\x18\x05 \x01(\tR\bpodRange\x12-\n" + - "\x13pod_ipv4_cidr_block\x18\x06 \x01(\tR\x10podIpv4CidrBlock\x125\n" + - "\x14enable_private_nodes\x18\t \x01(\bH\x00R\x12enablePrivateNodes\x88\x01\x01\x12\x82\x01\n" + - "\x1anetwork_performance_config\x18\v \x01(\v2?.google.container.v1.NodeNetworkConfig.NetworkPerformanceConfigH\x01R\x18networkPerformanceConfig\x88\x01\x01\x12r\n" + - "\x1dpod_cidr_overprovision_config\x18\r \x01(\v2/.google.container.v1.PodCIDROverprovisionConfigR\x1apodCidrOverprovisionConfig\x12w\n" + - "\x1fadditional_node_network_configs\x18\x0e \x03(\v20.google.container.v1.AdditionalNodeNetworkConfigR\x1cadditionalNodeNetworkConfigs\x12t\n" + - "\x1eadditional_pod_network_configs\x18\x0f \x03(\v2/.google.container.v1.AdditionalPodNetworkConfigR\x1badditionalPodNetworkConfigs\x12@\n" + - "\x1apod_ipv4_range_utilization\x18\x10 \x01(\x01B\x03\xe0A\x03R\x17podIpv4RangeUtilization\x12I\n" + - "\n" + - "subnetwork\x18\x13 \x01(\tB)\xe0A\x01\xfaA#\n" + - "!compute.googleapis.com/SubnetworkR\n" + - "subnetwork\x12[\n" + - "\x13network_tier_config\x18\x14 \x01(\v2&.google.container.v1.NetworkTierConfigB\x03\xe0A\x03R\x11networkTierConfig\x1a\xef\x01\n" + - "\x18NetworkPerformanceConfig\x12\x88\x01\n" + - "\x1btotal_egress_bandwidth_tier\x18\x01 \x01(\x0e2D.google.container.v1.NodeNetworkConfig.NetworkPerformanceConfig.TierH\x00R\x18totalEgressBandwidthTier\x88\x01\x01\"(\n" + - "\x04Tier\x12\x14\n" + - "\x10TIER_UNSPECIFIED\x10\x00\x12\n" + - "\n" + - "\x06TIER_1\x10\x01B\x1e\n" + - "\x1c_total_egress_bandwidth_tierB\x17\n" + - "\x15_enable_private_nodesB\x1d\n" + - "\x1b_network_performance_config\"W\n" + - "\x1bAdditionalNodeNetworkConfig\x12\x18\n" + - "\anetwork\x18\x01 \x01(\tR\anetwork\x12\x1e\n" + - "\n" + - "subnetwork\x18\x02 \x01(\tR\n" + - "subnetwork\"\xda\x01\n" + - "\x1aAdditionalPodNetworkConfig\x12\x1e\n" + - "\n" + - "subnetwork\x18\x01 \x01(\tR\n" + - "subnetwork\x12.\n" + - "\x13secondary_pod_range\x18\x02 \x01(\tR\x11secondaryPodRange\x12V\n" + - "\x11max_pods_per_node\x18\x03 \x01(\v2&.google.container.v1.MaxPodsConstraintH\x00R\x0emaxPodsPerNode\x88\x01\x01B\x14\n" + - "\x12_max_pods_per_node\"\x86\x01\n" + - "\x16ShieldedInstanceConfig\x12,\n" + - "\x12enable_secure_boot\x18\x01 \x01(\bR\x10enableSecureBoot\x12>\n" + - "\x1benable_integrity_monitoring\x18\x02 \x01(\bR\x19enableIntegrityMonitoring\"q\n" + - "\rSandboxConfig\x12;\n" + - "\x04type\x18\x02 \x01(\x0e2'.google.container.v1.SandboxConfig.TypeR\x04type\"#\n" + - "\x04Type\x12\x0f\n" + - "\vUNSPECIFIED\x10\x00\x12\n" + - "\n" + - "\x06GVISOR\x10\x01\"&\n" + - "\n" + - "GcfsConfig\x12\x18\n" + - "\aenabled\x18\x01 \x01(\bR\aenabled\"\x84\x02\n" + - "\x13ReservationAffinity\x12g\n" + - "\x18consume_reservation_type\x18\x01 \x01(\x0e2-.google.container.v1.ReservationAffinity.TypeR\x16consumeReservationType\x12\x10\n" + - "\x03key\x18\x02 \x01(\tR\x03key\x12\x16\n" + - "\x06values\x18\x03 \x03(\tR\x06values\"Z\n" + - "\x04Type\x12\x0f\n" + - "\vUNSPECIFIED\x10\x00\x12\x12\n" + - "\x0eNO_RESERVATION\x10\x01\x12\x13\n" + - "\x0fANY_RESERVATION\x10\x02\x12\x18\n" + - "\x14SPECIFIC_RESERVATION\x10\x03\"\xfd\x02\n" + - "\x10SoleTenantConfig\x12[\n" + - "\x0fnode_affinities\x18\x01 \x03(\v22.google.container.v1.SoleTenantConfig.NodeAffinityR\x0enodeAffinities\x12,\n" + - "\rmin_node_cpus\x18\x02 \x01(\x05B\x03\xe0A\x01H\x00R\vminNodeCpus\x88\x01\x01\x1a\xcb\x01\n" + - "\fNodeAffinity\x12\x10\n" + - "\x03key\x18\x01 \x01(\tR\x03key\x12W\n" + - "\boperator\x18\x02 \x01(\x0e2;.google.container.v1.SoleTenantConfig.NodeAffinity.OperatorR\boperator\x12\x16\n" + - "\x06values\x18\x03 \x03(\tR\x06values\"8\n" + - "\bOperator\x12\x18\n" + - "\x14OPERATOR_UNSPECIFIED\x10\x00\x12\x06\n" + - "\x02IN\x10\x01\x12\n" + - "\n" + - "\x06NOT_IN\x10\x02B\x10\n" + - "\x0e_min_node_cpus\"\x95\x11\n" + - "\x10ContainerdConfig\x12\x86\x01\n" + - "\x1eprivate_registry_access_config\x18\x01 \x01(\v2A.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfigR\x1bprivateRegistryAccessConfig\x12e\n" + - "\x10writable_cgroups\x18\x02 \x01(\v25.google.container.v1.ContainerdConfig.WritableCgroupsB\x03\xe0A\x01R\x0fwritableCgroups\x12_\n" + - "\x0eregistry_hosts\x18\x03 \x03(\v28.google.container.v1.ContainerdConfig.RegistryHostConfigR\rregistryHosts\x1a\xdc\x04\n" + - "\x1bPrivateRegistryAccessConfig\x12\x18\n" + - "\aenabled\x18\x01 \x01(\bR\aenabled\x12\xb1\x01\n" + - "#certificate_authority_domain_config\x18\x02 \x03(\v2b.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfigR certificateAuthorityDomainConfig\x1a\xee\x02\n" + - " CertificateAuthorityDomainConfig\x12\x14\n" + - "\x05fqdns\x18\x01 \x03(\tR\x05fqdns\x12\xd9\x01\n" + - "%gcp_secret_manager_certificate_config\x18\x02 \x01(\v2\x84\x01.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfigH\x00R!gcpSecretManagerCertificateConfig\x1aB\n" + - "!GCPSecretManagerCertificateConfig\x12\x1d\n" + - "\n" + - "secret_uri\x18\x01 \x01(\tR\tsecretUriB\x14\n" + - "\x12certificate_config\x1a0\n" + - "\x0fWritableCgroups\x12\x1d\n" + - "\aenabled\x18\x01 \x01(\bB\x03\xe0A\x01R\aenabled\x1a\x9e\t\n" + - "\x12RegistryHostConfig\x12\x16\n" + - "\x06server\x18\x01 \x01(\tR\x06server\x12Y\n" + - "\x05hosts\x18\x02 \x03(\v2C.google.container.v1.ContainerdConfig.RegistryHostConfig.HostConfigR\x05hosts\x1af\n" + - "\x11CertificateConfig\x12B\n" + - "\x1dgcp_secret_manager_secret_uri\x18\x01 \x01(\tH\x00R\x19gcpSecretManagerSecretUriB\r\n" + - "\vcertificate\x1a\xd5\x01\n" + - "\x15CertificateConfigPair\x12^\n" + - "\x04cert\x18\x01 \x01(\v2J.google.container.v1.ContainerdConfig.RegistryHostConfig.CertificateConfigR\x04cert\x12\\\n" + - "\x03key\x18\x02 \x01(\v2J.google.container.v1.ContainerdConfig.RegistryHostConfig.CertificateConfigR\x03key\x1a8\n" + - "\x0eRegistryHeader\x12\x10\n" + - "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" + - "\x05value\x18\x02 \x03(\tR\x05value\x1a\x95\x04\n" + - "\n" + - "HostConfig\x12\x12\n" + - "\x04host\x18\x01 \x01(\tR\x04host\x12k\n" + - "\fcapabilities\x18\x02 \x03(\x0e2G.google.container.v1.ContainerdConfig.RegistryHostConfig.HostCapabilityR\fcapabilities\x12#\n" + - "\roverride_path\x18\x03 \x01(\bR\foverridePath\x12_\n" + - "\x06header\x18\x04 \x03(\v2G.google.container.v1.ContainerdConfig.RegistryHostConfig.RegistryHeaderR\x06header\x12Z\n" + - "\x02ca\x18\x05 \x03(\v2J.google.container.v1.ContainerdConfig.RegistryHostConfig.CertificateConfigR\x02ca\x12f\n" + - "\x06client\x18\x06 \x03(\v2N.google.container.v1.ContainerdConfig.RegistryHostConfig.CertificateConfigPairR\x06client\x12<\n" + - "\fdial_timeout\x18\a \x01(\v2\x19.google.protobuf.DurationR\vdialTimeout\"\x82\x01\n" + - "\x0eHostCapability\x12\x1f\n" + - "\x1bHOST_CAPABILITY_UNSPECIFIED\x10\x00\x12\x18\n" + - "\x14HOST_CAPABILITY_PULL\x10\x01\x12\x1b\n" + - "\x17HOST_CAPABILITY_RESOLVE\x10\x02\x12\x18\n" + - "\x14HOST_CAPABILITY_PUSH\x10\x03\"\xcd\x01\n" + - "\tNodeTaint\x12\x10\n" + - "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" + - "\x05value\x18\x02 \x01(\tR\x05value\x12=\n" + - "\x06effect\x18\x03 \x01(\x0e2%.google.container.v1.NodeTaint.EffectR\x06effect\"Y\n" + - "\x06Effect\x12\x16\n" + - "\x12EFFECT_UNSPECIFIED\x10\x00\x12\x0f\n" + - "\vNO_SCHEDULE\x10\x01\x12\x16\n" + - "\x12PREFER_NO_SCHEDULE\x10\x02\x12\x0e\n" + - "\n" + - "NO_EXECUTE\x10\x03\"D\n" + - "\n" + - "NodeTaints\x126\n" + - "\x06taints\x18\x01 \x03(\v2\x1e.google.container.v1.NodeTaintR\x06taints\"\x8c\x01\n" + - "\n" + - "NodeLabels\x12C\n" + - "\x06labels\x18\x01 \x03(\v2+.google.container.v1.NodeLabels.LabelsEntryR\x06labels\x1a9\n" + - "\vLabelsEntry\x12\x10\n" + - "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" + - "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\"\x94\x01\n" + - "\x0eResourceLabels\x12G\n" + - "\x06labels\x18\x01 \x03(\v2/.google.container.v1.ResourceLabels.LabelsEntryR\x06labels\x1a9\n" + - "\vLabelsEntry\x12\x10\n" + - "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" + - "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\"!\n" + - "\vNetworkTags\x12\x12\n" + - "\x04tags\x18\x01 \x03(\tR\x04tags\"\xc9\x02\n" + - "\n" + - "MasterAuth\x12\x1e\n" + - "\busername\x18\x01 \x01(\tB\x02\x18\x01R\busername\x12\x1e\n" + - "\bpassword\x18\x02 \x01(\tB\x02\x18\x01R\bpassword\x12h\n" + - "\x19client_certificate_config\x18\x03 \x01(\v2,.google.container.v1.ClientCertificateConfigR\x17clientCertificateConfig\x129\n" + - "\x16cluster_ca_certificate\x18d \x01(\tB\x03\xe0A\x03R\x14clusterCaCertificate\x122\n" + - "\x12client_certificate\x18e \x01(\tB\x03\xe0A\x03R\x11clientCertificate\x12\"\n" + - "\n" + - "client_key\x18f \x01(\tB\x03\xe0A\x03R\tclientKey\"S\n" + - "\x17ClientCertificateConfig\x128\n" + - "\x18issue_client_certificate\x18\x01 \x01(\bR\x16issueClientCertificate\"\xd9\r\n" + - "\fAddonsConfig\x12V\n" + - "\x13http_load_balancing\x18\x01 \x01(\v2&.google.container.v1.HttpLoadBalancingR\x11httpLoadBalancing\x12k\n" + - "\x1ahorizontal_pod_autoscaling\x18\x02 \x01(\v2-.google.container.v1.HorizontalPodAutoscalingR\x18horizontalPodAutoscaling\x12_\n" + - "\x14kubernetes_dashboard\x18\x03 \x01(\v2(.google.container.v1.KubernetesDashboardB\x02\x18\x01R\x13kubernetesDashboard\x12\\\n" + - "\x15network_policy_config\x18\x04 \x01(\v2(.google.container.v1.NetworkPolicyConfigR\x13networkPolicyConfig\x12M\n" + - "\x10cloud_run_config\x18\a \x01(\v2#.google.container.v1.CloudRunConfigR\x0ecloudRunConfig\x12M\n" + - "\x10dns_cache_config\x18\b \x01(\v2#.google.container.v1.DnsCacheConfigR\x0ednsCacheConfig\x12b\n" + - "\x17config_connector_config\x18\n" + - " \x01(\v2*.google.container.v1.ConfigConnectorConfigR\x15configConnectorConfig\x12\x86\x01\n" + - "%gce_persistent_disk_csi_driver_config\x18\v \x01(\v25.google.container.v1.GcePersistentDiskCsiDriverConfigR gcePersistentDiskCsiDriverConfig\x12v\n" + - "\x1fgcp_filestore_csi_driver_config\x18\x0e \x01(\v20.google.container.v1.GcpFilestoreCsiDriverConfigR\x1bgcpFilestoreCsiDriverConfig\x12`\n" + - "\x17gke_backup_agent_config\x18\x10 \x01(\v2).google.container.v1.GkeBackupAgentConfigR\x14gkeBackupAgentConfig\x12g\n" + - "\x1agcs_fuse_csi_driver_config\x18\x11 \x01(\v2+.google.container.v1.GcsFuseCsiDriverConfigR\x16gcsFuseCsiDriverConfig\x12X\n" + - "\x12stateful_ha_config\x18\x12 \x01(\v2%.google.container.v1.StatefulHAConfigB\x03\xe0A\x01R\x10statefulHaConfig\x12x\n" + - "\x1fparallelstore_csi_driver_config\x18\x13 \x01(\v21.google.container.v1.ParallelstoreCsiDriverConfigR\x1cparallelstoreCsiDriverConfig\x12[\n" + - "\x13ray_operator_config\x18\x15 \x01(\v2&.google.container.v1.RayOperatorConfigB\x03\xe0A\x01R\x11rayOperatorConfig\x12x\n" + - "\x1fhigh_scale_checkpointing_config\x18\x16 \x01(\v21.google.container.v1.HighScaleCheckpointingConfigR\x1chighScaleCheckpointingConfig\x12c\n" + - "\x18lustre_csi_driver_config\x18\x17 \x01(\v2*.google.container.v1.LustreCsiDriverConfigR\x15lustreCsiDriverConfig\x12g\n" + - "\x17slice_controller_config\x18\x1a \x01(\v2*.google.container.v1.SliceControllerConfigB\x03\xe0A\x01R\x15sliceControllerConfig\"/\n" + - "\x11HttpLoadBalancing\x12\x1a\n" + - "\bdisabled\x18\x01 \x01(\bR\bdisabled\"6\n" + - "\x18HorizontalPodAutoscaling\x12\x1a\n" + - "\bdisabled\x18\x01 \x01(\bR\bdisabled\"1\n" + - "\x13KubernetesDashboard\x12\x1a\n" + - "\bdisabled\x18\x01 \x01(\bR\bdisabled\"1\n" + - "\x13NetworkPolicyConfig\x12\x1a\n" + - "\bdisabled\x18\x01 \x01(\bR\bdisabled\"*\n" + - "\x0eDnsCacheConfig\x12\x18\n" + - "\aenabled\x18\x01 \x01(\bR\aenabled\"B\n" + - "&PrivateClusterMasterGlobalAccessConfig\x12\x18\n" + - "\aenabled\x18\x01 \x01(\bR\aenabled\"\x8b\x04\n" + - "\x14PrivateClusterConfig\x124\n" + - "\x14enable_private_nodes\x18\x01 \x01(\bB\x02\x18\x01R\x12enablePrivateNodes\x12:\n" + - "\x17enable_private_endpoint\x18\x02 \x01(\bB\x02\x18\x01R\x15enablePrivateEndpoint\x123\n" + - "\x16master_ipv4_cidr_block\x18\x03 \x01(\tR\x13masterIpv4CidrBlock\x120\n" + - "\x10private_endpoint\x18\x04 \x01(\tB\x05\xe0A\x03\x18\x01R\x0fprivateEndpoint\x12.\n" + - "\x0fpublic_endpoint\x18\x05 \x01(\tB\x05\xe0A\x03\x18\x01R\x0epublicEndpoint\x12&\n" + - "\fpeering_name\x18\a \x01(\tB\x03\xe0A\x03R\vpeeringName\x12~\n" + - "\x1bmaster_global_access_config\x18\b \x01(\v2;.google.container.v1.PrivateClusterMasterGlobalAccessConfigB\x02\x18\x01R\x18masterGlobalAccessConfig\x12B\n" + - "\x1bprivate_endpoint_subnetwork\x18\n" + - " \x01(\tB\x02\x18\x01R\x19privateEndpointSubnetwork\"\\\n" + - "\x19AuthenticatorGroupsConfig\x12\x18\n" + - "\aenabled\x18\x01 \x01(\bR\aenabled\x12%\n" + - "\x0esecurity_group\x18\x02 \x01(\tR\rsecurityGroup\"\x8a\x02\n" + - "\x0eCloudRunConfig\x12\x1a\n" + - "\bdisabled\x18\x01 \x01(\bR\bdisabled\x12b\n" + - "\x12load_balancer_type\x18\x03 \x01(\x0e24.google.container.v1.CloudRunConfig.LoadBalancerTypeR\x10loadBalancerType\"x\n" + - "\x10LoadBalancerType\x12\"\n" + - "\x1eLOAD_BALANCER_TYPE_UNSPECIFIED\x10\x00\x12\x1f\n" + - "\x1bLOAD_BALANCER_TYPE_EXTERNAL\x10\x01\x12\x1f\n" + - "\x1bLOAD_BALANCER_TYPE_INTERNAL\x10\x02\"1\n" + - "\x15ConfigConnectorConfig\x12\x18\n" + - "\aenabled\x18\x01 \x01(\bR\aenabled\"<\n" + - " GcePersistentDiskCsiDriverConfig\x12\x18\n" + - "\aenabled\x18\x01 \x01(\bR\aenabled\"7\n" + - "\x1bGcpFilestoreCsiDriverConfig\x12\x18\n" + - "\aenabled\x18\x01 \x01(\bR\aenabled\"2\n" + - "\x16GcsFuseCsiDriverConfig\x12\x18\n" + - "\aenabled\x18\x01 \x01(\bR\aenabled\"8\n" + - "\x1cParallelstoreCsiDriverConfig\x12\x18\n" + - "\aenabled\x18\x01 \x01(\bR\aenabled\"8\n" + - "\x1cHighScaleCheckpointingConfig\x12\x18\n" + - "\aenabled\x18\x01 \x01(\bR\aenabled\"p\n" + - "\x15LustreCsiDriverConfig\x12\x18\n" + - "\aenabled\x18\x01 \x01(\bR\aenabled\x12=\n" + - "\x19enable_legacy_lustre_port\x18\x03 \x01(\bB\x02\x18\x01R\x16enableLegacyLustrePort\"6\n" + - "\x15SliceControllerConfig\x12\x1d\n" + - "\aenabled\x18\x01 \x01(\bB\x03\xe0A\x01R\aenabled\"\x96\x02\n" + - "\x11RayOperatorConfig\x12\x18\n" + - "\aenabled\x18\x01 \x01(\bR\aenabled\x12n\n" + - "\x1aray_cluster_logging_config\x18\x02 \x01(\v2,.google.container.v1.RayClusterLoggingConfigB\x03\xe0A\x01R\x17rayClusterLoggingConfig\x12w\n" + - "\x1dray_cluster_monitoring_config\x18\x03 \x01(\v2/.google.container.v1.RayClusterMonitoringConfigB\x03\xe0A\x01R\x1arayClusterMonitoringConfig\"0\n" + - "\x14GkeBackupAgentConfig\x12\x18\n" + - "\aenabled\x18\x01 \x01(\bR\aenabled\",\n" + - "\x10StatefulHAConfig\x12\x18\n" + - "\aenabled\x18\x01 \x01(\bR\aenabled\"\xd7\x03\n" + - "\x1eMasterAuthorizedNetworksConfig\x12\x18\n" + - "\aenabled\x18\x01 \x01(\bR\aenabled\x12^\n" + - "\vcidr_blocks\x18\x02 \x03(\v2=.google.container.v1.MasterAuthorizedNetworksConfig.CidrBlockR\n" + - "cidrBlocks\x12I\n" + - "\x1fgcp_public_cidrs_access_enabled\x18\x03 \x01(\bH\x00R\x1bgcpPublicCidrsAccessEnabled\x88\x01\x01\x12T\n" + - "$private_endpoint_enforcement_enabled\x18\x05 \x01(\bH\x01R!privateEndpointEnforcementEnabled\x88\x01\x01\x1aM\n" + - "\tCidrBlock\x12!\n" + - "\fdisplay_name\x18\x01 \x01(\tR\vdisplayName\x12\x1d\n" + - "\n" + - "cidr_block\x18\x02 \x01(\tR\tcidrBlockB\"\n" + - " _gcp_public_cidrs_access_enabledB'\n" + - "%_private_endpoint_enforcement_enabled\"&\n" + - "\n" + - "LegacyAbac\x12\x18\n" + - "\aenabled\x18\x01 \x01(\bR\aenabled\"\xa4\x01\n" + - "\rNetworkPolicy\x12G\n" + - "\bprovider\x18\x01 \x01(\x0e2+.google.container.v1.NetworkPolicy.ProviderR\bprovider\x12\x18\n" + - "\aenabled\x18\x02 \x01(\bR\aenabled\"0\n" + - "\bProvider\x12\x18\n" + - "\x14PROVIDER_UNSPECIFIED\x10\x00\x12\n" + - "\n" + - "\x06CALICO\x10\x01\"\xfc\x01\n" + - "\x13BinaryAuthorization\x12\x1c\n" + - "\aenabled\x18\x01 \x01(\bB\x02\x18\x01R\aenabled\x12`\n" + - "\x0fevaluation_mode\x18\x02 \x01(\x0e27.google.container.v1.BinaryAuthorization.EvaluationModeR\x0eevaluationMode\"e\n" + - "\x0eEvaluationMode\x12\x1f\n" + - "\x1bEVALUATION_MODE_UNSPECIFIED\x10\x00\x12\f\n" + - "\bDISABLED\x10\x01\x12$\n" + - " PROJECT_SINGLETON_POLICY_ENFORCE\x10\x02\"6\n" + - "\x1aPodCIDROverprovisionConfig\x12\x18\n" + - "\adisable\x18\x01 \x01(\bR\adisable\"\xf5\v\n" + - "\x12IPAllocationPolicy\x12$\n" + - "\x0euse_ip_aliases\x18\x01 \x01(\bR\fuseIpAliases\x12+\n" + - "\x11create_subnetwork\x18\x02 \x01(\bR\x10createSubnetwork\x12'\n" + - "\x0fsubnetwork_name\x18\x03 \x01(\tR\x0esubnetworkName\x12.\n" + - "\x11cluster_ipv4_cidr\x18\x04 \x01(\tB\x02\x18\x01R\x0fclusterIpv4Cidr\x12(\n" + - "\x0enode_ipv4_cidr\x18\x05 \x01(\tB\x02\x18\x01R\fnodeIpv4Cidr\x120\n" + - "\x12services_ipv4_cidr\x18\x06 \x01(\tB\x02\x18\x01R\x10servicesIpv4Cidr\x12?\n" + - "\x1ccluster_secondary_range_name\x18\a \x01(\tR\x19clusterSecondaryRangeName\x12A\n" + - "\x1dservices_secondary_range_name\x18\b \x01(\tR\x1aservicesSecondaryRangeName\x125\n" + - "\x17cluster_ipv4_cidr_block\x18\t \x01(\tR\x14clusterIpv4CidrBlock\x12/\n" + - "\x14node_ipv4_cidr_block\x18\n" + - " \x01(\tR\x11nodeIpv4CidrBlock\x127\n" + - "\x18services_ipv4_cidr_block\x18\v \x01(\tR\x15servicesIpv4CidrBlock\x121\n" + - "\x13tpu_ipv4_cidr_block\x18\r \x01(\tB\x02\x18\x01R\x10tpuIpv4CidrBlock\x12\x1d\n" + - "\n" + - "use_routes\x18\x0f \x01(\bR\tuseRoutes\x12=\n" + - "\n" + - "stack_type\x18\x10 \x01(\x0e2\x1e.google.container.v1.StackTypeR\tstackType\x12M\n" + - "\x10ipv6_access_type\x18\x11 \x01(\x0e2#.google.container.v1.IPv6AccessTypeR\x0eipv6AccessType\x12r\n" + - "\x1dpod_cidr_overprovision_config\x18\x15 \x01(\v2/.google.container.v1.PodCIDROverprovisionConfigR\x1apodCidrOverprovisionConfig\x128\n" + - "\x16subnet_ipv6_cidr_block\x18\x16 \x01(\tB\x03\xe0A\x03R\x13subnetIpv6CidrBlock\x12<\n" + - "\x18services_ipv6_cidr_block\x18\x17 \x01(\tB\x03\xe0A\x03R\x15servicesIpv6CidrBlock\x12t\n" + - "\x1cadditional_pod_ranges_config\x18\x18 \x01(\v2..google.container.v1.AdditionalPodRangesConfigB\x03\xe0A\x03R\x19additionalPodRangesConfig\x12O\n" + - "\"default_pod_ipv4_range_utilization\x18\x19 \x01(\x01B\x03\xe0A\x03R\x1edefaultPodIpv4RangeUtilization\x12s\n" + - "\x1cadditional_ip_ranges_configs\x18\x1d \x03(\v2-.google.container.v1.AdditionalIPRangesConfigB\x03\xe0A\x03R\x19additionalIpRangesConfigs\x12R\n" + - "\x10auto_ipam_config\x18\x1e \x01(\v2#.google.container.v1.AutoIpamConfigB\x03\xe0A\x01R\x0eautoIpamConfig\x12V\n" + - "\x13network_tier_config\x18\x1f \x01(\v2&.google.container.v1.NetworkTierConfigR\x11networkTierConfig\"\xe6-\n" + - "\aCluster\x12\x12\n" + - "\x04name\x18\x01 \x01(\tR\x04name\x12 \n" + - "\vdescription\x18\x02 \x01(\tR\vdescription\x120\n" + - "\x12initial_node_count\x18\x03 \x01(\x05B\x02\x18\x01R\x10initialNodeCount\x12D\n" + - "\vnode_config\x18\x04 \x01(\v2\x1f.google.container.v1.NodeConfigB\x02\x18\x01R\n" + - "nodeConfig\x12@\n" + - "\vmaster_auth\x18\x05 \x01(\v2\x1f.google.container.v1.MasterAuthR\n" + - "masterAuth\x12'\n" + - "\x0flogging_service\x18\x06 \x01(\tR\x0eloggingService\x12-\n" + - "\x12monitoring_service\x18\a \x01(\tR\x11monitoringService\x12\x18\n" + - "\anetwork\x18\b \x01(\tR\anetwork\x12*\n" + - "\x11cluster_ipv4_cidr\x18\t \x01(\tR\x0fclusterIpv4Cidr\x12F\n" + - "\raddons_config\x18\n" + - " \x01(\v2!.google.container.v1.AddonsConfigR\faddonsConfig\x12\x1e\n" + - "\n" + - "subnetwork\x18\v \x01(\tR\n" + - "subnetwork\x12<\n" + - "\n" + - "node_pools\x18\f \x03(\v2\x1d.google.container.v1.NodePoolR\tnodePools\x12\x1c\n" + - "\tlocations\x18\r \x03(\tR\tlocations\x126\n" + - "\x17enable_kubernetes_alpha\x18\x0e \x01(\bR\x15enableKubernetesAlpha\x12>\n" + - "\x1balpha_cluster_feature_gates\x18\xa0\x01 \x03(\tR\x18alphaClusterFeatureGates\x12Y\n" + - "\x0fresource_labels\x18\x0f \x03(\v20.google.container.v1.Cluster.ResourceLabelsEntryR\x0eresourceLabels\x12+\n" + - "\x11label_fingerprint\x18\x10 \x01(\tR\x10labelFingerprint\x12@\n" + - "\vlegacy_abac\x18\x12 \x01(\v2\x1f.google.container.v1.LegacyAbacR\n" + - "legacyAbac\x12I\n" + - "\x0enetwork_policy\x18\x13 \x01(\v2\".google.container.v1.NetworkPolicyR\rnetworkPolicy\x12Y\n" + - "\x14ip_allocation_policy\x18\x14 \x01(\v2'.google.container.v1.IPAllocationPolicyR\x12ipAllocationPolicy\x12\x82\x01\n" + - "!master_authorized_networks_config\x18\x16 \x01(\v23.google.container.v1.MasterAuthorizedNetworksConfigB\x02\x18\x01R\x1emasterAuthorizedNetworksConfig\x12U\n" + - "\x12maintenance_policy\x18\x17 \x01(\v2&.google.container.v1.MaintenancePolicyR\x11maintenancePolicy\x12[\n" + - "\x14binary_authorization\x18\x18 \x01(\v2(.google.container.v1.BinaryAuthorizationR\x13binaryAuthorization\x12I\n" + - "\vautoscaling\x18\x1a \x01(\v2'.google.container.v1.ClusterAutoscalingR\vautoscaling\x12I\n" + - "\x0enetwork_config\x18\x1b \x01(\v2\".google.container.v1.NetworkConfigR\rnetworkConfig\x12e\n" + - "\x1bdefault_max_pods_constraint\x18\x1e \x01(\v2&.google.container.v1.MaxPodsConstraintR\x18defaultMaxPodsConstraint\x12o\n" + - "\x1cresource_usage_export_config\x18! \x01(\v2..google.container.v1.ResourceUsageExportConfigR\x19resourceUsageExportConfig\x12n\n" + - "\x1bauthenticator_groups_config\x18\" \x01(\v2..google.container.v1.AuthenticatorGroupsConfigR\x19authenticatorGroupsConfig\x12_\n" + - "\x16private_cluster_config\x18% \x01(\v2).google.container.v1.PrivateClusterConfigR\x14privateClusterConfig\x12X\n" + - "\x13database_encryption\x18& \x01(\v2'.google.container.v1.DatabaseEncryptionR\x12databaseEncryption\x12e\n" + - "\x18vertical_pod_autoscaling\x18' \x01(\v2+.google.container.v1.VerticalPodAutoscalingR\x16verticalPodAutoscaling\x12I\n" + - "\x0eshielded_nodes\x18( \x01(\v2\".google.container.v1.ShieldedNodesR\rshieldedNodes\x12L\n" + - "\x0frelease_channel\x18) \x01(\v2#.google.container.v1.ReleaseChannelR\x0ereleaseChannel\x12e\n" + - "\x18workload_identity_config\x18+ \x01(\v2+.google.container.v1.WorkloadIdentityConfigR\x16workloadIdentityConfig\x12R\n" + - "\x11mesh_certificates\x18C \x01(\v2%.google.container.v1.MeshCertificatesR\x10meshCertificates\x12_\n" + - "\x16cost_management_config\x18- \x01(\v2).google.container.v1.CostManagementConfigR\x14costManagementConfig\x12X\n" + - "\x13notification_config\x181 \x01(\v2'.google.container.v1.NotificationConfigR\x12notificationConfig\x12U\n" + - "\x12confidential_nodes\x182 \x01(\v2&.google.container.v1.ConfidentialNodesR\x11confidentialNodes\x12b\n" + - "\x17identity_service_config\x186 \x01(\v2*.google.container.v1.IdentityServiceConfigR\x15identityServiceConfig\x12 \n" + - "\tself_link\x18d \x01(\tB\x03\xe0A\x03R\bselfLink\x12\x19\n" + - "\x04zone\x18e \x01(\tB\x05\xe0A\x03\x18\x01R\x04zone\x12\x1f\n" + - "\bendpoint\x18f \x01(\tB\x03\xe0A\x03R\bendpoint\x126\n" + - "\x17initial_cluster_version\x18g \x01(\tR\x15initialClusterVersion\x129\n" + - "\x16current_master_version\x18h \x01(\tB\x03\xe0A\x03R\x14currentMasterVersion\x127\n" + - "\x14current_node_version\x18i \x01(\tB\x05\xe0A\x03\x18\x01R\x12currentNodeVersion\x12$\n" + - "\vcreate_time\x18j \x01(\tB\x03\xe0A\x03R\n" + - "createTime\x12@\n" + - "\x06status\x18k \x01(\x0e2#.google.container.v1.Cluster.StatusB\x03\xe0A\x03R\x06status\x12,\n" + - "\x0estatus_message\x18l \x01(\tB\x05\xe0A\x03\x18\x01R\rstatusMessage\x122\n" + - "\x13node_ipv4_cidr_size\x18m \x01(\x05B\x03\xe0A\x03R\x10nodeIpv4CidrSize\x121\n" + - "\x12services_ipv4_cidr\x18n \x01(\tB\x03\xe0A\x03R\x10servicesIpv4Cidr\x125\n" + - "\x13instance_group_urls\x18o \x03(\tB\x05\xe0A\x03\x18\x01R\x11instanceGroupUrls\x123\n" + - "\x12current_node_count\x18p \x01(\x05B\x05\xe0A\x03\x18\x01R\x10currentNodeCount\x12$\n" + - "\vexpire_time\x18q \x01(\tB\x03\xe0A\x03R\n" + - "expireTime\x12\x1f\n" + - "\blocation\x18r \x01(\tB\x03\xe0A\x03R\blocation\x12!\n" + - "\n" + - "enable_tpu\x18s \x01(\bB\x02\x18\x01R\tenableTpu\x124\n" + - "\x13tpu_ipv4_cidr_block\x18t \x01(\tB\x05\xe0A\x03\x18\x01R\x10tpuIpv4CidrBlock\x12D\n" + - "\n" + - "conditions\x18v \x03(\v2$.google.container.v1.StatusConditionR\n" + - "conditions\x12=\n" + - "\tautopilot\x18\x80\x01 \x01(\v2\x1e.google.container.v1.AutopilotR\tautopilot\x12\x14\n" + - "\x02id\x18\x81\x01 \x01(\tB\x03\xe0A\x03R\x02id\x12Y\n" + - "\x12node_pool_defaults\x18\x83\x01 \x01(\v2%.google.container.v1.NodePoolDefaultsH\x00R\x10nodePoolDefaults\x88\x01\x01\x12J\n" + - "\x0elogging_config\x18\x84\x01 \x01(\v2\".google.container.v1.LoggingConfigR\rloggingConfig\x12S\n" + - "\x11monitoring_config\x18\x85\x01 \x01(\v2%.google.container.v1.MonitoringConfigR\x10monitoringConfig\x12[\n" + - "\x15node_pool_auto_config\x18\x88\x01 \x01(\v2'.google.container.v1.NodePoolAutoConfigR\x12nodePoolAutoConfig\x12M\n" + - "\x0fpod_autoscaling\x18\x8a\x01 \x01(\v2#.google.container.v1.PodAutoscalingR\x0epodAutoscaling\x12\x13\n" + - "\x04etag\x18\x8b\x01 \x01(\tR\x04etag\x121\n" + - "\x05fleet\x18\x8c\x01 \x01(\v2\x1a.google.container.v1.FleetR\x05fleet\x12c\n" + - "\x17security_posture_config\x18\x91\x01 \x01(\v2*.google.container.v1.SecurityPostureConfigR\x15securityPostureConfig\x12v\n" + - "\x1econtrol_plane_endpoints_config\x18\x92\x01 \x01(\v20.google.container.v1.ControlPlaneEndpointsConfigR\x1bcontrolPlaneEndpointsConfig\x12W\n" + - "\x14enable_k8s_beta_apis\x18\x8f\x01 \x01(\v2%.google.container.v1.K8sBetaAPIConfigR\x11enableK8sBetaApis\x12W\n" + - "\x11enterprise_config\x18\x95\x01 \x01(\v2%.google.container.v1.EnterpriseConfigB\x02\x18\x01R\x10enterpriseConfig\x12]\n" + - "\x15secret_manager_config\x18\x96\x01 \x01(\v2(.google.container.v1.SecretManagerConfigR\x13secretManagerConfig\x12i\n" + - "\x19compliance_posture_config\x18\x97\x01 \x01(\v2,.google.container.v1.CompliancePostureConfigR\x17compliancePostureConfig\x12.\n" + - "\rsatisfies_pzs\x18\x98\x01 \x01(\bB\x03\xe0A\x03H\x01R\fsatisfiesPzs\x88\x01\x01\x12.\n" + - "\rsatisfies_pzi\x18\x99\x01 \x01(\bB\x03\xe0A\x03H\x02R\fsatisfiesPzi\x88\x01\x01\x12i\n" + - "\x18user_managed_keys_config\x18\x9a\x01 \x01(\v2*.google.container.v1.UserManagedKeysConfigH\x03R\x15userManagedKeysConfig\x88\x01\x01\x12\\\n" + - "\x13rbac_binding_config\x18\x9c\x01 \x01(\v2&.google.container.v1.RBACBindingConfigH\x04R\x11rbacBindingConfig\x88\x01\x01\x12a\n" + - "\x17gke_auto_upgrade_config\x18\xa3\x01 \x01(\v2).google.container.v1.GkeAutoUpgradeConfigR\x14gkeAutoUpgradeConfig\x12{\n" + - "\x1fanonymous_authentication_config\x18\xa4\x01 \x01(\v22.google.container.v1.AnonymousAuthenticationConfigR\x1danonymousAuthenticationConfig\x12r\n" + - "\x1cmanaged_opentelemetry_config\x18\xa8\x01 \x01(\v2/.google.container.v1.ManagedOpenTelemetryConfigR\x1amanagedOpentelemetryConfig\x1aA\n" + - "\x13ResourceLabelsEntry\x12\x10\n" + - "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" + - "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\"w\n" + - "\x06Status\x12\x16\n" + - "\x12STATUS_UNSPECIFIED\x10\x00\x12\x10\n" + - "\fPROVISIONING\x10\x01\x12\v\n" + - "\aRUNNING\x10\x02\x12\x0f\n" + - "\vRECONCILING\x10\x03\x12\f\n" + - "\bSTOPPING\x10\x04\x12\t\n" + - "\x05ERROR\x10\x05\x12\f\n" + - "\bDEGRADED\x10\x06B\x15\n" + - "\x13_node_pool_defaultsB\x10\n" + - "\x0e_satisfies_pzsB\x10\n" + - "\x0e_satisfies_pziB\x1b\n" + - "\x19_user_managed_keys_configB\x16\n" + - "\x14_rbac_binding_config\"\xc5\x02\n" + - "\x11RBACBindingConfig\x12g\n" + - ".enable_insecure_binding_system_unauthenticated\x18\x01 \x01(\bH\x00R*enableInsecureBindingSystemUnauthenticated\x88\x01\x01\x12c\n" + - ",enable_insecure_binding_system_authenticated\x18\x02 \x01(\bH\x01R(enableInsecureBindingSystemAuthenticated\x88\x01\x01B1\n" + - "/_enable_insecure_binding_system_unauthenticatedB/\n" + - "-_enable_insecure_binding_system_authenticated\"\xf3\x06\n" + - "\x15UserManagedKeysConfig\x12C\n" + - "\n" + - "cluster_ca\x18\n" + - " \x01(\tB$\xfaA!\n" + - "\x1fprivateca.googleapis.com/CaPoolR\tclusterCa\x12D\n" + - "\vetcd_api_ca\x18\v \x01(\tB$\xfaA!\n" + - "\x1fprivateca.googleapis.com/CaPoolR\tetcdApiCa\x12F\n" + - "\fetcd_peer_ca\x18\f \x01(\tB$\xfaA!\n" + - "\x1fprivateca.googleapis.com/CaPoolR\n" + - "etcdPeerCa\x12n\n" + - "\x1cservice_account_signing_keys\x18\r \x03(\tB-\xfaA*\n" + - "(cloudkms.googleapis.com/CryptoKeyVersionR\x19serviceAccountSigningKeys\x12x\n" + - "!service_account_verification_keys\x18\x0e \x03(\tB-\xfaA*\n" + - "(cloudkms.googleapis.com/CryptoKeyVersionR\x1eserviceAccountVerificationKeys\x12K\n" + - "\x0eaggregation_ca\x18\x0f \x01(\tB$\xfaA!\n" + - "\x1fprivateca.googleapis.com/CaPoolR\raggregationCa\x12w\n" + - "!control_plane_disk_encryption_key\x18\x10 \x01(\tB-\xfaA*\n" + - "(cloudkms.googleapis.com/CryptoKeyVersionR\x1dcontrolPlaneDiskEncryptionKey\x12^\n" + - "*control_plane_disk_encryption_key_versions\x18\x12 \x03(\tB\x03\xe0A\x03R%controlPlaneDiskEncryptionKeyVersions\x12w\n" + - "!gkeops_etcd_backup_encryption_key\x18\x11 \x01(\tB-\xfaA*\n" + - "(cloudkms.googleapis.com/CryptoKeyVersionR\x1dgkeopsEtcdBackupEncryptionKey\"\xa4\x01\n" + - "\x1dAnonymousAuthenticationConfig\x12K\n" + - "\x04mode\x18\x01 \x01(\x0e27.google.container.v1.AnonymousAuthenticationConfig.ModeR\x04mode\"6\n" + - "\x04Mode\x12\x14\n" + - "\x10MODE_UNSPECIFIED\x10\x00\x12\v\n" + - "\aENABLED\x10\x01\x12\v\n" + - "\aLIMITED\x10\x02\"\xdf\x02\n" + - "\x17CompliancePostureConfig\x12J\n" + - "\x04mode\x18\x01 \x01(\x0e21.google.container.v1.CompliancePostureConfig.ModeH\x00R\x04mode\x88\x01\x01\x12r\n" + - "\x14compliance_standards\x18\x02 \x03(\v2?.google.container.v1.CompliancePostureConfig.ComplianceStandardR\x13complianceStandards\x1aB\n" + - "\x12ComplianceStandard\x12\x1f\n" + - "\bstandard\x18\x01 \x01(\tH\x00R\bstandard\x88\x01\x01B\v\n" + - "\t_standard\"7\n" + - "\x04Mode\x12\x14\n" + - "\x10MODE_UNSPECIFIED\x10\x00\x12\f\n" + - "\bDISABLED\x10\x01\x12\v\n" + - "\aENABLED\x10\x02B\a\n" + - "\x05_mode\"5\n" + - "\x10K8sBetaAPIConfig\x12!\n" + - "\fenabled_apis\x18\x01 \x03(\tR\venabledApis\"\xc7\x03\n" + - "\x15SecurityPostureConfig\x12H\n" + - "\x04mode\x18\x01 \x01(\x0e2/.google.container.v1.SecurityPostureConfig.ModeH\x00R\x04mode\x88\x01\x01\x12p\n" + - "\x12vulnerability_mode\x18\x02 \x01(\x0e2<.google.container.v1.SecurityPostureConfig.VulnerabilityModeH\x01R\x11vulnerabilityMode\x88\x01\x01\"E\n" + - "\x04Mode\x12\x14\n" + - "\x10MODE_UNSPECIFIED\x10\x00\x12\f\n" + - "\bDISABLED\x10\x01\x12\t\n" + - "\x05BASIC\x10\x02\x12\x0e\n" + - "\n" + - "ENTERPRISE\x10\x03\"\x8a\x01\n" + - "\x11VulnerabilityMode\x12\"\n" + - "\x1eVULNERABILITY_MODE_UNSPECIFIED\x10\x00\x12\x1a\n" + - "\x16VULNERABILITY_DISABLED\x10\x01\x12\x17\n" + - "\x13VULNERABILITY_BASIC\x10\x02\x12\x1c\n" + - "\x18VULNERABILITY_ENTERPRISE\x10\x03B\a\n" + - "\x05_modeB\x15\n" + - "\x13_vulnerability_mode\"\xe6\x02\n" + - "\x12NodePoolAutoConfig\x12C\n" + - "\fnetwork_tags\x18\x01 \x01(\v2 .google.container.v1.NetworkTagsR\vnetworkTags\x12\\\n" + - "\x15resource_manager_tags\x18\x02 \x01(\v2(.google.container.v1.ResourceManagerTagsR\x13resourceManagerTags\x12V\n" + - "\x13node_kubelet_config\x18\x03 \x01(\v2&.google.container.v1.NodeKubeletConfigR\x11nodeKubeletConfig\x12U\n" + - "\x11linux_node_config\x18\x04 \x01(\v2$.google.container.v1.LinuxNodeConfigB\x03\xe0A\x03R\x0flinuxNodeConfig\"m\n" + - "\x10NodePoolDefaults\x12Y\n" + - "\x14node_config_defaults\x18\x01 \x01(\v2'.google.container.v1.NodeConfigDefaultsR\x12nodeConfigDefaults\"\xd5\x02\n" + - "\x12NodeConfigDefaults\x12@\n" + - "\vgcfs_config\x18\x01 \x01(\v2\x1f.google.container.v1.GcfsConfigR\n" + - "gcfsConfig\x12Q\n" + - "\x0elogging_config\x18\x03 \x01(\v2*.google.container.v1.NodePoolLoggingConfigR\rloggingConfig\x12R\n" + - "\x11containerd_config\x18\x04 \x01(\v2%.google.container.v1.ContainerdConfigR\x10containerdConfig\x12V\n" + - "\x13node_kubelet_config\x18\x06 \x01(\v2&.google.container.v1.NodeKubeletConfigR\x11nodeKubeletConfig\"\xfd>\n" + - "\rClusterUpdate\x120\n" + - "\x14desired_node_version\x18\x04 \x01(\tR\x12desiredNodeVersion\x12<\n" + - "\x1adesired_monitoring_service\x18\x05 \x01(\tR\x18desiredMonitoringService\x12U\n" + - "\x15desired_addons_config\x18\x06 \x01(\v2!.google.container.v1.AddonsConfigR\x13desiredAddonsConfig\x12/\n" + - "\x14desired_node_pool_id\x18\a \x01(\tR\x11desiredNodePoolId\x12,\n" + - "\x12desired_image_type\x18\b \x01(\tR\x10desiredImageType\x12g\n" + - "\x1bdesired_database_encryption\x18. \x01(\v2'.google.container.v1.DatabaseEncryptionR\x19desiredDatabaseEncryption\x12t\n" + - " desired_workload_identity_config\x18/ \x01(\v2+.google.container.v1.WorkloadIdentityConfigR\x1ddesiredWorkloadIdentityConfig\x12a\n" + - "\x19desired_mesh_certificates\x18C \x01(\v2%.google.container.v1.MeshCertificatesR\x17desiredMeshCertificates\x12X\n" + - "\x16desired_shielded_nodes\x180 \x01(\v2\".google.container.v1.ShieldedNodesR\x14desiredShieldedNodes\x12n\n" + - "\x1edesired_cost_management_config\x181 \x01(\v2).google.container.v1.CostManagementConfigR\x1bdesiredCostManagementConfig\x12L\n" + - "\x12desired_dns_config\x185 \x01(\v2\x1e.google.container.v1.DNSConfigR\x10desiredDnsConfig\x12k\n" + - "\x1ddesired_node_pool_autoscaling\x18\t \x01(\v2(.google.container.v1.NodePoolAutoscalingR\x1adesiredNodePoolAutoscaling\x12+\n" + - "\x11desired_locations\x18\n" + - " \x03(\tR\x10desiredLocations\x12\x91\x01\n" + - ")desired_master_authorized_networks_config\x18\f \x01(\v23.google.container.v1.MasterAuthorizedNetworksConfigB\x02\x18\x01R%desiredMasterAuthorizedNetworksConfig\x12g\n" + - "\x1bdesired_cluster_autoscaling\x18\x0f \x01(\v2'.google.container.v1.ClusterAutoscalingR\x19desiredClusterAutoscaling\x12j\n" + - "\x1cdesired_binary_authorization\x18\x10 \x01(\v2(.google.container.v1.BinaryAuthorizationR\x1adesiredBinaryAuthorization\x126\n" + - "\x17desired_logging_service\x18\x13 \x01(\tR\x15desiredLoggingService\x12~\n" + - "$desired_resource_usage_export_config\x18\x15 \x01(\v2..google.container.v1.ResourceUsageExportConfigR desiredResourceUsageExportConfig\x12t\n" + - " desired_vertical_pod_autoscaling\x18\x16 \x01(\v2+.google.container.v1.VerticalPodAutoscalingR\x1ddesiredVerticalPodAutoscaling\x12r\n" + - "\x1edesired_private_cluster_config\x18\x19 \x01(\v2).google.container.v1.PrivateClusterConfigB\x02\x18\x01R\x1bdesiredPrivateClusterConfig\x12~\n" + - "$desired_intra_node_visibility_config\x18\x1a \x01(\v2..google.container.v1.IntraNodeVisibilityConfigR desiredIntraNodeVisibilityConfig\x12e\n" + - "\x1bdesired_default_snat_status\x18\x1c \x01(\v2&.google.container.v1.DefaultSnatStatusR\x18desiredDefaultSnatStatus\x12[\n" + - "\x17desired_release_channel\x18\x1f \x01(\v2#.google.container.v1.ReleaseChannelR\x15desiredReleaseChannel\x12o\n" + - "\x1fdesired_l4ilb_subsetting_config\x18' \x01(\v2(.google.container.v1.ILBSubsettingConfigR\x1cdesiredL4ilbSubsettingConfig\x12a\n" + - "\x19desired_datapath_provider\x182 \x01(\x0e2%.google.container.v1.DatapathProviderR\x17desiredDatapathProvider\x12x\n" + - "\"desired_private_ipv6_google_access\x183 \x01(\x0e2,.google.container.v1.PrivateIPv6GoogleAccessR\x1edesiredPrivateIpv6GoogleAccess\x12g\n" + - "\x1bdesired_notification_config\x187 \x01(\v2'.google.container.v1.NotificationConfigR\x19desiredNotificationConfig\x12}\n" + - "#desired_authenticator_groups_config\x18? \x01(\v2..google.container.v1.AuthenticatorGroupsConfigR desiredAuthenticatorGroupsConfig\x12X\n" + - "\x16desired_logging_config\x18@ \x01(\v2\".google.container.v1.LoggingConfigR\x14desiredLoggingConfig\x12a\n" + - "\x19desired_monitoring_config\x18A \x01(\v2%.google.container.v1.MonitoringConfigR\x17desiredMonitoringConfig\x12q\n" + - "\x1fdesired_identity_service_config\x18B \x01(\v2*.google.container.v1.IdentityServiceConfigR\x1cdesiredIdentityServiceConfig\x12{\n" + - "#desired_service_external_ips_config\x18< \x01(\v2-.google.container.v1.ServiceExternalIPsConfigR\x1fdesiredServiceExternalIpsConfig\x12N\n" + - "\x1fdesired_enable_private_endpoint\x18G \x01(\bB\x02\x18\x01H\x00R\x1cdesiredEnablePrivateEndpoint\x88\x01\x01\x12S\n" + - "$desired_default_enable_private_nodes\x18H \x01(\bH\x01R desiredDefaultEnablePrivateNodes\x88\x01\x01\x12\x84\x01\n" + - "&desired_control_plane_endpoints_config\x18I \x01(\v20.google.container.v1.ControlPlaneEndpointsConfigR\"desiredControlPlaneEndpointsConfig\x124\n" + - "\x16desired_master_version\x18d \x01(\tR\x14desiredMasterVersion\x12O\n" + - "\x13desired_gcfs_config\x18m \x01(\v2\x1f.google.container.v1.GcfsConfigR\x11desiredGcfsConfig\x12z\n" + - "*desired_node_pool_auto_config_network_tags\x18n \x01(\v2 .google.container.v1.NetworkTagsR$desiredNodePoolAutoConfigNetworkTags\x12[\n" + - "\x17desired_pod_autoscaling\x18q \x01(\v2#.google.container.v1.PodAutoscalingR\x15desiredPodAutoscaling\x12b\n" + - "\x1adesired_gateway_api_config\x18r \x01(\v2%.google.container.v1.GatewayAPIConfigR\x17desiredGatewayApiConfig\x12\x12\n" + - "\x04etag\x18s \x01(\tR\x04etag\x12r\n" + - " desired_node_pool_logging_config\x18t \x01(\v2*.google.container.v1.NodePoolLoggingConfigR\x1cdesiredNodePoolLoggingConfig\x12?\n" + - "\rdesired_fleet\x18u \x01(\v2\x1a.google.container.v1.FleetR\fdesiredFleet\x12L\n" + - "\x12desired_stack_type\x18w \x01(\x0e2\x1e.google.container.v1.StackTypeR\x10desiredStackType\x12o\n" + - "\x1cadditional_pod_ranges_config\x18x \x01(\v2..google.container.v1.AdditionalPodRangesConfigR\x19additionalPodRangesConfig\x12~\n" + - "$removed_additional_pod_ranges_config\x18y \x01(\v2..google.container.v1.AdditionalPodRangesConfigR removedAdditionalPodRangesConfig\x12V\n" + - "\x14enable_k8s_beta_apis\x18z \x01(\v2%.google.container.v1.K8sBetaAPIConfigR\x11enableK8sBetaApis\x12q\n" + - "\x1fdesired_security_posture_config\x18| \x01(\v2*.google.container.v1.SecurityPostureConfigR\x1cdesiredSecurityPostureConfig\x12\x8f\x01\n" + - "\"desired_network_performance_config\x18} \x01(\v2B.google.container.v1.NetworkConfig.ClusterNetworkPerformanceConfigR\x1fdesiredNetworkPerformanceConfig\x12O\n" + - "\"desired_enable_fqdn_network_policy\x18~ \x01(\bH\x02R\x1edesiredEnableFqdnNetworkPolicy\x88\x01\x01\x12\x82\x01\n" + - "(desired_autopilot_workload_policy_config\x18\x80\x01 \x01(\v2).google.container.v1.WorkloadPolicyConfigR$desiredAutopilotWorkloadPolicyConfig\x12Y\n" + - "\x15desired_k8s_beta_apis\x18\x83\x01 \x01(\v2%.google.container.v1.K8sBetaAPIConfigR\x12desiredK8sBetaApis\x12b\n" + - "\x19desired_containerd_config\x18\x86\x01 \x01(\v2%.google.container.v1.ContainerdConfigR\x17desiredContainerdConfig\x12K\n" + - "\x1fdesired_enable_multi_networking\x18\x87\x01 \x01(\bH\x03R\x1cdesiredEnableMultiNetworking\x88\x01\x01\x12\x94\x01\n" + - "3desired_node_pool_auto_config_resource_manager_tags\x18\x88\x01 \x01(\v2(.google.container.v1.ResourceManagerTagsR,desiredNodePoolAutoConfigResourceManagerTags\x12\x84\x01\n" + - "$desired_in_transit_encryption_config\x18\x89\x01 \x01(\x0e2..google.container.v1.InTransitEncryptionConfigH\x04R desiredInTransitEncryptionConfig\x88\x01\x01\x12k\n" + - "0desired_enable_cilium_clusterwide_network_policy\x18\x8a\x01 \x01(\bH\x05R+desiredEnableCiliumClusterwideNetworkPolicy\x88\x01\x01\x12q\n" + - "\x1ddesired_secret_manager_config\x18\x8b\x01 \x01(\v2(.google.container.v1.SecretManagerConfigH\x06R\x1adesiredSecretManagerConfig\x88\x01\x01\x12}\n" + - "!desired_compliance_posture_config\x18\x8c\x01 \x01(\v2,.google.container.v1.CompliancePostureConfigH\aR\x1edesiredCompliancePostureConfig\x88\x01\x01\x12f\n" + - "\x1bdesired_node_kubelet_config\x18\x8d\x01 \x01(\v2&.google.container.v1.NodeKubeletConfigR\x18desiredNodeKubeletConfig\x12\x85\x01\n" + - ",desired_node_pool_auto_config_kubelet_config\x18\x8e\x01 \x01(\v2&.google.container.v1.NodeKubeletConfigR&desiredNodePoolAutoConfigKubeletConfig\x12h\n" + - "\x18user_managed_keys_config\x18\x8f\x01 \x01(\v2*.google.container.v1.UserManagedKeysConfigB\x02\x18\x01R\x15userManagedKeysConfig\x12k\n" + - "\x1bdesired_rbac_binding_config\x18\x90\x01 \x01(\v2&.google.container.v1.RBACBindingConfigH\bR\x18desiredRbacBindingConfig\x88\x01\x01\x12\x83\x01\n" + - "#desired_additional_ip_ranges_config\x18\x91\x01 \x01(\v24.google.container.v1.DesiredAdditionalIPRangesConfigR\x1fdesiredAdditionalIpRangesConfig\x12m\n" + - "\x19desired_enterprise_config\x18\x93\x01 \x01(\v2,.google.container.v1.DesiredEnterpriseConfigB\x02\x18\x01R\x17desiredEnterpriseConfig\x12]\n" + - "\x18desired_auto_ipam_config\x18\x94\x01 \x01(\v2#.google.container.v1.AutoIpamConfigR\x15desiredAutoIpamConfig\x12e\n" + - "-desired_disable_l4_lb_firewall_reconciliation\x18\x95\x01 \x01(\bH\tR(desiredDisableL4LbFirewallReconciliation\x88\x01\x01\x12\x88\x01\n" + - "/desired_node_pool_auto_config_linux_node_config\x18\x96\x01 \x01(\v2$.google.container.v1.LinuxNodeConfigR(desiredNodePoolAutoConfigLinuxNodeConfig\x12s\n" + - " desired_user_managed_keys_config\x18\x98\x01 \x01(\v2*.google.container.v1.UserManagedKeysConfigR\x1cdesiredUserManagedKeysConfig\x12\x8a\x01\n" + - "'desired_anonymous_authentication_config\x18\x9c\x01 \x01(\v22.google.container.v1.AnonymousAuthenticationConfigR$desiredAnonymousAuthenticationConfig\x12a\n" + - "\x17gke_auto_upgrade_config\x18\x9a\x01 \x01(\v2).google.container.v1.GkeAutoUpgradeConfigR\x14gkeAutoUpgradeConfig\x12f\n" + - "\x1bdesired_network_tier_config\x18\x9b\x01 \x01(\v2&.google.container.v1.NetworkTierConfigR\x18desiredNetworkTierConfig\x12~\n" + - "#desired_privileged_admission_config\x18\x9f\x01 \x01(\v2..google.container.v1.PrivilegedAdmissionConfigR desiredPrivilegedAdmissionConfig\x12\x81\x01\n" + - "$desired_managed_opentelemetry_config\x18\xa3\x01 \x01(\v2/.google.container.v1.ManagedOpenTelemetryConfigR!desiredManagedOpentelemetryConfigB\"\n" + - " _desired_enable_private_endpointB'\n" + - "%_desired_default_enable_private_nodesB%\n" + - "#_desired_enable_fqdn_network_policyB\"\n" + - " _desired_enable_multi_networkingB'\n" + - "%_desired_in_transit_encryption_configB3\n" + - "1_desired_enable_cilium_clusterwide_network_policyB \n" + - "\x1e_desired_secret_manager_configB$\n" + - "\"_desired_compliance_posture_configB\x1e\n" + - "\x1c_desired_rbac_binding_configB0\n" + - "._desired_disable_l4_lb_firewall_reconciliation\"\x8e\x01\n" + - "\x19AdditionalPodRangesConfig\x12&\n" + - "\x0fpod_range_names\x18\x01 \x03(\tR\rpodRangeNames\x12I\n" + - "\x0epod_range_info\x18\x02 \x03(\v2\x1e.google.container.v1.RangeInfoB\x03\xe0A\x03R\fpodRangeInfo\"\xf5\x01\n" + - "\x18AdditionalIPRangesConfig\x12\x1e\n" + - "\n" + - "subnetwork\x18\x01 \x01(\tR\n" + - "subnetwork\x12/\n" + - "\x14pod_ipv4_range_names\x18\x02 \x03(\tR\x11podIpv4RangeNames\x12L\n" + - "\x06status\x18\x03 \x01(\x0e24.google.container.v1.AdditionalIPRangesConfig.StatusR\x06status\":\n" + - "\x06Status\x12\x16\n" + - "\x12STATUS_UNSPECIFIED\x10\x00\x12\n" + - "\n" + - "\x06ACTIVE\x10\x01\x12\f\n" + - "\bDRAINING\x10\x02\"\x91\x01\n" + - "\x1fDesiredAdditionalIPRangesConfig\x12n\n" + - "\x1cadditional_ip_ranges_configs\x18\x01 \x03(\v2-.google.container.v1.AdditionalIPRangesConfigR\x19additionalIpRangesConfigs\";\n" + - "\x0eAutoIpamConfig\x12\x1d\n" + - "\aenabled\x18\x01 \x01(\bH\x00R\aenabled\x88\x01\x01B\n" + - "\n" + - "\b_enabled\"V\n" + - "\tRangeInfo\x12\"\n" + - "\n" + - "range_name\x18\x01 \x01(\tB\x03\xe0A\x03R\trangeName\x12%\n" + - "\vutilization\x18\x02 \x01(\x01B\x03\xe0A\x03R\vutilization\"s\n" + - "\x17DesiredEnterpriseConfig\x12T\n" + - "\fdesired_tier\x18\x01 \x01(\x0e21.google.container.v1.EnterpriseConfig.ClusterTierR\vdesiredTier:\x02\x18\x01\"\x8a\n" + - "\n" + - "\tOperation\x12\x17\n" + - "\x04name\x18\x01 \x01(\tB\x03\xe0A\x03R\x04name\x12\x19\n" + - "\x04zone\x18\x02 \x01(\tB\x05\xe0A\x03\x18\x01R\x04zone\x12O\n" + - "\x0eoperation_type\x18\x03 \x01(\x0e2#.google.container.v1.Operation.TypeB\x03\xe0A\x03R\roperationType\x12B\n" + - "\x06status\x18\x04 \x01(\x0e2%.google.container.v1.Operation.StatusB\x03\xe0A\x03R\x06status\x12\x1b\n" + - "\x06detail\x18\b \x01(\tB\x03\xe0A\x03R\x06detail\x12,\n" + - "\x0estatus_message\x18\x05 \x01(\tB\x05\xe0A\x03\x18\x01R\rstatusMessage\x12 \n" + - "\tself_link\x18\x06 \x01(\tB\x03\xe0A\x03R\bselfLink\x12$\n" + - "\vtarget_link\x18\a \x01(\tB\x03\xe0A\x03R\n" + - "targetLink\x12\x1f\n" + - "\blocation\x18\t \x01(\tB\x03\xe0A\x03R\blocation\x12\"\n" + - "\n" + - "start_time\x18\n" + - " \x01(\tB\x03\xe0A\x03R\tstartTime\x12\x1e\n" + - "\bend_time\x18\v \x01(\tB\x03\xe0A\x03R\aendTime\x12G\n" + - "\bprogress\x18\f \x01(\v2&.google.container.v1.OperationProgressB\x03\xe0A\x03R\bprogress\x12W\n" + - "\x12cluster_conditions\x18\r \x03(\v2$.google.container.v1.StatusConditionB\x02\x18\x01R\x11clusterConditions\x12Y\n" + - "\x13nodepool_conditions\x18\x0e \x03(\v2$.google.container.v1.StatusConditionB\x02\x18\x01R\x12nodepoolConditions\x12(\n" + - "\x05error\x18\x0f \x01(\v2\x12.google.rpc.StatusR\x05error\"R\n" + - "\x06Status\x12\x16\n" + - "\x12STATUS_UNSPECIFIED\x10\x00\x12\v\n" + - "\aPENDING\x10\x01\x12\v\n" + - "\aRUNNING\x10\x02\x12\b\n" + - "\x04DONE\x10\x03\x12\f\n" + - "\bABORTING\x10\x04\"\xc0\x03\n" + - "\x04Type\x12\x14\n" + - "\x10TYPE_UNSPECIFIED\x10\x00\x12\x12\n" + - "\x0eCREATE_CLUSTER\x10\x01\x12\x12\n" + - "\x0eDELETE_CLUSTER\x10\x02\x12\x12\n" + - "\x0eUPGRADE_MASTER\x10\x03\x12\x11\n" + - "\rUPGRADE_NODES\x10\x04\x12\x12\n" + - "\x0eREPAIR_CLUSTER\x10\x05\x12\x12\n" + - "\x0eUPDATE_CLUSTER\x10\x06\x12\x14\n" + - "\x10CREATE_NODE_POOL\x10\a\x12\x14\n" + - "\x10DELETE_NODE_POOL\x10\b\x12\x1c\n" + - "\x18SET_NODE_POOL_MANAGEMENT\x10\t\x12\x15\n" + - "\x11AUTO_REPAIR_NODES\x10\n" + - "\x12\x1a\n" + - "\x12AUTO_UPGRADE_NODES\x10\v\x1a\x02\b\x01\x12\x12\n" + - "\n" + - "SET_LABELS\x10\f\x1a\x02\b\x01\x12\x17\n" + - "\x0fSET_MASTER_AUTH\x10\r\x1a\x02\b\x01\x12\x16\n" + - "\x12SET_NODE_POOL_SIZE\x10\x0e\x12\x1a\n" + - "\x12SET_NETWORK_POLICY\x10\x0f\x1a\x02\b\x01\x12\x1e\n" + - "\x16SET_MAINTENANCE_POLICY\x10\x10\x1a\x02\b\x01\x12\x12\n" + - "\x0eRESIZE_CLUSTER\x10\x12\x12\x19\n" + - "\x15FLEET_FEATURE_UPGRADE\x10\x13\"\x85\x03\n" + - "\x11OperationProgress\x12\x12\n" + - "\x04name\x18\x01 \x01(\tR\x04name\x12=\n" + - "\x06status\x18\x02 \x01(\x0e2%.google.container.v1.Operation.StatusR\x06status\x12G\n" + - "\ametrics\x18\x03 \x03(\v2-.google.container.v1.OperationProgress.MetricR\ametrics\x12>\n" + - "\x06stages\x18\x04 \x03(\v2&.google.container.v1.OperationProgressR\x06stages\x1a\x93\x01\n" + - "\x06Metric\x12\x17\n" + - "\x04name\x18\x01 \x01(\tB\x03\xe0A\x02R\x04name\x12\x1d\n" + - "\tint_value\x18\x02 \x01(\x03H\x00R\bintValue\x12#\n" + - "\fdouble_value\x18\x03 \x01(\x01H\x00R\vdoubleValue\x12#\n" + - "\fstring_value\x18\x04 \x01(\tH\x00R\vstringValueB\a\n" + - "\x05value\"\xa6\x01\n" + - "\x14CreateClusterRequest\x12!\n" + - "\n" + - "project_id\x18\x01 \x01(\tB\x02\x18\x01R\tprojectId\x12\x16\n" + - "\x04zone\x18\x02 \x01(\tB\x02\x18\x01R\x04zone\x12;\n" + - "\acluster\x18\x03 \x01(\v2\x1c.google.container.v1.ClusterB\x03\xe0A\x02R\acluster\x12\x16\n" + - "\x06parent\x18\x05 \x01(\tR\x06parent\"\x85\x01\n" + - "\x11GetClusterRequest\x12!\n" + - "\n" + - "project_id\x18\x01 \x01(\tB\x02\x18\x01R\tprojectId\x12\x16\n" + - "\x04zone\x18\x02 \x01(\tB\x02\x18\x01R\x04zone\x12!\n" + - "\n" + - "cluster_id\x18\x03 \x01(\tB\x02\x18\x01R\tclusterId\x12\x12\n" + - "\x04name\x18\x05 \x01(\tR\x04name\"\xc9\x01\n" + - "\x14UpdateClusterRequest\x12!\n" + - "\n" + - "project_id\x18\x01 \x01(\tB\x02\x18\x01R\tprojectId\x12\x16\n" + - "\x04zone\x18\x02 \x01(\tB\x02\x18\x01R\x04zone\x12!\n" + - "\n" + - "cluster_id\x18\x03 \x01(\tB\x02\x18\x01R\tclusterId\x12?\n" + - "\x06update\x18\x04 \x01(\v2\".google.container.v1.ClusterUpdateB\x03\xe0A\x02R\x06update\x12\x12\n" + - "\x04name\x18\x05 \x01(\tR\x04name\"\xec\x11\n" + - "\x15UpdateNodePoolRequest\x12!\n" + - "\n" + - "project_id\x18\x01 \x01(\tB\x02\x18\x01R\tprojectId\x12\x16\n" + - "\x04zone\x18\x02 \x01(\tB\x02\x18\x01R\x04zone\x12!\n" + - "\n" + - "cluster_id\x18\x03 \x01(\tB\x02\x18\x01R\tclusterId\x12$\n" + - "\fnode_pool_id\x18\x04 \x01(\tB\x02\x18\x01R\n" + - "nodePoolId\x12&\n" + - "\fnode_version\x18\x05 \x01(\tB\x03\xe0A\x02R\vnodeVersion\x12\"\n" + - "\n" + - "image_type\x18\x06 \x01(\tB\x03\xe0A\x02R\timageType\x12\x12\n" + - "\x04name\x18\b \x01(\tR\x04name\x12\x1c\n" + - "\tlocations\x18\r \x03(\tR\tlocations\x12e\n" + - "\x18workload_metadata_config\x18\x0e \x01(\v2+.google.container.v1.WorkloadMetadataConfigR\x16workloadMetadataConfig\x12X\n" + - "\x10upgrade_settings\x18\x0f \x01(\v2-.google.container.v1.NodePool.UpgradeSettingsR\x0fupgradeSettings\x124\n" + - "\x04tags\x18\x10 \x01(\v2 .google.container.v1.NetworkTagsR\x04tags\x127\n" + - "\x06taints\x18\x11 \x01(\v2\x1f.google.container.v1.NodeTaintsR\x06taints\x127\n" + - "\x06labels\x18\x12 \x01(\v2\x1f.google.container.v1.NodeLabelsR\x06labels\x12P\n" + - "\x11linux_node_config\x18\x13 \x01(\v2$.google.container.v1.LinuxNodeConfigR\x0flinuxNodeConfig\x12M\n" + - "\x0ekubelet_config\x18\x14 \x01(\v2&.google.container.v1.NodeKubeletConfigR\rkubeletConfig\x12V\n" + - "\x13node_network_config\x18\x15 \x01(\v2&.google.container.v1.NodeNetworkConfigR\x11nodeNetworkConfig\x12@\n" + - "\vgcfs_config\x18\x16 \x01(\v2\x1f.google.container.v1.GcfsConfigR\n" + - "gcfsConfig\x12U\n" + - "\x12confidential_nodes\x18\x17 \x01(\v2&.google.container.v1.ConfidentialNodesR\x11confidentialNodes\x125\n" + - "\x05gvnic\x18\x1d \x01(\v2\x1f.google.container.v1.VirtualNICR\x05gvnic\x12\x12\n" + - "\x04etag\x18\x1e \x01(\tR\x04etag\x12@\n" + - "\vfast_socket\x18\x1f \x01(\v2\x1f.google.container.v1.FastSocketR\n" + - "fastSocket\x12Q\n" + - "\x0elogging_config\x18 \x01(\v2*.google.container.v1.NodePoolLoggingConfigR\rloggingConfig\x12L\n" + - "\x0fresource_labels\x18! \x01(\v2#.google.container.v1.ResourceLabelsR\x0eresourceLabels\x12V\n" + - "\x13windows_node_config\x18\" \x01(\v2&.google.container.v1.WindowsNodeConfigR\x11windowsNodeConfig\x12J\n" + - "\faccelerators\x18# \x03(\v2&.google.container.v1.AcceleratorConfigR\faccelerators\x12&\n" + - "\fmachine_type\x18$ \x01(\tB\x03\xe0A\x01R\vmachineType\x12 \n" + - "\tdisk_type\x18% \x01(\tB\x03\xe0A\x01R\bdiskType\x12%\n" + - "\fdisk_size_gb\x18& \x01(\x03B\x03\xe0A\x01R\n" + - "diskSizeGb\x12\\\n" + - "\x15resource_manager_tags\x18' \x01(\v2(.google.container.v1.ResourceManagerTagsR\x13resourceManagerTags\x12R\n" + - "\x11containerd_config\x18( \x01(\v2%.google.container.v1.ContainerdConfigR\x10containerdConfig\x12a\n" + - "\x13queued_provisioning\x18* \x01(\v20.google.container.v1.NodePool.QueuedProvisioningR\x12queuedProvisioning\x12#\n" + - "\rstorage_pools\x18+ \x03(\tR\fstoragePools\x12C\n" + - "\x10max_run_duration\x18- \x01(\v2\x19.google.protobuf.DurationR\x0emaxRunDuration\x12\"\n" + - "\n" + - "flex_start\x18. \x01(\bH\x00R\tflexStart\x88\x01\x01\x12:\n" + - "\tboot_disk\x18/ \x01(\v2\x1d.google.container.v1.BootDiskR\bbootDisk\x12Y\n" + - "\x11node_drain_config\x180 \x01(\v2-.google.container.v1.NodePool.NodeDrainConfigR\x0fnodeDrainConfig\x12J\n" + - "\x13consolidation_delay\x181 \x01(\v2\x19.google.protobuf.DurationR\x12consolidationDelayB\r\n" + - "\v_flex_start\"\x88\x02\n" + - "\x1dSetNodePoolAutoscalingRequest\x12!\n" + - "\n" + - "project_id\x18\x01 \x01(\tB\x02\x18\x01R\tprojectId\x12\x16\n" + - "\x04zone\x18\x02 \x01(\tB\x02\x18\x01R\x04zone\x12!\n" + - "\n" + - "cluster_id\x18\x03 \x01(\tB\x02\x18\x01R\tclusterId\x12$\n" + - "\fnode_pool_id\x18\x04 \x01(\tB\x02\x18\x01R\n" + - "nodePoolId\x12O\n" + - "\vautoscaling\x18\x05 \x01(\v2(.google.container.v1.NodePoolAutoscalingB\x03\xe0A\x02R\vautoscaling\x12\x12\n" + - "\x04name\x18\x06 \x01(\tR\x04name\"\xba\x01\n" + - "\x18SetLoggingServiceRequest\x12!\n" + - "\n" + - "project_id\x18\x01 \x01(\tB\x02\x18\x01R\tprojectId\x12\x16\n" + - "\x04zone\x18\x02 \x01(\tB\x02\x18\x01R\x04zone\x12!\n" + - "\n" + - "cluster_id\x18\x03 \x01(\tB\x02\x18\x01R\tclusterId\x12,\n" + - "\x0flogging_service\x18\x04 \x01(\tB\x03\xe0A\x02R\x0eloggingService\x12\x12\n" + - "\x04name\x18\x05 \x01(\tR\x04name\"\xc3\x01\n" + - "\x1bSetMonitoringServiceRequest\x12!\n" + - "\n" + - "project_id\x18\x01 \x01(\tB\x02\x18\x01R\tprojectId\x12\x16\n" + - "\x04zone\x18\x02 \x01(\tB\x02\x18\x01R\x04zone\x12!\n" + - "\n" + - "cluster_id\x18\x03 \x01(\tB\x02\x18\x01R\tclusterId\x122\n" + - "\x12monitoring_service\x18\x04 \x01(\tB\x03\xe0A\x02R\x11monitoringService\x12\x12\n" + - "\x04name\x18\x06 \x01(\tR\x04name\"\xd7\x01\n" + - "\x16SetAddonsConfigRequest\x12!\n" + - "\n" + - "project_id\x18\x01 \x01(\tB\x02\x18\x01R\tprojectId\x12\x16\n" + - "\x04zone\x18\x02 \x01(\tB\x02\x18\x01R\x04zone\x12!\n" + - "\n" + - "cluster_id\x18\x03 \x01(\tB\x02\x18\x01R\tclusterId\x12K\n" + - "\raddons_config\x18\x04 \x01(\v2!.google.container.v1.AddonsConfigB\x03\xe0A\x02R\faddonsConfig\x12\x12\n" + - "\x04name\x18\x06 \x01(\tR\x04name\"\xaa\x01\n" + - "\x13SetLocationsRequest\x12!\n" + - "\n" + - "project_id\x18\x01 \x01(\tB\x02\x18\x01R\tprojectId\x12\x16\n" + - "\x04zone\x18\x02 \x01(\tB\x02\x18\x01R\x04zone\x12!\n" + - "\n" + - "cluster_id\x18\x03 \x01(\tB\x02\x18\x01R\tclusterId\x12!\n" + - "\tlocations\x18\x04 \x03(\tB\x03\xe0A\x02R\tlocations\x12\x12\n" + - "\x04name\x18\x06 \x01(\tR\x04name\"\xb3\x01\n" + - "\x13UpdateMasterRequest\x12!\n" + - "\n" + - "project_id\x18\x01 \x01(\tB\x02\x18\x01R\tprojectId\x12\x16\n" + - "\x04zone\x18\x02 \x01(\tB\x02\x18\x01R\x04zone\x12!\n" + - "\n" + - "cluster_id\x18\x03 \x01(\tB\x02\x18\x01R\tclusterId\x12*\n" + - "\x0emaster_version\x18\x04 \x01(\tB\x03\xe0A\x02R\rmasterVersion\x12\x12\n" + - "\x04name\x18\a \x01(\tR\x04name\"\xe7\x02\n" + - "\x14SetMasterAuthRequest\x12!\n" + - "\n" + - "project_id\x18\x01 \x01(\tB\x02\x18\x01R\tprojectId\x12\x16\n" + - "\x04zone\x18\x02 \x01(\tB\x02\x18\x01R\x04zone\x12!\n" + - "\n" + - "cluster_id\x18\x03 \x01(\tB\x02\x18\x01R\tclusterId\x12M\n" + - "\x06action\x18\x04 \x01(\x0e20.google.container.v1.SetMasterAuthRequest.ActionB\x03\xe0A\x02R\x06action\x12<\n" + - "\x06update\x18\x05 \x01(\v2\x1f.google.container.v1.MasterAuthB\x03\xe0A\x02R\x06update\x12\x12\n" + - "\x04name\x18\a \x01(\tR\x04name\"P\n" + - "\x06Action\x12\v\n" + - "\aUNKNOWN\x10\x00\x12\x10\n" + - "\fSET_PASSWORD\x10\x01\x12\x15\n" + - "\x11GENERATE_PASSWORD\x10\x02\x12\x10\n" + - "\fSET_USERNAME\x10\x03\"\x88\x01\n" + - "\x14DeleteClusterRequest\x12!\n" + - "\n" + - "project_id\x18\x01 \x01(\tB\x02\x18\x01R\tprojectId\x12\x16\n" + - "\x04zone\x18\x02 \x01(\tB\x02\x18\x01R\x04zone\x12!\n" + - "\n" + - "cluster_id\x18\x03 \x01(\tB\x02\x18\x01R\tclusterId\x12\x12\n" + - "\x04name\x18\x04 \x01(\tR\x04name\"h\n" + - "\x13ListClustersRequest\x12!\n" + - "\n" + - "project_id\x18\x01 \x01(\tB\x02\x18\x01R\tprojectId\x12\x16\n" + - "\x04zone\x18\x02 \x01(\tB\x02\x18\x01R\x04zone\x12\x16\n" + - "\x06parent\x18\x04 \x01(\tR\x06parent\"u\n" + - "\x14ListClustersResponse\x128\n" + - "\bclusters\x18\x01 \x03(\v2\x1c.google.container.v1.ClusterR\bclusters\x12#\n" + - "\rmissing_zones\x18\x02 \x03(\tR\fmissingZones\"\x8b\x01\n" + - "\x13GetOperationRequest\x12!\n" + - "\n" + - "project_id\x18\x01 \x01(\tB\x02\x18\x01R\tprojectId\x12\x16\n" + - "\x04zone\x18\x02 \x01(\tB\x02\x18\x01R\x04zone\x12%\n" + - "\foperation_id\x18\x03 \x01(\tB\x02\x18\x01R\voperationId\x12\x12\n" + - "\x04name\x18\x05 \x01(\tR\x04name\"j\n" + - "\x15ListOperationsRequest\x12!\n" + - "\n" + - "project_id\x18\x01 \x01(\tB\x02\x18\x01R\tprojectId\x12\x16\n" + - "\x04zone\x18\x02 \x01(\tB\x02\x18\x01R\x04zone\x12\x16\n" + - "\x06parent\x18\x04 \x01(\tR\x06parent\"\x8e\x01\n" + - "\x16CancelOperationRequest\x12!\n" + - "\n" + - "project_id\x18\x01 \x01(\tB\x02\x18\x01R\tprojectId\x12\x16\n" + - "\x04zone\x18\x02 \x01(\tB\x02\x18\x01R\x04zone\x12%\n" + - "\foperation_id\x18\x03 \x01(\tB\x02\x18\x01R\voperationId\x12\x12\n" + - "\x04name\x18\x04 \x01(\tR\x04name\"}\n" + - "\x16ListOperationsResponse\x12>\n" + - "\n" + - "operations\x18\x01 \x03(\v2\x1e.google.container.v1.OperationR\n" + - "operations\x12#\n" + - "\rmissing_zones\x18\x02 \x03(\tR\fmissingZones\"g\n" + - "\x16GetServerConfigRequest\x12!\n" + - "\n" + - "project_id\x18\x01 \x01(\tB\x02\x18\x01R\tprojectId\x12\x16\n" + - "\x04zone\x18\x02 \x01(\tB\x02\x18\x01R\x04zone\x12\x12\n" + - "\x04name\x18\x04 \x01(\tR\x04name\"\xbe\x04\n" + - "\fServerConfig\x126\n" + - "\x17default_cluster_version\x18\x01 \x01(\tR\x15defaultClusterVersion\x12.\n" + - "\x13valid_node_versions\x18\x03 \x03(\tR\x11validNodeVersions\x12,\n" + - "\x12default_image_type\x18\x04 \x01(\tR\x10defaultImageType\x12*\n" + - "\x11valid_image_types\x18\x05 \x03(\tR\x0fvalidImageTypes\x122\n" + - "\x15valid_master_versions\x18\x06 \x03(\tR\x13validMasterVersions\x12R\n" + - "\bchannels\x18\t \x03(\v26.google.container.v1.ServerConfig.ReleaseChannelConfigR\bchannels\x1a\xe3\x01\n" + - "\x14ReleaseChannelConfig\x12E\n" + - "\achannel\x18\x01 \x01(\x0e2+.google.container.v1.ReleaseChannel.ChannelR\achannel\x12'\n" + - "\x0fdefault_version\x18\x02 \x01(\tR\x0edefaultVersion\x12%\n" + - "\x0evalid_versions\x18\x04 \x03(\tR\rvalidVersions\x124\n" + - "\x16upgrade_target_version\x18\x05 \x01(\tR\x14upgradeTargetVersion\"\xce\x01\n" + - "\x15CreateNodePoolRequest\x12!\n" + - "\n" + - "project_id\x18\x01 \x01(\tB\x02\x18\x01R\tprojectId\x12\x16\n" + - "\x04zone\x18\x02 \x01(\tB\x02\x18\x01R\x04zone\x12!\n" + - "\n" + - "cluster_id\x18\x03 \x01(\tB\x02\x18\x01R\tclusterId\x12?\n" + - "\tnode_pool\x18\x04 \x01(\v2\x1d.google.container.v1.NodePoolB\x03\xe0A\x02R\bnodePool\x12\x16\n" + - "\x06parent\x18\x06 \x01(\tR\x06parent\"\xaf\x01\n" + - "\x15DeleteNodePoolRequest\x12!\n" + - "\n" + - "project_id\x18\x01 \x01(\tB\x02\x18\x01R\tprojectId\x12\x16\n" + - "\x04zone\x18\x02 \x01(\tB\x02\x18\x01R\x04zone\x12!\n" + - "\n" + - "cluster_id\x18\x03 \x01(\tB\x02\x18\x01R\tclusterId\x12$\n" + - "\fnode_pool_id\x18\x04 \x01(\tB\x02\x18\x01R\n" + - "nodePoolId\x12\x12\n" + - "\x04name\x18\x06 \x01(\tR\x04name\"\x8c\x01\n" + - "\x14ListNodePoolsRequest\x12!\n" + - "\n" + - "project_id\x18\x01 \x01(\tB\x02\x18\x01R\tprojectId\x12\x16\n" + - "\x04zone\x18\x02 \x01(\tB\x02\x18\x01R\x04zone\x12!\n" + - "\n" + - "cluster_id\x18\x03 \x01(\tB\x02\x18\x01R\tclusterId\x12\x16\n" + - "\x06parent\x18\x05 \x01(\tR\x06parent\"\xac\x01\n" + - "\x12GetNodePoolRequest\x12!\n" + - "\n" + - "project_id\x18\x01 \x01(\tB\x02\x18\x01R\tprojectId\x12\x16\n" + - "\x04zone\x18\x02 \x01(\tB\x02\x18\x01R\x04zone\x12!\n" + - "\n" + - "cluster_id\x18\x03 \x01(\tB\x02\x18\x01R\tclusterId\x12$\n" + - "\fnode_pool_id\x18\x04 \x01(\tB\x02\x18\x01R\n" + - "nodePoolId\x12\x12\n" + - "\x04name\x18\x06 \x01(\tR\x04name\"\xf0\x05\n" + - "\x11BlueGreenSettings\x12v\n" + - "\x17standard_rollout_policy\x18\x01 \x01(\v2<.google.container.v1.BlueGreenSettings.StandardRolloutPolicyH\x00R\x15standardRolloutPolicy\x12|\n" + - "\x19autoscaled_rollout_policy\x18\x03 \x01(\v2>.google.container.v1.BlueGreenSettings.AutoscaledRolloutPolicyH\x00R\x17autoscaledRolloutPolicy\x12U\n" + - "\x17node_pool_soak_duration\x18\x02 \x01(\v2\x19.google.protobuf.DurationH\x01R\x14nodePoolSoakDuration\x88\x01\x01\x1a\xed\x01\n" + - "\x15StandardRolloutPolicy\x12+\n" + - "\x10batch_percentage\x18\x01 \x01(\x02H\x00R\x0fbatchPercentage\x12*\n" + - "\x10batch_node_count\x18\x02 \x01(\x05H\x00R\x0ebatchNodeCount\x12N\n" + - "\x13batch_soak_duration\x18\x03 \x01(\v2\x19.google.protobuf.DurationH\x01R\x11batchSoakDuration\x88\x01\x01B\x13\n" + - "\x11update_batch_sizeB\x16\n" + - "\x14_batch_soak_duration\x1ap\n" + - "\x17AutoscaledRolloutPolicy\x12U\n" + - "\x17wait_for_drain_duration\x18\x01 \x01(\v2\x19.google.protobuf.DurationB\x03\xe0A\x01R\x14waitForDrainDurationB\x10\n" + - "\x0erollout_policyB\x1a\n" + - "\x18_node_pool_soak_duration\"\xb1\x16\n" + - "\bNodePool\x12\x12\n" + - "\x04name\x18\x01 \x01(\tR\x04name\x127\n" + - "\x06config\x18\x02 \x01(\v2\x1f.google.container.v1.NodeConfigR\x06config\x12,\n" + - "\x12initial_node_count\x18\x03 \x01(\x05R\x10initialNodeCount\x12\x1c\n" + - "\tlocations\x18\r \x03(\tR\tlocations\x12M\n" + - "\x0enetwork_config\x18\x0e \x01(\v2&.google.container.v1.NodeNetworkConfigR\rnetworkConfig\x12 \n" + - "\tself_link\x18d \x01(\tB\x03\xe0A\x03R\bselfLink\x12\x18\n" + - "\aversion\x18e \x01(\tR\aversion\x123\n" + - "\x13instance_group_urls\x18f \x03(\tB\x03\xe0A\x03R\x11instanceGroupUrls\x12A\n" + - "\x06status\x18g \x01(\x0e2$.google.container.v1.NodePool.StatusB\x03\xe0A\x03R\x06status\x12,\n" + - "\x0estatus_message\x18h \x01(\tB\x05\xe0A\x03\x18\x01R\rstatusMessage\x12J\n" + - "\vautoscaling\x18\x04 \x01(\v2(.google.container.v1.NodePoolAutoscalingR\vautoscaling\x12C\n" + - "\n" + - "management\x18\x05 \x01(\v2#.google.container.v1.NodeManagementR\n" + - "management\x12V\n" + - "\x13max_pods_constraint\x18\x06 \x01(\v2&.google.container.v1.MaxPodsConstraintR\x11maxPodsConstraint\x12D\n" + - "\n" + - "conditions\x18i \x03(\v2$.google.container.v1.StatusConditionR\n" + - "conditions\x120\n" + - "\x12pod_ipv4_cidr_size\x18\a \x01(\x05B\x03\xe0A\x03R\x0fpodIpv4CidrSize\x12X\n" + - "\x10upgrade_settings\x18k \x01(\v2-.google.container.v1.NodePool.UpgradeSettingsR\x0fupgradeSettings\x12X\n" + - "\x10placement_policy\x18l \x01(\v2-.google.container.v1.NodePool.PlacementPolicyR\x0fplacementPolicy\x12N\n" + - "\vupdate_info\x18m \x01(\v2(.google.container.v1.NodePool.UpdateInfoB\x03\xe0A\x03R\n" + - "updateInfo\x12\x12\n" + - "\x04etag\x18n \x01(\tR\x04etag\x12a\n" + - "\x13queued_provisioning\x18p \x01(\v20.google.container.v1.NodePool.QueuedProvisioningR\x12queuedProvisioning\x12e\n" + - "\x18best_effort_provisioning\x18q \x01(\v2+.google.container.v1.BestEffortProvisioningR\x16bestEffortProvisioning\x12Y\n" + - "\x11node_drain_config\x18t \x01(\v2-.google.container.v1.NodePool.NodeDrainConfigR\x0fnodeDrainConfig\x1a\xa7\x02\n" + - "\x0fUpgradeSettings\x12\x1b\n" + - "\tmax_surge\x18\x01 \x01(\x05R\bmaxSurge\x12'\n" + - "\x0fmax_unavailable\x18\x02 \x01(\x05R\x0emaxUnavailable\x12L\n" + - "\bstrategy\x18\x03 \x01(\x0e2+.google.container.v1.NodePoolUpdateStrategyH\x00R\bstrategy\x88\x01\x01\x12[\n" + - "\x13blue_green_settings\x18\x04 \x01(\v2&.google.container.v1.BlueGreenSettingsH\x01R\x11blueGreenSettings\x88\x01\x01B\v\n" + - "\t_strategyB\x16\n" + - "\x14_blue_green_settings\x1a\xfa\x04\n" + - "\n" + - "UpdateInfo\x12^\n" + - "\x0fblue_green_info\x18\x01 \x01(\v26.google.container.v1.NodePool.UpdateInfo.BlueGreenInfoR\rblueGreenInfo\x1a\x8b\x04\n" + - "\rBlueGreenInfo\x12R\n" + - "\x05phase\x18\x01 \x01(\x0e2<.google.container.v1.NodePool.UpdateInfo.BlueGreenInfo.PhaseR\x05phase\x127\n" + - "\x18blue_instance_group_urls\x18\x02 \x03(\tR\x15blueInstanceGroupUrls\x129\n" + - "\x19green_instance_group_urls\x18\x03 \x03(\tR\x16greenInstanceGroupUrls\x12@\n" + - "\x1dblue_pool_deletion_start_time\x18\x04 \x01(\tR\x19bluePoolDeletionStartTime\x12,\n" + - "\x12green_pool_version\x18\x05 \x01(\tR\x10greenPoolVersion\"\xc1\x01\n" + - "\x05Phase\x12\x15\n" + - "\x11PHASE_UNSPECIFIED\x10\x00\x12\x12\n" + - "\x0eUPDATE_STARTED\x10\x01\x12\x17\n" + - "\x13CREATING_GREEN_POOL\x10\x02\x12\x17\n" + - "\x13CORDONING_BLUE_POOL\x10\x03\x12\x16\n" + - "\x12DRAINING_BLUE_POOL\x10\x04\x12\x15\n" + - "\x11NODE_POOL_SOAKING\x10\x05\x12\x16\n" + - "\x12DELETING_BLUE_POOL\x10\x06\x12\x14\n" + - "\x10ROLLBACK_STARTED\x10\a\x1a\xcd\x01\n" + - "\x0fPlacementPolicy\x12F\n" + - "\x04type\x18\x01 \x01(\x0e22.google.container.v1.NodePool.PlacementPolicy.TypeR\x04type\x12&\n" + - "\ftpu_topology\x18\x02 \x01(\tB\x03\xe0A\x01R\vtpuTopology\x12\x1f\n" + - "\vpolicy_name\x18\x03 \x01(\tR\n" + - "policyName\")\n" + - "\x04Type\x12\x14\n" + - "\x10TYPE_UNSPECIFIED\x10\x00\x12\v\n" + - "\aCOMPACT\x10\x01\x1a.\n" + - "\x12QueuedProvisioning\x12\x18\n" + - "\aenabled\x18\x01 \x01(\bR\aenabled\x1a\x91\x01\n" + - "\x0fNodeDrainConfig\x12T\n" + - "%respect_pdb_during_node_pool_deletion\x18\x03 \x01(\bH\x00R respectPdbDuringNodePoolDeletion\x88\x01\x01B(\n" + - "&_respect_pdb_during_node_pool_deletion\"\x81\x01\n" + - "\x06Status\x12\x16\n" + - "\x12STATUS_UNSPECIFIED\x10\x00\x12\x10\n" + - "\fPROVISIONING\x10\x01\x12\v\n" + - "\aRUNNING\x10\x02\x12\x16\n" + - "\x12RUNNING_WITH_ERROR\x10\x03\x12\x0f\n" + - "\vRECONCILING\x10\x04\x12\f\n" + - "\bSTOPPING\x10\x05\x12\t\n" + - "\x05ERROR\x10\x06\"\xa6\x01\n" + - "\x0eNodeManagement\x12!\n" + - "\fauto_upgrade\x18\x01 \x01(\bR\vautoUpgrade\x12\x1f\n" + - "\vauto_repair\x18\x02 \x01(\bR\n" + - "autoRepair\x12P\n" + - "\x0fupgrade_options\x18\n" + - " \x01(\v2'.google.container.v1.AutoUpgradeOptionsR\x0eupgradeOptions\"b\n" + - "\x16BestEffortProvisioning\x12\x18\n" + - "\aenabled\x18\x01 \x01(\bR\aenabled\x12.\n" + - "\x13min_provision_nodes\x18\x02 \x01(\x05R\x11minProvisionNodes\"w\n" + - "\x12AutoUpgradeOptions\x12:\n" + - "\x17auto_upgrade_start_time\x18\x01 \x01(\tB\x03\xe0A\x03R\x14autoUpgradeStartTime\x12%\n" + - "\vdescription\x18\x02 \x01(\tB\x03\xe0A\x03R\vdescription\"~\n" + - "\x11MaintenancePolicy\x12>\n" + - "\x06window\x18\x01 \x01(\v2&.google.container.v1.MaintenanceWindowR\x06window\x12)\n" + - "\x10resource_version\x18\x03 \x01(\tR\x0fresourceVersion\"\xc2\x03\n" + - "\x11MaintenanceWindow\x12g\n" + - "\x18daily_maintenance_window\x18\x02 \x01(\v2+.google.container.v1.DailyMaintenanceWindowH\x00R\x16dailyMaintenanceWindow\x12U\n" + - "\x10recurring_window\x18\x03 \x01(\v2(.google.container.v1.RecurringTimeWindowH\x00R\x0frecurringWindow\x12x\n" + - "\x16maintenance_exclusions\x18\x04 \x03(\v2A.google.container.v1.MaintenanceWindow.MaintenanceExclusionsEntryR\x15maintenanceExclusions\x1ai\n" + - "\x1aMaintenanceExclusionsEntry\x12\x10\n" + - "\x03key\x18\x01 \x01(\tR\x03key\x125\n" + - "\x05value\x18\x02 \x01(\v2\x1f.google.container.v1.TimeWindowR\x05value:\x028\x01B\b\n" + - "\x06policy\"\x81\x02\n" + - "\n" + - "TimeWindow\x12v\n" + - "\x1dmaintenance_exclusion_options\x18\x03 \x01(\v20.google.container.v1.MaintenanceExclusionOptionsH\x00R\x1bmaintenanceExclusionOptions\x129\n" + - "\n" + - "start_time\x18\x01 \x01(\v2\x1a.google.protobuf.TimestampR\tstartTime\x125\n" + - "\bend_time\x18\x02 \x01(\v2\x1a.google.protobuf.TimestampR\aendTimeB\t\n" + - "\aoptions\"\xf9\x02\n" + - "\x1bMaintenanceExclusionOptions\x12L\n" + - "\x05scope\x18\x01 \x01(\x0e26.google.container.v1.MaintenanceExclusionOptions.ScopeR\x05scope\x12l\n" + - "\x11end_time_behavior\x18\x02 \x01(\x0e2@.google.container.v1.MaintenanceExclusionOptions.EndTimeBehaviorR\x0fendTimeBehavior\"N\n" + - "\x05Scope\x12\x0f\n" + - "\vNO_UPGRADES\x10\x00\x12\x15\n" + - "\x11NO_MINOR_UPGRADES\x10\x01\x12\x1d\n" + - "\x19NO_MINOR_OR_NODE_UPGRADES\x10\x02\"N\n" + - "\x0fEndTimeBehavior\x12!\n" + - "\x1dEND_TIME_BEHAVIOR_UNSPECIFIED\x10\x00\x12\x18\n" + - "\x14UNTIL_END_OF_SUPPORT\x10\x01\"n\n" + - "\x13RecurringTimeWindow\x127\n" + - "\x06window\x18\x01 \x01(\v2\x1f.google.container.v1.TimeWindowR\x06window\x12\x1e\n" + - "\n" + - "recurrence\x18\x02 \x01(\tR\n" + - "recurrence\"X\n" + - "\x16DailyMaintenanceWindow\x12\x1d\n" + - "\n" + - "start_time\x18\x02 \x01(\tR\tstartTime\x12\x1f\n" + - "\bduration\x18\x03 \x01(\tB\x03\xe0A\x03R\bduration\"\x80\x02\n" + - "\x1cSetNodePoolManagementRequest\x12!\n" + - "\n" + - "project_id\x18\x01 \x01(\tB\x02\x18\x01R\tprojectId\x12\x16\n" + - "\x04zone\x18\x02 \x01(\tB\x02\x18\x01R\x04zone\x12!\n" + - "\n" + - "cluster_id\x18\x03 \x01(\tB\x02\x18\x01R\tclusterId\x12$\n" + - "\fnode_pool_id\x18\x04 \x01(\tB\x02\x18\x01R\n" + - "nodePoolId\x12H\n" + - "\n" + - "management\x18\x05 \x01(\v2#.google.container.v1.NodeManagementB\x03\xe0A\x02R\n" + - "management\x12\x12\n" + - "\x04name\x18\a \x01(\tR\x04name\"\xd4\x01\n" + - "\x16SetNodePoolSizeRequest\x12!\n" + - "\n" + - "project_id\x18\x01 \x01(\tB\x02\x18\x01R\tprojectId\x12\x16\n" + - "\x04zone\x18\x02 \x01(\tB\x02\x18\x01R\x04zone\x12!\n" + - "\n" + - "cluster_id\x18\x03 \x01(\tB\x02\x18\x01R\tclusterId\x12$\n" + - "\fnode_pool_id\x18\x04 \x01(\tB\x02\x18\x01R\n" + - "nodePoolId\x12\"\n" + - "\n" + - "node_count\x18\x05 \x01(\x05B\x03\xe0A\x02R\tnodeCount\x12\x12\n" + - "\x04name\x18\a \x01(\tR\x04name\"4\n" + - "\x1eCompleteNodePoolUpgradeRequest\x12\x12\n" + - "\x04name\x18\x01 \x01(\tR\x04name\"\xd9\x01\n" + - "\x1eRollbackNodePoolUpgradeRequest\x12!\n" + - "\n" + - "project_id\x18\x01 \x01(\tB\x02\x18\x01R\tprojectId\x12\x16\n" + - "\x04zone\x18\x02 \x01(\tB\x02\x18\x01R\x04zone\x12!\n" + - "\n" + - "cluster_id\x18\x03 \x01(\tB\x02\x18\x01R\tclusterId\x12$\n" + - "\fnode_pool_id\x18\x04 \x01(\tB\x02\x18\x01R\n" + - "nodePoolId\x12\x12\n" + - "\x04name\x18\x06 \x01(\tR\x04name\x12\x1f\n" + - "\vrespect_pdb\x18\a \x01(\bR\n" + - "respectPdb\"U\n" + - "\x15ListNodePoolsResponse\x12<\n" + - "\n" + - "node_pools\x18\x01 \x03(\v2\x1d.google.container.v1.NodePoolR\tnodePools\"\xf5\x06\n" + - "\x12ClusterAutoscaling\x12@\n" + - "\x1cenable_node_autoprovisioning\x18\x01 \x01(\bR\x1aenableNodeAutoprovisioning\x12K\n" + - "\x0fresource_limits\x18\x02 \x03(\v2\".google.container.v1.ResourceLimitR\x0eresourceLimits\x12k\n" + - "\x13autoscaling_profile\x18\x03 \x01(\x0e2:.google.container.v1.ClusterAutoscaling.AutoscalingProfileR\x12autoscalingProfile\x12\x84\x01\n" + - "#autoprovisioning_node_pool_defaults\x18\x04 \x01(\v25.google.container.v1.AutoprovisioningNodePoolDefaultsR autoprovisioningNodePoolDefaults\x12=\n" + - "\x1aautoprovisioning_locations\x18\x05 \x03(\tR\x19autoprovisioningLocations\x12o\n" + - "\x1cdefault_compute_class_config\x18\t \x01(\v2..google.container.v1.DefaultComputeClassConfigR\x19defaultComputeClassConfig\x12{\n" + - "\x19autopilot_general_profile\x18\x0e \x01(\x0e2?.google.container.v1.ClusterAutoscaling.AutopilotGeneralProfileR\x17autopilotGeneralProfile\"U\n" + - "\x12AutoscalingProfile\x12\x17\n" + - "\x13PROFILE_UNSPECIFIED\x10\x00\x12\x18\n" + - "\x14OPTIMIZE_UTILIZATION\x10\x01\x12\f\n" + - "\bBALANCED\x10\x02\"X\n" + - "\x17AutopilotGeneralProfile\x12)\n" + - "%AUTOPILOT_GENERAL_PROFILE_UNSPECIFIED\x10\x00\x12\x12\n" + - "\x0eNO_PERFORMANCE\x10\x01\"\xaf\x05\n" + - " AutoprovisioningNodePoolDefaults\x12!\n" + - "\foauth_scopes\x18\x01 \x03(\tR\voauthScopes\x12'\n" + - "\x0fservice_account\x18\x02 \x01(\tR\x0eserviceAccount\x12X\n" + - "\x10upgrade_settings\x18\x03 \x01(\v2-.google.container.v1.NodePool.UpgradeSettingsR\x0fupgradeSettings\x12C\n" + - "\n" + - "management\x18\x04 \x01(\v2#.google.container.v1.NodeManagementR\n" + - "management\x12,\n" + - "\x10min_cpu_platform\x18\x05 \x01(\tB\x02\x18\x01R\x0eminCpuPlatform\x12 \n" + - "\fdisk_size_gb\x18\x06 \x01(\x05R\n" + - "diskSizeGb\x12\x1b\n" + - "\tdisk_type\x18\a \x01(\tR\bdiskType\x12e\n" + - "\x18shielded_instance_config\x18\b \x01(\v2+.google.container.v1.ShieldedInstanceConfigR\x16shieldedInstanceConfig\x12)\n" + - "\x11boot_disk_kms_key\x18\t \x01(\tR\x0ebootDiskKmsKey\x12\x1d\n" + - "\n" + - "image_type\x18\n" + - " \x01(\tR\timageType\x12W\n" + - "&insecure_kubelet_readonly_port_enabled\x18\r \x01(\bH\x00R\"insecureKubeletReadonlyPortEnabled\x88\x01\x01B)\n" + - "'_insecure_kubelet_readonly_port_enabled\"h\n" + - "\rResourceLimit\x12#\n" + - "\rresource_type\x18\x01 \x01(\tR\fresourceType\x12\x18\n" + - "\aminimum\x18\x02 \x01(\x03R\aminimum\x12\x18\n" + - "\amaximum\x18\x03 \x01(\x03R\amaximum\"5\n" + - "\x19DefaultComputeClassConfig\x12\x18\n" + - "\aenabled\x18\x01 \x01(\bR\aenabled\"\xb3\x03\n" + - "\x13NodePoolAutoscaling\x12\x18\n" + - "\aenabled\x18\x01 \x01(\bR\aenabled\x12$\n" + - "\x0emin_node_count\x18\x02 \x01(\x05R\fminNodeCount\x12$\n" + - "\x0emax_node_count\x18\x03 \x01(\x05R\fmaxNodeCount\x12(\n" + - "\x0fautoprovisioned\x18\x04 \x01(\bR\x0fautoprovisioned\x12`\n" + - "\x0flocation_policy\x18\x05 \x01(\x0e27.google.container.v1.NodePoolAutoscaling.LocationPolicyR\x0elocationPolicy\x12/\n" + - "\x14total_min_node_count\x18\x06 \x01(\x05R\x11totalMinNodeCount\x12/\n" + - "\x14total_max_node_count\x18\a \x01(\x05R\x11totalMaxNodeCount\"H\n" + - "\x0eLocationPolicy\x12\x1f\n" + - "\x1bLOCATION_POLICY_UNSPECIFIED\x10\x00\x12\f\n" + - "\bBALANCED\x10\x01\x12\a\n" + - "\x03ANY\x10\x02\"\xe2\x02\n" + - "\x10SetLabelsRequest\x12!\n" + - "\n" + - "project_id\x18\x01 \x01(\tB\x02\x18\x01R\tprojectId\x12\x16\n" + - "\x04zone\x18\x02 \x01(\tB\x02\x18\x01R\x04zone\x12!\n" + - "\n" + - "cluster_id\x18\x03 \x01(\tB\x02\x18\x01R\tclusterId\x12g\n" + - "\x0fresource_labels\x18\x04 \x03(\v29.google.container.v1.SetLabelsRequest.ResourceLabelsEntryB\x03\xe0A\x02R\x0eresourceLabels\x120\n" + - "\x11label_fingerprint\x18\x05 \x01(\tB\x03\xe0A\x02R\x10labelFingerprint\x12\x12\n" + - "\x04name\x18\a \x01(\tR\x04name\x1aA\n" + - "\x13ResourceLabelsEntry\x12\x10\n" + - "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" + - "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\"\xa7\x01\n" + - "\x14SetLegacyAbacRequest\x12!\n" + - "\n" + - "project_id\x18\x01 \x01(\tB\x02\x18\x01R\tprojectId\x12\x16\n" + - "\x04zone\x18\x02 \x01(\tB\x02\x18\x01R\x04zone\x12!\n" + - "\n" + - "cluster_id\x18\x03 \x01(\tB\x02\x18\x01R\tclusterId\x12\x1d\n" + - "\aenabled\x18\x04 \x01(\bB\x03\xe0A\x02R\aenabled\x12\x12\n" + - "\x04name\x18\x06 \x01(\tR\x04name\"\xb9\x01\n" + - "\x16StartIPRotationRequest\x12!\n" + - "\n" + - "project_id\x18\x01 \x01(\tB\x02\x18\x01R\tprojectId\x12\x16\n" + - "\x04zone\x18\x02 \x01(\tB\x02\x18\x01R\x04zone\x12!\n" + - "\n" + - "cluster_id\x18\x03 \x01(\tB\x02\x18\x01R\tclusterId\x12\x12\n" + - "\x04name\x18\x06 \x01(\tR\x04name\x12-\n" + - "\x12rotate_credentials\x18\a \x01(\bR\x11rotateCredentials\"\x8d\x01\n" + - "\x19CompleteIPRotationRequest\x12!\n" + - "\n" + - "project_id\x18\x01 \x01(\tB\x02\x18\x01R\tprojectId\x12\x16\n" + - "\x04zone\x18\x02 \x01(\tB\x02\x18\x01R\x04zone\x12!\n" + - "\n" + - "cluster_id\x18\x03 \x01(\tB\x02\x18\x01R\tclusterId\x12\x12\n" + - "\x04name\x18\a \x01(\tR\x04name\"\xa9\x03\n" + - "\x11AcceleratorConfig\x12+\n" + - "\x11accelerator_count\x18\x01 \x01(\x03R\x10acceleratorCount\x12)\n" + - "\x10accelerator_type\x18\x02 \x01(\tR\x0facceleratorType\x12,\n" + - "\x12gpu_partition_size\x18\x03 \x01(\tR\x10gpuPartitionSize\x12X\n" + - "\x12gpu_sharing_config\x18\x05 \x01(\v2%.google.container.v1.GPUSharingConfigH\x00R\x10gpuSharingConfig\x88\x01\x01\x12z\n" + - "\x1egpu_driver_installation_config\x18\x06 \x01(\v20.google.container.v1.GPUDriverInstallationConfigH\x01R\x1bgpuDriverInstallationConfig\x88\x01\x01B\x15\n" + - "\x13_gpu_sharing_configB!\n" + - "\x1f_gpu_driver_installation_config\"\xaf\x02\n" + - "\x10GPUSharingConfig\x12:\n" + - "\x1amax_shared_clients_per_gpu\x18\x01 \x01(\x03R\x16maxSharedClientsPerGpu\x12o\n" + - "\x14gpu_sharing_strategy\x18\x02 \x01(\x0e28.google.container.v1.GPUSharingConfig.GPUSharingStrategyH\x00R\x12gpuSharingStrategy\x88\x01\x01\"U\n" + - "\x12GPUSharingStrategy\x12$\n" + - " GPU_SHARING_STRATEGY_UNSPECIFIED\x10\x00\x12\x10\n" + - "\fTIME_SHARING\x10\x01\x12\a\n" + - "\x03MPS\x10\x02B\x17\n" + - "\x15_gpu_sharing_strategy\"\x96\x02\n" + - "\x1bGPUDriverInstallationConfig\x12t\n" + - "\x12gpu_driver_version\x18\x01 \x01(\x0e2A.google.container.v1.GPUDriverInstallationConfig.GPUDriverVersionH\x00R\x10gpuDriverVersion\x88\x01\x01\"j\n" + - "\x10GPUDriverVersion\x12\"\n" + - "\x1eGPU_DRIVER_VERSION_UNSPECIFIED\x10\x00\x12\x19\n" + - "\x15INSTALLATION_DISABLED\x10\x01\x12\v\n" + - "\aDEFAULT\x10\x02\x12\n" + - "\n" + - "\x06LATEST\x10\x03B\x15\n" + - "\x13_gpu_driver_version\"\xa0\x01\n" + - "\x16WorkloadMetadataConfig\x12D\n" + - "\x04mode\x18\x02 \x01(\x0e20.google.container.v1.WorkloadMetadataConfig.ModeR\x04mode\"@\n" + - "\x04Mode\x12\x14\n" + - "\x10MODE_UNSPECIFIED\x10\x00\x12\x10\n" + - "\fGCE_METADATA\x10\x01\x12\x10\n" + - "\fGKE_METADATA\x10\x02\"\xdb\x01\n" + - "\x17SetNetworkPolicyRequest\x12!\n" + - "\n" + - "project_id\x18\x01 \x01(\tB\x02\x18\x01R\tprojectId\x12\x16\n" + - "\x04zone\x18\x02 \x01(\tB\x02\x18\x01R\x04zone\x12!\n" + - "\n" + - "cluster_id\x18\x03 \x01(\tB\x02\x18\x01R\tclusterId\x12N\n" + - "\x0enetwork_policy\x18\x04 \x01(\v2\".google.container.v1.NetworkPolicyB\x03\xe0A\x02R\rnetworkPolicy\x12\x12\n" + - "\x04name\x18\x06 \x01(\tR\x04name\"\xee\x01\n" + - "\x1bSetMaintenancePolicyRequest\x12\"\n" + - "\n" + - "project_id\x18\x01 \x01(\tB\x03\xe0A\x02R\tprojectId\x12\x17\n" + - "\x04zone\x18\x02 \x01(\tB\x03\xe0A\x02R\x04zone\x12\"\n" + - "\n" + - "cluster_id\x18\x03 \x01(\tB\x03\xe0A\x02R\tclusterId\x12Z\n" + - "\x12maintenance_policy\x18\x04 \x01(\v2&.google.container.v1.MaintenancePolicyB\x03\xe0A\x02R\x11maintenancePolicy\x12\x12\n" + - "\x04name\x18\x05 \x01(\tR\x04name\"\x92\x03\n" + - "\x0fStatusCondition\x12A\n" + - "\x04code\x18\x01 \x01(\x0e2).google.container.v1.StatusCondition.CodeB\x02\x18\x01R\x04code\x12\x18\n" + - "\amessage\x18\x02 \x01(\tR\amessage\x127\n" + - "\x0ecanonical_code\x18\x03 \x01(\x0e2\x10.google.rpc.CodeR\rcanonicalCode\"\xe8\x01\n" + - "\x04Code\x12\v\n" + - "\aUNKNOWN\x10\x00\x12\x10\n" + - "\fGCE_STOCKOUT\x10\x01\x12\x1f\n" + - "\x1bGKE_SERVICE_ACCOUNT_DELETED\x10\x02\x12\x16\n" + - "\x12GCE_QUOTA_EXCEEDED\x10\x03\x12\x13\n" + - "\x0fSET_BY_OPERATOR\x10\x04\x12\x17\n" + - "\x13CLOUD_KMS_KEY_ERROR\x10\a\x12\x0f\n" + - "\vCA_EXPIRING\x10\t\x12,\n" + - "(NODE_SERVICE_ACCOUNT_MISSING_PERMISSIONS\x10\n" + - "\x12\x1b\n" + - "\x17CLOUD_KMS_KEY_DESTROYED\x10\v\"\x86\x0e\n" + - "\rNetworkConfig\x12\x1d\n" + - "\anetwork\x18\x01 \x01(\tB\x03\xe0A\x03R\anetwork\x12#\n" + - "\n" + - "subnetwork\x18\x02 \x01(\tB\x03\xe0A\x03R\n" + - "subnetwork\x12?\n" + - "\x1cenable_intra_node_visibility\x18\x05 \x01(\bR\x19enableIntraNodeVisibility\x12V\n" + - "\x13default_snat_status\x18\a \x01(\v2&.google.container.v1.DefaultSnatStatusR\x11defaultSnatStatus\x126\n" + - "\x17enable_l4ilb_subsetting\x18\n" + - " \x01(\bR\x15enableL4ilbSubsetting\x12R\n" + - "\x11datapath_provider\x18\v \x01(\x0e2%.google.container.v1.DatapathProviderR\x10datapathProvider\x12i\n" + - "\x1aprivate_ipv6_google_access\x18\f \x01(\x0e2,.google.container.v1.PrivateIPv6GoogleAccessR\x17privateIpv6GoogleAccess\x12=\n" + - "\n" + - "dns_config\x18\r \x01(\v2\x1e.google.container.v1.DNSConfigR\tdnsConfig\x12l\n" + - "\x1bservice_external_ips_config\x18\x0f \x01(\v2-.google.container.v1.ServiceExternalIPsConfigR\x18serviceExternalIpsConfig\x12S\n" + - "\x12gateway_api_config\x18\x10 \x01(\v2%.google.container.v1.GatewayAPIConfigR\x10gatewayApiConfig\x126\n" + - "\x17enable_multi_networking\x18\x11 \x01(\bR\x15enableMultiNetworking\x12\x80\x01\n" + - "\x1anetwork_performance_config\x18\x12 \x01(\v2B.google.container.v1.NetworkConfig.ClusterNetworkPerformanceConfigR\x18networkPerformanceConfig\x12@\n" + - "\x1aenable_fqdn_network_policy\x18\x13 \x01(\bH\x00R\x17enableFqdnNetworkPolicy\x88\x01\x01\x12t\n" + - "\x1cin_transit_encryption_config\x18\x14 \x01(\x0e2..google.container.v1.InTransitEncryptionConfigH\x01R\x19inTransitEncryptionConfig\x88\x01\x01\x12[\n" + - "(enable_cilium_clusterwide_network_policy\x18\x15 \x01(\bH\x02R$enableCiliumClusterwideNetworkPolicy\x88\x01\x01\x12D\n" + - "\x1cdefault_enable_private_nodes\x18\x16 \x01(\bH\x03R\x19defaultEnablePrivateNodes\x88\x01\x01\x12U\n" + - "%disable_l4_lb_firewall_reconciliation\x18\x18 \x01(\bH\x04R!disableL4LbFirewallReconciliation\x88\x01\x01\x1a\xf9\x01\n" + - "\x1fClusterNetworkPerformanceConfig\x12\x8b\x01\n" + - "\x1btotal_egress_bandwidth_tier\x18\x01 \x01(\x0e2G.google.container.v1.NetworkConfig.ClusterNetworkPerformanceConfig.TierH\x00R\x18totalEgressBandwidthTier\x88\x01\x01\"(\n" + - "\x04Tier\x12\x14\n" + - "\x10TIER_UNSPECIFIED\x10\x00\x12\n" + - "\n" + - "\x06TIER_1\x10\x01B\x1e\n" + - "\x1c_total_egress_bandwidth_tierB\x1d\n" + - "\x1b_enable_fqdn_network_policyB\x1f\n" + - "\x1d_in_transit_encryption_configB+\n" + - ")_enable_cilium_clusterwide_network_policyB\x1f\n" + - "\x1d_default_enable_private_nodesB(\n" + - "&_disable_l4_lb_firewall_reconciliation\"\xc9\x01\n" + - "\x10GatewayAPIConfig\x12G\n" + - "\achannel\x18\x01 \x01(\x0e2-.google.container.v1.GatewayAPIConfig.ChannelR\achannel\"l\n" + - "\aChannel\x12\x17\n" + - "\x13CHANNEL_UNSPECIFIED\x10\x00\x12\x14\n" + - "\x10CHANNEL_DISABLED\x10\x01\x12\x1c\n" + - "\x14CHANNEL_EXPERIMENTAL\x10\x03\x1a\x02\b\x01\x12\x14\n" + - "\x10CHANNEL_STANDARD\x10\x04\"4\n" + - "\x18ServiceExternalIPsConfig\x12\x18\n" + - "\aenabled\x18\x01 \x01(\bR\aenabled\"0\n" + - "\x16GetOpenIDConfigRequest\x12\x16\n" + - "\x06parent\x18\x01 \x01(\tR\x06parent\"\xe7\x02\n" + - "\x17GetOpenIDConfigResponse\x12\x16\n" + - "\x06issuer\x18\x01 \x01(\tR\x06issuer\x12\x1a\n" + - "\bjwks_uri\x18\x02 \x01(\tR\bjwks_uri\x12:\n" + - "\x18response_types_supported\x18\x03 \x03(\tR\x18response_types_supported\x128\n" + - "\x17subject_types_supported\x18\x04 \x03(\tR\x17subject_types_supported\x12T\n" + - "%id_token_signing_alg_values_supported\x18\x05 \x03(\tR%id_token_signing_alg_values_supported\x12*\n" + - "\x10claims_supported\x18\x06 \x03(\tR\x10claims_supported\x12 \n" + - "\vgrant_types\x18\a \x03(\tR\vgrant_types\"/\n" + - "\x15GetJSONWebKeysRequest\x12\x16\n" + - "\x06parent\x18\x01 \x01(\tR\x06parent\"\x97\x01\n" + - "\x03Jwk\x12\x10\n" + - "\x03kty\x18\x01 \x01(\tR\x03kty\x12\x10\n" + - "\x03alg\x18\x02 \x01(\tR\x03alg\x12\x10\n" + - "\x03use\x18\x03 \x01(\tR\x03use\x12\x10\n" + - "\x03kid\x18\x04 \x01(\tR\x03kid\x12\f\n" + - "\x01n\x18\x05 \x01(\tR\x01n\x12\f\n" + - "\x01e\x18\x06 \x01(\tR\x01e\x12\f\n" + - "\x01x\x18\a \x01(\tR\x01x\x12\f\n" + - "\x01y\x18\b \x01(\tR\x01y\x12\x10\n" + - "\x03crv\x18\t \x01(\tR\x03crv\"F\n" + - "\x16GetJSONWebKeysResponse\x12,\n" + - "\x04keys\x18\x01 \x03(\v2\x18.google.container.v1.JwkR\x04keys\"8\n" + - "\"CheckAutopilotCompatibilityRequest\x12\x12\n" + - "\x04name\x18\x01 \x01(\tR\x04name\"\xdb\x03\n" + - "\x1bAutopilotCompatibilityIssue\x12E\n" + - "\x10last_observation\x18\x01 \x01(\v2\x1a.google.protobuf.TimestampR\x0flastObservation\x12'\n" + - "\x0fconstraint_type\x18\x02 \x01(\tR\x0econstraintType\x12m\n" + - "\x14incompatibility_type\x18\x03 \x01(\x0e2:.google.container.v1.AutopilotCompatibilityIssue.IssueTypeR\x13incompatibilityType\x12\x1a\n" + - "\bsubjects\x18\x04 \x03(\tR\bsubjects\x12+\n" + - "\x11documentation_url\x18\x05 \x01(\tR\x10documentationUrl\x12 \n" + - "\vdescription\x18\x06 \x01(\tR\vdescription\"r\n" + - "\tIssueType\x12\x0f\n" + - "\vUNSPECIFIED\x10\x00\x12\x13\n" + - "\x0fINCOMPATIBILITY\x10\x01\x12\x1e\n" + - "\x1aADDITIONAL_CONFIG_REQUIRED\x10\x02\x12\x1f\n" + - "\x1bPASSED_WITH_OPTIONAL_CONFIG\x10\x03\"\x89\x01\n" + - "#CheckAutopilotCompatibilityResponse\x12H\n" + - "\x06issues\x18\x01 \x03(\v20.google.container.v1.AutopilotCompatibilityIssueR\x06issues\x12\x18\n" + - "\asummary\x18\x02 \x01(\tR\asummary\"\xa5\x01\n" + - "\x0eReleaseChannel\x12E\n" + - "\achannel\x18\x01 \x01(\x0e2+.google.container.v1.ReleaseChannel.ChannelR\achannel\"L\n" + - "\aChannel\x12\x0f\n" + - "\vUNSPECIFIED\x10\x00\x12\t\n" + - "\x05RAPID\x10\x01\x12\v\n" + - "\aREGULAR\x10\x02\x12\n" + - "\n" + - "\x06STABLE\x10\x03\x12\f\n" + - "\bEXTENDED\x10\x04\"0\n" + - "\x14CostManagementConfig\x12\x18\n" + - "\aenabled\x18\x01 \x01(\bR\aenabled\"5\n" + - "\x19IntraNodeVisibilityConfig\x12\x18\n" + - "\aenabled\x18\x01 \x01(\bR\aenabled\"/\n" + - "\x13ILBSubsettingConfig\x12\x18\n" + - "\aenabled\x18\x01 \x01(\bR\aenabled\"\xc1\x03\n" + - "\tDNSConfig\x12H\n" + - "\vcluster_dns\x18\x01 \x01(\x0e2'.google.container.v1.DNSConfig.ProviderR\n" + - "clusterDns\x12S\n" + - "\x11cluster_dns_scope\x18\x02 \x01(\x0e2'.google.container.v1.DNSConfig.DNSScopeR\x0fclusterDnsScope\x12,\n" + - "\x12cluster_dns_domain\x18\x03 \x01(\tR\x10clusterDnsDomain\x12E\n" + - "\x1dadditive_vpc_scope_dns_domain\x18\x05 \x01(\tB\x03\xe0A\x01R\x19additiveVpcScopeDnsDomain\"W\n" + - "\bProvider\x12\x18\n" + - "\x14PROVIDER_UNSPECIFIED\x10\x00\x12\x14\n" + - "\x10PLATFORM_DEFAULT\x10\x01\x12\r\n" + - "\tCLOUD_DNS\x10\x02\x12\f\n" + - "\bKUBE_DNS\x10\x03\"G\n" + - "\bDNSScope\x12\x19\n" + - "\x15DNS_SCOPE_UNSPECIFIED\x10\x00\x12\x11\n" + - "\rCLUSTER_SCOPE\x10\x01\x12\r\n" + - "\tVPC_SCOPE\x10\x02\">\n" + - "\x11MaxPodsConstraint\x12)\n" + - "\x11max_pods_per_node\x18\x01 \x01(\x03R\x0emaxPodsPerNode\"=\n" + - "\x16WorkloadIdentityConfig\x12#\n" + - "\rworkload_pool\x18\x02 \x01(\tR\fworkloadPool\"1\n" + - "\x15IdentityServiceConfig\x12\x18\n" + - "\aenabled\x18\x01 \x01(\bR\aenabled\"_\n" + - "\x10MeshCertificates\x12K\n" + - "\x13enable_certificates\x18\x01 \x01(\v2\x1a.google.protobuf.BoolValueR\x12enableCertificates\"\xc9\x06\n" + - "\x12DatabaseEncryption\x12\x19\n" + - "\bkey_name\x18\x01 \x01(\tR\akeyName\x12C\n" + - "\x05state\x18\x02 \x01(\x0e2-.google.container.v1.DatabaseEncryption.StateR\x05state\x12c\n" + - "\rcurrent_state\x18\x03 \x01(\x0e24.google.container.v1.DatabaseEncryption.CurrentStateB\x03\xe0A\x03H\x00R\fcurrentState\x88\x01\x01\x12,\n" + - "\x0fdecryption_keys\x18\x04 \x03(\tB\x03\xe0A\x03R\x0edecryptionKeys\x12o\n" + - "\x15last_operation_errors\x18\x05 \x03(\v26.google.container.v1.DatabaseEncryption.OperationErrorB\x03\xe0A\x03R\x13lastOperationErrors\x1a\x8a\x01\n" + - "\x0eOperationError\x12\x19\n" + - "\bkey_name\x18\x01 \x01(\tR\akeyName\x12#\n" + - "\rerror_message\x18\x02 \x01(\tR\ferrorMessage\x128\n" + - "\ttimestamp\x18\x03 \x01(\v2\x1a.google.protobuf.TimestampR\ttimestamp\"2\n" + - "\x05State\x12\v\n" + - "\aUNKNOWN\x10\x00\x12\r\n" + - "\tENCRYPTED\x10\x01\x12\r\n" + - "\tDECRYPTED\x10\x02\"\xfb\x01\n" + - "\fCurrentState\x12\x1d\n" + - "\x19CURRENT_STATE_UNSPECIFIED\x10\x00\x12\x1b\n" + - "\x17CURRENT_STATE_ENCRYPTED\x10\a\x12\x1b\n" + - "\x17CURRENT_STATE_DECRYPTED\x10\x02\x12$\n" + - " CURRENT_STATE_ENCRYPTION_PENDING\x10\x03\x12\"\n" + - "\x1eCURRENT_STATE_ENCRYPTION_ERROR\x10\x04\x12$\n" + - " CURRENT_STATE_DECRYPTION_PENDING\x10\x05\x12\"\n" + - "\x1eCURRENT_STATE_DECRYPTION_ERROR\x10\x06B\x10\n" + - "\x0e_current_state\"\x8a\x01\n" + - "\x1cListUsableSubnetworksRequest\x12\x16\n" + - "\x06parent\x18\x01 \x01(\tR\x06parent\x12\x16\n" + - "\x06filter\x18\x02 \x01(\tR\x06filter\x12\x1b\n" + - "\tpage_size\x18\x03 \x01(\x05R\bpageSize\x12\x1d\n" + - "\n" + - "page_token\x18\x04 \x01(\tR\tpageToken\"\x90\x01\n" + - "\x1dListUsableSubnetworksResponse\x12G\n" + - "\vsubnetworks\x18\x01 \x03(\v2%.google.container.v1.UsableSubnetworkR\vsubnetworks\x12&\n" + - "\x0fnext_page_token\x18\x02 \x01(\tR\rnextPageToken\"\xa0\x02\n" + - "\x1eUsableSubnetworkSecondaryRange\x12\x1d\n" + - "\n" + - "range_name\x18\x01 \x01(\tR\trangeName\x12\"\n" + - "\rip_cidr_range\x18\x02 \x01(\tR\vipCidrRange\x12R\n" + - "\x06status\x18\x03 \x01(\x0e2:.google.container.v1.UsableSubnetworkSecondaryRange.StatusR\x06status\"g\n" + - "\x06Status\x12\v\n" + - "\aUNKNOWN\x10\x00\x12\n" + - "\n" + - "\x06UNUSED\x10\x01\x12\x12\n" + - "\x0eIN_USE_SERVICE\x10\x02\x12\x18\n" + - "\x14IN_USE_SHAREABLE_POD\x10\x03\x12\x16\n" + - "\x12IN_USE_MANAGED_POD\x10\x04\"\xfc\x01\n" + - "\x10UsableSubnetwork\x12\x1e\n" + - "\n" + - "subnetwork\x18\x01 \x01(\tR\n" + - "subnetwork\x12\x18\n" + - "\anetwork\x18\x02 \x01(\tR\anetwork\x12\"\n" + - "\rip_cidr_range\x18\x03 \x01(\tR\vipCidrRange\x12c\n" + - "\x13secondary_ip_ranges\x18\x04 \x03(\v23.google.container.v1.UsableSubnetworkSecondaryRangeR\x11secondaryIpRanges\x12%\n" + - "\x0estatus_message\x18\x05 \x01(\tR\rstatusMessage\"\xcf\x03\n" + - "\x19ResourceUsageExportConfig\x12u\n" + - "\x14bigquery_destination\x18\x01 \x01(\v2B.google.container.v1.ResourceUsageExportConfig.BigQueryDestinationR\x13bigqueryDestination\x12C\n" + - "\x1eenable_network_egress_metering\x18\x02 \x01(\bR\x1benableNetworkEgressMetering\x12\x88\x01\n" + - "\x1bconsumption_metering_config\x18\x03 \x01(\v2H.google.container.v1.ResourceUsageExportConfig.ConsumptionMeteringConfigR\x19consumptionMeteringConfig\x1a4\n" + - "\x13BigQueryDestination\x12\x1d\n" + - "\n" + - "dataset_id\x18\x01 \x01(\tR\tdatasetId\x1a5\n" + - "\x19ConsumptionMeteringConfig\x12\x18\n" + - "\aenabled\x18\x01 \x01(\bR\aenabled\"2\n" + - "\x16VerticalPodAutoscaling\x12\x18\n" + - "\aenabled\x18\x01 \x01(\bR\aenabled\"/\n" + - "\x11DefaultSnatStatus\x12\x1a\n" + - "\bdisabled\x18\x01 \x01(\bR\bdisabled\")\n" + - "\rShieldedNodes\x12\x18\n" + - "\aenabled\x18\x01 \x01(\bR\aenabled\"&\n" + - "\n" + - "VirtualNIC\x12\x18\n" + - "\aenabled\x18\x01 \x01(\bR\aenabled\"&\n" + - "\n" + - "FastSocket\x12\x18\n" + - "\aenabled\x18\x01 \x01(\bR\aenabled\"\xda\x01\n" + - "\x0fGPUDirectConfig\x12k\n" + - "\x13gpu_direct_strategy\x18\x01 \x01(\x0e26.google.container.v1.GPUDirectConfig.GPUDirectStrategyH\x00R\x11gpuDirectStrategy\x88\x01\x01\"B\n" + - "\x11GPUDirectStrategy\x12#\n" + - "\x1fGPU_DIRECT_STRATEGY_UNSPECIFIED\x10\x00\x12\b\n" + - "\x04RDMA\x10\x02B\x16\n" + - "\x14_gpu_direct_strategy\"\xec\x03\n" + - "\x12NotificationConfig\x12F\n" + - "\x06pubsub\x18\x01 \x01(\v2..google.container.v1.NotificationConfig.PubSubR\x06pubsub\x1a\xa2\x01\n" + - "\x06PubSub\x12\x18\n" + - "\aenabled\x18\x01 \x01(\bR\aenabled\x126\n" + - "\x05topic\x18\x02 \x01(\tB \xfaA\x1d\n" + - "\x1bpubsub.googleapis.com/TopicR\x05topic\x12F\n" + - "\x06filter\x18\x03 \x01(\v2..google.container.v1.NotificationConfig.FilterR\x06filter\x1aZ\n" + - "\x06Filter\x12P\n" + - "\n" + - "event_type\x18\x01 \x03(\x0e21.google.container.v1.NotificationConfig.EventTypeR\teventType\"\x8c\x01\n" + - "\tEventType\x12\x1a\n" + - "\x16EVENT_TYPE_UNSPECIFIED\x10\x00\x12\x1b\n" + - "\x17UPGRADE_AVAILABLE_EVENT\x10\x01\x12\x11\n" + - "\rUPGRADE_EVENT\x10\x02\x12\x1b\n" + - "\x17SECURITY_BULLETIN_EVENT\x10\x03\x12\x16\n" + - "\x12UPGRADE_INFO_EVENT\x10\x04\"\x93\x02\n" + - "\x11ConfidentialNodes\x12\x18\n" + - "\aenabled\x18\x01 \x01(\bR\aenabled\x12}\n" + - "\x1aconfidential_instance_type\x18\x02 \x01(\x0e2?.google.container.v1.ConfidentialNodes.ConfidentialInstanceTypeR\x18confidentialInstanceType\"e\n" + - "\x18ConfidentialInstanceType\x12*\n" + - "&CONFIDENTIAL_INSTANCE_TYPE_UNSPECIFIED\x10\x00\x12\a\n" + - "\x03SEV\x10\x01\x12\v\n" + - "\aSEV_SNP\x10\x02\x12\a\n" + - "\x03TDX\x10\x03\"\xb5\x02\n" + - "\fUpgradeEvent\x12M\n" + - "\rresource_type\x18\x01 \x01(\x0e2(.google.container.v1.UpgradeResourceTypeR\fresourceType\x12\x1c\n" + - "\toperation\x18\x02 \x01(\tR\toperation\x12L\n" + - "\x14operation_start_time\x18\x03 \x01(\v2\x1a.google.protobuf.TimestampR\x12operationStartTime\x12'\n" + - "\x0fcurrent_version\x18\x04 \x01(\tR\x0ecurrentVersion\x12%\n" + - "\x0etarget_version\x18\x05 \x01(\tR\rtargetVersion\x12\x1a\n" + - "\bresource\x18\x06 \x01(\tR\bresource\"\xd9\b\n" + - "\x10UpgradeInfoEvent\x12M\n" + - "\rresource_type\x18\x01 \x01(\x0e2(.google.container.v1.UpgradeResourceTypeR\fresourceType\x12\x1c\n" + - "\toperation\x18\x02 \x01(\tR\toperation\x129\n" + - "\n" + - "start_time\x18\x03 \x01(\v2\x1a.google.protobuf.TimestampR\tstartTime\x125\n" + - "\bend_time\x18\x04 \x01(\v2\x1a.google.protobuf.TimestampR\aendTime\x12'\n" + - "\x0fcurrent_version\x18\x05 \x01(\tR\x0ecurrentVersion\x12%\n" + - "\x0etarget_version\x18\x06 \x01(\tR\rtargetVersion\x12\x1a\n" + - "\bresource\x18\a \x01(\tR\bresource\x12F\n" + - "\x05state\x18\b \x01(\x0e2+.google.container.v1.UpgradeInfoEvent.StateB\x03\xe0A\x03R\x05state\x12Z\n" + - "\x19standard_support_end_time\x18\t \x01(\v2\x1a.google.protobuf.TimestampH\x00R\x16standardSupportEndTime\x88\x01\x01\x12Z\n" + - "\x19extended_support_end_time\x18\n" + - " \x01(\v2\x1a.google.protobuf.TimestampH\x01R\x16extendedSupportEndTime\x88\x01\x01\x12 \n" + - "\vdescription\x18\v \x01(\tR\vdescription\x12N\n" + - "\n" + - "event_type\x18\f \x01(\x0e2/.google.container.v1.UpgradeInfoEvent.EventTypeR\teventType\x12T\n" + - "\x10disruption_event\x18\x0e \x01(\v2$.google.container.v1.DisruptionEventH\x02R\x0fdisruptionEvent\x88\x01\x01\"T\n" + - "\x05State\x12\x15\n" + - "\x11STATE_UNSPECIFIED\x10\x00\x12\v\n" + - "\aSTARTED\x10\x03\x12\r\n" + - "\tSUCCEEDED\x10\x04\x12\n" + - "\n" + - "\x06FAILED\x10\x05\x12\f\n" + - "\bCANCELED\x10\x06\"\x8a\x01\n" + - "\tEventType\x12\x1a\n" + - "\x16EVENT_TYPE_UNSPECIFIED\x10\x00\x12\x12\n" + - "\x0eEND_OF_SUPPORT\x10\x01\x12 \n" + - "\x1cCOS_MILESTONE_VERSION_UPDATE\x10\x02\x12\x15\n" + - "\x11UPGRADE_LIFECYCLE\x10\x03\x12\x14\n" + - "\x10DISRUPTION_EVENT\x10\x04B\x1c\n" + - "\x1a_standard_support_end_timeB\x1c\n" + - "\x1a_extended_support_end_timeB\x13\n" + - "\x11_disruption_event\"\x88\x04\n" + - "\x0fDisruptionEvent\x12\\\n" + - "\x0fdisruption_type\x18\x01 \x01(\x0e23.google.container.v1.DisruptionEvent.DisruptionTypeR\x0edisruptionType\x12(\n" + - "\x10pdb_blocked_node\x18\x02 \x01(\tR\x0epdbBlockedNode\x12Z\n" + - "\x0fpdb_blocked_pod\x18\x03 \x03(\v22.google.container.v1.DisruptionEvent.PdbBlockedPodR\rpdbBlockedPod\x12R\n" + - "\x15pdb_violation_timeout\x18\x04 \x01(\v2\x19.google.protobuf.DurationH\x00R\x13pdbViolationTimeout\x88\x01\x01\x1aA\n" + - "\rPdbBlockedPod\x12\x1c\n" + - "\tnamespace\x18\x01 \x01(\tR\tnamespace\x12\x12\n" + - "\x04name\x18\x02 \x01(\tR\x04name\"`\n" + - "\x0eDisruptionType\x12\x1f\n" + - "\x1bDISRUPTION_TYPE_UNSPECIFIED\x10\x00\x12\x16\n" + - "\x12POD_NOT_ENOUGH_PDB\x10\x01\x12\x15\n" + - "\x11POD_PDB_VIOLATION\x10\x02B\x18\n" + - "\x16_pdb_violation_timeout\"\xea\x01\n" + - "\x15UpgradeAvailableEvent\x12\x18\n" + - "\aversion\x18\x01 \x01(\tR\aversion\x12M\n" + - "\rresource_type\x18\x02 \x01(\x0e2(.google.container.v1.UpgradeResourceTypeR\fresourceType\x12L\n" + - "\x0frelease_channel\x18\x03 \x01(\v2#.google.container.v1.ReleaseChannelR\x0ereleaseChannel\x12\x1a\n" + - "\bresource\x18\x04 \x01(\tR\bresource\"\xf7\x03\n" + - "\x15SecurityBulletinEvent\x124\n" + - "\x16resource_type_affected\x18\x01 \x01(\tR\x14resourceTypeAffected\x12\x1f\n" + - "\vbulletin_id\x18\x02 \x01(\tR\n" + - "bulletinId\x12\x17\n" + - "\acve_ids\x18\x03 \x03(\tR\x06cveIds\x12\x1a\n" + - "\bseverity\x18\x04 \x01(\tR\bseverity\x12!\n" + - "\fbulletin_uri\x18\x05 \x01(\tR\vbulletinUri\x12+\n" + - "\x11brief_description\x18\x06 \x01(\tR\x10briefDescription\x12:\n" + - "\x19affected_supported_minors\x18\a \x03(\tR\x17affectedSupportedMinors\x12)\n" + - "\x10patched_versions\x18\b \x03(\tR\x0fpatchedVersions\x128\n" + - "\x18suggested_upgrade_target\x18\t \x01(\tR\x16suggestedUpgradeTarget\x122\n" + - "\x15manual_steps_required\x18\n" + - " \x01(\bR\x13manualStepsRequired\x12-\n" + - "\x12mitigated_versions\x18\v \x03(\tR\x11mitigatedVersions\"\xf6\x01\n" + - "\tAutopilot\x12\x18\n" + - "\aenabled\x18\x01 \x01(\bR\aenabled\x12_\n" + - "\x16workload_policy_config\x18\x02 \x01(\v2).google.container.v1.WorkloadPolicyConfigR\x14workloadPolicyConfig\x12n\n" + - "\x1bprivileged_admission_config\x18\x04 \x01(\v2..google.container.v1.PrivilegedAdmissionConfigR\x19privilegedAdmissionConfig\"D\n" + - "\x19PrivilegedAdmissionConfig\x12'\n" + - "\x0fallowlist_paths\x18\x01 \x03(\tR\x0eallowlistPaths\"\xe2\x01\n" + - "\x14WorkloadPolicyConfig\x12+\n" + - "\x0fallow_net_admin\x18\x01 \x01(\bH\x00R\rallowNetAdmin\x88\x01\x01\x12\\\n" + - "(autopilot_compatibility_auditing_enabled\x18\x02 \x01(\bH\x01R%autopilotCompatibilityAuditingEnabled\x88\x01\x01B\x12\n" + - "\x10_allow_net_adminB+\n" + - ")_autopilot_compatibility_auditing_enabled\"g\n" + - "\rLoggingConfig\x12V\n" + - "\x10component_config\x18\x01 \x01(\v2+.google.container.v1.LoggingComponentConfigR\x0fcomponentConfig\"\xb0\x02\n" + - "\x16LoggingComponentConfig\x12b\n" + - "\x11enable_components\x18\x01 \x03(\x0e25.google.container.v1.LoggingComponentConfig.ComponentR\x10enableComponents\"\xb1\x01\n" + - "\tComponent\x12\x19\n" + - "\x15COMPONENT_UNSPECIFIED\x10\x00\x12\x15\n" + - "\x11SYSTEM_COMPONENTS\x10\x01\x12\r\n" + - "\tWORKLOADS\x10\x02\x12\r\n" + - "\tAPISERVER\x10\x03\x12\r\n" + - "\tSCHEDULER\x10\x04\x12\x16\n" + - "\x12CONTROLLER_MANAGER\x10\x05\x12\f\n" + - "\bKCP_SSHD\x10\a\x12\x12\n" + - "\x0eKCP_CONNECTION\x10\b\x12\v\n" + - "\aKCP_HPA\x10\t\"3\n" + - "\x17RayClusterLoggingConfig\x12\x18\n" + - "\aenabled\x18\x01 \x01(\bR\aenabled\"\xe7\x02\n" + - "\x10MonitoringConfig\x12Y\n" + - "\x10component_config\x18\x01 \x01(\v2..google.container.v1.MonitoringComponentConfigR\x0fcomponentConfig\x12h\n" + - "\x19managed_prometheus_config\x18\x02 \x01(\v2,.google.container.v1.ManagedPrometheusConfigR\x17managedPrometheusConfig\x12\x8d\x01\n" + - "&advanced_datapath_observability_config\x18\x03 \x01(\v28.google.container.v1.AdvancedDatapathObservabilityConfigR#advancedDatapathObservabilityConfig\"\xc5\x02\n" + - "#AdvancedDatapathObservabilityConfig\x12%\n" + - "\x0eenable_metrics\x18\x01 \x01(\bR\renableMetrics\x12a\n" + - "\n" + - "relay_mode\x18\x02 \x01(\x0e2B.google.container.v1.AdvancedDatapathObservabilityConfig.RelayModeR\trelayMode\x12&\n" + - "\fenable_relay\x18\x03 \x01(\bH\x00R\venableRelay\x88\x01\x01\"[\n" + - "\tRelayMode\x12\x1a\n" + - "\x16RELAY_MODE_UNSPECIFIED\x10\x00\x12\f\n" + - "\bDISABLED\x10\x01\x12\x13\n" + - "\x0fINTERNAL_VPC_LB\x10\x03\x12\x0f\n" + - "\vEXTERNAL_LB\x10\x04B\x0f\n" + - "\r_enable_relay\"6\n" + - "\x1aRayClusterMonitoringConfig\x12\x18\n" + - "\aenabled\x18\x01 \x01(\bR\aenabled\"i\n" + - "\x15NodePoolLoggingConfig\x12P\n" + - "\x0evariant_config\x18\x01 \x01(\v2).google.container.v1.LoggingVariantConfigR\rvariantConfig\"\xa8\x01\n" + - "\x14LoggingVariantConfig\x12K\n" + - "\avariant\x18\x01 \x01(\x0e21.google.container.v1.LoggingVariantConfig.VariantR\avariant\"C\n" + - "\aVariant\x12\x17\n" + - "\x13VARIANT_UNSPECIFIED\x10\x00\x12\v\n" + - "\aDEFAULT\x10\x01\x12\x12\n" + - "\x0eMAX_THROUGHPUT\x10\x02\"\xf8\x02\n" + - "\x19MonitoringComponentConfig\x12e\n" + - "\x11enable_components\x18\x01 \x03(\x0e28.google.container.v1.MonitoringComponentConfig.ComponentR\x10enableComponents\"\xf3\x01\n" + - "\tComponent\x12\x19\n" + - "\x15COMPONENT_UNSPECIFIED\x10\x00\x12\x15\n" + - "\x11SYSTEM_COMPONENTS\x10\x01\x12\r\n" + - "\tAPISERVER\x10\x03\x12\r\n" + - "\tSCHEDULER\x10\x04\x12\x16\n" + - "\x12CONTROLLER_MANAGER\x10\x05\x12\v\n" + - "\aSTORAGE\x10\a\x12\a\n" + - "\x03HPA\x10\b\x12\a\n" + - "\x03POD\x10\t\x12\r\n" + - "\tDAEMONSET\x10\n" + - "\x12\x0e\n" + - "\n" + - "DEPLOYMENT\x10\v\x12\x0f\n" + - "\vSTATEFULSET\x10\f\x12\f\n" + - "\bCADVISOR\x10\r\x12\v\n" + - "\aKUBELET\x10\x0e\x12\b\n" + - "\x04DCGM\x10\x0f\x12\n" + - "\n" + - "\x06JOBSET\x10\x10\"\x94\x01\n" + - "\x17ManagedPrometheusConfig\x12\x18\n" + - "\aenabled\x18\x01 \x01(\bR\aenabled\x12_\n" + - "\x16auto_monitoring_config\x18\x02 \x01(\v2).google.container.v1.AutoMonitoringConfigR\x14autoMonitoringConfig\"\x90\x01\n" + - "\x14AutoMonitoringConfig\x12E\n" + - "\x05scope\x18\x01 \x01(\x0e2/.google.container.v1.AutoMonitoringConfig.ScopeR\x05scope\"1\n" + - "\x05Scope\x12\x15\n" + - "\x11SCOPE_UNSPECIFIED\x10\x00\x12\a\n" + - "\x03ALL\x10\x01\x12\b\n" + - "\x04NONE\x10\x02\"\xbc\x01\n" + - "\x0ePodAutoscaling\x12T\n" + - "\vhpa_profile\x18\x02 \x01(\x0e2..google.container.v1.PodAutoscaling.HPAProfileH\x00R\n" + - "hpaProfile\x88\x01\x01\"D\n" + - "\n" + - "HPAProfile\x12\x1b\n" + - "\x17HPA_PROFILE_UNSPECIFIED\x10\x00\x12\b\n" + - "\x04NONE\x10\x01\x12\x0f\n" + - "\vPERFORMANCE\x10\x02B\x0e\n" + - "\f_hpa_profile\"\x8a\x02\n" + - "\x05Fleet\x12\x18\n" + - "\aproject\x18\x01 \x01(\tR\aproject\x12#\n" + - "\n" + - "membership\x18\x02 \x01(\tB\x03\xe0A\x03R\n" + - "membership\x12*\n" + - "\x0epre_registered\x18\x03 \x01(\bB\x03\xe0A\x03R\rpreRegistered\x12R\n" + - "\x0fmembership_type\x18\x04 \x01(\x0e2).google.container.v1.Fleet.MembershipTypeR\x0emembershipType\"B\n" + - "\x0eMembershipType\x12\x1f\n" + - "\x1bMEMBERSHIP_TYPE_UNSPECIFIED\x10\x00\x12\x0f\n" + - "\vLIGHTWEIGHT\x10\x01\"\xad\b\n" + - "\x1bControlPlaneEndpointsConfig\x12r\n" + - "\x13dns_endpoint_config\x18\x01 \x01(\v2B.google.container.v1.ControlPlaneEndpointsConfig.DNSEndpointConfigR\x11dnsEndpointConfig\x12r\n" + - "\x13ip_endpoints_config\x18\x03 \x01(\v2B.google.container.v1.ControlPlaneEndpointsConfig.IPEndpointsConfigR\x11ipEndpointsConfig\x1a\xc1\x02\n" + - "\x11DNSEndpointConfig\x12\x1f\n" + - "\bendpoint\x18\x02 \x01(\tB\x03\xe0A\x03R\bendpoint\x129\n" + - "\x16allow_external_traffic\x18\x03 \x01(\bH\x00R\x14allowExternalTraffic\x88\x01\x01\x12=\n" + - "\x19enable_k8s_tokens_via_dns\x18\x05 \x01(\bH\x01R\x15enableK8sTokensViaDns\x88\x01\x01\x12;\n" + - "\x18enable_k8s_certs_via_dns\x18\x06 \x01(\bH\x02R\x14enableK8sCertsViaDns\x88\x01\x01B\x19\n" + - "\x17_allow_external_trafficB\x1c\n" + - "\x1a_enable_k8s_tokens_via_dnsB\x1b\n" + - "\x19_enable_k8s_certs_via_dns\x1a\xe1\x03\n" + - "\x11IPEndpointsConfig\x12\x1d\n" + - "\aenabled\x18\x01 \x01(\bH\x00R\aenabled\x88\x01\x01\x129\n" + - "\x16enable_public_endpoint\x18\x02 \x01(\bH\x01R\x14enablePublicEndpoint\x88\x01\x01\x12(\n" + - "\rglobal_access\x18\x03 \x01(\bH\x02R\fglobalAccess\x88\x01\x01\x12q\n" + - "\x1aauthorized_networks_config\x18\x04 \x01(\v23.google.container.v1.MasterAuthorizedNetworksConfigR\x18authorizedNetworksConfig\x12,\n" + - "\x0fpublic_endpoint\x18\x05 \x01(\tB\x03\xe0A\x03R\x0epublicEndpoint\x12.\n" + - "\x10private_endpoint\x18\x06 \x01(\tB\x03\xe0A\x03R\x0fprivateEndpoint\x12>\n" + - "\x1bprivate_endpoint_subnetwork\x18\a \x01(\tR\x19privateEndpointSubnetworkB\n" + - "\n" + - "\b_enabledB\x19\n" + - "\x17_enable_public_endpointB\x10\n" + - "\x0e_global_access\"A\n" + - "\x17LocalNvmeSsdBlockConfig\x12&\n" + - "\x0flocal_ssd_count\x18\x01 \x01(\x05R\rlocalSsdCount\"r\n" + - "\x1eEphemeralStorageLocalSsdConfig\x12&\n" + - "\x0flocal_ssd_count\x18\x01 \x01(\x05R\rlocalSsdCount\x12(\n" + - "\x10data_cache_count\x18\x02 \x01(\x05R\x0edataCacheCount\"\x96\x01\n" + - "\x13ResourceManagerTags\x12F\n" + - "\x04tags\x18\x01 \x03(\v22.google.container.v1.ResourceManagerTags.TagsEntryR\x04tags\x1a7\n" + - "\tTagsEntry\x12\x10\n" + - "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" + - "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\"\x96\x02\n" + - "\x10EnterpriseConfig\x12Y\n" + - "\fcluster_tier\x18\x01 \x01(\x0e21.google.container.v1.EnterpriseConfig.ClusterTierB\x03\xe0A\x03R\vclusterTier\x12T\n" + - "\fdesired_tier\x18\x02 \x01(\x0e21.google.container.v1.EnterpriseConfig.ClusterTierR\vdesiredTier\"M\n" + - "\vClusterTier\x12\x1c\n" + - "\x18CLUSTER_TIER_UNSPECIFIED\x10\x00\x12\f\n" + - "\bSTANDARD\x10\x01\x12\x0e\n" + - "\n" + - "ENTERPRISE\x10\x02\x1a\x02\x18\x01:\x02\x18\x01\"\xdc\x02\n" + - "\x13SecretManagerConfig\x12\x1d\n" + - "\aenabled\x18\x01 \x01(\bH\x00R\aenabled\x88\x01\x01\x12e\n" + - "\x0frotation_config\x18\x02 \x01(\v27.google.container.v1.SecretManagerConfig.RotationConfigH\x01R\x0erotationConfig\x88\x01\x01\x1a\x9e\x01\n" + - "\x0eRotationConfig\x12\x1d\n" + - "\aenabled\x18\x01 \x01(\bH\x00R\aenabled\x88\x01\x01\x12K\n" + - "\x11rotation_interval\x18\x02 \x01(\v2\x19.google.protobuf.DurationH\x01R\x10rotationInterval\x88\x01\x01B\n" + - "\n" + - "\b_enabledB\x14\n" + - "\x12_rotation_intervalB\n" + - "\n" + - "\b_enabledB\x12\n" + - "\x10_rotation_config\"\xa2\x01\n" + - "\bBootDisk\x12\x1b\n" + - "\tdisk_type\x18\x01 \x01(\tR\bdiskType\x12\x17\n" + - "\asize_gb\x18\x02 \x01(\x03R\x06sizeGb\x12)\n" + - "\x10provisioned_iops\x18\x03 \x01(\x03R\x0fprovisionedIops\x125\n" + - "\x16provisioned_throughput\x18\x04 \x01(\x03R\x15provisionedThroughput\"\xac\x01\n" + - "\x11SecondaryBootDisk\x12?\n" + - "\x04mode\x18\x01 \x01(\x0e2+.google.container.v1.SecondaryBootDisk.ModeR\x04mode\x12\x1d\n" + - "\n" + - "disk_image\x18\x02 \x01(\tR\tdiskImage\"7\n" + - "\x04Mode\x12\x14\n" + - "\x10MODE_UNSPECIFIED\x10\x00\x12\x19\n" + - "\x15CONTAINER_IMAGE_CACHE\x10\x01\"!\n" + - "\x1fSecondaryBootDiskUpdateStrategy\"S\n" + - "\x1eFetchClusterUpgradeInfoRequest\x12\x17\n" + - "\x04name\x18\x01 \x01(\tB\x03\xe0A\x02R\x04name\x12\x18\n" + - "\aversion\x18d \x01(\tR\aversion\"\xac\b\n" + - "\x12ClusterUpgradeInfo\x125\n" + - "\x14minor_target_version\x18\a \x01(\tH\x00R\x12minorTargetVersion\x88\x01\x01\x125\n" + - "\x14patch_target_version\x18\b \x01(\tH\x01R\x12patchTargetVersion\x88\x01\x01\x12i\n" + - "\x13auto_upgrade_status\x18\x02 \x03(\x0e29.google.container.v1.ClusterUpgradeInfo.AutoUpgradeStatusR\x11autoUpgradeStatus\x12d\n" + - "\rpaused_reason\x18\x03 \x03(\x0e2?.google.container.v1.ClusterUpgradeInfo.AutoUpgradePausedReasonR\fpausedReason\x12L\n" + - "\x0fupgrade_details\x18\x04 \x03(\v2#.google.container.v1.UpgradeDetailsR\x0eupgradeDetails\x12M\n" + - "!end_of_standard_support_timestamp\x18\x05 \x01(\tH\x02R\x1dendOfStandardSupportTimestamp\x88\x01\x01\x12M\n" + - "!end_of_extended_support_timestamp\x18\x06 \x01(\tH\x03R\x1dendOfExtendedSupportTimestamp\x88\x01\x01\"Z\n" + - "\x11AutoUpgradeStatus\x12\v\n" + - "\aUNKNOWN\x10\x00\x12\n" + - "\n" + - "\x06ACTIVE\x10\x01\x12\x18\n" + - "\x14MINOR_UPGRADE_PAUSED\x10\x04\x12\x12\n" + - "\x0eUPGRADE_PAUSED\x10\x05\"\x90\x02\n" + - "\x17AutoUpgradePausedReason\x12*\n" + - "&AUTO_UPGRADE_PAUSED_REASON_UNSPECIFIED\x10\x00\x12\x16\n" + - "\x12MAINTENANCE_WINDOW\x10\x01\x12%\n" + - "!MAINTENANCE_EXCLUSION_NO_UPGRADES\x10\x05\x12+\n" + - "'MAINTENANCE_EXCLUSION_NO_MINOR_UPGRADES\x10\x06\x12\x1d\n" + - "\x19CLUSTER_DISRUPTION_BUDGET\x10\x04\x12+\n" + - "'CLUSTER_DISRUPTION_BUDGET_MINOR_UPGRADE\x10\a\x12\x11\n" + - "\rSYSTEM_CONFIG\x10\bB\x17\n" + - "\x15_minor_target_versionB\x17\n" + - "\x15_patch_target_versionB$\n" + - "\"_end_of_standard_support_timestampB$\n" + - "\"_end_of_extended_support_timestamp\"\x9c\x04\n" + - "\x0eUpgradeDetails\x12D\n" + - "\x05state\x18\x01 \x01(\x0e2).google.container.v1.UpgradeDetails.StateB\x03\xe0A\x03R\x05state\x12>\n" + - "\n" + - "start_time\x18\x02 \x01(\v2\x1a.google.protobuf.TimestampH\x00R\tstartTime\x88\x01\x01\x12:\n" + - "\bend_time\x18\x03 \x01(\v2\x1a.google.protobuf.TimestampH\x01R\aendTime\x88\x01\x01\x12'\n" + - "\x0finitial_version\x18\x04 \x01(\tR\x0einitialVersion\x12%\n" + - "\x0etarget_version\x18\x05 \x01(\tR\rtargetVersion\x12L\n" + - "\n" + - "start_type\x18\x06 \x01(\x0e2-.google.container.v1.UpgradeDetails.StartTypeR\tstartType\"J\n" + - "\x05State\x12\v\n" + - "\aUNKNOWN\x10\x00\x12\n" + - "\n" + - "\x06FAILED\x10\x01\x12\r\n" + - "\tSUCCEEDED\x10\x02\x12\f\n" + - "\bCANCELED\x10\x03\x12\v\n" + - "\aRUNNING\x10\x04\"B\n" + - "\tStartType\x12\x1a\n" + - "\x16START_TYPE_UNSPECIFIED\x10\x00\x12\r\n" + - "\tAUTOMATIC\x10\x01\x12\n" + - "\n" + - "\x06MANUAL\x10\x02B\r\n" + - "\v_start_timeB\v\n" + - "\t_end_time\"T\n" + - "\x1fFetchNodePoolUpgradeInfoRequest\x12\x17\n" + - "\x04name\x18\x01 \x01(\tB\x03\xe0A\x02R\x04name\x12\x18\n" + - "\aversion\x18d \x01(\tR\aversion\"\xe3\a\n" + - "\x13NodePoolUpgradeInfo\x125\n" + - "\x14minor_target_version\x18\x01 \x01(\tH\x00R\x12minorTargetVersion\x88\x01\x01\x125\n" + - "\x14patch_target_version\x18\x02 \x01(\tH\x01R\x12patchTargetVersion\x88\x01\x01\x12j\n" + - "\x13auto_upgrade_status\x18\x03 \x03(\x0e2:.google.container.v1.NodePoolUpgradeInfo.AutoUpgradeStatusR\x11autoUpgradeStatus\x12e\n" + - "\rpaused_reason\x18\x04 \x03(\x0e2@.google.container.v1.NodePoolUpgradeInfo.AutoUpgradePausedReasonR\fpausedReason\x12L\n" + - "\x0fupgrade_details\x18\x05 \x03(\v2#.google.container.v1.UpgradeDetailsR\x0eupgradeDetails\x12M\n" + - "!end_of_standard_support_timestamp\x18\x06 \x01(\tH\x02R\x1dendOfStandardSupportTimestamp\x88\x01\x01\x12M\n" + - "!end_of_extended_support_timestamp\x18\a \x01(\tH\x03R\x1dendOfExtendedSupportTimestamp\x88\x01\x01\"Z\n" + - "\x11AutoUpgradeStatus\x12\v\n" + - "\aUNKNOWN\x10\x00\x12\n" + - "\n" + - "\x06ACTIVE\x10\x01\x12\x18\n" + - "\x14MINOR_UPGRADE_PAUSED\x10\x02\x12\x12\n" + - "\x0eUPGRADE_PAUSED\x10\x03\"\xc4\x01\n" + - "\x17AutoUpgradePausedReason\x12*\n" + - "&AUTO_UPGRADE_PAUSED_REASON_UNSPECIFIED\x10\x00\x12\x16\n" + - "\x12MAINTENANCE_WINDOW\x10\x01\x12%\n" + - "!MAINTENANCE_EXCLUSION_NO_UPGRADES\x10\x02\x12+\n" + - "'MAINTENANCE_EXCLUSION_NO_MINOR_UPGRADES\x10\x03\x12\x11\n" + - "\rSYSTEM_CONFIG\x10\x04B\x17\n" + - "\x15_minor_target_versionB\x17\n" + - "\x15_patch_target_versionB$\n" + - "\"_end_of_standard_support_timestampB$\n" + - "\"_end_of_extended_support_timestamp\"\xa4\x01\n" + - "\x14GkeAutoUpgradeConfig\x12R\n" + - "\n" + - "patch_mode\x18\x01 \x01(\x0e23.google.container.v1.GkeAutoUpgradeConfig.PatchModeR\tpatchMode\"8\n" + - "\tPatchMode\x12\x1a\n" + - "\x16PATCH_MODE_UNSPECIFIED\x10\x00\x12\x0f\n" + - "\vACCELERATED\x10\x01\"\xe6\x01\n" + - "\x11NetworkTierConfig\x12U\n" + - "\fnetwork_tier\x18\x01 \x01(\x0e22.google.container.v1.NetworkTierConfig.NetworkTierR\vnetworkTier\"z\n" + - "\vNetworkTier\x12\x1c\n" + - "\x18NETWORK_TIER_UNSPECIFIED\x10\x00\x12\x18\n" + - "\x14NETWORK_TIER_DEFAULT\x10\x01\x12\x18\n" + - "\x14NETWORK_TIER_PREMIUM\x10\x02\x12\x19\n" + - "\x15NETWORK_TIER_STANDARD\x10\x03\"\xd1\x01\n" + - "\x1aManagedOpenTelemetryConfig\x12P\n" + - "\x05scope\x18\x01 \x01(\x0e25.google.container.v1.ManagedOpenTelemetryConfig.ScopeH\x00R\x05scope\x88\x01\x01\"W\n" + - "\x05Scope\x12\x15\n" + - "\x11SCOPE_UNSPECIFIED\x10\x00\x12\b\n" + - "\x04NONE\x10\x01\x12-\n" + - ")COLLECTION_AND_INSTRUMENTATION_COMPONENTS\x10\x02B\b\n" + - "\x06_scope*\xc6\x01\n" + - "\x17PrivateIPv6GoogleAccess\x12*\n" + - "&PRIVATE_IPV6_GOOGLE_ACCESS_UNSPECIFIED\x10\x00\x12'\n" + - "#PRIVATE_IPV6_GOOGLE_ACCESS_DISABLED\x10\x01\x12(\n" + - "$PRIVATE_IPV6_GOOGLE_ACCESS_TO_GOOGLE\x10\x02\x12,\n" + - "(PRIVATE_IPV6_GOOGLE_ACCESS_BIDIRECTIONAL\x10\x03*W\n" + - "\x13UpgradeResourceType\x12%\n" + - "!UPGRADE_RESOURCE_TYPE_UNSPECIFIED\x10\x00\x12\n" + - "\n" + - "\x06MASTER\x10\x01\x12\r\n" + - "\tNODE_POOL\x10\x02*a\n" + - "\x10DatapathProvider\x12!\n" + - "\x1dDATAPATH_PROVIDER_UNSPECIFIED\x10\x00\x12\x13\n" + - "\x0fLEGACY_DATAPATH\x10\x01\x12\x15\n" + - "\x11ADVANCED_DATAPATH\x10\x02*o\n" + - "\x16NodePoolUpdateStrategy\x12)\n" + - "%NODE_POOL_UPDATE_STRATEGY_UNSPECIFIED\x10\x00\x12\x0e\n" + - "\n" + - "BLUE_GREEN\x10\x02\x12\t\n" + - "\x05SURGE\x10\x03\x12\x0f\n" + - "\vSHORT_LIVED\x10\x05*@\n" + - "\tStackType\x12\x1a\n" + - "\x16STACK_TYPE_UNSPECIFIED\x10\x00\x12\b\n" + - "\x04IPV4\x10\x01\x12\r\n" + - "\tIPV4_IPV6\x10\x02*N\n" + - "\x0eIPv6AccessType\x12 \n" + - "\x1cIPV6_ACCESS_TYPE_UNSPECIFIED\x10\x00\x12\f\n" + - "\bINTERNAL\x10\x01\x12\f\n" + - "\bEXTERNAL\x10\x02*\x9f\x01\n" + - "\x19InTransitEncryptionConfig\x12,\n" + - "(IN_TRANSIT_ENCRYPTION_CONFIG_UNSPECIFIED\x10\x00\x12\"\n" + - "\x1eIN_TRANSIT_ENCRYPTION_DISABLED\x10\x01\x120\n" + - ",IN_TRANSIT_ENCRYPTION_INTER_NODE_TRANSPARENT\x10\x022\xf9M\n" + - "\x0eClusterManager\x12\xe8\x01\n" + - "\fListClusters\x12(.google.container.v1.ListClustersRequest\x1a).google.container.v1.ListClustersResponse\"\x82\x01\xdaA\x0fproject_id,zone\xdaA\x06parent\x82\xd3\xe4\x93\x02aZ1\x12//v1/projects/{project_id}/zones/{zone}/clusters\x12,/v1/{parent=projects/*/locations/*}/clusters\x12\xed\x01\n" + - "\n" + - "GetCluster\x12&.google.container.v1.GetClusterRequest\x1a\x1c.google.container.v1.Cluster\"\x98\x01\xdaA\x1aproject_id,zone,cluster_id\xdaA\x04name\x82\xd3\xe4\x93\x02nZ>\x12*/v1/{name=projects/*/locations/*/clusters/*}:setResourceLabels\x12\xa5\x02\n" + - "\rSetLegacyAbac\x12).google.container.v1.SetLegacyAbacRequest\x1a\x1e.google.container.v1.Operation\"\xc8\x01\xdaA\"project_id,zone,cluster_id,enabled\xdaA\fname,enabled\x82\xd3\xe4\x93\x02\x8d\x01:\x01*ZL:\x01*\"G/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/legacyAbac\":/v1/{name=projects/*/locations/*/clusters/*}:setLegacyAbac\x12\xa0\x02\n" + - "\x0fStartIPRotation\x12+.google.container.v1.StartIPRotationRequest\x1a\x1e.google.container.v1.Operation\"\xbf\x01\xdaA\x1aproject_id,zone,cluster_id\xdaA\x04name\x82\xd3\xe4\x93\x02\x94\x01:\x01*ZQ:\x01*\"L/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}:startIpRotation\" google.container.v1.LinuxNodeConfig.SysctlsEntry - 7, // 1: google.container.v1.LinuxNodeConfig.cgroup_mode:type_name -> google.container.v1.LinuxNodeConfig.CgroupMode - 278, // 2: google.container.v1.LinuxNodeConfig.hugepages:type_name -> google.container.v1.LinuxNodeConfig.HugepagesConfig - 8, // 3: google.container.v1.LinuxNodeConfig.transparent_hugepage_enabled:type_name -> google.container.v1.LinuxNodeConfig.TransparentHugepageEnabled - 9, // 4: google.container.v1.LinuxNodeConfig.transparent_hugepage_defrag:type_name -> google.container.v1.LinuxNodeConfig.TransparentHugepageDefrag - 279, // 5: google.container.v1.LinuxNodeConfig.swap_config:type_name -> google.container.v1.LinuxNodeConfig.SwapConfig - 280, // 6: google.container.v1.LinuxNodeConfig.node_kernel_module_loading:type_name -> google.container.v1.LinuxNodeConfig.NodeKernelModuleLoading - 11, // 7: google.container.v1.WindowsNodeConfig.os_version:type_name -> google.container.v1.WindowsNodeConfig.OSVersion - 81, // 8: google.container.v1.NodeKubeletConfig.topology_manager:type_name -> google.container.v1.TopologyManager - 82, // 9: google.container.v1.NodeKubeletConfig.memory_manager:type_name -> google.container.v1.MemoryManager - 328, // 10: google.container.v1.NodeKubeletConfig.cpu_cfs_quota:type_name -> google.protobuf.BoolValue - 83, // 11: google.container.v1.NodeKubeletConfig.eviction_soft:type_name -> google.container.v1.EvictionSignals - 84, // 12: google.container.v1.NodeKubeletConfig.eviction_soft_grace_period:type_name -> google.container.v1.EvictionGracePeriod - 85, // 13: google.container.v1.NodeKubeletConfig.eviction_minimum_reclaim:type_name -> google.container.v1.EvictionMinimumReclaim - 286, // 14: google.container.v1.NodeConfig.metadata:type_name -> google.container.v1.NodeConfig.MetadataEntry - 287, // 15: google.container.v1.NodeConfig.labels:type_name -> google.container.v1.NodeConfig.LabelsEntry - 199, // 16: google.container.v1.NodeConfig.accelerators:type_name -> google.container.v1.AcceleratorConfig - 202, // 17: google.container.v1.NodeConfig.workload_metadata_config:type_name -> google.container.v1.WorkloadMetadataConfig - 97, // 18: google.container.v1.NodeConfig.taints:type_name -> google.container.v1.NodeTaint - 92, // 19: google.container.v1.NodeConfig.sandbox_config:type_name -> google.container.v1.SandboxConfig - 94, // 20: google.container.v1.NodeConfig.reservation_affinity:type_name -> google.container.v1.ReservationAffinity - 91, // 21: google.container.v1.NodeConfig.shielded_instance_config:type_name -> google.container.v1.ShieldedInstanceConfig - 78, // 22: google.container.v1.NodeConfig.linux_node_config:type_name -> google.container.v1.LinuxNodeConfig - 80, // 23: google.container.v1.NodeConfig.kubelet_config:type_name -> google.container.v1.NodeKubeletConfig - 93, // 24: google.container.v1.NodeConfig.gcfs_config:type_name -> google.container.v1.GcfsConfig - 87, // 25: google.container.v1.NodeConfig.advanced_machine_features:type_name -> google.container.v1.AdvancedMachineFeatures - 235, // 26: google.container.v1.NodeConfig.gvnic:type_name -> google.container.v1.VirtualNIC - 239, // 27: google.container.v1.NodeConfig.confidential_nodes:type_name -> google.container.v1.ConfidentialNodes - 236, // 28: google.container.v1.NodeConfig.fast_socket:type_name -> google.container.v1.FastSocket - 288, // 29: google.container.v1.NodeConfig.resource_labels:type_name -> google.container.v1.NodeConfig.ResourceLabelsEntry - 254, // 30: google.container.v1.NodeConfig.logging_config:type_name -> google.container.v1.NodePoolLoggingConfig - 79, // 31: google.container.v1.NodeConfig.windows_node_config:type_name -> google.container.v1.WindowsNodeConfig - 262, // 32: google.container.v1.NodeConfig.local_nvme_ssd_block_config:type_name -> google.container.v1.LocalNvmeSsdBlockConfig - 263, // 33: google.container.v1.NodeConfig.ephemeral_storage_local_ssd_config:type_name -> google.container.v1.EphemeralStorageLocalSsdConfig - 95, // 34: google.container.v1.NodeConfig.sole_tenant_config:type_name -> google.container.v1.SoleTenantConfig - 96, // 35: google.container.v1.NodeConfig.containerd_config:type_name -> google.container.v1.ContainerdConfig - 264, // 36: google.container.v1.NodeConfig.resource_manager_tags:type_name -> google.container.v1.ResourceManagerTags - 268, // 37: google.container.v1.NodeConfig.secondary_boot_disks:type_name -> google.container.v1.SecondaryBootDisk - 269, // 38: google.container.v1.NodeConfig.secondary_boot_disk_update_strategy:type_name -> google.container.v1.SecondaryBootDiskUpdateStrategy - 237, // 39: google.container.v1.NodeConfig.gpu_direct_config:type_name -> google.container.v1.GPUDirectConfig - 329, // 40: google.container.v1.NodeConfig.max_run_duration:type_name -> google.protobuf.Duration - 12, // 41: google.container.v1.NodeConfig.local_ssd_encryption_mode:type_name -> google.container.v1.NodeConfig.LocalSsdEncryptionMode - 13, // 42: google.container.v1.NodeConfig.effective_cgroup_mode:type_name -> google.container.v1.NodeConfig.EffectiveCgroupMode - 267, // 43: google.container.v1.NodeConfig.boot_disk:type_name -> google.container.v1.BootDisk - 329, // 44: google.container.v1.NodeConfig.consolidation_delay:type_name -> google.protobuf.Duration - 14, // 45: google.container.v1.AdvancedMachineFeatures.performance_monitoring_unit:type_name -> google.container.v1.AdvancedMachineFeatures.PerformanceMonitoringUnit - 289, // 46: google.container.v1.NodeNetworkConfig.network_performance_config:type_name -> google.container.v1.NodeNetworkConfig.NetworkPerformanceConfig - 129, // 47: google.container.v1.NodeNetworkConfig.pod_cidr_overprovision_config:type_name -> google.container.v1.PodCIDROverprovisionConfig - 89, // 48: google.container.v1.NodeNetworkConfig.additional_node_network_configs:type_name -> google.container.v1.AdditionalNodeNetworkConfig - 90, // 49: google.container.v1.NodeNetworkConfig.additional_pod_network_configs:type_name -> google.container.v1.AdditionalPodNetworkConfig - 276, // 50: google.container.v1.NodeNetworkConfig.network_tier_config:type_name -> google.container.v1.NetworkTierConfig - 222, // 51: google.container.v1.AdditionalPodNetworkConfig.max_pods_per_node:type_name -> google.container.v1.MaxPodsConstraint - 16, // 52: google.container.v1.SandboxConfig.type:type_name -> google.container.v1.SandboxConfig.Type - 17, // 53: google.container.v1.ReservationAffinity.consume_reservation_type:type_name -> google.container.v1.ReservationAffinity.Type - 290, // 54: google.container.v1.SoleTenantConfig.node_affinities:type_name -> google.container.v1.SoleTenantConfig.NodeAffinity - 291, // 55: google.container.v1.ContainerdConfig.private_registry_access_config:type_name -> google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig - 292, // 56: google.container.v1.ContainerdConfig.writable_cgroups:type_name -> google.container.v1.ContainerdConfig.WritableCgroups - 293, // 57: google.container.v1.ContainerdConfig.registry_hosts:type_name -> google.container.v1.ContainerdConfig.RegistryHostConfig - 20, // 58: google.container.v1.NodeTaint.effect:type_name -> google.container.v1.NodeTaint.Effect - 97, // 59: google.container.v1.NodeTaints.taints:type_name -> google.container.v1.NodeTaint - 300, // 60: google.container.v1.NodeLabels.labels:type_name -> google.container.v1.NodeLabels.LabelsEntry - 301, // 61: google.container.v1.ResourceLabels.labels:type_name -> google.container.v1.ResourceLabels.LabelsEntry - 103, // 62: google.container.v1.MasterAuth.client_certificate_config:type_name -> google.container.v1.ClientCertificateConfig - 105, // 63: google.container.v1.AddonsConfig.http_load_balancing:type_name -> google.container.v1.HttpLoadBalancing - 106, // 64: google.container.v1.AddonsConfig.horizontal_pod_autoscaling:type_name -> google.container.v1.HorizontalPodAutoscaling - 107, // 65: google.container.v1.AddonsConfig.kubernetes_dashboard:type_name -> google.container.v1.KubernetesDashboard - 108, // 66: google.container.v1.AddonsConfig.network_policy_config:type_name -> google.container.v1.NetworkPolicyConfig - 113, // 67: google.container.v1.AddonsConfig.cloud_run_config:type_name -> google.container.v1.CloudRunConfig - 109, // 68: google.container.v1.AddonsConfig.dns_cache_config:type_name -> google.container.v1.DnsCacheConfig - 114, // 69: google.container.v1.AddonsConfig.config_connector_config:type_name -> google.container.v1.ConfigConnectorConfig - 115, // 70: google.container.v1.AddonsConfig.gce_persistent_disk_csi_driver_config:type_name -> google.container.v1.GcePersistentDiskCsiDriverConfig - 116, // 71: google.container.v1.AddonsConfig.gcp_filestore_csi_driver_config:type_name -> google.container.v1.GcpFilestoreCsiDriverConfig - 123, // 72: google.container.v1.AddonsConfig.gke_backup_agent_config:type_name -> google.container.v1.GkeBackupAgentConfig - 117, // 73: google.container.v1.AddonsConfig.gcs_fuse_csi_driver_config:type_name -> google.container.v1.GcsFuseCsiDriverConfig - 124, // 74: google.container.v1.AddonsConfig.stateful_ha_config:type_name -> google.container.v1.StatefulHAConfig - 118, // 75: google.container.v1.AddonsConfig.parallelstore_csi_driver_config:type_name -> google.container.v1.ParallelstoreCsiDriverConfig - 122, // 76: google.container.v1.AddonsConfig.ray_operator_config:type_name -> google.container.v1.RayOperatorConfig - 119, // 77: google.container.v1.AddonsConfig.high_scale_checkpointing_config:type_name -> google.container.v1.HighScaleCheckpointingConfig - 120, // 78: google.container.v1.AddonsConfig.lustre_csi_driver_config:type_name -> google.container.v1.LustreCsiDriverConfig - 121, // 79: google.container.v1.AddonsConfig.slice_controller_config:type_name -> google.container.v1.SliceControllerConfig - 110, // 80: google.container.v1.PrivateClusterConfig.master_global_access_config:type_name -> google.container.v1.PrivateClusterMasterGlobalAccessConfig - 21, // 81: google.container.v1.CloudRunConfig.load_balancer_type:type_name -> google.container.v1.CloudRunConfig.LoadBalancerType - 250, // 82: google.container.v1.RayOperatorConfig.ray_cluster_logging_config:type_name -> google.container.v1.RayClusterLoggingConfig - 253, // 83: google.container.v1.RayOperatorConfig.ray_cluster_monitoring_config:type_name -> google.container.v1.RayClusterMonitoringConfig - 302, // 84: google.container.v1.MasterAuthorizedNetworksConfig.cidr_blocks:type_name -> google.container.v1.MasterAuthorizedNetworksConfig.CidrBlock - 22, // 85: google.container.v1.NetworkPolicy.provider:type_name -> google.container.v1.NetworkPolicy.Provider - 23, // 86: google.container.v1.BinaryAuthorization.evaluation_mode:type_name -> google.container.v1.BinaryAuthorization.EvaluationMode - 4, // 87: google.container.v1.IPAllocationPolicy.stack_type:type_name -> google.container.v1.StackType - 5, // 88: google.container.v1.IPAllocationPolicy.ipv6_access_type:type_name -> google.container.v1.IPv6AccessType - 129, // 89: google.container.v1.IPAllocationPolicy.pod_cidr_overprovision_config:type_name -> google.container.v1.PodCIDROverprovisionConfig - 142, // 90: google.container.v1.IPAllocationPolicy.additional_pod_ranges_config:type_name -> google.container.v1.AdditionalPodRangesConfig - 143, // 91: google.container.v1.IPAllocationPolicy.additional_ip_ranges_configs:type_name -> google.container.v1.AdditionalIPRangesConfig - 145, // 92: google.container.v1.IPAllocationPolicy.auto_ipam_config:type_name -> google.container.v1.AutoIpamConfig - 276, // 93: google.container.v1.IPAllocationPolicy.network_tier_config:type_name -> google.container.v1.NetworkTierConfig - 86, // 94: google.container.v1.Cluster.node_config:type_name -> google.container.v1.NodeConfig - 102, // 95: google.container.v1.Cluster.master_auth:type_name -> google.container.v1.MasterAuth - 104, // 96: google.container.v1.Cluster.addons_config:type_name -> google.container.v1.AddonsConfig - 175, // 97: google.container.v1.Cluster.node_pools:type_name -> google.container.v1.NodePool - 303, // 98: google.container.v1.Cluster.resource_labels:type_name -> google.container.v1.Cluster.ResourceLabelsEntry - 126, // 99: google.container.v1.Cluster.legacy_abac:type_name -> google.container.v1.LegacyAbac - 127, // 100: google.container.v1.Cluster.network_policy:type_name -> google.container.v1.NetworkPolicy - 130, // 101: google.container.v1.Cluster.ip_allocation_policy:type_name -> google.container.v1.IPAllocationPolicy - 125, // 102: google.container.v1.Cluster.master_authorized_networks_config:type_name -> google.container.v1.MasterAuthorizedNetworksConfig - 179, // 103: google.container.v1.Cluster.maintenance_policy:type_name -> google.container.v1.MaintenancePolicy - 128, // 104: google.container.v1.Cluster.binary_authorization:type_name -> google.container.v1.BinaryAuthorization - 190, // 105: google.container.v1.Cluster.autoscaling:type_name -> google.container.v1.ClusterAutoscaling - 206, // 106: google.container.v1.Cluster.network_config:type_name -> google.container.v1.NetworkConfig - 222, // 107: google.container.v1.Cluster.default_max_pods_constraint:type_name -> google.container.v1.MaxPodsConstraint - 231, // 108: google.container.v1.Cluster.resource_usage_export_config:type_name -> google.container.v1.ResourceUsageExportConfig - 112, // 109: google.container.v1.Cluster.authenticator_groups_config:type_name -> google.container.v1.AuthenticatorGroupsConfig - 111, // 110: google.container.v1.Cluster.private_cluster_config:type_name -> google.container.v1.PrivateClusterConfig - 226, // 111: google.container.v1.Cluster.database_encryption:type_name -> google.container.v1.DatabaseEncryption - 232, // 112: google.container.v1.Cluster.vertical_pod_autoscaling:type_name -> google.container.v1.VerticalPodAutoscaling - 234, // 113: google.container.v1.Cluster.shielded_nodes:type_name -> google.container.v1.ShieldedNodes - 217, // 114: google.container.v1.Cluster.release_channel:type_name -> google.container.v1.ReleaseChannel - 223, // 115: google.container.v1.Cluster.workload_identity_config:type_name -> google.container.v1.WorkloadIdentityConfig - 225, // 116: google.container.v1.Cluster.mesh_certificates:type_name -> google.container.v1.MeshCertificates - 218, // 117: google.container.v1.Cluster.cost_management_config:type_name -> google.container.v1.CostManagementConfig - 238, // 118: google.container.v1.Cluster.notification_config:type_name -> google.container.v1.NotificationConfig - 239, // 119: google.container.v1.Cluster.confidential_nodes:type_name -> google.container.v1.ConfidentialNodes - 224, // 120: google.container.v1.Cluster.identity_service_config:type_name -> google.container.v1.IdentityServiceConfig - 24, // 121: google.container.v1.Cluster.status:type_name -> google.container.v1.Cluster.Status - 205, // 122: google.container.v1.Cluster.conditions:type_name -> google.container.v1.StatusCondition - 245, // 123: google.container.v1.Cluster.autopilot:type_name -> google.container.v1.Autopilot - 139, // 124: google.container.v1.Cluster.node_pool_defaults:type_name -> google.container.v1.NodePoolDefaults - 248, // 125: google.container.v1.Cluster.logging_config:type_name -> google.container.v1.LoggingConfig - 251, // 126: google.container.v1.Cluster.monitoring_config:type_name -> google.container.v1.MonitoringConfig - 138, // 127: google.container.v1.Cluster.node_pool_auto_config:type_name -> google.container.v1.NodePoolAutoConfig - 259, // 128: google.container.v1.Cluster.pod_autoscaling:type_name -> google.container.v1.PodAutoscaling - 260, // 129: google.container.v1.Cluster.fleet:type_name -> google.container.v1.Fleet - 137, // 130: google.container.v1.Cluster.security_posture_config:type_name -> google.container.v1.SecurityPostureConfig - 261, // 131: google.container.v1.Cluster.control_plane_endpoints_config:type_name -> google.container.v1.ControlPlaneEndpointsConfig - 136, // 132: google.container.v1.Cluster.enable_k8s_beta_apis:type_name -> google.container.v1.K8sBetaAPIConfig - 265, // 133: google.container.v1.Cluster.enterprise_config:type_name -> google.container.v1.EnterpriseConfig - 266, // 134: google.container.v1.Cluster.secret_manager_config:type_name -> google.container.v1.SecretManagerConfig - 135, // 135: google.container.v1.Cluster.compliance_posture_config:type_name -> google.container.v1.CompliancePostureConfig - 133, // 136: google.container.v1.Cluster.user_managed_keys_config:type_name -> google.container.v1.UserManagedKeysConfig - 132, // 137: google.container.v1.Cluster.rbac_binding_config:type_name -> google.container.v1.RBACBindingConfig - 275, // 138: google.container.v1.Cluster.gke_auto_upgrade_config:type_name -> google.container.v1.GkeAutoUpgradeConfig - 134, // 139: google.container.v1.Cluster.anonymous_authentication_config:type_name -> google.container.v1.AnonymousAuthenticationConfig - 277, // 140: google.container.v1.Cluster.managed_opentelemetry_config:type_name -> google.container.v1.ManagedOpenTelemetryConfig - 25, // 141: google.container.v1.AnonymousAuthenticationConfig.mode:type_name -> google.container.v1.AnonymousAuthenticationConfig.Mode - 26, // 142: google.container.v1.CompliancePostureConfig.mode:type_name -> google.container.v1.CompliancePostureConfig.Mode - 304, // 143: google.container.v1.CompliancePostureConfig.compliance_standards:type_name -> google.container.v1.CompliancePostureConfig.ComplianceStandard - 27, // 144: google.container.v1.SecurityPostureConfig.mode:type_name -> google.container.v1.SecurityPostureConfig.Mode - 28, // 145: google.container.v1.SecurityPostureConfig.vulnerability_mode:type_name -> google.container.v1.SecurityPostureConfig.VulnerabilityMode - 101, // 146: google.container.v1.NodePoolAutoConfig.network_tags:type_name -> google.container.v1.NetworkTags - 264, // 147: google.container.v1.NodePoolAutoConfig.resource_manager_tags:type_name -> google.container.v1.ResourceManagerTags - 80, // 148: google.container.v1.NodePoolAutoConfig.node_kubelet_config:type_name -> google.container.v1.NodeKubeletConfig - 78, // 149: google.container.v1.NodePoolAutoConfig.linux_node_config:type_name -> google.container.v1.LinuxNodeConfig - 140, // 150: google.container.v1.NodePoolDefaults.node_config_defaults:type_name -> google.container.v1.NodeConfigDefaults - 93, // 151: google.container.v1.NodeConfigDefaults.gcfs_config:type_name -> google.container.v1.GcfsConfig - 254, // 152: google.container.v1.NodeConfigDefaults.logging_config:type_name -> google.container.v1.NodePoolLoggingConfig - 96, // 153: google.container.v1.NodeConfigDefaults.containerd_config:type_name -> google.container.v1.ContainerdConfig - 80, // 154: google.container.v1.NodeConfigDefaults.node_kubelet_config:type_name -> google.container.v1.NodeKubeletConfig - 104, // 155: google.container.v1.ClusterUpdate.desired_addons_config:type_name -> google.container.v1.AddonsConfig - 226, // 156: google.container.v1.ClusterUpdate.desired_database_encryption:type_name -> google.container.v1.DatabaseEncryption - 223, // 157: google.container.v1.ClusterUpdate.desired_workload_identity_config:type_name -> google.container.v1.WorkloadIdentityConfig - 225, // 158: google.container.v1.ClusterUpdate.desired_mesh_certificates:type_name -> google.container.v1.MeshCertificates - 234, // 159: google.container.v1.ClusterUpdate.desired_shielded_nodes:type_name -> google.container.v1.ShieldedNodes - 218, // 160: google.container.v1.ClusterUpdate.desired_cost_management_config:type_name -> google.container.v1.CostManagementConfig - 221, // 161: google.container.v1.ClusterUpdate.desired_dns_config:type_name -> google.container.v1.DNSConfig - 194, // 162: google.container.v1.ClusterUpdate.desired_node_pool_autoscaling:type_name -> google.container.v1.NodePoolAutoscaling - 125, // 163: google.container.v1.ClusterUpdate.desired_master_authorized_networks_config:type_name -> google.container.v1.MasterAuthorizedNetworksConfig - 190, // 164: google.container.v1.ClusterUpdate.desired_cluster_autoscaling:type_name -> google.container.v1.ClusterAutoscaling - 128, // 165: google.container.v1.ClusterUpdate.desired_binary_authorization:type_name -> google.container.v1.BinaryAuthorization - 231, // 166: google.container.v1.ClusterUpdate.desired_resource_usage_export_config:type_name -> google.container.v1.ResourceUsageExportConfig - 232, // 167: google.container.v1.ClusterUpdate.desired_vertical_pod_autoscaling:type_name -> google.container.v1.VerticalPodAutoscaling - 111, // 168: google.container.v1.ClusterUpdate.desired_private_cluster_config:type_name -> google.container.v1.PrivateClusterConfig - 219, // 169: google.container.v1.ClusterUpdate.desired_intra_node_visibility_config:type_name -> google.container.v1.IntraNodeVisibilityConfig - 233, // 170: google.container.v1.ClusterUpdate.desired_default_snat_status:type_name -> google.container.v1.DefaultSnatStatus - 217, // 171: google.container.v1.ClusterUpdate.desired_release_channel:type_name -> google.container.v1.ReleaseChannel - 220, // 172: google.container.v1.ClusterUpdate.desired_l4ilb_subsetting_config:type_name -> google.container.v1.ILBSubsettingConfig - 2, // 173: google.container.v1.ClusterUpdate.desired_datapath_provider:type_name -> google.container.v1.DatapathProvider - 0, // 174: google.container.v1.ClusterUpdate.desired_private_ipv6_google_access:type_name -> google.container.v1.PrivateIPv6GoogleAccess - 238, // 175: google.container.v1.ClusterUpdate.desired_notification_config:type_name -> google.container.v1.NotificationConfig - 112, // 176: google.container.v1.ClusterUpdate.desired_authenticator_groups_config:type_name -> google.container.v1.AuthenticatorGroupsConfig - 248, // 177: google.container.v1.ClusterUpdate.desired_logging_config:type_name -> google.container.v1.LoggingConfig - 251, // 178: google.container.v1.ClusterUpdate.desired_monitoring_config:type_name -> google.container.v1.MonitoringConfig - 224, // 179: google.container.v1.ClusterUpdate.desired_identity_service_config:type_name -> google.container.v1.IdentityServiceConfig - 208, // 180: google.container.v1.ClusterUpdate.desired_service_external_ips_config:type_name -> google.container.v1.ServiceExternalIPsConfig - 261, // 181: google.container.v1.ClusterUpdate.desired_control_plane_endpoints_config:type_name -> google.container.v1.ControlPlaneEndpointsConfig - 93, // 182: google.container.v1.ClusterUpdate.desired_gcfs_config:type_name -> google.container.v1.GcfsConfig - 101, // 183: google.container.v1.ClusterUpdate.desired_node_pool_auto_config_network_tags:type_name -> google.container.v1.NetworkTags - 259, // 184: google.container.v1.ClusterUpdate.desired_pod_autoscaling:type_name -> google.container.v1.PodAutoscaling - 207, // 185: google.container.v1.ClusterUpdate.desired_gateway_api_config:type_name -> google.container.v1.GatewayAPIConfig - 254, // 186: google.container.v1.ClusterUpdate.desired_node_pool_logging_config:type_name -> google.container.v1.NodePoolLoggingConfig - 260, // 187: google.container.v1.ClusterUpdate.desired_fleet:type_name -> google.container.v1.Fleet - 4, // 188: google.container.v1.ClusterUpdate.desired_stack_type:type_name -> google.container.v1.StackType - 142, // 189: google.container.v1.ClusterUpdate.additional_pod_ranges_config:type_name -> google.container.v1.AdditionalPodRangesConfig - 142, // 190: google.container.v1.ClusterUpdate.removed_additional_pod_ranges_config:type_name -> google.container.v1.AdditionalPodRangesConfig - 136, // 191: google.container.v1.ClusterUpdate.enable_k8s_beta_apis:type_name -> google.container.v1.K8sBetaAPIConfig - 137, // 192: google.container.v1.ClusterUpdate.desired_security_posture_config:type_name -> google.container.v1.SecurityPostureConfig - 317, // 193: google.container.v1.ClusterUpdate.desired_network_performance_config:type_name -> google.container.v1.NetworkConfig.ClusterNetworkPerformanceConfig - 247, // 194: google.container.v1.ClusterUpdate.desired_autopilot_workload_policy_config:type_name -> google.container.v1.WorkloadPolicyConfig - 136, // 195: google.container.v1.ClusterUpdate.desired_k8s_beta_apis:type_name -> google.container.v1.K8sBetaAPIConfig - 96, // 196: google.container.v1.ClusterUpdate.desired_containerd_config:type_name -> google.container.v1.ContainerdConfig - 264, // 197: google.container.v1.ClusterUpdate.desired_node_pool_auto_config_resource_manager_tags:type_name -> google.container.v1.ResourceManagerTags - 6, // 198: google.container.v1.ClusterUpdate.desired_in_transit_encryption_config:type_name -> google.container.v1.InTransitEncryptionConfig - 266, // 199: google.container.v1.ClusterUpdate.desired_secret_manager_config:type_name -> google.container.v1.SecretManagerConfig - 135, // 200: google.container.v1.ClusterUpdate.desired_compliance_posture_config:type_name -> google.container.v1.CompliancePostureConfig - 80, // 201: google.container.v1.ClusterUpdate.desired_node_kubelet_config:type_name -> google.container.v1.NodeKubeletConfig - 80, // 202: google.container.v1.ClusterUpdate.desired_node_pool_auto_config_kubelet_config:type_name -> google.container.v1.NodeKubeletConfig - 133, // 203: google.container.v1.ClusterUpdate.user_managed_keys_config:type_name -> google.container.v1.UserManagedKeysConfig - 132, // 204: google.container.v1.ClusterUpdate.desired_rbac_binding_config:type_name -> google.container.v1.RBACBindingConfig - 144, // 205: google.container.v1.ClusterUpdate.desired_additional_ip_ranges_config:type_name -> google.container.v1.DesiredAdditionalIPRangesConfig - 147, // 206: google.container.v1.ClusterUpdate.desired_enterprise_config:type_name -> google.container.v1.DesiredEnterpriseConfig - 145, // 207: google.container.v1.ClusterUpdate.desired_auto_ipam_config:type_name -> google.container.v1.AutoIpamConfig - 78, // 208: google.container.v1.ClusterUpdate.desired_node_pool_auto_config_linux_node_config:type_name -> google.container.v1.LinuxNodeConfig - 133, // 209: google.container.v1.ClusterUpdate.desired_user_managed_keys_config:type_name -> google.container.v1.UserManagedKeysConfig - 134, // 210: google.container.v1.ClusterUpdate.desired_anonymous_authentication_config:type_name -> google.container.v1.AnonymousAuthenticationConfig - 275, // 211: google.container.v1.ClusterUpdate.gke_auto_upgrade_config:type_name -> google.container.v1.GkeAutoUpgradeConfig - 276, // 212: google.container.v1.ClusterUpdate.desired_network_tier_config:type_name -> google.container.v1.NetworkTierConfig - 246, // 213: google.container.v1.ClusterUpdate.desired_privileged_admission_config:type_name -> google.container.v1.PrivilegedAdmissionConfig - 277, // 214: google.container.v1.ClusterUpdate.desired_managed_opentelemetry_config:type_name -> google.container.v1.ManagedOpenTelemetryConfig - 146, // 215: google.container.v1.AdditionalPodRangesConfig.pod_range_info:type_name -> google.container.v1.RangeInfo - 29, // 216: google.container.v1.AdditionalIPRangesConfig.status:type_name -> google.container.v1.AdditionalIPRangesConfig.Status - 143, // 217: google.container.v1.DesiredAdditionalIPRangesConfig.additional_ip_ranges_configs:type_name -> google.container.v1.AdditionalIPRangesConfig - 67, // 218: google.container.v1.DesiredEnterpriseConfig.desired_tier:type_name -> google.container.v1.EnterpriseConfig.ClusterTier - 31, // 219: google.container.v1.Operation.operation_type:type_name -> google.container.v1.Operation.Type - 30, // 220: google.container.v1.Operation.status:type_name -> google.container.v1.Operation.Status - 149, // 221: google.container.v1.Operation.progress:type_name -> google.container.v1.OperationProgress - 205, // 222: google.container.v1.Operation.cluster_conditions:type_name -> google.container.v1.StatusCondition - 205, // 223: google.container.v1.Operation.nodepool_conditions:type_name -> google.container.v1.StatusCondition - 330, // 224: google.container.v1.Operation.error:type_name -> google.rpc.Status - 30, // 225: google.container.v1.OperationProgress.status:type_name -> google.container.v1.Operation.Status - 305, // 226: google.container.v1.OperationProgress.metrics:type_name -> google.container.v1.OperationProgress.Metric - 149, // 227: google.container.v1.OperationProgress.stages:type_name -> google.container.v1.OperationProgress - 131, // 228: google.container.v1.CreateClusterRequest.cluster:type_name -> google.container.v1.Cluster - 141, // 229: google.container.v1.UpdateClusterRequest.update:type_name -> google.container.v1.ClusterUpdate - 202, // 230: google.container.v1.UpdateNodePoolRequest.workload_metadata_config:type_name -> google.container.v1.WorkloadMetadataConfig - 309, // 231: google.container.v1.UpdateNodePoolRequest.upgrade_settings:type_name -> google.container.v1.NodePool.UpgradeSettings - 101, // 232: google.container.v1.UpdateNodePoolRequest.tags:type_name -> google.container.v1.NetworkTags - 98, // 233: google.container.v1.UpdateNodePoolRequest.taints:type_name -> google.container.v1.NodeTaints - 99, // 234: google.container.v1.UpdateNodePoolRequest.labels:type_name -> google.container.v1.NodeLabels - 78, // 235: google.container.v1.UpdateNodePoolRequest.linux_node_config:type_name -> google.container.v1.LinuxNodeConfig - 80, // 236: google.container.v1.UpdateNodePoolRequest.kubelet_config:type_name -> google.container.v1.NodeKubeletConfig - 88, // 237: google.container.v1.UpdateNodePoolRequest.node_network_config:type_name -> google.container.v1.NodeNetworkConfig - 93, // 238: google.container.v1.UpdateNodePoolRequest.gcfs_config:type_name -> google.container.v1.GcfsConfig - 239, // 239: google.container.v1.UpdateNodePoolRequest.confidential_nodes:type_name -> google.container.v1.ConfidentialNodes - 235, // 240: google.container.v1.UpdateNodePoolRequest.gvnic:type_name -> google.container.v1.VirtualNIC - 236, // 241: google.container.v1.UpdateNodePoolRequest.fast_socket:type_name -> google.container.v1.FastSocket - 254, // 242: google.container.v1.UpdateNodePoolRequest.logging_config:type_name -> google.container.v1.NodePoolLoggingConfig - 100, // 243: google.container.v1.UpdateNodePoolRequest.resource_labels:type_name -> google.container.v1.ResourceLabels - 79, // 244: google.container.v1.UpdateNodePoolRequest.windows_node_config:type_name -> google.container.v1.WindowsNodeConfig - 199, // 245: google.container.v1.UpdateNodePoolRequest.accelerators:type_name -> google.container.v1.AcceleratorConfig - 264, // 246: google.container.v1.UpdateNodePoolRequest.resource_manager_tags:type_name -> google.container.v1.ResourceManagerTags - 96, // 247: google.container.v1.UpdateNodePoolRequest.containerd_config:type_name -> google.container.v1.ContainerdConfig - 312, // 248: google.container.v1.UpdateNodePoolRequest.queued_provisioning:type_name -> google.container.v1.NodePool.QueuedProvisioning - 329, // 249: google.container.v1.UpdateNodePoolRequest.max_run_duration:type_name -> google.protobuf.Duration - 267, // 250: google.container.v1.UpdateNodePoolRequest.boot_disk:type_name -> google.container.v1.BootDisk - 313, // 251: google.container.v1.UpdateNodePoolRequest.node_drain_config:type_name -> google.container.v1.NodePool.NodeDrainConfig - 329, // 252: google.container.v1.UpdateNodePoolRequest.consolidation_delay:type_name -> google.protobuf.Duration - 194, // 253: google.container.v1.SetNodePoolAutoscalingRequest.autoscaling:type_name -> google.container.v1.NodePoolAutoscaling - 104, // 254: google.container.v1.SetAddonsConfigRequest.addons_config:type_name -> google.container.v1.AddonsConfig - 32, // 255: google.container.v1.SetMasterAuthRequest.action:type_name -> google.container.v1.SetMasterAuthRequest.Action - 102, // 256: google.container.v1.SetMasterAuthRequest.update:type_name -> google.container.v1.MasterAuth - 131, // 257: google.container.v1.ListClustersResponse.clusters:type_name -> google.container.v1.Cluster - 148, // 258: google.container.v1.ListOperationsResponse.operations:type_name -> google.container.v1.Operation - 306, // 259: google.container.v1.ServerConfig.channels:type_name -> google.container.v1.ServerConfig.ReleaseChannelConfig - 175, // 260: google.container.v1.CreateNodePoolRequest.node_pool:type_name -> google.container.v1.NodePool - 307, // 261: google.container.v1.BlueGreenSettings.standard_rollout_policy:type_name -> google.container.v1.BlueGreenSettings.StandardRolloutPolicy - 308, // 262: google.container.v1.BlueGreenSettings.autoscaled_rollout_policy:type_name -> google.container.v1.BlueGreenSettings.AutoscaledRolloutPolicy - 329, // 263: google.container.v1.BlueGreenSettings.node_pool_soak_duration:type_name -> google.protobuf.Duration - 86, // 264: google.container.v1.NodePool.config:type_name -> google.container.v1.NodeConfig - 88, // 265: google.container.v1.NodePool.network_config:type_name -> google.container.v1.NodeNetworkConfig - 33, // 266: google.container.v1.NodePool.status:type_name -> google.container.v1.NodePool.Status - 194, // 267: google.container.v1.NodePool.autoscaling:type_name -> google.container.v1.NodePoolAutoscaling - 176, // 268: google.container.v1.NodePool.management:type_name -> google.container.v1.NodeManagement - 222, // 269: google.container.v1.NodePool.max_pods_constraint:type_name -> google.container.v1.MaxPodsConstraint - 205, // 270: google.container.v1.NodePool.conditions:type_name -> google.container.v1.StatusCondition - 309, // 271: google.container.v1.NodePool.upgrade_settings:type_name -> google.container.v1.NodePool.UpgradeSettings - 311, // 272: google.container.v1.NodePool.placement_policy:type_name -> google.container.v1.NodePool.PlacementPolicy - 310, // 273: google.container.v1.NodePool.update_info:type_name -> google.container.v1.NodePool.UpdateInfo - 312, // 274: google.container.v1.NodePool.queued_provisioning:type_name -> google.container.v1.NodePool.QueuedProvisioning - 177, // 275: google.container.v1.NodePool.best_effort_provisioning:type_name -> google.container.v1.BestEffortProvisioning - 313, // 276: google.container.v1.NodePool.node_drain_config:type_name -> google.container.v1.NodePool.NodeDrainConfig - 178, // 277: google.container.v1.NodeManagement.upgrade_options:type_name -> google.container.v1.AutoUpgradeOptions - 180, // 278: google.container.v1.MaintenancePolicy.window:type_name -> google.container.v1.MaintenanceWindow - 184, // 279: google.container.v1.MaintenanceWindow.daily_maintenance_window:type_name -> google.container.v1.DailyMaintenanceWindow - 183, // 280: google.container.v1.MaintenanceWindow.recurring_window:type_name -> google.container.v1.RecurringTimeWindow - 315, // 281: google.container.v1.MaintenanceWindow.maintenance_exclusions:type_name -> google.container.v1.MaintenanceWindow.MaintenanceExclusionsEntry - 182, // 282: google.container.v1.TimeWindow.maintenance_exclusion_options:type_name -> google.container.v1.MaintenanceExclusionOptions - 331, // 283: google.container.v1.TimeWindow.start_time:type_name -> google.protobuf.Timestamp - 331, // 284: google.container.v1.TimeWindow.end_time:type_name -> google.protobuf.Timestamp - 36, // 285: google.container.v1.MaintenanceExclusionOptions.scope:type_name -> google.container.v1.MaintenanceExclusionOptions.Scope - 37, // 286: google.container.v1.MaintenanceExclusionOptions.end_time_behavior:type_name -> google.container.v1.MaintenanceExclusionOptions.EndTimeBehavior - 181, // 287: google.container.v1.RecurringTimeWindow.window:type_name -> google.container.v1.TimeWindow - 176, // 288: google.container.v1.SetNodePoolManagementRequest.management:type_name -> google.container.v1.NodeManagement - 175, // 289: google.container.v1.ListNodePoolsResponse.node_pools:type_name -> google.container.v1.NodePool - 192, // 290: google.container.v1.ClusterAutoscaling.resource_limits:type_name -> google.container.v1.ResourceLimit - 38, // 291: google.container.v1.ClusterAutoscaling.autoscaling_profile:type_name -> google.container.v1.ClusterAutoscaling.AutoscalingProfile - 191, // 292: google.container.v1.ClusterAutoscaling.autoprovisioning_node_pool_defaults:type_name -> google.container.v1.AutoprovisioningNodePoolDefaults - 193, // 293: google.container.v1.ClusterAutoscaling.default_compute_class_config:type_name -> google.container.v1.DefaultComputeClassConfig - 39, // 294: google.container.v1.ClusterAutoscaling.autopilot_general_profile:type_name -> google.container.v1.ClusterAutoscaling.AutopilotGeneralProfile - 309, // 295: google.container.v1.AutoprovisioningNodePoolDefaults.upgrade_settings:type_name -> google.container.v1.NodePool.UpgradeSettings - 176, // 296: google.container.v1.AutoprovisioningNodePoolDefaults.management:type_name -> google.container.v1.NodeManagement - 91, // 297: google.container.v1.AutoprovisioningNodePoolDefaults.shielded_instance_config:type_name -> google.container.v1.ShieldedInstanceConfig - 40, // 298: google.container.v1.NodePoolAutoscaling.location_policy:type_name -> google.container.v1.NodePoolAutoscaling.LocationPolicy - 316, // 299: google.container.v1.SetLabelsRequest.resource_labels:type_name -> google.container.v1.SetLabelsRequest.ResourceLabelsEntry - 200, // 300: google.container.v1.AcceleratorConfig.gpu_sharing_config:type_name -> google.container.v1.GPUSharingConfig - 201, // 301: google.container.v1.AcceleratorConfig.gpu_driver_installation_config:type_name -> google.container.v1.GPUDriverInstallationConfig - 41, // 302: google.container.v1.GPUSharingConfig.gpu_sharing_strategy:type_name -> google.container.v1.GPUSharingConfig.GPUSharingStrategy - 42, // 303: google.container.v1.GPUDriverInstallationConfig.gpu_driver_version:type_name -> google.container.v1.GPUDriverInstallationConfig.GPUDriverVersion - 43, // 304: google.container.v1.WorkloadMetadataConfig.mode:type_name -> google.container.v1.WorkloadMetadataConfig.Mode - 127, // 305: google.container.v1.SetNetworkPolicyRequest.network_policy:type_name -> google.container.v1.NetworkPolicy - 179, // 306: google.container.v1.SetMaintenancePolicyRequest.maintenance_policy:type_name -> google.container.v1.MaintenancePolicy - 44, // 307: google.container.v1.StatusCondition.code:type_name -> google.container.v1.StatusCondition.Code - 332, // 308: google.container.v1.StatusCondition.canonical_code:type_name -> google.rpc.Code - 233, // 309: google.container.v1.NetworkConfig.default_snat_status:type_name -> google.container.v1.DefaultSnatStatus - 2, // 310: google.container.v1.NetworkConfig.datapath_provider:type_name -> google.container.v1.DatapathProvider - 0, // 311: google.container.v1.NetworkConfig.private_ipv6_google_access:type_name -> google.container.v1.PrivateIPv6GoogleAccess - 221, // 312: google.container.v1.NetworkConfig.dns_config:type_name -> google.container.v1.DNSConfig - 208, // 313: google.container.v1.NetworkConfig.service_external_ips_config:type_name -> google.container.v1.ServiceExternalIPsConfig - 207, // 314: google.container.v1.NetworkConfig.gateway_api_config:type_name -> google.container.v1.GatewayAPIConfig - 317, // 315: google.container.v1.NetworkConfig.network_performance_config:type_name -> google.container.v1.NetworkConfig.ClusterNetworkPerformanceConfig - 6, // 316: google.container.v1.NetworkConfig.in_transit_encryption_config:type_name -> google.container.v1.InTransitEncryptionConfig - 46, // 317: google.container.v1.GatewayAPIConfig.channel:type_name -> google.container.v1.GatewayAPIConfig.Channel - 212, // 318: google.container.v1.GetJSONWebKeysResponse.keys:type_name -> google.container.v1.Jwk - 331, // 319: google.container.v1.AutopilotCompatibilityIssue.last_observation:type_name -> google.protobuf.Timestamp - 47, // 320: google.container.v1.AutopilotCompatibilityIssue.incompatibility_type:type_name -> google.container.v1.AutopilotCompatibilityIssue.IssueType - 215, // 321: google.container.v1.CheckAutopilotCompatibilityResponse.issues:type_name -> google.container.v1.AutopilotCompatibilityIssue - 48, // 322: google.container.v1.ReleaseChannel.channel:type_name -> google.container.v1.ReleaseChannel.Channel - 49, // 323: google.container.v1.DNSConfig.cluster_dns:type_name -> google.container.v1.DNSConfig.Provider - 50, // 324: google.container.v1.DNSConfig.cluster_dns_scope:type_name -> google.container.v1.DNSConfig.DNSScope - 328, // 325: google.container.v1.MeshCertificates.enable_certificates:type_name -> google.protobuf.BoolValue - 51, // 326: google.container.v1.DatabaseEncryption.state:type_name -> google.container.v1.DatabaseEncryption.State - 52, // 327: google.container.v1.DatabaseEncryption.current_state:type_name -> google.container.v1.DatabaseEncryption.CurrentState - 318, // 328: google.container.v1.DatabaseEncryption.last_operation_errors:type_name -> google.container.v1.DatabaseEncryption.OperationError - 230, // 329: google.container.v1.ListUsableSubnetworksResponse.subnetworks:type_name -> google.container.v1.UsableSubnetwork - 53, // 330: google.container.v1.UsableSubnetworkSecondaryRange.status:type_name -> google.container.v1.UsableSubnetworkSecondaryRange.Status - 229, // 331: google.container.v1.UsableSubnetwork.secondary_ip_ranges:type_name -> google.container.v1.UsableSubnetworkSecondaryRange - 319, // 332: google.container.v1.ResourceUsageExportConfig.bigquery_destination:type_name -> google.container.v1.ResourceUsageExportConfig.BigQueryDestination - 320, // 333: google.container.v1.ResourceUsageExportConfig.consumption_metering_config:type_name -> google.container.v1.ResourceUsageExportConfig.ConsumptionMeteringConfig - 54, // 334: google.container.v1.GPUDirectConfig.gpu_direct_strategy:type_name -> google.container.v1.GPUDirectConfig.GPUDirectStrategy - 321, // 335: google.container.v1.NotificationConfig.pubsub:type_name -> google.container.v1.NotificationConfig.PubSub - 56, // 336: google.container.v1.ConfidentialNodes.confidential_instance_type:type_name -> google.container.v1.ConfidentialNodes.ConfidentialInstanceType - 1, // 337: google.container.v1.UpgradeEvent.resource_type:type_name -> google.container.v1.UpgradeResourceType - 331, // 338: google.container.v1.UpgradeEvent.operation_start_time:type_name -> google.protobuf.Timestamp - 1, // 339: google.container.v1.UpgradeInfoEvent.resource_type:type_name -> google.container.v1.UpgradeResourceType - 331, // 340: google.container.v1.UpgradeInfoEvent.start_time:type_name -> google.protobuf.Timestamp - 331, // 341: google.container.v1.UpgradeInfoEvent.end_time:type_name -> google.protobuf.Timestamp - 57, // 342: google.container.v1.UpgradeInfoEvent.state:type_name -> google.container.v1.UpgradeInfoEvent.State - 331, // 343: google.container.v1.UpgradeInfoEvent.standard_support_end_time:type_name -> google.protobuf.Timestamp - 331, // 344: google.container.v1.UpgradeInfoEvent.extended_support_end_time:type_name -> google.protobuf.Timestamp - 58, // 345: google.container.v1.UpgradeInfoEvent.event_type:type_name -> google.container.v1.UpgradeInfoEvent.EventType - 242, // 346: google.container.v1.UpgradeInfoEvent.disruption_event:type_name -> google.container.v1.DisruptionEvent - 59, // 347: google.container.v1.DisruptionEvent.disruption_type:type_name -> google.container.v1.DisruptionEvent.DisruptionType - 323, // 348: google.container.v1.DisruptionEvent.pdb_blocked_pod:type_name -> google.container.v1.DisruptionEvent.PdbBlockedPod - 329, // 349: google.container.v1.DisruptionEvent.pdb_violation_timeout:type_name -> google.protobuf.Duration - 1, // 350: google.container.v1.UpgradeAvailableEvent.resource_type:type_name -> google.container.v1.UpgradeResourceType - 217, // 351: google.container.v1.UpgradeAvailableEvent.release_channel:type_name -> google.container.v1.ReleaseChannel - 247, // 352: google.container.v1.Autopilot.workload_policy_config:type_name -> google.container.v1.WorkloadPolicyConfig - 246, // 353: google.container.v1.Autopilot.privileged_admission_config:type_name -> google.container.v1.PrivilegedAdmissionConfig - 249, // 354: google.container.v1.LoggingConfig.component_config:type_name -> google.container.v1.LoggingComponentConfig - 60, // 355: google.container.v1.LoggingComponentConfig.enable_components:type_name -> google.container.v1.LoggingComponentConfig.Component - 256, // 356: google.container.v1.MonitoringConfig.component_config:type_name -> google.container.v1.MonitoringComponentConfig - 257, // 357: google.container.v1.MonitoringConfig.managed_prometheus_config:type_name -> google.container.v1.ManagedPrometheusConfig - 252, // 358: google.container.v1.MonitoringConfig.advanced_datapath_observability_config:type_name -> google.container.v1.AdvancedDatapathObservabilityConfig - 61, // 359: google.container.v1.AdvancedDatapathObservabilityConfig.relay_mode:type_name -> google.container.v1.AdvancedDatapathObservabilityConfig.RelayMode - 255, // 360: google.container.v1.NodePoolLoggingConfig.variant_config:type_name -> google.container.v1.LoggingVariantConfig - 62, // 361: google.container.v1.LoggingVariantConfig.variant:type_name -> google.container.v1.LoggingVariantConfig.Variant - 63, // 362: google.container.v1.MonitoringComponentConfig.enable_components:type_name -> google.container.v1.MonitoringComponentConfig.Component - 258, // 363: google.container.v1.ManagedPrometheusConfig.auto_monitoring_config:type_name -> google.container.v1.AutoMonitoringConfig - 64, // 364: google.container.v1.AutoMonitoringConfig.scope:type_name -> google.container.v1.AutoMonitoringConfig.Scope - 65, // 365: google.container.v1.PodAutoscaling.hpa_profile:type_name -> google.container.v1.PodAutoscaling.HPAProfile - 66, // 366: google.container.v1.Fleet.membership_type:type_name -> google.container.v1.Fleet.MembershipType - 324, // 367: google.container.v1.ControlPlaneEndpointsConfig.dns_endpoint_config:type_name -> google.container.v1.ControlPlaneEndpointsConfig.DNSEndpointConfig - 325, // 368: google.container.v1.ControlPlaneEndpointsConfig.ip_endpoints_config:type_name -> google.container.v1.ControlPlaneEndpointsConfig.IPEndpointsConfig - 326, // 369: google.container.v1.ResourceManagerTags.tags:type_name -> google.container.v1.ResourceManagerTags.TagsEntry - 67, // 370: google.container.v1.EnterpriseConfig.cluster_tier:type_name -> google.container.v1.EnterpriseConfig.ClusterTier - 67, // 371: google.container.v1.EnterpriseConfig.desired_tier:type_name -> google.container.v1.EnterpriseConfig.ClusterTier - 327, // 372: google.container.v1.SecretManagerConfig.rotation_config:type_name -> google.container.v1.SecretManagerConfig.RotationConfig - 68, // 373: google.container.v1.SecondaryBootDisk.mode:type_name -> google.container.v1.SecondaryBootDisk.Mode - 69, // 374: google.container.v1.ClusterUpgradeInfo.auto_upgrade_status:type_name -> google.container.v1.ClusterUpgradeInfo.AutoUpgradeStatus - 70, // 375: google.container.v1.ClusterUpgradeInfo.paused_reason:type_name -> google.container.v1.ClusterUpgradeInfo.AutoUpgradePausedReason - 272, // 376: google.container.v1.ClusterUpgradeInfo.upgrade_details:type_name -> google.container.v1.UpgradeDetails - 71, // 377: google.container.v1.UpgradeDetails.state:type_name -> google.container.v1.UpgradeDetails.State - 331, // 378: google.container.v1.UpgradeDetails.start_time:type_name -> google.protobuf.Timestamp - 331, // 379: google.container.v1.UpgradeDetails.end_time:type_name -> google.protobuf.Timestamp - 72, // 380: google.container.v1.UpgradeDetails.start_type:type_name -> google.container.v1.UpgradeDetails.StartType - 73, // 381: google.container.v1.NodePoolUpgradeInfo.auto_upgrade_status:type_name -> google.container.v1.NodePoolUpgradeInfo.AutoUpgradeStatus - 74, // 382: google.container.v1.NodePoolUpgradeInfo.paused_reason:type_name -> google.container.v1.NodePoolUpgradeInfo.AutoUpgradePausedReason - 272, // 383: google.container.v1.NodePoolUpgradeInfo.upgrade_details:type_name -> google.container.v1.UpgradeDetails - 75, // 384: google.container.v1.GkeAutoUpgradeConfig.patch_mode:type_name -> google.container.v1.GkeAutoUpgradeConfig.PatchMode - 76, // 385: google.container.v1.NetworkTierConfig.network_tier:type_name -> google.container.v1.NetworkTierConfig.NetworkTier - 77, // 386: google.container.v1.ManagedOpenTelemetryConfig.scope:type_name -> google.container.v1.ManagedOpenTelemetryConfig.Scope - 282, // 387: google.container.v1.LinuxNodeConfig.SwapConfig.encryption_config:type_name -> google.container.v1.LinuxNodeConfig.SwapConfig.EncryptionConfig - 283, // 388: google.container.v1.LinuxNodeConfig.SwapConfig.boot_disk_profile:type_name -> google.container.v1.LinuxNodeConfig.SwapConfig.BootDiskProfile - 284, // 389: google.container.v1.LinuxNodeConfig.SwapConfig.ephemeral_local_ssd_profile:type_name -> google.container.v1.LinuxNodeConfig.SwapConfig.EphemeralLocalSsdProfile - 285, // 390: google.container.v1.LinuxNodeConfig.SwapConfig.dedicated_local_ssd_profile:type_name -> google.container.v1.LinuxNodeConfig.SwapConfig.DedicatedLocalSsdProfile - 10, // 391: google.container.v1.LinuxNodeConfig.NodeKernelModuleLoading.policy:type_name -> google.container.v1.LinuxNodeConfig.NodeKernelModuleLoading.Policy - 15, // 392: google.container.v1.NodeNetworkConfig.NetworkPerformanceConfig.total_egress_bandwidth_tier:type_name -> google.container.v1.NodeNetworkConfig.NetworkPerformanceConfig.Tier - 18, // 393: google.container.v1.SoleTenantConfig.NodeAffinity.operator:type_name -> google.container.v1.SoleTenantConfig.NodeAffinity.Operator - 294, // 394: google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.certificate_authority_domain_config:type_name -> google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig - 299, // 395: google.container.v1.ContainerdConfig.RegistryHostConfig.hosts:type_name -> google.container.v1.ContainerdConfig.RegistryHostConfig.HostConfig - 295, // 396: google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.gcp_secret_manager_certificate_config:type_name -> google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig - 296, // 397: google.container.v1.ContainerdConfig.RegistryHostConfig.CertificateConfigPair.cert:type_name -> google.container.v1.ContainerdConfig.RegistryHostConfig.CertificateConfig - 296, // 398: google.container.v1.ContainerdConfig.RegistryHostConfig.CertificateConfigPair.key:type_name -> google.container.v1.ContainerdConfig.RegistryHostConfig.CertificateConfig - 19, // 399: google.container.v1.ContainerdConfig.RegistryHostConfig.HostConfig.capabilities:type_name -> google.container.v1.ContainerdConfig.RegistryHostConfig.HostCapability - 298, // 400: google.container.v1.ContainerdConfig.RegistryHostConfig.HostConfig.header:type_name -> google.container.v1.ContainerdConfig.RegistryHostConfig.RegistryHeader - 296, // 401: google.container.v1.ContainerdConfig.RegistryHostConfig.HostConfig.ca:type_name -> google.container.v1.ContainerdConfig.RegistryHostConfig.CertificateConfig - 297, // 402: google.container.v1.ContainerdConfig.RegistryHostConfig.HostConfig.client:type_name -> google.container.v1.ContainerdConfig.RegistryHostConfig.CertificateConfigPair - 329, // 403: google.container.v1.ContainerdConfig.RegistryHostConfig.HostConfig.dial_timeout:type_name -> google.protobuf.Duration - 48, // 404: google.container.v1.ServerConfig.ReleaseChannelConfig.channel:type_name -> google.container.v1.ReleaseChannel.Channel - 329, // 405: google.container.v1.BlueGreenSettings.StandardRolloutPolicy.batch_soak_duration:type_name -> google.protobuf.Duration - 329, // 406: google.container.v1.BlueGreenSettings.AutoscaledRolloutPolicy.wait_for_drain_duration:type_name -> google.protobuf.Duration - 3, // 407: google.container.v1.NodePool.UpgradeSettings.strategy:type_name -> google.container.v1.NodePoolUpdateStrategy - 174, // 408: google.container.v1.NodePool.UpgradeSettings.blue_green_settings:type_name -> google.container.v1.BlueGreenSettings - 314, // 409: google.container.v1.NodePool.UpdateInfo.blue_green_info:type_name -> google.container.v1.NodePool.UpdateInfo.BlueGreenInfo - 35, // 410: google.container.v1.NodePool.PlacementPolicy.type:type_name -> google.container.v1.NodePool.PlacementPolicy.Type - 34, // 411: google.container.v1.NodePool.UpdateInfo.BlueGreenInfo.phase:type_name -> google.container.v1.NodePool.UpdateInfo.BlueGreenInfo.Phase - 181, // 412: google.container.v1.MaintenanceWindow.MaintenanceExclusionsEntry.value:type_name -> google.container.v1.TimeWindow - 45, // 413: google.container.v1.NetworkConfig.ClusterNetworkPerformanceConfig.total_egress_bandwidth_tier:type_name -> google.container.v1.NetworkConfig.ClusterNetworkPerformanceConfig.Tier - 331, // 414: google.container.v1.DatabaseEncryption.OperationError.timestamp:type_name -> google.protobuf.Timestamp - 322, // 415: google.container.v1.NotificationConfig.PubSub.filter:type_name -> google.container.v1.NotificationConfig.Filter - 55, // 416: google.container.v1.NotificationConfig.Filter.event_type:type_name -> google.container.v1.NotificationConfig.EventType - 125, // 417: google.container.v1.ControlPlaneEndpointsConfig.IPEndpointsConfig.authorized_networks_config:type_name -> google.container.v1.MasterAuthorizedNetworksConfig - 329, // 418: google.container.v1.SecretManagerConfig.RotationConfig.rotation_interval:type_name -> google.protobuf.Duration - 162, // 419: google.container.v1.ClusterManager.ListClusters:input_type -> google.container.v1.ListClustersRequest - 151, // 420: google.container.v1.ClusterManager.GetCluster:input_type -> google.container.v1.GetClusterRequest - 150, // 421: google.container.v1.ClusterManager.CreateCluster:input_type -> google.container.v1.CreateClusterRequest - 152, // 422: google.container.v1.ClusterManager.UpdateCluster:input_type -> google.container.v1.UpdateClusterRequest - 153, // 423: google.container.v1.ClusterManager.UpdateNodePool:input_type -> google.container.v1.UpdateNodePoolRequest - 154, // 424: google.container.v1.ClusterManager.SetNodePoolAutoscaling:input_type -> google.container.v1.SetNodePoolAutoscalingRequest - 155, // 425: google.container.v1.ClusterManager.SetLoggingService:input_type -> google.container.v1.SetLoggingServiceRequest - 156, // 426: google.container.v1.ClusterManager.SetMonitoringService:input_type -> google.container.v1.SetMonitoringServiceRequest - 157, // 427: google.container.v1.ClusterManager.SetAddonsConfig:input_type -> google.container.v1.SetAddonsConfigRequest - 158, // 428: google.container.v1.ClusterManager.SetLocations:input_type -> google.container.v1.SetLocationsRequest - 159, // 429: google.container.v1.ClusterManager.UpdateMaster:input_type -> google.container.v1.UpdateMasterRequest - 160, // 430: google.container.v1.ClusterManager.SetMasterAuth:input_type -> google.container.v1.SetMasterAuthRequest - 161, // 431: google.container.v1.ClusterManager.DeleteCluster:input_type -> google.container.v1.DeleteClusterRequest - 165, // 432: google.container.v1.ClusterManager.ListOperations:input_type -> google.container.v1.ListOperationsRequest - 164, // 433: google.container.v1.ClusterManager.GetOperation:input_type -> google.container.v1.GetOperationRequest - 166, // 434: google.container.v1.ClusterManager.CancelOperation:input_type -> google.container.v1.CancelOperationRequest - 168, // 435: google.container.v1.ClusterManager.GetServerConfig:input_type -> google.container.v1.GetServerConfigRequest - 211, // 436: google.container.v1.ClusterManager.GetJSONWebKeys:input_type -> google.container.v1.GetJSONWebKeysRequest - 172, // 437: google.container.v1.ClusterManager.ListNodePools:input_type -> google.container.v1.ListNodePoolsRequest - 173, // 438: google.container.v1.ClusterManager.GetNodePool:input_type -> google.container.v1.GetNodePoolRequest - 170, // 439: google.container.v1.ClusterManager.CreateNodePool:input_type -> google.container.v1.CreateNodePoolRequest - 171, // 440: google.container.v1.ClusterManager.DeleteNodePool:input_type -> google.container.v1.DeleteNodePoolRequest - 187, // 441: google.container.v1.ClusterManager.CompleteNodePoolUpgrade:input_type -> google.container.v1.CompleteNodePoolUpgradeRequest - 188, // 442: google.container.v1.ClusterManager.RollbackNodePoolUpgrade:input_type -> google.container.v1.RollbackNodePoolUpgradeRequest - 185, // 443: google.container.v1.ClusterManager.SetNodePoolManagement:input_type -> google.container.v1.SetNodePoolManagementRequest - 195, // 444: google.container.v1.ClusterManager.SetLabels:input_type -> google.container.v1.SetLabelsRequest - 196, // 445: google.container.v1.ClusterManager.SetLegacyAbac:input_type -> google.container.v1.SetLegacyAbacRequest - 197, // 446: google.container.v1.ClusterManager.StartIPRotation:input_type -> google.container.v1.StartIPRotationRequest - 198, // 447: google.container.v1.ClusterManager.CompleteIPRotation:input_type -> google.container.v1.CompleteIPRotationRequest - 186, // 448: google.container.v1.ClusterManager.SetNodePoolSize:input_type -> google.container.v1.SetNodePoolSizeRequest - 203, // 449: google.container.v1.ClusterManager.SetNetworkPolicy:input_type -> google.container.v1.SetNetworkPolicyRequest - 204, // 450: google.container.v1.ClusterManager.SetMaintenancePolicy:input_type -> google.container.v1.SetMaintenancePolicyRequest - 227, // 451: google.container.v1.ClusterManager.ListUsableSubnetworks:input_type -> google.container.v1.ListUsableSubnetworksRequest - 214, // 452: google.container.v1.ClusterManager.CheckAutopilotCompatibility:input_type -> google.container.v1.CheckAutopilotCompatibilityRequest - 270, // 453: google.container.v1.ClusterManager.FetchClusterUpgradeInfo:input_type -> google.container.v1.FetchClusterUpgradeInfoRequest - 273, // 454: google.container.v1.ClusterManager.FetchNodePoolUpgradeInfo:input_type -> google.container.v1.FetchNodePoolUpgradeInfoRequest - 163, // 455: google.container.v1.ClusterManager.ListClusters:output_type -> google.container.v1.ListClustersResponse - 131, // 456: google.container.v1.ClusterManager.GetCluster:output_type -> google.container.v1.Cluster - 148, // 457: google.container.v1.ClusterManager.CreateCluster:output_type -> google.container.v1.Operation - 148, // 458: google.container.v1.ClusterManager.UpdateCluster:output_type -> google.container.v1.Operation - 148, // 459: google.container.v1.ClusterManager.UpdateNodePool:output_type -> google.container.v1.Operation - 148, // 460: google.container.v1.ClusterManager.SetNodePoolAutoscaling:output_type -> google.container.v1.Operation - 148, // 461: google.container.v1.ClusterManager.SetLoggingService:output_type -> google.container.v1.Operation - 148, // 462: google.container.v1.ClusterManager.SetMonitoringService:output_type -> google.container.v1.Operation - 148, // 463: google.container.v1.ClusterManager.SetAddonsConfig:output_type -> google.container.v1.Operation - 148, // 464: google.container.v1.ClusterManager.SetLocations:output_type -> google.container.v1.Operation - 148, // 465: google.container.v1.ClusterManager.UpdateMaster:output_type -> google.container.v1.Operation - 148, // 466: google.container.v1.ClusterManager.SetMasterAuth:output_type -> google.container.v1.Operation - 148, // 467: google.container.v1.ClusterManager.DeleteCluster:output_type -> google.container.v1.Operation - 167, // 468: google.container.v1.ClusterManager.ListOperations:output_type -> google.container.v1.ListOperationsResponse - 148, // 469: google.container.v1.ClusterManager.GetOperation:output_type -> google.container.v1.Operation - 333, // 470: google.container.v1.ClusterManager.CancelOperation:output_type -> google.protobuf.Empty - 169, // 471: google.container.v1.ClusterManager.GetServerConfig:output_type -> google.container.v1.ServerConfig - 213, // 472: google.container.v1.ClusterManager.GetJSONWebKeys:output_type -> google.container.v1.GetJSONWebKeysResponse - 189, // 473: google.container.v1.ClusterManager.ListNodePools:output_type -> google.container.v1.ListNodePoolsResponse - 175, // 474: google.container.v1.ClusterManager.GetNodePool:output_type -> google.container.v1.NodePool - 148, // 475: google.container.v1.ClusterManager.CreateNodePool:output_type -> google.container.v1.Operation - 148, // 476: google.container.v1.ClusterManager.DeleteNodePool:output_type -> google.container.v1.Operation - 333, // 477: google.container.v1.ClusterManager.CompleteNodePoolUpgrade:output_type -> google.protobuf.Empty - 148, // 478: google.container.v1.ClusterManager.RollbackNodePoolUpgrade:output_type -> google.container.v1.Operation - 148, // 479: google.container.v1.ClusterManager.SetNodePoolManagement:output_type -> google.container.v1.Operation - 148, // 480: google.container.v1.ClusterManager.SetLabels:output_type -> google.container.v1.Operation - 148, // 481: google.container.v1.ClusterManager.SetLegacyAbac:output_type -> google.container.v1.Operation - 148, // 482: google.container.v1.ClusterManager.StartIPRotation:output_type -> google.container.v1.Operation - 148, // 483: google.container.v1.ClusterManager.CompleteIPRotation:output_type -> google.container.v1.Operation - 148, // 484: google.container.v1.ClusterManager.SetNodePoolSize:output_type -> google.container.v1.Operation - 148, // 485: google.container.v1.ClusterManager.SetNetworkPolicy:output_type -> google.container.v1.Operation - 148, // 486: google.container.v1.ClusterManager.SetMaintenancePolicy:output_type -> google.container.v1.Operation - 228, // 487: google.container.v1.ClusterManager.ListUsableSubnetworks:output_type -> google.container.v1.ListUsableSubnetworksResponse - 216, // 488: google.container.v1.ClusterManager.CheckAutopilotCompatibility:output_type -> google.container.v1.CheckAutopilotCompatibilityResponse - 271, // 489: google.container.v1.ClusterManager.FetchClusterUpgradeInfo:output_type -> google.container.v1.ClusterUpgradeInfo - 274, // 490: google.container.v1.ClusterManager.FetchNodePoolUpgradeInfo:output_type -> google.container.v1.NodePoolUpgradeInfo - 455, // [455:491] is the sub-list for method output_type - 419, // [419:455] is the sub-list for method input_type - 419, // [419:419] is the sub-list for extension type_name - 419, // [419:419] is the sub-list for extension extendee - 0, // [0:419] is the sub-list for field type_name -} - -func init() { file_google_container_v1_cluster_service_proto_init() } -func file_google_container_v1_cluster_service_proto_init() { - if File_google_container_v1_cluster_service_proto != nil { - return - } - file_google_container_v1_cluster_service_proto_msgTypes[0].OneofWrappers = []any{} - file_google_container_v1_cluster_service_proto_msgTypes[2].OneofWrappers = []any{} - file_google_container_v1_cluster_service_proto_msgTypes[8].OneofWrappers = []any{} - file_google_container_v1_cluster_service_proto_msgTypes[9].OneofWrappers = []any{} - file_google_container_v1_cluster_service_proto_msgTypes[10].OneofWrappers = []any{} - file_google_container_v1_cluster_service_proto_msgTypes[12].OneofWrappers = []any{} - file_google_container_v1_cluster_service_proto_msgTypes[17].OneofWrappers = []any{} - file_google_container_v1_cluster_service_proto_msgTypes[47].OneofWrappers = []any{} - file_google_container_v1_cluster_service_proto_msgTypes[53].OneofWrappers = []any{} - file_google_container_v1_cluster_service_proto_msgTypes[54].OneofWrappers = []any{} - file_google_container_v1_cluster_service_proto_msgTypes[57].OneofWrappers = []any{} - file_google_container_v1_cluster_service_proto_msgTypes[59].OneofWrappers = []any{} - file_google_container_v1_cluster_service_proto_msgTypes[63].OneofWrappers = []any{} - file_google_container_v1_cluster_service_proto_msgTypes[67].OneofWrappers = []any{} - file_google_container_v1_cluster_service_proto_msgTypes[75].OneofWrappers = []any{} - file_google_container_v1_cluster_service_proto_msgTypes[96].OneofWrappers = []any{ - (*BlueGreenSettings_StandardRolloutPolicy_)(nil), - (*BlueGreenSettings_AutoscaledRolloutPolicy_)(nil), - } - file_google_container_v1_cluster_service_proto_msgTypes[102].OneofWrappers = []any{ - (*MaintenanceWindow_DailyMaintenanceWindow)(nil), - (*MaintenanceWindow_RecurringWindow)(nil), - } - file_google_container_v1_cluster_service_proto_msgTypes[103].OneofWrappers = []any{ - (*TimeWindow_MaintenanceExclusionOptions)(nil), - } - file_google_container_v1_cluster_service_proto_msgTypes[113].OneofWrappers = []any{} - file_google_container_v1_cluster_service_proto_msgTypes[121].OneofWrappers = []any{} - file_google_container_v1_cluster_service_proto_msgTypes[122].OneofWrappers = []any{} - file_google_container_v1_cluster_service_proto_msgTypes[123].OneofWrappers = []any{} - file_google_container_v1_cluster_service_proto_msgTypes[128].OneofWrappers = []any{} - file_google_container_v1_cluster_service_proto_msgTypes[148].OneofWrappers = []any{} - file_google_container_v1_cluster_service_proto_msgTypes[159].OneofWrappers = []any{} - file_google_container_v1_cluster_service_proto_msgTypes[163].OneofWrappers = []any{} - file_google_container_v1_cluster_service_proto_msgTypes[164].OneofWrappers = []any{} - file_google_container_v1_cluster_service_proto_msgTypes[169].OneofWrappers = []any{} - file_google_container_v1_cluster_service_proto_msgTypes[174].OneofWrappers = []any{} - file_google_container_v1_cluster_service_proto_msgTypes[181].OneofWrappers = []any{} - file_google_container_v1_cluster_service_proto_msgTypes[188].OneofWrappers = []any{} - file_google_container_v1_cluster_service_proto_msgTypes[193].OneofWrappers = []any{} - file_google_container_v1_cluster_service_proto_msgTypes[194].OneofWrappers = []any{} - file_google_container_v1_cluster_service_proto_msgTypes[196].OneofWrappers = []any{} - file_google_container_v1_cluster_service_proto_msgTypes[199].OneofWrappers = []any{} - file_google_container_v1_cluster_service_proto_msgTypes[200].OneofWrappers = []any{} - file_google_container_v1_cluster_service_proto_msgTypes[201].OneofWrappers = []any{ - (*LinuxNodeConfig_SwapConfig_BootDiskProfile_)(nil), - (*LinuxNodeConfig_SwapConfig_EphemeralLocalSsdProfile_)(nil), - (*LinuxNodeConfig_SwapConfig_DedicatedLocalSsdProfile_)(nil), - } - file_google_container_v1_cluster_service_proto_msgTypes[204].OneofWrappers = []any{} - file_google_container_v1_cluster_service_proto_msgTypes[205].OneofWrappers = []any{ - (*LinuxNodeConfig_SwapConfig_BootDiskProfile_SwapSizeGib)(nil), - (*LinuxNodeConfig_SwapConfig_BootDiskProfile_SwapSizePercent)(nil), - } - file_google_container_v1_cluster_service_proto_msgTypes[206].OneofWrappers = []any{ - (*LinuxNodeConfig_SwapConfig_EphemeralLocalSsdProfile_SwapSizeGib)(nil), - (*LinuxNodeConfig_SwapConfig_EphemeralLocalSsdProfile_SwapSizePercent)(nil), - } - file_google_container_v1_cluster_service_proto_msgTypes[211].OneofWrappers = []any{} - file_google_container_v1_cluster_service_proto_msgTypes[216].OneofWrappers = []any{ - (*ContainerdConfig_PrivateRegistryAccessConfig_CertificateAuthorityDomainConfig_GcpSecretManagerCertificateConfig)(nil), - } - file_google_container_v1_cluster_service_proto_msgTypes[218].OneofWrappers = []any{ - (*ContainerdConfig_RegistryHostConfig_CertificateConfig_GcpSecretManagerSecretUri)(nil), - } - file_google_container_v1_cluster_service_proto_msgTypes[226].OneofWrappers = []any{} - file_google_container_v1_cluster_service_proto_msgTypes[227].OneofWrappers = []any{ - (*OperationProgress_Metric_IntValue)(nil), - (*OperationProgress_Metric_DoubleValue)(nil), - (*OperationProgress_Metric_StringValue)(nil), - } - file_google_container_v1_cluster_service_proto_msgTypes[229].OneofWrappers = []any{ - (*BlueGreenSettings_StandardRolloutPolicy_BatchPercentage)(nil), - (*BlueGreenSettings_StandardRolloutPolicy_BatchNodeCount)(nil), - } - file_google_container_v1_cluster_service_proto_msgTypes[231].OneofWrappers = []any{} - file_google_container_v1_cluster_service_proto_msgTypes[235].OneofWrappers = []any{} - file_google_container_v1_cluster_service_proto_msgTypes[239].OneofWrappers = []any{} - file_google_container_v1_cluster_service_proto_msgTypes[246].OneofWrappers = []any{} - file_google_container_v1_cluster_service_proto_msgTypes[247].OneofWrappers = []any{} - file_google_container_v1_cluster_service_proto_msgTypes[249].OneofWrappers = []any{} - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: unsafe.Slice(unsafe.StringData(file_google_container_v1_cluster_service_proto_rawDesc), len(file_google_container_v1_cluster_service_proto_rawDesc)), - NumEnums: 78, - NumMessages: 250, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_google_container_v1_cluster_service_proto_goTypes, - DependencyIndexes: file_google_container_v1_cluster_service_proto_depIdxs, - EnumInfos: file_google_container_v1_cluster_service_proto_enumTypes, - MessageInfos: file_google_container_v1_cluster_service_proto_msgTypes, - }.Build() - File_google_container_v1_cluster_service_proto = out.File - file_google_container_v1_cluster_service_proto_goTypes = nil - file_google_container_v1_cluster_service_proto_depIdxs = nil -} diff --git a/vendor/cloud.google.com/go/container/apiv1/containerpb/cluster_service_grpc.pb.go b/vendor/cloud.google.com/go/container/apiv1/containerpb/cluster_service_grpc.pb.go deleted file mode 100644 index c471b7f81f..0000000000 --- a/vendor/cloud.google.com/go/container/apiv1/containerpb/cluster_service_grpc.pb.go +++ /dev/null @@ -1,1559 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Code generated by protoc-gen-go-grpc. DO NOT EDIT. -// versions: -// - protoc-gen-go-grpc v1.3.0 -// - protoc v6.31.0 -// source: google/container/v1/cluster_service.proto - -package containerpb - -import ( - context "context" - - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" - emptypb "google.golang.org/protobuf/types/known/emptypb" -) - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 - -const ( - ClusterManager_ListClusters_FullMethodName = "/google.container.v1.ClusterManager/ListClusters" - ClusterManager_GetCluster_FullMethodName = "/google.container.v1.ClusterManager/GetCluster" - ClusterManager_CreateCluster_FullMethodName = "/google.container.v1.ClusterManager/CreateCluster" - ClusterManager_UpdateCluster_FullMethodName = "/google.container.v1.ClusterManager/UpdateCluster" - ClusterManager_UpdateNodePool_FullMethodName = "/google.container.v1.ClusterManager/UpdateNodePool" - ClusterManager_SetNodePoolAutoscaling_FullMethodName = "/google.container.v1.ClusterManager/SetNodePoolAutoscaling" - ClusterManager_SetLoggingService_FullMethodName = "/google.container.v1.ClusterManager/SetLoggingService" - ClusterManager_SetMonitoringService_FullMethodName = "/google.container.v1.ClusterManager/SetMonitoringService" - ClusterManager_SetAddonsConfig_FullMethodName = "/google.container.v1.ClusterManager/SetAddonsConfig" - ClusterManager_SetLocations_FullMethodName = "/google.container.v1.ClusterManager/SetLocations" - ClusterManager_UpdateMaster_FullMethodName = "/google.container.v1.ClusterManager/UpdateMaster" - ClusterManager_SetMasterAuth_FullMethodName = "/google.container.v1.ClusterManager/SetMasterAuth" - ClusterManager_DeleteCluster_FullMethodName = "/google.container.v1.ClusterManager/DeleteCluster" - ClusterManager_ListOperations_FullMethodName = "/google.container.v1.ClusterManager/ListOperations" - ClusterManager_GetOperation_FullMethodName = "/google.container.v1.ClusterManager/GetOperation" - ClusterManager_CancelOperation_FullMethodName = "/google.container.v1.ClusterManager/CancelOperation" - ClusterManager_GetServerConfig_FullMethodName = "/google.container.v1.ClusterManager/GetServerConfig" - ClusterManager_GetJSONWebKeys_FullMethodName = "/google.container.v1.ClusterManager/GetJSONWebKeys" - ClusterManager_ListNodePools_FullMethodName = "/google.container.v1.ClusterManager/ListNodePools" - ClusterManager_GetNodePool_FullMethodName = "/google.container.v1.ClusterManager/GetNodePool" - ClusterManager_CreateNodePool_FullMethodName = "/google.container.v1.ClusterManager/CreateNodePool" - ClusterManager_DeleteNodePool_FullMethodName = "/google.container.v1.ClusterManager/DeleteNodePool" - ClusterManager_CompleteNodePoolUpgrade_FullMethodName = "/google.container.v1.ClusterManager/CompleteNodePoolUpgrade" - ClusterManager_RollbackNodePoolUpgrade_FullMethodName = "/google.container.v1.ClusterManager/RollbackNodePoolUpgrade" - ClusterManager_SetNodePoolManagement_FullMethodName = "/google.container.v1.ClusterManager/SetNodePoolManagement" - ClusterManager_SetLabels_FullMethodName = "/google.container.v1.ClusterManager/SetLabels" - ClusterManager_SetLegacyAbac_FullMethodName = "/google.container.v1.ClusterManager/SetLegacyAbac" - ClusterManager_StartIPRotation_FullMethodName = "/google.container.v1.ClusterManager/StartIPRotation" - ClusterManager_CompleteIPRotation_FullMethodName = "/google.container.v1.ClusterManager/CompleteIPRotation" - ClusterManager_SetNodePoolSize_FullMethodName = "/google.container.v1.ClusterManager/SetNodePoolSize" - ClusterManager_SetNetworkPolicy_FullMethodName = "/google.container.v1.ClusterManager/SetNetworkPolicy" - ClusterManager_SetMaintenancePolicy_FullMethodName = "/google.container.v1.ClusterManager/SetMaintenancePolicy" - ClusterManager_ListUsableSubnetworks_FullMethodName = "/google.container.v1.ClusterManager/ListUsableSubnetworks" - ClusterManager_CheckAutopilotCompatibility_FullMethodName = "/google.container.v1.ClusterManager/CheckAutopilotCompatibility" - ClusterManager_FetchClusterUpgradeInfo_FullMethodName = "/google.container.v1.ClusterManager/FetchClusterUpgradeInfo" - ClusterManager_FetchNodePoolUpgradeInfo_FullMethodName = "/google.container.v1.ClusterManager/FetchNodePoolUpgradeInfo" -) - -// ClusterManagerClient is the client API for ClusterManager service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. -type ClusterManagerClient interface { - // Lists all clusters owned by a project in either the specified zone or all - // zones. - ListClusters(ctx context.Context, in *ListClustersRequest, opts ...grpc.CallOption) (*ListClustersResponse, error) - // Gets the details of a specific cluster. - GetCluster(ctx context.Context, in *GetClusterRequest, opts ...grpc.CallOption) (*Cluster, error) - // Creates a cluster, consisting of the specified number and type of Google - // Compute Engine instances. - // - // By default, the cluster is created in the project's - // [default - // network](https://cloud.google.com/compute/docs/networks-and-firewalls#networks). - // - // One firewall is added for the cluster. After cluster creation, - // the kubelet creates routes for each node to allow the containers - // on that node to communicate with all other instances in the - // cluster. - // - // Finally, an entry is added to the project's global metadata indicating - // which CIDR range the cluster is using. - CreateCluster(ctx context.Context, in *CreateClusterRequest, opts ...grpc.CallOption) (*Operation, error) - // Updates the settings of a specific cluster. - UpdateCluster(ctx context.Context, in *UpdateClusterRequest, opts ...grpc.CallOption) (*Operation, error) - // Updates the version and/or image type for the specified node pool. - UpdateNodePool(ctx context.Context, in *UpdateNodePoolRequest, opts ...grpc.CallOption) (*Operation, error) - // Sets the autoscaling settings for the specified node pool. - SetNodePoolAutoscaling(ctx context.Context, in *SetNodePoolAutoscalingRequest, opts ...grpc.CallOption) (*Operation, error) - // Sets the logging service for a specific cluster. - SetLoggingService(ctx context.Context, in *SetLoggingServiceRequest, opts ...grpc.CallOption) (*Operation, error) - // Sets the monitoring service for a specific cluster. - SetMonitoringService(ctx context.Context, in *SetMonitoringServiceRequest, opts ...grpc.CallOption) (*Operation, error) - // Sets the addons for a specific cluster. - SetAddonsConfig(ctx context.Context, in *SetAddonsConfigRequest, opts ...grpc.CallOption) (*Operation, error) - // Deprecated: Do not use. - // Sets the locations for a specific cluster. - // Deprecated. Use - // [projects.locations.clusters.update](https://cloud.google.com/kubernetes-engine/docs/reference/rest/v1/projects.locations.clusters/update) - // instead. - SetLocations(ctx context.Context, in *SetLocationsRequest, opts ...grpc.CallOption) (*Operation, error) - // Updates the master for a specific cluster. - UpdateMaster(ctx context.Context, in *UpdateMasterRequest, opts ...grpc.CallOption) (*Operation, error) - // Sets master auth materials. Currently supports changing the admin password - // or a specific cluster, either via password generation or explicitly setting - // the password. - SetMasterAuth(ctx context.Context, in *SetMasterAuthRequest, opts ...grpc.CallOption) (*Operation, error) - // Deletes the cluster, including the Kubernetes endpoint and all worker - // nodes. - // - // Firewalls and routes that were configured during cluster creation - // are also deleted. - // - // Other Google Compute Engine resources that might be in use by the cluster, - // such as load balancer resources, are not deleted if they weren't present - // when the cluster was initially created. - DeleteCluster(ctx context.Context, in *DeleteClusterRequest, opts ...grpc.CallOption) (*Operation, error) - // Lists all operations in a project in a specific zone or all zones. - ListOperations(ctx context.Context, in *ListOperationsRequest, opts ...grpc.CallOption) (*ListOperationsResponse, error) - // Gets the specified operation. - GetOperation(ctx context.Context, in *GetOperationRequest, opts ...grpc.CallOption) (*Operation, error) - // Cancels the specified operation. - CancelOperation(ctx context.Context, in *CancelOperationRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) - // Returns configuration info about the Google Kubernetes Engine service. - GetServerConfig(ctx context.Context, in *GetServerConfigRequest, opts ...grpc.CallOption) (*ServerConfig, error) - // Gets the public component of the cluster signing keys in - // JSON Web Key format. - GetJSONWebKeys(ctx context.Context, in *GetJSONWebKeysRequest, opts ...grpc.CallOption) (*GetJSONWebKeysResponse, error) - // Lists the node pools for a cluster. - ListNodePools(ctx context.Context, in *ListNodePoolsRequest, opts ...grpc.CallOption) (*ListNodePoolsResponse, error) - // Retrieves the requested node pool. - GetNodePool(ctx context.Context, in *GetNodePoolRequest, opts ...grpc.CallOption) (*NodePool, error) - // Creates a node pool for a cluster. - CreateNodePool(ctx context.Context, in *CreateNodePoolRequest, opts ...grpc.CallOption) (*Operation, error) - // Deletes a node pool from a cluster. - DeleteNodePool(ctx context.Context, in *DeleteNodePoolRequest, opts ...grpc.CallOption) (*Operation, error) - // CompleteNodePoolUpgrade will signal an on-going node pool upgrade to - // complete. - CompleteNodePoolUpgrade(ctx context.Context, in *CompleteNodePoolUpgradeRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) - // Rolls back a previously Aborted or Failed NodePool upgrade. - // This makes no changes if the last upgrade successfully completed. - RollbackNodePoolUpgrade(ctx context.Context, in *RollbackNodePoolUpgradeRequest, opts ...grpc.CallOption) (*Operation, error) - // Sets the NodeManagement options for a node pool. - SetNodePoolManagement(ctx context.Context, in *SetNodePoolManagementRequest, opts ...grpc.CallOption) (*Operation, error) - // Sets labels on a cluster. - SetLabels(ctx context.Context, in *SetLabelsRequest, opts ...grpc.CallOption) (*Operation, error) - // Enables or disables the ABAC authorization mechanism on a cluster. - SetLegacyAbac(ctx context.Context, in *SetLegacyAbacRequest, opts ...grpc.CallOption) (*Operation, error) - // Starts master IP rotation. - StartIPRotation(ctx context.Context, in *StartIPRotationRequest, opts ...grpc.CallOption) (*Operation, error) - // Completes master IP rotation. - CompleteIPRotation(ctx context.Context, in *CompleteIPRotationRequest, opts ...grpc.CallOption) (*Operation, error) - // Sets the size for a specific node pool. The new size will be used for all - // replicas, including future replicas created by modifying - // [NodePool.locations][google.container.v1.NodePool.locations]. - SetNodePoolSize(ctx context.Context, in *SetNodePoolSizeRequest, opts ...grpc.CallOption) (*Operation, error) - // Enables or disables Network Policy for a cluster. - SetNetworkPolicy(ctx context.Context, in *SetNetworkPolicyRequest, opts ...grpc.CallOption) (*Operation, error) - // Sets the maintenance policy for a cluster. - SetMaintenancePolicy(ctx context.Context, in *SetMaintenancePolicyRequest, opts ...grpc.CallOption) (*Operation, error) - // Lists subnetworks that are usable for creating clusters in a project. - ListUsableSubnetworks(ctx context.Context, in *ListUsableSubnetworksRequest, opts ...grpc.CallOption) (*ListUsableSubnetworksResponse, error) - // Checks the cluster compatibility with Autopilot mode, and returns a list of - // compatibility issues. - CheckAutopilotCompatibility(ctx context.Context, in *CheckAutopilotCompatibilityRequest, opts ...grpc.CallOption) (*CheckAutopilotCompatibilityResponse, error) - // Fetch upgrade information of a specific cluster. - FetchClusterUpgradeInfo(ctx context.Context, in *FetchClusterUpgradeInfoRequest, opts ...grpc.CallOption) (*ClusterUpgradeInfo, error) - // Fetch upgrade information of a specific nodepool. - FetchNodePoolUpgradeInfo(ctx context.Context, in *FetchNodePoolUpgradeInfoRequest, opts ...grpc.CallOption) (*NodePoolUpgradeInfo, error) -} - -type clusterManagerClient struct { - cc grpc.ClientConnInterface -} - -func NewClusterManagerClient(cc grpc.ClientConnInterface) ClusterManagerClient { - return &clusterManagerClient{cc} -} - -func (c *clusterManagerClient) ListClusters(ctx context.Context, in *ListClustersRequest, opts ...grpc.CallOption) (*ListClustersResponse, error) { - out := new(ListClustersResponse) - err := c.cc.Invoke(ctx, ClusterManager_ListClusters_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *clusterManagerClient) GetCluster(ctx context.Context, in *GetClusterRequest, opts ...grpc.CallOption) (*Cluster, error) { - out := new(Cluster) - err := c.cc.Invoke(ctx, ClusterManager_GetCluster_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *clusterManagerClient) CreateCluster(ctx context.Context, in *CreateClusterRequest, opts ...grpc.CallOption) (*Operation, error) { - out := new(Operation) - err := c.cc.Invoke(ctx, ClusterManager_CreateCluster_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *clusterManagerClient) UpdateCluster(ctx context.Context, in *UpdateClusterRequest, opts ...grpc.CallOption) (*Operation, error) { - out := new(Operation) - err := c.cc.Invoke(ctx, ClusterManager_UpdateCluster_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *clusterManagerClient) UpdateNodePool(ctx context.Context, in *UpdateNodePoolRequest, opts ...grpc.CallOption) (*Operation, error) { - out := new(Operation) - err := c.cc.Invoke(ctx, ClusterManager_UpdateNodePool_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *clusterManagerClient) SetNodePoolAutoscaling(ctx context.Context, in *SetNodePoolAutoscalingRequest, opts ...grpc.CallOption) (*Operation, error) { - out := new(Operation) - err := c.cc.Invoke(ctx, ClusterManager_SetNodePoolAutoscaling_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *clusterManagerClient) SetLoggingService(ctx context.Context, in *SetLoggingServiceRequest, opts ...grpc.CallOption) (*Operation, error) { - out := new(Operation) - err := c.cc.Invoke(ctx, ClusterManager_SetLoggingService_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *clusterManagerClient) SetMonitoringService(ctx context.Context, in *SetMonitoringServiceRequest, opts ...grpc.CallOption) (*Operation, error) { - out := new(Operation) - err := c.cc.Invoke(ctx, ClusterManager_SetMonitoringService_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *clusterManagerClient) SetAddonsConfig(ctx context.Context, in *SetAddonsConfigRequest, opts ...grpc.CallOption) (*Operation, error) { - out := new(Operation) - err := c.cc.Invoke(ctx, ClusterManager_SetAddonsConfig_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// Deprecated: Do not use. -func (c *clusterManagerClient) SetLocations(ctx context.Context, in *SetLocationsRequest, opts ...grpc.CallOption) (*Operation, error) { - out := new(Operation) - err := c.cc.Invoke(ctx, ClusterManager_SetLocations_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *clusterManagerClient) UpdateMaster(ctx context.Context, in *UpdateMasterRequest, opts ...grpc.CallOption) (*Operation, error) { - out := new(Operation) - err := c.cc.Invoke(ctx, ClusterManager_UpdateMaster_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *clusterManagerClient) SetMasterAuth(ctx context.Context, in *SetMasterAuthRequest, opts ...grpc.CallOption) (*Operation, error) { - out := new(Operation) - err := c.cc.Invoke(ctx, ClusterManager_SetMasterAuth_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *clusterManagerClient) DeleteCluster(ctx context.Context, in *DeleteClusterRequest, opts ...grpc.CallOption) (*Operation, error) { - out := new(Operation) - err := c.cc.Invoke(ctx, ClusterManager_DeleteCluster_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *clusterManagerClient) ListOperations(ctx context.Context, in *ListOperationsRequest, opts ...grpc.CallOption) (*ListOperationsResponse, error) { - out := new(ListOperationsResponse) - err := c.cc.Invoke(ctx, ClusterManager_ListOperations_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *clusterManagerClient) GetOperation(ctx context.Context, in *GetOperationRequest, opts ...grpc.CallOption) (*Operation, error) { - out := new(Operation) - err := c.cc.Invoke(ctx, ClusterManager_GetOperation_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *clusterManagerClient) CancelOperation(ctx context.Context, in *CancelOperationRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { - out := new(emptypb.Empty) - err := c.cc.Invoke(ctx, ClusterManager_CancelOperation_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *clusterManagerClient) GetServerConfig(ctx context.Context, in *GetServerConfigRequest, opts ...grpc.CallOption) (*ServerConfig, error) { - out := new(ServerConfig) - err := c.cc.Invoke(ctx, ClusterManager_GetServerConfig_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *clusterManagerClient) GetJSONWebKeys(ctx context.Context, in *GetJSONWebKeysRequest, opts ...grpc.CallOption) (*GetJSONWebKeysResponse, error) { - out := new(GetJSONWebKeysResponse) - err := c.cc.Invoke(ctx, ClusterManager_GetJSONWebKeys_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *clusterManagerClient) ListNodePools(ctx context.Context, in *ListNodePoolsRequest, opts ...grpc.CallOption) (*ListNodePoolsResponse, error) { - out := new(ListNodePoolsResponse) - err := c.cc.Invoke(ctx, ClusterManager_ListNodePools_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *clusterManagerClient) GetNodePool(ctx context.Context, in *GetNodePoolRequest, opts ...grpc.CallOption) (*NodePool, error) { - out := new(NodePool) - err := c.cc.Invoke(ctx, ClusterManager_GetNodePool_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *clusterManagerClient) CreateNodePool(ctx context.Context, in *CreateNodePoolRequest, opts ...grpc.CallOption) (*Operation, error) { - out := new(Operation) - err := c.cc.Invoke(ctx, ClusterManager_CreateNodePool_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *clusterManagerClient) DeleteNodePool(ctx context.Context, in *DeleteNodePoolRequest, opts ...grpc.CallOption) (*Operation, error) { - out := new(Operation) - err := c.cc.Invoke(ctx, ClusterManager_DeleteNodePool_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *clusterManagerClient) CompleteNodePoolUpgrade(ctx context.Context, in *CompleteNodePoolUpgradeRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { - out := new(emptypb.Empty) - err := c.cc.Invoke(ctx, ClusterManager_CompleteNodePoolUpgrade_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *clusterManagerClient) RollbackNodePoolUpgrade(ctx context.Context, in *RollbackNodePoolUpgradeRequest, opts ...grpc.CallOption) (*Operation, error) { - out := new(Operation) - err := c.cc.Invoke(ctx, ClusterManager_RollbackNodePoolUpgrade_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *clusterManagerClient) SetNodePoolManagement(ctx context.Context, in *SetNodePoolManagementRequest, opts ...grpc.CallOption) (*Operation, error) { - out := new(Operation) - err := c.cc.Invoke(ctx, ClusterManager_SetNodePoolManagement_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *clusterManagerClient) SetLabels(ctx context.Context, in *SetLabelsRequest, opts ...grpc.CallOption) (*Operation, error) { - out := new(Operation) - err := c.cc.Invoke(ctx, ClusterManager_SetLabels_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *clusterManagerClient) SetLegacyAbac(ctx context.Context, in *SetLegacyAbacRequest, opts ...grpc.CallOption) (*Operation, error) { - out := new(Operation) - err := c.cc.Invoke(ctx, ClusterManager_SetLegacyAbac_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *clusterManagerClient) StartIPRotation(ctx context.Context, in *StartIPRotationRequest, opts ...grpc.CallOption) (*Operation, error) { - out := new(Operation) - err := c.cc.Invoke(ctx, ClusterManager_StartIPRotation_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *clusterManagerClient) CompleteIPRotation(ctx context.Context, in *CompleteIPRotationRequest, opts ...grpc.CallOption) (*Operation, error) { - out := new(Operation) - err := c.cc.Invoke(ctx, ClusterManager_CompleteIPRotation_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *clusterManagerClient) SetNodePoolSize(ctx context.Context, in *SetNodePoolSizeRequest, opts ...grpc.CallOption) (*Operation, error) { - out := new(Operation) - err := c.cc.Invoke(ctx, ClusterManager_SetNodePoolSize_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *clusterManagerClient) SetNetworkPolicy(ctx context.Context, in *SetNetworkPolicyRequest, opts ...grpc.CallOption) (*Operation, error) { - out := new(Operation) - err := c.cc.Invoke(ctx, ClusterManager_SetNetworkPolicy_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *clusterManagerClient) SetMaintenancePolicy(ctx context.Context, in *SetMaintenancePolicyRequest, opts ...grpc.CallOption) (*Operation, error) { - out := new(Operation) - err := c.cc.Invoke(ctx, ClusterManager_SetMaintenancePolicy_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *clusterManagerClient) ListUsableSubnetworks(ctx context.Context, in *ListUsableSubnetworksRequest, opts ...grpc.CallOption) (*ListUsableSubnetworksResponse, error) { - out := new(ListUsableSubnetworksResponse) - err := c.cc.Invoke(ctx, ClusterManager_ListUsableSubnetworks_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *clusterManagerClient) CheckAutopilotCompatibility(ctx context.Context, in *CheckAutopilotCompatibilityRequest, opts ...grpc.CallOption) (*CheckAutopilotCompatibilityResponse, error) { - out := new(CheckAutopilotCompatibilityResponse) - err := c.cc.Invoke(ctx, ClusterManager_CheckAutopilotCompatibility_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *clusterManagerClient) FetchClusterUpgradeInfo(ctx context.Context, in *FetchClusterUpgradeInfoRequest, opts ...grpc.CallOption) (*ClusterUpgradeInfo, error) { - out := new(ClusterUpgradeInfo) - err := c.cc.Invoke(ctx, ClusterManager_FetchClusterUpgradeInfo_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *clusterManagerClient) FetchNodePoolUpgradeInfo(ctx context.Context, in *FetchNodePoolUpgradeInfoRequest, opts ...grpc.CallOption) (*NodePoolUpgradeInfo, error) { - out := new(NodePoolUpgradeInfo) - err := c.cc.Invoke(ctx, ClusterManager_FetchNodePoolUpgradeInfo_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// ClusterManagerServer is the server API for ClusterManager service. -// All implementations should embed UnimplementedClusterManagerServer -// for forward compatibility -type ClusterManagerServer interface { - // Lists all clusters owned by a project in either the specified zone or all - // zones. - ListClusters(context.Context, *ListClustersRequest) (*ListClustersResponse, error) - // Gets the details of a specific cluster. - GetCluster(context.Context, *GetClusterRequest) (*Cluster, error) - // Creates a cluster, consisting of the specified number and type of Google - // Compute Engine instances. - // - // By default, the cluster is created in the project's - // [default - // network](https://cloud.google.com/compute/docs/networks-and-firewalls#networks). - // - // One firewall is added for the cluster. After cluster creation, - // the kubelet creates routes for each node to allow the containers - // on that node to communicate with all other instances in the - // cluster. - // - // Finally, an entry is added to the project's global metadata indicating - // which CIDR range the cluster is using. - CreateCluster(context.Context, *CreateClusterRequest) (*Operation, error) - // Updates the settings of a specific cluster. - UpdateCluster(context.Context, *UpdateClusterRequest) (*Operation, error) - // Updates the version and/or image type for the specified node pool. - UpdateNodePool(context.Context, *UpdateNodePoolRequest) (*Operation, error) - // Sets the autoscaling settings for the specified node pool. - SetNodePoolAutoscaling(context.Context, *SetNodePoolAutoscalingRequest) (*Operation, error) - // Sets the logging service for a specific cluster. - SetLoggingService(context.Context, *SetLoggingServiceRequest) (*Operation, error) - // Sets the monitoring service for a specific cluster. - SetMonitoringService(context.Context, *SetMonitoringServiceRequest) (*Operation, error) - // Sets the addons for a specific cluster. - SetAddonsConfig(context.Context, *SetAddonsConfigRequest) (*Operation, error) - // Deprecated: Do not use. - // Sets the locations for a specific cluster. - // Deprecated. Use - // [projects.locations.clusters.update](https://cloud.google.com/kubernetes-engine/docs/reference/rest/v1/projects.locations.clusters/update) - // instead. - SetLocations(context.Context, *SetLocationsRequest) (*Operation, error) - // Updates the master for a specific cluster. - UpdateMaster(context.Context, *UpdateMasterRequest) (*Operation, error) - // Sets master auth materials. Currently supports changing the admin password - // or a specific cluster, either via password generation or explicitly setting - // the password. - SetMasterAuth(context.Context, *SetMasterAuthRequest) (*Operation, error) - // Deletes the cluster, including the Kubernetes endpoint and all worker - // nodes. - // - // Firewalls and routes that were configured during cluster creation - // are also deleted. - // - // Other Google Compute Engine resources that might be in use by the cluster, - // such as load balancer resources, are not deleted if they weren't present - // when the cluster was initially created. - DeleteCluster(context.Context, *DeleteClusterRequest) (*Operation, error) - // Lists all operations in a project in a specific zone or all zones. - ListOperations(context.Context, *ListOperationsRequest) (*ListOperationsResponse, error) - // Gets the specified operation. - GetOperation(context.Context, *GetOperationRequest) (*Operation, error) - // Cancels the specified operation. - CancelOperation(context.Context, *CancelOperationRequest) (*emptypb.Empty, error) - // Returns configuration info about the Google Kubernetes Engine service. - GetServerConfig(context.Context, *GetServerConfigRequest) (*ServerConfig, error) - // Gets the public component of the cluster signing keys in - // JSON Web Key format. - GetJSONWebKeys(context.Context, *GetJSONWebKeysRequest) (*GetJSONWebKeysResponse, error) - // Lists the node pools for a cluster. - ListNodePools(context.Context, *ListNodePoolsRequest) (*ListNodePoolsResponse, error) - // Retrieves the requested node pool. - GetNodePool(context.Context, *GetNodePoolRequest) (*NodePool, error) - // Creates a node pool for a cluster. - CreateNodePool(context.Context, *CreateNodePoolRequest) (*Operation, error) - // Deletes a node pool from a cluster. - DeleteNodePool(context.Context, *DeleteNodePoolRequest) (*Operation, error) - // CompleteNodePoolUpgrade will signal an on-going node pool upgrade to - // complete. - CompleteNodePoolUpgrade(context.Context, *CompleteNodePoolUpgradeRequest) (*emptypb.Empty, error) - // Rolls back a previously Aborted or Failed NodePool upgrade. - // This makes no changes if the last upgrade successfully completed. - RollbackNodePoolUpgrade(context.Context, *RollbackNodePoolUpgradeRequest) (*Operation, error) - // Sets the NodeManagement options for a node pool. - SetNodePoolManagement(context.Context, *SetNodePoolManagementRequest) (*Operation, error) - // Sets labels on a cluster. - SetLabels(context.Context, *SetLabelsRequest) (*Operation, error) - // Enables or disables the ABAC authorization mechanism on a cluster. - SetLegacyAbac(context.Context, *SetLegacyAbacRequest) (*Operation, error) - // Starts master IP rotation. - StartIPRotation(context.Context, *StartIPRotationRequest) (*Operation, error) - // Completes master IP rotation. - CompleteIPRotation(context.Context, *CompleteIPRotationRequest) (*Operation, error) - // Sets the size for a specific node pool. The new size will be used for all - // replicas, including future replicas created by modifying - // [NodePool.locations][google.container.v1.NodePool.locations]. - SetNodePoolSize(context.Context, *SetNodePoolSizeRequest) (*Operation, error) - // Enables or disables Network Policy for a cluster. - SetNetworkPolicy(context.Context, *SetNetworkPolicyRequest) (*Operation, error) - // Sets the maintenance policy for a cluster. - SetMaintenancePolicy(context.Context, *SetMaintenancePolicyRequest) (*Operation, error) - // Lists subnetworks that are usable for creating clusters in a project. - ListUsableSubnetworks(context.Context, *ListUsableSubnetworksRequest) (*ListUsableSubnetworksResponse, error) - // Checks the cluster compatibility with Autopilot mode, and returns a list of - // compatibility issues. - CheckAutopilotCompatibility(context.Context, *CheckAutopilotCompatibilityRequest) (*CheckAutopilotCompatibilityResponse, error) - // Fetch upgrade information of a specific cluster. - FetchClusterUpgradeInfo(context.Context, *FetchClusterUpgradeInfoRequest) (*ClusterUpgradeInfo, error) - // Fetch upgrade information of a specific nodepool. - FetchNodePoolUpgradeInfo(context.Context, *FetchNodePoolUpgradeInfoRequest) (*NodePoolUpgradeInfo, error) -} - -// UnimplementedClusterManagerServer should be embedded to have forward compatible implementations. -type UnimplementedClusterManagerServer struct { -} - -func (UnimplementedClusterManagerServer) ListClusters(context.Context, *ListClustersRequest) (*ListClustersResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ListClusters not implemented") -} -func (UnimplementedClusterManagerServer) GetCluster(context.Context, *GetClusterRequest) (*Cluster, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetCluster not implemented") -} -func (UnimplementedClusterManagerServer) CreateCluster(context.Context, *CreateClusterRequest) (*Operation, error) { - return nil, status.Errorf(codes.Unimplemented, "method CreateCluster not implemented") -} -func (UnimplementedClusterManagerServer) UpdateCluster(context.Context, *UpdateClusterRequest) (*Operation, error) { - return nil, status.Errorf(codes.Unimplemented, "method UpdateCluster not implemented") -} -func (UnimplementedClusterManagerServer) UpdateNodePool(context.Context, *UpdateNodePoolRequest) (*Operation, error) { - return nil, status.Errorf(codes.Unimplemented, "method UpdateNodePool not implemented") -} -func (UnimplementedClusterManagerServer) SetNodePoolAutoscaling(context.Context, *SetNodePoolAutoscalingRequest) (*Operation, error) { - return nil, status.Errorf(codes.Unimplemented, "method SetNodePoolAutoscaling not implemented") -} -func (UnimplementedClusterManagerServer) SetLoggingService(context.Context, *SetLoggingServiceRequest) (*Operation, error) { - return nil, status.Errorf(codes.Unimplemented, "method SetLoggingService not implemented") -} -func (UnimplementedClusterManagerServer) SetMonitoringService(context.Context, *SetMonitoringServiceRequest) (*Operation, error) { - return nil, status.Errorf(codes.Unimplemented, "method SetMonitoringService not implemented") -} -func (UnimplementedClusterManagerServer) SetAddonsConfig(context.Context, *SetAddonsConfigRequest) (*Operation, error) { - return nil, status.Errorf(codes.Unimplemented, "method SetAddonsConfig not implemented") -} -func (UnimplementedClusterManagerServer) SetLocations(context.Context, *SetLocationsRequest) (*Operation, error) { - return nil, status.Errorf(codes.Unimplemented, "method SetLocations not implemented") -} -func (UnimplementedClusterManagerServer) UpdateMaster(context.Context, *UpdateMasterRequest) (*Operation, error) { - return nil, status.Errorf(codes.Unimplemented, "method UpdateMaster not implemented") -} -func (UnimplementedClusterManagerServer) SetMasterAuth(context.Context, *SetMasterAuthRequest) (*Operation, error) { - return nil, status.Errorf(codes.Unimplemented, "method SetMasterAuth not implemented") -} -func (UnimplementedClusterManagerServer) DeleteCluster(context.Context, *DeleteClusterRequest) (*Operation, error) { - return nil, status.Errorf(codes.Unimplemented, "method DeleteCluster not implemented") -} -func (UnimplementedClusterManagerServer) ListOperations(context.Context, *ListOperationsRequest) (*ListOperationsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ListOperations not implemented") -} -func (UnimplementedClusterManagerServer) GetOperation(context.Context, *GetOperationRequest) (*Operation, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetOperation not implemented") -} -func (UnimplementedClusterManagerServer) CancelOperation(context.Context, *CancelOperationRequest) (*emptypb.Empty, error) { - return nil, status.Errorf(codes.Unimplemented, "method CancelOperation not implemented") -} -func (UnimplementedClusterManagerServer) GetServerConfig(context.Context, *GetServerConfigRequest) (*ServerConfig, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetServerConfig not implemented") -} -func (UnimplementedClusterManagerServer) GetJSONWebKeys(context.Context, *GetJSONWebKeysRequest) (*GetJSONWebKeysResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetJSONWebKeys not implemented") -} -func (UnimplementedClusterManagerServer) ListNodePools(context.Context, *ListNodePoolsRequest) (*ListNodePoolsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ListNodePools not implemented") -} -func (UnimplementedClusterManagerServer) GetNodePool(context.Context, *GetNodePoolRequest) (*NodePool, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetNodePool not implemented") -} -func (UnimplementedClusterManagerServer) CreateNodePool(context.Context, *CreateNodePoolRequest) (*Operation, error) { - return nil, status.Errorf(codes.Unimplemented, "method CreateNodePool not implemented") -} -func (UnimplementedClusterManagerServer) DeleteNodePool(context.Context, *DeleteNodePoolRequest) (*Operation, error) { - return nil, status.Errorf(codes.Unimplemented, "method DeleteNodePool not implemented") -} -func (UnimplementedClusterManagerServer) CompleteNodePoolUpgrade(context.Context, *CompleteNodePoolUpgradeRequest) (*emptypb.Empty, error) { - return nil, status.Errorf(codes.Unimplemented, "method CompleteNodePoolUpgrade not implemented") -} -func (UnimplementedClusterManagerServer) RollbackNodePoolUpgrade(context.Context, *RollbackNodePoolUpgradeRequest) (*Operation, error) { - return nil, status.Errorf(codes.Unimplemented, "method RollbackNodePoolUpgrade not implemented") -} -func (UnimplementedClusterManagerServer) SetNodePoolManagement(context.Context, *SetNodePoolManagementRequest) (*Operation, error) { - return nil, status.Errorf(codes.Unimplemented, "method SetNodePoolManagement not implemented") -} -func (UnimplementedClusterManagerServer) SetLabels(context.Context, *SetLabelsRequest) (*Operation, error) { - return nil, status.Errorf(codes.Unimplemented, "method SetLabels not implemented") -} -func (UnimplementedClusterManagerServer) SetLegacyAbac(context.Context, *SetLegacyAbacRequest) (*Operation, error) { - return nil, status.Errorf(codes.Unimplemented, "method SetLegacyAbac not implemented") -} -func (UnimplementedClusterManagerServer) StartIPRotation(context.Context, *StartIPRotationRequest) (*Operation, error) { - return nil, status.Errorf(codes.Unimplemented, "method StartIPRotation not implemented") -} -func (UnimplementedClusterManagerServer) CompleteIPRotation(context.Context, *CompleteIPRotationRequest) (*Operation, error) { - return nil, status.Errorf(codes.Unimplemented, "method CompleteIPRotation not implemented") -} -func (UnimplementedClusterManagerServer) SetNodePoolSize(context.Context, *SetNodePoolSizeRequest) (*Operation, error) { - return nil, status.Errorf(codes.Unimplemented, "method SetNodePoolSize not implemented") -} -func (UnimplementedClusterManagerServer) SetNetworkPolicy(context.Context, *SetNetworkPolicyRequest) (*Operation, error) { - return nil, status.Errorf(codes.Unimplemented, "method SetNetworkPolicy not implemented") -} -func (UnimplementedClusterManagerServer) SetMaintenancePolicy(context.Context, *SetMaintenancePolicyRequest) (*Operation, error) { - return nil, status.Errorf(codes.Unimplemented, "method SetMaintenancePolicy not implemented") -} -func (UnimplementedClusterManagerServer) ListUsableSubnetworks(context.Context, *ListUsableSubnetworksRequest) (*ListUsableSubnetworksResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ListUsableSubnetworks not implemented") -} -func (UnimplementedClusterManagerServer) CheckAutopilotCompatibility(context.Context, *CheckAutopilotCompatibilityRequest) (*CheckAutopilotCompatibilityResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method CheckAutopilotCompatibility not implemented") -} -func (UnimplementedClusterManagerServer) FetchClusterUpgradeInfo(context.Context, *FetchClusterUpgradeInfoRequest) (*ClusterUpgradeInfo, error) { - return nil, status.Errorf(codes.Unimplemented, "method FetchClusterUpgradeInfo not implemented") -} -func (UnimplementedClusterManagerServer) FetchNodePoolUpgradeInfo(context.Context, *FetchNodePoolUpgradeInfoRequest) (*NodePoolUpgradeInfo, error) { - return nil, status.Errorf(codes.Unimplemented, "method FetchNodePoolUpgradeInfo not implemented") -} - -// UnsafeClusterManagerServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to ClusterManagerServer will -// result in compilation errors. -type UnsafeClusterManagerServer interface { - mustEmbedUnimplementedClusterManagerServer() -} - -func RegisterClusterManagerServer(s grpc.ServiceRegistrar, srv ClusterManagerServer) { - s.RegisterService(&ClusterManager_ServiceDesc, srv) -} - -func _ClusterManager_ListClusters_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ListClustersRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ClusterManagerServer).ListClusters(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: ClusterManager_ListClusters_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ClusterManagerServer).ListClusters(ctx, req.(*ListClustersRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ClusterManager_GetCluster_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetClusterRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ClusterManagerServer).GetCluster(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: ClusterManager_GetCluster_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ClusterManagerServer).GetCluster(ctx, req.(*GetClusterRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ClusterManager_CreateCluster_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CreateClusterRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ClusterManagerServer).CreateCluster(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: ClusterManager_CreateCluster_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ClusterManagerServer).CreateCluster(ctx, req.(*CreateClusterRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ClusterManager_UpdateCluster_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(UpdateClusterRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ClusterManagerServer).UpdateCluster(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: ClusterManager_UpdateCluster_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ClusterManagerServer).UpdateCluster(ctx, req.(*UpdateClusterRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ClusterManager_UpdateNodePool_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(UpdateNodePoolRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ClusterManagerServer).UpdateNodePool(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: ClusterManager_UpdateNodePool_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ClusterManagerServer).UpdateNodePool(ctx, req.(*UpdateNodePoolRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ClusterManager_SetNodePoolAutoscaling_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(SetNodePoolAutoscalingRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ClusterManagerServer).SetNodePoolAutoscaling(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: ClusterManager_SetNodePoolAutoscaling_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ClusterManagerServer).SetNodePoolAutoscaling(ctx, req.(*SetNodePoolAutoscalingRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ClusterManager_SetLoggingService_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(SetLoggingServiceRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ClusterManagerServer).SetLoggingService(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: ClusterManager_SetLoggingService_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ClusterManagerServer).SetLoggingService(ctx, req.(*SetLoggingServiceRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ClusterManager_SetMonitoringService_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(SetMonitoringServiceRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ClusterManagerServer).SetMonitoringService(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: ClusterManager_SetMonitoringService_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ClusterManagerServer).SetMonitoringService(ctx, req.(*SetMonitoringServiceRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ClusterManager_SetAddonsConfig_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(SetAddonsConfigRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ClusterManagerServer).SetAddonsConfig(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: ClusterManager_SetAddonsConfig_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ClusterManagerServer).SetAddonsConfig(ctx, req.(*SetAddonsConfigRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ClusterManager_SetLocations_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(SetLocationsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ClusterManagerServer).SetLocations(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: ClusterManager_SetLocations_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ClusterManagerServer).SetLocations(ctx, req.(*SetLocationsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ClusterManager_UpdateMaster_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(UpdateMasterRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ClusterManagerServer).UpdateMaster(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: ClusterManager_UpdateMaster_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ClusterManagerServer).UpdateMaster(ctx, req.(*UpdateMasterRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ClusterManager_SetMasterAuth_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(SetMasterAuthRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ClusterManagerServer).SetMasterAuth(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: ClusterManager_SetMasterAuth_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ClusterManagerServer).SetMasterAuth(ctx, req.(*SetMasterAuthRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ClusterManager_DeleteCluster_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DeleteClusterRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ClusterManagerServer).DeleteCluster(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: ClusterManager_DeleteCluster_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ClusterManagerServer).DeleteCluster(ctx, req.(*DeleteClusterRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ClusterManager_ListOperations_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ListOperationsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ClusterManagerServer).ListOperations(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: ClusterManager_ListOperations_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ClusterManagerServer).ListOperations(ctx, req.(*ListOperationsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ClusterManager_GetOperation_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetOperationRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ClusterManagerServer).GetOperation(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: ClusterManager_GetOperation_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ClusterManagerServer).GetOperation(ctx, req.(*GetOperationRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ClusterManager_CancelOperation_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CancelOperationRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ClusterManagerServer).CancelOperation(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: ClusterManager_CancelOperation_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ClusterManagerServer).CancelOperation(ctx, req.(*CancelOperationRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ClusterManager_GetServerConfig_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetServerConfigRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ClusterManagerServer).GetServerConfig(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: ClusterManager_GetServerConfig_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ClusterManagerServer).GetServerConfig(ctx, req.(*GetServerConfigRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ClusterManager_GetJSONWebKeys_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetJSONWebKeysRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ClusterManagerServer).GetJSONWebKeys(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: ClusterManager_GetJSONWebKeys_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ClusterManagerServer).GetJSONWebKeys(ctx, req.(*GetJSONWebKeysRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ClusterManager_ListNodePools_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ListNodePoolsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ClusterManagerServer).ListNodePools(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: ClusterManager_ListNodePools_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ClusterManagerServer).ListNodePools(ctx, req.(*ListNodePoolsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ClusterManager_GetNodePool_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetNodePoolRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ClusterManagerServer).GetNodePool(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: ClusterManager_GetNodePool_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ClusterManagerServer).GetNodePool(ctx, req.(*GetNodePoolRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ClusterManager_CreateNodePool_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CreateNodePoolRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ClusterManagerServer).CreateNodePool(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: ClusterManager_CreateNodePool_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ClusterManagerServer).CreateNodePool(ctx, req.(*CreateNodePoolRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ClusterManager_DeleteNodePool_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DeleteNodePoolRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ClusterManagerServer).DeleteNodePool(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: ClusterManager_DeleteNodePool_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ClusterManagerServer).DeleteNodePool(ctx, req.(*DeleteNodePoolRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ClusterManager_CompleteNodePoolUpgrade_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CompleteNodePoolUpgradeRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ClusterManagerServer).CompleteNodePoolUpgrade(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: ClusterManager_CompleteNodePoolUpgrade_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ClusterManagerServer).CompleteNodePoolUpgrade(ctx, req.(*CompleteNodePoolUpgradeRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ClusterManager_RollbackNodePoolUpgrade_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(RollbackNodePoolUpgradeRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ClusterManagerServer).RollbackNodePoolUpgrade(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: ClusterManager_RollbackNodePoolUpgrade_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ClusterManagerServer).RollbackNodePoolUpgrade(ctx, req.(*RollbackNodePoolUpgradeRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ClusterManager_SetNodePoolManagement_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(SetNodePoolManagementRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ClusterManagerServer).SetNodePoolManagement(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: ClusterManager_SetNodePoolManagement_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ClusterManagerServer).SetNodePoolManagement(ctx, req.(*SetNodePoolManagementRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ClusterManager_SetLabels_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(SetLabelsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ClusterManagerServer).SetLabels(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: ClusterManager_SetLabels_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ClusterManagerServer).SetLabels(ctx, req.(*SetLabelsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ClusterManager_SetLegacyAbac_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(SetLegacyAbacRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ClusterManagerServer).SetLegacyAbac(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: ClusterManager_SetLegacyAbac_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ClusterManagerServer).SetLegacyAbac(ctx, req.(*SetLegacyAbacRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ClusterManager_StartIPRotation_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(StartIPRotationRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ClusterManagerServer).StartIPRotation(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: ClusterManager_StartIPRotation_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ClusterManagerServer).StartIPRotation(ctx, req.(*StartIPRotationRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ClusterManager_CompleteIPRotation_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CompleteIPRotationRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ClusterManagerServer).CompleteIPRotation(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: ClusterManager_CompleteIPRotation_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ClusterManagerServer).CompleteIPRotation(ctx, req.(*CompleteIPRotationRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ClusterManager_SetNodePoolSize_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(SetNodePoolSizeRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ClusterManagerServer).SetNodePoolSize(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: ClusterManager_SetNodePoolSize_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ClusterManagerServer).SetNodePoolSize(ctx, req.(*SetNodePoolSizeRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ClusterManager_SetNetworkPolicy_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(SetNetworkPolicyRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ClusterManagerServer).SetNetworkPolicy(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: ClusterManager_SetNetworkPolicy_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ClusterManagerServer).SetNetworkPolicy(ctx, req.(*SetNetworkPolicyRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ClusterManager_SetMaintenancePolicy_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(SetMaintenancePolicyRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ClusterManagerServer).SetMaintenancePolicy(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: ClusterManager_SetMaintenancePolicy_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ClusterManagerServer).SetMaintenancePolicy(ctx, req.(*SetMaintenancePolicyRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ClusterManager_ListUsableSubnetworks_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ListUsableSubnetworksRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ClusterManagerServer).ListUsableSubnetworks(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: ClusterManager_ListUsableSubnetworks_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ClusterManagerServer).ListUsableSubnetworks(ctx, req.(*ListUsableSubnetworksRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ClusterManager_CheckAutopilotCompatibility_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CheckAutopilotCompatibilityRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ClusterManagerServer).CheckAutopilotCompatibility(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: ClusterManager_CheckAutopilotCompatibility_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ClusterManagerServer).CheckAutopilotCompatibility(ctx, req.(*CheckAutopilotCompatibilityRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ClusterManager_FetchClusterUpgradeInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(FetchClusterUpgradeInfoRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ClusterManagerServer).FetchClusterUpgradeInfo(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: ClusterManager_FetchClusterUpgradeInfo_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ClusterManagerServer).FetchClusterUpgradeInfo(ctx, req.(*FetchClusterUpgradeInfoRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ClusterManager_FetchNodePoolUpgradeInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(FetchNodePoolUpgradeInfoRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ClusterManagerServer).FetchNodePoolUpgradeInfo(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: ClusterManager_FetchNodePoolUpgradeInfo_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ClusterManagerServer).FetchNodePoolUpgradeInfo(ctx, req.(*FetchNodePoolUpgradeInfoRequest)) - } - return interceptor(ctx, in, info, handler) -} - -// ClusterManager_ServiceDesc is the grpc.ServiceDesc for ClusterManager service. -// It's only intended for direct use with grpc.RegisterService, -// and not to be introspected or modified (even as a copy) -var ClusterManager_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "google.container.v1.ClusterManager", - HandlerType: (*ClusterManagerServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "ListClusters", - Handler: _ClusterManager_ListClusters_Handler, - }, - { - MethodName: "GetCluster", - Handler: _ClusterManager_GetCluster_Handler, - }, - { - MethodName: "CreateCluster", - Handler: _ClusterManager_CreateCluster_Handler, - }, - { - MethodName: "UpdateCluster", - Handler: _ClusterManager_UpdateCluster_Handler, - }, - { - MethodName: "UpdateNodePool", - Handler: _ClusterManager_UpdateNodePool_Handler, - }, - { - MethodName: "SetNodePoolAutoscaling", - Handler: _ClusterManager_SetNodePoolAutoscaling_Handler, - }, - { - MethodName: "SetLoggingService", - Handler: _ClusterManager_SetLoggingService_Handler, - }, - { - MethodName: "SetMonitoringService", - Handler: _ClusterManager_SetMonitoringService_Handler, - }, - { - MethodName: "SetAddonsConfig", - Handler: _ClusterManager_SetAddonsConfig_Handler, - }, - { - MethodName: "SetLocations", - Handler: _ClusterManager_SetLocations_Handler, - }, - { - MethodName: "UpdateMaster", - Handler: _ClusterManager_UpdateMaster_Handler, - }, - { - MethodName: "SetMasterAuth", - Handler: _ClusterManager_SetMasterAuth_Handler, - }, - { - MethodName: "DeleteCluster", - Handler: _ClusterManager_DeleteCluster_Handler, - }, - { - MethodName: "ListOperations", - Handler: _ClusterManager_ListOperations_Handler, - }, - { - MethodName: "GetOperation", - Handler: _ClusterManager_GetOperation_Handler, - }, - { - MethodName: "CancelOperation", - Handler: _ClusterManager_CancelOperation_Handler, - }, - { - MethodName: "GetServerConfig", - Handler: _ClusterManager_GetServerConfig_Handler, - }, - { - MethodName: "GetJSONWebKeys", - Handler: _ClusterManager_GetJSONWebKeys_Handler, - }, - { - MethodName: "ListNodePools", - Handler: _ClusterManager_ListNodePools_Handler, - }, - { - MethodName: "GetNodePool", - Handler: _ClusterManager_GetNodePool_Handler, - }, - { - MethodName: "CreateNodePool", - Handler: _ClusterManager_CreateNodePool_Handler, - }, - { - MethodName: "DeleteNodePool", - Handler: _ClusterManager_DeleteNodePool_Handler, - }, - { - MethodName: "CompleteNodePoolUpgrade", - Handler: _ClusterManager_CompleteNodePoolUpgrade_Handler, - }, - { - MethodName: "RollbackNodePoolUpgrade", - Handler: _ClusterManager_RollbackNodePoolUpgrade_Handler, - }, - { - MethodName: "SetNodePoolManagement", - Handler: _ClusterManager_SetNodePoolManagement_Handler, - }, - { - MethodName: "SetLabels", - Handler: _ClusterManager_SetLabels_Handler, - }, - { - MethodName: "SetLegacyAbac", - Handler: _ClusterManager_SetLegacyAbac_Handler, - }, - { - MethodName: "StartIPRotation", - Handler: _ClusterManager_StartIPRotation_Handler, - }, - { - MethodName: "CompleteIPRotation", - Handler: _ClusterManager_CompleteIPRotation_Handler, - }, - { - MethodName: "SetNodePoolSize", - Handler: _ClusterManager_SetNodePoolSize_Handler, - }, - { - MethodName: "SetNetworkPolicy", - Handler: _ClusterManager_SetNetworkPolicy_Handler, - }, - { - MethodName: "SetMaintenancePolicy", - Handler: _ClusterManager_SetMaintenancePolicy_Handler, - }, - { - MethodName: "ListUsableSubnetworks", - Handler: _ClusterManager_ListUsableSubnetworks_Handler, - }, - { - MethodName: "CheckAutopilotCompatibility", - Handler: _ClusterManager_CheckAutopilotCompatibility_Handler, - }, - { - MethodName: "FetchClusterUpgradeInfo", - Handler: _ClusterManager_FetchClusterUpgradeInfo_Handler, - }, - { - MethodName: "FetchNodePoolUpgradeInfo", - Handler: _ClusterManager_FetchNodePoolUpgradeInfo_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "google/container/v1/cluster_service.proto", -} diff --git a/vendor/cloud.google.com/go/container/apiv1/doc.go b/vendor/cloud.google.com/go/container/apiv1/doc.go deleted file mode 100644 index b85f8b26b1..0000000000 --- a/vendor/cloud.google.com/go/container/apiv1/doc.go +++ /dev/null @@ -1,82 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Code generated by protoc-gen-go_gapic. DO NOT EDIT. - -// Package container is an auto-generated package for the -// Kubernetes Engine API. -// -// Builds and manages container-based applications, powered by the open -// source Kubernetes technology. -// -// # General documentation -// -// For information that is relevant for all client libraries please reference -// https://pkg.go.dev/cloud.google.com/go#pkg-overview. Some information on this -// page includes: -// -// - [Authentication and Authorization] -// - [Timeouts and Cancellation] -// - [Testing against Client Libraries] -// - [Debugging Client Libraries] -// - [Inspecting errors] -// -// # Example usage -// -// To get started with this package, create a client. -// -// // go get cloud.google.com/go/container/apiv1@latest -// ctx := context.Background() -// // This snippet has been automatically generated and should be regarded as a code template only. -// // It will require modifications to work: -// // - It may require correct/in-range values for request initialization. -// // - It may require specifying regional endpoints when creating the service client as shown in: -// // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options -// c, err := container.NewClusterManagerClient(ctx) -// if err != nil { -// // TODO: Handle error. -// } -// defer c.Close() -// -// The client will use your default application credentials. Clients should be reused instead of created as needed. -// The methods of Client are safe for concurrent use by multiple goroutines. -// The returned client must be Closed when it is done being used. -// -// # Using the Client -// -// The following is an example of making an API call with the newly created client, mentioned above. -// -// req := &containerpb.CancelOperationRequest{ -// // TODO: Fill request struct fields. -// // See https://pkg.go.dev/cloud.google.com/go/container/apiv1/containerpb#CancelOperationRequest. -// } -// err = c.CancelOperation(ctx, req) -// if err != nil { -// // TODO: Handle error. -// } -// -// # Use of Context -// -// The ctx passed to NewClusterManagerClient is used for authentication requests and -// for creating the underlying connection, but is not used for subsequent calls. -// Individual methods on the client use the ctx given to them. -// -// To close the open connection, use the Close() method. -// -// [Authentication and Authorization]: https://pkg.go.dev/cloud.google.com/go#hdr-Authentication_and_Authorization -// [Timeouts and Cancellation]: https://pkg.go.dev/cloud.google.com/go#hdr-Timeouts_and_Cancellation -// [Testing against Client Libraries]: https://pkg.go.dev/cloud.google.com/go#hdr-Testing -// [Debugging Client Libraries]: https://pkg.go.dev/cloud.google.com/go#hdr-Debugging -// [Inspecting errors]: https://pkg.go.dev/cloud.google.com/go#hdr-Inspecting_errors -package container // import "cloud.google.com/go/container/apiv1" diff --git a/vendor/cloud.google.com/go/container/apiv1/gapic_metadata.json b/vendor/cloud.google.com/go/container/apiv1/gapic_metadata.json deleted file mode 100644 index 1ebcf3711b..0000000000 --- a/vendor/cloud.google.com/go/container/apiv1/gapic_metadata.json +++ /dev/null @@ -1,383 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods.", - "language": "go", - "protoPackage": "google.container.v1", - "libraryPackage": "cloud.google.com/go/container/apiv1", - "services": { - "ClusterManager": { - "clients": { - "grpc": { - "libraryClient": "ClusterManagerClient", - "rpcs": { - "CancelOperation": { - "methods": [ - "CancelOperation" - ] - }, - "CheckAutopilotCompatibility": { - "methods": [ - "CheckAutopilotCompatibility" - ] - }, - "CompleteIPRotation": { - "methods": [ - "CompleteIPRotation" - ] - }, - "CompleteNodePoolUpgrade": { - "methods": [ - "CompleteNodePoolUpgrade" - ] - }, - "CreateCluster": { - "methods": [ - "CreateCluster" - ] - }, - "CreateNodePool": { - "methods": [ - "CreateNodePool" - ] - }, - "DeleteCluster": { - "methods": [ - "DeleteCluster" - ] - }, - "DeleteNodePool": { - "methods": [ - "DeleteNodePool" - ] - }, - "FetchClusterUpgradeInfo": { - "methods": [ - "FetchClusterUpgradeInfo" - ] - }, - "FetchNodePoolUpgradeInfo": { - "methods": [ - "FetchNodePoolUpgradeInfo" - ] - }, - "GetCluster": { - "methods": [ - "GetCluster" - ] - }, - "GetJSONWebKeys": { - "methods": [ - "GetJSONWebKeys" - ] - }, - "GetNodePool": { - "methods": [ - "GetNodePool" - ] - }, - "GetOperation": { - "methods": [ - "GetOperation" - ] - }, - "GetServerConfig": { - "methods": [ - "GetServerConfig" - ] - }, - "ListClusters": { - "methods": [ - "ListClusters" - ] - }, - "ListNodePools": { - "methods": [ - "ListNodePools" - ] - }, - "ListOperations": { - "methods": [ - "ListOperations" - ] - }, - "ListUsableSubnetworks": { - "methods": [ - "ListUsableSubnetworks" - ] - }, - "RollbackNodePoolUpgrade": { - "methods": [ - "RollbackNodePoolUpgrade" - ] - }, - "SetAddonsConfig": { - "methods": [ - "SetAddonsConfig" - ] - }, - "SetLabels": { - "methods": [ - "SetLabels" - ] - }, - "SetLegacyAbac": { - "methods": [ - "SetLegacyAbac" - ] - }, - "SetLocations": { - "methods": [ - "SetLocations" - ] - }, - "SetLoggingService": { - "methods": [ - "SetLoggingService" - ] - }, - "SetMaintenancePolicy": { - "methods": [ - "SetMaintenancePolicy" - ] - }, - "SetMasterAuth": { - "methods": [ - "SetMasterAuth" - ] - }, - "SetMonitoringService": { - "methods": [ - "SetMonitoringService" - ] - }, - "SetNetworkPolicy": { - "methods": [ - "SetNetworkPolicy" - ] - }, - "SetNodePoolAutoscaling": { - "methods": [ - "SetNodePoolAutoscaling" - ] - }, - "SetNodePoolManagement": { - "methods": [ - "SetNodePoolManagement" - ] - }, - "SetNodePoolSize": { - "methods": [ - "SetNodePoolSize" - ] - }, - "StartIPRotation": { - "methods": [ - "StartIPRotation" - ] - }, - "UpdateCluster": { - "methods": [ - "UpdateCluster" - ] - }, - "UpdateMaster": { - "methods": [ - "UpdateMaster" - ] - }, - "UpdateNodePool": { - "methods": [ - "UpdateNodePool" - ] - } - } - }, - "rest": { - "libraryClient": "ClusterManagerClient", - "rpcs": { - "CancelOperation": { - "methods": [ - "CancelOperation" - ] - }, - "CheckAutopilotCompatibility": { - "methods": [ - "CheckAutopilotCompatibility" - ] - }, - "CompleteIPRotation": { - "methods": [ - "CompleteIPRotation" - ] - }, - "CompleteNodePoolUpgrade": { - "methods": [ - "CompleteNodePoolUpgrade" - ] - }, - "CreateCluster": { - "methods": [ - "CreateCluster" - ] - }, - "CreateNodePool": { - "methods": [ - "CreateNodePool" - ] - }, - "DeleteCluster": { - "methods": [ - "DeleteCluster" - ] - }, - "DeleteNodePool": { - "methods": [ - "DeleteNodePool" - ] - }, - "FetchClusterUpgradeInfo": { - "methods": [ - "FetchClusterUpgradeInfo" - ] - }, - "FetchNodePoolUpgradeInfo": { - "methods": [ - "FetchNodePoolUpgradeInfo" - ] - }, - "GetCluster": { - "methods": [ - "GetCluster" - ] - }, - "GetJSONWebKeys": { - "methods": [ - "GetJSONWebKeys" - ] - }, - "GetNodePool": { - "methods": [ - "GetNodePool" - ] - }, - "GetOperation": { - "methods": [ - "GetOperation" - ] - }, - "GetServerConfig": { - "methods": [ - "GetServerConfig" - ] - }, - "ListClusters": { - "methods": [ - "ListClusters" - ] - }, - "ListNodePools": { - "methods": [ - "ListNodePools" - ] - }, - "ListOperations": { - "methods": [ - "ListOperations" - ] - }, - "ListUsableSubnetworks": { - "methods": [ - "ListUsableSubnetworks" - ] - }, - "RollbackNodePoolUpgrade": { - "methods": [ - "RollbackNodePoolUpgrade" - ] - }, - "SetAddonsConfig": { - "methods": [ - "SetAddonsConfig" - ] - }, - "SetLabels": { - "methods": [ - "SetLabels" - ] - }, - "SetLegacyAbac": { - "methods": [ - "SetLegacyAbac" - ] - }, - "SetLocations": { - "methods": [ - "SetLocations" - ] - }, - "SetLoggingService": { - "methods": [ - "SetLoggingService" - ] - }, - "SetMaintenancePolicy": { - "methods": [ - "SetMaintenancePolicy" - ] - }, - "SetMasterAuth": { - "methods": [ - "SetMasterAuth" - ] - }, - "SetMonitoringService": { - "methods": [ - "SetMonitoringService" - ] - }, - "SetNetworkPolicy": { - "methods": [ - "SetNetworkPolicy" - ] - }, - "SetNodePoolAutoscaling": { - "methods": [ - "SetNodePoolAutoscaling" - ] - }, - "SetNodePoolManagement": { - "methods": [ - "SetNodePoolManagement" - ] - }, - "SetNodePoolSize": { - "methods": [ - "SetNodePoolSize" - ] - }, - "StartIPRotation": { - "methods": [ - "StartIPRotation" - ] - }, - "UpdateCluster": { - "methods": [ - "UpdateCluster" - ] - }, - "UpdateMaster": { - "methods": [ - "UpdateMaster" - ] - }, - "UpdateNodePool": { - "methods": [ - "UpdateNodePool" - ] - } - } - } - } - } - } -} diff --git a/vendor/cloud.google.com/go/container/apiv1/helpers.go b/vendor/cloud.google.com/go/container/apiv1/helpers.go deleted file mode 100644 index ed4df451f4..0000000000 --- a/vendor/cloud.google.com/go/container/apiv1/helpers.go +++ /dev/null @@ -1,105 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Code generated by protoc-gen-go_gapic. DO NOT EDIT. - -package container - -import ( - "context" - "fmt" - "io" - "log/slog" - "net/http" - - "github.com/googleapis/gax-go/v2/internallog" - "github.com/googleapis/gax-go/v2/internallog/grpclog" - "google.golang.org/api/googleapi" - "google.golang.org/api/option" - "google.golang.org/grpc" - "google.golang.org/protobuf/proto" - "google.golang.org/protobuf/runtime/protoimpl" -) - -const serviceName = "container.googleapis.com" - -var protoVersion = fmt.Sprintf("1.%d", protoimpl.MaxVersion) - -// For more information on implementing a client constructor hook, see -// https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. -type clientHookParams struct{} -type clientHook func(context.Context, clientHookParams) ([]option.ClientOption, error) - -var versionClient string - -func getVersionClient() string { - if versionClient == "" { - return "UNKNOWN" - } - return versionClient -} - -// DefaultAuthScopes reports the default set of authentication scopes to use with this package. -func DefaultAuthScopes() []string { - return []string{ - "https://www.googleapis.com/auth/cloud-platform", - } -} - -func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { - logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) - resp, err := client.Do(req) - if err != nil { - return nil, nil, err - } - defer resp.Body.Close() - buf, err := io.ReadAll(resp.Body) - if err != nil { - return nil, nil, err - } - logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, buf)) - if err = googleapi.CheckResponseWithBody(resp, buf); err != nil { - return nil, nil, err - } - return buf, resp, nil -} - -func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { - buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) - return buf, err -} - -func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { - logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) - resp, err := client.Do(req) - if err != nil { - return nil, err - } - logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) - if err = googleapi.CheckResponse(resp); err != nil { - return nil, err - } - return resp, nil -} - -func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { - var zero O - logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) - resp, err := fn(ctx, req, opts...) - if err != nil { - return zero, err - } - logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) - return resp, err -} diff --git a/vendor/cloud.google.com/go/container/apiv1/version.go b/vendor/cloud.google.com/go/container/apiv1/version.go deleted file mode 100644 index b26e8af19c..0000000000 --- a/vendor/cloud.google.com/go/container/apiv1/version.go +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Code generated by gapicgen. DO NOT EDIT. - -package container - -import "cloud.google.com/go/container/internal" - -func init() { - versionClient = internal.Version -} diff --git a/vendor/cloud.google.com/go/container/internal/version.go b/vendor/cloud.google.com/go/container/internal/version.go deleted file mode 100644 index a50ed3d151..0000000000 --- a/vendor/cloud.google.com/go/container/internal/version.go +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Code generated by gapicgen. DO NOT EDIT. - -package internal - -// Version is the current tagged release of the library. -const Version = "1.49.0" diff --git a/vendor/cloud.google.com/go/debug.md b/vendor/cloud.google.com/go/debug.md deleted file mode 100644 index 052962e343..0000000000 --- a/vendor/cloud.google.com/go/debug.md +++ /dev/null @@ -1,271 +0,0 @@ -# Logging, Debugging and Telemetry - -**Warning: The OpenCensus project is obsolete and was archived on July 31st, -2023.** This means that any security vulnerabilities that are found will not be -patched. We recommend that you migrate from OpenCensus tracing to -OpenTelemetry, the successor project. See [OpenCensus](#opencensus) below for -details. - -Logging, debugging and telemetry all capture data that can be used for -troubleshooting. Logging records specific events and transactions. Debugging -exposes values for immediate analysis. Telemetry is suitable for production use -and can serve both logging and monitoring purposes. Telemetry tracing follows -requests through a system to provide a view of component interactions. Telemetry -metrics collects data for significant performance indicators, offering insights -into a system's health. - -## Logging and debugging - -While working with the Go Client Libraries you may run into some situations -where you need a deeper level of understanding about what is going on in order -to solve your problem. Here are some tips and tricks that you can use in these -cases. *Note* that many of the tips in this section will have a performance -impact and are therefore not recommended for sustained production use. Use these -tips locally or in production for a *limited time* to help get a better -understanding of what is going on. - -### Request/Response Logging - -To enable logging for all outgoing requests from the Go Client Libraries, set -the environment variable `GOOGLE_SDK_GO_LOGGING_LEVEL` to `debug`. Currently all -logging is at the debug level, but this is likely to change in the future. - -*Caution*: Debug level logging should only be used in a limited manner. Debug -level logs contain sensitive information, including headers, request/response -payloads, and authentication tokens. Additionally, enabling logging at this -level will have a minor performance impact. - -### HTTP based clients - -All of our auto-generated clients have a constructor to create a client that -uses HTTP/JSON instead of gRPC. Additionally a couple of our hand-written -clients like Storage and Bigquery are also HTTP based. Here are some tips for -debugging these clients. - -#### Try setting Go's HTTP debug variable - -Try setting the following environment variable for verbose Go HTTP logging: -GODEBUG=http2debug=1. To read more about this feature please see the godoc for -[net/http](https://pkg.go.dev/net/http). - -*WARNING*: Enabling this debug variable will log headers and payloads which may -contain private information. - -### gRPC based clients - -#### Try setting grpc-go's debug variables - -Try setting the following environment variables for grpc-go: -`GRPC_GO_LOG_VERBOSITY_LEVEL=99` `GRPC_GO_LOG_SEVERITY_LEVEL=info`. These are -good for diagnosing connection level failures. For more information please see -[grpc-go's debug documentation](https://pkg.go.dev/google.golang.org/grpc/examples/features/debugging#section-readme). - -## Telemetry - -**Warning: The OpenCensus project is obsolete and was archived on July 31st, -2023.** This means that any security vulnerabilities that are found will not be -patched. We recommend that you migrate from OpenCensus tracing to -OpenTelemetry, the successor project. The default experimental tracing support -for OpenCensus is now deprecated in the Google Cloud client libraries for Go. -See [OpenCensus](#opencensus) below for details. - -The Google Cloud client libraries for Go now use the -[OpenTelemetry](https://opentelemetry.io/docs/what-is-opentelemetry/) project. -The transition from OpenCensus to OpenTelemetry is covered in the following -sections. - -### Tracing (experimental) - -Apart from spans created by underlying libraries such as gRPC, Google Cloud Go -generated clients do not create spans. Only the spans created by following -hand-written clients are in scope for the discussion in this section: - -* [cloud.google.com/go/bigquery](https://pkg.go.dev/cloud.google.com/go/bigquery) -* [cloud.google.com/go/bigtable](https://pkg.go.dev/cloud.google.com/go/bigtable) -* [cloud.google.com/go/datastore](https://pkg.go.dev/cloud.google.com/go/datastore) -* [cloud.google.com/go/firestore](https://pkg.go.dev/cloud.google.com/go/firestore) -* [cloud.google.com/go/spanner](https://pkg.go.dev/cloud.google.com/go/spanner) -* [cloud.google.com/go/storage](https://pkg.go.dev/cloud.google.com/go/storage) - -Currently, the spans created by these clients are for OpenTelemetry. OpenCensus -users are urged to transition to OpenTelemetry as soon as possible, as explained -in the next section. - -#### OpenCensus - -**Warning: The OpenCensus project is obsolete and was archived on July 31st, -2023.** This means that any security vulnerabilities that are found will not be -patched. We recommend that you migrate from OpenCensus tracing to -OpenTelemetry, the successor project. The default experimental tracing support -for OpenCensus is now deprecated in the Google Cloud client libraries for Go. - -Using the [OpenTelemetry-Go - OpenCensus Bridge](https://pkg.go.dev/go.opentelemetry.io/otel/bridge/opencensus), you can immediately begin exporting your traces with OpenTelemetry, even while -dependencies of your application remain instrumented with OpenCensus. If you do -not use the bridge, you will need to migrate your entire application and all of -its instrumented dependencies at once. For simple applications, this may be -possible, but we expect the bridge to be helpful if multiple libraries with -instrumentation are used. - -On May 29, 2024, six months after the -[release](https://github.com/googleapis/google-cloud-go/releases/tag/v0.111.0) -of experimental, opt-in support for OpenTelemetry tracing, the default tracing -support in the clients above was changed from OpenCensus to OpenTelemetry, and -the experimental OpenCensus support was marked as deprecated. - -On December 2nd, 2024, one year after the release of OpenTelemetry support, the -experimental and deprecated support for OpenCensus tracing was removed. - -Please note that all Google Cloud Go clients currently provide experimental -support for the propagation of both OpenCensus and OpenTelemetry trace context -to their receiving endpoints. The experimental support for OpenCensus trace -context propagation will be removed soon. - -Please refer to the following resources: - -* [Sunsetting OpenCensus](https://opentelemetry.io/blog/2023/sunsetting-opencensus/) -* [OpenTelemetry-Go - OpenCensus Bridge](https://pkg.go.dev/go.opentelemetry.io/otel/bridge/opencensus) - -#### OpenTelemetry - -The default experimental tracing support for OpenCensus is now deprecated in the -Google Cloud client libraries for Go. - -On May 29, 2024, the default experimental tracing support in the Google Cloud -client libraries for Go was changed from OpenCensus to OpenTelemetry. - -**Warning: OpenTelemetry-Go ensures -[compatibility](https://github.com/open-telemetry/opentelemetry-go/tree/main?tab=readme-ov-file#compatibility) -with ONLY the current supported versions of the [Go -language](https://go.dev/doc/devel/release#policy). This support may be narrower -than the support that has been offered historically by the Go Client Libraries. -Ensure that your Go runtime version is supported by the OpenTelemetry-Go -[compatibility](https://github.com/open-telemetry/opentelemetry-go/tree/main?tab=readme-ov-file#compatibility) -policy before enabling OpenTelemetry instrumentation.** - -Please refer to the following resources: - -* [What is OpenTelemetry?](https://opentelemetry.io/docs/what-is-opentelemetry/) -* [Cloud Trace - Go and OpenTelemetry](https://cloud.google.com/trace/docs/setup/go-ot) -* On GCE, [use Ops Agent and OpenTelemetry](https://cloud.google.com/trace/docs/otlp) - -##### Configuring the OpenTelemetry-Go - OpenCensus Bridge - -To configure the OpenCensus bridge with OpenTelemetry and Cloud Trace: - -```go -import ( - "context" - "log" - "os" - texporter "github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/trace" - octrace "go.opencensus.io/trace" - "go.opentelemetry.io/contrib/detectors/gcp" - "go.opentelemetry.io/otel" - "go.opentelemetry.io/otel/bridge/opencensus" - "go.opentelemetry.io/otel/sdk/resource" - sdktrace "go.opentelemetry.io/otel/sdk/trace" - semconv "go.opentelemetry.io/otel/semconv/v1.7.0" -) - -func main() { - // Create exporter. - ctx := context.Background() - projectID := os.Getenv("GOOGLE_CLOUD_PROJECT") - exporter, err := texporter.New(texporter.WithProjectID(projectID)) - if err != nil { - log.Fatalf("texporter.New: %v", err) - } - // Identify your application using resource detection - res, err := resource.New(ctx, - // Use the GCP resource detector to detect information about the GCP platform - resource.WithDetectors(gcp.NewDetector()), - // Keep the default detectors - resource.WithTelemetrySDK(), - // Add your own custom attributes to identify your application - resource.WithAttributes( - semconv.ServiceNameKey.String("my-application"), - ), - ) - if err != nil { - log.Fatalf("resource.New: %v", err) - } - // Create trace provider with the exporter. - // - // By default it uses AlwaysSample() which samples all traces. - // In a production environment or high QPS setup please use - // probabilistic sampling. - // Example: - // tp := sdktrace.NewTracerProvider(sdktrace.WithSampler(sdktrace.TraceIDRatioBased(0.0001)), ...) - tp := sdktrace.NewTracerProvider( - sdktrace.WithBatcher(exporter), - sdktrace.WithResource(res), - ) - defer tp.Shutdown(ctx) // flushes any pending spans, and closes connections. - otel.SetTracerProvider(tp) - tracer := otel.GetTracerProvider().Tracer("example.com/trace") - // Configure the OpenCensus tracer to use the bridge. - octrace.DefaultTracer = opencensus.NewTracer(tracer) - // Use otel tracer to create spans... -} - -``` - -##### Configuring context propagation - -In order to pass options to OpenTelemetry trace context propagation, follow the -appropriate example for the client's underlying transport. - -###### Passing options in HTTP-based clients - -```go -ctx := context.Background() -trans, err := htransport.NewTransport(ctx, - http.DefaultTransport, - option.WithScopes(storage.ScopeFullControl), -) -if err != nil { - log.Fatal(err) -} -// An example of passing options to the otelhttp.Transport. -otelOpts := otelhttp.WithFilter(func(r *http.Request) bool { - return r.URL.Path != "/ping" -}) -hc := &http.Client{ - Transport: otelhttp.NewTransport(trans, otelOpts), -} -client, err := storage.NewClient(ctx, option.WithHTTPClient(hc)) -``` - -Note that scopes must be set manually in this user-configured solution. - -###### Passing options in gRPC-based clients - -```go -projectID := "..." -ctx := context.Background() - -// An example of passing options to grpc.WithStatsHandler. -otelOpts := otelgrpc.WithMessageEvents(otelgrpc.ReceivedEvents) -dialOpts := grpc.WithStatsHandler(otelgrpc.NewClientHandler(otelOpts)) - -ctx := context.Background() -c, err := datastore.NewClient(ctx, projectID, option.WithGRPCDialOption(dialOpts)) -if err != nil { - log.Fatal(err) -} -defer c.Close() -``` - -### Metrics (experimental) - -The generated clients do not create metrics. Only the following hand-written -clients create experimental OpenCensus metrics: - -* [cloud.google.com/go/bigquery](https://pkg.go.dev/cloud.google.com/go/bigquery) -* [cloud.google.com/go/pubsub](https://pkg.go.dev/cloud.google.com/go/pubsub) -* [cloud.google.com/go/spanner](https://pkg.go.dev/cloud.google.com/go/spanner) - -#### OpenTelemetry - -The transition of the experimental metrics in the clients above from OpenCensus -to OpenTelemetry is still TBD. \ No newline at end of file diff --git a/vendor/cloud.google.com/go/doc.go b/vendor/cloud.google.com/go/doc.go deleted file mode 100644 index 4c75de36f4..0000000000 --- a/vendor/cloud.google.com/go/doc.go +++ /dev/null @@ -1,289 +0,0 @@ -// Copyright 2014 Google LLC -// -// Licensed under the Apache License, Version 2.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. - -/* -Package cloud is the root of the packages used to access Google Cloud -Services. See https://pkg.go.dev/cloud.google.com/go#section-directories for a -full list of sub-modules. - -# Client Options - -All clients in sub-packages are configurable via client options. These options -are described here: https://pkg.go.dev/google.golang.org/api/option. - -# Endpoint Override - -Endpoint configuration is used to specify the URL to which requests are -sent. It is used for services that support or require regional endpoints, as -well as for other use cases such as [testing against fake servers]. - -For example, the Vertex AI service recommends that you configure the endpoint to -the location with the features you want that is closest to your physical -location or the location of your users. There is no global endpoint for Vertex -AI. See [Vertex AI - Locations] for more details. The following example -demonstrates configuring a Vertex AI client with a regional endpoint: - - ctx := context.Background() - endpoint := "us-central1-aiplatform.googleapis.com:443" - client, err := aiplatform.NewDatasetClient(ctx, option.WithEndpoint(endpoint)) - -# Authentication and Authorization - -All of the clients support authentication via [Google Application Default Credentials], -or by providing a JSON key file for a Service Account. See examples below. - -Google Application Default Credentials (ADC) is the recommended way to authorize -and authenticate clients. For information on how to create and obtain -Application Default Credentials, see -https://cloud.google.com/docs/authentication/production. If you have your -environment configured correctly you will not need to pass any extra information -to the client libraries. Here is an example of a client using ADC to -authenticate: - - client, err := secretmanager.NewClient(context.Background()) - if err != nil { - // TODO: handle error. - } - _ = client // Use the client. - -You can use a file with credentials to authenticate and authorize, such as a -JSON key file associated with a Google service account. Service Account keys can -be created and downloaded from https://console.cloud.google.com/iam-admin/serviceaccounts. -This example uses the Secret Manger client, but the same steps apply to the -all other client libraries this package as well. Example: - - client, err := secretmanager.NewClient(context.Background(), - option.WithCredentialsFile("/path/to/service-account-key.json")) - if err != nil { - // TODO: handle error. - } - _ = client // Use the client. - -In some cases (for instance, you don't want to store secrets on disk), you can -create credentials from in-memory JSON and use the WithCredentials option. -This example uses the Secret Manager client, but the same steps apply to -all other client libraries as well. Note that scopes can be -found at https://developers.google.com/identity/protocols/oauth2/scopes, and -are also provided in all auto-generated libraries: for example, -cloud.google.com/go/secretmanager/apiv1 provides DefaultAuthScopes. Example: - - ctx := context.Background() - // https://pkg.go.dev/cloud.google.com/go/auth/credentials - creds, err := credentials.DetectDefault(&credentials.DetectOptions{ - Scopes: secretmanager.DefaultAuthScopes(), - CredentialsJSON: []byte("JSON creds") - }), secretmanager.DefaultAuthScopes()...) - if err != nil { - // TODO: handle error. - } - client, err := secretmanager.NewClient(ctx, option.WithAuthCredentials(creds)) - if err != nil { - // TODO: handle error. - } - _ = client // Use the client. - -# Timeouts and Cancellation - -By default, non-streaming methods, like Create or Get, will have a default -deadline applied to the context provided at call time, unless a context deadline -is already set. Streaming methods have no default deadline and will run -indefinitely. To set timeouts or arrange for cancellation, use -[context]. Transient errors will be retried when correctness allows. - -Here is an example of setting a timeout for an RPC using -[context.WithTimeout]: - - ctx := context.Background() - // Do not set a timeout on the context passed to NewClient: dialing happens - // asynchronously, and the context is used to refresh credentials in the - // background. - client, err := secretmanager.NewClient(ctx) - if err != nil { - // TODO: handle error. - } - // Time out if it takes more than 10 seconds to create a dataset. - tctx, cancel := context.WithTimeout(ctx, 10*time.Second) - defer cancel() // Always call cancel. - - req := &secretmanagerpb.DeleteSecretRequest{Name: "projects/project-id/secrets/name"} - if err := client.DeleteSecret(tctx, req); err != nil { - // TODO: handle error. - } - -Here is an example of setting a timeout for an RPC using -[github.com/googleapis/gax-go/v2.WithTimeout]: - - ctx := context.Background() - // Do not set a timeout on the context passed to NewClient: dialing happens - // asynchronously, and the context is used to refresh credentials in the - // background. - client, err := secretmanager.NewClient(ctx) - if err != nil { - // TODO: handle error. - } - - req := &secretmanagerpb.DeleteSecretRequest{Name: "projects/project-id/secrets/name"} - // Time out if it takes more than 10 seconds to create a dataset. - if err := client.DeleteSecret(tctx, req, gax.WithTimeout(10*time.Second)); err != nil { - // TODO: handle error. - } - -Here is an example of how to arrange for an RPC to be canceled, use -[context.WithCancel]: - - ctx := context.Background() - // Do not cancel the context passed to NewClient: dialing happens asynchronously, - // and the context is used to refresh credentials in the background. - client, err := secretmanager.NewClient(ctx) - if err != nil { - // TODO: handle error. - } - cctx, cancel := context.WithCancel(ctx) - defer cancel() // Always call cancel. - - // TODO: Make the cancel function available to whatever might want to cancel the - // call--perhaps a GUI button. - req := &secretmanagerpb.DeleteSecretRequest{Name: "projects/proj/secrets/name"} - if err := client.DeleteSecret(cctx, req); err != nil { - // TODO: handle error. - } - -Do not attempt to control the initial connection (dialing) of a service by -setting a timeout on the context passed to NewClient. Dialing is non-blocking, -so timeouts would be ineffective and would only interfere with credential -refreshing, which uses the same context. - -# Headers - -Regardless of which transport is used, request headers can be set in the same -way using [`callctx.SetHeaders`][setheaders]. - -Here is a generic example: - - // Set the header "key" to "value". - ctx := callctx.SetHeaders(context.Background(), "key", "value") - - // Then use ctx in a subsequent request. - response, err := client.GetSecret(ctx, request) - -# Google-reserved headers - -There are a some header keys that Google reserves for internal use that must -not be ovewritten. The following header keys are broadly considered reserved -and should not be conveyed by client library users unless instructed to do so: - -* `x-goog-api-client` -* `x-goog-request-params` - -Be sure to check the individual package documentation for other service-specific -reserved headers. For example, Storage supports a specific auditing header that -is mentioned in that [module's documentation][storagedocs]. - -# Google Cloud system parameters - -Google Cloud services respect [system parameters][system parameters] that can be -used to augment request and/or response behavior. For the most part, they are -not needed when using one of the enclosed client libraries. However, those that -may be necessary are made available via the [`callctx`][callctx] package. If not -present there, consider opening an issue on that repo to request a new constant. - -# Connection Pooling - -Connection pooling differs in clients based on their transport. Cloud -clients either rely on HTTP or gRPC transports to communicate -with Google Cloud. - -Cloud clients that use HTTP rely on the underlying HTTP transport to cache -connections for later re-use. These are cached to the http.MaxIdleConns -and http.MaxIdleConnsPerHost settings in http.DefaultTransport by default. - -For gRPC clients, connection pooling is configurable. Users of Cloud Client -Libraries may specify [google.golang.org/api/option.WithGRPCConnectionPool] -as a client option to NewClient calls. This configures the underlying gRPC -connections to be pooled and accessed in a round robin fashion. - -# Using the Libraries in Container environments(Docker) - -Minimal container images like Alpine lack CA certificates. This causes RPCs to -appear to hang, because gRPC retries indefinitely. See -https://github.com/googleapis/google-cloud-go/issues/928 for more information. - -# Debugging - -For tips on how to write tests against code that calls into our libraries check -out our [Debugging Guide]. - -# Testing - -For tips on how to write tests against code that calls into our libraries check -out our [Testing Guide]. - -# Inspecting errors - -Most of the errors returned by the generated clients are wrapped in an -[github.com/googleapis/gax-go/v2/apierror.APIError] and can be further unwrapped -into a [google.golang.org/grpc/status.Status] or -[google.golang.org/api/googleapi.Error] depending on the transport used to make -the call (gRPC or REST). Converting your errors to these types can be a useful -way to get more information about what went wrong while debugging. - -APIError gives access to specific details in the error. The transport-specific -errors can still be unwrapped using the APIError. - - if err != nil { - var ae *apierror.APIError - if errors.As(err, &ae) { - log.Println(ae.Reason()) - log.Println(ae.Details().Help.GetLinks()) - } - // If a gRPC transport was used you can extract the - // google.golang.org/grpc/status.Status from the error - s := ae.GRPCStatus() - log.Println(s.Code()) - } - -# Client Stability - -Semver is used to communicate stability of the sub-modules of this package. -Note, some stable sub-modules do contain packages, and sometimes features, that -are considered unstable. If something is unstable it will be explicitly labeled -as such. Example of package does in an unstable package: - - NOTE: This package is in beta. It is not stable, and may be subject to changes. - -Clients that contain alpha and beta in their import path may change or go away -without notice. - -Clients marked stable will maintain compatibility with future versions for as -long as we can reasonably sustain. Incompatible changes might be made in some -situations, including: - - - Security bugs may prompt backwards-incompatible changes. - - Situations in which components are no longer feasible to maintain without - making breaking changes, including removal. - - Parts of the client surface may be outright unstable and subject to change. - These parts of the surface will be labeled with the note, "It is EXPERIMENTAL - and subject to change or removal without notice." - -[testing against fake servers]: https://github.com/googleapis/google-cloud-go/blob/main/testing.md#testing-grpc-services-using-fakes -[Vertex AI - Locations]: https://cloud.google.com/vertex-ai/docs/general/locations -[Google Application Default Credentials]: https://cloud.google.com/docs/authentication/external/set-up-adc -[Testing Guide]: https://github.com/googleapis/google-cloud-go/blob/main/testing.md -[Debugging Guide]: https://github.com/googleapis/google-cloud-go/blob/main/debug.md -[callctx]: https://pkg.go.dev/github.com/googleapis/gax-go/v2/callctx#pkg-constants -[setheaders]: https://pkg.go.dev/github.com/googleapis/gax-go/v2/callctx#SetHeaders -[storagedocs]: https://pkg.go.dev/cloud.google.com/go/storage#hdr-Sending_Custom_Headers -[system parameters]: https://cloud.google.com/apis/docs/system-parameters -*/ -package cloud // import "cloud.google.com/go" diff --git a/vendor/cloud.google.com/go/go.work b/vendor/cloud.google.com/go/go.work deleted file mode 100644 index fc77cf320f..0000000000 --- a/vendor/cloud.google.com/go/go.work +++ /dev/null @@ -1,201 +0,0 @@ -go 1.24.0 - -use ( - . - ./accessapproval - ./accesscontextmanager - ./advisorynotifications - ./ai - ./aiplatform - ./alloydb - ./analytics - ./apigateway - ./apigeeconnect - ./apigeeregistry - ./apihub - ./apikeys - ./appengine - ./apphub - ./apps - ./area120 - ./artifactregistry - ./asset - ./assuredworkloads - ./auth - ./auth/oauth2adapt - ./automl - ./backupdr - ./baremetalsolution - ./batch - ./beyondcorp - ./bigquery - ./bigquery/v2 - ./bigtable - ./billing - ./binaryauthorization - ./capacityplanner - ./certificatemanager - ./channel - ./chat - ./chronicle - ./cloudbuild - ./cloudcontrolspartner - ./clouddms - ./cloudprofiler - ./cloudquotas - ./cloudtasks - ./commerce - ./compute - ./compute/metadata - ./confidentialcomputing - ./config - ./configdelivery - ./contactcenterinsights - ./container - ./containeranalysis - ./datacatalog - ./dataflow - ./dataform - ./datafusion - ./datalabeling - ./dataplex - ./dataproc - ./dataqna - ./datastore - ./datastream - ./deploy - ./developerconnect - ./devicestreaming - ./dialogflow - ./discoveryengine - ./dlp - ./documentai - ./domains - ./edgecontainer - ./edgenetwork - ./errorreporting - ./essentialcontacts - ./eventarc - ./filestore - ./financialservices - ./firestore - ./functions - ./geminidataanalytics - ./gkebackup - ./gkeconnect - ./gkehub - ./gkemulticloud - ./grafeas - ./gsuiteaddons - ./iam - ./iap - ./identitytoolkit - ./ids - ./internal/actions - ./internal/aliasfix - ./internal/aliasgen - ./internal/carver - ./internal/examples/fake - ./internal/examples/mock - ./internal/gapicgen - ./internal/generated/snippets - ./internal/godocfx - ./internal/librariangen - ./internal/postprocessor - ./internal/protoveneer - ./internal/stategen - ./iot - ./kms - ./language - ./licensemanager - ./lifesciences - ./locationfinder - ./logging - ./longrunning - ./lustre - ./maintenance - ./managedidentities - ./managedkafka - ./maps - ./mediatranslation - ./memcache - ./memorystore - ./metastore - ./migrationcenter - ./modelarmor - ./monitoring - ./netapp - ./networkconnectivity - ./networkmanagement - ./networksecurity - ./networkservices - ./notebooks - ./optimization - ./oracledatabase - ./orchestration - ./orgpolicy - ./osconfig - ./oslogin - ./parallelstore - ./parametermanager - ./phishingprotection - ./policysimulator - ./policytroubleshooter - ./privatecatalog - ./privilegedaccessmanager - ./profiler - ./pubsub - ./pubsub/v2 - ./pubsublite - ./rapidmigrationassessment - ./recaptchaenterprise - ./recommendationengine - ./recommender - ./redis - ./resourcemanager - ./retail - ./run - ./scheduler - ./secretmanager - ./securesourcemanager - ./security - ./securitycenter - ./securitycentermanagement - ./securityposture - ./servicecontrol - ./servicedirectory - ./servicehealth - ./servicemanagement - ./serviceusage - ./shell - ./shopping - ./spanner - ./spanner/benchmarks - ./spanner/test/opentelemetry/test - ./speech - ./storage - ./storage/internal/benchmarks - ./storagebatchoperations - ./storageinsights - ./storagetransfer - ./streetview - ./support - ./talent - ./telcoautomation - ./texttospeech - ./tpu - ./trace - ./translate - ./vertexai - ./video - ./videointelligence - ./vision - ./visionai - ./vmmigration - ./vmwareengine - ./vpcaccess - ./webrisk - ./websecurityscanner - ./workflows - ./workstations -) diff --git a/vendor/cloud.google.com/go/go.work.sum b/vendor/cloud.google.com/go/go.work.sum deleted file mode 100644 index 0fff97d259..0000000000 --- a/vendor/cloud.google.com/go/go.work.sum +++ /dev/null @@ -1,278 +0,0 @@ -cloud.google.com/go/auth v0.2.0/go.mod h1:+yb+oy3/P0geX6DLKlqiGHARGR6EX2GRtYCzWOCQSbU= -cloud.google.com/go/auth/oauth2adapt v0.2.0/go.mod h1:AfqujpDAlTfLfeCIl/HJZZlIxD8+nJoZ5e0x1IxGq5k= -cloud.google.com/go/dataproc v1.12.0 h1:W47qHL3W4BPkAIbk4SWmIERwsWBaNnWm0P2sdx3YgGU= -cloud.google.com/go/gaming v1.9.0 h1:7vEhFnZmd931Mo7sZ6pJy7uQPDxF7m7v8xtBheG08tc= -cloud.google.com/go/gaming v1.10.1 h1:5qZmZEWzMf8GEFgm9NeC3bjFRpt7x4S6U7oLbxaf7N8= -cloud.google.com/go/resourcesettings v1.8.3 h1:13HOFU7v4cEvIHXSAQbinF4wp2Baybbq7q9FMctg1Ek= -codeberg.org/go-fonts/liberation v0.5.0/go.mod h1:zS/2e1354/mJ4pGzIIaEtm/59VFCFnYC7YV6YdGl5GU= -codeberg.org/go-latex/latex v0.1.0/go.mod h1:LA0q/AyWIYrqVd+A9Upkgsb+IqPcmSTKc9Dny04MHMw= -codeberg.org/go-pdf/fpdf v0.10.0/go.mod h1:Y0DGRAdZ0OmnZPvjbMp/1bYxmIPxm0ws4tfoPOc4LjU= -dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9 h1:VpgP7xuJadIUuKccphEpTJnWhS2jkQyMt6Y7pJCD7fY= -gioui.org v0.0.0-20210308172011-57750fc8a0a6 h1:K72hopUosKG3ntOPNG4OzzbuhxGuVf06fa2la1/H/Ho= -git.sr.ht/~sbinet/gg v0.3.1 h1:LNhjNn8DerC8f9DHLz6lS0YYul/b602DUxDgGkd/Aik= -git.sr.ht/~sbinet/gg v0.6.0/go.mod h1:uucygbfC9wVPQIfrmwM2et0imr8L7KQWywX0xpFMm94= -github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ= -github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802 h1:1BDTz0u9nC3//pOCMdNH+CiXJVYJh5UQNCOBG7jbELc= -github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.18.0 h1:ugYJK/neZQtQeh2jc5xNoDFiMQojlAkoqJMRb7vTu1U= -github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.18.0/go.mod h1:Xx0VKh7GJ4si3rmElbh19Mejxz68ibWg/J30ZOMrqzU= -github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.23.0/go.mod h1:p2puVVSKjQ84Qb1gzw2XHLs34WQyHTYFZLaVxypAFYs= -github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.29.0/go.mod h1:Cz6ft6Dkn3Et6l2v2a9/RpN7epQ1GtDlO6lj8bEcOvw= -github.com/JohnCGriffin/overflow v0.0.0-20211019200055-46fa312c352c h1:RGWPOewvKIROun94nF7v2cua9qP+thov/7M50KEoeSU= -github.com/Masterminds/goutils v1.1.1 h1:5nUrii3FMTL5diU80unEVvNevw1nH4+ZV4DSLVJLSYI= -github.com/Masterminds/goutils v1.1.1/go.mod h1:8cTjp+g8YejhMuvIA5y2vz3BpJxksy863GQaJW2MFNU= -github.com/Masterminds/semver/v3 v3.2.0 h1:3MEsd0SM6jqZojhjLWWeBY+Kcjy9i6MQAeY7YgDP83g= -github.com/Masterminds/semver/v3 v3.2.0/go.mod h1:qvl/7zhW3nngYb5+80sSMF+FG2BjYrf8m9wsX0PNOMQ= -github.com/Masterminds/sprig/v3 v3.2.3 h1:eL2fZNezLomi0uOLqjQoN6BfsDD+fyLtgbJMAj9n6YA= -github.com/Masterminds/sprig/v3 v3.2.3/go.mod h1:rXcFaZ2zZbLRJv/xSysmlgIM1u11eBaRMhvYXJNkGuM= -github.com/OneOfOne/xxhash v1.2.2 h1:KMrpdQIwFcEqXDklaen+P1axHaj9BSKzvpUUfnHldSE= -github.com/ajstarks/deck v0.0.0-20200831202436-30c9fc6549a9 h1:7kQgkwGRoLzC9K0oyXdJo7nve/bynv/KwUsxbiTlzAM= -github.com/ajstarks/deck/generate v0.0.0-20210309230005-c3f852c02e19 h1:iXUgAaqDcIUGbRoy2TdeofRG/j1zpGRSEmNK05T+bi8= -github.com/ajstarks/svgo v0.0.0-20211024235047-1546f124cd8b h1:slYM766cy2nI3BwyRiyQj/Ud48djTMtMebDqepE95rw= -github.com/alecthomas/assert/v2 v2.3.0 h1:mAsH2wmvjsuvyBvAmCtm7zFsBlb8mIHx5ySLVdDZXL0= -github.com/alecthomas/participle/v2 v2.1.0 h1:z7dElHRrOEEq45F2TG5cbQihMtNTv8vwldytDj7Wrz4= -github.com/alecthomas/repr v0.2.0 h1:HAzS41CIzNW5syS8Mf9UwXhNH1J9aix/BvDRf1Ml2Yk= -github.com/andybalholm/brotli v1.0.5 h1:8uQZIdzKmjc/iuPu7O2ioW48L81FgatrcpfFmiq/cCs= -github.com/antihax/optional v1.0.0 h1:xK2lYat7ZLaVVcIuj82J8kIro4V6kDe0AUDFboUCwcg= -github.com/apache/arrow/go/v12 v12.0.0 h1:xtZE63VWl7qLdB0JObIXvvhGjoVNrQ9ciIHG2OK5cmc= -github.com/apache/thrift v0.17.0 h1:cMd2aj52n+8VoAtvSvLn4kDC3aZ6IAkBuqWQ2IDu7wo= -github.com/aws/aws-sdk-go-v2 v1.16.10 h1:+yDD0tcuHRQZgqONkpDwzepqmElQaSlFPymHRHR9mrc= -github.com/aws/aws-sdk-go-v2 v1.16.10/go.mod h1:WTACcleLz6VZTp7fak4EO5b9Q4foxbn+8PIz3PmyKlo= -github.com/aws/aws-sdk-go-v2/config v1.15.9 h1:TK5yNEnFDQ9iaO04gJS/3Y+eW8BioQiCUafW75/Wc3Q= -github.com/aws/aws-sdk-go-v2/config v1.15.9/go.mod h1:rv/l/TbZo67kp99v/3Kb0qV6Fm1KEtKyruEV2GvVfgs= -github.com/aws/aws-sdk-go-v2/credentials v1.12.12 h1:iShu6VaWZZZfUZvlGtRjl+g1lWk44g1QmiCTD4KS0jI= -github.com/aws/aws-sdk-go-v2/credentials v1.12.12/go.mod h1:vFHC2HifIWHebmoVsfpqliKuqbAY2LaVlvy03JzF4c4= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.12.11 h1:zZHPdM2x09/0F8D7XyVvQnP2/jaW7bEMmtcSCPYq/iI= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.12.11/go.mod h1:38Asv/UyQbDNpSXCurZRlDMjzIl6J+wUe8vY3TtUuzA= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.17 h1:U8DZvyFFesBmK62dYC6BRXm4Cd/wPP3aPcecu3xv/F4= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.17/go.mod h1:6qtGip7sJEyvgsLjphRZWF9qPe3xJf1mL/MM01E35Wc= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.11 h1:GMp98usVW5tzQhxd26KWhoNQPlR2noIlfbzqjVGBhLU= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.11/go.mod h1:cYAfnB+9ZkmZWpQWmPDsuIGm4EA+6k2ZVtxKjw/XJBY= -github.com/aws/aws-sdk-go-v2/internal/ini v1.3.18 h1:/spg6h3tG4pefphbvhpgdMtFMegSajPPSEJd1t8lnpc= -github.com/aws/aws-sdk-go-v2/internal/ini v1.3.18/go.mod h1:hTHq8hL4bAxJyng364s9d4IUGXZOs7Y5LSqAhIiIQ2A= -github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.18.3 h1:PK6c4wYv3wbb88eH0X0FjJwRykEoJwAesuslNReY7iE= -github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.18.3/go.mod h1:BrAJyOMrnwzYVQcP5ziqlCpnEuFfkNppZLzqDyW/YTg= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.11 h1:GkYtp4gi4wdWUV+pPetjk5y2aDxbr0t8n5OjVBwZdII= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.11/go.mod h1:OEofCUKF7Hri4ShOCokF6k6hGq9PCB2sywt/9rLSXjY= -github.com/aws/aws-sdk-go-v2/service/sso v1.11.15 h1:HaIE5/TtKr66qZTJpvMifDxH4lRt2JZawbkLYOo1F+Y= -github.com/aws/aws-sdk-go-v2/service/sso v1.11.15/go.mod h1:dDVD4ElJRTQXx7dOQ59EkqGyNU9tnwy1RKln+oLIOTU= -github.com/aws/aws-sdk-go-v2/service/sts v1.16.12 h1:YU9UHPukkCCnETHEExOptF/BxPvGJKXO/NBx+RMQ/2A= -github.com/aws/aws-sdk-go-v2/service/sts v1.16.12/go.mod h1:b53qpmhHk7mTL2J/tfG6f38neZiyBQSiNXGCuNKq4+4= -github.com/aws/smithy-go v1.12.1 h1:yQRC55aXN/y1W10HgwHle01DRuV9Dpf31iGkotjt3Ag= -github.com/aws/smithy-go v1.12.1/go.mod h1:Tg+OJXh4MB2R/uN61Ko2f6hTZwB/ZYGOtib8J3gBHzA= -github.com/bazelbuild/rules_go v0.49.0 h1:5vCbuvy8Q11g41lseGJDc5vxhDjJtfxr6nM/IC4VmqM= -github.com/boombuler/barcode v1.0.1 h1:NDBbPmhS+EqABEs5Kg3n/5ZNjy73Pz7SIV+KCeqyXcs= -github.com/bufbuild/protocompile v0.4.0 h1:LbFKd2XowZvQ/kajzguUp2DC9UEIQhIq77fZZlaQsNA= -github.com/bufbuild/protocompile v0.4.0/go.mod h1:3v93+mbWn/v3xzN+31nwkJfrEpAUwp+BagBSZWx+TP8= -github.com/bwesterb/go-ristretto v1.2.3 h1:1w53tCkGhCQ5djbat3+MH0BAQ5Kfgbt56UZQ/JMzngw= -github.com/bwesterb/go-ristretto v1.2.3/go.mod h1:fUIoIZaG73pV5biE2Blr2xEzDoMj7NFEuV9ekS419A0= -github.com/campoy/embedmd v1.0.0/go.mod h1:oxyr9RCiSXg0M3VJ3ks0UGfp98BpSSGr0kpiX3MzVl8= -github.com/cenkalti/backoff/v4 v4.2.1 h1:y4OZtCnogmCPw98Zjyt5a6+QwPLGkiQsYW5oUqylYbM= -github.com/cenkalti/backoff/v4 v4.2.1/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= -github.com/census-instrumentation/opencensus-proto v0.4.1 h1:iKLQ0xPNFxR/2hzXZMrBo8f1j86j5WHzznCCQxV/b8g= -github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= -github.com/chromedp/cdproto v0.0.0-20230802225258-3cf4e6d46a89/go.mod h1:GKljq0VrfU4D5yc+2qA6OVr8pmO/MBbPEWqWQ/oqGEs= -github.com/chromedp/chromedp v0.9.2/go.mod h1:LkSXJKONWTCHAfQasKFUZI+mxqS4tZqhmtGzzhLsnLs= -github.com/chromedp/sysutil v1.0.0/go.mod h1:kgWmDdq8fTzXYcKIBqIYvRRTnYb9aNS9moAV0xufSww= -github.com/chzyer/logex v1.2.0 h1:+eqR0HfOetur4tgnC8ftU5imRnhi4te+BadWS95c5AM= -github.com/chzyer/readline v1.5.1 h1:upd/6fQk4src78LMRzh5vItIt361/o4uq553V8B5sGI= -github.com/chzyer/readline v1.5.1/go.mod h1:Eh+b79XXUwfKfcPLepksvw2tcLE/Ct21YObkaSkeBlk= -github.com/chzyer/test v0.0.0-20210722231415-061457976a23 h1:dZ0/VyGgQdVGAss6Ju0dt5P0QltE0SFY5Woh6hbIfiQ= -github.com/client9/misspell v0.3.4 h1:ta993UF76GwbvJcIo3Y68y/M3WxlpEHPWIGDkJYwzJI= -github.com/cncf/udpa/go v0.0.0-20220112060539-c52dc94e7fbe h1:QQ3GSy+MqSHxm/d8nCtnAiZdYFd45cYZPs8vOOIYKfk= -github.com/creack/pty v1.1.9 h1:uDmaGzcdjhF4i/plgjmEsriH11Y0o7RKapEf/LDaM3w= -github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815 h1:bWDMxwH3px2JBh6AyO7hdCn/PkvCZXii8TGj7sbtEbQ= -github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY= -github.com/ettle/strcase v0.1.1 h1:htFueZyVeE1XNnMEfbqp5r67qAN/4r6ya1ysq8Q+Zcw= -github.com/fatih/color v1.15.0 h1:kOqh6YHBtK8aywxGerMG2Eq3H6Qgoqeo13Bk2Mv/nBs= -github.com/fogleman/gg v1.3.0 h1:/7zJX8F6AaYQc57WQCyN9cAIz+4bCJGO9B+dyW29am8= -github.com/fullstorydev/grpcurl v1.8.7 h1:xJWosq3BQovQ4QrdPO72OrPiWuGgEsxY8ldYsJbPrqI= -github.com/fullstorydev/grpcurl v1.8.7/go.mod h1:pVtM4qe3CMoLaIzYS8uvTuDj2jVYmXqMUkZeijnXp/E= -github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk= -github.com/go-fonts/dejavu v0.1.0 h1:JSajPXURYqpr+Cu8U9bt8K+XcACIHWqWrvWCKyeFmVQ= -github.com/go-fonts/latin-modern v0.2.0 h1:5/Tv1Ek/QCr20C6ZOz15vw3g7GELYL98KWr8Hgo+3vk= -github.com/go-fonts/liberation v0.2.0 h1:jAkAWJP4S+OsrPLZM4/eC9iW7CtHy+HBXrEwZXWo5VM= -github.com/go-fonts/stix v0.1.0 h1:UlZlgrvvmT/58o573ot7NFw0vZasZ5I6bcIft/oMdgg= -github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1 h1:QbL/5oDUmRBzO9/Z7Seo6zf912W/a6Sr4Eu0G/3Jho0= -github.com/go-jose/go-jose/v4 v4.1.1/go.mod h1:BdsZGqgdO3b6tTc6LSE56wcDbMMLuPsw5d4ZD5f94kA= -github.com/go-latex/latex v0.0.0-20210823091927-c0d11ff05a81 h1:6zl3BbBhdnMkpSj2YY30qV3gDcVBGtFgVsV3+/i+mKQ= -github.com/go-pdf/fpdf v0.6.0 h1:MlgtGIfsdMEEQJr2le6b/HNr1ZlQwxyWr77r2aj2U/8= -github.com/go-playground/assert/v2 v2.0.1 h1:MsBgLAaY856+nPRTKrp3/OZK38U/wa0CcBYNjji3q3A= -github.com/go-playground/locales v0.13.0 h1:HyWk6mgj5qFqCT5fjGBuRArbVDfE4hi8+e8ceBS/t7Q= -github.com/go-playground/universal-translator v0.17.0 h1:icxd5fm+REJzpZx7ZfpaD876Lmtgy7VtROAbHHXk8no= -github.com/go-playground/validator/v10 v10.4.1 h1:pH2c5ADXtd66mxoE0Zm9SUhxE20r7aM3F26W0hOn+GE= -github.com/gobwas/httphead v0.1.0/go.mod h1:O/RXo79gxV8G+RqlR/otEwx4Q36zl9rqC5u12GKvMCM= -github.com/gobwas/pool v0.2.1/go.mod h1:q8bcK0KcYlCgd9e7WYLm9LpyS+YeLd8JVDW6WezmKEw= -github.com/gobwas/ws v1.2.1/go.mod h1:hRKAFb8wOxFROYNsT1bqfWnhX+b5MFeJM9r2ZSwg/KY= -github.com/goccmack/gocc v0.0.0-20230228185258-2292f9e40198/go.mod h1:DTh/Y2+NbnOVVoypCCQrovMPDKUGp4yZpSbWg5D0XIM= -github.com/goccy/go-yaml v1.11.0 h1:n7Z+zx8S9f9KgzG6KtQKf+kwqXZlLNR2F6018Dgau54= -github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= -github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0 h1:DACJavvAHhabrF08vX0COfcOBJRhZ8lUbR+ZWIs0Y5g= -github.com/golang/glog v1.2.2 h1:1+mZ9upx1Dh6FmUTFR1naJ77miKiXgALjWOZ3NVFPmY= -github.com/golang/glog v1.2.4 h1:CNNw5U8lSiiBk7druxtSHHTsRWcxKoac6kZKm2peBBc= -github.com/google/go-jsonnet v0.20.0 h1:WG4TTSARuV7bSm4PMB4ohjxe33IHT5WVTrJSU33uT4g= -github.com/google/go-jsonnet v0.20.0/go.mod h1:VbgWF9JX7ztlv770x/TolZNGGFfiHEVx9G6ca2eUmeA= -github.com/google/go-pkcs11 v0.3.0 h1:PVRnTgtArZ3QQqTGtbtjtnIkzl2iY2kt24yqbrf7td8= -github.com/google/gofuzz v1.0.0 h1:A8PeW59pxE9IoFRqBp37U+mSNaQoZ46F1f0f863XSXw= -github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 h1:El6M4kTTCOh6aBiKaUGG7oYTSPP8MxqL4YI3kZKwcP4= -github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510/go.mod h1:pupxD2MaaD3pAXIBCelhxNneeOaAeabZDe5s4K6zSpQ= -github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8 h1:tlyzajkF3030q6M8SvmJSemC9DTHL/xaMa18b65+JM4= -github.com/grpc-ecosystem/grpc-gateway v1.16.0 h1:gmcG1KaJ57LophUzW0Hy8NmPhnMZb4M0+kPpLofRdBo= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0 h1:YBftPWNWd4WwGqtY2yeZL2ef8rHAxPBD8KFhJpmcqms= -github.com/hamba/avro/v2 v2.17.2 h1:6PKpEWzJfNnvBgn7m2/8WYaDOUASxfDU+Jyb4ojDgFY= -github.com/hashicorp/golang-lru v0.5.1 h1:0hERBMJE1eitiLkihrMvRVBYAkpHzc/J3QdDN+dAcgU= -github.com/hexops/gotextdiff v1.0.3 h1:gitA9+qJrrTCsiCl7+kh75nPqQt1cx4ZkudSTLoUqJM= -github.com/hoisie/redis v0.0.0-20160730154456-b5c6e81454e0 h1:mjZV3MTu2A5gwfT5G9IIiLGdwZNciyVq5qqnmJJZ2JI= -github.com/hoisie/redis v0.0.0-20160730154456-b5c6e81454e0/go.mod h1:pMYMxVaKJqCDC1JUg/XbPJ4/fSazB25zORpFzqsIGIc= -github.com/huandu/xstrings v1.3.3 h1:/Gcsuc1x8JVbJ9/rlye4xZnVAbEkGauT8lbebqcQws4= -github.com/huandu/xstrings v1.3.3/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE= -github.com/iancoleman/strcase v0.3.0 h1:nTXanmYxhfFAMjZL34Ov6gkzEsSJZ5DbhxWjvSASxEI= -github.com/ianlancetaylor/demangle v0.0.0-20240312041847-bd984b5ce465 h1:KwWnWVWCNtNq/ewIX7HIKnELmEx2nDP42yskD/pi7QE= -github.com/ianlancetaylor/demangle v0.0.0-20240312041847-bd984b5ce465/go.mod h1:gx7rwoVhcfuVKG5uya9Hs3Sxj7EIvldVofAWIUtGouw= -github.com/ianlancetaylor/demangle v0.0.0-20250417193237-f615e6bd150b h1:ogbOPx86mIhFy764gGkqnkFC8m5PJA7sPzlk9ppLVQA= -github.com/ianlancetaylor/demangle v0.0.0-20250417193237-f615e6bd150b/go.mod h1:gx7rwoVhcfuVKG5uya9Hs3Sxj7EIvldVofAWIUtGouw= -github.com/imdario/mergo v0.3.11 h1:3tnifQM4i+fbajXKBHXWEH+KvNHqojZ778UH75j3bGA= -github.com/imdario/mergo v0.3.11/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= -github.com/itchyny/gojq v0.12.9 h1:biKpbKwMxVYhCU1d6mR7qMr3f0Hn9F5k5YykCVb3gmM= -github.com/itchyny/gojq v0.12.9/go.mod h1:T4Ip7AETUXeGpD+436m+UEl3m3tokRgajd5pRfsR5oE= -github.com/itchyny/timefmt-go v0.1.4 h1:hFEfWVdwsEi+CY8xY2FtgWHGQaBaC3JeHd+cve0ynVM= -github.com/itchyny/timefmt-go v0.1.4/go.mod h1:nEP7L+2YmAbT2kZ2HfSs1d8Xtw9LY8D2stDBckWakZ8= -github.com/jhump/protoreflect v1.15.1 h1:HUMERORf3I3ZdX05WaQ6MIpd/NJ434hTp5YiKgfCL6c= -github.com/jhump/protoreflect v1.15.1/go.mod h1:jD/2GMKKE6OqX8qTjhADU1e6DShO+gavG9e0Q693nKo= -github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9YPoQUg= -github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= -github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= -github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= -github.com/jung-kurt/gofpdf v1.0.3-0.20190309125859-24315acbbda5 h1:PJr+ZMXIecYc1Ey2zucXdR73SMBtgjPgwa31099IMv0= -github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 h1:Z9n2FFNUXsshfwJMBgNA0RU6/i7WVaAegv3PtuIHPMs= -github.com/kisielk/errcheck v1.5.0 h1:e8esj/e4R+SAOwFwN+n3zr0nYeCyeweozKfO23MvHzY= -github.com/kisielk/gotool v1.0.0 h1:AV2c/EiW3KqPNT9ZKl07ehoAGi4C5/01Cfbblndcapg= -github.com/klauspost/asmfmt v1.3.2 h1:4Ri7ox3EwapiOjCki+hw14RyKk201CN4rzyCJRFLpK4= -github.com/kr/fs v0.1.0 h1:Jskdu9ieNAYnjxsi0LbQp1ulIKZV1LAFgK1tWhpZgl8= -github.com/kr/pty v1.1.1 h1:VkoXIwSboBpnk99O/KFauAEILuNHv5DVFKZMBN/gUgw= -github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= -github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= -github.com/leodido/go-urn v1.2.0 h1:hpXL4XnriNwQ/ABnpepYM/1vCLWNDfUNts8dX3xTG6Y= -github.com/lib/pq v1.8.0 h1:9xohqzkUwzR4Ga4ivdTcawVS89YSDVxXMa3xJX3cGzg= -github.com/lib/pq v1.8.0/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= -github.com/lyft/protoc-gen-star v0.6.1 h1:erE0rdztuaDq3bpGifD95wfoPrSZc95nGA6tbiNYh6M= -github.com/lyft/protoc-gen-star/v2 v2.0.4-0.20230330145011-496ad1ac90a4 h1:sIXJOMrYnQZJu7OB7ANSF4MYri2fTEGIsRLz6LwI4xE= -github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= -github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= -github.com/mattn/go-isatty v0.0.19 h1:JITubQf0MOLdlGRuRq+jtsDlekdYPia9ZFsB8h/APPA= -github.com/mattn/go-sqlite3 v1.14.16 h1:yOQRA0RpS5PFz/oikGwBEqvAWhWg5ufRz4ETLjwpU1Y= -github.com/miekg/dns v1.1.33 h1:8KUVEKrUw2dmu1Ys0aWnkEJgoRaLAzNysfCh2KSMWiI= -github.com/miekg/dns v1.1.33/go.mod h1:KNUDUusw/aVsxyTYZM1oqvCicbwhgbNgztCETuNZ7xM= -github.com/minio/asm2plan9s v0.0.0-20200509001527-cdd76441f9d8 h1:AMFGa4R4MiIpspGNG7Z948v4n35fFGB3RR3G/ry4FWs= -github.com/minio/c2goasm v0.0.0-20190812172519-36a3d3bbc4f3 h1:+n/aFZefKZp7spd8DFdX7uMikMLXX4oubIzJF4kv/wI= -github.com/mitchellh/copystructure v1.0.0 h1:Laisrj+bAB6b/yJwB5Bt3ITZhGJdqmxquMKeZ+mmkFQ= -github.com/mitchellh/copystructure v1.0.0/go.mod h1:SNtv71yrdKgLRyLFxmLdkAbkKEFWgYaq1OVrnRcwhnw= -github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= -github.com/mitchellh/reflectwalk v1.0.0 h1:9D+8oIskB4VJBN5SFlmc27fSlIBZaov1Wpk/IfikLNY= -github.com/mitchellh/reflectwalk v1.0.0/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= -github.com/mmcloughlin/avo v0.5.0 h1:nAco9/aI9Lg2kiuROBY6BhCI/z0t5jEvJfjWbL8qXLU= -github.com/mmcloughlin/avo v0.5.0/go.mod h1:ChHFdoV7ql95Wi7vuq2YT1bwCJqiWdZrQ1im3VujLYM= -github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= -github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= -github.com/phpdave11/gofpdf v1.4.2 h1:KPKiIbfwbvC/wOncwhrpRdXVj2CZTCFlw4wnoyjtHfQ= -github.com/phpdave11/gofpdi v1.0.13 h1:o61duiW8M9sMlkVXWlvP92sZJtGKENvW3VExs6dZukQ= -github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e h1:aoZm08cpOy4WuID//EZDgcC4zIxODThtZNPirFr42+A= -github.com/pkg/sftp v1.13.1 h1:I2qBYMChEhIjOgazfJmV3/mZM256btk6wkCDRmW7JYs= -github.com/prometheus/client_model v0.6.0 h1:k1v3CzpSRUTrKMppY35TLwPvxHqBu0bYgxZzqGIgaos= -github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= -github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec h1:W09IVJc94icq4NjY3clb7Lk8O1qJ8BdBEF8z0ibU0rE= -github.com/rogpeppe/fastuuid v1.2.0 h1:Ppwyp6VYCF1nvBTXL3trRso7mXMlRrw9ooo375wvi2s= -github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA= -github.com/ruudk/golang-pdf417 v0.0.0-20201230142125-a7e3863a1245 h1:K1Xf3bKttbF+koVGaX5xngRIZ5bVjbmPnaxE/dR08uY= -github.com/shopspring/decimal v1.2.0 h1:abSATXmQEYyShuxI4/vyW3tV1MrKAJzCZ/0zLUXYbsQ= -github.com/shopspring/decimal v1.2.0/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o= -github.com/sirupsen/logrus v1.9.0 h1:trlNQbNUG3OdDrDil03MCb1H2o9nJ1x4/5LYw7byDE0= -github.com/sirupsen/logrus v1.9.0/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= -github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= -github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72 h1:qLC7fQah7D6K1B0ujays3HV9gkFtllcxhzImRR7ArPQ= -github.com/spf13/afero v1.10.0 h1:EaGW2JJh15aKOejeuJ+wpFSHnbd7GE6Wvp3TsNhb6LY= -github.com/spf13/cast v1.3.1 h1:nFm6S0SMdyzrzcmThSipiEubIDy8WEXKNZ0UOgiRpng= -github.com/spf13/cast v1.3.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= -github.com/stoewer/go-strcase v1.3.0 h1:g0eASXYtp+yvN9fK8sH94oCIk0fau9uV1/ZdJ0AVEzs= -github.com/stoewer/go-strcase v1.3.1/go.mod h1:fAH5hQ5pehh+j3nZfvwdk2RgEgQjAoM8wodgtPmh1xo= -github.com/stretchr/objx v0.5.0 h1:1zr/of2m5FGMsad5YfcqgdqdWrIhu+EBEJRhR1U7z/c= -github.com/stretchr/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY= -github.com/substrait-io/substrait-go v0.4.2 h1:buDnjsb3qAqTaNbOR7VKmNgXf4lYQxWEcnSGUWBtmN8= -github.com/tidwall/gjson v1.14.2 h1:6BBkirS0rAHjumnjHF6qgy5d2YAJ1TLIaFE2lzfOLqo= -github.com/tidwall/match v1.1.1 h1:+Ho715JplO36QYgwN9PGYNhgZvoUSc9X2c80KVTi+GA= -github.com/tidwall/pretty v1.2.0 h1:RWIZEg2iJ8/g6fDDYzMpobmaoGh5OLl4AXtGUGPcqCs= -github.com/tidwall/sjson v1.2.5 h1:kLy8mja+1c9jlljvWTlSazM7cKDRfJuR/bOJhcY5NcY= -github.com/yuin/goldmark v1.4.13 h1:fVcFKWvrslecOb/tg+Cc05dkeYx540o0FuFt3nUVDoE= -go.opentelemetry.io/contrib/detectors/gcp v1.27.0/go.mod h1:amd+4uZxqJAUx7zI1JvygUtAc2EVWtQeyz8D+3161SQ= -go.opentelemetry.io/otel v1.23.1/go.mod h1:Td0134eafDLcTS4y+zQ26GE8u3dEuRBiBCTUIRHaikA= -go.opentelemetry.io/otel/bridge/opencensus v0.40.0 h1:pqDiayRhBgoqy1vwnscik+TizcImJ58l053NScJyZso= -go.opentelemetry.io/otel/bridge/opencensus v0.40.0/go.mod h1:1NvVHb6tLTe5A9qCYz+eErW0t8iPn4ZfR6tDKcqlGTM= -go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v0.44.0 h1:jd0+5t/YynESZqsSyPz+7PAFdEop0dlN0+PkyHYo8oI= -go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v0.44.0/go.mod h1:U707O40ee1FpQGyhvqnzmCJm1Wh6OX6GGBVn0E6Uyyk= -go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v0.44.0 h1:bflGWrfYyuulcdxf14V6n9+CoQcu5SAAdHmDPAJnlps= -go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v0.44.0/go.mod h1:qcTO4xHAxZLaLxPd60TdE88rxtItPHgHWqOhOGRr0as= -go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v0.44.0/go.mod h1:sTt30Evb7hJB/gEk27qLb1+l9n4Tb8HvHkR0Wx3S6CU= -go.opentelemetry.io/otel/metric v1.23.1/go.mod h1:mpG2QPlAfnK8yNhNJAxDZruU9Y1/HubbC+KyH8FaCWI= -go.opentelemetry.io/otel/sdk v1.27.0/go.mod h1:Ha9vbLwJE6W86YstIywK2xFfPjbWlCuwPtMkKdz/Y4A= -go.opentelemetry.io/otel/sdk/metric v1.27.0/go.mod h1:we7jJVrYN2kh3mVBlswtPU22K0SA+769l93J6bsyvqw= -go.opentelemetry.io/otel/trace v1.23.1/go.mod h1:4IpnpJFwr1mo/6HL8XIPJaE9y0+u1KcVmuW7dwFSVrI= -go.opentelemetry.io/proto/otlp v1.0.0 h1:T0TX0tmXU8a3CbNXzEKGeU5mIVOdf0oykP+u2lIVU/I= -golang.org/x/image v0.0.0-20220302094943-723b81ca9867 h1:TcHcE0vrmgzNH1v3ppjcMGbhG5+9fMuvOmUYwNEF4q4= -golang.org/x/image v0.25.0/go.mod h1:tCAmOEGthTtkalusGp1g3xa2gke8J6c2N565dTyl9Rs= -golang.org/x/lint v0.0.0-20210508222113-6edffad5e616 h1:VLliZ0d+/avPrXXH+OakdXhpJuEoBZuwh1m2j7U6Iug= -golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028 h1:4+4C/Iv2U4fMZBiMCc98MG1In4gJY5YRhtpDNeDeHWs= -golang.org/x/mod v0.9.0 h1:KENHtAZL2y3NLMYZeHY9DW8HW8V+kQyJsY/V9JlKvCs= -golang.org/x/mod v0.11.0 h1:bUO06HqtnRcc/7l71XBe4WcqTZ+3AH1J59zWDDwLKgU= -golang.org/x/mod v0.16.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= -golang.org/x/mod v0.21.0/go.mod h1:6SkKJ3Xj0I0BrPOZoBy3bdMptDDU9oJrpohJ3eWZ1fY= -golang.org/x/telemetry v0.0.0-20240208230135-b75ee8823808/go.mod h1:KG1lNk5ZFNssSZLrpVb4sMXKMpGwGXOxSG3rnu2gZQQ= -golang.org/x/telemetry v0.0.0-20240521205824-bda55230c457 h1:zf5N6UOrA487eEFacMePxjXAJctxKmyjKUsjA11Uzuk= -golang.org/x/telemetry v0.0.0-20250807160809-1a19826ec488/go.mod h1:fGb/2+tgXXjhjHsTNdVEEMZNWA0quBnfrO+AfoDSAKw= -golang.org/x/term v0.32.0 h1:DR4lr0TjUs3epypdhTOkMmuF5CDFJ/8pOnbzMZPQ7bg= -golang.org/x/tools v0.7.0 h1:W4OVu8VVOaIO0yzWMNdepAulS7YfoS3Zabrm8DOXXU4= -golang.org/x/tools v0.10.0 h1:tvDr/iQoUqNdohiYm0LmmKcBk+q86lb9EprIUFhHHGg= -golang.org/x/tools v0.19.0/go.mod h1:qoJWxmGSIBmAeriMx19ogtrEPrGtDbPK634QFIcLAhc= -golang.org/x/tools v0.26.0/go.mod h1:TPVVj70c7JJ3WCazhD8OdXcZg/og+b9+tH/KxylGwH0= -gonum.org/v1/netlib v0.0.0-20190313105609-8cb42192e0e0 h1:OE9mWmgKkjJyEmDAAtGMPjXu+YNeGvK9VTSHY6+Qihc= -gonum.org/v1/plot v0.10.1 h1:dnifSs43YJuNMDzB7v8wV64O4ABBHReuAVAoBxqBqS4= -gonum.org/v1/plot v0.15.2/go.mod h1:DX+x+DWso3LTha+AdkJEv5Txvi+Tql3KAGkehP0/Ubg= -google.golang.org/api v0.174.0/go.mod h1:aC7tB6j0HR1Nl0ni5ghpx6iLasmAX78Zkh/wgxAAjLg= -google.golang.org/appengine v1.6.8 h1:IhEN5q69dyKagZPYMSdIjS2HqprW324FRQZJcGqPAsM= -google.golang.org/genproto v0.0.0-20230725213213-b022f6e96895/go.mod h1:0ggbjUrZYpy1q+ANUS30SEoGZ53cdfwtbuG7Ptgy108= -google.golang.org/genproto/googleapis/api v0.0.0-20230725213213-b022f6e96895/go.mod h1:rsr7RhLuwsDKL7RmgDDCUc6yaGr1iqceVb5Wv6f6YvQ= -google.golang.org/genproto/googleapis/api v0.0.0-20240515191416-fc5f0ca64291/go.mod h1:RGnPtTG7r4i8sPlNyDeikXF99hMM+hN6QMm4ooG9g2g= -google.golang.org/genproto/googleapis/api v0.0.0-20240930140551-af27646dc61f/go.mod h1:CLGoBuH1VHxAUXVPP8FfPwPEVJB6lz3URE5mY2SuayE= -google.golang.org/genproto/googleapis/api v0.0.0-20250227231956-55c901821b1e h1:nsxey/MfoGzYNduN0NN/+hqP9iiCIYsrVbXb/8hjFM8= -google.golang.org/genproto/googleapis/api v0.0.0-20250707201910-8d1bb00bc6a7/go.mod h1:kXqgZtrWaf6qS3jZOCnCH7WYfrvFjkC51bM8fz3RsCA= -google.golang.org/genproto/googleapis/api v0.0.0-20250826171959-ef028d996bc1/go.mod h1:xUjFWUnWDpZ/C0Gu0qloASKFb6f8/QXiiXhSPFsD668= -google.golang.org/genproto/googleapis/bytestream v0.0.0-20231120223509-83a465c0220f/go.mod h1:iIgEblxoG4klcXsG0d9cpoxJ4xndv6+1FkDROCHhPRI= -google.golang.org/genproto/googleapis/bytestream v0.0.0-20240102182953-50ed04b92917/go.mod h1:O9TvT7A9NLgdqqF0JJXJ+axpaoYiEb8txGmkvy+AvLc= -google.golang.org/genproto/googleapis/bytestream v0.0.0-20240513163218-0867130af1f8/go.mod h1:RCpt0+3mpEDPldc32vXBM8ADXlFL95T8Chxx0nv0/zE= -google.golang.org/genproto/googleapis/bytestream v0.0.0-20250115164207-1a7da9e5054f h1:NtrhicUU5+S4TaE5AurusJUYfAo/QB8a+kbIXipuJeI= -google.golang.org/genproto/googleapis/bytestream v0.0.0-20250303144028-a0af3efb3deb/go.mod h1:35wIojE/F1ptq1nfNDNjtowabHoMSA2qQs7+smpCO5s= -google.golang.org/genproto/googleapis/bytestream v0.0.0-20250603155806-513f23925822 h1:zWFRixYR5QlotL+Uv3YfsPRENIrQFXiGs+iwqel6fOQ= -google.golang.org/genproto/googleapis/bytestream v0.0.0-20250818200422-3122310a409c/go.mod h1:1kGGe25NDrNJYgta9Rp2QLLXWS1FLVMMXNvihbhK0iE= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230725213213-b022f6e96895/go.mod h1:TUfxEVdsvPg18p6AslUXFoLdpED4oBnGwyqk3dV1XzM= -google.golang.org/genproto/googleapis/rpc v0.0.0-20250707201910-8d1bb00bc6a7/go.mod h1:qQ0YXyHHx3XkvlzUtpXDkS29lDSafHMZBAZDc03LQ3A= -google.golang.org/grpc v1.75.0/go.mod h1:JtPAzKiq4v1xcAB2hydNlWI2RnF85XXcV0mhKXr2ecQ= -google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.3.0 h1:rNBFJjBCOgVr9pWD7rs/knKL4FRTKgpZmsRfV214zcA= -google.golang.org/grpc/examples v0.0.0-20230224211313-3775f633ce20 h1:MLBCGN1O7GzIx+cBiwfYPwtmZ41U3Mn/cotLJciaArI= -google.golang.org/protobuf v1.36.8/go.mod h1:fuxRtAxBytpl4zzqUh6/eyUujkJdNiuEkXntxiD/uRU= -gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= -honnef.co/go/tools v0.1.3 h1:qTakTkI6ni6LFD5sBwwsdSO+AQqbSIxOauHTTQKZ/7o= -lukechampine.com/uint128 v1.3.0 h1:cDdUVfRwDUDovz610ABgFD17nXD4/uDgVHl2sC3+sbo= -modernc.org/cc/v3 v3.40.0 h1:P3g79IUS/93SYhtoeaHW+kRCIrYaxJ27MFPv+7kaTOw= -modernc.org/ccgo/v3 v3.16.13 h1:Mkgdzl46i5F/CNR/Kj80Ri59hC8TKAhZrYSaqvkwzUw= -modernc.org/ccorpus v1.11.6 h1:J16RXiiqiCgua6+ZvQot4yUuUy8zxgqbqEEUuGPlISk= -modernc.org/httpfs v1.0.6 h1:AAgIpFZRXuYnkjftxTAZwMIiwEqAfk8aVB2/oA6nAeM= -modernc.org/libc v1.22.4 h1:wymSbZb0AlrjdAVX3cjreCHTPCpPARbQXNz6BHPzdwQ= -modernc.org/mathutil v1.5.0 h1:rV0Ko/6SfM+8G+yKiyI830l3Wuz1zRutdslNoQ0kfiQ= -modernc.org/memory v1.5.0 h1:N+/8c5rE6EqugZwHii4IFsaJ7MUhoWX07J5tC/iI5Ds= -modernc.org/opt v0.1.3 h1:3XOZf2yznlhC+ibLltsDGzABUGVx8J6pnFMS3E4dcq4= -modernc.org/sqlite v1.21.2 h1:ixuUG0QS413Vfzyx6FWx6PYTmHaOegTY+hjzhn7L+a0= -modernc.org/strutil v1.1.3 h1:fNMm+oJklMGYfU9Ylcywl0CO5O6nTfaowNsh2wpPjzY= -modernc.org/tcl v1.15.1 h1:mOQwiEK4p7HruMZcwKTZPw/aqtGM4aY00uzWhlKKYws= -modernc.org/token v1.1.0 h1:Xl7Ap9dKaEs5kLoOQeQmPWevfnk/DM5qcLcYlA8ys6Y= -modernc.org/z v1.7.0 h1:xkDw/KepgEjeizO2sNco+hqYkU12taxQFqPEmgm1GWE= -rsc.io/pdf v0.1.1 h1:k1MczvYDUvJBe93bYd7wrZLLUEcLZAuF824/I4e5Xr4= -sigs.k8s.io/yaml v1.3.0 h1:a2VclLzOGrwOHDiV8EfBGhvjHvP46CtW5j6POvhYGGo= -sigs.k8s.io/yaml v1.3.0/go.mod h1:GeOyir5tyXNByN85N/dRIT9es5UQNerPYEKK56eTBm8= diff --git a/vendor/cloud.google.com/go/longrunning/CHANGES.md b/vendor/cloud.google.com/go/longrunning/CHANGES.md deleted file mode 100644 index 536eb68fe2..0000000000 --- a/vendor/cloud.google.com/go/longrunning/CHANGES.md +++ /dev/null @@ -1,198 +0,0 @@ -# Changes - -## [0.9.0](https://github.com/googleapis/google-cloud-go/releases/tag/longrunning%2Fv0.9.0) (2026-04-02) - -## [0.8.0](https://github.com/googleapis/google-cloud-go/releases/tag/longrunning%2Fv0.8.0) (2026-01-08) - -### Bug Fixes - -* upgrade gRPC service registration func An update to Go gRPC Protobuf generation will change service registration function signatures to use an interface instead of a concrete type in generated .pb.go service files. This change should affect very few client library users. See release notes advisories in https://github.com/googleapis/google-cloud-go/pull/11025. ([185951b](https://github.com/googleapis/google-cloud-go/commit/185951b3bea9fb942979e81ce248ccdebb40d94b)) - -## [0.7.0](https://github.com/googleapis/google-cloud-go/releases/tag/longrunning%2Fv0.7.0) (2025-10-14) - -### Features - -* add ListOperations partial success flag -* add ListOperations unreachable resources - -## [0.6.7](https://github.com/googleapis/google-cloud-go/compare/longrunning/v0.6.6...longrunning/v0.6.7) (2025-04-15) - - -### Bug Fixes - -* **longrunning:** Update google.golang.org/api to 0.229.0 ([3319672](https://github.com/googleapis/google-cloud-go/commit/3319672f3dba84a7150772ccb5433e02dab7e201)) - -## [0.6.6](https://github.com/googleapis/google-cloud-go/compare/longrunning/v0.6.5...longrunning/v0.6.6) (2025-03-13) - - -### Bug Fixes - -* **longrunning:** Update golang.org/x/net to 0.37.0 ([1144978](https://github.com/googleapis/google-cloud-go/commit/11449782c7fb4896bf8b8b9cde8e7441c84fb2fd)) - -## [0.6.5](https://github.com/googleapis/google-cloud-go/compare/longrunning/v0.6.4...longrunning/v0.6.5) (2025-03-06) - - -### Bug Fixes - -* **longrunning:** Fix out-of-sync version.go ([28f0030](https://github.com/googleapis/google-cloud-go/commit/28f00304ebb13abfd0da2f45b9b79de093cca1ec)) - -## [0.6.4](https://github.com/googleapis/google-cloud-go/compare/longrunning/v0.6.3...longrunning/v0.6.4) (2025-01-02) - - -### Bug Fixes - -* **longrunning:** Update golang.org/x/net to v0.33.0 ([e9b0b69](https://github.com/googleapis/google-cloud-go/commit/e9b0b69644ea5b276cacff0a707e8a5e87efafc9)) - -## [0.6.3](https://github.com/googleapis/google-cloud-go/compare/longrunning/v0.6.2...longrunning/v0.6.3) (2024-11-19) - - -### Documentation - -* **longrunning:** Clarity and typo fixes for documentation ([c1e936d](https://github.com/googleapis/google-cloud-go/commit/c1e936df6527933f5e7c31be0f95aa46ff2c0e61)) -* **longrunning:** Fix example rpc naming ([c1e936d](https://github.com/googleapis/google-cloud-go/commit/c1e936df6527933f5e7c31be0f95aa46ff2c0e61)) - -## [0.6.2](https://github.com/googleapis/google-cloud-go/compare/longrunning/v0.6.1...longrunning/v0.6.2) (2024-10-23) - - -### Bug Fixes - -* **longrunning:** Update google.golang.org/api to v0.203.0 ([8bb87d5](https://github.com/googleapis/google-cloud-go/commit/8bb87d56af1cba736e0fe243979723e747e5e11e)) -* **longrunning:** WARNING: On approximately Dec 1, 2024, an update to Protobuf will change service registration function signatures to use an interface instead of a concrete type in generated .pb.go files. This change is expected to affect very few if any users of this client library. For more information, see https://togithub.com/googleapis/google-cloud-go/issues/11020. ([8bb87d5](https://github.com/googleapis/google-cloud-go/commit/8bb87d56af1cba736e0fe243979723e747e5e11e)) - -## [0.6.1](https://github.com/googleapis/google-cloud-go/compare/longrunning/v0.6.0...longrunning/v0.6.1) (2024-09-12) - - -### Bug Fixes - -* **longrunning:** Bump dependencies ([2ddeb15](https://github.com/googleapis/google-cloud-go/commit/2ddeb1544a53188a7592046b98913982f1b0cf04)) - -## [0.6.0](https://github.com/googleapis/google-cloud-go/compare/longrunning/v0.5.12...longrunning/v0.6.0) (2024-08-20) - - -### Features - -* **longrunning:** Add support for Go 1.23 iterators ([84461c0](https://github.com/googleapis/google-cloud-go/commit/84461c0ba464ec2f951987ba60030e37c8a8fc18)) - -## [0.5.12](https://github.com/googleapis/google-cloud-go/compare/longrunning/v0.5.11...longrunning/v0.5.12) (2024-08-08) - - -### Bug Fixes - -* **longrunning:** Update google.golang.org/api to v0.191.0 ([5b32644](https://github.com/googleapis/google-cloud-go/commit/5b32644eb82eb6bd6021f80b4fad471c60fb9d73)) - -## [0.5.11](https://github.com/googleapis/google-cloud-go/compare/longrunning/v0.5.10...longrunning/v0.5.11) (2024-07-24) - - -### Bug Fixes - -* **longrunning:** Update dependencies ([257c40b](https://github.com/googleapis/google-cloud-go/commit/257c40bd6d7e59730017cf32bda8823d7a232758)) - -## [0.5.10](https://github.com/googleapis/google-cloud-go/compare/longrunning/v0.5.9...longrunning/v0.5.10) (2024-07-10) - - -### Bug Fixes - -* **longrunning:** Bump google.golang.org/grpc@v1.64.1 ([8ecc4e9](https://github.com/googleapis/google-cloud-go/commit/8ecc4e9622e5bbe9b90384d5848ab816027226c5)) - -## [0.5.9](https://github.com/googleapis/google-cloud-go/compare/longrunning/v0.5.8...longrunning/v0.5.9) (2024-07-01) - - -### Bug Fixes - -* **longrunning:** Bump google.golang.org/api@v0.187.0 ([8fa9e39](https://github.com/googleapis/google-cloud-go/commit/8fa9e398e512fd8533fd49060371e61b5725a85b)) - -## [0.5.8](https://github.com/googleapis/google-cloud-go/compare/longrunning/v0.5.7...longrunning/v0.5.8) (2024-06-26) - - -### Bug Fixes - -* **longrunning:** Enable new auth lib ([b95805f](https://github.com/googleapis/google-cloud-go/commit/b95805f4c87d3e8d10ea23bd7a2d68d7a4157568)) - -## [0.5.7](https://github.com/googleapis/google-cloud-go/compare/longrunning/v0.5.6...longrunning/v0.5.7) (2024-05-01) - - -### Bug Fixes - -* **longrunning:** Bump x/net to v0.24.0 ([ba31ed5](https://github.com/googleapis/google-cloud-go/commit/ba31ed5fda2c9664f2e1cf972469295e63deb5b4)) - -## [0.5.6](https://github.com/googleapis/google-cloud-go/compare/longrunning/v0.5.5...longrunning/v0.5.6) (2024-03-14) - - -### Bug Fixes - -* **longrunning:** Update protobuf dep to v1.33.0 ([30b038d](https://github.com/googleapis/google-cloud-go/commit/30b038d8cac0b8cd5dd4761c87f3f298760dd33a)) - -## [0.5.5](https://github.com/googleapis/google-cloud-go/compare/longrunning/v0.5.4...longrunning/v0.5.5) (2024-01-30) - - -### Bug Fixes - -* **longrunning:** Enable universe domain resolution options ([fd1d569](https://github.com/googleapis/google-cloud-go/commit/fd1d56930fa8a747be35a224611f4797b8aeb698)) - -## [0.5.4](https://github.com/googleapis/google-cloud-go/compare/longrunning/v0.5.3...longrunning/v0.5.4) (2023-11-01) - - -### Bug Fixes - -* **longrunning:** Bump google.golang.org/api to v0.149.0 ([8d2ab9f](https://github.com/googleapis/google-cloud-go/commit/8d2ab9f320a86c1c0fab90513fc05861561d0880)) - -## [0.5.3](https://github.com/googleapis/google-cloud-go/compare/longrunning/v0.5.2...longrunning/v0.5.3) (2023-10-26) - - -### Bug Fixes - -* **longrunning:** Update grpc-go to v1.59.0 ([81a97b0](https://github.com/googleapis/google-cloud-go/commit/81a97b06cb28b25432e4ece595c55a9857e960b7)) - -## [0.5.2](https://github.com/googleapis/google-cloud-go/compare/longrunning/v0.5.1...longrunning/v0.5.2) (2023-10-12) - - -### Bug Fixes - -* **longrunning:** Update golang.org/x/net to v0.17.0 ([174da47](https://github.com/googleapis/google-cloud-go/commit/174da47254fefb12921bbfc65b7829a453af6f5d)) - -## [0.5.1](https://github.com/googleapis/google-cloud-go/compare/longrunning/v0.5.0...longrunning/v0.5.1) (2023-06-20) - - -### Bug Fixes - -* **longrunning:** REST query UpdateMask bug ([df52820](https://github.com/googleapis/google-cloud-go/commit/df52820b0e7721954809a8aa8700b93c5662dc9b)) - -## [0.5.0](https://github.com/googleapis/google-cloud-go/compare/longrunning/v0.4.2...longrunning/v0.5.0) (2023-05-30) - - -### Features - -* **longrunning:** Update all direct dependencies ([b340d03](https://github.com/googleapis/google-cloud-go/commit/b340d030f2b52a4ce48846ce63984b28583abde6)) - -## [0.4.2](https://github.com/googleapis/google-cloud-go/compare/longrunning/v0.4.1...longrunning/v0.4.2) (2023-05-08) - - -### Bug Fixes - -* **longrunning:** Update grpc to v1.55.0 ([1147ce0](https://github.com/googleapis/google-cloud-go/commit/1147ce02a990276ca4f8ab7a1ab65c14da4450ef)) - -## [0.4.1](https://github.com/googleapis/google-cloud-go/compare/longrunning/v0.4.0...longrunning/v0.4.1) (2023-02-14) - - -### Bug Fixes - -* **longrunning:** Properly parse errors with apierror ([#7392](https://github.com/googleapis/google-cloud-go/issues/7392)) ([e768e48](https://github.com/googleapis/google-cloud-go/commit/e768e487e10b197ba42a2339014136d066190610)) - -## [0.4.0](https://github.com/googleapis/google-cloud-go/compare/longrunning/v0.3.0...longrunning/v0.4.0) (2023-01-04) - - -### Features - -* **longrunning:** Add REST client ([06a54a1](https://github.com/googleapis/google-cloud-go/commit/06a54a16a5866cce966547c51e203b9e09a25bc0)) - -## [0.3.0](https://github.com/googleapis/google-cloud-go/compare/longrunning/v0.2.1...longrunning/v0.3.0) (2022-11-03) - - -### Features - -* **longrunning:** rewrite signatures in terms of new location ([3c4b2b3](https://github.com/googleapis/google-cloud-go/commit/3c4b2b34565795537aac1661e6af2442437e34ad)) - -## v0.1.0 - -Initial release. - diff --git a/vendor/cloud.google.com/go/longrunning/LICENSE b/vendor/cloud.google.com/go/longrunning/LICENSE deleted file mode 100644 index d645695673..0000000000 --- a/vendor/cloud.google.com/go/longrunning/LICENSE +++ /dev/null @@ -1,202 +0,0 @@ - - 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/vendor/cloud.google.com/go/longrunning/README.md b/vendor/cloud.google.com/go/longrunning/README.md deleted file mode 100644 index 522f64a52d..0000000000 --- a/vendor/cloud.google.com/go/longrunning/README.md +++ /dev/null @@ -1,55 +0,0 @@ -# Long Running Operations API - -[![Go Reference](https://pkg.go.dev/badge/cloud.google.com/go/longrunning.svg)](https://pkg.go.dev/cloud.google.com/go/longrunning) - -Go Client Library for Long Running Operations API. - -## Install - -```bash -go get cloud.google.com/go/longrunning -``` - -## Stability - -The stability of this module is indicated by SemVer. - -However, a `v1+` module may have breaking changes in two scenarios: - -* Packages with `alpha` or `beta` in the import path -* The GoDoc has an explicit stability disclaimer (for example, for an experimental feature). - -### Which package to use? - -Generated client library surfaces can be found in packages whose import path -ends in `.../apivXXX`. The `XXX` could be something like `1` or `2` in the case -of a stable service backend or may be like `1beta2` or `2beta` in the case of a -more experimental service backend. Because of this fact, a given module can have -multiple clients for different service backends. In these cases it is generally -recommended to use clients with stable service backends, with import suffixes like -`apiv1`, unless you need to use features that are only present in a beta backend -or there is not yet a stable backend available. - -## Google Cloud Samples - -To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples?l=go). - -## Go Version Support - -See the [Go Versions Supported](https://github.com/googleapis/google-cloud-go#go-versions-supported) -section in the root directory's README. - -## Authorization - -See the [Authorization](https://github.com/googleapis/google-cloud-go#authorization) -section in the root directory's README. - -## Contributing - -Contributions are welcome. Please, see the [CONTRIBUTING](https://github.com/GoogleCloudPlatform/google-cloud-go/blob/main/CONTRIBUTING.md) -document for details. - -Please note that this project is released with a Contributor Code of Conduct. -By participating in this project you agree to abide by its terms. See -[Contributor Code of Conduct](https://github.com/GoogleCloudPlatform/google-cloud-go/blob/main/CONTRIBUTING.md#contributor-code-of-conduct) -for more information. diff --git a/vendor/cloud.google.com/go/longrunning/autogen/.repo-metadata.json b/vendor/cloud.google.com/go/longrunning/autogen/.repo-metadata.json deleted file mode 100644 index 9b6603a9b3..0000000000 --- a/vendor/cloud.google.com/go/longrunning/autogen/.repo-metadata.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "api_shortname": "longrunning", - "client_documentation": "https://cloud.google.com/go/docs/reference/cloud.google.com/go/longrunning/latest/autogen", - "client_library_type": "generated", - "description": "Long Running Operations API", - "distribution_name": "cloud.google.com/go/longrunning/autogen", - "language": "go", - "library_type": "GAPIC_AUTO", - "release_level": "stable" -} \ No newline at end of file diff --git a/vendor/cloud.google.com/go/longrunning/autogen/auxiliary.go b/vendor/cloud.google.com/go/longrunning/autogen/auxiliary.go deleted file mode 100644 index 18a59855da..0000000000 --- a/vendor/cloud.google.com/go/longrunning/autogen/auxiliary.go +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Code generated by protoc-gen-go_gapic. DO NOT EDIT. - -package longrunning - -import ( - longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" - "google.golang.org/api/iterator" -) - -// OperationIterator manages a stream of *longrunningpb.Operation. -type OperationIterator struct { - items []*longrunningpb.Operation - pageInfo *iterator.PageInfo - nextFunc func() error - - // Response is the raw response for the current page. - // It must be cast to the RPC response type. - // Calling Next() or InternalFetch() updates this value. - Response interface{} - - // InternalFetch is for use by the Google Cloud Libraries only. - // It is not part of the stable interface of this package. - // - // InternalFetch returns results from a single call to the underlying RPC. - // The number of results is no greater than pageSize. - // If there are no more results, nextPageToken is empty and err is nil. - InternalFetch func(pageSize int, pageToken string) (results []*longrunningpb.Operation, nextPageToken string, err error) -} - -// PageInfo supports pagination. See the [google.golang.org/api/iterator] package for details. -func (it *OperationIterator) PageInfo() *iterator.PageInfo { - return it.pageInfo -} - -// Next returns the next result. Its second return value is iterator.Done if there are no more -// results. Once Next returns Done, all subsequent calls will return Done. -func (it *OperationIterator) Next() (*longrunningpb.Operation, error) { - var item *longrunningpb.Operation - if err := it.nextFunc(); err != nil { - return item, err - } - item = it.items[0] - it.items = it.items[1:] - return item, nil -} - -func (it *OperationIterator) bufLen() int { - return len(it.items) -} - -func (it *OperationIterator) takeBuf() interface{} { - b := it.items - it.items = nil - return b -} diff --git a/vendor/cloud.google.com/go/longrunning/autogen/auxiliary_go123.go b/vendor/cloud.google.com/go/longrunning/autogen/auxiliary_go123.go deleted file mode 100644 index 7641d61f75..0000000000 --- a/vendor/cloud.google.com/go/longrunning/autogen/auxiliary_go123.go +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Code generated by protoc-gen-go_gapic. DO NOT EDIT. - -//go:build go1.23 - -package longrunning - -import ( - "iter" - - longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" - "github.com/googleapis/gax-go/v2/iterator" -) - -// All returns an iterator. If an error is returned by the iterator, the -// iterator will stop after that iteration. -func (it *OperationIterator) All() iter.Seq2[*longrunningpb.Operation, error] { - return iterator.RangeAdapter(it.Next) -} diff --git a/vendor/cloud.google.com/go/longrunning/autogen/doc.go b/vendor/cloud.google.com/go/longrunning/autogen/doc.go deleted file mode 100644 index 705bb6c355..0000000000 --- a/vendor/cloud.google.com/go/longrunning/autogen/doc.go +++ /dev/null @@ -1,79 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Code generated by protoc-gen-go_gapic. DO NOT EDIT. - -// Package longrunning is an auto-generated package for the -// Long Running Operations API. -// -// # General documentation -// -// For information that is relevant for all client libraries please reference -// https://pkg.go.dev/cloud.google.com/go#pkg-overview. Some information on this -// page includes: -// -// - [Authentication and Authorization] -// - [Timeouts and Cancellation] -// - [Testing against Client Libraries] -// - [Debugging Client Libraries] -// - [Inspecting errors] -// -// # Example usage -// -// To get started with this package, create a client. -// -// // go get cloud.google.com/go/longrunning/autogen@latest -// ctx := context.Background() -// // This snippet has been automatically generated and should be regarded as a code template only. -// // It will require modifications to work: -// // - It may require correct/in-range values for request initialization. -// // - It may require specifying regional endpoints when creating the service client as shown in: -// // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options -// c, err := longrunning.NewOperationsClient(ctx) -// if err != nil { -// // TODO: Handle error. -// } -// defer c.Close() -// -// The client will use your default application credentials. Clients should be reused instead of created as needed. -// The methods of Client are safe for concurrent use by multiple goroutines. -// The returned client must be Closed when it is done being used. -// -// # Using the Client -// -// The following is an example of making an API call with the newly created client, mentioned above. -// -// req := &longrunningpb.CancelOperationRequest{ -// // TODO: Fill request struct fields. -// // See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#CancelOperationRequest. -// } -// err = c.CancelOperation(ctx, req) -// if err != nil { -// // TODO: Handle error. -// } -// -// # Use of Context -// -// The ctx passed to NewOperationsClient is used for authentication requests and -// for creating the underlying connection, but is not used for subsequent calls. -// Individual methods on the client use the ctx given to them. -// -// To close the open connection, use the Close() method. -// -// [Authentication and Authorization]: https://pkg.go.dev/cloud.google.com/go#hdr-Authentication_and_Authorization -// [Timeouts and Cancellation]: https://pkg.go.dev/cloud.google.com/go#hdr-Timeouts_and_Cancellation -// [Testing against Client Libraries]: https://pkg.go.dev/cloud.google.com/go#hdr-Testing -// [Debugging Client Libraries]: https://pkg.go.dev/cloud.google.com/go#hdr-Debugging -// [Inspecting errors]: https://pkg.go.dev/cloud.google.com/go#hdr-Inspecting_errors -package longrunning // import "cloud.google.com/go/longrunning/autogen" diff --git a/vendor/cloud.google.com/go/longrunning/autogen/from_conn.go b/vendor/cloud.google.com/go/longrunning/autogen/from_conn.go deleted file mode 100644 index f09714b9b3..0000000000 --- a/vendor/cloud.google.com/go/longrunning/autogen/from_conn.go +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright 2020, Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package longrunning - -import ( - "context" - - "google.golang.org/api/option" - "google.golang.org/grpc" -) - -// InternalFromConn is for use by the Google Cloud Libraries only. -// -// Deprecated. Use `NewOperationsClient(ctx, option.WithGRPCConn(conn))` instead. -func InternalFromConn(conn *grpc.ClientConn) *OperationsClient { - c, _ := NewOperationsClient(context.Background(), option.WithGRPCConn(conn)) - return c -} diff --git a/vendor/cloud.google.com/go/longrunning/autogen/gapic_metadata.json b/vendor/cloud.google.com/go/longrunning/autogen/gapic_metadata.json deleted file mode 100644 index 5271428216..0000000000 --- a/vendor/cloud.google.com/go/longrunning/autogen/gapic_metadata.json +++ /dev/null @@ -1,73 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods.", - "language": "go", - "protoPackage": "google.longrunning", - "libraryPackage": "cloud.google.com/go/longrunning/autogen", - "services": { - "Operations": { - "clients": { - "grpc": { - "libraryClient": "OperationsClient", - "rpcs": { - "CancelOperation": { - "methods": [ - "CancelOperation" - ] - }, - "DeleteOperation": { - "methods": [ - "DeleteOperation" - ] - }, - "GetOperation": { - "methods": [ - "GetOperation" - ] - }, - "ListOperations": { - "methods": [ - "ListOperations" - ] - }, - "WaitOperation": { - "methods": [ - "WaitOperation" - ] - } - } - }, - "rest": { - "libraryClient": "OperationsClient", - "rpcs": { - "CancelOperation": { - "methods": [ - "CancelOperation" - ] - }, - "DeleteOperation": { - "methods": [ - "DeleteOperation" - ] - }, - "GetOperation": { - "methods": [ - "GetOperation" - ] - }, - "ListOperations": { - "methods": [ - "ListOperations" - ] - }, - "WaitOperation": { - "methods": [ - "WaitOperation" - ] - } - } - } - } - } - } -} diff --git a/vendor/cloud.google.com/go/longrunning/autogen/helpers.go b/vendor/cloud.google.com/go/longrunning/autogen/helpers.go deleted file mode 100644 index fb74c96125..0000000000 --- a/vendor/cloud.google.com/go/longrunning/autogen/helpers.go +++ /dev/null @@ -1,103 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Code generated by protoc-gen-go_gapic. DO NOT EDIT. - -package longrunning - -import ( - "context" - "fmt" - "io" - "log/slog" - "net/http" - - "github.com/googleapis/gax-go/v2/internallog" - "github.com/googleapis/gax-go/v2/internallog/grpclog" - "google.golang.org/api/googleapi" - "google.golang.org/api/option" - "google.golang.org/grpc" - "google.golang.org/protobuf/proto" - "google.golang.org/protobuf/runtime/protoimpl" -) - -const serviceName = "longrunning.googleapis.com" - -var protoVersion = fmt.Sprintf("1.%d", protoimpl.MaxVersion) - -// For more information on implementing a client constructor hook, see -// https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. -type clientHookParams struct{} -type clientHook func(context.Context, clientHookParams) ([]option.ClientOption, error) - -var versionClient string - -func getVersionClient() string { - if versionClient == "" { - return "UNKNOWN" - } - return versionClient -} - -// DefaultAuthScopes reports the default set of authentication scopes to use with this package. -func DefaultAuthScopes() []string { - return []string{} -} - -func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { - logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) - resp, err := client.Do(req) - if err != nil { - return nil, nil, err - } - defer resp.Body.Close() - buf, err := io.ReadAll(resp.Body) - if err != nil { - return nil, nil, err - } - logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, buf)) - if err = googleapi.CheckResponseWithBody(resp, buf); err != nil { - return nil, nil, err - } - return buf, resp, nil -} - -func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { - buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) - return buf, err -} - -func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { - logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) - resp, err := client.Do(req) - if err != nil { - return nil, err - } - logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) - if err = googleapi.CheckResponse(resp); err != nil { - return nil, err - } - return resp, nil -} - -func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { - var zero O - logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) - resp, err := fn(ctx, req, opts...) - if err != nil { - return zero, err - } - logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) - return resp, err -} diff --git a/vendor/cloud.google.com/go/longrunning/autogen/info.go b/vendor/cloud.google.com/go/longrunning/autogen/info.go deleted file mode 100644 index b006c4d018..0000000000 --- a/vendor/cloud.google.com/go/longrunning/autogen/info.go +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright 2020 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package longrunning - -// SetGoogleClientInfo sets the name and version of the application in -// the `x-goog-api-client` header passed on each request. Also passes any -// provided key-value pairs. Intended for use by Google-written clients. -// -// Internal use only. -func (c *OperationsClient) SetGoogleClientInfo(keyval ...string) { - c.setGoogleClientInfo(keyval...) -} diff --git a/vendor/cloud.google.com/go/longrunning/autogen/longrunningpb/operations.pb.go b/vendor/cloud.google.com/go/longrunning/autogen/longrunningpb/operations.pb.go deleted file mode 100644 index 3efdc7cfe2..0000000000 --- a/vendor/cloud.google.com/go/longrunning/autogen/longrunningpb/operations.pb.go +++ /dev/null @@ -1,764 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.36.11 -// protoc v4.25.7 -// source: google/longrunning/operations.proto - -package longrunningpb - -import ( - reflect "reflect" - sync "sync" - unsafe "unsafe" - - _ "google.golang.org/genproto/googleapis/api/annotations" - status "google.golang.org/genproto/googleapis/rpc/status" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - descriptorpb "google.golang.org/protobuf/types/descriptorpb" - anypb "google.golang.org/protobuf/types/known/anypb" - durationpb "google.golang.org/protobuf/types/known/durationpb" - emptypb "google.golang.org/protobuf/types/known/emptypb" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// This resource represents a long-running operation that is the result of a -// network API call. -type Operation struct { - state protoimpl.MessageState `protogen:"open.v1"` - // The server-assigned name, which is only unique within the same service that - // originally returns it. If you use the default HTTP mapping, the - // `name` should be a resource name ending with `operations/{unique_id}`. - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // Service-specific metadata associated with the operation. It typically - // contains progress information and common metadata such as create time. - // Some services might not provide such metadata. Any method that returns a - // long-running operation should document the metadata type, if any. - Metadata *anypb.Any `protobuf:"bytes,2,opt,name=metadata,proto3" json:"metadata,omitempty"` - // If the value is `false`, it means the operation is still in progress. - // If `true`, the operation is completed, and either `error` or `response` is - // available. - Done bool `protobuf:"varint,3,opt,name=done,proto3" json:"done,omitempty"` - // The operation result, which can be either an `error` or a valid `response`. - // If `done` == `false`, neither `error` nor `response` is set. - // If `done` == `true`, exactly one of `error` or `response` can be set. - // Some services might not provide the result. - // - // Types that are valid to be assigned to Result: - // - // *Operation_Error - // *Operation_Response - Result isOperation_Result `protobuf_oneof:"result"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *Operation) Reset() { - *x = Operation{} - mi := &file_google_longrunning_operations_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *Operation) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Operation) ProtoMessage() {} - -func (x *Operation) ProtoReflect() protoreflect.Message { - mi := &file_google_longrunning_operations_proto_msgTypes[0] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Operation.ProtoReflect.Descriptor instead. -func (*Operation) Descriptor() ([]byte, []int) { - return file_google_longrunning_operations_proto_rawDescGZIP(), []int{0} -} - -func (x *Operation) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *Operation) GetMetadata() *anypb.Any { - if x != nil { - return x.Metadata - } - return nil -} - -func (x *Operation) GetDone() bool { - if x != nil { - return x.Done - } - return false -} - -func (x *Operation) GetResult() isOperation_Result { - if x != nil { - return x.Result - } - return nil -} - -func (x *Operation) GetError() *status.Status { - if x != nil { - if x, ok := x.Result.(*Operation_Error); ok { - return x.Error - } - } - return nil -} - -func (x *Operation) GetResponse() *anypb.Any { - if x != nil { - if x, ok := x.Result.(*Operation_Response); ok { - return x.Response - } - } - return nil -} - -type isOperation_Result interface { - isOperation_Result() -} - -type Operation_Error struct { - // The error result of the operation in case of failure or cancellation. - Error *status.Status `protobuf:"bytes,4,opt,name=error,proto3,oneof"` -} - -type Operation_Response struct { - // The normal, successful response of the operation. If the original - // method returns no data on success, such as `Delete`, the response is - // `google.protobuf.Empty`. If the original method is standard - // `Get`/`Create`/`Update`, the response should be the resource. For other - // methods, the response should have the type `XxxResponse`, where `Xxx` - // is the original method name. For example, if the original method name - // is `TakeSnapshot()`, the inferred response type is - // `TakeSnapshotResponse`. - Response *anypb.Any `protobuf:"bytes,5,opt,name=response,proto3,oneof"` -} - -func (*Operation_Error) isOperation_Result() {} - -func (*Operation_Response) isOperation_Result() {} - -// The request message for -// [Operations.GetOperation][google.longrunning.Operations.GetOperation]. -type GetOperationRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - // The name of the operation resource. - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *GetOperationRequest) Reset() { - *x = GetOperationRequest{} - mi := &file_google_longrunning_operations_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *GetOperationRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetOperationRequest) ProtoMessage() {} - -func (x *GetOperationRequest) ProtoReflect() protoreflect.Message { - mi := &file_google_longrunning_operations_proto_msgTypes[1] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetOperationRequest.ProtoReflect.Descriptor instead. -func (*GetOperationRequest) Descriptor() ([]byte, []int) { - return file_google_longrunning_operations_proto_rawDescGZIP(), []int{1} -} - -func (x *GetOperationRequest) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -// The request message for -// [Operations.ListOperations][google.longrunning.Operations.ListOperations]. -type ListOperationsRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - // The name of the operation's parent resource. - Name string `protobuf:"bytes,4,opt,name=name,proto3" json:"name,omitempty"` - // The standard list filter. - Filter string `protobuf:"bytes,1,opt,name=filter,proto3" json:"filter,omitempty"` - // The standard list page size. - PageSize int32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` - // The standard list page token. - PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` - // When set to `true`, operations that are reachable are returned as normal, - // and those that are unreachable are returned in the - // [ListOperationsResponse.unreachable] field. - // - // This can only be `true` when reading across collections e.g. when `parent` - // is set to `"projects/example/locations/-"`. - // - // This field is not by default supported and will result in an - // `UNIMPLEMENTED` error if set unless explicitly documented otherwise in - // service or product specific documentation. - ReturnPartialSuccess bool `protobuf:"varint,5,opt,name=return_partial_success,json=returnPartialSuccess,proto3" json:"return_partial_success,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ListOperationsRequest) Reset() { - *x = ListOperationsRequest{} - mi := &file_google_longrunning_operations_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ListOperationsRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListOperationsRequest) ProtoMessage() {} - -func (x *ListOperationsRequest) ProtoReflect() protoreflect.Message { - mi := &file_google_longrunning_operations_proto_msgTypes[2] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ListOperationsRequest.ProtoReflect.Descriptor instead. -func (*ListOperationsRequest) Descriptor() ([]byte, []int) { - return file_google_longrunning_operations_proto_rawDescGZIP(), []int{2} -} - -func (x *ListOperationsRequest) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *ListOperationsRequest) GetFilter() string { - if x != nil { - return x.Filter - } - return "" -} - -func (x *ListOperationsRequest) GetPageSize() int32 { - if x != nil { - return x.PageSize - } - return 0 -} - -func (x *ListOperationsRequest) GetPageToken() string { - if x != nil { - return x.PageToken - } - return "" -} - -func (x *ListOperationsRequest) GetReturnPartialSuccess() bool { - if x != nil { - return x.ReturnPartialSuccess - } - return false -} - -// The response message for -// [Operations.ListOperations][google.longrunning.Operations.ListOperations]. -type ListOperationsResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - // A list of operations that matches the specified filter in the request. - Operations []*Operation `protobuf:"bytes,1,rep,name=operations,proto3" json:"operations,omitempty"` - // The standard List next-page token. - NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` - // Unordered list. Unreachable resources. Populated when the request sets - // `ListOperationsRequest.return_partial_success` and reads across - // collections e.g. when attempting to list all resources across all supported - // locations. - Unreachable []string `protobuf:"bytes,3,rep,name=unreachable,proto3" json:"unreachable,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ListOperationsResponse) Reset() { - *x = ListOperationsResponse{} - mi := &file_google_longrunning_operations_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ListOperationsResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListOperationsResponse) ProtoMessage() {} - -func (x *ListOperationsResponse) ProtoReflect() protoreflect.Message { - mi := &file_google_longrunning_operations_proto_msgTypes[3] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ListOperationsResponse.ProtoReflect.Descriptor instead. -func (*ListOperationsResponse) Descriptor() ([]byte, []int) { - return file_google_longrunning_operations_proto_rawDescGZIP(), []int{3} -} - -func (x *ListOperationsResponse) GetOperations() []*Operation { - if x != nil { - return x.Operations - } - return nil -} - -func (x *ListOperationsResponse) GetNextPageToken() string { - if x != nil { - return x.NextPageToken - } - return "" -} - -func (x *ListOperationsResponse) GetUnreachable() []string { - if x != nil { - return x.Unreachable - } - return nil -} - -// The request message for -// [Operations.CancelOperation][google.longrunning.Operations.CancelOperation]. -type CancelOperationRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - // The name of the operation resource to be cancelled. - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *CancelOperationRequest) Reset() { - *x = CancelOperationRequest{} - mi := &file_google_longrunning_operations_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *CancelOperationRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CancelOperationRequest) ProtoMessage() {} - -func (x *CancelOperationRequest) ProtoReflect() protoreflect.Message { - mi := &file_google_longrunning_operations_proto_msgTypes[4] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CancelOperationRequest.ProtoReflect.Descriptor instead. -func (*CancelOperationRequest) Descriptor() ([]byte, []int) { - return file_google_longrunning_operations_proto_rawDescGZIP(), []int{4} -} - -func (x *CancelOperationRequest) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -// The request message for -// [Operations.DeleteOperation][google.longrunning.Operations.DeleteOperation]. -type DeleteOperationRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - // The name of the operation resource to be deleted. - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *DeleteOperationRequest) Reset() { - *x = DeleteOperationRequest{} - mi := &file_google_longrunning_operations_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *DeleteOperationRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DeleteOperationRequest) ProtoMessage() {} - -func (x *DeleteOperationRequest) ProtoReflect() protoreflect.Message { - mi := &file_google_longrunning_operations_proto_msgTypes[5] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DeleteOperationRequest.ProtoReflect.Descriptor instead. -func (*DeleteOperationRequest) Descriptor() ([]byte, []int) { - return file_google_longrunning_operations_proto_rawDescGZIP(), []int{5} -} - -func (x *DeleteOperationRequest) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -// The request message for -// [Operations.WaitOperation][google.longrunning.Operations.WaitOperation]. -type WaitOperationRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - // The name of the operation resource to wait on. - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // The maximum duration to wait before timing out. If left blank, the wait - // will be at most the time permitted by the underlying HTTP/RPC protocol. - // If RPC context deadline is also specified, the shorter one will be used. - Timeout *durationpb.Duration `protobuf:"bytes,2,opt,name=timeout,proto3" json:"timeout,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *WaitOperationRequest) Reset() { - *x = WaitOperationRequest{} - mi := &file_google_longrunning_operations_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *WaitOperationRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*WaitOperationRequest) ProtoMessage() {} - -func (x *WaitOperationRequest) ProtoReflect() protoreflect.Message { - mi := &file_google_longrunning_operations_proto_msgTypes[6] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use WaitOperationRequest.ProtoReflect.Descriptor instead. -func (*WaitOperationRequest) Descriptor() ([]byte, []int) { - return file_google_longrunning_operations_proto_rawDescGZIP(), []int{6} -} - -func (x *WaitOperationRequest) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *WaitOperationRequest) GetTimeout() *durationpb.Duration { - if x != nil { - return x.Timeout - } - return nil -} - -// A message representing the message types used by a long-running operation. -// -// Example: -// -// rpc Export(ExportRequest) returns (google.longrunning.Operation) { -// option (google.longrunning.operation_info) = { -// response_type: "ExportResponse" -// metadata_type: "ExportMetadata" -// }; -// } -type OperationInfo struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Required. The message name of the primary return type for this - // long-running operation. - // This type will be used to deserialize the LRO's response. - // - // If the response is in a different package from the rpc, a fully-qualified - // message name must be used (e.g. `google.protobuf.Struct`). - // - // Note: Altering this value constitutes a breaking change. - ResponseType string `protobuf:"bytes,1,opt,name=response_type,json=responseType,proto3" json:"response_type,omitempty"` - // Required. The message name of the metadata type for this long-running - // operation. - // - // If the response is in a different package from the rpc, a fully-qualified - // message name must be used (e.g. `google.protobuf.Struct`). - // - // Note: Altering this value constitutes a breaking change. - MetadataType string `protobuf:"bytes,2,opt,name=metadata_type,json=metadataType,proto3" json:"metadata_type,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *OperationInfo) Reset() { - *x = OperationInfo{} - mi := &file_google_longrunning_operations_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *OperationInfo) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*OperationInfo) ProtoMessage() {} - -func (x *OperationInfo) ProtoReflect() protoreflect.Message { - mi := &file_google_longrunning_operations_proto_msgTypes[7] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use OperationInfo.ProtoReflect.Descriptor instead. -func (*OperationInfo) Descriptor() ([]byte, []int) { - return file_google_longrunning_operations_proto_rawDescGZIP(), []int{7} -} - -func (x *OperationInfo) GetResponseType() string { - if x != nil { - return x.ResponseType - } - return "" -} - -func (x *OperationInfo) GetMetadataType() string { - if x != nil { - return x.MetadataType - } - return "" -} - -var file_google_longrunning_operations_proto_extTypes = []protoimpl.ExtensionInfo{ - { - ExtendedType: (*descriptorpb.MethodOptions)(nil), - ExtensionType: (*OperationInfo)(nil), - Field: 1049, - Name: "google.longrunning.operation_info", - Tag: "bytes,1049,opt,name=operation_info", - Filename: "google/longrunning/operations.proto", - }, -} - -// Extension fields to descriptorpb.MethodOptions. -var ( - // Additional information regarding long-running operations. - // In particular, this specifies the types that are returned from - // long-running operations. - // - // Required for methods that return `google.longrunning.Operation`; invalid - // otherwise. - // - // optional google.longrunning.OperationInfo operation_info = 1049; - E_OperationInfo = &file_google_longrunning_operations_proto_extTypes[0] -) - -var File_google_longrunning_operations_proto protoreflect.FileDescriptor - -const file_google_longrunning_operations_proto_rawDesc = "" + - "\n" + - "#google/longrunning/operations.proto\x12\x12google.longrunning\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/protobuf/any.proto\x1a google/protobuf/descriptor.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a\x17google/rpc/status.proto\"\xcf\x01\n" + - "\tOperation\x12\x12\n" + - "\x04name\x18\x01 \x01(\tR\x04name\x120\n" + - "\bmetadata\x18\x02 \x01(\v2\x14.google.protobuf.AnyR\bmetadata\x12\x12\n" + - "\x04done\x18\x03 \x01(\bR\x04done\x12*\n" + - "\x05error\x18\x04 \x01(\v2\x12.google.rpc.StatusH\x00R\x05error\x122\n" + - "\bresponse\x18\x05 \x01(\v2\x14.google.protobuf.AnyH\x00R\bresponseB\b\n" + - "\x06result\")\n" + - "\x13GetOperationRequest\x12\x12\n" + - "\x04name\x18\x01 \x01(\tR\x04name\"\xb5\x01\n" + - "\x15ListOperationsRequest\x12\x12\n" + - "\x04name\x18\x04 \x01(\tR\x04name\x12\x16\n" + - "\x06filter\x18\x01 \x01(\tR\x06filter\x12\x1b\n" + - "\tpage_size\x18\x02 \x01(\x05R\bpageSize\x12\x1d\n" + - "\n" + - "page_token\x18\x03 \x01(\tR\tpageToken\x124\n" + - "\x16return_partial_success\x18\x05 \x01(\bR\x14returnPartialSuccess\"\xa6\x01\n" + - "\x16ListOperationsResponse\x12=\n" + - "\n" + - "operations\x18\x01 \x03(\v2\x1d.google.longrunning.OperationR\n" + - "operations\x12&\n" + - "\x0fnext_page_token\x18\x02 \x01(\tR\rnextPageToken\x12%\n" + - "\vunreachable\x18\x03 \x03(\tB\x03\xe0A\x06R\vunreachable\",\n" + - "\x16CancelOperationRequest\x12\x12\n" + - "\x04name\x18\x01 \x01(\tR\x04name\",\n" + - "\x16DeleteOperationRequest\x12\x12\n" + - "\x04name\x18\x01 \x01(\tR\x04name\"_\n" + - "\x14WaitOperationRequest\x12\x12\n" + - "\x04name\x18\x01 \x01(\tR\x04name\x123\n" + - "\atimeout\x18\x02 \x01(\v2\x19.google.protobuf.DurationR\atimeout\"Y\n" + - "\rOperationInfo\x12#\n" + - "\rresponse_type\x18\x01 \x01(\tR\fresponseType\x12#\n" + - "\rmetadata_type\x18\x02 \x01(\tR\fmetadataType2\xaa\x05\n" + - "\n" + - "Operations\x12\x94\x01\n" + - "\x0eListOperations\x12).google.longrunning.ListOperationsRequest\x1a*.google.longrunning.ListOperationsResponse\"+\xdaA\vname,filter\x82\xd3\xe4\x93\x02\x17\x12\x15/v1/{name=operations}\x12\x7f\n" + - "\fGetOperation\x12'.google.longrunning.GetOperationRequest\x1a\x1d.google.longrunning.Operation\"'\xdaA\x04name\x82\xd3\xe4\x93\x02\x1a\x12\x18/v1/{name=operations/**}\x12~\n" + - "\x0fDeleteOperation\x12*.google.longrunning.DeleteOperationRequest\x1a\x16.google.protobuf.Empty\"'\xdaA\x04name\x82\xd3\xe4\x93\x02\x1a*\x18/v1/{name=operations/**}\x12\x88\x01\n" + - "\x0fCancelOperation\x12*.google.longrunning.CancelOperationRequest\x1a\x16.google.protobuf.Empty\"1\xdaA\x04name\x82\xd3\xe4\x93\x02$:\x01*\"\x1f/v1/{name=operations/**}:cancel\x12Z\n" + - "\rWaitOperation\x12(.google.longrunning.WaitOperationRequest\x1a\x1d.google.longrunning.Operation\"\x00\x1a\x1d\xcaA\x1alongrunning.googleapis.com:i\n" + - "\x0eoperation_info\x12\x1e.google.protobuf.MethodOptions\x18\x99\b \x01(\v2!.google.longrunning.OperationInfoR\roperationInfoB\xa2\x01\n" + - "\x16com.google.longrunningB\x0fOperationsProtoP\x01ZCcloud.google.com/go/longrunning/autogen/longrunningpb;longrunningpb\xa2\x02\x05GLRUN\xaa\x02\x12Google.LongRunning\xca\x02\x12Google\\LongRunningb\x06proto3" - -var ( - file_google_longrunning_operations_proto_rawDescOnce sync.Once - file_google_longrunning_operations_proto_rawDescData []byte -) - -func file_google_longrunning_operations_proto_rawDescGZIP() []byte { - file_google_longrunning_operations_proto_rawDescOnce.Do(func() { - file_google_longrunning_operations_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_google_longrunning_operations_proto_rawDesc), len(file_google_longrunning_operations_proto_rawDesc))) - }) - return file_google_longrunning_operations_proto_rawDescData -} - -var file_google_longrunning_operations_proto_msgTypes = make([]protoimpl.MessageInfo, 8) -var file_google_longrunning_operations_proto_goTypes = []any{ - (*Operation)(nil), // 0: google.longrunning.Operation - (*GetOperationRequest)(nil), // 1: google.longrunning.GetOperationRequest - (*ListOperationsRequest)(nil), // 2: google.longrunning.ListOperationsRequest - (*ListOperationsResponse)(nil), // 3: google.longrunning.ListOperationsResponse - (*CancelOperationRequest)(nil), // 4: google.longrunning.CancelOperationRequest - (*DeleteOperationRequest)(nil), // 5: google.longrunning.DeleteOperationRequest - (*WaitOperationRequest)(nil), // 6: google.longrunning.WaitOperationRequest - (*OperationInfo)(nil), // 7: google.longrunning.OperationInfo - (*anypb.Any)(nil), // 8: google.protobuf.Any - (*status.Status)(nil), // 9: google.rpc.Status - (*durationpb.Duration)(nil), // 10: google.protobuf.Duration - (*descriptorpb.MethodOptions)(nil), // 11: google.protobuf.MethodOptions - (*emptypb.Empty)(nil), // 12: google.protobuf.Empty -} -var file_google_longrunning_operations_proto_depIdxs = []int32{ - 8, // 0: google.longrunning.Operation.metadata:type_name -> google.protobuf.Any - 9, // 1: google.longrunning.Operation.error:type_name -> google.rpc.Status - 8, // 2: google.longrunning.Operation.response:type_name -> google.protobuf.Any - 0, // 3: google.longrunning.ListOperationsResponse.operations:type_name -> google.longrunning.Operation - 10, // 4: google.longrunning.WaitOperationRequest.timeout:type_name -> google.protobuf.Duration - 11, // 5: google.longrunning.operation_info:extendee -> google.protobuf.MethodOptions - 7, // 6: google.longrunning.operation_info:type_name -> google.longrunning.OperationInfo - 2, // 7: google.longrunning.Operations.ListOperations:input_type -> google.longrunning.ListOperationsRequest - 1, // 8: google.longrunning.Operations.GetOperation:input_type -> google.longrunning.GetOperationRequest - 5, // 9: google.longrunning.Operations.DeleteOperation:input_type -> google.longrunning.DeleteOperationRequest - 4, // 10: google.longrunning.Operations.CancelOperation:input_type -> google.longrunning.CancelOperationRequest - 6, // 11: google.longrunning.Operations.WaitOperation:input_type -> google.longrunning.WaitOperationRequest - 3, // 12: google.longrunning.Operations.ListOperations:output_type -> google.longrunning.ListOperationsResponse - 0, // 13: google.longrunning.Operations.GetOperation:output_type -> google.longrunning.Operation - 12, // 14: google.longrunning.Operations.DeleteOperation:output_type -> google.protobuf.Empty - 12, // 15: google.longrunning.Operations.CancelOperation:output_type -> google.protobuf.Empty - 0, // 16: google.longrunning.Operations.WaitOperation:output_type -> google.longrunning.Operation - 12, // [12:17] is the sub-list for method output_type - 7, // [7:12] is the sub-list for method input_type - 6, // [6:7] is the sub-list for extension type_name - 5, // [5:6] is the sub-list for extension extendee - 0, // [0:5] is the sub-list for field type_name -} - -func init() { file_google_longrunning_operations_proto_init() } -func file_google_longrunning_operations_proto_init() { - if File_google_longrunning_operations_proto != nil { - return - } - file_google_longrunning_operations_proto_msgTypes[0].OneofWrappers = []any{ - (*Operation_Error)(nil), - (*Operation_Response)(nil), - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: unsafe.Slice(unsafe.StringData(file_google_longrunning_operations_proto_rawDesc), len(file_google_longrunning_operations_proto_rawDesc)), - NumEnums: 0, - NumMessages: 8, - NumExtensions: 1, - NumServices: 1, - }, - GoTypes: file_google_longrunning_operations_proto_goTypes, - DependencyIndexes: file_google_longrunning_operations_proto_depIdxs, - MessageInfos: file_google_longrunning_operations_proto_msgTypes, - ExtensionInfos: file_google_longrunning_operations_proto_extTypes, - }.Build() - File_google_longrunning_operations_proto = out.File - file_google_longrunning_operations_proto_goTypes = nil - file_google_longrunning_operations_proto_depIdxs = nil -} diff --git a/vendor/cloud.google.com/go/longrunning/autogen/longrunningpb/operations_grpc.pb.go b/vendor/cloud.google.com/go/longrunning/autogen/longrunningpb/operations_grpc.pb.go deleted file mode 100644 index 2b6407e49b..0000000000 --- a/vendor/cloud.google.com/go/longrunning/autogen/longrunningpb/operations_grpc.pb.go +++ /dev/null @@ -1,329 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Code generated by protoc-gen-go-grpc. DO NOT EDIT. -// versions: -// - protoc-gen-go-grpc v1.3.0 -// - protoc v4.25.7 -// source: google/longrunning/operations.proto - -package longrunningpb - -import ( - context "context" - - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" - emptypb "google.golang.org/protobuf/types/known/emptypb" -) - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 - -const ( - Operations_ListOperations_FullMethodName = "/google.longrunning.Operations/ListOperations" - Operations_GetOperation_FullMethodName = "/google.longrunning.Operations/GetOperation" - Operations_DeleteOperation_FullMethodName = "/google.longrunning.Operations/DeleteOperation" - Operations_CancelOperation_FullMethodName = "/google.longrunning.Operations/CancelOperation" - Operations_WaitOperation_FullMethodName = "/google.longrunning.Operations/WaitOperation" -) - -// OperationsClient is the client API for Operations service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. -type OperationsClient interface { - // Lists operations that match the specified filter in the request. If the - // server doesn't support this method, it returns `UNIMPLEMENTED`. - ListOperations(ctx context.Context, in *ListOperationsRequest, opts ...grpc.CallOption) (*ListOperationsResponse, error) - // Gets the latest state of a long-running operation. Clients can use this - // method to poll the operation result at intervals as recommended by the API - // service. - GetOperation(ctx context.Context, in *GetOperationRequest, opts ...grpc.CallOption) (*Operation, error) - // Deletes a long-running operation. This method indicates that the client is - // no longer interested in the operation result. It does not cancel the - // operation. If the server doesn't support this method, it returns - // `google.rpc.Code.UNIMPLEMENTED`. - DeleteOperation(ctx context.Context, in *DeleteOperationRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) - // Starts asynchronous cancellation on a long-running operation. The server - // makes a best effort to cancel the operation, but success is not - // guaranteed. If the server doesn't support this method, it returns - // `google.rpc.Code.UNIMPLEMENTED`. Clients can use - // [Operations.GetOperation][google.longrunning.Operations.GetOperation] or - // other methods to check whether the cancellation succeeded or whether the - // operation completed despite cancellation. On successful cancellation, - // the operation is not deleted; instead, it becomes an operation with - // an [Operation.error][google.longrunning.Operation.error] value with a - // [google.rpc.Status.code][google.rpc.Status.code] of `1`, corresponding to - // `Code.CANCELLED`. - CancelOperation(ctx context.Context, in *CancelOperationRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) - // Waits until the specified long-running operation is done or reaches at most - // a specified timeout, returning the latest state. If the operation is - // already done, the latest state is immediately returned. If the timeout - // specified is greater than the default HTTP/RPC timeout, the HTTP/RPC - // timeout is used. If the server does not support this method, it returns - // `google.rpc.Code.UNIMPLEMENTED`. - // Note that this method is on a best-effort basis. It may return the latest - // state before the specified timeout (including immediately), meaning even an - // immediate response is no guarantee that the operation is done. - WaitOperation(ctx context.Context, in *WaitOperationRequest, opts ...grpc.CallOption) (*Operation, error) -} - -type operationsClient struct { - cc grpc.ClientConnInterface -} - -func NewOperationsClient(cc grpc.ClientConnInterface) OperationsClient { - return &operationsClient{cc} -} - -func (c *operationsClient) ListOperations(ctx context.Context, in *ListOperationsRequest, opts ...grpc.CallOption) (*ListOperationsResponse, error) { - out := new(ListOperationsResponse) - err := c.cc.Invoke(ctx, Operations_ListOperations_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *operationsClient) GetOperation(ctx context.Context, in *GetOperationRequest, opts ...grpc.CallOption) (*Operation, error) { - out := new(Operation) - err := c.cc.Invoke(ctx, Operations_GetOperation_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *operationsClient) DeleteOperation(ctx context.Context, in *DeleteOperationRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { - out := new(emptypb.Empty) - err := c.cc.Invoke(ctx, Operations_DeleteOperation_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *operationsClient) CancelOperation(ctx context.Context, in *CancelOperationRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { - out := new(emptypb.Empty) - err := c.cc.Invoke(ctx, Operations_CancelOperation_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *operationsClient) WaitOperation(ctx context.Context, in *WaitOperationRequest, opts ...grpc.CallOption) (*Operation, error) { - out := new(Operation) - err := c.cc.Invoke(ctx, Operations_WaitOperation_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// OperationsServer is the server API for Operations service. -// All implementations should embed UnimplementedOperationsServer -// for forward compatibility -type OperationsServer interface { - // Lists operations that match the specified filter in the request. If the - // server doesn't support this method, it returns `UNIMPLEMENTED`. - ListOperations(context.Context, *ListOperationsRequest) (*ListOperationsResponse, error) - // Gets the latest state of a long-running operation. Clients can use this - // method to poll the operation result at intervals as recommended by the API - // service. - GetOperation(context.Context, *GetOperationRequest) (*Operation, error) - // Deletes a long-running operation. This method indicates that the client is - // no longer interested in the operation result. It does not cancel the - // operation. If the server doesn't support this method, it returns - // `google.rpc.Code.UNIMPLEMENTED`. - DeleteOperation(context.Context, *DeleteOperationRequest) (*emptypb.Empty, error) - // Starts asynchronous cancellation on a long-running operation. The server - // makes a best effort to cancel the operation, but success is not - // guaranteed. If the server doesn't support this method, it returns - // `google.rpc.Code.UNIMPLEMENTED`. Clients can use - // [Operations.GetOperation][google.longrunning.Operations.GetOperation] or - // other methods to check whether the cancellation succeeded or whether the - // operation completed despite cancellation. On successful cancellation, - // the operation is not deleted; instead, it becomes an operation with - // an [Operation.error][google.longrunning.Operation.error] value with a - // [google.rpc.Status.code][google.rpc.Status.code] of `1`, corresponding to - // `Code.CANCELLED`. - CancelOperation(context.Context, *CancelOperationRequest) (*emptypb.Empty, error) - // Waits until the specified long-running operation is done or reaches at most - // a specified timeout, returning the latest state. If the operation is - // already done, the latest state is immediately returned. If the timeout - // specified is greater than the default HTTP/RPC timeout, the HTTP/RPC - // timeout is used. If the server does not support this method, it returns - // `google.rpc.Code.UNIMPLEMENTED`. - // Note that this method is on a best-effort basis. It may return the latest - // state before the specified timeout (including immediately), meaning even an - // immediate response is no guarantee that the operation is done. - WaitOperation(context.Context, *WaitOperationRequest) (*Operation, error) -} - -// UnimplementedOperationsServer should be embedded to have forward compatible implementations. -type UnimplementedOperationsServer struct { -} - -func (UnimplementedOperationsServer) ListOperations(context.Context, *ListOperationsRequest) (*ListOperationsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ListOperations not implemented") -} -func (UnimplementedOperationsServer) GetOperation(context.Context, *GetOperationRequest) (*Operation, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetOperation not implemented") -} -func (UnimplementedOperationsServer) DeleteOperation(context.Context, *DeleteOperationRequest) (*emptypb.Empty, error) { - return nil, status.Errorf(codes.Unimplemented, "method DeleteOperation not implemented") -} -func (UnimplementedOperationsServer) CancelOperation(context.Context, *CancelOperationRequest) (*emptypb.Empty, error) { - return nil, status.Errorf(codes.Unimplemented, "method CancelOperation not implemented") -} -func (UnimplementedOperationsServer) WaitOperation(context.Context, *WaitOperationRequest) (*Operation, error) { - return nil, status.Errorf(codes.Unimplemented, "method WaitOperation not implemented") -} - -// UnsafeOperationsServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to OperationsServer will -// result in compilation errors. -type UnsafeOperationsServer interface { - mustEmbedUnimplementedOperationsServer() -} - -func RegisterOperationsServer(s grpc.ServiceRegistrar, srv OperationsServer) { - s.RegisterService(&Operations_ServiceDesc, srv) -} - -func _Operations_ListOperations_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ListOperationsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(OperationsServer).ListOperations(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Operations_ListOperations_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(OperationsServer).ListOperations(ctx, req.(*ListOperationsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Operations_GetOperation_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetOperationRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(OperationsServer).GetOperation(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Operations_GetOperation_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(OperationsServer).GetOperation(ctx, req.(*GetOperationRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Operations_DeleteOperation_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DeleteOperationRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(OperationsServer).DeleteOperation(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Operations_DeleteOperation_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(OperationsServer).DeleteOperation(ctx, req.(*DeleteOperationRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Operations_CancelOperation_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CancelOperationRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(OperationsServer).CancelOperation(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Operations_CancelOperation_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(OperationsServer).CancelOperation(ctx, req.(*CancelOperationRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Operations_WaitOperation_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(WaitOperationRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(OperationsServer).WaitOperation(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Operations_WaitOperation_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(OperationsServer).WaitOperation(ctx, req.(*WaitOperationRequest)) - } - return interceptor(ctx, in, info, handler) -} - -// Operations_ServiceDesc is the grpc.ServiceDesc for Operations service. -// It's only intended for direct use with grpc.RegisterService, -// and not to be introspected or modified (even as a copy) -var Operations_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "google.longrunning.Operations", - HandlerType: (*OperationsServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "ListOperations", - Handler: _Operations_ListOperations_Handler, - }, - { - MethodName: "GetOperation", - Handler: _Operations_GetOperation_Handler, - }, - { - MethodName: "DeleteOperation", - Handler: _Operations_DeleteOperation_Handler, - }, - { - MethodName: "CancelOperation", - Handler: _Operations_CancelOperation_Handler, - }, - { - MethodName: "WaitOperation", - Handler: _Operations_WaitOperation_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "google/longrunning/operations.proto", -} diff --git a/vendor/cloud.google.com/go/longrunning/autogen/operations_client.go b/vendor/cloud.google.com/go/longrunning/autogen/operations_client.go deleted file mode 100644 index c7e9273829..0000000000 --- a/vendor/cloud.google.com/go/longrunning/autogen/operations_client.go +++ /dev/null @@ -1,824 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Code generated by protoc-gen-go_gapic. DO NOT EDIT. - -package longrunning - -import ( - "bytes" - "context" - "fmt" - "log/slog" - "math" - "net/http" - "net/url" - "time" - - longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" - gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/iterator" - "google.golang.org/api/option" - "google.golang.org/api/option/internaloption" - gtransport "google.golang.org/api/transport/grpc" - httptransport "google.golang.org/api/transport/http" - "google.golang.org/grpc" - "google.golang.org/grpc/codes" - "google.golang.org/protobuf/encoding/protojson" - "google.golang.org/protobuf/proto" -) - -var newOperationsClientHook clientHook - -// OperationsCallOptions contains the retry settings for each method of OperationsClient. -type OperationsCallOptions struct { - ListOperations []gax.CallOption - GetOperation []gax.CallOption - DeleteOperation []gax.CallOption - CancelOperation []gax.CallOption - WaitOperation []gax.CallOption -} - -func defaultOperationsGRPCClientOptions() []option.ClientOption { - return []option.ClientOption{ - internaloption.WithDefaultEndpoint("longrunning.googleapis.com:443"), - internaloption.WithDefaultEndpointTemplate("longrunning.UNIVERSE_DOMAIN:443"), - internaloption.WithDefaultMTLSEndpoint("longrunning.mtls.googleapis.com:443"), - internaloption.WithDefaultUniverseDomain("googleapis.com"), - internaloption.WithDefaultAudience("https://longrunning.googleapis.com/"), - internaloption.WithDefaultScopes(DefaultAuthScopes()...), - internaloption.EnableJwtWithScope(), - internaloption.EnableNewAuthLibrary(), - option.WithGRPCDialOption(grpc.WithDefaultCallOptions( - grpc.MaxCallRecvMsgSize(math.MaxInt32))), - } -} - -func defaultOperationsCallOptions() *OperationsCallOptions { - return &OperationsCallOptions{ - ListOperations: []gax.CallOption{ - gax.WithTimeout(10000 * time.Millisecond), - gax.WithRetry(func() gax.Retryer { - return gax.OnCodes([]codes.Code{ - codes.Unavailable, - }, gax.Backoff{ - Initial: 500 * time.Millisecond, - Max: 10000 * time.Millisecond, - Multiplier: 2.00, - }) - }), - }, - GetOperation: []gax.CallOption{ - gax.WithTimeout(10000 * time.Millisecond), - gax.WithRetry(func() gax.Retryer { - return gax.OnCodes([]codes.Code{ - codes.Unavailable, - }, gax.Backoff{ - Initial: 500 * time.Millisecond, - Max: 10000 * time.Millisecond, - Multiplier: 2.00, - }) - }), - }, - DeleteOperation: []gax.CallOption{ - gax.WithTimeout(10000 * time.Millisecond), - gax.WithRetry(func() gax.Retryer { - return gax.OnCodes([]codes.Code{ - codes.Unavailable, - }, gax.Backoff{ - Initial: 500 * time.Millisecond, - Max: 10000 * time.Millisecond, - Multiplier: 2.00, - }) - }), - }, - CancelOperation: []gax.CallOption{ - gax.WithTimeout(10000 * time.Millisecond), - gax.WithRetry(func() gax.Retryer { - return gax.OnCodes([]codes.Code{ - codes.Unavailable, - }, gax.Backoff{ - Initial: 500 * time.Millisecond, - Max: 10000 * time.Millisecond, - Multiplier: 2.00, - }) - }), - }, - WaitOperation: []gax.CallOption{}, - } -} - -func defaultOperationsRESTCallOptions() *OperationsCallOptions { - return &OperationsCallOptions{ - ListOperations: []gax.CallOption{ - gax.WithTimeout(10000 * time.Millisecond), - gax.WithRetry(func() gax.Retryer { - return gax.OnHTTPCodes(gax.Backoff{ - Initial: 500 * time.Millisecond, - Max: 10000 * time.Millisecond, - Multiplier: 2.00, - }, - http.StatusServiceUnavailable) - }), - }, - GetOperation: []gax.CallOption{ - gax.WithTimeout(10000 * time.Millisecond), - gax.WithRetry(func() gax.Retryer { - return gax.OnHTTPCodes(gax.Backoff{ - Initial: 500 * time.Millisecond, - Max: 10000 * time.Millisecond, - Multiplier: 2.00, - }, - http.StatusServiceUnavailable) - }), - }, - DeleteOperation: []gax.CallOption{ - gax.WithTimeout(10000 * time.Millisecond), - gax.WithRetry(func() gax.Retryer { - return gax.OnHTTPCodes(gax.Backoff{ - Initial: 500 * time.Millisecond, - Max: 10000 * time.Millisecond, - Multiplier: 2.00, - }, - http.StatusServiceUnavailable) - }), - }, - CancelOperation: []gax.CallOption{ - gax.WithTimeout(10000 * time.Millisecond), - gax.WithRetry(func() gax.Retryer { - return gax.OnHTTPCodes(gax.Backoff{ - Initial: 500 * time.Millisecond, - Max: 10000 * time.Millisecond, - Multiplier: 2.00, - }, - http.StatusServiceUnavailable) - }), - }, - WaitOperation: []gax.CallOption{}, - } -} - -// internalOperationsClient is an interface that defines the methods available from Long Running Operations API. -type internalOperationsClient interface { - Close() error - setGoogleClientInfo(...string) - Connection() *grpc.ClientConn - ListOperations(context.Context, *longrunningpb.ListOperationsRequest, ...gax.CallOption) *OperationIterator - GetOperation(context.Context, *longrunningpb.GetOperationRequest, ...gax.CallOption) (*longrunningpb.Operation, error) - DeleteOperation(context.Context, *longrunningpb.DeleteOperationRequest, ...gax.CallOption) error - CancelOperation(context.Context, *longrunningpb.CancelOperationRequest, ...gax.CallOption) error - WaitOperation(context.Context, *longrunningpb.WaitOperationRequest, ...gax.CallOption) (*longrunningpb.Operation, error) -} - -// OperationsClient is a client for interacting with Long Running Operations API. -// Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. -// -// Manages long-running operations with an API service. -// -// When an API method normally takes long time to complete, it can be designed -// to return Operation to the client, and the -// client can use this interface to receive the real response asynchronously by -// polling the operation resource, or pass the operation resource to another API -// (such as Pub/Sub API) to receive the response. Any API service that returns -// long-running operations should implement the Operations interface so -// developers can have a consistent client experience. -type OperationsClient struct { - // The internal transport-dependent client. - internalClient internalOperationsClient - - // The call options for this service. - CallOptions *OperationsCallOptions -} - -// Wrapper methods routed to the internal client. - -// Close closes the connection to the API service. The user should invoke this when -// the client is no longer required. -func (c *OperationsClient) Close() error { - return c.internalClient.Close() -} - -// setGoogleClientInfo sets the name and version of the application in -// the `x-goog-api-client` header passed on each request. Intended for -// use by Google-written clients. -func (c *OperationsClient) setGoogleClientInfo(keyval ...string) { - c.internalClient.setGoogleClientInfo(keyval...) -} - -// Connection returns a connection to the API service. -// -// Deprecated: Connections are now pooled so this method does not always -// return the same resource. -func (c *OperationsClient) Connection() *grpc.ClientConn { - return c.internalClient.Connection() -} - -// ListOperations lists operations that match the specified filter in the request. If the -// server doesn’t support this method, it returns UNIMPLEMENTED. -func (c *OperationsClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator { - return c.internalClient.ListOperations(ctx, req, opts...) -} - -// GetOperation gets the latest state of a long-running operation. Clients can use this -// method to poll the operation result at intervals as recommended by the API -// service. -func (c *OperationsClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { - return c.internalClient.GetOperation(ctx, req, opts...) -} - -// DeleteOperation deletes a long-running operation. This method indicates that the client is -// no longer interested in the operation result. It does not cancel the -// operation. If the server doesn’t support this method, it returns -// google.rpc.Code.UNIMPLEMENTED. -func (c *OperationsClient) DeleteOperation(ctx context.Context, req *longrunningpb.DeleteOperationRequest, opts ...gax.CallOption) error { - return c.internalClient.DeleteOperation(ctx, req, opts...) -} - -// CancelOperation starts asynchronous cancellation on a long-running operation. The server -// makes a best effort to cancel the operation, but success is not -// guaranteed. If the server doesn’t support this method, it returns -// google.rpc.Code.UNIMPLEMENTED. Clients can use -// Operations.GetOperation or -// other methods to check whether the cancellation succeeded or whether the -// operation completed despite cancellation. On successful cancellation, -// the operation is not deleted; instead, it becomes an operation with -// an Operation.error value with a -// google.rpc.Status.code of 1, corresponding to -// Code.CANCELLED. -func (c *OperationsClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error { - return c.internalClient.CancelOperation(ctx, req, opts...) -} - -// WaitOperation waits until the specified long-running operation is done or reaches at most -// a specified timeout, returning the latest state. If the operation is -// already done, the latest state is immediately returned. If the timeout -// specified is greater than the default HTTP/RPC timeout, the HTTP/RPC -// timeout is used. If the server does not support this method, it returns -// google.rpc.Code.UNIMPLEMENTED. -// Note that this method is on a best-effort basis. It may return the latest -// state before the specified timeout (including immediately), meaning even an -// immediate response is no guarantee that the operation is done. -func (c *OperationsClient) WaitOperation(ctx context.Context, req *longrunningpb.WaitOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { - return c.internalClient.WaitOperation(ctx, req, opts...) -} - -// operationsGRPCClient is a client for interacting with Long Running Operations API over gRPC transport. -// -// Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. -type operationsGRPCClient struct { - // Connection pool of gRPC connections to the service. - connPool gtransport.ConnPool - - // Points back to the CallOptions field of the containing OperationsClient - CallOptions **OperationsCallOptions - - // The gRPC API client. - operationsClient longrunningpb.OperationsClient - - // The x-goog-* metadata to be sent with each request. - xGoogHeaders []string - - logger *slog.Logger -} - -// NewOperationsClient creates a new operations client based on gRPC. -// The returned client must be Closed when it is done being used to clean up its underlying connections. -// -// Manages long-running operations with an API service. -// -// When an API method normally takes long time to complete, it can be designed -// to return Operation to the client, and the -// client can use this interface to receive the real response asynchronously by -// polling the operation resource, or pass the operation resource to another API -// (such as Pub/Sub API) to receive the response. Any API service that returns -// long-running operations should implement the Operations interface so -// developers can have a consistent client experience. -func NewOperationsClient(ctx context.Context, opts ...option.ClientOption) (*OperationsClient, error) { - clientOpts := defaultOperationsGRPCClientOptions() - if newOperationsClientHook != nil { - hookOpts, err := newOperationsClientHook(ctx, clientHookParams{}) - if err != nil { - return nil, err - } - clientOpts = append(clientOpts, hookOpts...) - } - - connPool, err := gtransport.DialPool(ctx, append(clientOpts, opts...)...) - if err != nil { - return nil, err - } - client := OperationsClient{CallOptions: defaultOperationsCallOptions()} - - c := &operationsGRPCClient{ - connPool: connPool, - operationsClient: longrunningpb.NewOperationsClient(connPool), - CallOptions: &client.CallOptions, - logger: internaloption.GetLogger(opts), - } - c.setGoogleClientInfo() - - client.internalClient = c - - return &client, nil -} - -// Connection returns a connection to the API service. -// -// Deprecated: Connections are now pooled so this method does not always -// return the same resource. -func (c *operationsGRPCClient) Connection() *grpc.ClientConn { - return c.connPool.Conn() -} - -// setGoogleClientInfo sets the name and version of the application in -// the `x-goog-api-client` header passed on each request. Intended for -// use by Google-written clients. -func (c *operationsGRPCClient) setGoogleClientInfo(keyval ...string) { - kv := append([]string{"gl-go", gax.GoVersion}, keyval...) - kv = append(kv, "gapic", getVersionClient(), "gax", gax.Version, "grpc", grpc.Version, "pb", protoVersion) - c.xGoogHeaders = []string{ - "x-goog-api-client", gax.XGoogHeader(kv...), - } -} - -// Close closes the connection to the API service. The user should invoke this when -// the client is no longer required. -func (c *operationsGRPCClient) Close() error { - return c.connPool.Close() -} - -// Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. -type operationsRESTClient struct { - // The http endpoint to connect to. - endpoint string - - // The http client. - httpClient *http.Client - - // The x-goog-* headers to be sent with each request. - xGoogHeaders []string - - // Points back to the CallOptions field of the containing OperationsClient - CallOptions **OperationsCallOptions - - logger *slog.Logger -} - -// NewOperationsRESTClient creates a new operations rest client. -// -// Manages long-running operations with an API service. -// -// When an API method normally takes long time to complete, it can be designed -// to return Operation to the client, and the -// client can use this interface to receive the real response asynchronously by -// polling the operation resource, or pass the operation resource to another API -// (such as Pub/Sub API) to receive the response. Any API service that returns -// long-running operations should implement the Operations interface so -// developers can have a consistent client experience. -func NewOperationsRESTClient(ctx context.Context, opts ...option.ClientOption) (*OperationsClient, error) { - clientOpts := append(defaultOperationsRESTClientOptions(), opts...) - httpClient, endpoint, err := httptransport.NewClient(ctx, clientOpts...) - if err != nil { - return nil, err - } - - callOpts := defaultOperationsRESTCallOptions() - c := &operationsRESTClient{ - endpoint: endpoint, - httpClient: httpClient, - CallOptions: &callOpts, - logger: internaloption.GetLogger(opts), - } - c.setGoogleClientInfo() - - return &OperationsClient{internalClient: c, CallOptions: callOpts}, nil -} - -func defaultOperationsRESTClientOptions() []option.ClientOption { - return []option.ClientOption{ - internaloption.WithDefaultEndpoint("https://longrunning.googleapis.com"), - internaloption.WithDefaultEndpointTemplate("https://longrunning.UNIVERSE_DOMAIN"), - internaloption.WithDefaultMTLSEndpoint("https://longrunning.mtls.googleapis.com"), - internaloption.WithDefaultUniverseDomain("googleapis.com"), - internaloption.WithDefaultAudience("https://longrunning.googleapis.com/"), - internaloption.WithDefaultScopes(DefaultAuthScopes()...), - internaloption.EnableNewAuthLibrary(), - } -} - -// setGoogleClientInfo sets the name and version of the application in -// the `x-goog-api-client` header passed on each request. Intended for -// use by Google-written clients. -func (c *operationsRESTClient) setGoogleClientInfo(keyval ...string) { - kv := append([]string{"gl-go", gax.GoVersion}, keyval...) - kv = append(kv, "gapic", getVersionClient(), "gax", gax.Version, "rest", "UNKNOWN", "pb", protoVersion) - c.xGoogHeaders = []string{ - "x-goog-api-client", gax.XGoogHeader(kv...), - } -} - -// Close closes the connection to the API service. The user should invoke this when -// the client is no longer required. -func (c *operationsRESTClient) Close() error { - // Replace httpClient with nil to force cleanup. - c.httpClient = nil - return nil -} - -// Connection returns a connection to the API service. -// -// Deprecated: This method always returns nil. -func (c *operationsRESTClient) Connection() *grpc.ClientConn { - return nil -} -func (c *operationsGRPCClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator { - hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))} - - hds = append(c.xGoogHeaders, hds...) - ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) - opts = append((*c.CallOptions).ListOperations[0:len((*c.CallOptions).ListOperations):len((*c.CallOptions).ListOperations)], opts...) - it := &OperationIterator{} - req = proto.Clone(req).(*longrunningpb.ListOperationsRequest) - it.InternalFetch = func(pageSize int, pageToken string) ([]*longrunningpb.Operation, string, error) { - resp := &longrunningpb.ListOperationsResponse{} - if pageToken != "" { - req.PageToken = pageToken - } - if pageSize > math.MaxInt32 { - req.PageSize = math.MaxInt32 - } else if pageSize != 0 { - req.PageSize = int32(pageSize) - } - err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - var err error - resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") - return err - }, opts...) - if err != nil { - return nil, "", err - } - - it.Response = resp - return resp.GetOperations(), resp.GetNextPageToken(), nil - } - fetch := func(pageSize int, pageToken string) (string, error) { - items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) - if err != nil { - return "", err - } - it.items = append(it.items, items...) - return nextPageToken, nil - } - - it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) - it.pageInfo.MaxSize = int(req.GetPageSize()) - it.pageInfo.Token = req.GetPageToken() - - return it -} - -func (c *operationsGRPCClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { - hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))} - - hds = append(c.xGoogHeaders, hds...) - ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) - opts = append((*c.CallOptions).GetOperation[0:len((*c.CallOptions).GetOperation):len((*c.CallOptions).GetOperation)], opts...) - var resp *longrunningpb.Operation - err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - var err error - resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") - return err - }, opts...) - if err != nil { - return nil, err - } - return resp, nil -} - -func (c *operationsGRPCClient) DeleteOperation(ctx context.Context, req *longrunningpb.DeleteOperationRequest, opts ...gax.CallOption) error { - hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))} - - hds = append(c.xGoogHeaders, hds...) - ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) - opts = append((*c.CallOptions).DeleteOperation[0:len((*c.CallOptions).DeleteOperation):len((*c.CallOptions).DeleteOperation)], opts...) - err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - var err error - _, err = executeRPC(ctx, c.operationsClient.DeleteOperation, req, settings.GRPC, c.logger, "DeleteOperation") - return err - }, opts...) - return err -} - -func (c *operationsGRPCClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error { - hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))} - - hds = append(c.xGoogHeaders, hds...) - ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) - opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) - err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - var err error - _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") - return err - }, opts...) - return err -} - -func (c *operationsGRPCClient) WaitOperation(ctx context.Context, req *longrunningpb.WaitOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { - ctx = gax.InsertMetadataIntoOutgoingContext(ctx, c.xGoogHeaders...) - opts = append((*c.CallOptions).WaitOperation[0:len((*c.CallOptions).WaitOperation):len((*c.CallOptions).WaitOperation)], opts...) - var resp *longrunningpb.Operation - err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - var err error - resp, err = executeRPC(ctx, c.operationsClient.WaitOperation, req, settings.GRPC, c.logger, "WaitOperation") - return err - }, opts...) - if err != nil { - return nil, err - } - return resp, nil -} - -// ListOperations lists operations that match the specified filter in the request. If the -// server doesn’t support this method, it returns UNIMPLEMENTED. -func (c *operationsRESTClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator { - it := &OperationIterator{} - req = proto.Clone(req).(*longrunningpb.ListOperationsRequest) - unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} - it.InternalFetch = func(pageSize int, pageToken string) ([]*longrunningpb.Operation, string, error) { - resp := &longrunningpb.ListOperationsResponse{} - if pageToken != "" { - req.PageToken = pageToken - } - if pageSize > math.MaxInt32 { - req.PageSize = math.MaxInt32 - } else if pageSize != 0 { - req.PageSize = int32(pageSize) - } - baseUrl, err := url.Parse(c.endpoint) - if err != nil { - return nil, "", err - } - baseUrl.Path += fmt.Sprintf("/v1/%v", req.GetName()) - - params := url.Values{} - if req.GetFilter() != "" { - params.Add("filter", fmt.Sprintf("%v", req.GetFilter())) - } - if req.GetPageSize() != 0 { - params.Add("pageSize", fmt.Sprintf("%v", req.GetPageSize())) - } - if req.GetPageToken() != "" { - params.Add("pageToken", fmt.Sprintf("%v", req.GetPageToken())) - } - if req.GetReturnPartialSuccess() { - params.Add("returnPartialSuccess", fmt.Sprintf("%v", req.GetReturnPartialSuccess())) - } - - baseUrl.RawQuery = params.Encode() - - // Build HTTP headers from client and context metadata. - hds := append(c.xGoogHeaders, "Content-Type", "application/json") - headers := gax.BuildHeaders(ctx, hds...) - e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - if settings.Path != "" { - baseUrl.Path = settings.Path - } - httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) - if err != nil { - return err - } - httpReq.Header = headers - - buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { - return err - } - - return nil - }, opts...) - if e != nil { - return nil, "", e - } - it.Response = resp - return resp.GetOperations(), resp.GetNextPageToken(), nil - } - - fetch := func(pageSize int, pageToken string) (string, error) { - items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) - if err != nil { - return "", err - } - it.items = append(it.items, items...) - return nextPageToken, nil - } - - it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) - it.pageInfo.MaxSize = int(req.GetPageSize()) - it.pageInfo.Token = req.GetPageToken() - - return it -} - -// GetOperation gets the latest state of a long-running operation. Clients can use this -// method to poll the operation result at intervals as recommended by the API -// service. -func (c *operationsRESTClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { - baseUrl, err := url.Parse(c.endpoint) - if err != nil { - return nil, err - } - baseUrl.Path += fmt.Sprintf("/v1/%v", req.GetName()) - - // Build HTTP headers from client and context metadata. - hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))} - - hds = append(c.xGoogHeaders, hds...) - hds = append(hds, "Content-Type", "application/json") - headers := gax.BuildHeaders(ctx, hds...) - opts = append((*c.CallOptions).GetOperation[0:len((*c.CallOptions).GetOperation):len((*c.CallOptions).GetOperation)], opts...) - unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} - resp := &longrunningpb.Operation{} - e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - if settings.Path != "" { - baseUrl.Path = settings.Path - } - httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) - if err != nil { - return err - } - httpReq = httpReq.WithContext(ctx) - httpReq.Header = headers - - buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") - if err != nil { - return err - } - - if err := unm.Unmarshal(buf, resp); err != nil { - return err - } - - return nil - }, opts...) - if e != nil { - return nil, e - } - return resp, nil -} - -// DeleteOperation deletes a long-running operation. This method indicates that the client is -// no longer interested in the operation result. It does not cancel the -// operation. If the server doesn’t support this method, it returns -// google.rpc.Code.UNIMPLEMENTED. -func (c *operationsRESTClient) DeleteOperation(ctx context.Context, req *longrunningpb.DeleteOperationRequest, opts ...gax.CallOption) error { - baseUrl, err := url.Parse(c.endpoint) - if err != nil { - return err - } - baseUrl.Path += fmt.Sprintf("/v1/%v", req.GetName()) - - // Build HTTP headers from client and context metadata. - hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))} - - hds = append(c.xGoogHeaders, hds...) - hds = append(hds, "Content-Type", "application/json") - headers := gax.BuildHeaders(ctx, hds...) - return gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - if settings.Path != "" { - baseUrl.Path = settings.Path - } - httpReq, err := http.NewRequest("DELETE", baseUrl.String(), nil) - if err != nil { - return err - } - httpReq = httpReq.WithContext(ctx) - httpReq.Header = headers - - _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteOperation") - return err - }, opts...) -} - -// CancelOperation starts asynchronous cancellation on a long-running operation. The server -// makes a best effort to cancel the operation, but success is not -// guaranteed. If the server doesn’t support this method, it returns -// google.rpc.Code.UNIMPLEMENTED. Clients can use -// Operations.GetOperation or -// other methods to check whether the cancellation succeeded or whether the -// operation completed despite cancellation. On successful cancellation, -// the operation is not deleted; instead, it becomes an operation with -// an Operation.error value with a -// google.rpc.Status.code of 1, corresponding to -// Code.CANCELLED. -func (c *operationsRESTClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error { - m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} - jsonReq, err := m.Marshal(req) - if err != nil { - return err - } - - baseUrl, err := url.Parse(c.endpoint) - if err != nil { - return err - } - baseUrl.Path += fmt.Sprintf("/v1/%v:cancel", req.GetName()) - - // Build HTTP headers from client and context metadata. - hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))} - - hds = append(c.xGoogHeaders, hds...) - hds = append(hds, "Content-Type", "application/json") - headers := gax.BuildHeaders(ctx, hds...) - return gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - if settings.Path != "" { - baseUrl.Path = settings.Path - } - httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) - if err != nil { - return err - } - httpReq = httpReq.WithContext(ctx) - httpReq.Header = headers - - _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CancelOperation") - return err - }, opts...) -} - -// WaitOperation waits until the specified long-running operation is done or reaches at most -// a specified timeout, returning the latest state. If the operation is -// already done, the latest state is immediately returned. If the timeout -// specified is greater than the default HTTP/RPC timeout, the HTTP/RPC -// timeout is used. If the server does not support this method, it returns -// google.rpc.Code.UNIMPLEMENTED. -// Note that this method is on a best-effort basis. It may return the latest -// state before the specified timeout (including immediately), meaning even an -// immediate response is no guarantee that the operation is done. -func (c *operationsRESTClient) WaitOperation(ctx context.Context, req *longrunningpb.WaitOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { - baseUrl, err := url.Parse(c.endpoint) - if err != nil { - return nil, err - } - baseUrl.Path += fmt.Sprintf("") - - params := url.Values{} - if req.GetName() != "" { - params.Add("name", fmt.Sprintf("%v", req.GetName())) - } - if req.GetTimeout() != nil { - field, err := protojson.Marshal(req.GetTimeout()) - if err != nil { - return nil, err - } - params.Add("timeout", string(field[1:len(field)-1])) - } - - baseUrl.RawQuery = params.Encode() - - // Build HTTP headers from client and context metadata. - hds := append(c.xGoogHeaders, "Content-Type", "application/json") - headers := gax.BuildHeaders(ctx, hds...) - opts = append((*c.CallOptions).WaitOperation[0:len((*c.CallOptions).WaitOperation):len((*c.CallOptions).WaitOperation)], opts...) - unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} - resp := &longrunningpb.Operation{} - e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - if settings.Path != "" { - baseUrl.Path = settings.Path - } - httpReq, err := http.NewRequest("", baseUrl.String(), nil) - if err != nil { - return err - } - httpReq = httpReq.WithContext(ctx) - httpReq.Header = headers - - buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "WaitOperation") - if err != nil { - return err - } - - if err := unm.Unmarshal(buf, resp); err != nil { - return err - } - - return nil - }, opts...) - if e != nil { - return nil, e - } - return resp, nil -} diff --git a/vendor/cloud.google.com/go/longrunning/autogen/version.go b/vendor/cloud.google.com/go/longrunning/autogen/version.go deleted file mode 100644 index 8bec2855a8..0000000000 --- a/vendor/cloud.google.com/go/longrunning/autogen/version.go +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Code generated by gapicgen. DO NOT EDIT. - -package longrunning - -import "cloud.google.com/go/longrunning/internal" - -func init() { - versionClient = internal.Version -} diff --git a/vendor/cloud.google.com/go/longrunning/internal/version.go b/vendor/cloud.google.com/go/longrunning/internal/version.go deleted file mode 100644 index 059c6e2f5a..0000000000 --- a/vendor/cloud.google.com/go/longrunning/internal/version.go +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Code generated by gapicgen. DO NOT EDIT. - -package internal - -// Version is the current tagged release of the library. -const Version = "0.9.0" diff --git a/vendor/cloud.google.com/go/longrunning/longrunning.go b/vendor/cloud.google.com/go/longrunning/longrunning.go deleted file mode 100644 index 3c75b761e4..0000000000 --- a/vendor/cloud.google.com/go/longrunning/longrunning.go +++ /dev/null @@ -1,182 +0,0 @@ -// Copyright 2016 Google LLC -// -// Licensed under the Apache License, Version 2.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. - -// Package longrunning supports Long Running Operations for the Google Cloud Libraries. -// See google.golang.org/genproto/googleapis/longrunning for its service definition. -// -// Users of the Google Cloud Libraries will typically not use this package directly. -// Instead they will call functions returning Operations and call their methods. -// -// This package is still experimental and subject to change. -package longrunning // import "cloud.google.com/go/longrunning" - -import ( - "context" - "errors" - "fmt" - "time" - - autogen "cloud.google.com/go/longrunning/autogen" - pb "cloud.google.com/go/longrunning/autogen/longrunningpb" - gax "github.com/googleapis/gax-go/v2" - "github.com/googleapis/gax-go/v2/apierror" - "google.golang.org/grpc/status" - "google.golang.org/protobuf/proto" - "google.golang.org/protobuf/protoadapt" - "google.golang.org/protobuf/types/known/anypb" -) - -// ErrNoMetadata is the error returned by Metadata if the operation contains no metadata. -var ErrNoMetadata = errors.New("operation contains no metadata") - -// Operation represents the result of an API call that may not be ready yet. -type Operation struct { - c operationsClient - proto *pb.Operation -} - -type operationsClient interface { - GetOperation(context.Context, *pb.GetOperationRequest, ...gax.CallOption) (*pb.Operation, error) - CancelOperation(context.Context, *pb.CancelOperationRequest, ...gax.CallOption) error - DeleteOperation(context.Context, *pb.DeleteOperationRequest, ...gax.CallOption) error -} - -// InternalNewOperation is for use by the google Cloud Libraries only. -// -// InternalNewOperation returns an long-running operation, abstracting the raw pb.Operation. -// The conn parameter refers to a server that proto was received from. -func InternalNewOperation(inner *autogen.OperationsClient, proto *pb.Operation) *Operation { - return &Operation{ - c: inner, - proto: proto, - } -} - -// Name returns the name of the long-running operation. -// The name is assigned by the server and is unique within the service -// from which the operation is created. -func (op *Operation) Name() string { - return op.proto.Name -} - -// Done reports whether the long-running operation has completed. -func (op *Operation) Done() bool { - return op.proto.Done -} - -// Metadata unmarshals op's metadata into meta. -// If op does not contain any metadata, Metadata returns ErrNoMetadata and meta is unmodified. -func (op *Operation) Metadata(meta protoadapt.MessageV1) error { - if m := op.proto.Metadata; m != nil { - metav2 := protoadapt.MessageV2Of(meta) - return anypb.UnmarshalTo(m, metav2, proto.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true}) - } - return ErrNoMetadata -} - -// Poll fetches the latest state of a long-running operation. -// -// If Poll fails, the error is returned and op is unmodified. -// If Poll succeeds and the operation has completed with failure, -// the error is returned and op.Done will return true. -// If Poll succeeds and the operation has completed successfully, -// op.Done will return true; if resp != nil, the response of the operation -// is stored in resp. -func (op *Operation) Poll(ctx context.Context, resp protoadapt.MessageV1, opts ...gax.CallOption) error { - if !op.Done() { - p, err := op.c.GetOperation(ctx, &pb.GetOperationRequest{Name: op.Name()}, opts...) - if err != nil { - return err - } - op.proto = p - } - if !op.Done() { - return nil - } - - switch r := op.proto.Result.(type) { - case *pb.Operation_Error: - err, _ := apierror.FromError(status.ErrorProto(r.Error)) - return err - case *pb.Operation_Response: - if resp == nil { - return nil - } - respv2 := protoadapt.MessageV2Of(resp) - return anypb.UnmarshalTo(r.Response, respv2, proto.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true}) - default: - return fmt.Errorf("unsupported result type %[1]T: %[1]v", r) - } -} - -// DefaultWaitInterval is the polling interval used by Operation.Wait. -const DefaultWaitInterval = 60 * time.Second - -// Wait is equivalent to WaitWithInterval using DefaultWaitInterval. -func (op *Operation) Wait(ctx context.Context, resp protoadapt.MessageV1, opts ...gax.CallOption) error { - return op.WaitWithInterval(ctx, resp, DefaultWaitInterval, opts...) -} - -// WaitWithInterval blocks until the operation is completed. -// If resp != nil, Wait stores the response in resp. -// WaitWithInterval polls every interval, except initially -// when it polls using exponential backoff. -// -// See documentation of Poll for error-handling information. -func (op *Operation) WaitWithInterval(ctx context.Context, resp protoadapt.MessageV1, interval time.Duration, opts ...gax.CallOption) error { - bo := gax.Backoff{ - Initial: 1 * time.Second, - Max: interval, - } - if bo.Max < bo.Initial { - bo.Max = bo.Initial - } - return op.wait(ctx, resp, &bo, gax.Sleep, opts...) -} - -type sleeper func(context.Context, time.Duration) error - -// wait implements Wait, taking exponentialBackoff and sleeper arguments for testing. -func (op *Operation) wait(ctx context.Context, resp protoadapt.MessageV1, bo *gax.Backoff, sl sleeper, opts ...gax.CallOption) error { - for { - if err := op.Poll(ctx, resp, opts...); err != nil { - return err - } - if op.Done() { - return nil - } - if err := sl(ctx, bo.Pause()); err != nil { - return err - } - } -} - -// Cancel starts asynchronous cancellation on a long-running operation. The server -// makes a best effort to cancel the operation, but success is not -// guaranteed. If the server doesn't support this method, it returns -// status.Code(err) == codes.Unimplemented. Clients can use -// Poll or other methods to check whether the cancellation succeeded or whether the -// operation completed despite cancellation. On successful cancellation, -// the operation is not deleted; instead, op.Poll returns an error -// with code Canceled. -func (op *Operation) Cancel(ctx context.Context, opts ...gax.CallOption) error { - return op.c.CancelOperation(ctx, &pb.CancelOperationRequest{Name: op.Name()}, opts...) -} - -// Delete deletes a long-running operation. This method indicates that the client is -// no longer interested in the operation result. It does not cancel the -// operation. If the server doesn't support this method, status.Code(err) == codes.Unimplemented. -func (op *Operation) Delete(ctx context.Context, opts ...gax.CallOption) error { - return op.c.DeleteOperation(ctx, &pb.DeleteOperationRequest{Name: op.Name()}, opts...) -} diff --git a/vendor/cloud.google.com/go/longrunning/tidyfix.go b/vendor/cloud.google.com/go/longrunning/tidyfix.go deleted file mode 100644 index d9a07f99e0..0000000000 --- a/vendor/cloud.google.com/go/longrunning/tidyfix.go +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// This file, and the {{.RootMod}} import, won't actually become part of -// the resultant binary. -//go:build modhack -// +build modhack - -package longrunning - -// Necessary for safely adding multi-module repo. See: https://github.com/golang/go/wiki/Modules#is-it-possible-to-add-a-module-to-a-multi-module-repository -import _ "cloud.google.com/go" diff --git a/vendor/cloud.google.com/go/migration.md b/vendor/cloud.google.com/go/migration.md deleted file mode 100644 index 224dcfa139..0000000000 --- a/vendor/cloud.google.com/go/migration.md +++ /dev/null @@ -1,50 +0,0 @@ -# go-genproto to google-cloud-go message type migration - -The message types for all of our client libraries are being migrated from the -`google.golang.org/genproto` [module](https://pkg.go.dev/google.golang.org/genproto) -to their respective product specific module in this repository. For example -this asset request type that was once found in [genproto](https://pkg.go.dev/google.golang.org/genproto@v0.0.0-20220908141613-51c1cc9bc6d0/googleapis/cloud/asset/v1p5beta1#ListAssetsRequest) -can now be found in directly in the [asset module](https://pkg.go.dev/cloud.google.com/go/asset/apiv1p5beta1/assetpb#ListAssetsRequest). - -Although the type definitions have moved, aliases have been left in the old -genproto packages to ensure a smooth non-breaking transition. - -## How do I migrate to the new packages? - -The easiest option is to run a migration tool at the root of our project. It is -like `go fix`, but specifically for this migration. Before running the tool it -is best to make sure any modules that have the prefix of `cloud.google.com/go` -are up to date. To run the tool, do the following: - -```bash -go run cloud.google.com/go/internal/aliasfix/cmd/aliasfix@latest . -go mod tidy -``` - -The tool should only change up to one line in the import statement per file. -This can also be done by hand if you prefer. - -## Do I have to migrate? - -Yes if you wish to keep using the newest versions of our client libraries with -the newest features -- You should migrate by the start of 2023. Until then we -will keep updating the aliases in go-genproto weekly. If you have an existing -workload that uses these client libraries and does not need to update its -dependencies there is no action to take. All existing written code will continue -to work. - -## Why are these types being moved - -1. This change will help simplify dependency trees over time. -2. The types will now be in product specific modules that are versioned - independently with semver. This is especially a benefit for users that rely - on multiple clients in a single application. Because message types are no - longer mono-packaged users are less likely to run into intermediate - dependency conflicts when updating dependencies. -3. Having all these types in one repository will help us ensure that unintended - changes are caught before they would be released. - -## Have questions? - -Please reach out to us on our [issue tracker](https://github.com/googleapis/google-cloud-go/issues/new?assignees=&labels=genproto-migration&template=migration-issue.md&title=package%3A+migration+help) -if you have any questions or concerns. diff --git a/vendor/cloud.google.com/go/monitoring/dashboard/apiv1/auxiliary.go b/vendor/cloud.google.com/go/monitoring/dashboard/apiv1/auxiliary.go deleted file mode 100644 index 2e8bd9cad9..0000000000 --- a/vendor/cloud.google.com/go/monitoring/dashboard/apiv1/auxiliary.go +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Code generated by protoc-gen-go_gapic. DO NOT EDIT. - -package dashboard - -import ( - dashboardpb "cloud.google.com/go/monitoring/dashboard/apiv1/dashboardpb" - "google.golang.org/api/iterator" -) - -// DashboardIterator manages a stream of *dashboardpb.Dashboard. -type DashboardIterator struct { - items []*dashboardpb.Dashboard - pageInfo *iterator.PageInfo - nextFunc func() error - - // Response is the raw response for the current page. - // It must be cast to the RPC response type. - // Calling Next() or InternalFetch() updates this value. - Response interface{} - - // InternalFetch is for use by the Google Cloud Libraries only. - // It is not part of the stable interface of this package. - // - // InternalFetch returns results from a single call to the underlying RPC. - // The number of results is no greater than pageSize. - // If there are no more results, nextPageToken is empty and err is nil. - InternalFetch func(pageSize int, pageToken string) (results []*dashboardpb.Dashboard, nextPageToken string, err error) -} - -// PageInfo supports pagination. See the [google.golang.org/api/iterator] package for details. -func (it *DashboardIterator) PageInfo() *iterator.PageInfo { - return it.pageInfo -} - -// Next returns the next result. Its second return value is iterator.Done if there are no more -// results. Once Next returns Done, all subsequent calls will return Done. -func (it *DashboardIterator) Next() (*dashboardpb.Dashboard, error) { - var item *dashboardpb.Dashboard - if err := it.nextFunc(); err != nil { - return item, err - } - item = it.items[0] - it.items = it.items[1:] - return item, nil -} - -func (it *DashboardIterator) bufLen() int { - return len(it.items) -} - -func (it *DashboardIterator) takeBuf() interface{} { - b := it.items - it.items = nil - return b -} diff --git a/vendor/cloud.google.com/go/monitoring/dashboard/apiv1/auxiliary_go123.go b/vendor/cloud.google.com/go/monitoring/dashboard/apiv1/auxiliary_go123.go deleted file mode 100644 index 5758c1fff0..0000000000 --- a/vendor/cloud.google.com/go/monitoring/dashboard/apiv1/auxiliary_go123.go +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Code generated by protoc-gen-go_gapic. DO NOT EDIT. - -//go:build go1.23 - -package dashboard - -import ( - "iter" - - dashboardpb "cloud.google.com/go/monitoring/dashboard/apiv1/dashboardpb" - "github.com/googleapis/gax-go/v2/iterator" -) - -// All returns an iterator. If an error is returned by the iterator, the -// iterator will stop after that iteration. -func (it *DashboardIterator) All() iter.Seq2[*dashboardpb.Dashboard, error] { - return iterator.RangeAdapter(it.Next) -} diff --git a/vendor/cloud.google.com/go/monitoring/dashboard/apiv1/dashboardpb/alertchart.pb.go b/vendor/cloud.google.com/go/monitoring/dashboard/apiv1/dashboardpb/alertchart.pb.go deleted file mode 100644 index 12d0b0b54a..0000000000 --- a/vendor/cloud.google.com/go/monitoring/dashboard/apiv1/dashboardpb/alertchart.pb.go +++ /dev/null @@ -1,173 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.35.2 -// protoc v4.25.7 -// source: google/monitoring/dashboard/v1/alertchart.proto - -package dashboardpb - -import ( - _ "google.golang.org/genproto/googleapis/api/annotations" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// A chart that displays alert policy data. -type AlertChart struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Required. The resource name of the alert policy. The format is: - // - // projects/[PROJECT_ID_OR_NUMBER]/alertPolicies/[ALERT_POLICY_ID] - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` -} - -func (x *AlertChart) Reset() { - *x = AlertChart{} - mi := &file_google_monitoring_dashboard_v1_alertchart_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *AlertChart) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*AlertChart) ProtoMessage() {} - -func (x *AlertChart) ProtoReflect() protoreflect.Message { - mi := &file_google_monitoring_dashboard_v1_alertchart_proto_msgTypes[0] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use AlertChart.ProtoReflect.Descriptor instead. -func (*AlertChart) Descriptor() ([]byte, []int) { - return file_google_monitoring_dashboard_v1_alertchart_proto_rawDescGZIP(), []int{0} -} - -func (x *AlertChart) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -var File_google_monitoring_dashboard_v1_alertchart_proto protoreflect.FileDescriptor - -var file_google_monitoring_dashboard_v1_alertchart_proto_rawDesc = []byte{ - 0x0a, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, - 0x69, 0x6e, 0x67, 0x2f, 0x64, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2f, 0x76, 0x31, - 0x2f, 0x61, 0x6c, 0x65, 0x72, 0x74, 0x63, 0x68, 0x61, 0x72, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x12, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, - 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x64, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2e, 0x76, - 0x31, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x66, 0x69, - 0x65, 0x6c, 0x64, 0x5f, 0x62, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x72, - 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x82, 0x01, - 0x0a, 0x0a, 0x41, 0x6c, 0x65, 0x72, 0x74, 0x43, 0x68, 0x61, 0x72, 0x74, 0x12, 0x17, 0x0a, 0x04, - 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, - 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x3a, 0x5b, 0xea, 0x41, 0x58, 0x0a, 0x25, 0x6d, 0x6f, 0x6e, 0x69, - 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, - 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x41, 0x6c, 0x65, 0x72, 0x74, 0x50, 0x6f, 0x6c, 0x69, 0x63, - 0x79, 0x12, 0x2f, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x7b, 0x70, 0x72, 0x6f, - 0x6a, 0x65, 0x63, 0x74, 0x7d, 0x2f, 0x61, 0x6c, 0x65, 0x72, 0x74, 0x50, 0x6f, 0x6c, 0x69, 0x63, - 0x69, 0x65, 0x73, 0x2f, 0x7b, 0x61, 0x6c, 0x65, 0x72, 0x74, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, - 0x79, 0x7d, 0x42, 0xf8, 0x01, 0x0a, 0x22, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x64, 0x61, 0x73, - 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2e, 0x76, 0x31, 0x42, 0x0f, 0x41, 0x6c, 0x65, 0x72, 0x74, - 0x43, 0x68, 0x61, 0x72, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x46, 0x63, 0x6c, - 0x6f, 0x75, 0x64, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, - 0x6f, 0x2f, 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x2f, 0x64, 0x61, 0x73, - 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2f, 0x61, 0x70, 0x69, 0x76, 0x31, 0x2f, 0x64, 0x61, 0x73, - 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x70, 0x62, 0x3b, 0x64, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, - 0x72, 0x64, 0x70, 0x62, 0xaa, 0x02, 0x24, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x43, 0x6c, - 0x6f, 0x75, 0x64, 0x2e, 0x4d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x44, - 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x24, 0x47, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x5c, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x5c, 0x4d, 0x6f, 0x6e, 0x69, 0x74, - 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x5c, 0x44, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x5c, - 0x56, 0x31, 0xea, 0x02, 0x28, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x3a, 0x3a, 0x43, 0x6c, 0x6f, - 0x75, 0x64, 0x3a, 0x3a, 0x4d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x3a, 0x3a, - 0x44, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_google_monitoring_dashboard_v1_alertchart_proto_rawDescOnce sync.Once - file_google_monitoring_dashboard_v1_alertchart_proto_rawDescData = file_google_monitoring_dashboard_v1_alertchart_proto_rawDesc -) - -func file_google_monitoring_dashboard_v1_alertchart_proto_rawDescGZIP() []byte { - file_google_monitoring_dashboard_v1_alertchart_proto_rawDescOnce.Do(func() { - file_google_monitoring_dashboard_v1_alertchart_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_monitoring_dashboard_v1_alertchart_proto_rawDescData) - }) - return file_google_monitoring_dashboard_v1_alertchart_proto_rawDescData -} - -var file_google_monitoring_dashboard_v1_alertchart_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_google_monitoring_dashboard_v1_alertchart_proto_goTypes = []any{ - (*AlertChart)(nil), // 0: google.monitoring.dashboard.v1.AlertChart -} -var file_google_monitoring_dashboard_v1_alertchart_proto_depIdxs = []int32{ - 0, // [0:0] is the sub-list for method output_type - 0, // [0:0] is the sub-list for method input_type - 0, // [0:0] is the sub-list for extension type_name - 0, // [0:0] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name -} - -func init() { file_google_monitoring_dashboard_v1_alertchart_proto_init() } -func file_google_monitoring_dashboard_v1_alertchart_proto_init() { - if File_google_monitoring_dashboard_v1_alertchart_proto != nil { - return - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_google_monitoring_dashboard_v1_alertchart_proto_rawDesc, - NumEnums: 0, - NumMessages: 1, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_google_monitoring_dashboard_v1_alertchart_proto_goTypes, - DependencyIndexes: file_google_monitoring_dashboard_v1_alertchart_proto_depIdxs, - MessageInfos: file_google_monitoring_dashboard_v1_alertchart_proto_msgTypes, - }.Build() - File_google_monitoring_dashboard_v1_alertchart_proto = out.File - file_google_monitoring_dashboard_v1_alertchart_proto_rawDesc = nil - file_google_monitoring_dashboard_v1_alertchart_proto_goTypes = nil - file_google_monitoring_dashboard_v1_alertchart_proto_depIdxs = nil -} diff --git a/vendor/cloud.google.com/go/monitoring/dashboard/apiv1/dashboardpb/collapsible_group.pb.go b/vendor/cloud.google.com/go/monitoring/dashboard/apiv1/dashboardpb/collapsible_group.pb.go deleted file mode 100644 index 5a853aef8b..0000000000 --- a/vendor/cloud.google.com/go/monitoring/dashboard/apiv1/dashboardpb/collapsible_group.pb.go +++ /dev/null @@ -1,163 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.35.2 -// protoc v4.25.7 -// source: google/monitoring/dashboard/v1/collapsible_group.proto - -package dashboardpb - -import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// A widget that groups the other widgets. All widgets that are within -// the area spanned by the grouping widget are considered member widgets. -type CollapsibleGroup struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The collapsed state of the widget on first page load. - Collapsed bool `protobuf:"varint,1,opt,name=collapsed,proto3" json:"collapsed,omitempty"` -} - -func (x *CollapsibleGroup) Reset() { - *x = CollapsibleGroup{} - mi := &file_google_monitoring_dashboard_v1_collapsible_group_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *CollapsibleGroup) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CollapsibleGroup) ProtoMessage() {} - -func (x *CollapsibleGroup) ProtoReflect() protoreflect.Message { - mi := &file_google_monitoring_dashboard_v1_collapsible_group_proto_msgTypes[0] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CollapsibleGroup.ProtoReflect.Descriptor instead. -func (*CollapsibleGroup) Descriptor() ([]byte, []int) { - return file_google_monitoring_dashboard_v1_collapsible_group_proto_rawDescGZIP(), []int{0} -} - -func (x *CollapsibleGroup) GetCollapsed() bool { - if x != nil { - return x.Collapsed - } - return false -} - -var File_google_monitoring_dashboard_v1_collapsible_group_proto protoreflect.FileDescriptor - -var file_google_monitoring_dashboard_v1_collapsible_group_proto_rawDesc = []byte{ - 0x0a, 0x36, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, - 0x69, 0x6e, 0x67, 0x2f, 0x64, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2f, 0x76, 0x31, - 0x2f, 0x63, 0x6f, 0x6c, 0x6c, 0x61, 0x70, 0x73, 0x69, 0x62, 0x6c, 0x65, 0x5f, 0x67, 0x72, 0x6f, - 0x75, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x64, 0x61, 0x73, 0x68, - 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2e, 0x76, 0x31, 0x22, 0x30, 0x0a, 0x10, 0x43, 0x6f, 0x6c, 0x6c, - 0x61, 0x70, 0x73, 0x69, 0x62, 0x6c, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x1c, 0x0a, 0x09, - 0x63, 0x6f, 0x6c, 0x6c, 0x61, 0x70, 0x73, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, - 0x09, 0x63, 0x6f, 0x6c, 0x6c, 0x61, 0x70, 0x73, 0x65, 0x64, 0x42, 0xfe, 0x01, 0x0a, 0x22, 0x63, - 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, - 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x64, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2e, 0x76, - 0x31, 0x42, 0x15, 0x43, 0x6f, 0x6c, 0x6c, 0x61, 0x70, 0x73, 0x69, 0x62, 0x6c, 0x65, 0x47, 0x72, - 0x6f, 0x75, 0x70, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x46, 0x63, 0x6c, 0x6f, 0x75, - 0x64, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x2f, - 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x2f, 0x64, 0x61, 0x73, 0x68, 0x62, - 0x6f, 0x61, 0x72, 0x64, 0x2f, 0x61, 0x70, 0x69, 0x76, 0x31, 0x2f, 0x64, 0x61, 0x73, 0x68, 0x62, - 0x6f, 0x61, 0x72, 0x64, 0x70, 0x62, 0x3b, 0x64, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, - 0x70, 0x62, 0xaa, 0x02, 0x24, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x43, 0x6c, 0x6f, 0x75, - 0x64, 0x2e, 0x4d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x44, 0x61, 0x73, - 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x24, 0x47, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x5c, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x5c, 0x4d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, - 0x69, 0x6e, 0x67, 0x5c, 0x44, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x5c, 0x56, 0x31, - 0xea, 0x02, 0x28, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x3a, 0x3a, 0x43, 0x6c, 0x6f, 0x75, 0x64, - 0x3a, 0x3a, 0x4d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x3a, 0x3a, 0x44, 0x61, - 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x33, -} - -var ( - file_google_monitoring_dashboard_v1_collapsible_group_proto_rawDescOnce sync.Once - file_google_monitoring_dashboard_v1_collapsible_group_proto_rawDescData = file_google_monitoring_dashboard_v1_collapsible_group_proto_rawDesc -) - -func file_google_monitoring_dashboard_v1_collapsible_group_proto_rawDescGZIP() []byte { - file_google_monitoring_dashboard_v1_collapsible_group_proto_rawDescOnce.Do(func() { - file_google_monitoring_dashboard_v1_collapsible_group_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_monitoring_dashboard_v1_collapsible_group_proto_rawDescData) - }) - return file_google_monitoring_dashboard_v1_collapsible_group_proto_rawDescData -} - -var file_google_monitoring_dashboard_v1_collapsible_group_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_google_monitoring_dashboard_v1_collapsible_group_proto_goTypes = []any{ - (*CollapsibleGroup)(nil), // 0: google.monitoring.dashboard.v1.CollapsibleGroup -} -var file_google_monitoring_dashboard_v1_collapsible_group_proto_depIdxs = []int32{ - 0, // [0:0] is the sub-list for method output_type - 0, // [0:0] is the sub-list for method input_type - 0, // [0:0] is the sub-list for extension type_name - 0, // [0:0] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name -} - -func init() { file_google_monitoring_dashboard_v1_collapsible_group_proto_init() } -func file_google_monitoring_dashboard_v1_collapsible_group_proto_init() { - if File_google_monitoring_dashboard_v1_collapsible_group_proto != nil { - return - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_google_monitoring_dashboard_v1_collapsible_group_proto_rawDesc, - NumEnums: 0, - NumMessages: 1, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_google_monitoring_dashboard_v1_collapsible_group_proto_goTypes, - DependencyIndexes: file_google_monitoring_dashboard_v1_collapsible_group_proto_depIdxs, - MessageInfos: file_google_monitoring_dashboard_v1_collapsible_group_proto_msgTypes, - }.Build() - File_google_monitoring_dashboard_v1_collapsible_group_proto = out.File - file_google_monitoring_dashboard_v1_collapsible_group_proto_rawDesc = nil - file_google_monitoring_dashboard_v1_collapsible_group_proto_goTypes = nil - file_google_monitoring_dashboard_v1_collapsible_group_proto_depIdxs = nil -} diff --git a/vendor/cloud.google.com/go/monitoring/dashboard/apiv1/dashboardpb/common.pb.go b/vendor/cloud.google.com/go/monitoring/dashboard/apiv1/dashboardpb/common.pb.go deleted file mode 100644 index e76324e25d..0000000000 --- a/vendor/cloud.google.com/go/monitoring/dashboard/apiv1/dashboardpb/common.pb.go +++ /dev/null @@ -1,1071 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.35.2 -// protoc v4.25.7 -// source: google/monitoring/dashboard/v1/common.proto - -package dashboardpb - -import ( - interval "google.golang.org/genproto/googleapis/type/interval" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - durationpb "google.golang.org/protobuf/types/known/durationpb" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// The `Aligner` specifies the operation that will be applied to the data -// points in each alignment period in a time series. Except for -// `ALIGN_NONE`, which specifies that no operation be applied, each alignment -// operation replaces the set of data values in each alignment period with -// a single value: the result of applying the operation to the data values. -// An aligned time series has a single data value at the end of each -// `alignment_period`. -// -// An alignment operation can change the data type of the values, too. For -// example, if you apply a counting operation to boolean values, the data -// `value_type` in the original time series is `BOOLEAN`, but the `value_type` -// in the aligned result is `INT64`. -type Aggregation_Aligner int32 - -const ( - // No alignment. Raw data is returned. Not valid if cross-series reduction - // is requested. The `value_type` of the result is the same as the - // `value_type` of the input. - Aggregation_ALIGN_NONE Aggregation_Aligner = 0 - // Align and convert to - // [DELTA][google.api.MetricDescriptor.MetricKind.DELTA]. - // The output is `delta = y1 - y0`. - // - // This alignment is valid for - // [CUMULATIVE][google.api.MetricDescriptor.MetricKind.CUMULATIVE] and - // `DELTA` metrics. If the selected alignment period results in periods - // with no data, then the aligned value for such a period is created by - // interpolation. The `value_type` of the aligned result is the same as - // the `value_type` of the input. - Aggregation_ALIGN_DELTA Aggregation_Aligner = 1 - // Align and convert to a rate. The result is computed as - // `rate = (y1 - y0)/(t1 - t0)`, or "delta over time". - // Think of this aligner as providing the slope of the line that passes - // through the value at the start and at the end of the `alignment_period`. - // - // This aligner is valid for `CUMULATIVE` - // and `DELTA` metrics with numeric values. If the selected alignment - // period results in periods with no data, then the aligned value for - // such a period is created by interpolation. The output is a `GAUGE` - // metric with `value_type` `DOUBLE`. - // - // If, by "rate", you mean "percentage change", see the - // `ALIGN_PERCENT_CHANGE` aligner instead. - Aggregation_ALIGN_RATE Aggregation_Aligner = 2 - // Align by interpolating between adjacent points around the alignment - // period boundary. This aligner is valid for `GAUGE` metrics with - // numeric values. The `value_type` of the aligned result is the same as the - // `value_type` of the input. - Aggregation_ALIGN_INTERPOLATE Aggregation_Aligner = 3 - // Align by moving the most recent data point before the end of the - // alignment period to the boundary at the end of the alignment - // period. This aligner is valid for `GAUGE` metrics. The `value_type` of - // the aligned result is the same as the `value_type` of the input. - Aggregation_ALIGN_NEXT_OLDER Aggregation_Aligner = 4 - // Align the time series by returning the minimum value in each alignment - // period. This aligner is valid for `GAUGE` and `DELTA` metrics with - // numeric values. The `value_type` of the aligned result is the same as - // the `value_type` of the input. - Aggregation_ALIGN_MIN Aggregation_Aligner = 10 - // Align the time series by returning the maximum value in each alignment - // period. This aligner is valid for `GAUGE` and `DELTA` metrics with - // numeric values. The `value_type` of the aligned result is the same as - // the `value_type` of the input. - Aggregation_ALIGN_MAX Aggregation_Aligner = 11 - // Align the time series by returning the mean value in each alignment - // period. This aligner is valid for `GAUGE` and `DELTA` metrics with - // numeric values. The `value_type` of the aligned result is `DOUBLE`. - Aggregation_ALIGN_MEAN Aggregation_Aligner = 12 - // Align the time series by returning the number of values in each alignment - // period. This aligner is valid for `GAUGE` and `DELTA` metrics with - // numeric or Boolean values. The `value_type` of the aligned result is - // `INT64`. - Aggregation_ALIGN_COUNT Aggregation_Aligner = 13 - // Align the time series by returning the sum of the values in each - // alignment period. This aligner is valid for `GAUGE` and `DELTA` - // metrics with numeric and distribution values. The `value_type` of the - // aligned result is the same as the `value_type` of the input. - Aggregation_ALIGN_SUM Aggregation_Aligner = 14 - // Align the time series by returning the standard deviation of the values - // in each alignment period. This aligner is valid for `GAUGE` and - // `DELTA` metrics with numeric values. The `value_type` of the output is - // `DOUBLE`. - Aggregation_ALIGN_STDDEV Aggregation_Aligner = 15 - // Align the time series by returning the number of `True` values in - // each alignment period. This aligner is valid for `GAUGE` metrics with - // Boolean values. The `value_type` of the output is `INT64`. - Aggregation_ALIGN_COUNT_TRUE Aggregation_Aligner = 16 - // Align the time series by returning the number of `False` values in - // each alignment period. This aligner is valid for `GAUGE` metrics with - // Boolean values. The `value_type` of the output is `INT64`. - Aggregation_ALIGN_COUNT_FALSE Aggregation_Aligner = 24 - // Align the time series by returning the ratio of the number of `True` - // values to the total number of values in each alignment period. This - // aligner is valid for `GAUGE` metrics with Boolean values. The output - // value is in the range [0.0, 1.0] and has `value_type` `DOUBLE`. - Aggregation_ALIGN_FRACTION_TRUE Aggregation_Aligner = 17 - // Align the time series by using [percentile - // aggregation](https://en.wikipedia.org/wiki/Percentile). The resulting - // data point in each alignment period is the 99th percentile of all data - // points in the period. This aligner is valid for `GAUGE` and `DELTA` - // metrics with distribution values. The output is a `GAUGE` metric with - // `value_type` `DOUBLE`. - Aggregation_ALIGN_PERCENTILE_99 Aggregation_Aligner = 18 - // Align the time series by using [percentile - // aggregation](https://en.wikipedia.org/wiki/Percentile). The resulting - // data point in each alignment period is the 95th percentile of all data - // points in the period. This aligner is valid for `GAUGE` and `DELTA` - // metrics with distribution values. The output is a `GAUGE` metric with - // `value_type` `DOUBLE`. - Aggregation_ALIGN_PERCENTILE_95 Aggregation_Aligner = 19 - // Align the time series by using [percentile - // aggregation](https://en.wikipedia.org/wiki/Percentile). The resulting - // data point in each alignment period is the 50th percentile of all data - // points in the period. This aligner is valid for `GAUGE` and `DELTA` - // metrics with distribution values. The output is a `GAUGE` metric with - // `value_type` `DOUBLE`. - Aggregation_ALIGN_PERCENTILE_50 Aggregation_Aligner = 20 - // Align the time series by using [percentile - // aggregation](https://en.wikipedia.org/wiki/Percentile). The resulting - // data point in each alignment period is the 5th percentile of all data - // points in the period. This aligner is valid for `GAUGE` and `DELTA` - // metrics with distribution values. The output is a `GAUGE` metric with - // `value_type` `DOUBLE`. - Aggregation_ALIGN_PERCENTILE_05 Aggregation_Aligner = 21 - // Align and convert to a percentage change. This aligner is valid for - // `GAUGE` and `DELTA` metrics with numeric values. This alignment returns - // `((current - previous)/previous) * 100`, where the value of `previous` is - // determined based on the `alignment_period`. - // - // If the values of `current` and `previous` are both 0, then the returned - // value is 0. If only `previous` is 0, the returned value is infinity. - // - // A 10-minute moving mean is computed at each point of the alignment period - // prior to the above calculation to smooth the metric and prevent false - // positives from very short-lived spikes. The moving mean is only - // applicable for data whose values are `>= 0`. Any values `< 0` are - // treated as a missing datapoint, and are ignored. While `DELTA` - // metrics are accepted by this alignment, special care should be taken that - // the values for the metric will always be positive. The output is a - // `GAUGE` metric with `value_type` `DOUBLE`. - Aggregation_ALIGN_PERCENT_CHANGE Aggregation_Aligner = 23 -) - -// Enum value maps for Aggregation_Aligner. -var ( - Aggregation_Aligner_name = map[int32]string{ - 0: "ALIGN_NONE", - 1: "ALIGN_DELTA", - 2: "ALIGN_RATE", - 3: "ALIGN_INTERPOLATE", - 4: "ALIGN_NEXT_OLDER", - 10: "ALIGN_MIN", - 11: "ALIGN_MAX", - 12: "ALIGN_MEAN", - 13: "ALIGN_COUNT", - 14: "ALIGN_SUM", - 15: "ALIGN_STDDEV", - 16: "ALIGN_COUNT_TRUE", - 24: "ALIGN_COUNT_FALSE", - 17: "ALIGN_FRACTION_TRUE", - 18: "ALIGN_PERCENTILE_99", - 19: "ALIGN_PERCENTILE_95", - 20: "ALIGN_PERCENTILE_50", - 21: "ALIGN_PERCENTILE_05", - 23: "ALIGN_PERCENT_CHANGE", - } - Aggregation_Aligner_value = map[string]int32{ - "ALIGN_NONE": 0, - "ALIGN_DELTA": 1, - "ALIGN_RATE": 2, - "ALIGN_INTERPOLATE": 3, - "ALIGN_NEXT_OLDER": 4, - "ALIGN_MIN": 10, - "ALIGN_MAX": 11, - "ALIGN_MEAN": 12, - "ALIGN_COUNT": 13, - "ALIGN_SUM": 14, - "ALIGN_STDDEV": 15, - "ALIGN_COUNT_TRUE": 16, - "ALIGN_COUNT_FALSE": 24, - "ALIGN_FRACTION_TRUE": 17, - "ALIGN_PERCENTILE_99": 18, - "ALIGN_PERCENTILE_95": 19, - "ALIGN_PERCENTILE_50": 20, - "ALIGN_PERCENTILE_05": 21, - "ALIGN_PERCENT_CHANGE": 23, - } -) - -func (x Aggregation_Aligner) Enum() *Aggregation_Aligner { - p := new(Aggregation_Aligner) - *p = x - return p -} - -func (x Aggregation_Aligner) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (Aggregation_Aligner) Descriptor() protoreflect.EnumDescriptor { - return file_google_monitoring_dashboard_v1_common_proto_enumTypes[0].Descriptor() -} - -func (Aggregation_Aligner) Type() protoreflect.EnumType { - return &file_google_monitoring_dashboard_v1_common_proto_enumTypes[0] -} - -func (x Aggregation_Aligner) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use Aggregation_Aligner.Descriptor instead. -func (Aggregation_Aligner) EnumDescriptor() ([]byte, []int) { - return file_google_monitoring_dashboard_v1_common_proto_rawDescGZIP(), []int{0, 0} -} - -// A Reducer operation describes how to aggregate data points from multiple -// time series into a single time series, where the value of each data point -// in the resulting series is a function of all the already aligned values in -// the input time series. -type Aggregation_Reducer int32 - -const ( - // No cross-time series reduction. The output of the `Aligner` is - // returned. - Aggregation_REDUCE_NONE Aggregation_Reducer = 0 - // Reduce by computing the mean value across time series for each - // alignment period. This reducer is valid for - // [DELTA][google.api.MetricDescriptor.MetricKind.DELTA] and - // [GAUGE][google.api.MetricDescriptor.MetricKind.GAUGE] metrics with - // numeric or distribution values. The `value_type` of the output is - // [DOUBLE][google.api.MetricDescriptor.ValueType.DOUBLE]. - Aggregation_REDUCE_MEAN Aggregation_Reducer = 1 - // Reduce by computing the minimum value across time series for each - // alignment period. This reducer is valid for `DELTA` and `GAUGE` metrics - // with numeric values. The `value_type` of the output is the same as the - // `value_type` of the input. - Aggregation_REDUCE_MIN Aggregation_Reducer = 2 - // Reduce by computing the maximum value across time series for each - // alignment period. This reducer is valid for `DELTA` and `GAUGE` metrics - // with numeric values. The `value_type` of the output is the same as the - // `value_type` of the input. - Aggregation_REDUCE_MAX Aggregation_Reducer = 3 - // Reduce by computing the sum across time series for each - // alignment period. This reducer is valid for `DELTA` and `GAUGE` metrics - // with numeric and distribution values. The `value_type` of the output is - // the same as the `value_type` of the input. - Aggregation_REDUCE_SUM Aggregation_Reducer = 4 - // Reduce by computing the standard deviation across time series - // for each alignment period. This reducer is valid for `DELTA` and - // `GAUGE` metrics with numeric or distribution values. The `value_type` - // of the output is `DOUBLE`. - Aggregation_REDUCE_STDDEV Aggregation_Reducer = 5 - // Reduce by computing the number of data points across time series - // for each alignment period. This reducer is valid for `DELTA` and - // `GAUGE` metrics of numeric, Boolean, distribution, and string - // `value_type`. The `value_type` of the output is `INT64`. - Aggregation_REDUCE_COUNT Aggregation_Reducer = 6 - // Reduce by computing the number of `True`-valued data points across time - // series for each alignment period. This reducer is valid for `DELTA` and - // `GAUGE` metrics of Boolean `value_type`. The `value_type` of the output - // is `INT64`. - Aggregation_REDUCE_COUNT_TRUE Aggregation_Reducer = 7 - // Reduce by computing the number of `False`-valued data points across time - // series for each alignment period. This reducer is valid for `DELTA` and - // `GAUGE` metrics of Boolean `value_type`. The `value_type` of the output - // is `INT64`. - Aggregation_REDUCE_COUNT_FALSE Aggregation_Reducer = 15 - // Reduce by computing the ratio of the number of `True`-valued data points - // to the total number of data points for each alignment period. This - // reducer is valid for `DELTA` and `GAUGE` metrics of Boolean `value_type`. - // The output value is in the range [0.0, 1.0] and has `value_type` - // `DOUBLE`. - Aggregation_REDUCE_FRACTION_TRUE Aggregation_Reducer = 8 - // Reduce by computing the [99th - // percentile](https://en.wikipedia.org/wiki/Percentile) of data points - // across time series for each alignment period. This reducer is valid for - // `GAUGE` and `DELTA` metrics of numeric and distribution type. The value - // of the output is `DOUBLE`. - Aggregation_REDUCE_PERCENTILE_99 Aggregation_Reducer = 9 - // Reduce by computing the [95th - // percentile](https://en.wikipedia.org/wiki/Percentile) of data points - // across time series for each alignment period. This reducer is valid for - // `GAUGE` and `DELTA` metrics of numeric and distribution type. The value - // of the output is `DOUBLE`. - Aggregation_REDUCE_PERCENTILE_95 Aggregation_Reducer = 10 - // Reduce by computing the [50th - // percentile](https://en.wikipedia.org/wiki/Percentile) of data points - // across time series for each alignment period. This reducer is valid for - // `GAUGE` and `DELTA` metrics of numeric and distribution type. The value - // of the output is `DOUBLE`. - Aggregation_REDUCE_PERCENTILE_50 Aggregation_Reducer = 11 - // Reduce by computing the [5th - // percentile](https://en.wikipedia.org/wiki/Percentile) of data points - // across time series for each alignment period. This reducer is valid for - // `GAUGE` and `DELTA` metrics of numeric and distribution type. The value - // of the output is `DOUBLE`. - Aggregation_REDUCE_PERCENTILE_05 Aggregation_Reducer = 12 -) - -// Enum value maps for Aggregation_Reducer. -var ( - Aggregation_Reducer_name = map[int32]string{ - 0: "REDUCE_NONE", - 1: "REDUCE_MEAN", - 2: "REDUCE_MIN", - 3: "REDUCE_MAX", - 4: "REDUCE_SUM", - 5: "REDUCE_STDDEV", - 6: "REDUCE_COUNT", - 7: "REDUCE_COUNT_TRUE", - 15: "REDUCE_COUNT_FALSE", - 8: "REDUCE_FRACTION_TRUE", - 9: "REDUCE_PERCENTILE_99", - 10: "REDUCE_PERCENTILE_95", - 11: "REDUCE_PERCENTILE_50", - 12: "REDUCE_PERCENTILE_05", - } - Aggregation_Reducer_value = map[string]int32{ - "REDUCE_NONE": 0, - "REDUCE_MEAN": 1, - "REDUCE_MIN": 2, - "REDUCE_MAX": 3, - "REDUCE_SUM": 4, - "REDUCE_STDDEV": 5, - "REDUCE_COUNT": 6, - "REDUCE_COUNT_TRUE": 7, - "REDUCE_COUNT_FALSE": 15, - "REDUCE_FRACTION_TRUE": 8, - "REDUCE_PERCENTILE_99": 9, - "REDUCE_PERCENTILE_95": 10, - "REDUCE_PERCENTILE_50": 11, - "REDUCE_PERCENTILE_05": 12, - } -) - -func (x Aggregation_Reducer) Enum() *Aggregation_Reducer { - p := new(Aggregation_Reducer) - *p = x - return p -} - -func (x Aggregation_Reducer) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (Aggregation_Reducer) Descriptor() protoreflect.EnumDescriptor { - return file_google_monitoring_dashboard_v1_common_proto_enumTypes[1].Descriptor() -} - -func (Aggregation_Reducer) Type() protoreflect.EnumType { - return &file_google_monitoring_dashboard_v1_common_proto_enumTypes[1] -} - -func (x Aggregation_Reducer) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use Aggregation_Reducer.Descriptor instead. -func (Aggregation_Reducer) EnumDescriptor() ([]byte, []int) { - return file_google_monitoring_dashboard_v1_common_proto_rawDescGZIP(), []int{0, 1} -} - -// The value reducers that can be applied to a `PickTimeSeriesFilter`. -type PickTimeSeriesFilter_Method int32 - -const ( - // Not allowed. You must specify a different `Method` if you specify a - // `PickTimeSeriesFilter`. - PickTimeSeriesFilter_METHOD_UNSPECIFIED PickTimeSeriesFilter_Method = 0 - // Select the mean of all values. - PickTimeSeriesFilter_METHOD_MEAN PickTimeSeriesFilter_Method = 1 - // Select the maximum value. - PickTimeSeriesFilter_METHOD_MAX PickTimeSeriesFilter_Method = 2 - // Select the minimum value. - PickTimeSeriesFilter_METHOD_MIN PickTimeSeriesFilter_Method = 3 - // Compute the sum of all values. - PickTimeSeriesFilter_METHOD_SUM PickTimeSeriesFilter_Method = 4 - // Select the most recent value. - PickTimeSeriesFilter_METHOD_LATEST PickTimeSeriesFilter_Method = 5 -) - -// Enum value maps for PickTimeSeriesFilter_Method. -var ( - PickTimeSeriesFilter_Method_name = map[int32]string{ - 0: "METHOD_UNSPECIFIED", - 1: "METHOD_MEAN", - 2: "METHOD_MAX", - 3: "METHOD_MIN", - 4: "METHOD_SUM", - 5: "METHOD_LATEST", - } - PickTimeSeriesFilter_Method_value = map[string]int32{ - "METHOD_UNSPECIFIED": 0, - "METHOD_MEAN": 1, - "METHOD_MAX": 2, - "METHOD_MIN": 3, - "METHOD_SUM": 4, - "METHOD_LATEST": 5, - } -) - -func (x PickTimeSeriesFilter_Method) Enum() *PickTimeSeriesFilter_Method { - p := new(PickTimeSeriesFilter_Method) - *p = x - return p -} - -func (x PickTimeSeriesFilter_Method) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (PickTimeSeriesFilter_Method) Descriptor() protoreflect.EnumDescriptor { - return file_google_monitoring_dashboard_v1_common_proto_enumTypes[2].Descriptor() -} - -func (PickTimeSeriesFilter_Method) Type() protoreflect.EnumType { - return &file_google_monitoring_dashboard_v1_common_proto_enumTypes[2] -} - -func (x PickTimeSeriesFilter_Method) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use PickTimeSeriesFilter_Method.Descriptor instead. -func (PickTimeSeriesFilter_Method) EnumDescriptor() ([]byte, []int) { - return file_google_monitoring_dashboard_v1_common_proto_rawDescGZIP(), []int{1, 0} -} - -// Describes the ranking directions. -type PickTimeSeriesFilter_Direction int32 - -const ( - // Not allowed. You must specify a different `Direction` if you specify a - // `PickTimeSeriesFilter`. - PickTimeSeriesFilter_DIRECTION_UNSPECIFIED PickTimeSeriesFilter_Direction = 0 - // Pass the highest `num_time_series` ranking inputs. - PickTimeSeriesFilter_TOP PickTimeSeriesFilter_Direction = 1 - // Pass the lowest `num_time_series` ranking inputs. - PickTimeSeriesFilter_BOTTOM PickTimeSeriesFilter_Direction = 2 -) - -// Enum value maps for PickTimeSeriesFilter_Direction. -var ( - PickTimeSeriesFilter_Direction_name = map[int32]string{ - 0: "DIRECTION_UNSPECIFIED", - 1: "TOP", - 2: "BOTTOM", - } - PickTimeSeriesFilter_Direction_value = map[string]int32{ - "DIRECTION_UNSPECIFIED": 0, - "TOP": 1, - "BOTTOM": 2, - } -) - -func (x PickTimeSeriesFilter_Direction) Enum() *PickTimeSeriesFilter_Direction { - p := new(PickTimeSeriesFilter_Direction) - *p = x - return p -} - -func (x PickTimeSeriesFilter_Direction) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (PickTimeSeriesFilter_Direction) Descriptor() protoreflect.EnumDescriptor { - return file_google_monitoring_dashboard_v1_common_proto_enumTypes[3].Descriptor() -} - -func (PickTimeSeriesFilter_Direction) Type() protoreflect.EnumType { - return &file_google_monitoring_dashboard_v1_common_proto_enumTypes[3] -} - -func (x PickTimeSeriesFilter_Direction) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use PickTimeSeriesFilter_Direction.Descriptor instead. -func (PickTimeSeriesFilter_Direction) EnumDescriptor() ([]byte, []int) { - return file_google_monitoring_dashboard_v1_common_proto_rawDescGZIP(), []int{1, 1} -} - -// The filter methods that can be applied to a stream. -type StatisticalTimeSeriesFilter_Method int32 - -const ( - // Not allowed in well-formed requests. - StatisticalTimeSeriesFilter_METHOD_UNSPECIFIED StatisticalTimeSeriesFilter_Method = 0 - // Compute the outlier score of each stream. - StatisticalTimeSeriesFilter_METHOD_CLUSTER_OUTLIER StatisticalTimeSeriesFilter_Method = 1 -) - -// Enum value maps for StatisticalTimeSeriesFilter_Method. -var ( - StatisticalTimeSeriesFilter_Method_name = map[int32]string{ - 0: "METHOD_UNSPECIFIED", - 1: "METHOD_CLUSTER_OUTLIER", - } - StatisticalTimeSeriesFilter_Method_value = map[string]int32{ - "METHOD_UNSPECIFIED": 0, - "METHOD_CLUSTER_OUTLIER": 1, - } -) - -func (x StatisticalTimeSeriesFilter_Method) Enum() *StatisticalTimeSeriesFilter_Method { - p := new(StatisticalTimeSeriesFilter_Method) - *p = x - return p -} - -func (x StatisticalTimeSeriesFilter_Method) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (StatisticalTimeSeriesFilter_Method) Descriptor() protoreflect.EnumDescriptor { - return file_google_monitoring_dashboard_v1_common_proto_enumTypes[4].Descriptor() -} - -func (StatisticalTimeSeriesFilter_Method) Type() protoreflect.EnumType { - return &file_google_monitoring_dashboard_v1_common_proto_enumTypes[4] -} - -func (x StatisticalTimeSeriesFilter_Method) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use StatisticalTimeSeriesFilter_Method.Descriptor instead. -func (StatisticalTimeSeriesFilter_Method) EnumDescriptor() ([]byte, []int) { - return file_google_monitoring_dashboard_v1_common_proto_rawDescGZIP(), []int{2, 0} -} - -// Describes how to combine multiple time series to provide a different view of -// the data. Aggregation of time series is done in two steps. First, each time -// series in the set is _aligned_ to the same time interval boundaries, then the -// set of time series is optionally _reduced_ in number. -// -// Alignment consists of applying the `per_series_aligner` operation -// to each time series after its data has been divided into regular -// `alignment_period` time intervals. This process takes _all_ of the data -// points in an alignment period, applies a mathematical transformation such as -// averaging, minimum, maximum, delta, etc., and converts them into a single -// data point per period. -// -// Reduction is when the aligned and transformed time series can optionally be -// combined, reducing the number of time series through similar mathematical -// transformations. Reduction involves applying a `cross_series_reducer` to -// all the time series, optionally sorting the time series into subsets with -// `group_by_fields`, and applying the reducer to each subset. -// -// The raw time series data can contain a huge amount of information from -// multiple sources. Alignment and reduction transforms this mass of data into -// a more manageable and representative collection of data, for example "the -// 95% latency across the average of all tasks in a cluster". This -// representative data can be more easily graphed and comprehended, and the -// individual time series data is still available for later drilldown. For more -// details, see [Filtering and -// aggregation](https://cloud.google.com/monitoring/api/v3/aggregation). -type Aggregation struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The `alignment_period` specifies a time interval, in seconds, that is used - // to divide the data in all the - // [time series][google.monitoring.v3.TimeSeries] into consistent blocks of - // time. This will be done before the per-series aligner can be applied to - // the data. - // - // The value must be at least 60 seconds. If a per-series aligner other than - // `ALIGN_NONE` is specified, this field is required or an error is returned. - // If no per-series aligner is specified, or the aligner `ALIGN_NONE` is - // specified, then this field is ignored. - // - // The maximum value of the `alignment_period` is 2 years, or 104 weeks. - AlignmentPeriod *durationpb.Duration `protobuf:"bytes,1,opt,name=alignment_period,json=alignmentPeriod,proto3" json:"alignment_period,omitempty"` - // An `Aligner` describes how to bring the data points in a single - // time series into temporal alignment. Except for `ALIGN_NONE`, all - // alignments cause all the data points in an `alignment_period` to be - // mathematically grouped together, resulting in a single data point for - // each `alignment_period` with end timestamp at the end of the period. - // - // Not all alignment operations may be applied to all time series. The valid - // choices depend on the `metric_kind` and `value_type` of the original time - // series. Alignment can change the `metric_kind` or the `value_type` of - // the time series. - // - // Time series data must be aligned in order to perform cross-time - // series reduction. If `cross_series_reducer` is specified, then - // `per_series_aligner` must be specified and not equal to `ALIGN_NONE` - // and `alignment_period` must be specified; otherwise, an error is - // returned. - PerSeriesAligner Aggregation_Aligner `protobuf:"varint,2,opt,name=per_series_aligner,json=perSeriesAligner,proto3,enum=google.monitoring.dashboard.v1.Aggregation_Aligner" json:"per_series_aligner,omitempty"` - // The reduction operation to be used to combine time series into a single - // time series, where the value of each data point in the resulting series is - // a function of all the already aligned values in the input time series. - // - // Not all reducer operations can be applied to all time series. The valid - // choices depend on the `metric_kind` and the `value_type` of the original - // time series. Reduction can yield a time series with a different - // `metric_kind` or `value_type` than the input time series. - // - // Time series data must first be aligned (see `per_series_aligner`) in order - // to perform cross-time series reduction. If `cross_series_reducer` is - // specified, then `per_series_aligner` must be specified, and must not be - // `ALIGN_NONE`. An `alignment_period` must also be specified; otherwise, an - // error is returned. - CrossSeriesReducer Aggregation_Reducer `protobuf:"varint,4,opt,name=cross_series_reducer,json=crossSeriesReducer,proto3,enum=google.monitoring.dashboard.v1.Aggregation_Reducer" json:"cross_series_reducer,omitempty"` - // The set of fields to preserve when `cross_series_reducer` is - // specified. The `group_by_fields` determine how the time series are - // partitioned into subsets prior to applying the aggregation - // operation. Each subset contains time series that have the same - // value for each of the grouping fields. Each individual time - // series is a member of exactly one subset. The - // `cross_series_reducer` is applied to each subset of time series. - // It is not possible to reduce across different resource types, so - // this field implicitly contains `resource.type`. Fields not - // specified in `group_by_fields` are aggregated away. If - // `group_by_fields` is not specified and all the time series have - // the same resource type, then the time series are aggregated into - // a single output time series. If `cross_series_reducer` is not - // defined, this field is ignored. - GroupByFields []string `protobuf:"bytes,5,rep,name=group_by_fields,json=groupByFields,proto3" json:"group_by_fields,omitempty"` -} - -func (x *Aggregation) Reset() { - *x = Aggregation{} - mi := &file_google_monitoring_dashboard_v1_common_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *Aggregation) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Aggregation) ProtoMessage() {} - -func (x *Aggregation) ProtoReflect() protoreflect.Message { - mi := &file_google_monitoring_dashboard_v1_common_proto_msgTypes[0] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Aggregation.ProtoReflect.Descriptor instead. -func (*Aggregation) Descriptor() ([]byte, []int) { - return file_google_monitoring_dashboard_v1_common_proto_rawDescGZIP(), []int{0} -} - -func (x *Aggregation) GetAlignmentPeriod() *durationpb.Duration { - if x != nil { - return x.AlignmentPeriod - } - return nil -} - -func (x *Aggregation) GetPerSeriesAligner() Aggregation_Aligner { - if x != nil { - return x.PerSeriesAligner - } - return Aggregation_ALIGN_NONE -} - -func (x *Aggregation) GetCrossSeriesReducer() Aggregation_Reducer { - if x != nil { - return x.CrossSeriesReducer - } - return Aggregation_REDUCE_NONE -} - -func (x *Aggregation) GetGroupByFields() []string { - if x != nil { - return x.GroupByFields - } - return nil -} - -// Describes a ranking-based time series filter. Each input time series is -// ranked with an aligner. The filter will allow up to `num_time_series` time -// series to pass through it, selecting them based on the relative ranking. -// -// For example, if `ranking_method` is `METHOD_MEAN`,`direction` is `BOTTOM`, -// and `num_time_series` is 3, then the 3 times series with the lowest mean -// values will pass through the filter. -type PickTimeSeriesFilter struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // `ranking_method` is applied to each time series independently to produce - // the value which will be used to compare the time series to other time - // series. - RankingMethod PickTimeSeriesFilter_Method `protobuf:"varint,1,opt,name=ranking_method,json=rankingMethod,proto3,enum=google.monitoring.dashboard.v1.PickTimeSeriesFilter_Method" json:"ranking_method,omitempty"` - // How many time series to allow to pass through the filter. - NumTimeSeries int32 `protobuf:"varint,2,opt,name=num_time_series,json=numTimeSeries,proto3" json:"num_time_series,omitempty"` - // How to use the ranking to select time series that pass through the filter. - Direction PickTimeSeriesFilter_Direction `protobuf:"varint,3,opt,name=direction,proto3,enum=google.monitoring.dashboard.v1.PickTimeSeriesFilter_Direction" json:"direction,omitempty"` - // Select the top N streams/time series within this time interval - Interval *interval.Interval `protobuf:"bytes,4,opt,name=interval,proto3" json:"interval,omitempty"` -} - -func (x *PickTimeSeriesFilter) Reset() { - *x = PickTimeSeriesFilter{} - mi := &file_google_monitoring_dashboard_v1_common_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *PickTimeSeriesFilter) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*PickTimeSeriesFilter) ProtoMessage() {} - -func (x *PickTimeSeriesFilter) ProtoReflect() protoreflect.Message { - mi := &file_google_monitoring_dashboard_v1_common_proto_msgTypes[1] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use PickTimeSeriesFilter.ProtoReflect.Descriptor instead. -func (*PickTimeSeriesFilter) Descriptor() ([]byte, []int) { - return file_google_monitoring_dashboard_v1_common_proto_rawDescGZIP(), []int{1} -} - -func (x *PickTimeSeriesFilter) GetRankingMethod() PickTimeSeriesFilter_Method { - if x != nil { - return x.RankingMethod - } - return PickTimeSeriesFilter_METHOD_UNSPECIFIED -} - -func (x *PickTimeSeriesFilter) GetNumTimeSeries() int32 { - if x != nil { - return x.NumTimeSeries - } - return 0 -} - -func (x *PickTimeSeriesFilter) GetDirection() PickTimeSeriesFilter_Direction { - if x != nil { - return x.Direction - } - return PickTimeSeriesFilter_DIRECTION_UNSPECIFIED -} - -func (x *PickTimeSeriesFilter) GetInterval() *interval.Interval { - if x != nil { - return x.Interval - } - return nil -} - -// A filter that ranks streams based on their statistical relation to other -// streams in a request. -// Note: This field is deprecated and completely ignored by the API. -type StatisticalTimeSeriesFilter struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // `rankingMethod` is applied to a set of time series, and then the produced - // value for each individual time series is used to compare a given time - // series to others. - // These are methods that cannot be applied stream-by-stream, but rather - // require the full context of a request to evaluate time series. - RankingMethod StatisticalTimeSeriesFilter_Method `protobuf:"varint,1,opt,name=ranking_method,json=rankingMethod,proto3,enum=google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter_Method" json:"ranking_method,omitempty"` - // How many time series to output. - NumTimeSeries int32 `protobuf:"varint,2,opt,name=num_time_series,json=numTimeSeries,proto3" json:"num_time_series,omitempty"` -} - -func (x *StatisticalTimeSeriesFilter) Reset() { - *x = StatisticalTimeSeriesFilter{} - mi := &file_google_monitoring_dashboard_v1_common_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *StatisticalTimeSeriesFilter) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*StatisticalTimeSeriesFilter) ProtoMessage() {} - -func (x *StatisticalTimeSeriesFilter) ProtoReflect() protoreflect.Message { - mi := &file_google_monitoring_dashboard_v1_common_proto_msgTypes[2] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use StatisticalTimeSeriesFilter.ProtoReflect.Descriptor instead. -func (*StatisticalTimeSeriesFilter) Descriptor() ([]byte, []int) { - return file_google_monitoring_dashboard_v1_common_proto_rawDescGZIP(), []int{2} -} - -func (x *StatisticalTimeSeriesFilter) GetRankingMethod() StatisticalTimeSeriesFilter_Method { - if x != nil { - return x.RankingMethod - } - return StatisticalTimeSeriesFilter_METHOD_UNSPECIFIED -} - -func (x *StatisticalTimeSeriesFilter) GetNumTimeSeries() int32 { - if x != nil { - return x.NumTimeSeries - } - return 0 -} - -var File_google_monitoring_dashboard_v1_common_proto protoreflect.FileDescriptor - -var file_google_monitoring_dashboard_v1_common_proto_rawDesc = []byte{ - 0x0a, 0x2b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, - 0x69, 0x6e, 0x67, 0x2f, 0x64, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2f, 0x76, 0x31, - 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, - 0x2e, 0x64, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2e, 0x76, 0x31, 0x1a, 0x1e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, - 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1a, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, - 0x76, 0x61, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x87, 0x08, 0x0a, 0x0b, 0x41, 0x67, - 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x44, 0x0a, 0x10, 0x61, 0x6c, 0x69, - 0x67, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0f, - 0x61, 0x6c, 0x69, 0x67, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x12, - 0x61, 0x0a, 0x12, 0x70, 0x65, 0x72, 0x5f, 0x73, 0x65, 0x72, 0x69, 0x65, 0x73, 0x5f, 0x61, 0x6c, - 0x69, 0x67, 0x6e, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x33, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x2e, - 0x64, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x67, 0x67, - 0x72, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x41, 0x6c, 0x69, 0x67, 0x6e, 0x65, 0x72, - 0x52, 0x10, 0x70, 0x65, 0x72, 0x53, 0x65, 0x72, 0x69, 0x65, 0x73, 0x41, 0x6c, 0x69, 0x67, 0x6e, - 0x65, 0x72, 0x12, 0x65, 0x0a, 0x14, 0x63, 0x72, 0x6f, 0x73, 0x73, 0x5f, 0x73, 0x65, 0x72, 0x69, - 0x65, 0x73, 0x5f, 0x72, 0x65, 0x64, 0x75, 0x63, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, - 0x32, 0x33, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, - 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x64, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2e, 0x76, - 0x31, 0x2e, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x52, 0x65, - 0x64, 0x75, 0x63, 0x65, 0x72, 0x52, 0x12, 0x63, 0x72, 0x6f, 0x73, 0x73, 0x53, 0x65, 0x72, 0x69, - 0x65, 0x73, 0x52, 0x65, 0x64, 0x75, 0x63, 0x65, 0x72, 0x12, 0x26, 0x0a, 0x0f, 0x67, 0x72, 0x6f, - 0x75, 0x70, 0x5f, 0x62, 0x79, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x18, 0x05, 0x20, 0x03, - 0x28, 0x09, 0x52, 0x0d, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x42, 0x79, 0x46, 0x69, 0x65, 0x6c, 0x64, - 0x73, 0x22, 0x8b, 0x03, 0x0a, 0x07, 0x41, 0x6c, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x12, 0x0e, 0x0a, - 0x0a, 0x41, 0x4c, 0x49, 0x47, 0x4e, 0x5f, 0x4e, 0x4f, 0x4e, 0x45, 0x10, 0x00, 0x12, 0x0f, 0x0a, - 0x0b, 0x41, 0x4c, 0x49, 0x47, 0x4e, 0x5f, 0x44, 0x45, 0x4c, 0x54, 0x41, 0x10, 0x01, 0x12, 0x0e, - 0x0a, 0x0a, 0x41, 0x4c, 0x49, 0x47, 0x4e, 0x5f, 0x52, 0x41, 0x54, 0x45, 0x10, 0x02, 0x12, 0x15, - 0x0a, 0x11, 0x41, 0x4c, 0x49, 0x47, 0x4e, 0x5f, 0x49, 0x4e, 0x54, 0x45, 0x52, 0x50, 0x4f, 0x4c, - 0x41, 0x54, 0x45, 0x10, 0x03, 0x12, 0x14, 0x0a, 0x10, 0x41, 0x4c, 0x49, 0x47, 0x4e, 0x5f, 0x4e, - 0x45, 0x58, 0x54, 0x5f, 0x4f, 0x4c, 0x44, 0x45, 0x52, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x41, - 0x4c, 0x49, 0x47, 0x4e, 0x5f, 0x4d, 0x49, 0x4e, 0x10, 0x0a, 0x12, 0x0d, 0x0a, 0x09, 0x41, 0x4c, - 0x49, 0x47, 0x4e, 0x5f, 0x4d, 0x41, 0x58, 0x10, 0x0b, 0x12, 0x0e, 0x0a, 0x0a, 0x41, 0x4c, 0x49, - 0x47, 0x4e, 0x5f, 0x4d, 0x45, 0x41, 0x4e, 0x10, 0x0c, 0x12, 0x0f, 0x0a, 0x0b, 0x41, 0x4c, 0x49, - 0x47, 0x4e, 0x5f, 0x43, 0x4f, 0x55, 0x4e, 0x54, 0x10, 0x0d, 0x12, 0x0d, 0x0a, 0x09, 0x41, 0x4c, - 0x49, 0x47, 0x4e, 0x5f, 0x53, 0x55, 0x4d, 0x10, 0x0e, 0x12, 0x10, 0x0a, 0x0c, 0x41, 0x4c, 0x49, - 0x47, 0x4e, 0x5f, 0x53, 0x54, 0x44, 0x44, 0x45, 0x56, 0x10, 0x0f, 0x12, 0x14, 0x0a, 0x10, 0x41, - 0x4c, 0x49, 0x47, 0x4e, 0x5f, 0x43, 0x4f, 0x55, 0x4e, 0x54, 0x5f, 0x54, 0x52, 0x55, 0x45, 0x10, - 0x10, 0x12, 0x15, 0x0a, 0x11, 0x41, 0x4c, 0x49, 0x47, 0x4e, 0x5f, 0x43, 0x4f, 0x55, 0x4e, 0x54, - 0x5f, 0x46, 0x41, 0x4c, 0x53, 0x45, 0x10, 0x18, 0x12, 0x17, 0x0a, 0x13, 0x41, 0x4c, 0x49, 0x47, - 0x4e, 0x5f, 0x46, 0x52, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x54, 0x52, 0x55, 0x45, 0x10, - 0x11, 0x12, 0x17, 0x0a, 0x13, 0x41, 0x4c, 0x49, 0x47, 0x4e, 0x5f, 0x50, 0x45, 0x52, 0x43, 0x45, - 0x4e, 0x54, 0x49, 0x4c, 0x45, 0x5f, 0x39, 0x39, 0x10, 0x12, 0x12, 0x17, 0x0a, 0x13, 0x41, 0x4c, - 0x49, 0x47, 0x4e, 0x5f, 0x50, 0x45, 0x52, 0x43, 0x45, 0x4e, 0x54, 0x49, 0x4c, 0x45, 0x5f, 0x39, - 0x35, 0x10, 0x13, 0x12, 0x17, 0x0a, 0x13, 0x41, 0x4c, 0x49, 0x47, 0x4e, 0x5f, 0x50, 0x45, 0x52, - 0x43, 0x45, 0x4e, 0x54, 0x49, 0x4c, 0x45, 0x5f, 0x35, 0x30, 0x10, 0x14, 0x12, 0x17, 0x0a, 0x13, - 0x41, 0x4c, 0x49, 0x47, 0x4e, 0x5f, 0x50, 0x45, 0x52, 0x43, 0x45, 0x4e, 0x54, 0x49, 0x4c, 0x45, - 0x5f, 0x30, 0x35, 0x10, 0x15, 0x12, 0x18, 0x0a, 0x14, 0x41, 0x4c, 0x49, 0x47, 0x4e, 0x5f, 0x50, - 0x45, 0x52, 0x43, 0x45, 0x4e, 0x54, 0x5f, 0x43, 0x48, 0x41, 0x4e, 0x47, 0x45, 0x10, 0x17, 0x22, - 0xb1, 0x02, 0x0a, 0x07, 0x52, 0x65, 0x64, 0x75, 0x63, 0x65, 0x72, 0x12, 0x0f, 0x0a, 0x0b, 0x52, - 0x45, 0x44, 0x55, 0x43, 0x45, 0x5f, 0x4e, 0x4f, 0x4e, 0x45, 0x10, 0x00, 0x12, 0x0f, 0x0a, 0x0b, - 0x52, 0x45, 0x44, 0x55, 0x43, 0x45, 0x5f, 0x4d, 0x45, 0x41, 0x4e, 0x10, 0x01, 0x12, 0x0e, 0x0a, - 0x0a, 0x52, 0x45, 0x44, 0x55, 0x43, 0x45, 0x5f, 0x4d, 0x49, 0x4e, 0x10, 0x02, 0x12, 0x0e, 0x0a, - 0x0a, 0x52, 0x45, 0x44, 0x55, 0x43, 0x45, 0x5f, 0x4d, 0x41, 0x58, 0x10, 0x03, 0x12, 0x0e, 0x0a, - 0x0a, 0x52, 0x45, 0x44, 0x55, 0x43, 0x45, 0x5f, 0x53, 0x55, 0x4d, 0x10, 0x04, 0x12, 0x11, 0x0a, - 0x0d, 0x52, 0x45, 0x44, 0x55, 0x43, 0x45, 0x5f, 0x53, 0x54, 0x44, 0x44, 0x45, 0x56, 0x10, 0x05, - 0x12, 0x10, 0x0a, 0x0c, 0x52, 0x45, 0x44, 0x55, 0x43, 0x45, 0x5f, 0x43, 0x4f, 0x55, 0x4e, 0x54, - 0x10, 0x06, 0x12, 0x15, 0x0a, 0x11, 0x52, 0x45, 0x44, 0x55, 0x43, 0x45, 0x5f, 0x43, 0x4f, 0x55, - 0x4e, 0x54, 0x5f, 0x54, 0x52, 0x55, 0x45, 0x10, 0x07, 0x12, 0x16, 0x0a, 0x12, 0x52, 0x45, 0x44, - 0x55, 0x43, 0x45, 0x5f, 0x43, 0x4f, 0x55, 0x4e, 0x54, 0x5f, 0x46, 0x41, 0x4c, 0x53, 0x45, 0x10, - 0x0f, 0x12, 0x18, 0x0a, 0x14, 0x52, 0x45, 0x44, 0x55, 0x43, 0x45, 0x5f, 0x46, 0x52, 0x41, 0x43, - 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x54, 0x52, 0x55, 0x45, 0x10, 0x08, 0x12, 0x18, 0x0a, 0x14, 0x52, - 0x45, 0x44, 0x55, 0x43, 0x45, 0x5f, 0x50, 0x45, 0x52, 0x43, 0x45, 0x4e, 0x54, 0x49, 0x4c, 0x45, - 0x5f, 0x39, 0x39, 0x10, 0x09, 0x12, 0x18, 0x0a, 0x14, 0x52, 0x45, 0x44, 0x55, 0x43, 0x45, 0x5f, - 0x50, 0x45, 0x52, 0x43, 0x45, 0x4e, 0x54, 0x49, 0x4c, 0x45, 0x5f, 0x39, 0x35, 0x10, 0x0a, 0x12, - 0x18, 0x0a, 0x14, 0x52, 0x45, 0x44, 0x55, 0x43, 0x45, 0x5f, 0x50, 0x45, 0x52, 0x43, 0x45, 0x4e, - 0x54, 0x49, 0x4c, 0x45, 0x5f, 0x35, 0x30, 0x10, 0x0b, 0x12, 0x18, 0x0a, 0x14, 0x52, 0x45, 0x44, - 0x55, 0x43, 0x45, 0x5f, 0x50, 0x45, 0x52, 0x43, 0x45, 0x4e, 0x54, 0x49, 0x4c, 0x45, 0x5f, 0x30, - 0x35, 0x10, 0x0c, 0x22, 0xe6, 0x03, 0x0a, 0x14, 0x50, 0x69, 0x63, 0x6b, 0x54, 0x69, 0x6d, 0x65, - 0x53, 0x65, 0x72, 0x69, 0x65, 0x73, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x62, 0x0a, 0x0e, - 0x72, 0x61, 0x6e, 0x6b, 0x69, 0x6e, 0x67, 0x5f, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0e, 0x32, 0x3b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x6d, 0x6f, - 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x64, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, - 0x72, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x69, 0x63, 0x6b, 0x54, 0x69, 0x6d, 0x65, 0x53, 0x65, - 0x72, 0x69, 0x65, 0x73, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x4d, 0x65, 0x74, 0x68, 0x6f, - 0x64, 0x52, 0x0d, 0x72, 0x61, 0x6e, 0x6b, 0x69, 0x6e, 0x67, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, - 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x75, 0x6d, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x73, 0x65, 0x72, - 0x69, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0d, 0x6e, 0x75, 0x6d, 0x54, 0x69, - 0x6d, 0x65, 0x53, 0x65, 0x72, 0x69, 0x65, 0x73, 0x12, 0x5c, 0x0a, 0x09, 0x64, 0x69, 0x72, 0x65, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x3e, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x2e, - 0x64, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x69, 0x63, - 0x6b, 0x54, 0x69, 0x6d, 0x65, 0x53, 0x65, 0x72, 0x69, 0x65, 0x73, 0x46, 0x69, 0x6c, 0x74, 0x65, - 0x72, 0x2e, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x09, 0x64, 0x69, 0x72, - 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x31, 0x0a, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, - 0x61, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x52, - 0x08, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x22, 0x74, 0x0a, 0x06, 0x4d, 0x65, 0x74, - 0x68, 0x6f, 0x64, 0x12, 0x16, 0x0a, 0x12, 0x4d, 0x45, 0x54, 0x48, 0x4f, 0x44, 0x5f, 0x55, 0x4e, - 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0f, 0x0a, 0x0b, 0x4d, - 0x45, 0x54, 0x48, 0x4f, 0x44, 0x5f, 0x4d, 0x45, 0x41, 0x4e, 0x10, 0x01, 0x12, 0x0e, 0x0a, 0x0a, - 0x4d, 0x45, 0x54, 0x48, 0x4f, 0x44, 0x5f, 0x4d, 0x41, 0x58, 0x10, 0x02, 0x12, 0x0e, 0x0a, 0x0a, - 0x4d, 0x45, 0x54, 0x48, 0x4f, 0x44, 0x5f, 0x4d, 0x49, 0x4e, 0x10, 0x03, 0x12, 0x0e, 0x0a, 0x0a, - 0x4d, 0x45, 0x54, 0x48, 0x4f, 0x44, 0x5f, 0x53, 0x55, 0x4d, 0x10, 0x04, 0x12, 0x11, 0x0a, 0x0d, - 0x4d, 0x45, 0x54, 0x48, 0x4f, 0x44, 0x5f, 0x4c, 0x41, 0x54, 0x45, 0x53, 0x54, 0x10, 0x05, 0x22, - 0x3b, 0x0a, 0x09, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x19, 0x0a, 0x15, - 0x44, 0x49, 0x52, 0x45, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, - 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x54, 0x4f, 0x50, 0x10, 0x01, - 0x12, 0x0a, 0x0a, 0x06, 0x42, 0x4f, 0x54, 0x54, 0x4f, 0x4d, 0x10, 0x02, 0x22, 0xee, 0x01, 0x0a, - 0x1b, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x61, 0x6c, 0x54, 0x69, 0x6d, 0x65, - 0x53, 0x65, 0x72, 0x69, 0x65, 0x73, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x69, 0x0a, 0x0e, - 0x72, 0x61, 0x6e, 0x6b, 0x69, 0x6e, 0x67, 0x5f, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0e, 0x32, 0x42, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x6d, 0x6f, - 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x64, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, - 0x72, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x61, - 0x6c, 0x54, 0x69, 0x6d, 0x65, 0x53, 0x65, 0x72, 0x69, 0x65, 0x73, 0x46, 0x69, 0x6c, 0x74, 0x65, - 0x72, 0x2e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x52, 0x0d, 0x72, 0x61, 0x6e, 0x6b, 0x69, 0x6e, - 0x67, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x75, 0x6d, 0x5f, 0x74, - 0x69, 0x6d, 0x65, 0x5f, 0x73, 0x65, 0x72, 0x69, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, - 0x52, 0x0d, 0x6e, 0x75, 0x6d, 0x54, 0x69, 0x6d, 0x65, 0x53, 0x65, 0x72, 0x69, 0x65, 0x73, 0x22, - 0x3c, 0x0a, 0x06, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x16, 0x0a, 0x12, 0x4d, 0x45, 0x54, - 0x48, 0x4f, 0x44, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, - 0x00, 0x12, 0x1a, 0x0a, 0x16, 0x4d, 0x45, 0x54, 0x48, 0x4f, 0x44, 0x5f, 0x43, 0x4c, 0x55, 0x53, - 0x54, 0x45, 0x52, 0x5f, 0x4f, 0x55, 0x54, 0x4c, 0x49, 0x45, 0x52, 0x10, 0x01, 0x42, 0xf4, 0x01, - 0x0a, 0x22, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x6d, 0x6f, 0x6e, - 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x64, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, - 0x64, 0x2e, 0x76, 0x31, 0x42, 0x0b, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, - 0x6f, 0x50, 0x01, 0x5a, 0x46, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x2f, 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, - 0x69, 0x6e, 0x67, 0x2f, 0x64, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2f, 0x61, 0x70, - 0x69, 0x76, 0x31, 0x2f, 0x64, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x70, 0x62, 0x3b, - 0x64, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x70, 0x62, 0xaa, 0x02, 0x24, 0x47, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x4d, 0x6f, 0x6e, 0x69, 0x74, - 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x44, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2e, - 0x56, 0x31, 0xca, 0x02, 0x24, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x5c, 0x43, 0x6c, 0x6f, 0x75, - 0x64, 0x5c, 0x4d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x5c, 0x44, 0x61, 0x73, - 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x5c, 0x56, 0x31, 0xea, 0x02, 0x28, 0x47, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x3a, 0x3a, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x3a, 0x3a, 0x4d, 0x6f, 0x6e, 0x69, 0x74, - 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x3a, 0x3a, 0x44, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, - 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_google_monitoring_dashboard_v1_common_proto_rawDescOnce sync.Once - file_google_monitoring_dashboard_v1_common_proto_rawDescData = file_google_monitoring_dashboard_v1_common_proto_rawDesc -) - -func file_google_monitoring_dashboard_v1_common_proto_rawDescGZIP() []byte { - file_google_monitoring_dashboard_v1_common_proto_rawDescOnce.Do(func() { - file_google_monitoring_dashboard_v1_common_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_monitoring_dashboard_v1_common_proto_rawDescData) - }) - return file_google_monitoring_dashboard_v1_common_proto_rawDescData -} - -var file_google_monitoring_dashboard_v1_common_proto_enumTypes = make([]protoimpl.EnumInfo, 5) -var file_google_monitoring_dashboard_v1_common_proto_msgTypes = make([]protoimpl.MessageInfo, 3) -var file_google_monitoring_dashboard_v1_common_proto_goTypes = []any{ - (Aggregation_Aligner)(0), // 0: google.monitoring.dashboard.v1.Aggregation.Aligner - (Aggregation_Reducer)(0), // 1: google.monitoring.dashboard.v1.Aggregation.Reducer - (PickTimeSeriesFilter_Method)(0), // 2: google.monitoring.dashboard.v1.PickTimeSeriesFilter.Method - (PickTimeSeriesFilter_Direction)(0), // 3: google.monitoring.dashboard.v1.PickTimeSeriesFilter.Direction - (StatisticalTimeSeriesFilter_Method)(0), // 4: google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter.Method - (*Aggregation)(nil), // 5: google.monitoring.dashboard.v1.Aggregation - (*PickTimeSeriesFilter)(nil), // 6: google.monitoring.dashboard.v1.PickTimeSeriesFilter - (*StatisticalTimeSeriesFilter)(nil), // 7: google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter - (*durationpb.Duration)(nil), // 8: google.protobuf.Duration - (*interval.Interval)(nil), // 9: google.type.Interval -} -var file_google_monitoring_dashboard_v1_common_proto_depIdxs = []int32{ - 8, // 0: google.monitoring.dashboard.v1.Aggregation.alignment_period:type_name -> google.protobuf.Duration - 0, // 1: google.monitoring.dashboard.v1.Aggregation.per_series_aligner:type_name -> google.monitoring.dashboard.v1.Aggregation.Aligner - 1, // 2: google.monitoring.dashboard.v1.Aggregation.cross_series_reducer:type_name -> google.monitoring.dashboard.v1.Aggregation.Reducer - 2, // 3: google.monitoring.dashboard.v1.PickTimeSeriesFilter.ranking_method:type_name -> google.monitoring.dashboard.v1.PickTimeSeriesFilter.Method - 3, // 4: google.monitoring.dashboard.v1.PickTimeSeriesFilter.direction:type_name -> google.monitoring.dashboard.v1.PickTimeSeriesFilter.Direction - 9, // 5: google.monitoring.dashboard.v1.PickTimeSeriesFilter.interval:type_name -> google.type.Interval - 4, // 6: google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter.ranking_method:type_name -> google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter.Method - 7, // [7:7] is the sub-list for method output_type - 7, // [7:7] is the sub-list for method input_type - 7, // [7:7] is the sub-list for extension type_name - 7, // [7:7] is the sub-list for extension extendee - 0, // [0:7] is the sub-list for field type_name -} - -func init() { file_google_monitoring_dashboard_v1_common_proto_init() } -func file_google_monitoring_dashboard_v1_common_proto_init() { - if File_google_monitoring_dashboard_v1_common_proto != nil { - return - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_google_monitoring_dashboard_v1_common_proto_rawDesc, - NumEnums: 5, - NumMessages: 3, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_google_monitoring_dashboard_v1_common_proto_goTypes, - DependencyIndexes: file_google_monitoring_dashboard_v1_common_proto_depIdxs, - EnumInfos: file_google_monitoring_dashboard_v1_common_proto_enumTypes, - MessageInfos: file_google_monitoring_dashboard_v1_common_proto_msgTypes, - }.Build() - File_google_monitoring_dashboard_v1_common_proto = out.File - file_google_monitoring_dashboard_v1_common_proto_rawDesc = nil - file_google_monitoring_dashboard_v1_common_proto_goTypes = nil - file_google_monitoring_dashboard_v1_common_proto_depIdxs = nil -} diff --git a/vendor/cloud.google.com/go/monitoring/dashboard/apiv1/dashboardpb/dashboard.pb.go b/vendor/cloud.google.com/go/monitoring/dashboard/apiv1/dashboardpb/dashboard.pb.go deleted file mode 100644 index f5b7d29a69..0000000000 --- a/vendor/cloud.google.com/go/monitoring/dashboard/apiv1/dashboardpb/dashboard.pb.go +++ /dev/null @@ -1,359 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.35.2 -// protoc v4.25.7 -// source: google/monitoring/dashboard/v1/dashboard.proto - -package dashboardpb - -import ( - _ "google.golang.org/genproto/googleapis/api/annotations" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// A Google Stackdriver dashboard. Dashboards define the content and layout -// of pages in the Stackdriver web application. -type Dashboard struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Identifier. The resource name of the dashboard. - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // Required. The mutable, human-readable name. - DisplayName string `protobuf:"bytes,2,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"` - // `etag` is used for optimistic concurrency control as a way to help - // prevent simultaneous updates of a policy from overwriting each other. - // An `etag` is returned in the response to `GetDashboard`, and - // users are expected to put that etag in the request to `UpdateDashboard` to - // ensure that their change will be applied to the same version of the - // Dashboard configuration. The field should not be passed during - // dashboard creation. - Etag string `protobuf:"bytes,4,opt,name=etag,proto3" json:"etag,omitempty"` - // A dashboard's root container element that defines the layout style. - // - // Types that are assignable to Layout: - // - // *Dashboard_GridLayout - // *Dashboard_MosaicLayout - // *Dashboard_RowLayout - // *Dashboard_ColumnLayout - Layout isDashboard_Layout `protobuf_oneof:"layout"` - // Filters to reduce the amount of data charted based on the filter criteria. - DashboardFilters []*DashboardFilter `protobuf:"bytes,11,rep,name=dashboard_filters,json=dashboardFilters,proto3" json:"dashboard_filters,omitempty"` - // Labels applied to the dashboard - Labels map[string]string `protobuf:"bytes,12,rep,name=labels,proto3" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` -} - -func (x *Dashboard) Reset() { - *x = Dashboard{} - mi := &file_google_monitoring_dashboard_v1_dashboard_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *Dashboard) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Dashboard) ProtoMessage() {} - -func (x *Dashboard) ProtoReflect() protoreflect.Message { - mi := &file_google_monitoring_dashboard_v1_dashboard_proto_msgTypes[0] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Dashboard.ProtoReflect.Descriptor instead. -func (*Dashboard) Descriptor() ([]byte, []int) { - return file_google_monitoring_dashboard_v1_dashboard_proto_rawDescGZIP(), []int{0} -} - -func (x *Dashboard) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *Dashboard) GetDisplayName() string { - if x != nil { - return x.DisplayName - } - return "" -} - -func (x *Dashboard) GetEtag() string { - if x != nil { - return x.Etag - } - return "" -} - -func (m *Dashboard) GetLayout() isDashboard_Layout { - if m != nil { - return m.Layout - } - return nil -} - -func (x *Dashboard) GetGridLayout() *GridLayout { - if x, ok := x.GetLayout().(*Dashboard_GridLayout); ok { - return x.GridLayout - } - return nil -} - -func (x *Dashboard) GetMosaicLayout() *MosaicLayout { - if x, ok := x.GetLayout().(*Dashboard_MosaicLayout); ok { - return x.MosaicLayout - } - return nil -} - -func (x *Dashboard) GetRowLayout() *RowLayout { - if x, ok := x.GetLayout().(*Dashboard_RowLayout); ok { - return x.RowLayout - } - return nil -} - -func (x *Dashboard) GetColumnLayout() *ColumnLayout { - if x, ok := x.GetLayout().(*Dashboard_ColumnLayout); ok { - return x.ColumnLayout - } - return nil -} - -func (x *Dashboard) GetDashboardFilters() []*DashboardFilter { - if x != nil { - return x.DashboardFilters - } - return nil -} - -func (x *Dashboard) GetLabels() map[string]string { - if x != nil { - return x.Labels - } - return nil -} - -type isDashboard_Layout interface { - isDashboard_Layout() -} - -type Dashboard_GridLayout struct { - // Content is arranged with a basic layout that re-flows a simple list of - // informational elements like widgets or tiles. - GridLayout *GridLayout `protobuf:"bytes,5,opt,name=grid_layout,json=gridLayout,proto3,oneof"` -} - -type Dashboard_MosaicLayout struct { - // The content is arranged as a grid of tiles, with each content widget - // occupying one or more grid blocks. - MosaicLayout *MosaicLayout `protobuf:"bytes,6,opt,name=mosaic_layout,json=mosaicLayout,proto3,oneof"` -} - -type Dashboard_RowLayout struct { - // The content is divided into equally spaced rows and the widgets are - // arranged horizontally. - RowLayout *RowLayout `protobuf:"bytes,8,opt,name=row_layout,json=rowLayout,proto3,oneof"` -} - -type Dashboard_ColumnLayout struct { - // The content is divided into equally spaced columns and the widgets are - // arranged vertically. - ColumnLayout *ColumnLayout `protobuf:"bytes,9,opt,name=column_layout,json=columnLayout,proto3,oneof"` -} - -func (*Dashboard_GridLayout) isDashboard_Layout() {} - -func (*Dashboard_MosaicLayout) isDashboard_Layout() {} - -func (*Dashboard_RowLayout) isDashboard_Layout() {} - -func (*Dashboard_ColumnLayout) isDashboard_Layout() {} - -var File_google_monitoring_dashboard_v1_dashboard_proto protoreflect.FileDescriptor - -var file_google_monitoring_dashboard_v1_dashboard_proto_rawDesc = []byte{ - 0x0a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, - 0x69, 0x6e, 0x67, 0x2f, 0x64, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2f, 0x76, 0x31, - 0x2f, 0x64, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x12, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, - 0x69, 0x6e, 0x67, 0x2e, 0x64, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2e, 0x76, 0x31, - 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x66, 0x69, 0x65, - 0x6c, 0x64, 0x5f, 0x62, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x72, 0x65, - 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x35, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x2f, - 0x64, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2f, 0x76, 0x31, 0x2f, 0x64, 0x61, 0x73, - 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x1a, 0x2c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x6d, 0x6f, 0x6e, 0x69, - 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x2f, 0x64, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, - 0x2f, 0x76, 0x31, 0x2f, 0x6c, 0x61, 0x79, 0x6f, 0x75, 0x74, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x22, 0xec, 0x05, 0x0a, 0x09, 0x44, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x12, - 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, - 0x41, 0x08, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x26, 0x0a, 0x0c, 0x64, 0x69, 0x73, 0x70, - 0x6c, 0x61, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, - 0xe0, 0x41, 0x02, 0x52, 0x0b, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x4e, 0x61, 0x6d, 0x65, - 0x12, 0x12, 0x0a, 0x04, 0x65, 0x74, 0x61, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, - 0x65, 0x74, 0x61, 0x67, 0x12, 0x4d, 0x0a, 0x0b, 0x67, 0x72, 0x69, 0x64, 0x5f, 0x6c, 0x61, 0x79, - 0x6f, 0x75, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x64, 0x61, - 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x72, 0x69, 0x64, 0x4c, - 0x61, 0x79, 0x6f, 0x75, 0x74, 0x48, 0x00, 0x52, 0x0a, 0x67, 0x72, 0x69, 0x64, 0x4c, 0x61, 0x79, - 0x6f, 0x75, 0x74, 0x12, 0x53, 0x0a, 0x0d, 0x6d, 0x6f, 0x73, 0x61, 0x69, 0x63, 0x5f, 0x6c, 0x61, - 0x79, 0x6f, 0x75, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x64, - 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x6f, 0x73, 0x61, - 0x69, 0x63, 0x4c, 0x61, 0x79, 0x6f, 0x75, 0x74, 0x48, 0x00, 0x52, 0x0c, 0x6d, 0x6f, 0x73, 0x61, - 0x69, 0x63, 0x4c, 0x61, 0x79, 0x6f, 0x75, 0x74, 0x12, 0x4a, 0x0a, 0x0a, 0x72, 0x6f, 0x77, 0x5f, - 0x6c, 0x61, 0x79, 0x6f, 0x75, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, - 0x2e, 0x64, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x6f, - 0x77, 0x4c, 0x61, 0x79, 0x6f, 0x75, 0x74, 0x48, 0x00, 0x52, 0x09, 0x72, 0x6f, 0x77, 0x4c, 0x61, - 0x79, 0x6f, 0x75, 0x74, 0x12, 0x53, 0x0a, 0x0d, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x5f, 0x6c, - 0x61, 0x79, 0x6f, 0x75, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x2e, - 0x64, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6c, - 0x75, 0x6d, 0x6e, 0x4c, 0x61, 0x79, 0x6f, 0x75, 0x74, 0x48, 0x00, 0x52, 0x0c, 0x63, 0x6f, 0x6c, - 0x75, 0x6d, 0x6e, 0x4c, 0x61, 0x79, 0x6f, 0x75, 0x74, 0x12, 0x5c, 0x0a, 0x11, 0x64, 0x61, 0x73, - 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x18, 0x0b, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x6d, 0x6f, - 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x64, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, - 0x72, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x46, - 0x69, 0x6c, 0x74, 0x65, 0x72, 0x52, 0x10, 0x64, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, - 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x12, 0x4d, 0x0a, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, - 0x73, 0x18, 0x0c, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x35, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x64, 0x61, 0x73, 0x68, - 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, - 0x72, 0x64, 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x06, - 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x1a, 0x39, 0x0a, 0x0b, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, - 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, - 0x01, 0x3a, 0x53, 0xea, 0x41, 0x50, 0x0a, 0x23, 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, - 0x6e, 0x67, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, - 0x6d, 0x2f, 0x44, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x12, 0x29, 0x70, 0x72, 0x6f, - 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x7d, 0x2f, - 0x64, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x73, 0x2f, 0x7b, 0x64, 0x61, 0x73, 0x68, - 0x62, 0x6f, 0x61, 0x72, 0x64, 0x7d, 0x42, 0x08, 0x0a, 0x06, 0x6c, 0x61, 0x79, 0x6f, 0x75, 0x74, - 0x42, 0xf8, 0x01, 0x0a, 0x22, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x64, 0x61, 0x73, 0x68, 0x62, - 0x6f, 0x61, 0x72, 0x64, 0x2e, 0x76, 0x31, 0x42, 0x0f, 0x44, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, - 0x72, 0x64, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x46, 0x63, 0x6c, 0x6f, 0x75, - 0x64, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x2f, - 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x2f, 0x64, 0x61, 0x73, 0x68, 0x62, - 0x6f, 0x61, 0x72, 0x64, 0x2f, 0x61, 0x70, 0x69, 0x76, 0x31, 0x2f, 0x64, 0x61, 0x73, 0x68, 0x62, - 0x6f, 0x61, 0x72, 0x64, 0x70, 0x62, 0x3b, 0x64, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, - 0x70, 0x62, 0xaa, 0x02, 0x24, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x43, 0x6c, 0x6f, 0x75, - 0x64, 0x2e, 0x4d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x44, 0x61, 0x73, - 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x24, 0x47, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x5c, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x5c, 0x4d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, - 0x69, 0x6e, 0x67, 0x5c, 0x44, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x5c, 0x56, 0x31, - 0xea, 0x02, 0x28, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x3a, 0x3a, 0x43, 0x6c, 0x6f, 0x75, 0x64, - 0x3a, 0x3a, 0x4d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x3a, 0x3a, 0x44, 0x61, - 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x33, -} - -var ( - file_google_monitoring_dashboard_v1_dashboard_proto_rawDescOnce sync.Once - file_google_monitoring_dashboard_v1_dashboard_proto_rawDescData = file_google_monitoring_dashboard_v1_dashboard_proto_rawDesc -) - -func file_google_monitoring_dashboard_v1_dashboard_proto_rawDescGZIP() []byte { - file_google_monitoring_dashboard_v1_dashboard_proto_rawDescOnce.Do(func() { - file_google_monitoring_dashboard_v1_dashboard_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_monitoring_dashboard_v1_dashboard_proto_rawDescData) - }) - return file_google_monitoring_dashboard_v1_dashboard_proto_rawDescData -} - -var file_google_monitoring_dashboard_v1_dashboard_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_google_monitoring_dashboard_v1_dashboard_proto_goTypes = []any{ - (*Dashboard)(nil), // 0: google.monitoring.dashboard.v1.Dashboard - nil, // 1: google.monitoring.dashboard.v1.Dashboard.LabelsEntry - (*GridLayout)(nil), // 2: google.monitoring.dashboard.v1.GridLayout - (*MosaicLayout)(nil), // 3: google.monitoring.dashboard.v1.MosaicLayout - (*RowLayout)(nil), // 4: google.monitoring.dashboard.v1.RowLayout - (*ColumnLayout)(nil), // 5: google.monitoring.dashboard.v1.ColumnLayout - (*DashboardFilter)(nil), // 6: google.monitoring.dashboard.v1.DashboardFilter -} -var file_google_monitoring_dashboard_v1_dashboard_proto_depIdxs = []int32{ - 2, // 0: google.monitoring.dashboard.v1.Dashboard.grid_layout:type_name -> google.monitoring.dashboard.v1.GridLayout - 3, // 1: google.monitoring.dashboard.v1.Dashboard.mosaic_layout:type_name -> google.monitoring.dashboard.v1.MosaicLayout - 4, // 2: google.monitoring.dashboard.v1.Dashboard.row_layout:type_name -> google.monitoring.dashboard.v1.RowLayout - 5, // 3: google.monitoring.dashboard.v1.Dashboard.column_layout:type_name -> google.monitoring.dashboard.v1.ColumnLayout - 6, // 4: google.monitoring.dashboard.v1.Dashboard.dashboard_filters:type_name -> google.monitoring.dashboard.v1.DashboardFilter - 1, // 5: google.monitoring.dashboard.v1.Dashboard.labels:type_name -> google.monitoring.dashboard.v1.Dashboard.LabelsEntry - 6, // [6:6] is the sub-list for method output_type - 6, // [6:6] is the sub-list for method input_type - 6, // [6:6] is the sub-list for extension type_name - 6, // [6:6] is the sub-list for extension extendee - 0, // [0:6] is the sub-list for field type_name -} - -func init() { file_google_monitoring_dashboard_v1_dashboard_proto_init() } -func file_google_monitoring_dashboard_v1_dashboard_proto_init() { - if File_google_monitoring_dashboard_v1_dashboard_proto != nil { - return - } - file_google_monitoring_dashboard_v1_dashboard_filter_proto_init() - file_google_monitoring_dashboard_v1_layouts_proto_init() - file_google_monitoring_dashboard_v1_dashboard_proto_msgTypes[0].OneofWrappers = []any{ - (*Dashboard_GridLayout)(nil), - (*Dashboard_MosaicLayout)(nil), - (*Dashboard_RowLayout)(nil), - (*Dashboard_ColumnLayout)(nil), - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_google_monitoring_dashboard_v1_dashboard_proto_rawDesc, - NumEnums: 0, - NumMessages: 2, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_google_monitoring_dashboard_v1_dashboard_proto_goTypes, - DependencyIndexes: file_google_monitoring_dashboard_v1_dashboard_proto_depIdxs, - MessageInfos: file_google_monitoring_dashboard_v1_dashboard_proto_msgTypes, - }.Build() - File_google_monitoring_dashboard_v1_dashboard_proto = out.File - file_google_monitoring_dashboard_v1_dashboard_proto_rawDesc = nil - file_google_monitoring_dashboard_v1_dashboard_proto_goTypes = nil - file_google_monitoring_dashboard_v1_dashboard_proto_depIdxs = nil -} diff --git a/vendor/cloud.google.com/go/monitoring/dashboard/apiv1/dashboardpb/dashboard_filter.pb.go b/vendor/cloud.google.com/go/monitoring/dashboard/apiv1/dashboardpb/dashboard_filter.pb.go deleted file mode 100644 index 48c1e68cbb..0000000000 --- a/vendor/cloud.google.com/go/monitoring/dashboard/apiv1/dashboardpb/dashboard_filter.pb.go +++ /dev/null @@ -1,309 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.35.2 -// protoc v4.25.7 -// source: google/monitoring/dashboard/v1/dashboard_filter.proto - -package dashboardpb - -import ( - _ "google.golang.org/genproto/googleapis/api/annotations" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// The type for the dashboard filter -type DashboardFilter_FilterType int32 - -const ( - // Filter type is unspecified. This is not valid in a well-formed request. - DashboardFilter_FILTER_TYPE_UNSPECIFIED DashboardFilter_FilterType = 0 - // Filter on a resource label value - DashboardFilter_RESOURCE_LABEL DashboardFilter_FilterType = 1 - // Filter on a metrics label value - DashboardFilter_METRIC_LABEL DashboardFilter_FilterType = 2 - // Filter on a user metadata label value - DashboardFilter_USER_METADATA_LABEL DashboardFilter_FilterType = 3 - // Filter on a system metadata label value - DashboardFilter_SYSTEM_METADATA_LABEL DashboardFilter_FilterType = 4 - // Filter on a group id - DashboardFilter_GROUP DashboardFilter_FilterType = 5 -) - -// Enum value maps for DashboardFilter_FilterType. -var ( - DashboardFilter_FilterType_name = map[int32]string{ - 0: "FILTER_TYPE_UNSPECIFIED", - 1: "RESOURCE_LABEL", - 2: "METRIC_LABEL", - 3: "USER_METADATA_LABEL", - 4: "SYSTEM_METADATA_LABEL", - 5: "GROUP", - } - DashboardFilter_FilterType_value = map[string]int32{ - "FILTER_TYPE_UNSPECIFIED": 0, - "RESOURCE_LABEL": 1, - "METRIC_LABEL": 2, - "USER_METADATA_LABEL": 3, - "SYSTEM_METADATA_LABEL": 4, - "GROUP": 5, - } -) - -func (x DashboardFilter_FilterType) Enum() *DashboardFilter_FilterType { - p := new(DashboardFilter_FilterType) - *p = x - return p -} - -func (x DashboardFilter_FilterType) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (DashboardFilter_FilterType) Descriptor() protoreflect.EnumDescriptor { - return file_google_monitoring_dashboard_v1_dashboard_filter_proto_enumTypes[0].Descriptor() -} - -func (DashboardFilter_FilterType) Type() protoreflect.EnumType { - return &file_google_monitoring_dashboard_v1_dashboard_filter_proto_enumTypes[0] -} - -func (x DashboardFilter_FilterType) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use DashboardFilter_FilterType.Descriptor instead. -func (DashboardFilter_FilterType) EnumDescriptor() ([]byte, []int) { - return file_google_monitoring_dashboard_v1_dashboard_filter_proto_rawDescGZIP(), []int{0, 0} -} - -// A filter to reduce the amount of data charted in relevant widgets. -type DashboardFilter struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Required. The key for the label - LabelKey string `protobuf:"bytes,1,opt,name=label_key,json=labelKey,proto3" json:"label_key,omitempty"` - // The placeholder text that can be referenced in a filter string or MQL - // query. If omitted, the dashboard filter will be applied to all relevant - // widgets in the dashboard. - TemplateVariable string `protobuf:"bytes,3,opt,name=template_variable,json=templateVariable,proto3" json:"template_variable,omitempty"` - // The default value used in the filter comparison - // - // Types that are assignable to DefaultValue: - // - // *DashboardFilter_StringValue - DefaultValue isDashboardFilter_DefaultValue `protobuf_oneof:"default_value"` - // The specified filter type - FilterType DashboardFilter_FilterType `protobuf:"varint,5,opt,name=filter_type,json=filterType,proto3,enum=google.monitoring.dashboard.v1.DashboardFilter_FilterType" json:"filter_type,omitempty"` -} - -func (x *DashboardFilter) Reset() { - *x = DashboardFilter{} - mi := &file_google_monitoring_dashboard_v1_dashboard_filter_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *DashboardFilter) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DashboardFilter) ProtoMessage() {} - -func (x *DashboardFilter) ProtoReflect() protoreflect.Message { - mi := &file_google_monitoring_dashboard_v1_dashboard_filter_proto_msgTypes[0] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DashboardFilter.ProtoReflect.Descriptor instead. -func (*DashboardFilter) Descriptor() ([]byte, []int) { - return file_google_monitoring_dashboard_v1_dashboard_filter_proto_rawDescGZIP(), []int{0} -} - -func (x *DashboardFilter) GetLabelKey() string { - if x != nil { - return x.LabelKey - } - return "" -} - -func (x *DashboardFilter) GetTemplateVariable() string { - if x != nil { - return x.TemplateVariable - } - return "" -} - -func (m *DashboardFilter) GetDefaultValue() isDashboardFilter_DefaultValue { - if m != nil { - return m.DefaultValue - } - return nil -} - -func (x *DashboardFilter) GetStringValue() string { - if x, ok := x.GetDefaultValue().(*DashboardFilter_StringValue); ok { - return x.StringValue - } - return "" -} - -func (x *DashboardFilter) GetFilterType() DashboardFilter_FilterType { - if x != nil { - return x.FilterType - } - return DashboardFilter_FILTER_TYPE_UNSPECIFIED -} - -type isDashboardFilter_DefaultValue interface { - isDashboardFilter_DefaultValue() -} - -type DashboardFilter_StringValue struct { - // A variable-length string value. - StringValue string `protobuf:"bytes,4,opt,name=string_value,json=stringValue,proto3,oneof"` -} - -func (*DashboardFilter_StringValue) isDashboardFilter_DefaultValue() {} - -var File_google_monitoring_dashboard_v1_dashboard_filter_proto protoreflect.FileDescriptor - -var file_google_monitoring_dashboard_v1_dashboard_filter_proto_rawDesc = []byte{ - 0x0a, 0x35, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, - 0x69, 0x6e, 0x67, 0x2f, 0x64, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2f, 0x76, 0x31, - 0x2f, 0x64, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, - 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x64, 0x61, 0x73, 0x68, 0x62, - 0x6f, 0x61, 0x72, 0x64, 0x2e, 0x76, 0x31, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, - 0x61, 0x70, 0x69, 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x62, 0x65, 0x68, 0x61, 0x76, 0x69, - 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x84, 0x03, 0x0a, 0x0f, 0x44, 0x61, 0x73, - 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x20, 0x0a, 0x09, - 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, - 0x03, 0xe0, 0x41, 0x02, 0x52, 0x08, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x4b, 0x65, 0x79, 0x12, 0x2b, - 0x0a, 0x11, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x5f, 0x76, 0x61, 0x72, 0x69, 0x61, - 0x62, 0x6c, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x74, 0x65, 0x6d, 0x70, 0x6c, - 0x61, 0x74, 0x65, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x23, 0x0a, 0x0c, 0x73, - 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x09, 0x48, 0x00, 0x52, 0x0b, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, - 0x12, 0x5b, 0x0a, 0x0b, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, - 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x3a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x6d, - 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x64, 0x61, 0x73, 0x68, 0x62, 0x6f, - 0x61, 0x72, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, - 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x54, 0x79, 0x70, - 0x65, 0x52, 0x0a, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x22, 0x8e, 0x01, - 0x0a, 0x0a, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1b, 0x0a, 0x17, - 0x46, 0x49, 0x4c, 0x54, 0x45, 0x52, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, - 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x12, 0x0a, 0x0e, 0x52, 0x45, 0x53, - 0x4f, 0x55, 0x52, 0x43, 0x45, 0x5f, 0x4c, 0x41, 0x42, 0x45, 0x4c, 0x10, 0x01, 0x12, 0x10, 0x0a, - 0x0c, 0x4d, 0x45, 0x54, 0x52, 0x49, 0x43, 0x5f, 0x4c, 0x41, 0x42, 0x45, 0x4c, 0x10, 0x02, 0x12, - 0x17, 0x0a, 0x13, 0x55, 0x53, 0x45, 0x52, 0x5f, 0x4d, 0x45, 0x54, 0x41, 0x44, 0x41, 0x54, 0x41, - 0x5f, 0x4c, 0x41, 0x42, 0x45, 0x4c, 0x10, 0x03, 0x12, 0x19, 0x0a, 0x15, 0x53, 0x59, 0x53, 0x54, - 0x45, 0x4d, 0x5f, 0x4d, 0x45, 0x54, 0x41, 0x44, 0x41, 0x54, 0x41, 0x5f, 0x4c, 0x41, 0x42, 0x45, - 0x4c, 0x10, 0x04, 0x12, 0x09, 0x0a, 0x05, 0x47, 0x52, 0x4f, 0x55, 0x50, 0x10, 0x05, 0x42, 0x0f, - 0x0a, 0x0d, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x42, - 0xfd, 0x01, 0x0a, 0x22, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x6d, - 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x64, 0x61, 0x73, 0x68, 0x62, 0x6f, - 0x61, 0x72, 0x64, 0x2e, 0x76, 0x31, 0x42, 0x14, 0x44, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, - 0x64, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x46, - 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6f, 0x6d, - 0x2f, 0x67, 0x6f, 0x2f, 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x2f, 0x64, - 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2f, 0x61, 0x70, 0x69, 0x76, 0x31, 0x2f, 0x64, - 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x70, 0x62, 0x3b, 0x64, 0x61, 0x73, 0x68, 0x62, - 0x6f, 0x61, 0x72, 0x64, 0x70, 0x62, 0xaa, 0x02, 0x24, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x4d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, - 0x2e, 0x44, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x24, - 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x5c, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x5c, 0x4d, 0x6f, 0x6e, - 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x5c, 0x44, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, - 0x64, 0x5c, 0x56, 0x31, 0xea, 0x02, 0x28, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x3a, 0x3a, 0x43, - 0x6c, 0x6f, 0x75, 0x64, 0x3a, 0x3a, 0x4d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, - 0x3a, 0x3a, 0x44, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x3a, 0x3a, 0x56, 0x31, 0x62, - 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_google_monitoring_dashboard_v1_dashboard_filter_proto_rawDescOnce sync.Once - file_google_monitoring_dashboard_v1_dashboard_filter_proto_rawDescData = file_google_monitoring_dashboard_v1_dashboard_filter_proto_rawDesc -) - -func file_google_monitoring_dashboard_v1_dashboard_filter_proto_rawDescGZIP() []byte { - file_google_monitoring_dashboard_v1_dashboard_filter_proto_rawDescOnce.Do(func() { - file_google_monitoring_dashboard_v1_dashboard_filter_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_monitoring_dashboard_v1_dashboard_filter_proto_rawDescData) - }) - return file_google_monitoring_dashboard_v1_dashboard_filter_proto_rawDescData -} - -var file_google_monitoring_dashboard_v1_dashboard_filter_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_google_monitoring_dashboard_v1_dashboard_filter_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_google_monitoring_dashboard_v1_dashboard_filter_proto_goTypes = []any{ - (DashboardFilter_FilterType)(0), // 0: google.monitoring.dashboard.v1.DashboardFilter.FilterType - (*DashboardFilter)(nil), // 1: google.monitoring.dashboard.v1.DashboardFilter -} -var file_google_monitoring_dashboard_v1_dashboard_filter_proto_depIdxs = []int32{ - 0, // 0: google.monitoring.dashboard.v1.DashboardFilter.filter_type:type_name -> google.monitoring.dashboard.v1.DashboardFilter.FilterType - 1, // [1:1] is the sub-list for method output_type - 1, // [1:1] is the sub-list for method input_type - 1, // [1:1] is the sub-list for extension type_name - 1, // [1:1] is the sub-list for extension extendee - 0, // [0:1] is the sub-list for field type_name -} - -func init() { file_google_monitoring_dashboard_v1_dashboard_filter_proto_init() } -func file_google_monitoring_dashboard_v1_dashboard_filter_proto_init() { - if File_google_monitoring_dashboard_v1_dashboard_filter_proto != nil { - return - } - file_google_monitoring_dashboard_v1_dashboard_filter_proto_msgTypes[0].OneofWrappers = []any{ - (*DashboardFilter_StringValue)(nil), - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_google_monitoring_dashboard_v1_dashboard_filter_proto_rawDesc, - NumEnums: 1, - NumMessages: 1, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_google_monitoring_dashboard_v1_dashboard_filter_proto_goTypes, - DependencyIndexes: file_google_monitoring_dashboard_v1_dashboard_filter_proto_depIdxs, - EnumInfos: file_google_monitoring_dashboard_v1_dashboard_filter_proto_enumTypes, - MessageInfos: file_google_monitoring_dashboard_v1_dashboard_filter_proto_msgTypes, - }.Build() - File_google_monitoring_dashboard_v1_dashboard_filter_proto = out.File - file_google_monitoring_dashboard_v1_dashboard_filter_proto_rawDesc = nil - file_google_monitoring_dashboard_v1_dashboard_filter_proto_goTypes = nil - file_google_monitoring_dashboard_v1_dashboard_filter_proto_depIdxs = nil -} diff --git a/vendor/cloud.google.com/go/monitoring/dashboard/apiv1/dashboardpb/dashboards_service.pb.go b/vendor/cloud.google.com/go/monitoring/dashboard/apiv1/dashboardpb/dashboards_service.pb.go deleted file mode 100644 index 28243fdaf8..0000000000 --- a/vendor/cloud.google.com/go/monitoring/dashboard/apiv1/dashboardpb/dashboards_service.pb.go +++ /dev/null @@ -1,626 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.35.2 -// protoc v4.25.7 -// source: google/monitoring/dashboard/v1/dashboards_service.proto - -package dashboardpb - -import ( - _ "google.golang.org/genproto/googleapis/api/annotations" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - emptypb "google.golang.org/protobuf/types/known/emptypb" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// The `CreateDashboard` request. -type CreateDashboardRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Required. The project on which to execute the request. The format is: - // - // projects/[PROJECT_ID_OR_NUMBER] - // - // The `[PROJECT_ID_OR_NUMBER]` must match the dashboard resource name. - Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` - // Required. The initial dashboard specification. - Dashboard *Dashboard `protobuf:"bytes,2,opt,name=dashboard,proto3" json:"dashboard,omitempty"` - // If set, validate the request and preview the review, but do not actually - // save it. - ValidateOnly bool `protobuf:"varint,3,opt,name=validate_only,json=validateOnly,proto3" json:"validate_only,omitempty"` -} - -func (x *CreateDashboardRequest) Reset() { - *x = CreateDashboardRequest{} - mi := &file_google_monitoring_dashboard_v1_dashboards_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *CreateDashboardRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CreateDashboardRequest) ProtoMessage() {} - -func (x *CreateDashboardRequest) ProtoReflect() protoreflect.Message { - mi := &file_google_monitoring_dashboard_v1_dashboards_service_proto_msgTypes[0] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CreateDashboardRequest.ProtoReflect.Descriptor instead. -func (*CreateDashboardRequest) Descriptor() ([]byte, []int) { - return file_google_monitoring_dashboard_v1_dashboards_service_proto_rawDescGZIP(), []int{0} -} - -func (x *CreateDashboardRequest) GetParent() string { - if x != nil { - return x.Parent - } - return "" -} - -func (x *CreateDashboardRequest) GetDashboard() *Dashboard { - if x != nil { - return x.Dashboard - } - return nil -} - -func (x *CreateDashboardRequest) GetValidateOnly() bool { - if x != nil { - return x.ValidateOnly - } - return false -} - -// The `ListDashboards` request. -type ListDashboardsRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Required. The scope of the dashboards to list. The format is: - // - // projects/[PROJECT_ID_OR_NUMBER] - Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` - // A positive number that is the maximum number of results to return. - // If unspecified, a default of 1000 is used. - PageSize int32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` - // Optional. If this field is not empty then it must contain the - // `nextPageToken` value returned by a previous call to this method. Using - // this field causes the method to return additional results from the previous - // method call. - PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` -} - -func (x *ListDashboardsRequest) Reset() { - *x = ListDashboardsRequest{} - mi := &file_google_monitoring_dashboard_v1_dashboards_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ListDashboardsRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListDashboardsRequest) ProtoMessage() {} - -func (x *ListDashboardsRequest) ProtoReflect() protoreflect.Message { - mi := &file_google_monitoring_dashboard_v1_dashboards_service_proto_msgTypes[1] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ListDashboardsRequest.ProtoReflect.Descriptor instead. -func (*ListDashboardsRequest) Descriptor() ([]byte, []int) { - return file_google_monitoring_dashboard_v1_dashboards_service_proto_rawDescGZIP(), []int{1} -} - -func (x *ListDashboardsRequest) GetParent() string { - if x != nil { - return x.Parent - } - return "" -} - -func (x *ListDashboardsRequest) GetPageSize() int32 { - if x != nil { - return x.PageSize - } - return 0 -} - -func (x *ListDashboardsRequest) GetPageToken() string { - if x != nil { - return x.PageToken - } - return "" -} - -// The `ListDashboards` request. -type ListDashboardsResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The list of requested dashboards. - Dashboards []*Dashboard `protobuf:"bytes,1,rep,name=dashboards,proto3" json:"dashboards,omitempty"` - // If there are more results than have been returned, then this field is set - // to a non-empty value. To see the additional results, - // use that value as `page_token` in the next call to this method. - NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` -} - -func (x *ListDashboardsResponse) Reset() { - *x = ListDashboardsResponse{} - mi := &file_google_monitoring_dashboard_v1_dashboards_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ListDashboardsResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListDashboardsResponse) ProtoMessage() {} - -func (x *ListDashboardsResponse) ProtoReflect() protoreflect.Message { - mi := &file_google_monitoring_dashboard_v1_dashboards_service_proto_msgTypes[2] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ListDashboardsResponse.ProtoReflect.Descriptor instead. -func (*ListDashboardsResponse) Descriptor() ([]byte, []int) { - return file_google_monitoring_dashboard_v1_dashboards_service_proto_rawDescGZIP(), []int{2} -} - -func (x *ListDashboardsResponse) GetDashboards() []*Dashboard { - if x != nil { - return x.Dashboards - } - return nil -} - -func (x *ListDashboardsResponse) GetNextPageToken() string { - if x != nil { - return x.NextPageToken - } - return "" -} - -// The `GetDashboard` request. -type GetDashboardRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Required. The resource name of the Dashboard. The format is one of: - // - // - `dashboards/[DASHBOARD_ID]` (for system dashboards) - // - `projects/[PROJECT_ID_OR_NUMBER]/dashboards/[DASHBOARD_ID]` - // (for custom dashboards). - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` -} - -func (x *GetDashboardRequest) Reset() { - *x = GetDashboardRequest{} - mi := &file_google_monitoring_dashboard_v1_dashboards_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *GetDashboardRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetDashboardRequest) ProtoMessage() {} - -func (x *GetDashboardRequest) ProtoReflect() protoreflect.Message { - mi := &file_google_monitoring_dashboard_v1_dashboards_service_proto_msgTypes[3] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetDashboardRequest.ProtoReflect.Descriptor instead. -func (*GetDashboardRequest) Descriptor() ([]byte, []int) { - return file_google_monitoring_dashboard_v1_dashboards_service_proto_rawDescGZIP(), []int{3} -} - -func (x *GetDashboardRequest) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -// The `DeleteDashboard` request. -type DeleteDashboardRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Required. The resource name of the Dashboard. The format is: - // - // projects/[PROJECT_ID_OR_NUMBER]/dashboards/[DASHBOARD_ID] - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` -} - -func (x *DeleteDashboardRequest) Reset() { - *x = DeleteDashboardRequest{} - mi := &file_google_monitoring_dashboard_v1_dashboards_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *DeleteDashboardRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DeleteDashboardRequest) ProtoMessage() {} - -func (x *DeleteDashboardRequest) ProtoReflect() protoreflect.Message { - mi := &file_google_monitoring_dashboard_v1_dashboards_service_proto_msgTypes[4] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DeleteDashboardRequest.ProtoReflect.Descriptor instead. -func (*DeleteDashboardRequest) Descriptor() ([]byte, []int) { - return file_google_monitoring_dashboard_v1_dashboards_service_proto_rawDescGZIP(), []int{4} -} - -func (x *DeleteDashboardRequest) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -// The `UpdateDashboard` request. -type UpdateDashboardRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Required. The dashboard that will replace the existing dashboard. - Dashboard *Dashboard `protobuf:"bytes,1,opt,name=dashboard,proto3" json:"dashboard,omitempty"` - // If set, validate the request and preview the review, but do not actually - // save it. - ValidateOnly bool `protobuf:"varint,3,opt,name=validate_only,json=validateOnly,proto3" json:"validate_only,omitempty"` -} - -func (x *UpdateDashboardRequest) Reset() { - *x = UpdateDashboardRequest{} - mi := &file_google_monitoring_dashboard_v1_dashboards_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *UpdateDashboardRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UpdateDashboardRequest) ProtoMessage() {} - -func (x *UpdateDashboardRequest) ProtoReflect() protoreflect.Message { - mi := &file_google_monitoring_dashboard_v1_dashboards_service_proto_msgTypes[5] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use UpdateDashboardRequest.ProtoReflect.Descriptor instead. -func (*UpdateDashboardRequest) Descriptor() ([]byte, []int) { - return file_google_monitoring_dashboard_v1_dashboards_service_proto_rawDescGZIP(), []int{5} -} - -func (x *UpdateDashboardRequest) GetDashboard() *Dashboard { - if x != nil { - return x.Dashboard - } - return nil -} - -func (x *UpdateDashboardRequest) GetValidateOnly() bool { - if x != nil { - return x.ValidateOnly - } - return false -} - -var File_google_monitoring_dashboard_v1_dashboards_service_proto protoreflect.FileDescriptor - -var file_google_monitoring_dashboard_v1_dashboards_service_proto_rawDesc = []byte{ - 0x0a, 0x37, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, - 0x69, 0x6e, 0x67, 0x2f, 0x64, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2f, 0x76, 0x31, - 0x2f, 0x64, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x73, 0x5f, 0x73, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x64, 0x61, 0x73, - 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2e, 0x76, 0x31, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, - 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x66, 0x69, 0x65, - 0x6c, 0x64, 0x5f, 0x62, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x72, 0x65, - 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x2f, - 0x64, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2f, 0x76, 0x31, 0x2f, 0x64, 0x61, 0x73, - 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x65, 0x6d, - 0x70, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xd8, 0x01, 0x0a, 0x16, 0x43, 0x72, - 0x65, 0x61, 0x74, 0x65, 0x44, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x12, 0x4b, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x42, 0x33, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x2d, 0x0a, 0x2b, 0x63, 0x6c, - 0x6f, 0x75, 0x64, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6d, 0x61, 0x6e, 0x61, 0x67, - 0x65, 0x72, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, - 0x6d, 0x2f, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, - 0x74, 0x12, 0x4c, 0x0a, 0x09, 0x64, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x6d, 0x6f, - 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x64, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, - 0x72, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x42, - 0x03, 0xe0, 0x41, 0x02, 0x52, 0x09, 0x64, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x12, - 0x23, 0x0a, 0x0d, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6f, 0x6e, 0x6c, 0x79, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, - 0x4f, 0x6e, 0x6c, 0x79, 0x22, 0xa5, 0x01, 0x0a, 0x15, 0x4c, 0x69, 0x73, 0x74, 0x44, 0x61, 0x73, - 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x4b, - 0x0a, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x33, - 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x2d, 0x0a, 0x2b, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x72, 0x65, 0x73, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x50, 0x72, 0x6f, 0x6a, - 0x65, 0x63, 0x74, 0x52, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x70, - 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, - 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x22, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, - 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, - 0x01, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x8b, 0x01, 0x0a, - 0x16, 0x4c, 0x69, 0x73, 0x74, 0x44, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x73, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x49, 0x0a, 0x0a, 0x64, 0x61, 0x73, 0x68, 0x62, - 0x6f, 0x61, 0x72, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x2e, - 0x64, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x61, 0x73, - 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x52, 0x0a, 0x64, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, - 0x64, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, - 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e, 0x65, 0x78, - 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x56, 0x0a, 0x13, 0x47, 0x65, - 0x74, 0x44, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x12, 0x3f, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, - 0x2b, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x25, 0x0a, 0x23, 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, - 0x69, 0x6e, 0x67, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, - 0x6f, 0x6d, 0x2f, 0x44, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x52, 0x04, 0x6e, 0x61, - 0x6d, 0x65, 0x22, 0x59, 0x0a, 0x16, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x44, 0x61, 0x73, 0x68, - 0x62, 0x6f, 0x61, 0x72, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3f, 0x0a, 0x04, - 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x2b, 0xe0, 0x41, 0x02, 0xfa, - 0x41, 0x25, 0x0a, 0x23, 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x44, 0x61, - 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x8b, 0x01, - 0x0a, 0x16, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x44, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, - 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x4c, 0x0a, 0x09, 0x64, 0x61, 0x73, 0x68, - 0x62, 0x6f, 0x61, 0x72, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x2e, - 0x64, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x61, 0x73, - 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x09, 0x64, 0x61, 0x73, - 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x12, 0x23, 0x0a, 0x0d, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, - 0x74, 0x65, 0x5f, 0x6f, 0x6e, 0x6c, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x76, - 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x4f, 0x6e, 0x6c, 0x79, 0x32, 0xdb, 0x08, 0x0a, 0x11, - 0x44, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, - 0x65, 0x12, 0xbe, 0x01, 0x0a, 0x0f, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x44, 0x61, 0x73, 0x68, - 0x62, 0x6f, 0x61, 0x72, 0x64, 0x12, 0x36, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x6d, - 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x64, 0x61, 0x73, 0x68, 0x62, 0x6f, - 0x61, 0x72, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x44, 0x61, 0x73, - 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, - 0x67, 0x2e, 0x64, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x44, - 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x22, 0x48, 0xda, 0x41, 0x10, 0x70, 0x61, 0x72, - 0x65, 0x6e, 0x74, 0x2c, 0x64, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x82, 0xd3, 0xe4, - 0x93, 0x02, 0x2f, 0x3a, 0x09, 0x64, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x22, 0x22, - 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x70, 0x72, 0x6f, 0x6a, - 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x64, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, - 0x64, 0x73, 0x12, 0xb4, 0x01, 0x0a, 0x0e, 0x4c, 0x69, 0x73, 0x74, 0x44, 0x61, 0x73, 0x68, 0x62, - 0x6f, 0x61, 0x72, 0x64, 0x73, 0x12, 0x35, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x6d, - 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x64, 0x61, 0x73, 0x68, 0x62, 0x6f, - 0x61, 0x72, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x44, 0x61, 0x73, 0x68, 0x62, - 0x6f, 0x61, 0x72, 0x64, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x36, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, - 0x2e, 0x64, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, - 0x73, 0x74, 0x44, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x73, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x33, 0xda, 0x41, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x82, - 0xd3, 0xe4, 0x93, 0x02, 0x24, 0x12, 0x22, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, - 0x6e, 0x74, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x64, - 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x73, 0x12, 0xa1, 0x01, 0x0a, 0x0c, 0x47, 0x65, - 0x74, 0x44, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x12, 0x33, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x64, - 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x44, - 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x29, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, - 0x69, 0x6e, 0x67, 0x2e, 0x64, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2e, 0x76, 0x31, - 0x2e, 0x44, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x22, 0x31, 0xda, 0x41, 0x04, 0x6e, - 0x61, 0x6d, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x24, 0x12, 0x22, 0x2f, 0x76, 0x31, 0x2f, 0x7b, - 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, - 0x64, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x73, 0x2f, 0x2a, 0x7d, 0x12, 0x94, 0x01, - 0x0a, 0x0f, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x44, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, - 0x64, 0x12, 0x36, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x6d, 0x6f, 0x6e, 0x69, 0x74, - 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x64, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2e, - 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x44, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, - 0x72, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, - 0x79, 0x22, 0x31, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x24, - 0x2a, 0x22, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, - 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x64, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, - 0x73, 0x2f, 0x2a, 0x7d, 0x12, 0xb5, 0x01, 0x0a, 0x0f, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x44, - 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x12, 0x36, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x64, 0x61, 0x73, - 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x44, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x29, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, - 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x64, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2e, 0x76, - 0x31, 0x2e, 0x44, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x22, 0x3f, 0x82, 0xd3, 0xe4, - 0x93, 0x02, 0x39, 0x3a, 0x09, 0x64, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x32, 0x2c, - 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x64, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2e, 0x6e, - 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x64, - 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x73, 0x2f, 0x2a, 0x7d, 0x1a, 0xda, 0x01, 0xca, - 0x41, 0x19, 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0xd2, 0x41, 0xba, 0x01, 0x68, - 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x77, 0x77, 0x77, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x63, - 0x6c, 0x6f, 0x75, 0x64, 0x2d, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x2c, 0x68, 0x74, - 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x77, 0x77, 0x77, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x6d, 0x6f, - 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x2c, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, - 0x2f, 0x77, 0x77, 0x77, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, - 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, - 0x69, 0x6e, 0x67, 0x2e, 0x72, 0x65, 0x61, 0x64, 0x2c, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, - 0x2f, 0x77, 0x77, 0x77, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, - 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, - 0x69, 0x6e, 0x67, 0x2e, 0x77, 0x72, 0x69, 0x74, 0x65, 0x42, 0xff, 0x01, 0x0a, 0x22, 0x63, 0x6f, - 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, - 0x69, 0x6e, 0x67, 0x2e, 0x64, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2e, 0x76, 0x31, - 0x42, 0x16, 0x44, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x73, 0x53, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x46, 0x63, 0x6c, 0x6f, 0x75, - 0x64, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x2f, - 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x2f, 0x64, 0x61, 0x73, 0x68, 0x62, - 0x6f, 0x61, 0x72, 0x64, 0x2f, 0x61, 0x70, 0x69, 0x76, 0x31, 0x2f, 0x64, 0x61, 0x73, 0x68, 0x62, - 0x6f, 0x61, 0x72, 0x64, 0x70, 0x62, 0x3b, 0x64, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, - 0x70, 0x62, 0xaa, 0x02, 0x24, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x43, 0x6c, 0x6f, 0x75, - 0x64, 0x2e, 0x4d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x44, 0x61, 0x73, - 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x24, 0x47, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x5c, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x5c, 0x4d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, - 0x69, 0x6e, 0x67, 0x5c, 0x44, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x5c, 0x56, 0x31, - 0xea, 0x02, 0x28, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x3a, 0x3a, 0x43, 0x6c, 0x6f, 0x75, 0x64, - 0x3a, 0x3a, 0x4d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x3a, 0x3a, 0x44, 0x61, - 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x33, -} - -var ( - file_google_monitoring_dashboard_v1_dashboards_service_proto_rawDescOnce sync.Once - file_google_monitoring_dashboard_v1_dashboards_service_proto_rawDescData = file_google_monitoring_dashboard_v1_dashboards_service_proto_rawDesc -) - -func file_google_monitoring_dashboard_v1_dashboards_service_proto_rawDescGZIP() []byte { - file_google_monitoring_dashboard_v1_dashboards_service_proto_rawDescOnce.Do(func() { - file_google_monitoring_dashboard_v1_dashboards_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_monitoring_dashboard_v1_dashboards_service_proto_rawDescData) - }) - return file_google_monitoring_dashboard_v1_dashboards_service_proto_rawDescData -} - -var file_google_monitoring_dashboard_v1_dashboards_service_proto_msgTypes = make([]protoimpl.MessageInfo, 6) -var file_google_monitoring_dashboard_v1_dashboards_service_proto_goTypes = []any{ - (*CreateDashboardRequest)(nil), // 0: google.monitoring.dashboard.v1.CreateDashboardRequest - (*ListDashboardsRequest)(nil), // 1: google.monitoring.dashboard.v1.ListDashboardsRequest - (*ListDashboardsResponse)(nil), // 2: google.monitoring.dashboard.v1.ListDashboardsResponse - (*GetDashboardRequest)(nil), // 3: google.monitoring.dashboard.v1.GetDashboardRequest - (*DeleteDashboardRequest)(nil), // 4: google.monitoring.dashboard.v1.DeleteDashboardRequest - (*UpdateDashboardRequest)(nil), // 5: google.monitoring.dashboard.v1.UpdateDashboardRequest - (*Dashboard)(nil), // 6: google.monitoring.dashboard.v1.Dashboard - (*emptypb.Empty)(nil), // 7: google.protobuf.Empty -} -var file_google_monitoring_dashboard_v1_dashboards_service_proto_depIdxs = []int32{ - 6, // 0: google.monitoring.dashboard.v1.CreateDashboardRequest.dashboard:type_name -> google.monitoring.dashboard.v1.Dashboard - 6, // 1: google.monitoring.dashboard.v1.ListDashboardsResponse.dashboards:type_name -> google.monitoring.dashboard.v1.Dashboard - 6, // 2: google.monitoring.dashboard.v1.UpdateDashboardRequest.dashboard:type_name -> google.monitoring.dashboard.v1.Dashboard - 0, // 3: google.monitoring.dashboard.v1.DashboardsService.CreateDashboard:input_type -> google.monitoring.dashboard.v1.CreateDashboardRequest - 1, // 4: google.monitoring.dashboard.v1.DashboardsService.ListDashboards:input_type -> google.monitoring.dashboard.v1.ListDashboardsRequest - 3, // 5: google.monitoring.dashboard.v1.DashboardsService.GetDashboard:input_type -> google.monitoring.dashboard.v1.GetDashboardRequest - 4, // 6: google.monitoring.dashboard.v1.DashboardsService.DeleteDashboard:input_type -> google.monitoring.dashboard.v1.DeleteDashboardRequest - 5, // 7: google.monitoring.dashboard.v1.DashboardsService.UpdateDashboard:input_type -> google.monitoring.dashboard.v1.UpdateDashboardRequest - 6, // 8: google.monitoring.dashboard.v1.DashboardsService.CreateDashboard:output_type -> google.monitoring.dashboard.v1.Dashboard - 2, // 9: google.monitoring.dashboard.v1.DashboardsService.ListDashboards:output_type -> google.monitoring.dashboard.v1.ListDashboardsResponse - 6, // 10: google.monitoring.dashboard.v1.DashboardsService.GetDashboard:output_type -> google.monitoring.dashboard.v1.Dashboard - 7, // 11: google.monitoring.dashboard.v1.DashboardsService.DeleteDashboard:output_type -> google.protobuf.Empty - 6, // 12: google.monitoring.dashboard.v1.DashboardsService.UpdateDashboard:output_type -> google.monitoring.dashboard.v1.Dashboard - 8, // [8:13] is the sub-list for method output_type - 3, // [3:8] is the sub-list for method input_type - 3, // [3:3] is the sub-list for extension type_name - 3, // [3:3] is the sub-list for extension extendee - 0, // [0:3] is the sub-list for field type_name -} - -func init() { file_google_monitoring_dashboard_v1_dashboards_service_proto_init() } -func file_google_monitoring_dashboard_v1_dashboards_service_proto_init() { - if File_google_monitoring_dashboard_v1_dashboards_service_proto != nil { - return - } - file_google_monitoring_dashboard_v1_dashboard_proto_init() - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_google_monitoring_dashboard_v1_dashboards_service_proto_rawDesc, - NumEnums: 0, - NumMessages: 6, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_google_monitoring_dashboard_v1_dashboards_service_proto_goTypes, - DependencyIndexes: file_google_monitoring_dashboard_v1_dashboards_service_proto_depIdxs, - MessageInfos: file_google_monitoring_dashboard_v1_dashboards_service_proto_msgTypes, - }.Build() - File_google_monitoring_dashboard_v1_dashboards_service_proto = out.File - file_google_monitoring_dashboard_v1_dashboards_service_proto_rawDesc = nil - file_google_monitoring_dashboard_v1_dashboards_service_proto_goTypes = nil - file_google_monitoring_dashboard_v1_dashboards_service_proto_depIdxs = nil -} diff --git a/vendor/cloud.google.com/go/monitoring/dashboard/apiv1/dashboardpb/dashboards_service_grpc.pb.go b/vendor/cloud.google.com/go/monitoring/dashboard/apiv1/dashboardpb/dashboards_service_grpc.pb.go deleted file mode 100644 index fdfd172fac..0000000000 --- a/vendor/cloud.google.com/go/monitoring/dashboard/apiv1/dashboardpb/dashboards_service_grpc.pb.go +++ /dev/null @@ -1,322 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Code generated by protoc-gen-go-grpc. DO NOT EDIT. -// versions: -// - protoc-gen-go-grpc v1.3.0 -// - protoc v4.25.7 -// source: google/monitoring/dashboard/v1/dashboards_service.proto - -package dashboardpb - -import ( - context "context" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" - emptypb "google.golang.org/protobuf/types/known/emptypb" -) - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 - -const ( - DashboardsService_CreateDashboard_FullMethodName = "/google.monitoring.dashboard.v1.DashboardsService/CreateDashboard" - DashboardsService_ListDashboards_FullMethodName = "/google.monitoring.dashboard.v1.DashboardsService/ListDashboards" - DashboardsService_GetDashboard_FullMethodName = "/google.monitoring.dashboard.v1.DashboardsService/GetDashboard" - DashboardsService_DeleteDashboard_FullMethodName = "/google.monitoring.dashboard.v1.DashboardsService/DeleteDashboard" - DashboardsService_UpdateDashboard_FullMethodName = "/google.monitoring.dashboard.v1.DashboardsService/UpdateDashboard" -) - -// DashboardsServiceClient is the client API for DashboardsService service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. -type DashboardsServiceClient interface { - // Creates a new custom dashboard. For examples on how you can use this API to - // create dashboards, see [Managing dashboards by - // API](https://cloud.google.com/monitoring/dashboards/api-dashboard). This - // method requires the `monitoring.dashboards.create` permission on the - // specified project. For more information about permissions, see [Cloud - // Identity and Access Management](https://cloud.google.com/iam). - CreateDashboard(ctx context.Context, in *CreateDashboardRequest, opts ...grpc.CallOption) (*Dashboard, error) - // Lists the existing dashboards. - // - // This method requires the `monitoring.dashboards.list` permission - // on the specified project. For more information, see - // [Cloud Identity and Access Management](https://cloud.google.com/iam). - ListDashboards(ctx context.Context, in *ListDashboardsRequest, opts ...grpc.CallOption) (*ListDashboardsResponse, error) - // Fetches a specific dashboard. - // - // This method requires the `monitoring.dashboards.get` permission - // on the specified dashboard. For more information, see - // [Cloud Identity and Access Management](https://cloud.google.com/iam). - GetDashboard(ctx context.Context, in *GetDashboardRequest, opts ...grpc.CallOption) (*Dashboard, error) - // Deletes an existing custom dashboard. - // - // This method requires the `monitoring.dashboards.delete` permission - // on the specified dashboard. For more information, see - // [Cloud Identity and Access Management](https://cloud.google.com/iam). - DeleteDashboard(ctx context.Context, in *DeleteDashboardRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) - // Replaces an existing custom dashboard with a new definition. - // - // This method requires the `monitoring.dashboards.update` permission - // on the specified dashboard. For more information, see - // [Cloud Identity and Access Management](https://cloud.google.com/iam). - UpdateDashboard(ctx context.Context, in *UpdateDashboardRequest, opts ...grpc.CallOption) (*Dashboard, error) -} - -type dashboardsServiceClient struct { - cc grpc.ClientConnInterface -} - -func NewDashboardsServiceClient(cc grpc.ClientConnInterface) DashboardsServiceClient { - return &dashboardsServiceClient{cc} -} - -func (c *dashboardsServiceClient) CreateDashboard(ctx context.Context, in *CreateDashboardRequest, opts ...grpc.CallOption) (*Dashboard, error) { - out := new(Dashboard) - err := c.cc.Invoke(ctx, DashboardsService_CreateDashboard_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *dashboardsServiceClient) ListDashboards(ctx context.Context, in *ListDashboardsRequest, opts ...grpc.CallOption) (*ListDashboardsResponse, error) { - out := new(ListDashboardsResponse) - err := c.cc.Invoke(ctx, DashboardsService_ListDashboards_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *dashboardsServiceClient) GetDashboard(ctx context.Context, in *GetDashboardRequest, opts ...grpc.CallOption) (*Dashboard, error) { - out := new(Dashboard) - err := c.cc.Invoke(ctx, DashboardsService_GetDashboard_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *dashboardsServiceClient) DeleteDashboard(ctx context.Context, in *DeleteDashboardRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { - out := new(emptypb.Empty) - err := c.cc.Invoke(ctx, DashboardsService_DeleteDashboard_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *dashboardsServiceClient) UpdateDashboard(ctx context.Context, in *UpdateDashboardRequest, opts ...grpc.CallOption) (*Dashboard, error) { - out := new(Dashboard) - err := c.cc.Invoke(ctx, DashboardsService_UpdateDashboard_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// DashboardsServiceServer is the server API for DashboardsService service. -// All implementations should embed UnimplementedDashboardsServiceServer -// for forward compatibility -type DashboardsServiceServer interface { - // Creates a new custom dashboard. For examples on how you can use this API to - // create dashboards, see [Managing dashboards by - // API](https://cloud.google.com/monitoring/dashboards/api-dashboard). This - // method requires the `monitoring.dashboards.create` permission on the - // specified project. For more information about permissions, see [Cloud - // Identity and Access Management](https://cloud.google.com/iam). - CreateDashboard(context.Context, *CreateDashboardRequest) (*Dashboard, error) - // Lists the existing dashboards. - // - // This method requires the `monitoring.dashboards.list` permission - // on the specified project. For more information, see - // [Cloud Identity and Access Management](https://cloud.google.com/iam). - ListDashboards(context.Context, *ListDashboardsRequest) (*ListDashboardsResponse, error) - // Fetches a specific dashboard. - // - // This method requires the `monitoring.dashboards.get` permission - // on the specified dashboard. For more information, see - // [Cloud Identity and Access Management](https://cloud.google.com/iam). - GetDashboard(context.Context, *GetDashboardRequest) (*Dashboard, error) - // Deletes an existing custom dashboard. - // - // This method requires the `monitoring.dashboards.delete` permission - // on the specified dashboard. For more information, see - // [Cloud Identity and Access Management](https://cloud.google.com/iam). - DeleteDashboard(context.Context, *DeleteDashboardRequest) (*emptypb.Empty, error) - // Replaces an existing custom dashboard with a new definition. - // - // This method requires the `monitoring.dashboards.update` permission - // on the specified dashboard. For more information, see - // [Cloud Identity and Access Management](https://cloud.google.com/iam). - UpdateDashboard(context.Context, *UpdateDashboardRequest) (*Dashboard, error) -} - -// UnimplementedDashboardsServiceServer should be embedded to have forward compatible implementations. -type UnimplementedDashboardsServiceServer struct { -} - -func (UnimplementedDashboardsServiceServer) CreateDashboard(context.Context, *CreateDashboardRequest) (*Dashboard, error) { - return nil, status.Errorf(codes.Unimplemented, "method CreateDashboard not implemented") -} -func (UnimplementedDashboardsServiceServer) ListDashboards(context.Context, *ListDashboardsRequest) (*ListDashboardsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ListDashboards not implemented") -} -func (UnimplementedDashboardsServiceServer) GetDashboard(context.Context, *GetDashboardRequest) (*Dashboard, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetDashboard not implemented") -} -func (UnimplementedDashboardsServiceServer) DeleteDashboard(context.Context, *DeleteDashboardRequest) (*emptypb.Empty, error) { - return nil, status.Errorf(codes.Unimplemented, "method DeleteDashboard not implemented") -} -func (UnimplementedDashboardsServiceServer) UpdateDashboard(context.Context, *UpdateDashboardRequest) (*Dashboard, error) { - return nil, status.Errorf(codes.Unimplemented, "method UpdateDashboard not implemented") -} - -// UnsafeDashboardsServiceServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to DashboardsServiceServer will -// result in compilation errors. -type UnsafeDashboardsServiceServer interface { - mustEmbedUnimplementedDashboardsServiceServer() -} - -func RegisterDashboardsServiceServer(s grpc.ServiceRegistrar, srv DashboardsServiceServer) { - s.RegisterService(&DashboardsService_ServiceDesc, srv) -} - -func _DashboardsService_CreateDashboard_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CreateDashboardRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(DashboardsServiceServer).CreateDashboard(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: DashboardsService_CreateDashboard_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(DashboardsServiceServer).CreateDashboard(ctx, req.(*CreateDashboardRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _DashboardsService_ListDashboards_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ListDashboardsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(DashboardsServiceServer).ListDashboards(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: DashboardsService_ListDashboards_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(DashboardsServiceServer).ListDashboards(ctx, req.(*ListDashboardsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _DashboardsService_GetDashboard_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetDashboardRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(DashboardsServiceServer).GetDashboard(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: DashboardsService_GetDashboard_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(DashboardsServiceServer).GetDashboard(ctx, req.(*GetDashboardRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _DashboardsService_DeleteDashboard_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DeleteDashboardRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(DashboardsServiceServer).DeleteDashboard(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: DashboardsService_DeleteDashboard_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(DashboardsServiceServer).DeleteDashboard(ctx, req.(*DeleteDashboardRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _DashboardsService_UpdateDashboard_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(UpdateDashboardRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(DashboardsServiceServer).UpdateDashboard(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: DashboardsService_UpdateDashboard_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(DashboardsServiceServer).UpdateDashboard(ctx, req.(*UpdateDashboardRequest)) - } - return interceptor(ctx, in, info, handler) -} - -// DashboardsService_ServiceDesc is the grpc.ServiceDesc for DashboardsService service. -// It's only intended for direct use with grpc.RegisterService, -// and not to be introspected or modified (even as a copy) -var DashboardsService_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "google.monitoring.dashboard.v1.DashboardsService", - HandlerType: (*DashboardsServiceServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "CreateDashboard", - Handler: _DashboardsService_CreateDashboard_Handler, - }, - { - MethodName: "ListDashboards", - Handler: _DashboardsService_ListDashboards_Handler, - }, - { - MethodName: "GetDashboard", - Handler: _DashboardsService_GetDashboard_Handler, - }, - { - MethodName: "DeleteDashboard", - Handler: _DashboardsService_DeleteDashboard_Handler, - }, - { - MethodName: "UpdateDashboard", - Handler: _DashboardsService_UpdateDashboard_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "google/monitoring/dashboard/v1/dashboards_service.proto", -} diff --git a/vendor/cloud.google.com/go/monitoring/dashboard/apiv1/dashboardpb/drilldowns.pb.go b/vendor/cloud.google.com/go/monitoring/dashboard/apiv1/dashboardpb/drilldowns.pb.go deleted file mode 100644 index 6abb773b84..0000000000 --- a/vendor/cloud.google.com/go/monitoring/dashboard/apiv1/dashboardpb/drilldowns.pb.go +++ /dev/null @@ -1,94 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.35.2 -// protoc v4.25.7 -// source: google/monitoring/dashboard/v1/drilldowns.proto - -package dashboardpb - -import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -var File_google_monitoring_dashboard_v1_drilldowns_proto protoreflect.FileDescriptor - -var file_google_monitoring_dashboard_v1_drilldowns_proto_rawDesc = []byte{ - 0x0a, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, - 0x69, 0x6e, 0x67, 0x2f, 0x64, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2f, 0x76, 0x31, - 0x2f, 0x64, 0x72, 0x69, 0x6c, 0x6c, 0x64, 0x6f, 0x77, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x12, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, - 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x64, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2e, 0x76, - 0x31, 0x42, 0xf8, 0x01, 0x0a, 0x22, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x64, 0x61, 0x73, 0x68, - 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2e, 0x76, 0x31, 0x42, 0x0f, 0x44, 0x72, 0x69, 0x6c, 0x6c, 0x64, - 0x6f, 0x77, 0x6e, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x46, 0x63, 0x6c, 0x6f, - 0x75, 0x64, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, - 0x2f, 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x2f, 0x64, 0x61, 0x73, 0x68, - 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2f, 0x61, 0x70, 0x69, 0x76, 0x31, 0x2f, 0x64, 0x61, 0x73, 0x68, - 0x62, 0x6f, 0x61, 0x72, 0x64, 0x70, 0x62, 0x3b, 0x64, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, - 0x64, 0x70, 0x62, 0xaa, 0x02, 0x24, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x43, 0x6c, 0x6f, - 0x75, 0x64, 0x2e, 0x4d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x44, 0x61, - 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x24, 0x47, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x5c, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x5c, 0x4d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, - 0x72, 0x69, 0x6e, 0x67, 0x5c, 0x44, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x5c, 0x56, - 0x31, 0xea, 0x02, 0x28, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x3a, 0x3a, 0x43, 0x6c, 0x6f, 0x75, - 0x64, 0x3a, 0x3a, 0x4d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x3a, 0x3a, 0x44, - 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x33, -} - -var file_google_monitoring_dashboard_v1_drilldowns_proto_goTypes = []any{} -var file_google_monitoring_dashboard_v1_drilldowns_proto_depIdxs = []int32{ - 0, // [0:0] is the sub-list for method output_type - 0, // [0:0] is the sub-list for method input_type - 0, // [0:0] is the sub-list for extension type_name - 0, // [0:0] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name -} - -func init() { file_google_monitoring_dashboard_v1_drilldowns_proto_init() } -func file_google_monitoring_dashboard_v1_drilldowns_proto_init() { - if File_google_monitoring_dashboard_v1_drilldowns_proto != nil { - return - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_google_monitoring_dashboard_v1_drilldowns_proto_rawDesc, - NumEnums: 0, - NumMessages: 0, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_google_monitoring_dashboard_v1_drilldowns_proto_goTypes, - DependencyIndexes: file_google_monitoring_dashboard_v1_drilldowns_proto_depIdxs, - }.Build() - File_google_monitoring_dashboard_v1_drilldowns_proto = out.File - file_google_monitoring_dashboard_v1_drilldowns_proto_rawDesc = nil - file_google_monitoring_dashboard_v1_drilldowns_proto_goTypes = nil - file_google_monitoring_dashboard_v1_drilldowns_proto_depIdxs = nil -} diff --git a/vendor/cloud.google.com/go/monitoring/dashboard/apiv1/dashboardpb/error_reporting_panel.pb.go b/vendor/cloud.google.com/go/monitoring/dashboard/apiv1/dashboardpb/error_reporting_panel.pb.go deleted file mode 100644 index 48b58a2f4f..0000000000 --- a/vendor/cloud.google.com/go/monitoring/dashboard/apiv1/dashboardpb/error_reporting_panel.pb.go +++ /dev/null @@ -1,196 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.35.2 -// protoc v4.25.7 -// source: google/monitoring/dashboard/v1/error_reporting_panel.proto - -package dashboardpb - -import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// A widget that displays a list of error groups. -type ErrorReportingPanel struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The resource name of the Google Cloud Platform project. Written - // as `projects/{projectID}` or `projects/{projectNumber}`, where - // `{projectID}` and `{projectNumber}` can be found in the - // [Google Cloud console](https://support.google.com/cloud/answer/6158840). - // - // Examples: `projects/my-project-123`, `projects/5551234`. - ProjectNames []string `protobuf:"bytes,1,rep,name=project_names,json=projectNames,proto3" json:"project_names,omitempty"` - // An identifier of the service, such as the name of the - // executable, job, or Google App Engine service name. This field is expected - // to have a low number of values that are relatively stable over time, as - // opposed to `version`, which can be changed whenever new code is deployed. - // - // Contains the service name for error reports extracted from Google - // App Engine logs or `default` if the App Engine default service is used. - Services []string `protobuf:"bytes,2,rep,name=services,proto3" json:"services,omitempty"` - // Represents the source code version that the developer provided, - // which could represent a version label or a Git SHA-1 hash, for example. - // For App Engine standard environment, the version is set to the version of - // the app. - Versions []string `protobuf:"bytes,3,rep,name=versions,proto3" json:"versions,omitempty"` -} - -func (x *ErrorReportingPanel) Reset() { - *x = ErrorReportingPanel{} - mi := &file_google_monitoring_dashboard_v1_error_reporting_panel_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ErrorReportingPanel) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ErrorReportingPanel) ProtoMessage() {} - -func (x *ErrorReportingPanel) ProtoReflect() protoreflect.Message { - mi := &file_google_monitoring_dashboard_v1_error_reporting_panel_proto_msgTypes[0] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ErrorReportingPanel.ProtoReflect.Descriptor instead. -func (*ErrorReportingPanel) Descriptor() ([]byte, []int) { - return file_google_monitoring_dashboard_v1_error_reporting_panel_proto_rawDescGZIP(), []int{0} -} - -func (x *ErrorReportingPanel) GetProjectNames() []string { - if x != nil { - return x.ProjectNames - } - return nil -} - -func (x *ErrorReportingPanel) GetServices() []string { - if x != nil { - return x.Services - } - return nil -} - -func (x *ErrorReportingPanel) GetVersions() []string { - if x != nil { - return x.Versions - } - return nil -} - -var File_google_monitoring_dashboard_v1_error_reporting_panel_proto protoreflect.FileDescriptor - -var file_google_monitoring_dashboard_v1_error_reporting_panel_proto_rawDesc = []byte{ - 0x0a, 0x3a, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, - 0x69, 0x6e, 0x67, 0x2f, 0x64, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2f, 0x76, 0x31, - 0x2f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x69, 0x6e, 0x67, - 0x5f, 0x70, 0x61, 0x6e, 0x65, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x2e, - 0x64, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2e, 0x76, 0x31, 0x22, 0x72, 0x0a, 0x13, - 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x69, 0x6e, 0x67, 0x50, 0x61, - 0x6e, 0x65, 0x6c, 0x12, 0x23, 0x0a, 0x0d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x6e, - 0x61, 0x6d, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0c, 0x70, 0x72, 0x6f, 0x6a, - 0x65, 0x63, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x73, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, - 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, - 0x42, 0xd6, 0x01, 0x0a, 0x22, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x64, 0x61, 0x73, 0x68, 0x62, - 0x6f, 0x61, 0x72, 0x64, 0x2e, 0x76, 0x31, 0x42, 0x18, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x65, - 0x70, 0x6f, 0x72, 0x74, 0x69, 0x6e, 0x67, 0x50, 0x61, 0x6e, 0x65, 0x6c, 0x50, 0x72, 0x6f, 0x74, - 0x6f, 0x50, 0x01, 0x5a, 0x46, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x2f, 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, - 0x69, 0x6e, 0x67, 0x2f, 0x64, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2f, 0x61, 0x70, - 0x69, 0x76, 0x31, 0x2f, 0x64, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x70, 0x62, 0x3b, - 0x64, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x70, 0x62, 0xaa, 0x02, 0x24, 0x47, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x4d, 0x6f, 0x6e, 0x69, 0x74, - 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x44, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2e, - 0x56, 0x31, 0xca, 0x02, 0x24, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x5c, 0x43, 0x6c, 0x6f, 0x75, - 0x64, 0x5c, 0x4d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x5c, 0x44, 0x61, 0x73, - 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x5c, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x33, -} - -var ( - file_google_monitoring_dashboard_v1_error_reporting_panel_proto_rawDescOnce sync.Once - file_google_monitoring_dashboard_v1_error_reporting_panel_proto_rawDescData = file_google_monitoring_dashboard_v1_error_reporting_panel_proto_rawDesc -) - -func file_google_monitoring_dashboard_v1_error_reporting_panel_proto_rawDescGZIP() []byte { - file_google_monitoring_dashboard_v1_error_reporting_panel_proto_rawDescOnce.Do(func() { - file_google_monitoring_dashboard_v1_error_reporting_panel_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_monitoring_dashboard_v1_error_reporting_panel_proto_rawDescData) - }) - return file_google_monitoring_dashboard_v1_error_reporting_panel_proto_rawDescData -} - -var file_google_monitoring_dashboard_v1_error_reporting_panel_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_google_monitoring_dashboard_v1_error_reporting_panel_proto_goTypes = []any{ - (*ErrorReportingPanel)(nil), // 0: google.monitoring.dashboard.v1.ErrorReportingPanel -} -var file_google_monitoring_dashboard_v1_error_reporting_panel_proto_depIdxs = []int32{ - 0, // [0:0] is the sub-list for method output_type - 0, // [0:0] is the sub-list for method input_type - 0, // [0:0] is the sub-list for extension type_name - 0, // [0:0] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name -} - -func init() { file_google_monitoring_dashboard_v1_error_reporting_panel_proto_init() } -func file_google_monitoring_dashboard_v1_error_reporting_panel_proto_init() { - if File_google_monitoring_dashboard_v1_error_reporting_panel_proto != nil { - return - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_google_monitoring_dashboard_v1_error_reporting_panel_proto_rawDesc, - NumEnums: 0, - NumMessages: 1, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_google_monitoring_dashboard_v1_error_reporting_panel_proto_goTypes, - DependencyIndexes: file_google_monitoring_dashboard_v1_error_reporting_panel_proto_depIdxs, - MessageInfos: file_google_monitoring_dashboard_v1_error_reporting_panel_proto_msgTypes, - }.Build() - File_google_monitoring_dashboard_v1_error_reporting_panel_proto = out.File - file_google_monitoring_dashboard_v1_error_reporting_panel_proto_rawDesc = nil - file_google_monitoring_dashboard_v1_error_reporting_panel_proto_goTypes = nil - file_google_monitoring_dashboard_v1_error_reporting_panel_proto_depIdxs = nil -} diff --git a/vendor/cloud.google.com/go/monitoring/dashboard/apiv1/dashboardpb/incident_list.pb.go b/vendor/cloud.google.com/go/monitoring/dashboard/apiv1/dashboardpb/incident_list.pb.go deleted file mode 100644 index de77099fb2..0000000000 --- a/vendor/cloud.google.com/go/monitoring/dashboard/apiv1/dashboardpb/incident_list.pb.go +++ /dev/null @@ -1,189 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.35.2 -// protoc v4.25.7 -// source: google/monitoring/dashboard/v1/incident_list.proto - -package dashboardpb - -import ( - _ "google.golang.org/genproto/googleapis/api/annotations" - monitoredres "google.golang.org/genproto/googleapis/api/monitoredres" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// A widget that displays a list of incidents -type IncidentList struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Optional. The monitored resource for which incidents are listed. - // The resource doesn't need to be fully specified. That is, you can specify - // the resource type but not the values of the resource labels. - // The resource type and labels are used for filtering. - MonitoredResources []*monitoredres.MonitoredResource `protobuf:"bytes,1,rep,name=monitored_resources,json=monitoredResources,proto3" json:"monitored_resources,omitempty"` - // Optional. A list of alert policy names to filter the incident list by. - // Don't include the project ID prefix in the policy name. For - // example, use `alertPolicies/utilization`. - PolicyNames []string `protobuf:"bytes,2,rep,name=policy_names,json=policyNames,proto3" json:"policy_names,omitempty"` -} - -func (x *IncidentList) Reset() { - *x = IncidentList{} - mi := &file_google_monitoring_dashboard_v1_incident_list_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *IncidentList) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*IncidentList) ProtoMessage() {} - -func (x *IncidentList) ProtoReflect() protoreflect.Message { - mi := &file_google_monitoring_dashboard_v1_incident_list_proto_msgTypes[0] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use IncidentList.ProtoReflect.Descriptor instead. -func (*IncidentList) Descriptor() ([]byte, []int) { - return file_google_monitoring_dashboard_v1_incident_list_proto_rawDescGZIP(), []int{0} -} - -func (x *IncidentList) GetMonitoredResources() []*monitoredres.MonitoredResource { - if x != nil { - return x.MonitoredResources - } - return nil -} - -func (x *IncidentList) GetPolicyNames() []string { - if x != nil { - return x.PolicyNames - } - return nil -} - -var File_google_monitoring_dashboard_v1_incident_list_proto protoreflect.FileDescriptor - -var file_google_monitoring_dashboard_v1_incident_list_proto_rawDesc = []byte{ - 0x0a, 0x32, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, - 0x69, 0x6e, 0x67, 0x2f, 0x64, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2f, 0x76, 0x31, - 0x2f, 0x69, 0x6e, 0x63, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x6d, 0x6f, 0x6e, - 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x64, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, - 0x64, 0x2e, 0x76, 0x31, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, - 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x62, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x23, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, - 0x69, 0x2f, 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x65, 0x64, 0x5f, 0x72, 0x65, 0x73, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x8b, 0x01, 0x0a, 0x0c, 0x49, - 0x6e, 0x63, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x53, 0x0a, 0x13, 0x6d, - 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x65, 0x64, 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x65, 0x64, 0x52, - 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x12, 0x6d, 0x6f, - 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x65, 0x64, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, - 0x12, 0x26, 0x0a, 0x0c, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, - 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0b, 0x70, 0x6f, 0x6c, - 0x69, 0x63, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x42, 0xfa, 0x01, 0x0a, 0x22, 0x63, 0x6f, 0x6d, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, - 0x6e, 0x67, 0x2e, 0x64, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2e, 0x76, 0x31, 0x42, - 0x11, 0x49, 0x6e, 0x63, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x72, 0x6f, - 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x46, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x2f, 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, - 0x72, 0x69, 0x6e, 0x67, 0x2f, 0x64, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2f, 0x61, - 0x70, 0x69, 0x76, 0x31, 0x2f, 0x64, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x70, 0x62, - 0x3b, 0x64, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x70, 0x62, 0xaa, 0x02, 0x24, 0x47, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x4d, 0x6f, 0x6e, 0x69, - 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x44, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, - 0x2e, 0x56, 0x31, 0xca, 0x02, 0x24, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x5c, 0x43, 0x6c, 0x6f, - 0x75, 0x64, 0x5c, 0x4d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x5c, 0x44, 0x61, - 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x5c, 0x56, 0x31, 0xea, 0x02, 0x28, 0x47, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x3a, 0x3a, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x3a, 0x3a, 0x4d, 0x6f, 0x6e, 0x69, - 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x3a, 0x3a, 0x44, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, - 0x64, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_google_monitoring_dashboard_v1_incident_list_proto_rawDescOnce sync.Once - file_google_monitoring_dashboard_v1_incident_list_proto_rawDescData = file_google_monitoring_dashboard_v1_incident_list_proto_rawDesc -) - -func file_google_monitoring_dashboard_v1_incident_list_proto_rawDescGZIP() []byte { - file_google_monitoring_dashboard_v1_incident_list_proto_rawDescOnce.Do(func() { - file_google_monitoring_dashboard_v1_incident_list_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_monitoring_dashboard_v1_incident_list_proto_rawDescData) - }) - return file_google_monitoring_dashboard_v1_incident_list_proto_rawDescData -} - -var file_google_monitoring_dashboard_v1_incident_list_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_google_monitoring_dashboard_v1_incident_list_proto_goTypes = []any{ - (*IncidentList)(nil), // 0: google.monitoring.dashboard.v1.IncidentList - (*monitoredres.MonitoredResource)(nil), // 1: google.api.MonitoredResource -} -var file_google_monitoring_dashboard_v1_incident_list_proto_depIdxs = []int32{ - 1, // 0: google.monitoring.dashboard.v1.IncidentList.monitored_resources:type_name -> google.api.MonitoredResource - 1, // [1:1] is the sub-list for method output_type - 1, // [1:1] is the sub-list for method input_type - 1, // [1:1] is the sub-list for extension type_name - 1, // [1:1] is the sub-list for extension extendee - 0, // [0:1] is the sub-list for field type_name -} - -func init() { file_google_monitoring_dashboard_v1_incident_list_proto_init() } -func file_google_monitoring_dashboard_v1_incident_list_proto_init() { - if File_google_monitoring_dashboard_v1_incident_list_proto != nil { - return - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_google_monitoring_dashboard_v1_incident_list_proto_rawDesc, - NumEnums: 0, - NumMessages: 1, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_google_monitoring_dashboard_v1_incident_list_proto_goTypes, - DependencyIndexes: file_google_monitoring_dashboard_v1_incident_list_proto_depIdxs, - MessageInfos: file_google_monitoring_dashboard_v1_incident_list_proto_msgTypes, - }.Build() - File_google_monitoring_dashboard_v1_incident_list_proto = out.File - file_google_monitoring_dashboard_v1_incident_list_proto_rawDesc = nil - file_google_monitoring_dashboard_v1_incident_list_proto_goTypes = nil - file_google_monitoring_dashboard_v1_incident_list_proto_depIdxs = nil -} diff --git a/vendor/cloud.google.com/go/monitoring/dashboard/apiv1/dashboardpb/layouts.pb.go b/vendor/cloud.google.com/go/monitoring/dashboard/apiv1/dashboardpb/layouts.pb.go deleted file mode 100644 index 689f9dcccd..0000000000 --- a/vendor/cloud.google.com/go/monitoring/dashboard/apiv1/dashboardpb/layouts.pb.go +++ /dev/null @@ -1,595 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.35.2 -// protoc v4.25.7 -// source: google/monitoring/dashboard/v1/layouts.proto - -package dashboardpb - -import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// A basic layout divides the available space into vertical columns of equal -// width and arranges a list of widgets using a row-first strategy. -type GridLayout struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The number of columns into which the view's width is divided. If omitted - // or set to zero, a system default will be used while rendering. - Columns int64 `protobuf:"varint,1,opt,name=columns,proto3" json:"columns,omitempty"` - // The informational elements that are arranged into the columns row-first. - Widgets []*Widget `protobuf:"bytes,2,rep,name=widgets,proto3" json:"widgets,omitempty"` -} - -func (x *GridLayout) Reset() { - *x = GridLayout{} - mi := &file_google_monitoring_dashboard_v1_layouts_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *GridLayout) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GridLayout) ProtoMessage() {} - -func (x *GridLayout) ProtoReflect() protoreflect.Message { - mi := &file_google_monitoring_dashboard_v1_layouts_proto_msgTypes[0] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GridLayout.ProtoReflect.Descriptor instead. -func (*GridLayout) Descriptor() ([]byte, []int) { - return file_google_monitoring_dashboard_v1_layouts_proto_rawDescGZIP(), []int{0} -} - -func (x *GridLayout) GetColumns() int64 { - if x != nil { - return x.Columns - } - return 0 -} - -func (x *GridLayout) GetWidgets() []*Widget { - if x != nil { - return x.Widgets - } - return nil -} - -// A mosaic layout divides the available space into a grid of blocks, and -// overlays the grid with tiles. Unlike `GridLayout`, tiles may span multiple -// grid blocks and can be placed at arbitrary locations in the grid. -type MosaicLayout struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The number of columns in the mosaic grid. The number of columns must be - // between 1 and 12, inclusive. - Columns int32 `protobuf:"varint,1,opt,name=columns,proto3" json:"columns,omitempty"` - // The tiles to display. - Tiles []*MosaicLayout_Tile `protobuf:"bytes,3,rep,name=tiles,proto3" json:"tiles,omitempty"` -} - -func (x *MosaicLayout) Reset() { - *x = MosaicLayout{} - mi := &file_google_monitoring_dashboard_v1_layouts_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *MosaicLayout) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MosaicLayout) ProtoMessage() {} - -func (x *MosaicLayout) ProtoReflect() protoreflect.Message { - mi := &file_google_monitoring_dashboard_v1_layouts_proto_msgTypes[1] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use MosaicLayout.ProtoReflect.Descriptor instead. -func (*MosaicLayout) Descriptor() ([]byte, []int) { - return file_google_monitoring_dashboard_v1_layouts_proto_rawDescGZIP(), []int{1} -} - -func (x *MosaicLayout) GetColumns() int32 { - if x != nil { - return x.Columns - } - return 0 -} - -func (x *MosaicLayout) GetTiles() []*MosaicLayout_Tile { - if x != nil { - return x.Tiles - } - return nil -} - -// A simplified layout that divides the available space into rows -// and arranges a set of widgets horizontally in each row. -type RowLayout struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The rows of content to display. - Rows []*RowLayout_Row `protobuf:"bytes,1,rep,name=rows,proto3" json:"rows,omitempty"` -} - -func (x *RowLayout) Reset() { - *x = RowLayout{} - mi := &file_google_monitoring_dashboard_v1_layouts_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *RowLayout) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RowLayout) ProtoMessage() {} - -func (x *RowLayout) ProtoReflect() protoreflect.Message { - mi := &file_google_monitoring_dashboard_v1_layouts_proto_msgTypes[2] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RowLayout.ProtoReflect.Descriptor instead. -func (*RowLayout) Descriptor() ([]byte, []int) { - return file_google_monitoring_dashboard_v1_layouts_proto_rawDescGZIP(), []int{2} -} - -func (x *RowLayout) GetRows() []*RowLayout_Row { - if x != nil { - return x.Rows - } - return nil -} - -// A simplified layout that divides the available space into vertical columns -// and arranges a set of widgets vertically in each column. -type ColumnLayout struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The columns of content to display. - Columns []*ColumnLayout_Column `protobuf:"bytes,1,rep,name=columns,proto3" json:"columns,omitempty"` -} - -func (x *ColumnLayout) Reset() { - *x = ColumnLayout{} - mi := &file_google_monitoring_dashboard_v1_layouts_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ColumnLayout) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ColumnLayout) ProtoMessage() {} - -func (x *ColumnLayout) ProtoReflect() protoreflect.Message { - mi := &file_google_monitoring_dashboard_v1_layouts_proto_msgTypes[3] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ColumnLayout.ProtoReflect.Descriptor instead. -func (*ColumnLayout) Descriptor() ([]byte, []int) { - return file_google_monitoring_dashboard_v1_layouts_proto_rawDescGZIP(), []int{3} -} - -func (x *ColumnLayout) GetColumns() []*ColumnLayout_Column { - if x != nil { - return x.Columns - } - return nil -} - -// A single tile in the mosaic. The placement and size of the tile are -// configurable. -type MosaicLayout_Tile struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The zero-indexed position of the tile in grid blocks relative to the - // left edge of the grid. Tiles must be contained within the specified - // number of columns. `x_pos` cannot be negative. - XPos int32 `protobuf:"varint,1,opt,name=x_pos,json=xPos,proto3" json:"x_pos,omitempty"` - // The zero-indexed position of the tile in grid blocks relative to the - // top edge of the grid. `y_pos` cannot be negative. - YPos int32 `protobuf:"varint,2,opt,name=y_pos,json=yPos,proto3" json:"y_pos,omitempty"` - // The width of the tile, measured in grid blocks. Tiles must have a - // minimum width of 1. - Width int32 `protobuf:"varint,3,opt,name=width,proto3" json:"width,omitempty"` - // The height of the tile, measured in grid blocks. Tiles must have a - // minimum height of 1. - Height int32 `protobuf:"varint,4,opt,name=height,proto3" json:"height,omitempty"` - // The informational widget contained in the tile. For example an `XyChart`. - Widget *Widget `protobuf:"bytes,5,opt,name=widget,proto3" json:"widget,omitempty"` -} - -func (x *MosaicLayout_Tile) Reset() { - *x = MosaicLayout_Tile{} - mi := &file_google_monitoring_dashboard_v1_layouts_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *MosaicLayout_Tile) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MosaicLayout_Tile) ProtoMessage() {} - -func (x *MosaicLayout_Tile) ProtoReflect() protoreflect.Message { - mi := &file_google_monitoring_dashboard_v1_layouts_proto_msgTypes[4] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use MosaicLayout_Tile.ProtoReflect.Descriptor instead. -func (*MosaicLayout_Tile) Descriptor() ([]byte, []int) { - return file_google_monitoring_dashboard_v1_layouts_proto_rawDescGZIP(), []int{1, 0} -} - -func (x *MosaicLayout_Tile) GetXPos() int32 { - if x != nil { - return x.XPos - } - return 0 -} - -func (x *MosaicLayout_Tile) GetYPos() int32 { - if x != nil { - return x.YPos - } - return 0 -} - -func (x *MosaicLayout_Tile) GetWidth() int32 { - if x != nil { - return x.Width - } - return 0 -} - -func (x *MosaicLayout_Tile) GetHeight() int32 { - if x != nil { - return x.Height - } - return 0 -} - -func (x *MosaicLayout_Tile) GetWidget() *Widget { - if x != nil { - return x.Widget - } - return nil -} - -// Defines the layout properties and content for a row. -type RowLayout_Row struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The relative weight of this row. The row weight is used to adjust the - // height of rows on the screen (relative to peers). Greater the weight, - // greater the height of the row on the screen. If omitted, a value - // of 1 is used while rendering. - Weight int64 `protobuf:"varint,1,opt,name=weight,proto3" json:"weight,omitempty"` - // The display widgets arranged horizontally in this row. - Widgets []*Widget `protobuf:"bytes,2,rep,name=widgets,proto3" json:"widgets,omitempty"` -} - -func (x *RowLayout_Row) Reset() { - *x = RowLayout_Row{} - mi := &file_google_monitoring_dashboard_v1_layouts_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *RowLayout_Row) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RowLayout_Row) ProtoMessage() {} - -func (x *RowLayout_Row) ProtoReflect() protoreflect.Message { - mi := &file_google_monitoring_dashboard_v1_layouts_proto_msgTypes[5] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RowLayout_Row.ProtoReflect.Descriptor instead. -func (*RowLayout_Row) Descriptor() ([]byte, []int) { - return file_google_monitoring_dashboard_v1_layouts_proto_rawDescGZIP(), []int{2, 0} -} - -func (x *RowLayout_Row) GetWeight() int64 { - if x != nil { - return x.Weight - } - return 0 -} - -func (x *RowLayout_Row) GetWidgets() []*Widget { - if x != nil { - return x.Widgets - } - return nil -} - -// Defines the layout properties and content for a column. -type ColumnLayout_Column struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The relative weight of this column. The column weight is used to adjust - // the width of columns on the screen (relative to peers). - // Greater the weight, greater the width of the column on the screen. - // If omitted, a value of 1 is used while rendering. - Weight int64 `protobuf:"varint,1,opt,name=weight,proto3" json:"weight,omitempty"` - // The display widgets arranged vertically in this column. - Widgets []*Widget `protobuf:"bytes,2,rep,name=widgets,proto3" json:"widgets,omitempty"` -} - -func (x *ColumnLayout_Column) Reset() { - *x = ColumnLayout_Column{} - mi := &file_google_monitoring_dashboard_v1_layouts_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ColumnLayout_Column) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ColumnLayout_Column) ProtoMessage() {} - -func (x *ColumnLayout_Column) ProtoReflect() protoreflect.Message { - mi := &file_google_monitoring_dashboard_v1_layouts_proto_msgTypes[6] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ColumnLayout_Column.ProtoReflect.Descriptor instead. -func (*ColumnLayout_Column) Descriptor() ([]byte, []int) { - return file_google_monitoring_dashboard_v1_layouts_proto_rawDescGZIP(), []int{3, 0} -} - -func (x *ColumnLayout_Column) GetWeight() int64 { - if x != nil { - return x.Weight - } - return 0 -} - -func (x *ColumnLayout_Column) GetWidgets() []*Widget { - if x != nil { - return x.Widgets - } - return nil -} - -var File_google_monitoring_dashboard_v1_layouts_proto protoreflect.FileDescriptor - -var file_google_monitoring_dashboard_v1_layouts_proto_rawDesc = []byte{ - 0x0a, 0x2c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, - 0x69, 0x6e, 0x67, 0x2f, 0x64, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2f, 0x76, 0x31, - 0x2f, 0x6c, 0x61, 0x79, 0x6f, 0x75, 0x74, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, - 0x67, 0x2e, 0x64, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2e, 0x76, 0x31, 0x1a, 0x2b, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, - 0x67, 0x2f, 0x64, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2f, 0x76, 0x31, 0x2f, 0x77, - 0x69, 0x64, 0x67, 0x65, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x68, 0x0a, 0x0a, 0x47, - 0x72, 0x69, 0x64, 0x4c, 0x61, 0x79, 0x6f, 0x75, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6c, - 0x75, 0x6d, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x63, 0x6f, 0x6c, 0x75, - 0x6d, 0x6e, 0x73, 0x12, 0x40, 0x0a, 0x07, 0x77, 0x69, 0x64, 0x67, 0x65, 0x74, 0x73, 0x18, 0x02, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x6d, 0x6f, - 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x64, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, - 0x72, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x57, 0x69, 0x64, 0x67, 0x65, 0x74, 0x52, 0x07, 0x77, 0x69, - 0x64, 0x67, 0x65, 0x74, 0x73, 0x22, 0x92, 0x02, 0x0a, 0x0c, 0x4d, 0x6f, 0x73, 0x61, 0x69, 0x63, - 0x4c, 0x61, 0x79, 0x6f, 0x75, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, - 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x73, - 0x12, 0x47, 0x0a, 0x05, 0x74, 0x69, 0x6c, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x31, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, - 0x69, 0x6e, 0x67, 0x2e, 0x64, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2e, 0x76, 0x31, - 0x2e, 0x4d, 0x6f, 0x73, 0x61, 0x69, 0x63, 0x4c, 0x61, 0x79, 0x6f, 0x75, 0x74, 0x2e, 0x54, 0x69, - 0x6c, 0x65, 0x52, 0x05, 0x74, 0x69, 0x6c, 0x65, 0x73, 0x1a, 0x9e, 0x01, 0x0a, 0x04, 0x54, 0x69, - 0x6c, 0x65, 0x12, 0x13, 0x0a, 0x05, 0x78, 0x5f, 0x70, 0x6f, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x05, 0x52, 0x04, 0x78, 0x50, 0x6f, 0x73, 0x12, 0x13, 0x0a, 0x05, 0x79, 0x5f, 0x70, 0x6f, 0x73, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x79, 0x50, 0x6f, 0x73, 0x12, 0x14, 0x0a, 0x05, - 0x77, 0x69, 0x64, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x77, 0x69, 0x64, - 0x74, 0x68, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x05, 0x52, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x3e, 0x0a, 0x06, 0x77, 0x69, - 0x64, 0x67, 0x65, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x64, - 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x57, 0x69, 0x64, 0x67, - 0x65, 0x74, 0x52, 0x06, 0x77, 0x69, 0x64, 0x67, 0x65, 0x74, 0x22, 0xaf, 0x01, 0x0a, 0x09, 0x52, - 0x6f, 0x77, 0x4c, 0x61, 0x79, 0x6f, 0x75, 0x74, 0x12, 0x41, 0x0a, 0x04, 0x72, 0x6f, 0x77, 0x73, - 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x64, 0x61, 0x73, 0x68, 0x62, - 0x6f, 0x61, 0x72, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x6f, 0x77, 0x4c, 0x61, 0x79, 0x6f, 0x75, - 0x74, 0x2e, 0x52, 0x6f, 0x77, 0x52, 0x04, 0x72, 0x6f, 0x77, 0x73, 0x1a, 0x5f, 0x0a, 0x03, 0x52, - 0x6f, 0x77, 0x12, 0x16, 0x0a, 0x06, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x03, 0x52, 0x06, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x40, 0x0a, 0x07, 0x77, 0x69, - 0x64, 0x67, 0x65, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x2e, - 0x64, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x57, 0x69, 0x64, - 0x67, 0x65, 0x74, 0x52, 0x07, 0x77, 0x69, 0x64, 0x67, 0x65, 0x74, 0x73, 0x22, 0xc1, 0x01, 0x0a, - 0x0c, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x4c, 0x61, 0x79, 0x6f, 0x75, 0x74, 0x12, 0x4d, 0x0a, - 0x07, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x33, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, - 0x6e, 0x67, 0x2e, 0x64, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2e, 0x76, 0x31, 0x2e, - 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x4c, 0x61, 0x79, 0x6f, 0x75, 0x74, 0x2e, 0x43, 0x6f, 0x6c, - 0x75, 0x6d, 0x6e, 0x52, 0x07, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x73, 0x1a, 0x62, 0x0a, 0x06, - 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x40, - 0x0a, 0x07, 0x77, 0x69, 0x64, 0x67, 0x65, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x26, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, - 0x69, 0x6e, 0x67, 0x2e, 0x64, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2e, 0x76, 0x31, - 0x2e, 0x57, 0x69, 0x64, 0x67, 0x65, 0x74, 0x52, 0x07, 0x77, 0x69, 0x64, 0x67, 0x65, 0x74, 0x73, - 0x42, 0xf5, 0x01, 0x0a, 0x22, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x64, 0x61, 0x73, 0x68, 0x62, - 0x6f, 0x61, 0x72, 0x64, 0x2e, 0x76, 0x31, 0x42, 0x0c, 0x4c, 0x61, 0x79, 0x6f, 0x75, 0x74, 0x73, - 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x46, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x2f, 0x6d, 0x6f, 0x6e, - 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x2f, 0x64, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, - 0x64, 0x2f, 0x61, 0x70, 0x69, 0x76, 0x31, 0x2f, 0x64, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, - 0x64, 0x70, 0x62, 0x3b, 0x64, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x70, 0x62, 0xaa, - 0x02, 0x24, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x4d, - 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x44, 0x61, 0x73, 0x68, 0x62, 0x6f, - 0x61, 0x72, 0x64, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x24, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x5c, - 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x5c, 0x4d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, - 0x5c, 0x44, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x5c, 0x56, 0x31, 0xea, 0x02, 0x28, - 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x3a, 0x3a, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x3a, 0x3a, 0x4d, - 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x3a, 0x3a, 0x44, 0x61, 0x73, 0x68, 0x62, - 0x6f, 0x61, 0x72, 0x64, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_google_monitoring_dashboard_v1_layouts_proto_rawDescOnce sync.Once - file_google_monitoring_dashboard_v1_layouts_proto_rawDescData = file_google_monitoring_dashboard_v1_layouts_proto_rawDesc -) - -func file_google_monitoring_dashboard_v1_layouts_proto_rawDescGZIP() []byte { - file_google_monitoring_dashboard_v1_layouts_proto_rawDescOnce.Do(func() { - file_google_monitoring_dashboard_v1_layouts_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_monitoring_dashboard_v1_layouts_proto_rawDescData) - }) - return file_google_monitoring_dashboard_v1_layouts_proto_rawDescData -} - -var file_google_monitoring_dashboard_v1_layouts_proto_msgTypes = make([]protoimpl.MessageInfo, 7) -var file_google_monitoring_dashboard_v1_layouts_proto_goTypes = []any{ - (*GridLayout)(nil), // 0: google.monitoring.dashboard.v1.GridLayout - (*MosaicLayout)(nil), // 1: google.monitoring.dashboard.v1.MosaicLayout - (*RowLayout)(nil), // 2: google.monitoring.dashboard.v1.RowLayout - (*ColumnLayout)(nil), // 3: google.monitoring.dashboard.v1.ColumnLayout - (*MosaicLayout_Tile)(nil), // 4: google.monitoring.dashboard.v1.MosaicLayout.Tile - (*RowLayout_Row)(nil), // 5: google.monitoring.dashboard.v1.RowLayout.Row - (*ColumnLayout_Column)(nil), // 6: google.monitoring.dashboard.v1.ColumnLayout.Column - (*Widget)(nil), // 7: google.monitoring.dashboard.v1.Widget -} -var file_google_monitoring_dashboard_v1_layouts_proto_depIdxs = []int32{ - 7, // 0: google.monitoring.dashboard.v1.GridLayout.widgets:type_name -> google.monitoring.dashboard.v1.Widget - 4, // 1: google.monitoring.dashboard.v1.MosaicLayout.tiles:type_name -> google.monitoring.dashboard.v1.MosaicLayout.Tile - 5, // 2: google.monitoring.dashboard.v1.RowLayout.rows:type_name -> google.monitoring.dashboard.v1.RowLayout.Row - 6, // 3: google.monitoring.dashboard.v1.ColumnLayout.columns:type_name -> google.monitoring.dashboard.v1.ColumnLayout.Column - 7, // 4: google.monitoring.dashboard.v1.MosaicLayout.Tile.widget:type_name -> google.monitoring.dashboard.v1.Widget - 7, // 5: google.monitoring.dashboard.v1.RowLayout.Row.widgets:type_name -> google.monitoring.dashboard.v1.Widget - 7, // 6: google.monitoring.dashboard.v1.ColumnLayout.Column.widgets:type_name -> google.monitoring.dashboard.v1.Widget - 7, // [7:7] is the sub-list for method output_type - 7, // [7:7] is the sub-list for method input_type - 7, // [7:7] is the sub-list for extension type_name - 7, // [7:7] is the sub-list for extension extendee - 0, // [0:7] is the sub-list for field type_name -} - -func init() { file_google_monitoring_dashboard_v1_layouts_proto_init() } -func file_google_monitoring_dashboard_v1_layouts_proto_init() { - if File_google_monitoring_dashboard_v1_layouts_proto != nil { - return - } - file_google_monitoring_dashboard_v1_widget_proto_init() - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_google_monitoring_dashboard_v1_layouts_proto_rawDesc, - NumEnums: 0, - NumMessages: 7, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_google_monitoring_dashboard_v1_layouts_proto_goTypes, - DependencyIndexes: file_google_monitoring_dashboard_v1_layouts_proto_depIdxs, - MessageInfos: file_google_monitoring_dashboard_v1_layouts_proto_msgTypes, - }.Build() - File_google_monitoring_dashboard_v1_layouts_proto = out.File - file_google_monitoring_dashboard_v1_layouts_proto_rawDesc = nil - file_google_monitoring_dashboard_v1_layouts_proto_goTypes = nil - file_google_monitoring_dashboard_v1_layouts_proto_depIdxs = nil -} diff --git a/vendor/cloud.google.com/go/monitoring/dashboard/apiv1/dashboardpb/logs_panel.pb.go b/vendor/cloud.google.com/go/monitoring/dashboard/apiv1/dashboardpb/logs_panel.pb.go deleted file mode 100644 index 75ff5ea856..0000000000 --- a/vendor/cloud.google.com/go/monitoring/dashboard/apiv1/dashboardpb/logs_panel.pb.go +++ /dev/null @@ -1,175 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.35.2 -// protoc v4.25.7 -// source: google/monitoring/dashboard/v1/logs_panel.proto - -package dashboardpb - -import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// A widget that displays a stream of log. -type LogsPanel struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // A filter that chooses which log entries to return. See [Advanced Logs - // Queries](https://cloud.google.com/logging/docs/view/advanced-queries). - // Only log entries that match the filter are returned. An empty filter - // matches all log entries. - Filter string `protobuf:"bytes,1,opt,name=filter,proto3" json:"filter,omitempty"` - // The names of logging resources to collect logs for. Currently only projects - // are supported. If empty, the widget will default to the host project. - ResourceNames []string `protobuf:"bytes,2,rep,name=resource_names,json=resourceNames,proto3" json:"resource_names,omitempty"` -} - -func (x *LogsPanel) Reset() { - *x = LogsPanel{} - mi := &file_google_monitoring_dashboard_v1_logs_panel_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *LogsPanel) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*LogsPanel) ProtoMessage() {} - -func (x *LogsPanel) ProtoReflect() protoreflect.Message { - mi := &file_google_monitoring_dashboard_v1_logs_panel_proto_msgTypes[0] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use LogsPanel.ProtoReflect.Descriptor instead. -func (*LogsPanel) Descriptor() ([]byte, []int) { - return file_google_monitoring_dashboard_v1_logs_panel_proto_rawDescGZIP(), []int{0} -} - -func (x *LogsPanel) GetFilter() string { - if x != nil { - return x.Filter - } - return "" -} - -func (x *LogsPanel) GetResourceNames() []string { - if x != nil { - return x.ResourceNames - } - return nil -} - -var File_google_monitoring_dashboard_v1_logs_panel_proto protoreflect.FileDescriptor - -var file_google_monitoring_dashboard_v1_logs_panel_proto_rawDesc = []byte{ - 0x0a, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, - 0x69, 0x6e, 0x67, 0x2f, 0x64, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2f, 0x76, 0x31, - 0x2f, 0x6c, 0x6f, 0x67, 0x73, 0x5f, 0x70, 0x61, 0x6e, 0x65, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x12, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, - 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x64, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2e, 0x76, - 0x31, 0x22, 0x4a, 0x0a, 0x09, 0x4c, 0x6f, 0x67, 0x73, 0x50, 0x61, 0x6e, 0x65, 0x6c, 0x12, 0x16, - 0x0a, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, - 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x25, 0x0a, 0x0e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0d, - 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x42, 0xf7, 0x01, - 0x0a, 0x22, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x6d, 0x6f, 0x6e, - 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x64, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, - 0x64, 0x2e, 0x76, 0x31, 0x42, 0x0e, 0x4c, 0x6f, 0x67, 0x73, 0x50, 0x61, 0x6e, 0x65, 0x6c, 0x50, - 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x46, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x2f, 0x6d, 0x6f, 0x6e, 0x69, - 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x2f, 0x64, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, - 0x2f, 0x61, 0x70, 0x69, 0x76, 0x31, 0x2f, 0x64, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, - 0x70, 0x62, 0x3b, 0x64, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x70, 0x62, 0xaa, 0x02, - 0x24, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x4d, 0x6f, - 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x44, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, - 0x72, 0x64, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x24, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x5c, 0x43, - 0x6c, 0x6f, 0x75, 0x64, 0x5c, 0x4d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x5c, - 0x44, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x5c, 0x56, 0x31, 0xea, 0x02, 0x28, 0x47, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x3a, 0x3a, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x3a, 0x3a, 0x4d, 0x6f, - 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x3a, 0x3a, 0x44, 0x61, 0x73, 0x68, 0x62, 0x6f, - 0x61, 0x72, 0x64, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_google_monitoring_dashboard_v1_logs_panel_proto_rawDescOnce sync.Once - file_google_monitoring_dashboard_v1_logs_panel_proto_rawDescData = file_google_monitoring_dashboard_v1_logs_panel_proto_rawDesc -) - -func file_google_monitoring_dashboard_v1_logs_panel_proto_rawDescGZIP() []byte { - file_google_monitoring_dashboard_v1_logs_panel_proto_rawDescOnce.Do(func() { - file_google_monitoring_dashboard_v1_logs_panel_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_monitoring_dashboard_v1_logs_panel_proto_rawDescData) - }) - return file_google_monitoring_dashboard_v1_logs_panel_proto_rawDescData -} - -var file_google_monitoring_dashboard_v1_logs_panel_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_google_monitoring_dashboard_v1_logs_panel_proto_goTypes = []any{ - (*LogsPanel)(nil), // 0: google.monitoring.dashboard.v1.LogsPanel -} -var file_google_monitoring_dashboard_v1_logs_panel_proto_depIdxs = []int32{ - 0, // [0:0] is the sub-list for method output_type - 0, // [0:0] is the sub-list for method input_type - 0, // [0:0] is the sub-list for extension type_name - 0, // [0:0] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name -} - -func init() { file_google_monitoring_dashboard_v1_logs_panel_proto_init() } -func file_google_monitoring_dashboard_v1_logs_panel_proto_init() { - if File_google_monitoring_dashboard_v1_logs_panel_proto != nil { - return - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_google_monitoring_dashboard_v1_logs_panel_proto_rawDesc, - NumEnums: 0, - NumMessages: 1, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_google_monitoring_dashboard_v1_logs_panel_proto_goTypes, - DependencyIndexes: file_google_monitoring_dashboard_v1_logs_panel_proto_depIdxs, - MessageInfos: file_google_monitoring_dashboard_v1_logs_panel_proto_msgTypes, - }.Build() - File_google_monitoring_dashboard_v1_logs_panel_proto = out.File - file_google_monitoring_dashboard_v1_logs_panel_proto_rawDesc = nil - file_google_monitoring_dashboard_v1_logs_panel_proto_goTypes = nil - file_google_monitoring_dashboard_v1_logs_panel_proto_depIdxs = nil -} diff --git a/vendor/cloud.google.com/go/monitoring/dashboard/apiv1/dashboardpb/metrics.pb.go b/vendor/cloud.google.com/go/monitoring/dashboard/apiv1/dashboardpb/metrics.pb.go deleted file mode 100644 index 7ec1d0f2cb..0000000000 --- a/vendor/cloud.google.com/go/monitoring/dashboard/apiv1/dashboardpb/metrics.pb.go +++ /dev/null @@ -1,1043 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.35.2 -// protoc v4.25.7 -// source: google/monitoring/dashboard/v1/metrics.proto - -package dashboardpb - -import ( - _ "google.golang.org/genproto/googleapis/api/annotations" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// Defines the possible types of spark chart supported by the `Scorecard`. -type SparkChartType int32 - -const ( - // Not allowed in well-formed requests. - SparkChartType_SPARK_CHART_TYPE_UNSPECIFIED SparkChartType = 0 - // The sparkline will be rendered as a small line chart. - SparkChartType_SPARK_LINE SparkChartType = 1 - // The sparkbar will be rendered as a small bar chart. - SparkChartType_SPARK_BAR SparkChartType = 2 -) - -// Enum value maps for SparkChartType. -var ( - SparkChartType_name = map[int32]string{ - 0: "SPARK_CHART_TYPE_UNSPECIFIED", - 1: "SPARK_LINE", - 2: "SPARK_BAR", - } - SparkChartType_value = map[string]int32{ - "SPARK_CHART_TYPE_UNSPECIFIED": 0, - "SPARK_LINE": 1, - "SPARK_BAR": 2, - } -) - -func (x SparkChartType) Enum() *SparkChartType { - p := new(SparkChartType) - *p = x - return p -} - -func (x SparkChartType) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (SparkChartType) Descriptor() protoreflect.EnumDescriptor { - return file_google_monitoring_dashboard_v1_metrics_proto_enumTypes[0].Descriptor() -} - -func (SparkChartType) Type() protoreflect.EnumType { - return &file_google_monitoring_dashboard_v1_metrics_proto_enumTypes[0] -} - -func (x SparkChartType) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use SparkChartType.Descriptor instead. -func (SparkChartType) EnumDescriptor() ([]byte, []int) { - return file_google_monitoring_dashboard_v1_metrics_proto_rawDescGZIP(), []int{0} -} - -// The color suggests an interpretation to the viewer when actual values cross -// the threshold. Comments on each color provide UX guidance on how users can -// be expected to interpret a given state color. -type Threshold_Color int32 - -const ( - // Color is unspecified. Not allowed in well-formed requests. - Threshold_COLOR_UNSPECIFIED Threshold_Color = 0 - // Crossing the threshold is "concerning" behavior. - Threshold_YELLOW Threshold_Color = 4 - // Crossing the threshold is "emergency" behavior. - Threshold_RED Threshold_Color = 6 -) - -// Enum value maps for Threshold_Color. -var ( - Threshold_Color_name = map[int32]string{ - 0: "COLOR_UNSPECIFIED", - 4: "YELLOW", - 6: "RED", - } - Threshold_Color_value = map[string]int32{ - "COLOR_UNSPECIFIED": 0, - "YELLOW": 4, - "RED": 6, - } -) - -func (x Threshold_Color) Enum() *Threshold_Color { - p := new(Threshold_Color) - *p = x - return p -} - -func (x Threshold_Color) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (Threshold_Color) Descriptor() protoreflect.EnumDescriptor { - return file_google_monitoring_dashboard_v1_metrics_proto_enumTypes[1].Descriptor() -} - -func (Threshold_Color) Type() protoreflect.EnumType { - return &file_google_monitoring_dashboard_v1_metrics_proto_enumTypes[1] -} - -func (x Threshold_Color) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use Threshold_Color.Descriptor instead. -func (Threshold_Color) EnumDescriptor() ([]byte, []int) { - return file_google_monitoring_dashboard_v1_metrics_proto_rawDescGZIP(), []int{3, 0} -} - -// Whether the threshold is considered crossed by an actual value above or -// below its threshold value. -type Threshold_Direction int32 - -const ( - // Not allowed in well-formed requests. - Threshold_DIRECTION_UNSPECIFIED Threshold_Direction = 0 - // The threshold will be considered crossed if the actual value is above - // the threshold value. - Threshold_ABOVE Threshold_Direction = 1 - // The threshold will be considered crossed if the actual value is below - // the threshold value. - Threshold_BELOW Threshold_Direction = 2 -) - -// Enum value maps for Threshold_Direction. -var ( - Threshold_Direction_name = map[int32]string{ - 0: "DIRECTION_UNSPECIFIED", - 1: "ABOVE", - 2: "BELOW", - } - Threshold_Direction_value = map[string]int32{ - "DIRECTION_UNSPECIFIED": 0, - "ABOVE": 1, - "BELOW": 2, - } -) - -func (x Threshold_Direction) Enum() *Threshold_Direction { - p := new(Threshold_Direction) - *p = x - return p -} - -func (x Threshold_Direction) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (Threshold_Direction) Descriptor() protoreflect.EnumDescriptor { - return file_google_monitoring_dashboard_v1_metrics_proto_enumTypes[2].Descriptor() -} - -func (Threshold_Direction) Type() protoreflect.EnumType { - return &file_google_monitoring_dashboard_v1_metrics_proto_enumTypes[2] -} - -func (x Threshold_Direction) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use Threshold_Direction.Descriptor instead. -func (Threshold_Direction) EnumDescriptor() ([]byte, []int) { - return file_google_monitoring_dashboard_v1_metrics_proto_rawDescGZIP(), []int{3, 1} -} - -// An axis identifier. -type Threshold_TargetAxis int32 - -const ( - // The target axis was not specified. Defaults to Y1. - Threshold_TARGET_AXIS_UNSPECIFIED Threshold_TargetAxis = 0 - // The y_axis (the right axis of chart). - Threshold_Y1 Threshold_TargetAxis = 1 - // The y2_axis (the left axis of chart). - Threshold_Y2 Threshold_TargetAxis = 2 -) - -// Enum value maps for Threshold_TargetAxis. -var ( - Threshold_TargetAxis_name = map[int32]string{ - 0: "TARGET_AXIS_UNSPECIFIED", - 1: "Y1", - 2: "Y2", - } - Threshold_TargetAxis_value = map[string]int32{ - "TARGET_AXIS_UNSPECIFIED": 0, - "Y1": 1, - "Y2": 2, - } -) - -func (x Threshold_TargetAxis) Enum() *Threshold_TargetAxis { - p := new(Threshold_TargetAxis) - *p = x - return p -} - -func (x Threshold_TargetAxis) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (Threshold_TargetAxis) Descriptor() protoreflect.EnumDescriptor { - return file_google_monitoring_dashboard_v1_metrics_proto_enumTypes[3].Descriptor() -} - -func (Threshold_TargetAxis) Type() protoreflect.EnumType { - return &file_google_monitoring_dashboard_v1_metrics_proto_enumTypes[3] -} - -func (x Threshold_TargetAxis) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use Threshold_TargetAxis.Descriptor instead. -func (Threshold_TargetAxis) EnumDescriptor() ([]byte, []int) { - return file_google_monitoring_dashboard_v1_metrics_proto_rawDescGZIP(), []int{3, 2} -} - -// TimeSeriesQuery collects the set of supported methods for querying time -// series data from the Stackdriver metrics API. -type TimeSeriesQuery struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Parameters needed to obtain data for the chart. - // - // Types that are assignable to Source: - // - // *TimeSeriesQuery_TimeSeriesFilter - // *TimeSeriesQuery_TimeSeriesFilterRatio - // *TimeSeriesQuery_TimeSeriesQueryLanguage - // *TimeSeriesQuery_PrometheusQuery - Source isTimeSeriesQuery_Source `protobuf_oneof:"source"` - // The unit of data contained in fetched time series. If non-empty, this - // unit will override any unit that accompanies fetched data. The format is - // the same as the - // [`unit`](https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.metricDescriptors) - // field in `MetricDescriptor`. - UnitOverride string `protobuf:"bytes,5,opt,name=unit_override,json=unitOverride,proto3" json:"unit_override,omitempty"` - // Optional. If set, Cloud Monitoring will treat the full query duration as - // the alignment period so that there will be only 1 output value. - // - // *Note: This could override the configured alignment period except for - // the cases where a series of data points are expected, like - // - XyChart - // - Scorecard's spark chart - OutputFullDuration bool `protobuf:"varint,7,opt,name=output_full_duration,json=outputFullDuration,proto3" json:"output_full_duration,omitempty"` -} - -func (x *TimeSeriesQuery) Reset() { - *x = TimeSeriesQuery{} - mi := &file_google_monitoring_dashboard_v1_metrics_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *TimeSeriesQuery) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*TimeSeriesQuery) ProtoMessage() {} - -func (x *TimeSeriesQuery) ProtoReflect() protoreflect.Message { - mi := &file_google_monitoring_dashboard_v1_metrics_proto_msgTypes[0] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use TimeSeriesQuery.ProtoReflect.Descriptor instead. -func (*TimeSeriesQuery) Descriptor() ([]byte, []int) { - return file_google_monitoring_dashboard_v1_metrics_proto_rawDescGZIP(), []int{0} -} - -func (m *TimeSeriesQuery) GetSource() isTimeSeriesQuery_Source { - if m != nil { - return m.Source - } - return nil -} - -func (x *TimeSeriesQuery) GetTimeSeriesFilter() *TimeSeriesFilter { - if x, ok := x.GetSource().(*TimeSeriesQuery_TimeSeriesFilter); ok { - return x.TimeSeriesFilter - } - return nil -} - -func (x *TimeSeriesQuery) GetTimeSeriesFilterRatio() *TimeSeriesFilterRatio { - if x, ok := x.GetSource().(*TimeSeriesQuery_TimeSeriesFilterRatio); ok { - return x.TimeSeriesFilterRatio - } - return nil -} - -func (x *TimeSeriesQuery) GetTimeSeriesQueryLanguage() string { - if x, ok := x.GetSource().(*TimeSeriesQuery_TimeSeriesQueryLanguage); ok { - return x.TimeSeriesQueryLanguage - } - return "" -} - -func (x *TimeSeriesQuery) GetPrometheusQuery() string { - if x, ok := x.GetSource().(*TimeSeriesQuery_PrometheusQuery); ok { - return x.PrometheusQuery - } - return "" -} - -func (x *TimeSeriesQuery) GetUnitOverride() string { - if x != nil { - return x.UnitOverride - } - return "" -} - -func (x *TimeSeriesQuery) GetOutputFullDuration() bool { - if x != nil { - return x.OutputFullDuration - } - return false -} - -type isTimeSeriesQuery_Source interface { - isTimeSeriesQuery_Source() -} - -type TimeSeriesQuery_TimeSeriesFilter struct { - // Filter parameters to fetch time series. - TimeSeriesFilter *TimeSeriesFilter `protobuf:"bytes,1,opt,name=time_series_filter,json=timeSeriesFilter,proto3,oneof"` -} - -type TimeSeriesQuery_TimeSeriesFilterRatio struct { - // Parameters to fetch a ratio between two time series filters. - TimeSeriesFilterRatio *TimeSeriesFilterRatio `protobuf:"bytes,2,opt,name=time_series_filter_ratio,json=timeSeriesFilterRatio,proto3,oneof"` -} - -type TimeSeriesQuery_TimeSeriesQueryLanguage struct { - // A query used to fetch time series with MQL. - TimeSeriesQueryLanguage string `protobuf:"bytes,3,opt,name=time_series_query_language,json=timeSeriesQueryLanguage,proto3,oneof"` -} - -type TimeSeriesQuery_PrometheusQuery struct { - // A query used to fetch time series with PromQL. - PrometheusQuery string `protobuf:"bytes,6,opt,name=prometheus_query,json=prometheusQuery,proto3,oneof"` -} - -func (*TimeSeriesQuery_TimeSeriesFilter) isTimeSeriesQuery_Source() {} - -func (*TimeSeriesQuery_TimeSeriesFilterRatio) isTimeSeriesQuery_Source() {} - -func (*TimeSeriesQuery_TimeSeriesQueryLanguage) isTimeSeriesQuery_Source() {} - -func (*TimeSeriesQuery_PrometheusQuery) isTimeSeriesQuery_Source() {} - -// A filter that defines a subset of time series data that is displayed in a -// widget. Time series data is fetched using the -// [`ListTimeSeries`](https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list) -// method. -type TimeSeriesFilter struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Required. The [monitoring - // filter](https://cloud.google.com/monitoring/api/v3/filters) that identifies - // the metric types, resources, and projects to query. - Filter string `protobuf:"bytes,1,opt,name=filter,proto3" json:"filter,omitempty"` - // By default, the raw time series data is returned. - // Use this field to combine multiple time series for different views of the - // data. - Aggregation *Aggregation `protobuf:"bytes,2,opt,name=aggregation,proto3" json:"aggregation,omitempty"` - // Apply a second aggregation after `aggregation` is applied. - SecondaryAggregation *Aggregation `protobuf:"bytes,3,opt,name=secondary_aggregation,json=secondaryAggregation,proto3" json:"secondary_aggregation,omitempty"` - // Selects an optional time series filter. - // - // Types that are assignable to OutputFilter: - // - // *TimeSeriesFilter_PickTimeSeriesFilter - // *TimeSeriesFilter_StatisticalTimeSeriesFilter - OutputFilter isTimeSeriesFilter_OutputFilter `protobuf_oneof:"output_filter"` -} - -func (x *TimeSeriesFilter) Reset() { - *x = TimeSeriesFilter{} - mi := &file_google_monitoring_dashboard_v1_metrics_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *TimeSeriesFilter) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*TimeSeriesFilter) ProtoMessage() {} - -func (x *TimeSeriesFilter) ProtoReflect() protoreflect.Message { - mi := &file_google_monitoring_dashboard_v1_metrics_proto_msgTypes[1] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use TimeSeriesFilter.ProtoReflect.Descriptor instead. -func (*TimeSeriesFilter) Descriptor() ([]byte, []int) { - return file_google_monitoring_dashboard_v1_metrics_proto_rawDescGZIP(), []int{1} -} - -func (x *TimeSeriesFilter) GetFilter() string { - if x != nil { - return x.Filter - } - return "" -} - -func (x *TimeSeriesFilter) GetAggregation() *Aggregation { - if x != nil { - return x.Aggregation - } - return nil -} - -func (x *TimeSeriesFilter) GetSecondaryAggregation() *Aggregation { - if x != nil { - return x.SecondaryAggregation - } - return nil -} - -func (m *TimeSeriesFilter) GetOutputFilter() isTimeSeriesFilter_OutputFilter { - if m != nil { - return m.OutputFilter - } - return nil -} - -func (x *TimeSeriesFilter) GetPickTimeSeriesFilter() *PickTimeSeriesFilter { - if x, ok := x.GetOutputFilter().(*TimeSeriesFilter_PickTimeSeriesFilter); ok { - return x.PickTimeSeriesFilter - } - return nil -} - -// Deprecated: Marked as deprecated in google/monitoring/dashboard/v1/metrics.proto. -func (x *TimeSeriesFilter) GetStatisticalTimeSeriesFilter() *StatisticalTimeSeriesFilter { - if x, ok := x.GetOutputFilter().(*TimeSeriesFilter_StatisticalTimeSeriesFilter); ok { - return x.StatisticalTimeSeriesFilter - } - return nil -} - -type isTimeSeriesFilter_OutputFilter interface { - isTimeSeriesFilter_OutputFilter() -} - -type TimeSeriesFilter_PickTimeSeriesFilter struct { - // Ranking based time series filter. - PickTimeSeriesFilter *PickTimeSeriesFilter `protobuf:"bytes,4,opt,name=pick_time_series_filter,json=pickTimeSeriesFilter,proto3,oneof"` -} - -type TimeSeriesFilter_StatisticalTimeSeriesFilter struct { - // Statistics based time series filter. - // Note: This field is deprecated and completely ignored by the API. - // - // Deprecated: Marked as deprecated in google/monitoring/dashboard/v1/metrics.proto. - StatisticalTimeSeriesFilter *StatisticalTimeSeriesFilter `protobuf:"bytes,5,opt,name=statistical_time_series_filter,json=statisticalTimeSeriesFilter,proto3,oneof"` -} - -func (*TimeSeriesFilter_PickTimeSeriesFilter) isTimeSeriesFilter_OutputFilter() {} - -func (*TimeSeriesFilter_StatisticalTimeSeriesFilter) isTimeSeriesFilter_OutputFilter() {} - -// A pair of time series filters that define a ratio computation. The output -// time series is the pair-wise division of each aligned element from the -// numerator and denominator time series. -type TimeSeriesFilterRatio struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The numerator of the ratio. - Numerator *TimeSeriesFilterRatio_RatioPart `protobuf:"bytes,1,opt,name=numerator,proto3" json:"numerator,omitempty"` - // The denominator of the ratio. - Denominator *TimeSeriesFilterRatio_RatioPart `protobuf:"bytes,2,opt,name=denominator,proto3" json:"denominator,omitempty"` - // Apply a second aggregation after the ratio is computed. - SecondaryAggregation *Aggregation `protobuf:"bytes,3,opt,name=secondary_aggregation,json=secondaryAggregation,proto3" json:"secondary_aggregation,omitempty"` - // Selects an optional filter that is applied to the time series after - // computing the ratio. - // - // Types that are assignable to OutputFilter: - // - // *TimeSeriesFilterRatio_PickTimeSeriesFilter - // *TimeSeriesFilterRatio_StatisticalTimeSeriesFilter - OutputFilter isTimeSeriesFilterRatio_OutputFilter `protobuf_oneof:"output_filter"` -} - -func (x *TimeSeriesFilterRatio) Reset() { - *x = TimeSeriesFilterRatio{} - mi := &file_google_monitoring_dashboard_v1_metrics_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *TimeSeriesFilterRatio) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*TimeSeriesFilterRatio) ProtoMessage() {} - -func (x *TimeSeriesFilterRatio) ProtoReflect() protoreflect.Message { - mi := &file_google_monitoring_dashboard_v1_metrics_proto_msgTypes[2] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use TimeSeriesFilterRatio.ProtoReflect.Descriptor instead. -func (*TimeSeriesFilterRatio) Descriptor() ([]byte, []int) { - return file_google_monitoring_dashboard_v1_metrics_proto_rawDescGZIP(), []int{2} -} - -func (x *TimeSeriesFilterRatio) GetNumerator() *TimeSeriesFilterRatio_RatioPart { - if x != nil { - return x.Numerator - } - return nil -} - -func (x *TimeSeriesFilterRatio) GetDenominator() *TimeSeriesFilterRatio_RatioPart { - if x != nil { - return x.Denominator - } - return nil -} - -func (x *TimeSeriesFilterRatio) GetSecondaryAggregation() *Aggregation { - if x != nil { - return x.SecondaryAggregation - } - return nil -} - -func (m *TimeSeriesFilterRatio) GetOutputFilter() isTimeSeriesFilterRatio_OutputFilter { - if m != nil { - return m.OutputFilter - } - return nil -} - -func (x *TimeSeriesFilterRatio) GetPickTimeSeriesFilter() *PickTimeSeriesFilter { - if x, ok := x.GetOutputFilter().(*TimeSeriesFilterRatio_PickTimeSeriesFilter); ok { - return x.PickTimeSeriesFilter - } - return nil -} - -// Deprecated: Marked as deprecated in google/monitoring/dashboard/v1/metrics.proto. -func (x *TimeSeriesFilterRatio) GetStatisticalTimeSeriesFilter() *StatisticalTimeSeriesFilter { - if x, ok := x.GetOutputFilter().(*TimeSeriesFilterRatio_StatisticalTimeSeriesFilter); ok { - return x.StatisticalTimeSeriesFilter - } - return nil -} - -type isTimeSeriesFilterRatio_OutputFilter interface { - isTimeSeriesFilterRatio_OutputFilter() -} - -type TimeSeriesFilterRatio_PickTimeSeriesFilter struct { - // Ranking based time series filter. - PickTimeSeriesFilter *PickTimeSeriesFilter `protobuf:"bytes,4,opt,name=pick_time_series_filter,json=pickTimeSeriesFilter,proto3,oneof"` -} - -type TimeSeriesFilterRatio_StatisticalTimeSeriesFilter struct { - // Statistics based time series filter. - // Note: This field is deprecated and completely ignored by the API. - // - // Deprecated: Marked as deprecated in google/monitoring/dashboard/v1/metrics.proto. - StatisticalTimeSeriesFilter *StatisticalTimeSeriesFilter `protobuf:"bytes,5,opt,name=statistical_time_series_filter,json=statisticalTimeSeriesFilter,proto3,oneof"` -} - -func (*TimeSeriesFilterRatio_PickTimeSeriesFilter) isTimeSeriesFilterRatio_OutputFilter() {} - -func (*TimeSeriesFilterRatio_StatisticalTimeSeriesFilter) isTimeSeriesFilterRatio_OutputFilter() {} - -// Defines a threshold for categorizing time series values. -type Threshold struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // A label for the threshold. - Label string `protobuf:"bytes,1,opt,name=label,proto3" json:"label,omitempty"` - // The value of the threshold. The value should be defined in the native scale - // of the metric. - Value float64 `protobuf:"fixed64,2,opt,name=value,proto3" json:"value,omitempty"` - // The state color for this threshold. Color is not allowed in a XyChart. - Color Threshold_Color `protobuf:"varint,3,opt,name=color,proto3,enum=google.monitoring.dashboard.v1.Threshold_Color" json:"color,omitempty"` - // The direction for the current threshold. Direction is not allowed in a - // XyChart. - Direction Threshold_Direction `protobuf:"varint,4,opt,name=direction,proto3,enum=google.monitoring.dashboard.v1.Threshold_Direction" json:"direction,omitempty"` - // The target axis to use for plotting the threshold. Target axis is not - // allowed in a Scorecard. - TargetAxis Threshold_TargetAxis `protobuf:"varint,5,opt,name=target_axis,json=targetAxis,proto3,enum=google.monitoring.dashboard.v1.Threshold_TargetAxis" json:"target_axis,omitempty"` -} - -func (x *Threshold) Reset() { - *x = Threshold{} - mi := &file_google_monitoring_dashboard_v1_metrics_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *Threshold) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Threshold) ProtoMessage() {} - -func (x *Threshold) ProtoReflect() protoreflect.Message { - mi := &file_google_monitoring_dashboard_v1_metrics_proto_msgTypes[3] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Threshold.ProtoReflect.Descriptor instead. -func (*Threshold) Descriptor() ([]byte, []int) { - return file_google_monitoring_dashboard_v1_metrics_proto_rawDescGZIP(), []int{3} -} - -func (x *Threshold) GetLabel() string { - if x != nil { - return x.Label - } - return "" -} - -func (x *Threshold) GetValue() float64 { - if x != nil { - return x.Value - } - return 0 -} - -func (x *Threshold) GetColor() Threshold_Color { - if x != nil { - return x.Color - } - return Threshold_COLOR_UNSPECIFIED -} - -func (x *Threshold) GetDirection() Threshold_Direction { - if x != nil { - return x.Direction - } - return Threshold_DIRECTION_UNSPECIFIED -} - -func (x *Threshold) GetTargetAxis() Threshold_TargetAxis { - if x != nil { - return x.TargetAxis - } - return Threshold_TARGET_AXIS_UNSPECIFIED -} - -// Describes a query to build the numerator or denominator of a -// TimeSeriesFilterRatio. -type TimeSeriesFilterRatio_RatioPart struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Required. The [monitoring - // filter](https://cloud.google.com/monitoring/api/v3/filters) that - // identifies the metric types, resources, and projects to query. - Filter string `protobuf:"bytes,1,opt,name=filter,proto3" json:"filter,omitempty"` - // By default, the raw time series data is returned. - // Use this field to combine multiple time series for different views of the - // data. - Aggregation *Aggregation `protobuf:"bytes,2,opt,name=aggregation,proto3" json:"aggregation,omitempty"` -} - -func (x *TimeSeriesFilterRatio_RatioPart) Reset() { - *x = TimeSeriesFilterRatio_RatioPart{} - mi := &file_google_monitoring_dashboard_v1_metrics_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *TimeSeriesFilterRatio_RatioPart) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*TimeSeriesFilterRatio_RatioPart) ProtoMessage() {} - -func (x *TimeSeriesFilterRatio_RatioPart) ProtoReflect() protoreflect.Message { - mi := &file_google_monitoring_dashboard_v1_metrics_proto_msgTypes[4] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use TimeSeriesFilterRatio_RatioPart.ProtoReflect.Descriptor instead. -func (*TimeSeriesFilterRatio_RatioPart) Descriptor() ([]byte, []int) { - return file_google_monitoring_dashboard_v1_metrics_proto_rawDescGZIP(), []int{2, 0} -} - -func (x *TimeSeriesFilterRatio_RatioPart) GetFilter() string { - if x != nil { - return x.Filter - } - return "" -} - -func (x *TimeSeriesFilterRatio_RatioPart) GetAggregation() *Aggregation { - if x != nil { - return x.Aggregation - } - return nil -} - -var File_google_monitoring_dashboard_v1_metrics_proto protoreflect.FileDescriptor - -var file_google_monitoring_dashboard_v1_metrics_proto_rawDesc = []byte{ - 0x0a, 0x2c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, - 0x69, 0x6e, 0x67, 0x2f, 0x64, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2f, 0x76, 0x31, - 0x2f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, - 0x67, 0x2e, 0x64, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2e, 0x76, 0x31, 0x1a, 0x1f, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, - 0x5f, 0x62, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, - 0x2b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, - 0x6e, 0x67, 0x2f, 0x64, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2f, 0x76, 0x31, 0x2f, - 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xb7, 0x03, 0x0a, - 0x0f, 0x54, 0x69, 0x6d, 0x65, 0x53, 0x65, 0x72, 0x69, 0x65, 0x73, 0x51, 0x75, 0x65, 0x72, 0x79, - 0x12, 0x60, 0x0a, 0x12, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x73, 0x65, 0x72, 0x69, 0x65, 0x73, 0x5f, - 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, - 0x2e, 0x64, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x69, - 0x6d, 0x65, 0x53, 0x65, 0x72, 0x69, 0x65, 0x73, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x48, 0x00, - 0x52, 0x10, 0x74, 0x69, 0x6d, 0x65, 0x53, 0x65, 0x72, 0x69, 0x65, 0x73, 0x46, 0x69, 0x6c, 0x74, - 0x65, 0x72, 0x12, 0x70, 0x0a, 0x18, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x73, 0x65, 0x72, 0x69, 0x65, - 0x73, 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x5f, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x35, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x6d, 0x6f, - 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x64, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, - 0x72, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x53, 0x65, 0x72, 0x69, 0x65, 0x73, - 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x52, 0x61, 0x74, 0x69, 0x6f, 0x48, 0x00, 0x52, 0x15, 0x74, - 0x69, 0x6d, 0x65, 0x53, 0x65, 0x72, 0x69, 0x65, 0x73, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x52, - 0x61, 0x74, 0x69, 0x6f, 0x12, 0x3d, 0x0a, 0x1a, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x73, 0x65, 0x72, - 0x69, 0x65, 0x73, 0x5f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x5f, 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, - 0x67, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x17, 0x74, 0x69, 0x6d, 0x65, - 0x53, 0x65, 0x72, 0x69, 0x65, 0x73, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4c, 0x61, 0x6e, 0x67, 0x75, - 0x61, 0x67, 0x65, 0x12, 0x2b, 0x0a, 0x10, 0x70, 0x72, 0x6f, 0x6d, 0x65, 0x74, 0x68, 0x65, 0x75, - 0x73, 0x5f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, - 0x0f, 0x70, 0x72, 0x6f, 0x6d, 0x65, 0x74, 0x68, 0x65, 0x75, 0x73, 0x51, 0x75, 0x65, 0x72, 0x79, - 0x12, 0x23, 0x0a, 0x0d, 0x75, 0x6e, 0x69, 0x74, 0x5f, 0x6f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, - 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x75, 0x6e, 0x69, 0x74, 0x4f, 0x76, 0x65, - 0x72, 0x72, 0x69, 0x64, 0x65, 0x12, 0x35, 0x0a, 0x14, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x5f, - 0x66, 0x75, 0x6c, 0x6c, 0x5f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x07, 0x20, - 0x01, 0x28, 0x08, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x12, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, - 0x46, 0x75, 0x6c, 0x6c, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x08, 0x0a, 0x06, - 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x22, 0xe9, 0x03, 0x0a, 0x10, 0x54, 0x69, 0x6d, 0x65, 0x53, - 0x65, 0x72, 0x69, 0x65, 0x73, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x1b, 0x0a, 0x06, 0x66, - 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, - 0x52, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x4d, 0x0a, 0x0b, 0x61, 0x67, 0x67, 0x72, - 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, - 0x67, 0x2e, 0x64, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x41, - 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0b, 0x61, 0x67, 0x67, 0x72, - 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x60, 0x0a, 0x15, 0x73, 0x65, 0x63, 0x6f, 0x6e, - 0x64, 0x61, 0x72, 0x79, 0x5f, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x64, 0x61, 0x73, 0x68, 0x62, - 0x6f, 0x61, 0x72, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x52, 0x14, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x61, 0x72, 0x79, 0x41, 0x67, - 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x6d, 0x0a, 0x17, 0x70, 0x69, 0x63, - 0x6b, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x73, 0x65, 0x72, 0x69, 0x65, 0x73, 0x5f, 0x66, 0x69, - 0x6c, 0x74, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x64, - 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x69, 0x63, 0x6b, - 0x54, 0x69, 0x6d, 0x65, 0x53, 0x65, 0x72, 0x69, 0x65, 0x73, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, - 0x48, 0x00, 0x52, 0x14, 0x70, 0x69, 0x63, 0x6b, 0x54, 0x69, 0x6d, 0x65, 0x53, 0x65, 0x72, 0x69, - 0x65, 0x73, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x86, 0x01, 0x0a, 0x1e, 0x73, 0x74, 0x61, - 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x61, 0x6c, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x73, 0x65, - 0x72, 0x69, 0x65, 0x73, 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x3b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x6d, 0x6f, 0x6e, 0x69, 0x74, - 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x64, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2e, - 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x61, 0x6c, 0x54, 0x69, - 0x6d, 0x65, 0x53, 0x65, 0x72, 0x69, 0x65, 0x73, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x42, 0x02, - 0x18, 0x01, 0x48, 0x00, 0x52, 0x1b, 0x73, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x61, - 0x6c, 0x54, 0x69, 0x6d, 0x65, 0x53, 0x65, 0x72, 0x69, 0x65, 0x73, 0x46, 0x69, 0x6c, 0x74, 0x65, - 0x72, 0x42, 0x0f, 0x0a, 0x0d, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x5f, 0x66, 0x69, 0x6c, 0x74, - 0x65, 0x72, 0x22, 0xbd, 0x05, 0x0a, 0x15, 0x54, 0x69, 0x6d, 0x65, 0x53, 0x65, 0x72, 0x69, 0x65, - 0x73, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x52, 0x61, 0x74, 0x69, 0x6f, 0x12, 0x5d, 0x0a, 0x09, - 0x6e, 0x75, 0x6d, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x3f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, - 0x69, 0x6e, 0x67, 0x2e, 0x64, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2e, 0x76, 0x31, - 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x53, 0x65, 0x72, 0x69, 0x65, 0x73, 0x46, 0x69, 0x6c, 0x74, 0x65, - 0x72, 0x52, 0x61, 0x74, 0x69, 0x6f, 0x2e, 0x52, 0x61, 0x74, 0x69, 0x6f, 0x50, 0x61, 0x72, 0x74, - 0x52, 0x09, 0x6e, 0x75, 0x6d, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x61, 0x0a, 0x0b, 0x64, - 0x65, 0x6e, 0x6f, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x3f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, - 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x64, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2e, 0x76, - 0x31, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x53, 0x65, 0x72, 0x69, 0x65, 0x73, 0x46, 0x69, 0x6c, 0x74, - 0x65, 0x72, 0x52, 0x61, 0x74, 0x69, 0x6f, 0x2e, 0x52, 0x61, 0x74, 0x69, 0x6f, 0x50, 0x61, 0x72, - 0x74, 0x52, 0x0b, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x60, - 0x0a, 0x15, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x61, 0x72, 0x79, 0x5f, 0x61, 0x67, 0x67, 0x72, - 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, - 0x67, 0x2e, 0x64, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x41, - 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x14, 0x73, 0x65, 0x63, 0x6f, - 0x6e, 0x64, 0x61, 0x72, 0x79, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x12, 0x6d, 0x0a, 0x17, 0x70, 0x69, 0x63, 0x6b, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x73, 0x65, - 0x72, 0x69, 0x65, 0x73, 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x34, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x6d, 0x6f, 0x6e, 0x69, 0x74, - 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x64, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2e, - 0x76, 0x31, 0x2e, 0x50, 0x69, 0x63, 0x6b, 0x54, 0x69, 0x6d, 0x65, 0x53, 0x65, 0x72, 0x69, 0x65, - 0x73, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x48, 0x00, 0x52, 0x14, 0x70, 0x69, 0x63, 0x6b, 0x54, - 0x69, 0x6d, 0x65, 0x53, 0x65, 0x72, 0x69, 0x65, 0x73, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, - 0x86, 0x01, 0x0a, 0x1e, 0x73, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x61, 0x6c, 0x5f, - 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x73, 0x65, 0x72, 0x69, 0x65, 0x73, 0x5f, 0x66, 0x69, 0x6c, 0x74, - 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x64, 0x61, 0x73, - 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, - 0x74, 0x69, 0x63, 0x61, 0x6c, 0x54, 0x69, 0x6d, 0x65, 0x53, 0x65, 0x72, 0x69, 0x65, 0x73, 0x46, - 0x69, 0x6c, 0x74, 0x65, 0x72, 0x42, 0x02, 0x18, 0x01, 0x48, 0x00, 0x52, 0x1b, 0x73, 0x74, 0x61, - 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x61, 0x6c, 0x54, 0x69, 0x6d, 0x65, 0x53, 0x65, 0x72, 0x69, - 0x65, 0x73, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x1a, 0x77, 0x0a, 0x09, 0x52, 0x61, 0x74, 0x69, - 0x6f, 0x50, 0x61, 0x72, 0x74, 0x12, 0x1b, 0x0a, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x06, 0x66, 0x69, 0x6c, 0x74, - 0x65, 0x72, 0x12, 0x4d, 0x0a, 0x0b, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x64, 0x61, 0x73, 0x68, - 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0b, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x42, 0x0f, 0x0a, 0x0d, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x5f, 0x66, 0x69, 0x6c, 0x74, - 0x65, 0x72, 0x22, 0xd6, 0x03, 0x0a, 0x09, 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, - 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x05, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x45, 0x0a, 0x05, - 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2f, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x2e, - 0x64, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x68, 0x72, - 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x2e, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x52, 0x05, 0x63, 0x6f, - 0x6c, 0x6f, 0x72, 0x12, 0x51, 0x0a, 0x09, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x33, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x64, 0x61, 0x73, 0x68, 0x62, - 0x6f, 0x61, 0x72, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, - 0x64, 0x2e, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x09, 0x64, 0x69, 0x72, - 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x55, 0x0a, 0x0b, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, - 0x5f, 0x61, 0x78, 0x69, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x34, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x2e, - 0x64, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x68, 0x72, - 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x2e, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x41, 0x78, 0x69, - 0x73, 0x52, 0x0a, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x41, 0x78, 0x69, 0x73, 0x22, 0x33, 0x0a, - 0x05, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x12, 0x15, 0x0a, 0x11, 0x43, 0x4f, 0x4c, 0x4f, 0x52, 0x5f, - 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0a, 0x0a, - 0x06, 0x59, 0x45, 0x4c, 0x4c, 0x4f, 0x57, 0x10, 0x04, 0x12, 0x07, 0x0a, 0x03, 0x52, 0x45, 0x44, - 0x10, 0x06, 0x22, 0x3c, 0x0a, 0x09, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, - 0x19, 0x0a, 0x15, 0x44, 0x49, 0x52, 0x45, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x55, 0x4e, 0x53, - 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x41, 0x42, - 0x4f, 0x56, 0x45, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x42, 0x45, 0x4c, 0x4f, 0x57, 0x10, 0x02, - 0x22, 0x39, 0x0a, 0x0a, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x41, 0x78, 0x69, 0x73, 0x12, 0x1b, - 0x0a, 0x17, 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, 0x5f, 0x41, 0x58, 0x49, 0x53, 0x5f, 0x55, 0x4e, - 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x06, 0x0a, 0x02, 0x59, - 0x31, 0x10, 0x01, 0x12, 0x06, 0x0a, 0x02, 0x59, 0x32, 0x10, 0x02, 0x2a, 0x51, 0x0a, 0x0e, 0x53, - 0x70, 0x61, 0x72, 0x6b, 0x43, 0x68, 0x61, 0x72, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x20, 0x0a, - 0x1c, 0x53, 0x50, 0x41, 0x52, 0x4b, 0x5f, 0x43, 0x48, 0x41, 0x52, 0x54, 0x5f, 0x54, 0x59, 0x50, - 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, - 0x0e, 0x0a, 0x0a, 0x53, 0x50, 0x41, 0x52, 0x4b, 0x5f, 0x4c, 0x49, 0x4e, 0x45, 0x10, 0x01, 0x12, - 0x0d, 0x0a, 0x09, 0x53, 0x50, 0x41, 0x52, 0x4b, 0x5f, 0x42, 0x41, 0x52, 0x10, 0x02, 0x42, 0xf5, - 0x01, 0x0a, 0x22, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x6d, 0x6f, - 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x64, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, - 0x72, 0x64, 0x2e, 0x76, 0x31, 0x42, 0x0c, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x50, 0x72, - 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x46, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x2f, 0x6d, 0x6f, 0x6e, 0x69, 0x74, - 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x2f, 0x64, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2f, - 0x61, 0x70, 0x69, 0x76, 0x31, 0x2f, 0x64, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x70, - 0x62, 0x3b, 0x64, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x70, 0x62, 0xaa, 0x02, 0x24, - 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x4d, 0x6f, 0x6e, - 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x44, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, - 0x64, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x24, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x5c, 0x43, 0x6c, - 0x6f, 0x75, 0x64, 0x5c, 0x4d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x5c, 0x44, - 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x5c, 0x56, 0x31, 0xea, 0x02, 0x28, 0x47, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x3a, 0x3a, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x3a, 0x3a, 0x4d, 0x6f, 0x6e, - 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x3a, 0x3a, 0x44, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, - 0x72, 0x64, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_google_monitoring_dashboard_v1_metrics_proto_rawDescOnce sync.Once - file_google_monitoring_dashboard_v1_metrics_proto_rawDescData = file_google_monitoring_dashboard_v1_metrics_proto_rawDesc -) - -func file_google_monitoring_dashboard_v1_metrics_proto_rawDescGZIP() []byte { - file_google_monitoring_dashboard_v1_metrics_proto_rawDescOnce.Do(func() { - file_google_monitoring_dashboard_v1_metrics_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_monitoring_dashboard_v1_metrics_proto_rawDescData) - }) - return file_google_monitoring_dashboard_v1_metrics_proto_rawDescData -} - -var file_google_monitoring_dashboard_v1_metrics_proto_enumTypes = make([]protoimpl.EnumInfo, 4) -var file_google_monitoring_dashboard_v1_metrics_proto_msgTypes = make([]protoimpl.MessageInfo, 5) -var file_google_monitoring_dashboard_v1_metrics_proto_goTypes = []any{ - (SparkChartType)(0), // 0: google.monitoring.dashboard.v1.SparkChartType - (Threshold_Color)(0), // 1: google.monitoring.dashboard.v1.Threshold.Color - (Threshold_Direction)(0), // 2: google.monitoring.dashboard.v1.Threshold.Direction - (Threshold_TargetAxis)(0), // 3: google.monitoring.dashboard.v1.Threshold.TargetAxis - (*TimeSeriesQuery)(nil), // 4: google.monitoring.dashboard.v1.TimeSeriesQuery - (*TimeSeriesFilter)(nil), // 5: google.monitoring.dashboard.v1.TimeSeriesFilter - (*TimeSeriesFilterRatio)(nil), // 6: google.monitoring.dashboard.v1.TimeSeriesFilterRatio - (*Threshold)(nil), // 7: google.monitoring.dashboard.v1.Threshold - (*TimeSeriesFilterRatio_RatioPart)(nil), // 8: google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart - (*Aggregation)(nil), // 9: google.monitoring.dashboard.v1.Aggregation - (*PickTimeSeriesFilter)(nil), // 10: google.monitoring.dashboard.v1.PickTimeSeriesFilter - (*StatisticalTimeSeriesFilter)(nil), // 11: google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter -} -var file_google_monitoring_dashboard_v1_metrics_proto_depIdxs = []int32{ - 5, // 0: google.monitoring.dashboard.v1.TimeSeriesQuery.time_series_filter:type_name -> google.monitoring.dashboard.v1.TimeSeriesFilter - 6, // 1: google.monitoring.dashboard.v1.TimeSeriesQuery.time_series_filter_ratio:type_name -> google.monitoring.dashboard.v1.TimeSeriesFilterRatio - 9, // 2: google.monitoring.dashboard.v1.TimeSeriesFilter.aggregation:type_name -> google.monitoring.dashboard.v1.Aggregation - 9, // 3: google.monitoring.dashboard.v1.TimeSeriesFilter.secondary_aggregation:type_name -> google.monitoring.dashboard.v1.Aggregation - 10, // 4: google.monitoring.dashboard.v1.TimeSeriesFilter.pick_time_series_filter:type_name -> google.monitoring.dashboard.v1.PickTimeSeriesFilter - 11, // 5: google.monitoring.dashboard.v1.TimeSeriesFilter.statistical_time_series_filter:type_name -> google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter - 8, // 6: google.monitoring.dashboard.v1.TimeSeriesFilterRatio.numerator:type_name -> google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart - 8, // 7: google.monitoring.dashboard.v1.TimeSeriesFilterRatio.denominator:type_name -> google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart - 9, // 8: google.monitoring.dashboard.v1.TimeSeriesFilterRatio.secondary_aggregation:type_name -> google.monitoring.dashboard.v1.Aggregation - 10, // 9: google.monitoring.dashboard.v1.TimeSeriesFilterRatio.pick_time_series_filter:type_name -> google.monitoring.dashboard.v1.PickTimeSeriesFilter - 11, // 10: google.monitoring.dashboard.v1.TimeSeriesFilterRatio.statistical_time_series_filter:type_name -> google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter - 1, // 11: google.monitoring.dashboard.v1.Threshold.color:type_name -> google.monitoring.dashboard.v1.Threshold.Color - 2, // 12: google.monitoring.dashboard.v1.Threshold.direction:type_name -> google.monitoring.dashboard.v1.Threshold.Direction - 3, // 13: google.monitoring.dashboard.v1.Threshold.target_axis:type_name -> google.monitoring.dashboard.v1.Threshold.TargetAxis - 9, // 14: google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart.aggregation:type_name -> google.monitoring.dashboard.v1.Aggregation - 15, // [15:15] is the sub-list for method output_type - 15, // [15:15] is the sub-list for method input_type - 15, // [15:15] is the sub-list for extension type_name - 15, // [15:15] is the sub-list for extension extendee - 0, // [0:15] is the sub-list for field type_name -} - -func init() { file_google_monitoring_dashboard_v1_metrics_proto_init() } -func file_google_monitoring_dashboard_v1_metrics_proto_init() { - if File_google_monitoring_dashboard_v1_metrics_proto != nil { - return - } - file_google_monitoring_dashboard_v1_common_proto_init() - file_google_monitoring_dashboard_v1_metrics_proto_msgTypes[0].OneofWrappers = []any{ - (*TimeSeriesQuery_TimeSeriesFilter)(nil), - (*TimeSeriesQuery_TimeSeriesFilterRatio)(nil), - (*TimeSeriesQuery_TimeSeriesQueryLanguage)(nil), - (*TimeSeriesQuery_PrometheusQuery)(nil), - } - file_google_monitoring_dashboard_v1_metrics_proto_msgTypes[1].OneofWrappers = []any{ - (*TimeSeriesFilter_PickTimeSeriesFilter)(nil), - (*TimeSeriesFilter_StatisticalTimeSeriesFilter)(nil), - } - file_google_monitoring_dashboard_v1_metrics_proto_msgTypes[2].OneofWrappers = []any{ - (*TimeSeriesFilterRatio_PickTimeSeriesFilter)(nil), - (*TimeSeriesFilterRatio_StatisticalTimeSeriesFilter)(nil), - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_google_monitoring_dashboard_v1_metrics_proto_rawDesc, - NumEnums: 4, - NumMessages: 5, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_google_monitoring_dashboard_v1_metrics_proto_goTypes, - DependencyIndexes: file_google_monitoring_dashboard_v1_metrics_proto_depIdxs, - EnumInfos: file_google_monitoring_dashboard_v1_metrics_proto_enumTypes, - MessageInfos: file_google_monitoring_dashboard_v1_metrics_proto_msgTypes, - }.Build() - File_google_monitoring_dashboard_v1_metrics_proto = out.File - file_google_monitoring_dashboard_v1_metrics_proto_rawDesc = nil - file_google_monitoring_dashboard_v1_metrics_proto_goTypes = nil - file_google_monitoring_dashboard_v1_metrics_proto_depIdxs = nil -} diff --git a/vendor/cloud.google.com/go/monitoring/dashboard/apiv1/dashboardpb/piechart.pb.go b/vendor/cloud.google.com/go/monitoring/dashboard/apiv1/dashboardpb/piechart.pb.go deleted file mode 100644 index 2ac628b754..0000000000 --- a/vendor/cloud.google.com/go/monitoring/dashboard/apiv1/dashboardpb/piechart.pb.go +++ /dev/null @@ -1,358 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.35.2 -// protoc v4.25.7 -// source: google/monitoring/dashboard/v1/piechart.proto - -package dashboardpb - -import ( - _ "google.golang.org/genproto/googleapis/api/annotations" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - durationpb "google.golang.org/protobuf/types/known/durationpb" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// Types for the pie chart. -type PieChart_PieChartType int32 - -const ( - // The zero value. No type specified. Do not use. - PieChart_PIE_CHART_TYPE_UNSPECIFIED PieChart_PieChartType = 0 - // A Pie type PieChart. - PieChart_PIE PieChart_PieChartType = 1 - // Similar to PIE, but the DONUT type PieChart has a hole in the middle. - PieChart_DONUT PieChart_PieChartType = 2 -) - -// Enum value maps for PieChart_PieChartType. -var ( - PieChart_PieChartType_name = map[int32]string{ - 0: "PIE_CHART_TYPE_UNSPECIFIED", - 1: "PIE", - 2: "DONUT", - } - PieChart_PieChartType_value = map[string]int32{ - "PIE_CHART_TYPE_UNSPECIFIED": 0, - "PIE": 1, - "DONUT": 2, - } -) - -func (x PieChart_PieChartType) Enum() *PieChart_PieChartType { - p := new(PieChart_PieChartType) - *p = x - return p -} - -func (x PieChart_PieChartType) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (PieChart_PieChartType) Descriptor() protoreflect.EnumDescriptor { - return file_google_monitoring_dashboard_v1_piechart_proto_enumTypes[0].Descriptor() -} - -func (PieChart_PieChartType) Type() protoreflect.EnumType { - return &file_google_monitoring_dashboard_v1_piechart_proto_enumTypes[0] -} - -func (x PieChart_PieChartType) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use PieChart_PieChartType.Descriptor instead. -func (PieChart_PieChartType) EnumDescriptor() ([]byte, []int) { - return file_google_monitoring_dashboard_v1_piechart_proto_rawDescGZIP(), []int{0, 0} -} - -// A widget that displays timeseries data as a pie or a donut. -type PieChart struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Required. The queries for the chart's data. - DataSets []*PieChart_PieChartDataSet `protobuf:"bytes,1,rep,name=data_sets,json=dataSets,proto3" json:"data_sets,omitempty"` - // Required. Indicates the visualization type for the PieChart. - ChartType PieChart_PieChartType `protobuf:"varint,2,opt,name=chart_type,json=chartType,proto3,enum=google.monitoring.dashboard.v1.PieChart_PieChartType" json:"chart_type,omitempty"` - // Optional. Indicates whether or not the pie chart should show slices' labels - ShowLabels bool `protobuf:"varint,4,opt,name=show_labels,json=showLabels,proto3" json:"show_labels,omitempty"` -} - -func (x *PieChart) Reset() { - *x = PieChart{} - mi := &file_google_monitoring_dashboard_v1_piechart_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *PieChart) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*PieChart) ProtoMessage() {} - -func (x *PieChart) ProtoReflect() protoreflect.Message { - mi := &file_google_monitoring_dashboard_v1_piechart_proto_msgTypes[0] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use PieChart.ProtoReflect.Descriptor instead. -func (*PieChart) Descriptor() ([]byte, []int) { - return file_google_monitoring_dashboard_v1_piechart_proto_rawDescGZIP(), []int{0} -} - -func (x *PieChart) GetDataSets() []*PieChart_PieChartDataSet { - if x != nil { - return x.DataSets - } - return nil -} - -func (x *PieChart) GetChartType() PieChart_PieChartType { - if x != nil { - return x.ChartType - } - return PieChart_PIE_CHART_TYPE_UNSPECIFIED -} - -func (x *PieChart) GetShowLabels() bool { - if x != nil { - return x.ShowLabels - } - return false -} - -// Groups a time series query definition. -type PieChart_PieChartDataSet struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Required. The query for the PieChart. See, - // `google.monitoring.dashboard.v1.TimeSeriesQuery`. - TimeSeriesQuery *TimeSeriesQuery `protobuf:"bytes,1,opt,name=time_series_query,json=timeSeriesQuery,proto3" json:"time_series_query,omitempty"` - // Optional. A template for the name of the slice. This name will be - // displayed in the legend and the tooltip of the pie chart. It replaces the - // auto-generated names for the slices. For example, if the template is set - // to - // `${resource.labels.zone}`, the zone's value will be used for the name - // instead of the default name. - SliceNameTemplate string `protobuf:"bytes,2,opt,name=slice_name_template,json=sliceNameTemplate,proto3" json:"slice_name_template,omitempty"` - // Optional. The lower bound on data point frequency for this data set, - // implemented by specifying the minimum alignment period to use in a time - // series query. For example, if the data is published once every 10 - // minutes, the `min_alignment_period` should be at least 10 minutes. It - // would not make sense to fetch and align data at one minute intervals. - MinAlignmentPeriod *durationpb.Duration `protobuf:"bytes,3,opt,name=min_alignment_period,json=minAlignmentPeriod,proto3" json:"min_alignment_period,omitempty"` -} - -func (x *PieChart_PieChartDataSet) Reset() { - *x = PieChart_PieChartDataSet{} - mi := &file_google_monitoring_dashboard_v1_piechart_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *PieChart_PieChartDataSet) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*PieChart_PieChartDataSet) ProtoMessage() {} - -func (x *PieChart_PieChartDataSet) ProtoReflect() protoreflect.Message { - mi := &file_google_monitoring_dashboard_v1_piechart_proto_msgTypes[1] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use PieChart_PieChartDataSet.ProtoReflect.Descriptor instead. -func (*PieChart_PieChartDataSet) Descriptor() ([]byte, []int) { - return file_google_monitoring_dashboard_v1_piechart_proto_rawDescGZIP(), []int{0, 0} -} - -func (x *PieChart_PieChartDataSet) GetTimeSeriesQuery() *TimeSeriesQuery { - if x != nil { - return x.TimeSeriesQuery - } - return nil -} - -func (x *PieChart_PieChartDataSet) GetSliceNameTemplate() string { - if x != nil { - return x.SliceNameTemplate - } - return "" -} - -func (x *PieChart_PieChartDataSet) GetMinAlignmentPeriod() *durationpb.Duration { - if x != nil { - return x.MinAlignmentPeriod - } - return nil -} - -var File_google_monitoring_dashboard_v1_piechart_proto protoreflect.FileDescriptor - -var file_google_monitoring_dashboard_v1_piechart_proto_rawDesc = []byte{ - 0x0a, 0x2d, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, - 0x69, 0x6e, 0x67, 0x2f, 0x64, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2f, 0x76, 0x31, - 0x2f, 0x70, 0x69, 0x65, 0x63, 0x68, 0x61, 0x72, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, - 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, - 0x6e, 0x67, 0x2e, 0x64, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2e, 0x76, 0x31, 0x1a, - 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x66, 0x69, 0x65, 0x6c, - 0x64, 0x5f, 0x62, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x1a, 0x2c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, - 0x69, 0x6e, 0x67, 0x2f, 0x64, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2f, 0x76, 0x31, - 0x2f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, - 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xa8, - 0x04, 0x0a, 0x08, 0x50, 0x69, 0x65, 0x43, 0x68, 0x61, 0x72, 0x74, 0x12, 0x5a, 0x0a, 0x09, 0x64, - 0x61, 0x74, 0x61, 0x5f, 0x73, 0x65, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x38, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, - 0x6e, 0x67, 0x2e, 0x64, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2e, 0x76, 0x31, 0x2e, - 0x50, 0x69, 0x65, 0x43, 0x68, 0x61, 0x72, 0x74, 0x2e, 0x50, 0x69, 0x65, 0x43, 0x68, 0x61, 0x72, - 0x74, 0x44, 0x61, 0x74, 0x61, 0x53, 0x65, 0x74, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x08, 0x64, - 0x61, 0x74, 0x61, 0x53, 0x65, 0x74, 0x73, 0x12, 0x59, 0x0a, 0x0a, 0x63, 0x68, 0x61, 0x72, 0x74, - 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x35, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x2e, - 0x64, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x69, 0x65, - 0x43, 0x68, 0x61, 0x72, 0x74, 0x2e, 0x50, 0x69, 0x65, 0x43, 0x68, 0x61, 0x72, 0x74, 0x54, 0x79, - 0x70, 0x65, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x09, 0x63, 0x68, 0x61, 0x72, 0x74, 0x54, 0x79, - 0x70, 0x65, 0x12, 0x24, 0x0a, 0x0b, 0x73, 0x68, 0x6f, 0x77, 0x5f, 0x6c, 0x61, 0x62, 0x65, 0x6c, - 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0a, 0x73, 0x68, - 0x6f, 0x77, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x1a, 0xfa, 0x01, 0x0a, 0x0f, 0x50, 0x69, 0x65, - 0x43, 0x68, 0x61, 0x72, 0x74, 0x44, 0x61, 0x74, 0x61, 0x53, 0x65, 0x74, 0x12, 0x60, 0x0a, 0x11, - 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x73, 0x65, 0x72, 0x69, 0x65, 0x73, 0x5f, 0x71, 0x75, 0x65, 0x72, - 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x64, 0x61, 0x73, 0x68, - 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x53, 0x65, 0x72, - 0x69, 0x65, 0x73, 0x51, 0x75, 0x65, 0x72, 0x79, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x0f, 0x74, - 0x69, 0x6d, 0x65, 0x53, 0x65, 0x72, 0x69, 0x65, 0x73, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x33, - 0x0a, 0x13, 0x73, 0x6c, 0x69, 0x63, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x5f, 0x74, 0x65, 0x6d, - 0x70, 0x6c, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, - 0x52, 0x11, 0x73, 0x6c, 0x69, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, - 0x61, 0x74, 0x65, 0x12, 0x50, 0x0a, 0x14, 0x6d, 0x69, 0x6e, 0x5f, 0x61, 0x6c, 0x69, 0x67, 0x6e, - 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x03, 0xe0, 0x41, - 0x01, 0x52, 0x12, 0x6d, 0x69, 0x6e, 0x41, 0x6c, 0x69, 0x67, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x50, - 0x65, 0x72, 0x69, 0x6f, 0x64, 0x22, 0x42, 0x0a, 0x0c, 0x50, 0x69, 0x65, 0x43, 0x68, 0x61, 0x72, - 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1e, 0x0a, 0x1a, 0x50, 0x49, 0x45, 0x5f, 0x43, 0x48, 0x41, - 0x52, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, - 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x50, 0x49, 0x45, 0x10, 0x01, 0x12, 0x09, - 0x0a, 0x05, 0x44, 0x4f, 0x4e, 0x55, 0x54, 0x10, 0x02, 0x42, 0xf6, 0x01, 0x0a, 0x22, 0x63, 0x6f, - 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, - 0x69, 0x6e, 0x67, 0x2e, 0x64, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2e, 0x76, 0x31, - 0x42, 0x0d, 0x50, 0x69, 0x65, 0x43, 0x68, 0x61, 0x72, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, - 0x01, 0x5a, 0x46, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x2f, 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, - 0x67, 0x2f, 0x64, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2f, 0x61, 0x70, 0x69, 0x76, - 0x31, 0x2f, 0x64, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x70, 0x62, 0x3b, 0x64, 0x61, - 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x70, 0x62, 0xaa, 0x02, 0x24, 0x47, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x4d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, - 0x69, 0x6e, 0x67, 0x2e, 0x44, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2e, 0x56, 0x31, - 0xca, 0x02, 0x24, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x5c, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x5c, - 0x4d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x5c, 0x44, 0x61, 0x73, 0x68, 0x62, - 0x6f, 0x61, 0x72, 0x64, 0x5c, 0x56, 0x31, 0xea, 0x02, 0x28, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x3a, 0x3a, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x3a, 0x3a, 0x4d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, - 0x69, 0x6e, 0x67, 0x3a, 0x3a, 0x44, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x3a, 0x3a, - 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_google_monitoring_dashboard_v1_piechart_proto_rawDescOnce sync.Once - file_google_monitoring_dashboard_v1_piechart_proto_rawDescData = file_google_monitoring_dashboard_v1_piechart_proto_rawDesc -) - -func file_google_monitoring_dashboard_v1_piechart_proto_rawDescGZIP() []byte { - file_google_monitoring_dashboard_v1_piechart_proto_rawDescOnce.Do(func() { - file_google_monitoring_dashboard_v1_piechart_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_monitoring_dashboard_v1_piechart_proto_rawDescData) - }) - return file_google_monitoring_dashboard_v1_piechart_proto_rawDescData -} - -var file_google_monitoring_dashboard_v1_piechart_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_google_monitoring_dashboard_v1_piechart_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_google_monitoring_dashboard_v1_piechart_proto_goTypes = []any{ - (PieChart_PieChartType)(0), // 0: google.monitoring.dashboard.v1.PieChart.PieChartType - (*PieChart)(nil), // 1: google.monitoring.dashboard.v1.PieChart - (*PieChart_PieChartDataSet)(nil), // 2: google.monitoring.dashboard.v1.PieChart.PieChartDataSet - (*TimeSeriesQuery)(nil), // 3: google.monitoring.dashboard.v1.TimeSeriesQuery - (*durationpb.Duration)(nil), // 4: google.protobuf.Duration -} -var file_google_monitoring_dashboard_v1_piechart_proto_depIdxs = []int32{ - 2, // 0: google.monitoring.dashboard.v1.PieChart.data_sets:type_name -> google.monitoring.dashboard.v1.PieChart.PieChartDataSet - 0, // 1: google.monitoring.dashboard.v1.PieChart.chart_type:type_name -> google.monitoring.dashboard.v1.PieChart.PieChartType - 3, // 2: google.monitoring.dashboard.v1.PieChart.PieChartDataSet.time_series_query:type_name -> google.monitoring.dashboard.v1.TimeSeriesQuery - 4, // 3: google.monitoring.dashboard.v1.PieChart.PieChartDataSet.min_alignment_period:type_name -> google.protobuf.Duration - 4, // [4:4] is the sub-list for method output_type - 4, // [4:4] is the sub-list for method input_type - 4, // [4:4] is the sub-list for extension type_name - 4, // [4:4] is the sub-list for extension extendee - 0, // [0:4] is the sub-list for field type_name -} - -func init() { file_google_monitoring_dashboard_v1_piechart_proto_init() } -func file_google_monitoring_dashboard_v1_piechart_proto_init() { - if File_google_monitoring_dashboard_v1_piechart_proto != nil { - return - } - file_google_monitoring_dashboard_v1_metrics_proto_init() - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_google_monitoring_dashboard_v1_piechart_proto_rawDesc, - NumEnums: 1, - NumMessages: 2, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_google_monitoring_dashboard_v1_piechart_proto_goTypes, - DependencyIndexes: file_google_monitoring_dashboard_v1_piechart_proto_depIdxs, - EnumInfos: file_google_monitoring_dashboard_v1_piechart_proto_enumTypes, - MessageInfos: file_google_monitoring_dashboard_v1_piechart_proto_msgTypes, - }.Build() - File_google_monitoring_dashboard_v1_piechart_proto = out.File - file_google_monitoring_dashboard_v1_piechart_proto_rawDesc = nil - file_google_monitoring_dashboard_v1_piechart_proto_goTypes = nil - file_google_monitoring_dashboard_v1_piechart_proto_depIdxs = nil -} diff --git a/vendor/cloud.google.com/go/monitoring/dashboard/apiv1/dashboardpb/scorecard.pb.go b/vendor/cloud.google.com/go/monitoring/dashboard/apiv1/dashboardpb/scorecard.pb.go deleted file mode 100644 index b7eb6f0eba..0000000000 --- a/vendor/cloud.google.com/go/monitoring/dashboard/apiv1/dashboardpb/scorecard.pb.go +++ /dev/null @@ -1,473 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.35.2 -// protoc v4.25.7 -// source: google/monitoring/dashboard/v1/scorecard.proto - -package dashboardpb - -import ( - _ "google.golang.org/genproto/googleapis/api/annotations" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - durationpb "google.golang.org/protobuf/types/known/durationpb" - emptypb "google.golang.org/protobuf/types/known/emptypb" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// A widget showing the latest value of a metric, and how this value relates to -// one or more thresholds. -type Scorecard struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Required. Fields for querying time series data from the - // Stackdriver metrics API. - TimeSeriesQuery *TimeSeriesQuery `protobuf:"bytes,1,opt,name=time_series_query,json=timeSeriesQuery,proto3" json:"time_series_query,omitempty"` - // Defines the optional additional chart shown on the scorecard. If - // neither is included - then a default scorecard is shown. - // - // Types that are assignable to DataView: - // - // *Scorecard_GaugeView_ - // *Scorecard_SparkChartView_ - // *Scorecard_BlankView - DataView isScorecard_DataView `protobuf_oneof:"data_view"` - // The thresholds used to determine the state of the scorecard given the - // time series' current value. For an actual value x, the scorecard is in a - // danger state if x is less than or equal to a danger threshold that triggers - // below, or greater than or equal to a danger threshold that triggers above. - // Similarly, if x is above/below a warning threshold that triggers - // above/below, then the scorecard is in a warning state - unless x also puts - // it in a danger state. (Danger trumps warning.) - // - // As an example, consider a scorecard with the following four thresholds: - // - // ``` - // - // { - // value: 90, - // category: 'DANGER', - // trigger: 'ABOVE', - // }, - // - // { - // value: 70, - // category: 'WARNING', - // trigger: 'ABOVE', - // }, - // - // { - // value: 10, - // category: 'DANGER', - // trigger: 'BELOW', - // }, - // - // { - // value: 20, - // category: 'WARNING', - // trigger: 'BELOW', - // } - // - // ``` - // - // Then: values less than or equal to 10 would put the scorecard in a DANGER - // state, values greater than 10 but less than or equal to 20 a WARNING state, - // values strictly between 20 and 70 an OK state, values greater than or equal - // to 70 but less than 90 a WARNING state, and values greater than or equal to - // 90 a DANGER state. - Thresholds []*Threshold `protobuf:"bytes,6,rep,name=thresholds,proto3" json:"thresholds,omitempty"` -} - -func (x *Scorecard) Reset() { - *x = Scorecard{} - mi := &file_google_monitoring_dashboard_v1_scorecard_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *Scorecard) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Scorecard) ProtoMessage() {} - -func (x *Scorecard) ProtoReflect() protoreflect.Message { - mi := &file_google_monitoring_dashboard_v1_scorecard_proto_msgTypes[0] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Scorecard.ProtoReflect.Descriptor instead. -func (*Scorecard) Descriptor() ([]byte, []int) { - return file_google_monitoring_dashboard_v1_scorecard_proto_rawDescGZIP(), []int{0} -} - -func (x *Scorecard) GetTimeSeriesQuery() *TimeSeriesQuery { - if x != nil { - return x.TimeSeriesQuery - } - return nil -} - -func (m *Scorecard) GetDataView() isScorecard_DataView { - if m != nil { - return m.DataView - } - return nil -} - -func (x *Scorecard) GetGaugeView() *Scorecard_GaugeView { - if x, ok := x.GetDataView().(*Scorecard_GaugeView_); ok { - return x.GaugeView - } - return nil -} - -func (x *Scorecard) GetSparkChartView() *Scorecard_SparkChartView { - if x, ok := x.GetDataView().(*Scorecard_SparkChartView_); ok { - return x.SparkChartView - } - return nil -} - -func (x *Scorecard) GetBlankView() *emptypb.Empty { - if x, ok := x.GetDataView().(*Scorecard_BlankView); ok { - return x.BlankView - } - return nil -} - -func (x *Scorecard) GetThresholds() []*Threshold { - if x != nil { - return x.Thresholds - } - return nil -} - -type isScorecard_DataView interface { - isScorecard_DataView() -} - -type Scorecard_GaugeView_ struct { - // Will cause the scorecard to show a gauge chart. - GaugeView *Scorecard_GaugeView `protobuf:"bytes,4,opt,name=gauge_view,json=gaugeView,proto3,oneof"` -} - -type Scorecard_SparkChartView_ struct { - // Will cause the scorecard to show a spark chart. - SparkChartView *Scorecard_SparkChartView `protobuf:"bytes,5,opt,name=spark_chart_view,json=sparkChartView,proto3,oneof"` -} - -type Scorecard_BlankView struct { - // Will cause the `Scorecard` to show only the value, with no indicator to - // its value relative to its thresholds. - BlankView *emptypb.Empty `protobuf:"bytes,7,opt,name=blank_view,json=blankView,proto3,oneof"` -} - -func (*Scorecard_GaugeView_) isScorecard_DataView() {} - -func (*Scorecard_SparkChartView_) isScorecard_DataView() {} - -func (*Scorecard_BlankView) isScorecard_DataView() {} - -// A gauge chart shows where the current value sits within a pre-defined -// range. The upper and lower bounds should define the possible range of -// values for the scorecard's query (inclusive). -type Scorecard_GaugeView struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The lower bound for this gauge chart. The value of the chart should - // always be greater than or equal to this. - LowerBound float64 `protobuf:"fixed64,1,opt,name=lower_bound,json=lowerBound,proto3" json:"lower_bound,omitempty"` - // The upper bound for this gauge chart. The value of the chart should - // always be less than or equal to this. - UpperBound float64 `protobuf:"fixed64,2,opt,name=upper_bound,json=upperBound,proto3" json:"upper_bound,omitempty"` -} - -func (x *Scorecard_GaugeView) Reset() { - *x = Scorecard_GaugeView{} - mi := &file_google_monitoring_dashboard_v1_scorecard_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *Scorecard_GaugeView) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Scorecard_GaugeView) ProtoMessage() {} - -func (x *Scorecard_GaugeView) ProtoReflect() protoreflect.Message { - mi := &file_google_monitoring_dashboard_v1_scorecard_proto_msgTypes[1] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Scorecard_GaugeView.ProtoReflect.Descriptor instead. -func (*Scorecard_GaugeView) Descriptor() ([]byte, []int) { - return file_google_monitoring_dashboard_v1_scorecard_proto_rawDescGZIP(), []int{0, 0} -} - -func (x *Scorecard_GaugeView) GetLowerBound() float64 { - if x != nil { - return x.LowerBound - } - return 0 -} - -func (x *Scorecard_GaugeView) GetUpperBound() float64 { - if x != nil { - return x.UpperBound - } - return 0 -} - -// A sparkChart is a small chart suitable for inclusion in a table-cell or -// inline in text. This message contains the configuration for a sparkChart -// to show up on a Scorecard, showing recent trends of the scorecard's -// timeseries. -type Scorecard_SparkChartView struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Required. The type of sparkchart to show in this chartView. - SparkChartType SparkChartType `protobuf:"varint,1,opt,name=spark_chart_type,json=sparkChartType,proto3,enum=google.monitoring.dashboard.v1.SparkChartType" json:"spark_chart_type,omitempty"` - // The lower bound on data point frequency in the chart implemented by - // specifying the minimum alignment period to use in a time series query. - // For example, if the data is published once every 10 minutes it would not - // make sense to fetch and align data at one minute intervals. This field is - // optional and exists only as a hint. - MinAlignmentPeriod *durationpb.Duration `protobuf:"bytes,2,opt,name=min_alignment_period,json=minAlignmentPeriod,proto3" json:"min_alignment_period,omitempty"` -} - -func (x *Scorecard_SparkChartView) Reset() { - *x = Scorecard_SparkChartView{} - mi := &file_google_monitoring_dashboard_v1_scorecard_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *Scorecard_SparkChartView) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Scorecard_SparkChartView) ProtoMessage() {} - -func (x *Scorecard_SparkChartView) ProtoReflect() protoreflect.Message { - mi := &file_google_monitoring_dashboard_v1_scorecard_proto_msgTypes[2] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Scorecard_SparkChartView.ProtoReflect.Descriptor instead. -func (*Scorecard_SparkChartView) Descriptor() ([]byte, []int) { - return file_google_monitoring_dashboard_v1_scorecard_proto_rawDescGZIP(), []int{0, 1} -} - -func (x *Scorecard_SparkChartView) GetSparkChartType() SparkChartType { - if x != nil { - return x.SparkChartType - } - return SparkChartType_SPARK_CHART_TYPE_UNSPECIFIED -} - -func (x *Scorecard_SparkChartView) GetMinAlignmentPeriod() *durationpb.Duration { - if x != nil { - return x.MinAlignmentPeriod - } - return nil -} - -var File_google_monitoring_dashboard_v1_scorecard_proto protoreflect.FileDescriptor - -var file_google_monitoring_dashboard_v1_scorecard_proto_rawDesc = []byte{ - 0x0a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, - 0x69, 0x6e, 0x67, 0x2f, 0x64, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2f, 0x76, 0x31, - 0x2f, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x63, 0x61, 0x72, 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x12, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, - 0x69, 0x6e, 0x67, 0x2e, 0x64, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2e, 0x76, 0x31, - 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x66, 0x69, 0x65, - 0x6c, 0x64, 0x5f, 0x62, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x1a, 0x2c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, - 0x72, 0x69, 0x6e, 0x67, 0x2f, 0x64, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2f, 0x76, - 0x31, 0x2f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, - 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, - 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xc8, 0x05, 0x0a, - 0x09, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x63, 0x61, 0x72, 0x64, 0x12, 0x60, 0x0a, 0x11, 0x74, 0x69, - 0x6d, 0x65, 0x5f, 0x73, 0x65, 0x72, 0x69, 0x65, 0x73, 0x5f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x6d, - 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x64, 0x61, 0x73, 0x68, 0x62, 0x6f, - 0x61, 0x72, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x53, 0x65, 0x72, 0x69, 0x65, - 0x73, 0x51, 0x75, 0x65, 0x72, 0x79, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x0f, 0x74, 0x69, 0x6d, - 0x65, 0x53, 0x65, 0x72, 0x69, 0x65, 0x73, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x54, 0x0a, 0x0a, - 0x67, 0x61, 0x75, 0x67, 0x65, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x33, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, - 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x64, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2e, 0x76, - 0x31, 0x2e, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x63, 0x61, 0x72, 0x64, 0x2e, 0x47, 0x61, 0x75, 0x67, - 0x65, 0x56, 0x69, 0x65, 0x77, 0x48, 0x00, 0x52, 0x09, 0x67, 0x61, 0x75, 0x67, 0x65, 0x56, 0x69, - 0x65, 0x77, 0x12, 0x64, 0x0a, 0x10, 0x73, 0x70, 0x61, 0x72, 0x6b, 0x5f, 0x63, 0x68, 0x61, 0x72, - 0x74, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x38, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, - 0x2e, 0x64, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x63, - 0x6f, 0x72, 0x65, 0x63, 0x61, 0x72, 0x64, 0x2e, 0x53, 0x70, 0x61, 0x72, 0x6b, 0x43, 0x68, 0x61, - 0x72, 0x74, 0x56, 0x69, 0x65, 0x77, 0x48, 0x00, 0x52, 0x0e, 0x73, 0x70, 0x61, 0x72, 0x6b, 0x43, - 0x68, 0x61, 0x72, 0x74, 0x56, 0x69, 0x65, 0x77, 0x12, 0x37, 0x0a, 0x0a, 0x62, 0x6c, 0x61, 0x6e, - 0x6b, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, - 0x6d, 0x70, 0x74, 0x79, 0x48, 0x00, 0x52, 0x09, 0x62, 0x6c, 0x61, 0x6e, 0x6b, 0x56, 0x69, 0x65, - 0x77, 0x12, 0x49, 0x0a, 0x0a, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x73, 0x18, - 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x6d, - 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x64, 0x61, 0x73, 0x68, 0x62, 0x6f, - 0x61, 0x72, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, - 0x52, 0x0a, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x73, 0x1a, 0x4d, 0x0a, 0x09, - 0x47, 0x61, 0x75, 0x67, 0x65, 0x56, 0x69, 0x65, 0x77, 0x12, 0x1f, 0x0a, 0x0b, 0x6c, 0x6f, 0x77, - 0x65, 0x72, 0x5f, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x01, 0x52, 0x0a, - 0x6c, 0x6f, 0x77, 0x65, 0x72, 0x42, 0x6f, 0x75, 0x6e, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x75, 0x70, - 0x70, 0x65, 0x72, 0x5f, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x01, 0x52, - 0x0a, 0x75, 0x70, 0x70, 0x65, 0x72, 0x42, 0x6f, 0x75, 0x6e, 0x64, 0x1a, 0xbc, 0x01, 0x0a, 0x0e, - 0x53, 0x70, 0x61, 0x72, 0x6b, 0x43, 0x68, 0x61, 0x72, 0x74, 0x56, 0x69, 0x65, 0x77, 0x12, 0x5d, - 0x0a, 0x10, 0x73, 0x70, 0x61, 0x72, 0x6b, 0x5f, 0x63, 0x68, 0x61, 0x72, 0x74, 0x5f, 0x74, 0x79, - 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x64, 0x61, 0x73, - 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x70, 0x61, 0x72, 0x6b, 0x43, - 0x68, 0x61, 0x72, 0x74, 0x54, 0x79, 0x70, 0x65, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x0e, 0x73, - 0x70, 0x61, 0x72, 0x6b, 0x43, 0x68, 0x61, 0x72, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x4b, 0x0a, - 0x14, 0x6d, 0x69, 0x6e, 0x5f, 0x61, 0x6c, 0x69, 0x67, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x70, - 0x65, 0x72, 0x69, 0x6f, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, - 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x12, 0x6d, 0x69, 0x6e, 0x41, 0x6c, 0x69, 0x67, 0x6e, - 0x6d, 0x65, 0x6e, 0x74, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x42, 0x0b, 0x0a, 0x09, 0x64, 0x61, - 0x74, 0x61, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x42, 0xf7, 0x01, 0x0a, 0x22, 0x63, 0x6f, 0x6d, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, - 0x67, 0x2e, 0x64, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2e, 0x76, 0x31, 0x42, 0x0e, - 0x53, 0x63, 0x6f, 0x72, 0x65, 0x63, 0x61, 0x72, 0x64, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, - 0x5a, 0x46, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, - 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x2f, 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, - 0x2f, 0x64, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2f, 0x61, 0x70, 0x69, 0x76, 0x31, - 0x2f, 0x64, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x70, 0x62, 0x3b, 0x64, 0x61, 0x73, - 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x70, 0x62, 0xaa, 0x02, 0x24, 0x47, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x4d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, - 0x6e, 0x67, 0x2e, 0x44, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2e, 0x56, 0x31, 0xca, - 0x02, 0x24, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x5c, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x5c, 0x4d, - 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x5c, 0x44, 0x61, 0x73, 0x68, 0x62, 0x6f, - 0x61, 0x72, 0x64, 0x5c, 0x56, 0x31, 0xea, 0x02, 0x28, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x3a, - 0x3a, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x3a, 0x3a, 0x4d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, - 0x6e, 0x67, 0x3a, 0x3a, 0x44, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x3a, 0x3a, 0x56, - 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_google_monitoring_dashboard_v1_scorecard_proto_rawDescOnce sync.Once - file_google_monitoring_dashboard_v1_scorecard_proto_rawDescData = file_google_monitoring_dashboard_v1_scorecard_proto_rawDesc -) - -func file_google_monitoring_dashboard_v1_scorecard_proto_rawDescGZIP() []byte { - file_google_monitoring_dashboard_v1_scorecard_proto_rawDescOnce.Do(func() { - file_google_monitoring_dashboard_v1_scorecard_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_monitoring_dashboard_v1_scorecard_proto_rawDescData) - }) - return file_google_monitoring_dashboard_v1_scorecard_proto_rawDescData -} - -var file_google_monitoring_dashboard_v1_scorecard_proto_msgTypes = make([]protoimpl.MessageInfo, 3) -var file_google_monitoring_dashboard_v1_scorecard_proto_goTypes = []any{ - (*Scorecard)(nil), // 0: google.monitoring.dashboard.v1.Scorecard - (*Scorecard_GaugeView)(nil), // 1: google.monitoring.dashboard.v1.Scorecard.GaugeView - (*Scorecard_SparkChartView)(nil), // 2: google.monitoring.dashboard.v1.Scorecard.SparkChartView - (*TimeSeriesQuery)(nil), // 3: google.monitoring.dashboard.v1.TimeSeriesQuery - (*emptypb.Empty)(nil), // 4: google.protobuf.Empty - (*Threshold)(nil), // 5: google.monitoring.dashboard.v1.Threshold - (SparkChartType)(0), // 6: google.monitoring.dashboard.v1.SparkChartType - (*durationpb.Duration)(nil), // 7: google.protobuf.Duration -} -var file_google_monitoring_dashboard_v1_scorecard_proto_depIdxs = []int32{ - 3, // 0: google.monitoring.dashboard.v1.Scorecard.time_series_query:type_name -> google.monitoring.dashboard.v1.TimeSeriesQuery - 1, // 1: google.monitoring.dashboard.v1.Scorecard.gauge_view:type_name -> google.monitoring.dashboard.v1.Scorecard.GaugeView - 2, // 2: google.monitoring.dashboard.v1.Scorecard.spark_chart_view:type_name -> google.monitoring.dashboard.v1.Scorecard.SparkChartView - 4, // 3: google.monitoring.dashboard.v1.Scorecard.blank_view:type_name -> google.protobuf.Empty - 5, // 4: google.monitoring.dashboard.v1.Scorecard.thresholds:type_name -> google.monitoring.dashboard.v1.Threshold - 6, // 5: google.monitoring.dashboard.v1.Scorecard.SparkChartView.spark_chart_type:type_name -> google.monitoring.dashboard.v1.SparkChartType - 7, // 6: google.monitoring.dashboard.v1.Scorecard.SparkChartView.min_alignment_period:type_name -> google.protobuf.Duration - 7, // [7:7] is the sub-list for method output_type - 7, // [7:7] is the sub-list for method input_type - 7, // [7:7] is the sub-list for extension type_name - 7, // [7:7] is the sub-list for extension extendee - 0, // [0:7] is the sub-list for field type_name -} - -func init() { file_google_monitoring_dashboard_v1_scorecard_proto_init() } -func file_google_monitoring_dashboard_v1_scorecard_proto_init() { - if File_google_monitoring_dashboard_v1_scorecard_proto != nil { - return - } - file_google_monitoring_dashboard_v1_metrics_proto_init() - file_google_monitoring_dashboard_v1_scorecard_proto_msgTypes[0].OneofWrappers = []any{ - (*Scorecard_GaugeView_)(nil), - (*Scorecard_SparkChartView_)(nil), - (*Scorecard_BlankView)(nil), - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_google_monitoring_dashboard_v1_scorecard_proto_rawDesc, - NumEnums: 0, - NumMessages: 3, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_google_monitoring_dashboard_v1_scorecard_proto_goTypes, - DependencyIndexes: file_google_monitoring_dashboard_v1_scorecard_proto_depIdxs, - MessageInfos: file_google_monitoring_dashboard_v1_scorecard_proto_msgTypes, - }.Build() - File_google_monitoring_dashboard_v1_scorecard_proto = out.File - file_google_monitoring_dashboard_v1_scorecard_proto_rawDesc = nil - file_google_monitoring_dashboard_v1_scorecard_proto_goTypes = nil - file_google_monitoring_dashboard_v1_scorecard_proto_depIdxs = nil -} diff --git a/vendor/cloud.google.com/go/monitoring/dashboard/apiv1/dashboardpb/section_header.pb.go b/vendor/cloud.google.com/go/monitoring/dashboard/apiv1/dashboardpb/section_header.pb.go deleted file mode 100644 index 52323edbeb..0000000000 --- a/vendor/cloud.google.com/go/monitoring/dashboard/apiv1/dashboardpb/section_header.pb.go +++ /dev/null @@ -1,173 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.35.2 -// protoc v4.25.7 -// source: google/monitoring/dashboard/v1/section_header.proto - -package dashboardpb - -import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// A widget that defines a new section header. Sections populate a table of -// contents and allow easier navigation of long-form content. -type SectionHeader struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The subtitle of the section - Subtitle string `protobuf:"bytes,1,opt,name=subtitle,proto3" json:"subtitle,omitempty"` - // Whether to insert a divider below the section in the table of contents - DividerBelow bool `protobuf:"varint,2,opt,name=divider_below,json=dividerBelow,proto3" json:"divider_below,omitempty"` -} - -func (x *SectionHeader) Reset() { - *x = SectionHeader{} - mi := &file_google_monitoring_dashboard_v1_section_header_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *SectionHeader) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SectionHeader) ProtoMessage() {} - -func (x *SectionHeader) ProtoReflect() protoreflect.Message { - mi := &file_google_monitoring_dashboard_v1_section_header_proto_msgTypes[0] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SectionHeader.ProtoReflect.Descriptor instead. -func (*SectionHeader) Descriptor() ([]byte, []int) { - return file_google_monitoring_dashboard_v1_section_header_proto_rawDescGZIP(), []int{0} -} - -func (x *SectionHeader) GetSubtitle() string { - if x != nil { - return x.Subtitle - } - return "" -} - -func (x *SectionHeader) GetDividerBelow() bool { - if x != nil { - return x.DividerBelow - } - return false -} - -var File_google_monitoring_dashboard_v1_section_header_proto protoreflect.FileDescriptor - -var file_google_monitoring_dashboard_v1_section_header_proto_rawDesc = []byte{ - 0x0a, 0x33, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, - 0x69, 0x6e, 0x67, 0x2f, 0x64, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2f, 0x76, 0x31, - 0x2f, 0x73, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x6d, 0x6f, - 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x64, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, - 0x72, 0x64, 0x2e, 0x76, 0x31, 0x22, 0x50, 0x0a, 0x0d, 0x53, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x75, 0x62, 0x74, 0x69, 0x74, - 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x73, 0x75, 0x62, 0x74, 0x69, 0x74, - 0x6c, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x64, 0x69, 0x76, 0x69, 0x64, 0x65, 0x72, 0x5f, 0x62, 0x65, - 0x6c, 0x6f, 0x77, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x64, 0x69, 0x76, 0x69, 0x64, - 0x65, 0x72, 0x42, 0x65, 0x6c, 0x6f, 0x77, 0x42, 0xfb, 0x01, 0x0a, 0x22, 0x63, 0x6f, 0x6d, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, - 0x67, 0x2e, 0x64, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2e, 0x76, 0x31, 0x42, 0x12, - 0x53, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x50, 0x72, 0x6f, - 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x46, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x2f, 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, - 0x72, 0x69, 0x6e, 0x67, 0x2f, 0x64, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2f, 0x61, - 0x70, 0x69, 0x76, 0x31, 0x2f, 0x64, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x70, 0x62, - 0x3b, 0x64, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x70, 0x62, 0xaa, 0x02, 0x24, 0x47, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x4d, 0x6f, 0x6e, 0x69, - 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x44, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, - 0x2e, 0x56, 0x31, 0xca, 0x02, 0x24, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x5c, 0x43, 0x6c, 0x6f, - 0x75, 0x64, 0x5c, 0x4d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x5c, 0x44, 0x61, - 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x5c, 0x56, 0x31, 0xea, 0x02, 0x28, 0x47, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x3a, 0x3a, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x3a, 0x3a, 0x4d, 0x6f, 0x6e, 0x69, - 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x3a, 0x3a, 0x44, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, - 0x64, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_google_monitoring_dashboard_v1_section_header_proto_rawDescOnce sync.Once - file_google_monitoring_dashboard_v1_section_header_proto_rawDescData = file_google_monitoring_dashboard_v1_section_header_proto_rawDesc -) - -func file_google_monitoring_dashboard_v1_section_header_proto_rawDescGZIP() []byte { - file_google_monitoring_dashboard_v1_section_header_proto_rawDescOnce.Do(func() { - file_google_monitoring_dashboard_v1_section_header_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_monitoring_dashboard_v1_section_header_proto_rawDescData) - }) - return file_google_monitoring_dashboard_v1_section_header_proto_rawDescData -} - -var file_google_monitoring_dashboard_v1_section_header_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_google_monitoring_dashboard_v1_section_header_proto_goTypes = []any{ - (*SectionHeader)(nil), // 0: google.monitoring.dashboard.v1.SectionHeader -} -var file_google_monitoring_dashboard_v1_section_header_proto_depIdxs = []int32{ - 0, // [0:0] is the sub-list for method output_type - 0, // [0:0] is the sub-list for method input_type - 0, // [0:0] is the sub-list for extension type_name - 0, // [0:0] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name -} - -func init() { file_google_monitoring_dashboard_v1_section_header_proto_init() } -func file_google_monitoring_dashboard_v1_section_header_proto_init() { - if File_google_monitoring_dashboard_v1_section_header_proto != nil { - return - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_google_monitoring_dashboard_v1_section_header_proto_rawDesc, - NumEnums: 0, - NumMessages: 1, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_google_monitoring_dashboard_v1_section_header_proto_goTypes, - DependencyIndexes: file_google_monitoring_dashboard_v1_section_header_proto_depIdxs, - MessageInfos: file_google_monitoring_dashboard_v1_section_header_proto_msgTypes, - }.Build() - File_google_monitoring_dashboard_v1_section_header_proto = out.File - file_google_monitoring_dashboard_v1_section_header_proto_rawDesc = nil - file_google_monitoring_dashboard_v1_section_header_proto_goTypes = nil - file_google_monitoring_dashboard_v1_section_header_proto_depIdxs = nil -} diff --git a/vendor/cloud.google.com/go/monitoring/dashboard/apiv1/dashboardpb/service.pb.go b/vendor/cloud.google.com/go/monitoring/dashboard/apiv1/dashboardpb/service.pb.go deleted file mode 100644 index 549852ae73..0000000000 --- a/vendor/cloud.google.com/go/monitoring/dashboard/apiv1/dashboardpb/service.pb.go +++ /dev/null @@ -1,94 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.35.2 -// protoc v4.25.7 -// source: google/monitoring/dashboard/v1/service.proto - -package dashboardpb - -import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -var File_google_monitoring_dashboard_v1_service_proto protoreflect.FileDescriptor - -var file_google_monitoring_dashboard_v1_service_proto_rawDesc = []byte{ - 0x0a, 0x2c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, - 0x69, 0x6e, 0x67, 0x2f, 0x64, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2f, 0x76, 0x31, - 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, - 0x67, 0x2e, 0x64, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2e, 0x76, 0x31, 0x42, 0xff, - 0x01, 0x0a, 0x22, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x6d, 0x6f, - 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x64, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, - 0x72, 0x64, 0x2e, 0x76, 0x31, 0x42, 0x16, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4d, 0x6f, - 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, - 0x46, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6f, - 0x6d, 0x2f, 0x67, 0x6f, 0x2f, 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x2f, - 0x64, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2f, 0x61, 0x70, 0x69, 0x76, 0x31, 0x2f, - 0x64, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x70, 0x62, 0x3b, 0x64, 0x61, 0x73, 0x68, - 0x62, 0x6f, 0x61, 0x72, 0x64, 0x70, 0x62, 0xaa, 0x02, 0x24, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x4d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, - 0x67, 0x2e, 0x44, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2e, 0x56, 0x31, 0xca, 0x02, - 0x24, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x5c, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x5c, 0x4d, 0x6f, - 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x5c, 0x44, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, - 0x72, 0x64, 0x5c, 0x56, 0x31, 0xea, 0x02, 0x28, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x3a, 0x3a, - 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x3a, 0x3a, 0x4d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, - 0x67, 0x3a, 0x3a, 0x44, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x3a, 0x3a, 0x56, 0x31, - 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var file_google_monitoring_dashboard_v1_service_proto_goTypes = []any{} -var file_google_monitoring_dashboard_v1_service_proto_depIdxs = []int32{ - 0, // [0:0] is the sub-list for method output_type - 0, // [0:0] is the sub-list for method input_type - 0, // [0:0] is the sub-list for extension type_name - 0, // [0:0] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name -} - -func init() { file_google_monitoring_dashboard_v1_service_proto_init() } -func file_google_monitoring_dashboard_v1_service_proto_init() { - if File_google_monitoring_dashboard_v1_service_proto != nil { - return - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_google_monitoring_dashboard_v1_service_proto_rawDesc, - NumEnums: 0, - NumMessages: 0, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_google_monitoring_dashboard_v1_service_proto_goTypes, - DependencyIndexes: file_google_monitoring_dashboard_v1_service_proto_depIdxs, - }.Build() - File_google_monitoring_dashboard_v1_service_proto = out.File - file_google_monitoring_dashboard_v1_service_proto_rawDesc = nil - file_google_monitoring_dashboard_v1_service_proto_goTypes = nil - file_google_monitoring_dashboard_v1_service_proto_depIdxs = nil -} diff --git a/vendor/cloud.google.com/go/monitoring/dashboard/apiv1/dashboardpb/single_view_group.pb.go b/vendor/cloud.google.com/go/monitoring/dashboard/apiv1/dashboardpb/single_view_group.pb.go deleted file mode 100644 index e2bb53a333..0000000000 --- a/vendor/cloud.google.com/go/monitoring/dashboard/apiv1/dashboardpb/single_view_group.pb.go +++ /dev/null @@ -1,152 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.35.2 -// protoc v4.25.7 -// source: google/monitoring/dashboard/v1/single_view_group.proto - -package dashboardpb - -import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// A widget that groups the other widgets by using a dropdown menu. All widgets -// that are within the area spanned by the grouping widget are considered -// member widgets. -type SingleViewGroup struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *SingleViewGroup) Reset() { - *x = SingleViewGroup{} - mi := &file_google_monitoring_dashboard_v1_single_view_group_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *SingleViewGroup) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SingleViewGroup) ProtoMessage() {} - -func (x *SingleViewGroup) ProtoReflect() protoreflect.Message { - mi := &file_google_monitoring_dashboard_v1_single_view_group_proto_msgTypes[0] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SingleViewGroup.ProtoReflect.Descriptor instead. -func (*SingleViewGroup) Descriptor() ([]byte, []int) { - return file_google_monitoring_dashboard_v1_single_view_group_proto_rawDescGZIP(), []int{0} -} - -var File_google_monitoring_dashboard_v1_single_view_group_proto protoreflect.FileDescriptor - -var file_google_monitoring_dashboard_v1_single_view_group_proto_rawDesc = []byte{ - 0x0a, 0x36, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, - 0x69, 0x6e, 0x67, 0x2f, 0x64, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2f, 0x76, 0x31, - 0x2f, 0x73, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x5f, 0x67, 0x72, 0x6f, - 0x75, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x64, 0x61, 0x73, 0x68, - 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2e, 0x76, 0x31, 0x22, 0x11, 0x0a, 0x0f, 0x53, 0x69, 0x6e, 0x67, - 0x6c, 0x65, 0x56, 0x69, 0x65, 0x77, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x42, 0xfd, 0x01, 0x0a, 0x22, - 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x6d, 0x6f, 0x6e, 0x69, 0x74, - 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x64, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2e, - 0x76, 0x31, 0x42, 0x14, 0x53, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x56, 0x69, 0x65, 0x77, 0x47, 0x72, - 0x6f, 0x75, 0x70, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x46, 0x63, 0x6c, 0x6f, 0x75, - 0x64, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x2f, - 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x2f, 0x64, 0x61, 0x73, 0x68, 0x62, - 0x6f, 0x61, 0x72, 0x64, 0x2f, 0x61, 0x70, 0x69, 0x76, 0x31, 0x2f, 0x64, 0x61, 0x73, 0x68, 0x62, - 0x6f, 0x61, 0x72, 0x64, 0x70, 0x62, 0x3b, 0x64, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, - 0x70, 0x62, 0xaa, 0x02, 0x24, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x43, 0x6c, 0x6f, 0x75, - 0x64, 0x2e, 0x4d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x44, 0x61, 0x73, - 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x24, 0x47, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x5c, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x5c, 0x4d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, - 0x69, 0x6e, 0x67, 0x5c, 0x44, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x5c, 0x56, 0x31, - 0xea, 0x02, 0x28, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x3a, 0x3a, 0x43, 0x6c, 0x6f, 0x75, 0x64, - 0x3a, 0x3a, 0x4d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x3a, 0x3a, 0x44, 0x61, - 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x33, -} - -var ( - file_google_monitoring_dashboard_v1_single_view_group_proto_rawDescOnce sync.Once - file_google_monitoring_dashboard_v1_single_view_group_proto_rawDescData = file_google_monitoring_dashboard_v1_single_view_group_proto_rawDesc -) - -func file_google_monitoring_dashboard_v1_single_view_group_proto_rawDescGZIP() []byte { - file_google_monitoring_dashboard_v1_single_view_group_proto_rawDescOnce.Do(func() { - file_google_monitoring_dashboard_v1_single_view_group_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_monitoring_dashboard_v1_single_view_group_proto_rawDescData) - }) - return file_google_monitoring_dashboard_v1_single_view_group_proto_rawDescData -} - -var file_google_monitoring_dashboard_v1_single_view_group_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_google_monitoring_dashboard_v1_single_view_group_proto_goTypes = []any{ - (*SingleViewGroup)(nil), // 0: google.monitoring.dashboard.v1.SingleViewGroup -} -var file_google_monitoring_dashboard_v1_single_view_group_proto_depIdxs = []int32{ - 0, // [0:0] is the sub-list for method output_type - 0, // [0:0] is the sub-list for method input_type - 0, // [0:0] is the sub-list for extension type_name - 0, // [0:0] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name -} - -func init() { file_google_monitoring_dashboard_v1_single_view_group_proto_init() } -func file_google_monitoring_dashboard_v1_single_view_group_proto_init() { - if File_google_monitoring_dashboard_v1_single_view_group_proto != nil { - return - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_google_monitoring_dashboard_v1_single_view_group_proto_rawDesc, - NumEnums: 0, - NumMessages: 1, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_google_monitoring_dashboard_v1_single_view_group_proto_goTypes, - DependencyIndexes: file_google_monitoring_dashboard_v1_single_view_group_proto_depIdxs, - MessageInfos: file_google_monitoring_dashboard_v1_single_view_group_proto_msgTypes, - }.Build() - File_google_monitoring_dashboard_v1_single_view_group_proto = out.File - file_google_monitoring_dashboard_v1_single_view_group_proto_rawDesc = nil - file_google_monitoring_dashboard_v1_single_view_group_proto_goTypes = nil - file_google_monitoring_dashboard_v1_single_view_group_proto_depIdxs = nil -} diff --git a/vendor/cloud.google.com/go/monitoring/dashboard/apiv1/dashboardpb/table.pb.go b/vendor/cloud.google.com/go/monitoring/dashboard/apiv1/dashboardpb/table.pb.go deleted file mode 100644 index 598104c353..0000000000 --- a/vendor/cloud.google.com/go/monitoring/dashboard/apiv1/dashboardpb/table.pb.go +++ /dev/null @@ -1,450 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.35.2 -// protoc v4.25.7 -// source: google/monitoring/dashboard/v1/table.proto - -package dashboardpb - -import ( - _ "google.golang.org/genproto/googleapis/api/annotations" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - durationpb "google.golang.org/protobuf/types/known/durationpb" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// Enum for metric metric_visualization -type TimeSeriesTable_MetricVisualization int32 - -const ( - // Unspecified state - TimeSeriesTable_METRIC_VISUALIZATION_UNSPECIFIED TimeSeriesTable_MetricVisualization = 0 - // Default text rendering - TimeSeriesTable_NUMBER TimeSeriesTable_MetricVisualization = 1 - // Horizontal bar rendering - TimeSeriesTable_BAR TimeSeriesTable_MetricVisualization = 2 -) - -// Enum value maps for TimeSeriesTable_MetricVisualization. -var ( - TimeSeriesTable_MetricVisualization_name = map[int32]string{ - 0: "METRIC_VISUALIZATION_UNSPECIFIED", - 1: "NUMBER", - 2: "BAR", - } - TimeSeriesTable_MetricVisualization_value = map[string]int32{ - "METRIC_VISUALIZATION_UNSPECIFIED": 0, - "NUMBER": 1, - "BAR": 2, - } -) - -func (x TimeSeriesTable_MetricVisualization) Enum() *TimeSeriesTable_MetricVisualization { - p := new(TimeSeriesTable_MetricVisualization) - *p = x - return p -} - -func (x TimeSeriesTable_MetricVisualization) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (TimeSeriesTable_MetricVisualization) Descriptor() protoreflect.EnumDescriptor { - return file_google_monitoring_dashboard_v1_table_proto_enumTypes[0].Descriptor() -} - -func (TimeSeriesTable_MetricVisualization) Type() protoreflect.EnumType { - return &file_google_monitoring_dashboard_v1_table_proto_enumTypes[0] -} - -func (x TimeSeriesTable_MetricVisualization) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use TimeSeriesTable_MetricVisualization.Descriptor instead. -func (TimeSeriesTable_MetricVisualization) EnumDescriptor() ([]byte, []int) { - return file_google_monitoring_dashboard_v1_table_proto_rawDescGZIP(), []int{0, 0} -} - -// A table that displays time series data. -type TimeSeriesTable struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Required. The data displayed in this table. - DataSets []*TimeSeriesTable_TableDataSet `protobuf:"bytes,1,rep,name=data_sets,json=dataSets,proto3" json:"data_sets,omitempty"` - // Optional. Store rendering strategy - MetricVisualization TimeSeriesTable_MetricVisualization `protobuf:"varint,2,opt,name=metric_visualization,json=metricVisualization,proto3,enum=google.monitoring.dashboard.v1.TimeSeriesTable_MetricVisualization" json:"metric_visualization,omitempty"` - // Optional. The list of the persistent column settings for the table. - ColumnSettings []*TimeSeriesTable_ColumnSettings `protobuf:"bytes,4,rep,name=column_settings,json=columnSettings,proto3" json:"column_settings,omitempty"` -} - -func (x *TimeSeriesTable) Reset() { - *x = TimeSeriesTable{} - mi := &file_google_monitoring_dashboard_v1_table_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *TimeSeriesTable) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*TimeSeriesTable) ProtoMessage() {} - -func (x *TimeSeriesTable) ProtoReflect() protoreflect.Message { - mi := &file_google_monitoring_dashboard_v1_table_proto_msgTypes[0] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use TimeSeriesTable.ProtoReflect.Descriptor instead. -func (*TimeSeriesTable) Descriptor() ([]byte, []int) { - return file_google_monitoring_dashboard_v1_table_proto_rawDescGZIP(), []int{0} -} - -func (x *TimeSeriesTable) GetDataSets() []*TimeSeriesTable_TableDataSet { - if x != nil { - return x.DataSets - } - return nil -} - -func (x *TimeSeriesTable) GetMetricVisualization() TimeSeriesTable_MetricVisualization { - if x != nil { - return x.MetricVisualization - } - return TimeSeriesTable_METRIC_VISUALIZATION_UNSPECIFIED -} - -func (x *TimeSeriesTable) GetColumnSettings() []*TimeSeriesTable_ColumnSettings { - if x != nil { - return x.ColumnSettings - } - return nil -} - -// Groups a time series query definition with table options. -type TimeSeriesTable_TableDataSet struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Required. Fields for querying time series data from the - // Stackdriver metrics API. - TimeSeriesQuery *TimeSeriesQuery `protobuf:"bytes,1,opt,name=time_series_query,json=timeSeriesQuery,proto3" json:"time_series_query,omitempty"` - // Optional. A template string for naming `TimeSeries` in the resulting data - // set. This should be a string with interpolations of the form - // `${label_name}`, which will resolve to the label's value i.e. - // "${resource.labels.project_id}." - TableTemplate string `protobuf:"bytes,2,opt,name=table_template,json=tableTemplate,proto3" json:"table_template,omitempty"` - // Optional. The lower bound on data point frequency for this data set, - // implemented by specifying the minimum alignment period to use in a time - // series query For example, if the data is published once every 10 minutes, - // the `min_alignment_period` should be at least 10 minutes. It would not - // make sense to fetch and align data at one minute intervals. - MinAlignmentPeriod *durationpb.Duration `protobuf:"bytes,3,opt,name=min_alignment_period,json=minAlignmentPeriod,proto3" json:"min_alignment_period,omitempty"` - // Optional. Table display options for configuring how the table is - // rendered. - TableDisplayOptions *TableDisplayOptions `protobuf:"bytes,4,opt,name=table_display_options,json=tableDisplayOptions,proto3" json:"table_display_options,omitempty"` -} - -func (x *TimeSeriesTable_TableDataSet) Reset() { - *x = TimeSeriesTable_TableDataSet{} - mi := &file_google_monitoring_dashboard_v1_table_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *TimeSeriesTable_TableDataSet) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*TimeSeriesTable_TableDataSet) ProtoMessage() {} - -func (x *TimeSeriesTable_TableDataSet) ProtoReflect() protoreflect.Message { - mi := &file_google_monitoring_dashboard_v1_table_proto_msgTypes[1] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use TimeSeriesTable_TableDataSet.ProtoReflect.Descriptor instead. -func (*TimeSeriesTable_TableDataSet) Descriptor() ([]byte, []int) { - return file_google_monitoring_dashboard_v1_table_proto_rawDescGZIP(), []int{0, 0} -} - -func (x *TimeSeriesTable_TableDataSet) GetTimeSeriesQuery() *TimeSeriesQuery { - if x != nil { - return x.TimeSeriesQuery - } - return nil -} - -func (x *TimeSeriesTable_TableDataSet) GetTableTemplate() string { - if x != nil { - return x.TableTemplate - } - return "" -} - -func (x *TimeSeriesTable_TableDataSet) GetMinAlignmentPeriod() *durationpb.Duration { - if x != nil { - return x.MinAlignmentPeriod - } - return nil -} - -func (x *TimeSeriesTable_TableDataSet) GetTableDisplayOptions() *TableDisplayOptions { - if x != nil { - return x.TableDisplayOptions - } - return nil -} - -// The persistent settings for a table's columns. -type TimeSeriesTable_ColumnSettings struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Required. The id of the column. - Column string `protobuf:"bytes,1,opt,name=column,proto3" json:"column,omitempty"` - // Required. Whether the column should be visible on page load. - Visible bool `protobuf:"varint,2,opt,name=visible,proto3" json:"visible,omitempty"` -} - -func (x *TimeSeriesTable_ColumnSettings) Reset() { - *x = TimeSeriesTable_ColumnSettings{} - mi := &file_google_monitoring_dashboard_v1_table_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *TimeSeriesTable_ColumnSettings) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*TimeSeriesTable_ColumnSettings) ProtoMessage() {} - -func (x *TimeSeriesTable_ColumnSettings) ProtoReflect() protoreflect.Message { - mi := &file_google_monitoring_dashboard_v1_table_proto_msgTypes[2] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use TimeSeriesTable_ColumnSettings.ProtoReflect.Descriptor instead. -func (*TimeSeriesTable_ColumnSettings) Descriptor() ([]byte, []int) { - return file_google_monitoring_dashboard_v1_table_proto_rawDescGZIP(), []int{0, 1} -} - -func (x *TimeSeriesTable_ColumnSettings) GetColumn() string { - if x != nil { - return x.Column - } - return "" -} - -func (x *TimeSeriesTable_ColumnSettings) GetVisible() bool { - if x != nil { - return x.Visible - } - return false -} - -var File_google_monitoring_dashboard_v1_table_proto protoreflect.FileDescriptor - -var file_google_monitoring_dashboard_v1_table_proto_rawDesc = []byte{ - 0x0a, 0x2a, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, - 0x69, 0x6e, 0x67, 0x2f, 0x64, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2f, 0x76, 0x31, - 0x2f, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x2e, - 0x64, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2e, 0x76, 0x31, 0x1a, 0x1f, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x62, - 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2c, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, - 0x2f, 0x64, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x65, - 0x74, 0x72, 0x69, 0x63, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x3a, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2f, 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x2f, 0x64, - 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x61, 0x62, 0x6c, - 0x65, 0x5f, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xdb, 0x06, 0x0a, 0x0f, 0x54, 0x69, 0x6d, 0x65, - 0x53, 0x65, 0x72, 0x69, 0x65, 0x73, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x5e, 0x0a, 0x09, 0x64, - 0x61, 0x74, 0x61, 0x5f, 0x73, 0x65, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3c, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, - 0x6e, 0x67, 0x2e, 0x64, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2e, 0x76, 0x31, 0x2e, - 0x54, 0x69, 0x6d, 0x65, 0x53, 0x65, 0x72, 0x69, 0x65, 0x73, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x2e, - 0x54, 0x61, 0x62, 0x6c, 0x65, 0x44, 0x61, 0x74, 0x61, 0x53, 0x65, 0x74, 0x42, 0x03, 0xe0, 0x41, - 0x02, 0x52, 0x08, 0x64, 0x61, 0x74, 0x61, 0x53, 0x65, 0x74, 0x73, 0x12, 0x7b, 0x0a, 0x14, 0x6d, - 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x76, 0x69, 0x73, 0x75, 0x61, 0x6c, 0x69, 0x7a, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x43, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x64, 0x61, - 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x53, - 0x65, 0x72, 0x69, 0x65, 0x73, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x2e, 0x4d, 0x65, 0x74, 0x72, 0x69, - 0x63, 0x56, 0x69, 0x73, 0x75, 0x61, 0x6c, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x03, - 0xe0, 0x41, 0x01, 0x52, 0x13, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x56, 0x69, 0x73, 0x75, 0x61, - 0x6c, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x6c, 0x0a, 0x0f, 0x63, 0x6f, 0x6c, 0x75, - 0x6d, 0x6e, 0x5f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x3e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x6d, 0x6f, 0x6e, 0x69, 0x74, - 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x64, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2e, - 0x76, 0x31, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x53, 0x65, 0x72, 0x69, 0x65, 0x73, 0x54, 0x61, 0x62, - 0x6c, 0x65, 0x2e, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, - 0x73, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0e, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x53, 0x65, - 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x1a, 0xdc, 0x02, 0x0a, 0x0c, 0x54, 0x61, 0x62, 0x6c, 0x65, - 0x44, 0x61, 0x74, 0x61, 0x53, 0x65, 0x74, 0x12, 0x60, 0x0a, 0x11, 0x74, 0x69, 0x6d, 0x65, 0x5f, - 0x73, 0x65, 0x72, 0x69, 0x65, 0x73, 0x5f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x6d, 0x6f, 0x6e, 0x69, - 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x64, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, - 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x53, 0x65, 0x72, 0x69, 0x65, 0x73, 0x51, 0x75, - 0x65, 0x72, 0x79, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x0f, 0x74, 0x69, 0x6d, 0x65, 0x53, 0x65, - 0x72, 0x69, 0x65, 0x73, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x2a, 0x0a, 0x0e, 0x74, 0x61, 0x62, - 0x6c, 0x65, 0x5f, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0d, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x54, 0x65, 0x6d, - 0x70, 0x6c, 0x61, 0x74, 0x65, 0x12, 0x50, 0x0a, 0x14, 0x6d, 0x69, 0x6e, 0x5f, 0x61, 0x6c, 0x69, - 0x67, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x03, - 0xe0, 0x41, 0x01, 0x52, 0x12, 0x6d, 0x69, 0x6e, 0x41, 0x6c, 0x69, 0x67, 0x6e, 0x6d, 0x65, 0x6e, - 0x74, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x12, 0x6c, 0x0a, 0x15, 0x74, 0x61, 0x62, 0x6c, 0x65, - 0x5f, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x64, 0x61, 0x73, 0x68, 0x62, - 0x6f, 0x61, 0x72, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x44, 0x69, 0x73, - 0x70, 0x6c, 0x61, 0x79, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x03, 0xe0, 0x41, 0x01, - 0x52, 0x13, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x44, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x4f, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x4c, 0x0a, 0x0e, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x53, - 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x1b, 0x0a, 0x06, 0x63, 0x6f, 0x6c, 0x75, 0x6d, - 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x06, 0x63, 0x6f, - 0x6c, 0x75, 0x6d, 0x6e, 0x12, 0x1d, 0x0a, 0x07, 0x76, 0x69, 0x73, 0x69, 0x62, 0x6c, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x08, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x07, 0x76, 0x69, 0x73, 0x69, - 0x62, 0x6c, 0x65, 0x22, 0x50, 0x0a, 0x13, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x56, 0x69, 0x73, - 0x75, 0x61, 0x6c, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x24, 0x0a, 0x20, 0x4d, 0x45, - 0x54, 0x52, 0x49, 0x43, 0x5f, 0x56, 0x49, 0x53, 0x55, 0x41, 0x4c, 0x49, 0x5a, 0x41, 0x54, 0x49, - 0x4f, 0x4e, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, - 0x12, 0x0a, 0x0a, 0x06, 0x4e, 0x55, 0x4d, 0x42, 0x45, 0x52, 0x10, 0x01, 0x12, 0x07, 0x0a, 0x03, - 0x42, 0x41, 0x52, 0x10, 0x02, 0x42, 0xf3, 0x01, 0x0a, 0x22, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x2e, - 0x64, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2e, 0x76, 0x31, 0x42, 0x0a, 0x54, 0x61, - 0x62, 0x6c, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x46, 0x63, 0x6c, 0x6f, 0x75, - 0x64, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x2f, - 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x2f, 0x64, 0x61, 0x73, 0x68, 0x62, - 0x6f, 0x61, 0x72, 0x64, 0x2f, 0x61, 0x70, 0x69, 0x76, 0x31, 0x2f, 0x64, 0x61, 0x73, 0x68, 0x62, - 0x6f, 0x61, 0x72, 0x64, 0x70, 0x62, 0x3b, 0x64, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, - 0x70, 0x62, 0xaa, 0x02, 0x24, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x43, 0x6c, 0x6f, 0x75, - 0x64, 0x2e, 0x4d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x44, 0x61, 0x73, - 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x24, 0x47, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x5c, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x5c, 0x4d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, - 0x69, 0x6e, 0x67, 0x5c, 0x44, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x5c, 0x56, 0x31, - 0xea, 0x02, 0x28, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x3a, 0x3a, 0x43, 0x6c, 0x6f, 0x75, 0x64, - 0x3a, 0x3a, 0x4d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x3a, 0x3a, 0x44, 0x61, - 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x33, -} - -var ( - file_google_monitoring_dashboard_v1_table_proto_rawDescOnce sync.Once - file_google_monitoring_dashboard_v1_table_proto_rawDescData = file_google_monitoring_dashboard_v1_table_proto_rawDesc -) - -func file_google_monitoring_dashboard_v1_table_proto_rawDescGZIP() []byte { - file_google_monitoring_dashboard_v1_table_proto_rawDescOnce.Do(func() { - file_google_monitoring_dashboard_v1_table_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_monitoring_dashboard_v1_table_proto_rawDescData) - }) - return file_google_monitoring_dashboard_v1_table_proto_rawDescData -} - -var file_google_monitoring_dashboard_v1_table_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_google_monitoring_dashboard_v1_table_proto_msgTypes = make([]protoimpl.MessageInfo, 3) -var file_google_monitoring_dashboard_v1_table_proto_goTypes = []any{ - (TimeSeriesTable_MetricVisualization)(0), // 0: google.monitoring.dashboard.v1.TimeSeriesTable.MetricVisualization - (*TimeSeriesTable)(nil), // 1: google.monitoring.dashboard.v1.TimeSeriesTable - (*TimeSeriesTable_TableDataSet)(nil), // 2: google.monitoring.dashboard.v1.TimeSeriesTable.TableDataSet - (*TimeSeriesTable_ColumnSettings)(nil), // 3: google.monitoring.dashboard.v1.TimeSeriesTable.ColumnSettings - (*TimeSeriesQuery)(nil), // 4: google.monitoring.dashboard.v1.TimeSeriesQuery - (*durationpb.Duration)(nil), // 5: google.protobuf.Duration - (*TableDisplayOptions)(nil), // 6: google.monitoring.dashboard.v1.TableDisplayOptions -} -var file_google_monitoring_dashboard_v1_table_proto_depIdxs = []int32{ - 2, // 0: google.monitoring.dashboard.v1.TimeSeriesTable.data_sets:type_name -> google.monitoring.dashboard.v1.TimeSeriesTable.TableDataSet - 0, // 1: google.monitoring.dashboard.v1.TimeSeriesTable.metric_visualization:type_name -> google.monitoring.dashboard.v1.TimeSeriesTable.MetricVisualization - 3, // 2: google.monitoring.dashboard.v1.TimeSeriesTable.column_settings:type_name -> google.monitoring.dashboard.v1.TimeSeriesTable.ColumnSettings - 4, // 3: google.monitoring.dashboard.v1.TimeSeriesTable.TableDataSet.time_series_query:type_name -> google.monitoring.dashboard.v1.TimeSeriesQuery - 5, // 4: google.monitoring.dashboard.v1.TimeSeriesTable.TableDataSet.min_alignment_period:type_name -> google.protobuf.Duration - 6, // 5: google.monitoring.dashboard.v1.TimeSeriesTable.TableDataSet.table_display_options:type_name -> google.monitoring.dashboard.v1.TableDisplayOptions - 6, // [6:6] is the sub-list for method output_type - 6, // [6:6] is the sub-list for method input_type - 6, // [6:6] is the sub-list for extension type_name - 6, // [6:6] is the sub-list for extension extendee - 0, // [0:6] is the sub-list for field type_name -} - -func init() { file_google_monitoring_dashboard_v1_table_proto_init() } -func file_google_monitoring_dashboard_v1_table_proto_init() { - if File_google_monitoring_dashboard_v1_table_proto != nil { - return - } - file_google_monitoring_dashboard_v1_metrics_proto_init() - file_google_monitoring_dashboard_v1_table_display_options_proto_init() - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_google_monitoring_dashboard_v1_table_proto_rawDesc, - NumEnums: 1, - NumMessages: 3, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_google_monitoring_dashboard_v1_table_proto_goTypes, - DependencyIndexes: file_google_monitoring_dashboard_v1_table_proto_depIdxs, - EnumInfos: file_google_monitoring_dashboard_v1_table_proto_enumTypes, - MessageInfos: file_google_monitoring_dashboard_v1_table_proto_msgTypes, - }.Build() - File_google_monitoring_dashboard_v1_table_proto = out.File - file_google_monitoring_dashboard_v1_table_proto_rawDesc = nil - file_google_monitoring_dashboard_v1_table_proto_goTypes = nil - file_google_monitoring_dashboard_v1_table_proto_depIdxs = nil -} diff --git a/vendor/cloud.google.com/go/monitoring/dashboard/apiv1/dashboardpb/table_display_options.pb.go b/vendor/cloud.google.com/go/monitoring/dashboard/apiv1/dashboardpb/table_display_options.pb.go deleted file mode 100644 index 91dc877170..0000000000 --- a/vendor/cloud.google.com/go/monitoring/dashboard/apiv1/dashboardpb/table_display_options.pb.go +++ /dev/null @@ -1,170 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.35.2 -// protoc v4.25.7 -// source: google/monitoring/dashboard/v1/table_display_options.proto - -package dashboardpb - -import ( - _ "google.golang.org/genproto/googleapis/api/annotations" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// Table display options that can be reused. -type TableDisplayOptions struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Optional. This field is unused and has been replaced by - // TimeSeriesTable.column_settings - // - // Deprecated: Marked as deprecated in google/monitoring/dashboard/v1/table_display_options.proto. - ShownColumns []string `protobuf:"bytes,1,rep,name=shown_columns,json=shownColumns,proto3" json:"shown_columns,omitempty"` -} - -func (x *TableDisplayOptions) Reset() { - *x = TableDisplayOptions{} - mi := &file_google_monitoring_dashboard_v1_table_display_options_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *TableDisplayOptions) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*TableDisplayOptions) ProtoMessage() {} - -func (x *TableDisplayOptions) ProtoReflect() protoreflect.Message { - mi := &file_google_monitoring_dashboard_v1_table_display_options_proto_msgTypes[0] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use TableDisplayOptions.ProtoReflect.Descriptor instead. -func (*TableDisplayOptions) Descriptor() ([]byte, []int) { - return file_google_monitoring_dashboard_v1_table_display_options_proto_rawDescGZIP(), []int{0} -} - -// Deprecated: Marked as deprecated in google/monitoring/dashboard/v1/table_display_options.proto. -func (x *TableDisplayOptions) GetShownColumns() []string { - if x != nil { - return x.ShownColumns - } - return nil -} - -var File_google_monitoring_dashboard_v1_table_display_options_proto protoreflect.FileDescriptor - -var file_google_monitoring_dashboard_v1_table_display_options_proto_rawDesc = []byte{ - 0x0a, 0x3a, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, - 0x69, 0x6e, 0x67, 0x2f, 0x64, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2f, 0x76, 0x31, - 0x2f, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x5f, 0x6f, - 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x2e, - 0x64, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2e, 0x76, 0x31, 0x1a, 0x1f, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x62, - 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x41, 0x0a, - 0x13, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x44, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x4f, 0x70, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x2a, 0x0a, 0x0d, 0x73, 0x68, 0x6f, 0x77, 0x6e, 0x5f, 0x63, 0x6f, - 0x6c, 0x75, 0x6d, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x42, 0x05, 0xe0, 0x41, 0x01, - 0x18, 0x01, 0x52, 0x0c, 0x73, 0x68, 0x6f, 0x77, 0x6e, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x73, - 0x42, 0x81, 0x02, 0x0a, 0x22, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x64, 0x61, 0x73, 0x68, 0x62, - 0x6f, 0x61, 0x72, 0x64, 0x2e, 0x76, 0x31, 0x42, 0x18, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x44, 0x69, - 0x73, 0x70, 0x6c, 0x61, 0x79, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x50, 0x72, 0x6f, 0x74, - 0x6f, 0x50, 0x01, 0x5a, 0x46, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x2f, 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, - 0x69, 0x6e, 0x67, 0x2f, 0x64, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2f, 0x61, 0x70, - 0x69, 0x76, 0x31, 0x2f, 0x64, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x70, 0x62, 0x3b, - 0x64, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x70, 0x62, 0xaa, 0x02, 0x24, 0x47, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x4d, 0x6f, 0x6e, 0x69, 0x74, - 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x44, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2e, - 0x56, 0x31, 0xca, 0x02, 0x24, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x5c, 0x43, 0x6c, 0x6f, 0x75, - 0x64, 0x5c, 0x4d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x5c, 0x44, 0x61, 0x73, - 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x5c, 0x56, 0x31, 0xea, 0x02, 0x28, 0x47, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x3a, 0x3a, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x3a, 0x3a, 0x4d, 0x6f, 0x6e, 0x69, 0x74, - 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x3a, 0x3a, 0x44, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, - 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_google_monitoring_dashboard_v1_table_display_options_proto_rawDescOnce sync.Once - file_google_monitoring_dashboard_v1_table_display_options_proto_rawDescData = file_google_monitoring_dashboard_v1_table_display_options_proto_rawDesc -) - -func file_google_monitoring_dashboard_v1_table_display_options_proto_rawDescGZIP() []byte { - file_google_monitoring_dashboard_v1_table_display_options_proto_rawDescOnce.Do(func() { - file_google_monitoring_dashboard_v1_table_display_options_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_monitoring_dashboard_v1_table_display_options_proto_rawDescData) - }) - return file_google_monitoring_dashboard_v1_table_display_options_proto_rawDescData -} - -var file_google_monitoring_dashboard_v1_table_display_options_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_google_monitoring_dashboard_v1_table_display_options_proto_goTypes = []any{ - (*TableDisplayOptions)(nil), // 0: google.monitoring.dashboard.v1.TableDisplayOptions -} -var file_google_monitoring_dashboard_v1_table_display_options_proto_depIdxs = []int32{ - 0, // [0:0] is the sub-list for method output_type - 0, // [0:0] is the sub-list for method input_type - 0, // [0:0] is the sub-list for extension type_name - 0, // [0:0] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name -} - -func init() { file_google_monitoring_dashboard_v1_table_display_options_proto_init() } -func file_google_monitoring_dashboard_v1_table_display_options_proto_init() { - if File_google_monitoring_dashboard_v1_table_display_options_proto != nil { - return - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_google_monitoring_dashboard_v1_table_display_options_proto_rawDesc, - NumEnums: 0, - NumMessages: 1, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_google_monitoring_dashboard_v1_table_display_options_proto_goTypes, - DependencyIndexes: file_google_monitoring_dashboard_v1_table_display_options_proto_depIdxs, - MessageInfos: file_google_monitoring_dashboard_v1_table_display_options_proto_msgTypes, - }.Build() - File_google_monitoring_dashboard_v1_table_display_options_proto = out.File - file_google_monitoring_dashboard_v1_table_display_options_proto_rawDesc = nil - file_google_monitoring_dashboard_v1_table_display_options_proto_goTypes = nil - file_google_monitoring_dashboard_v1_table_display_options_proto_depIdxs = nil -} diff --git a/vendor/cloud.google.com/go/monitoring/dashboard/apiv1/dashboardpb/text.pb.go b/vendor/cloud.google.com/go/monitoring/dashboard/apiv1/dashboardpb/text.pb.go deleted file mode 100644 index 685bac074c..0000000000 --- a/vendor/cloud.google.com/go/monitoring/dashboard/apiv1/dashboardpb/text.pb.go +++ /dev/null @@ -1,780 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.35.2 -// protoc v4.25.7 -// source: google/monitoring/dashboard/v1/text.proto - -package dashboardpb - -import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// The format type of the text content. -type Text_Format int32 - -const ( - // Format is unspecified. Defaults to MARKDOWN. - Text_FORMAT_UNSPECIFIED Text_Format = 0 - // The text contains Markdown formatting. - Text_MARKDOWN Text_Format = 1 - // The text contains no special formatting. - Text_RAW Text_Format = 2 -) - -// Enum value maps for Text_Format. -var ( - Text_Format_name = map[int32]string{ - 0: "FORMAT_UNSPECIFIED", - 1: "MARKDOWN", - 2: "RAW", - } - Text_Format_value = map[string]int32{ - "FORMAT_UNSPECIFIED": 0, - "MARKDOWN": 1, - "RAW": 2, - } -) - -func (x Text_Format) Enum() *Text_Format { - p := new(Text_Format) - *p = x - return p -} - -func (x Text_Format) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (Text_Format) Descriptor() protoreflect.EnumDescriptor { - return file_google_monitoring_dashboard_v1_text_proto_enumTypes[0].Descriptor() -} - -func (Text_Format) Type() protoreflect.EnumType { - return &file_google_monitoring_dashboard_v1_text_proto_enumTypes[0] -} - -func (x Text_Format) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use Text_Format.Descriptor instead. -func (Text_Format) EnumDescriptor() ([]byte, []int) { - return file_google_monitoring_dashboard_v1_text_proto_rawDescGZIP(), []int{0, 0} -} - -// The horizontal alignment of both the title and content on a text widget -type Text_TextStyle_HorizontalAlignment int32 - -const ( - // No horizontal alignment specified, will default to H_LEFT - Text_TextStyle_HORIZONTAL_ALIGNMENT_UNSPECIFIED Text_TextStyle_HorizontalAlignment = 0 - // Left-align - Text_TextStyle_H_LEFT Text_TextStyle_HorizontalAlignment = 1 - // Center-align - Text_TextStyle_H_CENTER Text_TextStyle_HorizontalAlignment = 2 - // Right-align - Text_TextStyle_H_RIGHT Text_TextStyle_HorizontalAlignment = 3 -) - -// Enum value maps for Text_TextStyle_HorizontalAlignment. -var ( - Text_TextStyle_HorizontalAlignment_name = map[int32]string{ - 0: "HORIZONTAL_ALIGNMENT_UNSPECIFIED", - 1: "H_LEFT", - 2: "H_CENTER", - 3: "H_RIGHT", - } - Text_TextStyle_HorizontalAlignment_value = map[string]int32{ - "HORIZONTAL_ALIGNMENT_UNSPECIFIED": 0, - "H_LEFT": 1, - "H_CENTER": 2, - "H_RIGHT": 3, - } -) - -func (x Text_TextStyle_HorizontalAlignment) Enum() *Text_TextStyle_HorizontalAlignment { - p := new(Text_TextStyle_HorizontalAlignment) - *p = x - return p -} - -func (x Text_TextStyle_HorizontalAlignment) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (Text_TextStyle_HorizontalAlignment) Descriptor() protoreflect.EnumDescriptor { - return file_google_monitoring_dashboard_v1_text_proto_enumTypes[1].Descriptor() -} - -func (Text_TextStyle_HorizontalAlignment) Type() protoreflect.EnumType { - return &file_google_monitoring_dashboard_v1_text_proto_enumTypes[1] -} - -func (x Text_TextStyle_HorizontalAlignment) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use Text_TextStyle_HorizontalAlignment.Descriptor instead. -func (Text_TextStyle_HorizontalAlignment) EnumDescriptor() ([]byte, []int) { - return file_google_monitoring_dashboard_v1_text_proto_rawDescGZIP(), []int{0, 0, 0} -} - -// The vertical alignment of both the title and content on a text widget -type Text_TextStyle_VerticalAlignment int32 - -const ( - // No vertical alignment specified, will default to V_TOP - Text_TextStyle_VERTICAL_ALIGNMENT_UNSPECIFIED Text_TextStyle_VerticalAlignment = 0 - // Top-align - Text_TextStyle_V_TOP Text_TextStyle_VerticalAlignment = 1 - // Center-align - Text_TextStyle_V_CENTER Text_TextStyle_VerticalAlignment = 2 - // Bottom-align - Text_TextStyle_V_BOTTOM Text_TextStyle_VerticalAlignment = 3 -) - -// Enum value maps for Text_TextStyle_VerticalAlignment. -var ( - Text_TextStyle_VerticalAlignment_name = map[int32]string{ - 0: "VERTICAL_ALIGNMENT_UNSPECIFIED", - 1: "V_TOP", - 2: "V_CENTER", - 3: "V_BOTTOM", - } - Text_TextStyle_VerticalAlignment_value = map[string]int32{ - "VERTICAL_ALIGNMENT_UNSPECIFIED": 0, - "V_TOP": 1, - "V_CENTER": 2, - "V_BOTTOM": 3, - } -) - -func (x Text_TextStyle_VerticalAlignment) Enum() *Text_TextStyle_VerticalAlignment { - p := new(Text_TextStyle_VerticalAlignment) - *p = x - return p -} - -func (x Text_TextStyle_VerticalAlignment) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (Text_TextStyle_VerticalAlignment) Descriptor() protoreflect.EnumDescriptor { - return file_google_monitoring_dashboard_v1_text_proto_enumTypes[2].Descriptor() -} - -func (Text_TextStyle_VerticalAlignment) Type() protoreflect.EnumType { - return &file_google_monitoring_dashboard_v1_text_proto_enumTypes[2] -} - -func (x Text_TextStyle_VerticalAlignment) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use Text_TextStyle_VerticalAlignment.Descriptor instead. -func (Text_TextStyle_VerticalAlignment) EnumDescriptor() ([]byte, []int) { - return file_google_monitoring_dashboard_v1_text_proto_rawDescGZIP(), []int{0, 0, 1} -} - -// Specifies padding size around a text widget -type Text_TextStyle_PaddingSize int32 - -const ( - // No padding size specified, will default to P_EXTRA_SMALL - Text_TextStyle_PADDING_SIZE_UNSPECIFIED Text_TextStyle_PaddingSize = 0 - // Extra small padding - Text_TextStyle_P_EXTRA_SMALL Text_TextStyle_PaddingSize = 1 - // Small padding - Text_TextStyle_P_SMALL Text_TextStyle_PaddingSize = 2 - // Medium padding - Text_TextStyle_P_MEDIUM Text_TextStyle_PaddingSize = 3 - // Large padding - Text_TextStyle_P_LARGE Text_TextStyle_PaddingSize = 4 - // Extra large padding - Text_TextStyle_P_EXTRA_LARGE Text_TextStyle_PaddingSize = 5 -) - -// Enum value maps for Text_TextStyle_PaddingSize. -var ( - Text_TextStyle_PaddingSize_name = map[int32]string{ - 0: "PADDING_SIZE_UNSPECIFIED", - 1: "P_EXTRA_SMALL", - 2: "P_SMALL", - 3: "P_MEDIUM", - 4: "P_LARGE", - 5: "P_EXTRA_LARGE", - } - Text_TextStyle_PaddingSize_value = map[string]int32{ - "PADDING_SIZE_UNSPECIFIED": 0, - "P_EXTRA_SMALL": 1, - "P_SMALL": 2, - "P_MEDIUM": 3, - "P_LARGE": 4, - "P_EXTRA_LARGE": 5, - } -) - -func (x Text_TextStyle_PaddingSize) Enum() *Text_TextStyle_PaddingSize { - p := new(Text_TextStyle_PaddingSize) - *p = x - return p -} - -func (x Text_TextStyle_PaddingSize) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (Text_TextStyle_PaddingSize) Descriptor() protoreflect.EnumDescriptor { - return file_google_monitoring_dashboard_v1_text_proto_enumTypes[3].Descriptor() -} - -func (Text_TextStyle_PaddingSize) Type() protoreflect.EnumType { - return &file_google_monitoring_dashboard_v1_text_proto_enumTypes[3] -} - -func (x Text_TextStyle_PaddingSize) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use Text_TextStyle_PaddingSize.Descriptor instead. -func (Text_TextStyle_PaddingSize) EnumDescriptor() ([]byte, []int) { - return file_google_monitoring_dashboard_v1_text_proto_rawDescGZIP(), []int{0, 0, 2} -} - -// Specifies a font size for the title and content of a text widget -type Text_TextStyle_FontSize int32 - -const ( - // No font size specified, will default to FS_LARGE - Text_TextStyle_FONT_SIZE_UNSPECIFIED Text_TextStyle_FontSize = 0 - // Extra small font size - Text_TextStyle_FS_EXTRA_SMALL Text_TextStyle_FontSize = 1 - // Small font size - Text_TextStyle_FS_SMALL Text_TextStyle_FontSize = 2 - // Medium font size - Text_TextStyle_FS_MEDIUM Text_TextStyle_FontSize = 3 - // Large font size - Text_TextStyle_FS_LARGE Text_TextStyle_FontSize = 4 - // Extra large font size - Text_TextStyle_FS_EXTRA_LARGE Text_TextStyle_FontSize = 5 -) - -// Enum value maps for Text_TextStyle_FontSize. -var ( - Text_TextStyle_FontSize_name = map[int32]string{ - 0: "FONT_SIZE_UNSPECIFIED", - 1: "FS_EXTRA_SMALL", - 2: "FS_SMALL", - 3: "FS_MEDIUM", - 4: "FS_LARGE", - 5: "FS_EXTRA_LARGE", - } - Text_TextStyle_FontSize_value = map[string]int32{ - "FONT_SIZE_UNSPECIFIED": 0, - "FS_EXTRA_SMALL": 1, - "FS_SMALL": 2, - "FS_MEDIUM": 3, - "FS_LARGE": 4, - "FS_EXTRA_LARGE": 5, - } -) - -func (x Text_TextStyle_FontSize) Enum() *Text_TextStyle_FontSize { - p := new(Text_TextStyle_FontSize) - *p = x - return p -} - -func (x Text_TextStyle_FontSize) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (Text_TextStyle_FontSize) Descriptor() protoreflect.EnumDescriptor { - return file_google_monitoring_dashboard_v1_text_proto_enumTypes[4].Descriptor() -} - -func (Text_TextStyle_FontSize) Type() protoreflect.EnumType { - return &file_google_monitoring_dashboard_v1_text_proto_enumTypes[4] -} - -func (x Text_TextStyle_FontSize) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use Text_TextStyle_FontSize.Descriptor instead. -func (Text_TextStyle_FontSize) EnumDescriptor() ([]byte, []int) { - return file_google_monitoring_dashboard_v1_text_proto_rawDescGZIP(), []int{0, 0, 3} -} - -// Specifies where a visual pointer is placed on a text widget (also -// sometimes called a "tail") -type Text_TextStyle_PointerLocation int32 - -const ( - // No visual pointer - Text_TextStyle_POINTER_LOCATION_UNSPECIFIED Text_TextStyle_PointerLocation = 0 - // Placed in the middle of the top of the widget - Text_TextStyle_PL_TOP Text_TextStyle_PointerLocation = 1 - // Placed in the middle of the right side of the widget - Text_TextStyle_PL_RIGHT Text_TextStyle_PointerLocation = 2 - // Placed in the middle of the bottom of the widget - Text_TextStyle_PL_BOTTOM Text_TextStyle_PointerLocation = 3 - // Placed in the middle of the left side of the widget - Text_TextStyle_PL_LEFT Text_TextStyle_PointerLocation = 4 - // Placed on the left side of the top of the widget - Text_TextStyle_PL_TOP_LEFT Text_TextStyle_PointerLocation = 5 - // Placed on the right side of the top of the widget - Text_TextStyle_PL_TOP_RIGHT Text_TextStyle_PointerLocation = 6 - // Placed on the top of the right side of the widget - Text_TextStyle_PL_RIGHT_TOP Text_TextStyle_PointerLocation = 7 - // Placed on the bottom of the right side of the widget - Text_TextStyle_PL_RIGHT_BOTTOM Text_TextStyle_PointerLocation = 8 - // Placed on the right side of the bottom of the widget - Text_TextStyle_PL_BOTTOM_RIGHT Text_TextStyle_PointerLocation = 9 - // Placed on the left side of the bottom of the widget - Text_TextStyle_PL_BOTTOM_LEFT Text_TextStyle_PointerLocation = 10 - // Placed on the bottom of the left side of the widget - Text_TextStyle_PL_LEFT_BOTTOM Text_TextStyle_PointerLocation = 11 - // Placed on the top of the left side of the widget - Text_TextStyle_PL_LEFT_TOP Text_TextStyle_PointerLocation = 12 -) - -// Enum value maps for Text_TextStyle_PointerLocation. -var ( - Text_TextStyle_PointerLocation_name = map[int32]string{ - 0: "POINTER_LOCATION_UNSPECIFIED", - 1: "PL_TOP", - 2: "PL_RIGHT", - 3: "PL_BOTTOM", - 4: "PL_LEFT", - 5: "PL_TOP_LEFT", - 6: "PL_TOP_RIGHT", - 7: "PL_RIGHT_TOP", - 8: "PL_RIGHT_BOTTOM", - 9: "PL_BOTTOM_RIGHT", - 10: "PL_BOTTOM_LEFT", - 11: "PL_LEFT_BOTTOM", - 12: "PL_LEFT_TOP", - } - Text_TextStyle_PointerLocation_value = map[string]int32{ - "POINTER_LOCATION_UNSPECIFIED": 0, - "PL_TOP": 1, - "PL_RIGHT": 2, - "PL_BOTTOM": 3, - "PL_LEFT": 4, - "PL_TOP_LEFT": 5, - "PL_TOP_RIGHT": 6, - "PL_RIGHT_TOP": 7, - "PL_RIGHT_BOTTOM": 8, - "PL_BOTTOM_RIGHT": 9, - "PL_BOTTOM_LEFT": 10, - "PL_LEFT_BOTTOM": 11, - "PL_LEFT_TOP": 12, - } -) - -func (x Text_TextStyle_PointerLocation) Enum() *Text_TextStyle_PointerLocation { - p := new(Text_TextStyle_PointerLocation) - *p = x - return p -} - -func (x Text_TextStyle_PointerLocation) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (Text_TextStyle_PointerLocation) Descriptor() protoreflect.EnumDescriptor { - return file_google_monitoring_dashboard_v1_text_proto_enumTypes[5].Descriptor() -} - -func (Text_TextStyle_PointerLocation) Type() protoreflect.EnumType { - return &file_google_monitoring_dashboard_v1_text_proto_enumTypes[5] -} - -func (x Text_TextStyle_PointerLocation) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use Text_TextStyle_PointerLocation.Descriptor instead. -func (Text_TextStyle_PointerLocation) EnumDescriptor() ([]byte, []int) { - return file_google_monitoring_dashboard_v1_text_proto_rawDescGZIP(), []int{0, 0, 4} -} - -// A widget that displays textual content. -type Text struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The text content to be displayed. - Content string `protobuf:"bytes,1,opt,name=content,proto3" json:"content,omitempty"` - // How the text content is formatted. - Format Text_Format `protobuf:"varint,2,opt,name=format,proto3,enum=google.monitoring.dashboard.v1.Text_Format" json:"format,omitempty"` - // How the text is styled - Style *Text_TextStyle `protobuf:"bytes,3,opt,name=style,proto3" json:"style,omitempty"` -} - -func (x *Text) Reset() { - *x = Text{} - mi := &file_google_monitoring_dashboard_v1_text_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *Text) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Text) ProtoMessage() {} - -func (x *Text) ProtoReflect() protoreflect.Message { - mi := &file_google_monitoring_dashboard_v1_text_proto_msgTypes[0] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Text.ProtoReflect.Descriptor instead. -func (*Text) Descriptor() ([]byte, []int) { - return file_google_monitoring_dashboard_v1_text_proto_rawDescGZIP(), []int{0} -} - -func (x *Text) GetContent() string { - if x != nil { - return x.Content - } - return "" -} - -func (x *Text) GetFormat() Text_Format { - if x != nil { - return x.Format - } - return Text_FORMAT_UNSPECIFIED -} - -func (x *Text) GetStyle() *Text_TextStyle { - if x != nil { - return x.Style - } - return nil -} - -// Properties that determine how the title and content are styled -type Text_TextStyle struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The background color as a hex string. "#RRGGBB" or "#RGB" - BackgroundColor string `protobuf:"bytes,1,opt,name=background_color,json=backgroundColor,proto3" json:"background_color,omitempty"` - // The text color as a hex string. "#RRGGBB" or "#RGB" - TextColor string `protobuf:"bytes,2,opt,name=text_color,json=textColor,proto3" json:"text_color,omitempty"` - // The horizontal alignment of both the title and content - HorizontalAlignment Text_TextStyle_HorizontalAlignment `protobuf:"varint,3,opt,name=horizontal_alignment,json=horizontalAlignment,proto3,enum=google.monitoring.dashboard.v1.Text_TextStyle_HorizontalAlignment" json:"horizontal_alignment,omitempty"` - // The vertical alignment of both the title and content - VerticalAlignment Text_TextStyle_VerticalAlignment `protobuf:"varint,4,opt,name=vertical_alignment,json=verticalAlignment,proto3,enum=google.monitoring.dashboard.v1.Text_TextStyle_VerticalAlignment" json:"vertical_alignment,omitempty"` - // The amount of padding around the widget - Padding Text_TextStyle_PaddingSize `protobuf:"varint,5,opt,name=padding,proto3,enum=google.monitoring.dashboard.v1.Text_TextStyle_PaddingSize" json:"padding,omitempty"` - // Font sizes for both the title and content. The title will still be larger - // relative to the content. - FontSize Text_TextStyle_FontSize `protobuf:"varint,6,opt,name=font_size,json=fontSize,proto3,enum=google.monitoring.dashboard.v1.Text_TextStyle_FontSize" json:"font_size,omitempty"` - // The pointer location for this widget (also sometimes called a "tail") - PointerLocation Text_TextStyle_PointerLocation `protobuf:"varint,7,opt,name=pointer_location,json=pointerLocation,proto3,enum=google.monitoring.dashboard.v1.Text_TextStyle_PointerLocation" json:"pointer_location,omitempty"` -} - -func (x *Text_TextStyle) Reset() { - *x = Text_TextStyle{} - mi := &file_google_monitoring_dashboard_v1_text_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *Text_TextStyle) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Text_TextStyle) ProtoMessage() {} - -func (x *Text_TextStyle) ProtoReflect() protoreflect.Message { - mi := &file_google_monitoring_dashboard_v1_text_proto_msgTypes[1] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Text_TextStyle.ProtoReflect.Descriptor instead. -func (*Text_TextStyle) Descriptor() ([]byte, []int) { - return file_google_monitoring_dashboard_v1_text_proto_rawDescGZIP(), []int{0, 0} -} - -func (x *Text_TextStyle) GetBackgroundColor() string { - if x != nil { - return x.BackgroundColor - } - return "" -} - -func (x *Text_TextStyle) GetTextColor() string { - if x != nil { - return x.TextColor - } - return "" -} - -func (x *Text_TextStyle) GetHorizontalAlignment() Text_TextStyle_HorizontalAlignment { - if x != nil { - return x.HorizontalAlignment - } - return Text_TextStyle_HORIZONTAL_ALIGNMENT_UNSPECIFIED -} - -func (x *Text_TextStyle) GetVerticalAlignment() Text_TextStyle_VerticalAlignment { - if x != nil { - return x.VerticalAlignment - } - return Text_TextStyle_VERTICAL_ALIGNMENT_UNSPECIFIED -} - -func (x *Text_TextStyle) GetPadding() Text_TextStyle_PaddingSize { - if x != nil { - return x.Padding - } - return Text_TextStyle_PADDING_SIZE_UNSPECIFIED -} - -func (x *Text_TextStyle) GetFontSize() Text_TextStyle_FontSize { - if x != nil { - return x.FontSize - } - return Text_TextStyle_FONT_SIZE_UNSPECIFIED -} - -func (x *Text_TextStyle) GetPointerLocation() Text_TextStyle_PointerLocation { - if x != nil { - return x.PointerLocation - } - return Text_TextStyle_POINTER_LOCATION_UNSPECIFIED -} - -var File_google_monitoring_dashboard_v1_text_proto protoreflect.FileDescriptor - -var file_google_monitoring_dashboard_v1_text_proto_rawDesc = []byte{ - 0x0a, 0x29, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, - 0x69, 0x6e, 0x67, 0x2f, 0x64, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2f, 0x76, 0x31, - 0x2f, 0x74, 0x65, 0x78, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x64, - 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2e, 0x76, 0x31, 0x22, 0xf8, 0x0b, 0x0a, 0x04, - 0x54, 0x65, 0x78, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x43, - 0x0a, 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2b, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, - 0x6e, 0x67, 0x2e, 0x64, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2e, 0x76, 0x31, 0x2e, - 0x54, 0x65, 0x78, 0x74, 0x2e, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x52, 0x06, 0x66, 0x6f, 0x72, - 0x6d, 0x61, 0x74, 0x12, 0x44, 0x0a, 0x05, 0x73, 0x74, 0x79, 0x6c, 0x65, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x6d, 0x6f, 0x6e, 0x69, - 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x64, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, - 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x65, 0x78, 0x74, 0x2e, 0x54, 0x65, 0x78, 0x74, 0x53, 0x74, 0x79, - 0x6c, 0x65, 0x52, 0x05, 0x73, 0x74, 0x79, 0x6c, 0x65, 0x1a, 0x91, 0x0a, 0x0a, 0x09, 0x54, 0x65, - 0x78, 0x74, 0x53, 0x74, 0x79, 0x6c, 0x65, 0x12, 0x29, 0x0a, 0x10, 0x62, 0x61, 0x63, 0x6b, 0x67, - 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0f, 0x62, 0x61, 0x63, 0x6b, 0x67, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x43, 0x6f, 0x6c, - 0x6f, 0x72, 0x12, 0x1d, 0x0a, 0x0a, 0x74, 0x65, 0x78, 0x74, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x74, 0x65, 0x78, 0x74, 0x43, 0x6f, 0x6c, 0x6f, - 0x72, 0x12, 0x75, 0x0a, 0x14, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x6f, 0x6e, 0x74, 0x61, 0x6c, 0x5f, - 0x61, 0x6c, 0x69, 0x67, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, - 0x42, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, - 0x69, 0x6e, 0x67, 0x2e, 0x64, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2e, 0x76, 0x31, - 0x2e, 0x54, 0x65, 0x78, 0x74, 0x2e, 0x54, 0x65, 0x78, 0x74, 0x53, 0x74, 0x79, 0x6c, 0x65, 0x2e, - 0x48, 0x6f, 0x72, 0x69, 0x7a, 0x6f, 0x6e, 0x74, 0x61, 0x6c, 0x41, 0x6c, 0x69, 0x67, 0x6e, 0x6d, - 0x65, 0x6e, 0x74, 0x52, 0x13, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x6f, 0x6e, 0x74, 0x61, 0x6c, 0x41, - 0x6c, 0x69, 0x67, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x6f, 0x0a, 0x12, 0x76, 0x65, 0x72, 0x74, - 0x69, 0x63, 0x61, 0x6c, 0x5f, 0x61, 0x6c, 0x69, 0x67, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x0e, 0x32, 0x40, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x6d, 0x6f, - 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x64, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, - 0x72, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x65, 0x78, 0x74, 0x2e, 0x54, 0x65, 0x78, 0x74, 0x53, - 0x74, 0x79, 0x6c, 0x65, 0x2e, 0x56, 0x65, 0x72, 0x74, 0x69, 0x63, 0x61, 0x6c, 0x41, 0x6c, 0x69, - 0x67, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x11, 0x76, 0x65, 0x72, 0x74, 0x69, 0x63, 0x61, 0x6c, - 0x41, 0x6c, 0x69, 0x67, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x54, 0x0a, 0x07, 0x70, 0x61, 0x64, - 0x64, 0x69, 0x6e, 0x67, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x3a, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x64, - 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x65, 0x78, 0x74, - 0x2e, 0x54, 0x65, 0x78, 0x74, 0x53, 0x74, 0x79, 0x6c, 0x65, 0x2e, 0x50, 0x61, 0x64, 0x64, 0x69, - 0x6e, 0x67, 0x53, 0x69, 0x7a, 0x65, 0x52, 0x07, 0x70, 0x61, 0x64, 0x64, 0x69, 0x6e, 0x67, 0x12, - 0x54, 0x0a, 0x09, 0x66, 0x6f, 0x6e, 0x74, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x06, 0x20, 0x01, - 0x28, 0x0e, 0x32, 0x37, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x6d, 0x6f, 0x6e, 0x69, - 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x64, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, - 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x65, 0x78, 0x74, 0x2e, 0x54, 0x65, 0x78, 0x74, 0x53, 0x74, 0x79, - 0x6c, 0x65, 0x2e, 0x46, 0x6f, 0x6e, 0x74, 0x53, 0x69, 0x7a, 0x65, 0x52, 0x08, 0x66, 0x6f, 0x6e, - 0x74, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x69, 0x0a, 0x10, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x65, 0x72, - 0x5f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0e, 0x32, - 0x3e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, - 0x69, 0x6e, 0x67, 0x2e, 0x64, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2e, 0x76, 0x31, - 0x2e, 0x54, 0x65, 0x78, 0x74, 0x2e, 0x54, 0x65, 0x78, 0x74, 0x53, 0x74, 0x79, 0x6c, 0x65, 0x2e, - 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, - 0x0f, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x22, 0x62, 0x0a, 0x13, 0x48, 0x6f, 0x72, 0x69, 0x7a, 0x6f, 0x6e, 0x74, 0x61, 0x6c, 0x41, 0x6c, - 0x69, 0x67, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x24, 0x0a, 0x20, 0x48, 0x4f, 0x52, 0x49, 0x5a, - 0x4f, 0x4e, 0x54, 0x41, 0x4c, 0x5f, 0x41, 0x4c, 0x49, 0x47, 0x4e, 0x4d, 0x45, 0x4e, 0x54, 0x5f, - 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0a, 0x0a, - 0x06, 0x48, 0x5f, 0x4c, 0x45, 0x46, 0x54, 0x10, 0x01, 0x12, 0x0c, 0x0a, 0x08, 0x48, 0x5f, 0x43, - 0x45, 0x4e, 0x54, 0x45, 0x52, 0x10, 0x02, 0x12, 0x0b, 0x0a, 0x07, 0x48, 0x5f, 0x52, 0x49, 0x47, - 0x48, 0x54, 0x10, 0x03, 0x22, 0x5e, 0x0a, 0x11, 0x56, 0x65, 0x72, 0x74, 0x69, 0x63, 0x61, 0x6c, - 0x41, 0x6c, 0x69, 0x67, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x22, 0x0a, 0x1e, 0x56, 0x45, 0x52, - 0x54, 0x49, 0x43, 0x41, 0x4c, 0x5f, 0x41, 0x4c, 0x49, 0x47, 0x4e, 0x4d, 0x45, 0x4e, 0x54, 0x5f, - 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x09, 0x0a, - 0x05, 0x56, 0x5f, 0x54, 0x4f, 0x50, 0x10, 0x01, 0x12, 0x0c, 0x0a, 0x08, 0x56, 0x5f, 0x43, 0x45, - 0x4e, 0x54, 0x45, 0x52, 0x10, 0x02, 0x12, 0x0c, 0x0a, 0x08, 0x56, 0x5f, 0x42, 0x4f, 0x54, 0x54, - 0x4f, 0x4d, 0x10, 0x03, 0x22, 0x79, 0x0a, 0x0b, 0x50, 0x61, 0x64, 0x64, 0x69, 0x6e, 0x67, 0x53, - 0x69, 0x7a, 0x65, 0x12, 0x1c, 0x0a, 0x18, 0x50, 0x41, 0x44, 0x44, 0x49, 0x4e, 0x47, 0x5f, 0x53, - 0x49, 0x5a, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, - 0x00, 0x12, 0x11, 0x0a, 0x0d, 0x50, 0x5f, 0x45, 0x58, 0x54, 0x52, 0x41, 0x5f, 0x53, 0x4d, 0x41, - 0x4c, 0x4c, 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x50, 0x5f, 0x53, 0x4d, 0x41, 0x4c, 0x4c, 0x10, - 0x02, 0x12, 0x0c, 0x0a, 0x08, 0x50, 0x5f, 0x4d, 0x45, 0x44, 0x49, 0x55, 0x4d, 0x10, 0x03, 0x12, - 0x0b, 0x0a, 0x07, 0x50, 0x5f, 0x4c, 0x41, 0x52, 0x47, 0x45, 0x10, 0x04, 0x12, 0x11, 0x0a, 0x0d, - 0x50, 0x5f, 0x45, 0x58, 0x54, 0x52, 0x41, 0x5f, 0x4c, 0x41, 0x52, 0x47, 0x45, 0x10, 0x05, 0x22, - 0x78, 0x0a, 0x08, 0x46, 0x6f, 0x6e, 0x74, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x19, 0x0a, 0x15, 0x46, - 0x4f, 0x4e, 0x54, 0x5f, 0x53, 0x49, 0x5a, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, - 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x12, 0x0a, 0x0e, 0x46, 0x53, 0x5f, 0x45, 0x58, 0x54, - 0x52, 0x41, 0x5f, 0x53, 0x4d, 0x41, 0x4c, 0x4c, 0x10, 0x01, 0x12, 0x0c, 0x0a, 0x08, 0x46, 0x53, - 0x5f, 0x53, 0x4d, 0x41, 0x4c, 0x4c, 0x10, 0x02, 0x12, 0x0d, 0x0a, 0x09, 0x46, 0x53, 0x5f, 0x4d, - 0x45, 0x44, 0x49, 0x55, 0x4d, 0x10, 0x03, 0x12, 0x0c, 0x0a, 0x08, 0x46, 0x53, 0x5f, 0x4c, 0x41, - 0x52, 0x47, 0x45, 0x10, 0x04, 0x12, 0x12, 0x0a, 0x0e, 0x46, 0x53, 0x5f, 0x45, 0x58, 0x54, 0x52, - 0x41, 0x5f, 0x4c, 0x41, 0x52, 0x47, 0x45, 0x10, 0x05, 0x22, 0x81, 0x02, 0x0a, 0x0f, 0x50, 0x6f, - 0x69, 0x6e, 0x74, 0x65, 0x72, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x20, 0x0a, - 0x1c, 0x50, 0x4f, 0x49, 0x4e, 0x54, 0x45, 0x52, 0x5f, 0x4c, 0x4f, 0x43, 0x41, 0x54, 0x49, 0x4f, - 0x4e, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, - 0x0a, 0x0a, 0x06, 0x50, 0x4c, 0x5f, 0x54, 0x4f, 0x50, 0x10, 0x01, 0x12, 0x0c, 0x0a, 0x08, 0x50, - 0x4c, 0x5f, 0x52, 0x49, 0x47, 0x48, 0x54, 0x10, 0x02, 0x12, 0x0d, 0x0a, 0x09, 0x50, 0x4c, 0x5f, - 0x42, 0x4f, 0x54, 0x54, 0x4f, 0x4d, 0x10, 0x03, 0x12, 0x0b, 0x0a, 0x07, 0x50, 0x4c, 0x5f, 0x4c, - 0x45, 0x46, 0x54, 0x10, 0x04, 0x12, 0x0f, 0x0a, 0x0b, 0x50, 0x4c, 0x5f, 0x54, 0x4f, 0x50, 0x5f, - 0x4c, 0x45, 0x46, 0x54, 0x10, 0x05, 0x12, 0x10, 0x0a, 0x0c, 0x50, 0x4c, 0x5f, 0x54, 0x4f, 0x50, - 0x5f, 0x52, 0x49, 0x47, 0x48, 0x54, 0x10, 0x06, 0x12, 0x10, 0x0a, 0x0c, 0x50, 0x4c, 0x5f, 0x52, - 0x49, 0x47, 0x48, 0x54, 0x5f, 0x54, 0x4f, 0x50, 0x10, 0x07, 0x12, 0x13, 0x0a, 0x0f, 0x50, 0x4c, - 0x5f, 0x52, 0x49, 0x47, 0x48, 0x54, 0x5f, 0x42, 0x4f, 0x54, 0x54, 0x4f, 0x4d, 0x10, 0x08, 0x12, - 0x13, 0x0a, 0x0f, 0x50, 0x4c, 0x5f, 0x42, 0x4f, 0x54, 0x54, 0x4f, 0x4d, 0x5f, 0x52, 0x49, 0x47, - 0x48, 0x54, 0x10, 0x09, 0x12, 0x12, 0x0a, 0x0e, 0x50, 0x4c, 0x5f, 0x42, 0x4f, 0x54, 0x54, 0x4f, - 0x4d, 0x5f, 0x4c, 0x45, 0x46, 0x54, 0x10, 0x0a, 0x12, 0x12, 0x0a, 0x0e, 0x50, 0x4c, 0x5f, 0x4c, - 0x45, 0x46, 0x54, 0x5f, 0x42, 0x4f, 0x54, 0x54, 0x4f, 0x4d, 0x10, 0x0b, 0x12, 0x0f, 0x0a, 0x0b, - 0x50, 0x4c, 0x5f, 0x4c, 0x45, 0x46, 0x54, 0x5f, 0x54, 0x4f, 0x50, 0x10, 0x0c, 0x22, 0x37, 0x0a, - 0x06, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12, 0x16, 0x0a, 0x12, 0x46, 0x4f, 0x52, 0x4d, 0x41, - 0x54, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, - 0x0c, 0x0a, 0x08, 0x4d, 0x41, 0x52, 0x4b, 0x44, 0x4f, 0x57, 0x4e, 0x10, 0x01, 0x12, 0x07, 0x0a, - 0x03, 0x52, 0x41, 0x57, 0x10, 0x02, 0x42, 0xf2, 0x01, 0x0a, 0x22, 0x63, 0x6f, 0x6d, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, - 0x2e, 0x64, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2e, 0x76, 0x31, 0x42, 0x09, 0x54, - 0x65, 0x78, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x46, 0x63, 0x6c, 0x6f, 0x75, - 0x64, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x2f, - 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x2f, 0x64, 0x61, 0x73, 0x68, 0x62, - 0x6f, 0x61, 0x72, 0x64, 0x2f, 0x61, 0x70, 0x69, 0x76, 0x31, 0x2f, 0x64, 0x61, 0x73, 0x68, 0x62, - 0x6f, 0x61, 0x72, 0x64, 0x70, 0x62, 0x3b, 0x64, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, - 0x70, 0x62, 0xaa, 0x02, 0x24, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x43, 0x6c, 0x6f, 0x75, - 0x64, 0x2e, 0x4d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x44, 0x61, 0x73, - 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x24, 0x47, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x5c, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x5c, 0x4d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, - 0x69, 0x6e, 0x67, 0x5c, 0x44, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x5c, 0x56, 0x31, - 0xea, 0x02, 0x28, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x3a, 0x3a, 0x43, 0x6c, 0x6f, 0x75, 0x64, - 0x3a, 0x3a, 0x4d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x3a, 0x3a, 0x44, 0x61, - 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x33, -} - -var ( - file_google_monitoring_dashboard_v1_text_proto_rawDescOnce sync.Once - file_google_monitoring_dashboard_v1_text_proto_rawDescData = file_google_monitoring_dashboard_v1_text_proto_rawDesc -) - -func file_google_monitoring_dashboard_v1_text_proto_rawDescGZIP() []byte { - file_google_monitoring_dashboard_v1_text_proto_rawDescOnce.Do(func() { - file_google_monitoring_dashboard_v1_text_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_monitoring_dashboard_v1_text_proto_rawDescData) - }) - return file_google_monitoring_dashboard_v1_text_proto_rawDescData -} - -var file_google_monitoring_dashboard_v1_text_proto_enumTypes = make([]protoimpl.EnumInfo, 6) -var file_google_monitoring_dashboard_v1_text_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_google_monitoring_dashboard_v1_text_proto_goTypes = []any{ - (Text_Format)(0), // 0: google.monitoring.dashboard.v1.Text.Format - (Text_TextStyle_HorizontalAlignment)(0), // 1: google.monitoring.dashboard.v1.Text.TextStyle.HorizontalAlignment - (Text_TextStyle_VerticalAlignment)(0), // 2: google.monitoring.dashboard.v1.Text.TextStyle.VerticalAlignment - (Text_TextStyle_PaddingSize)(0), // 3: google.monitoring.dashboard.v1.Text.TextStyle.PaddingSize - (Text_TextStyle_FontSize)(0), // 4: google.monitoring.dashboard.v1.Text.TextStyle.FontSize - (Text_TextStyle_PointerLocation)(0), // 5: google.monitoring.dashboard.v1.Text.TextStyle.PointerLocation - (*Text)(nil), // 6: google.monitoring.dashboard.v1.Text - (*Text_TextStyle)(nil), // 7: google.monitoring.dashboard.v1.Text.TextStyle -} -var file_google_monitoring_dashboard_v1_text_proto_depIdxs = []int32{ - 0, // 0: google.monitoring.dashboard.v1.Text.format:type_name -> google.monitoring.dashboard.v1.Text.Format - 7, // 1: google.monitoring.dashboard.v1.Text.style:type_name -> google.monitoring.dashboard.v1.Text.TextStyle - 1, // 2: google.monitoring.dashboard.v1.Text.TextStyle.horizontal_alignment:type_name -> google.monitoring.dashboard.v1.Text.TextStyle.HorizontalAlignment - 2, // 3: google.monitoring.dashboard.v1.Text.TextStyle.vertical_alignment:type_name -> google.monitoring.dashboard.v1.Text.TextStyle.VerticalAlignment - 3, // 4: google.monitoring.dashboard.v1.Text.TextStyle.padding:type_name -> google.monitoring.dashboard.v1.Text.TextStyle.PaddingSize - 4, // 5: google.monitoring.dashboard.v1.Text.TextStyle.font_size:type_name -> google.monitoring.dashboard.v1.Text.TextStyle.FontSize - 5, // 6: google.monitoring.dashboard.v1.Text.TextStyle.pointer_location:type_name -> google.monitoring.dashboard.v1.Text.TextStyle.PointerLocation - 7, // [7:7] is the sub-list for method output_type - 7, // [7:7] is the sub-list for method input_type - 7, // [7:7] is the sub-list for extension type_name - 7, // [7:7] is the sub-list for extension extendee - 0, // [0:7] is the sub-list for field type_name -} - -func init() { file_google_monitoring_dashboard_v1_text_proto_init() } -func file_google_monitoring_dashboard_v1_text_proto_init() { - if File_google_monitoring_dashboard_v1_text_proto != nil { - return - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_google_monitoring_dashboard_v1_text_proto_rawDesc, - NumEnums: 6, - NumMessages: 2, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_google_monitoring_dashboard_v1_text_proto_goTypes, - DependencyIndexes: file_google_monitoring_dashboard_v1_text_proto_depIdxs, - EnumInfos: file_google_monitoring_dashboard_v1_text_proto_enumTypes, - MessageInfos: file_google_monitoring_dashboard_v1_text_proto_msgTypes, - }.Build() - File_google_monitoring_dashboard_v1_text_proto = out.File - file_google_monitoring_dashboard_v1_text_proto_rawDesc = nil - file_google_monitoring_dashboard_v1_text_proto_goTypes = nil - file_google_monitoring_dashboard_v1_text_proto_depIdxs = nil -} diff --git a/vendor/cloud.google.com/go/monitoring/dashboard/apiv1/dashboardpb/widget.pb.go b/vendor/cloud.google.com/go/monitoring/dashboard/apiv1/dashboardpb/widget.pb.go deleted file mode 100644 index 3d7d418457..0000000000 --- a/vendor/cloud.google.com/go/monitoring/dashboard/apiv1/dashboardpb/widget.pb.go +++ /dev/null @@ -1,548 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.35.2 -// protoc v4.25.7 -// source: google/monitoring/dashboard/v1/widget.proto - -package dashboardpb - -import ( - _ "google.golang.org/genproto/googleapis/api/annotations" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - emptypb "google.golang.org/protobuf/types/known/emptypb" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// Widget contains a single dashboard component and configuration of how to -// present the component in the dashboard. -type Widget struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Optional. The title of the widget. - Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"` - // Content defines the component used to populate the widget. - // - // Types that are assignable to Content: - // - // *Widget_XyChart - // *Widget_Scorecard - // *Widget_Text - // *Widget_Blank - // *Widget_AlertChart - // *Widget_TimeSeriesTable - // *Widget_CollapsibleGroup - // *Widget_LogsPanel - // *Widget_IncidentList - // *Widget_PieChart - // *Widget_ErrorReportingPanel - // *Widget_SectionHeader - // *Widget_SingleViewGroup - Content isWidget_Content `protobuf_oneof:"content"` - // Optional. The widget id. Ids may be made up of alphanumerics, dashes and - // underscores. Widget ids are optional. - Id string `protobuf:"bytes,17,opt,name=id,proto3" json:"id,omitempty"` -} - -func (x *Widget) Reset() { - *x = Widget{} - mi := &file_google_monitoring_dashboard_v1_widget_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *Widget) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Widget) ProtoMessage() {} - -func (x *Widget) ProtoReflect() protoreflect.Message { - mi := &file_google_monitoring_dashboard_v1_widget_proto_msgTypes[0] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Widget.ProtoReflect.Descriptor instead. -func (*Widget) Descriptor() ([]byte, []int) { - return file_google_monitoring_dashboard_v1_widget_proto_rawDescGZIP(), []int{0} -} - -func (x *Widget) GetTitle() string { - if x != nil { - return x.Title - } - return "" -} - -func (m *Widget) GetContent() isWidget_Content { - if m != nil { - return m.Content - } - return nil -} - -func (x *Widget) GetXyChart() *XyChart { - if x, ok := x.GetContent().(*Widget_XyChart); ok { - return x.XyChart - } - return nil -} - -func (x *Widget) GetScorecard() *Scorecard { - if x, ok := x.GetContent().(*Widget_Scorecard); ok { - return x.Scorecard - } - return nil -} - -func (x *Widget) GetText() *Text { - if x, ok := x.GetContent().(*Widget_Text); ok { - return x.Text - } - return nil -} - -func (x *Widget) GetBlank() *emptypb.Empty { - if x, ok := x.GetContent().(*Widget_Blank); ok { - return x.Blank - } - return nil -} - -func (x *Widget) GetAlertChart() *AlertChart { - if x, ok := x.GetContent().(*Widget_AlertChart); ok { - return x.AlertChart - } - return nil -} - -func (x *Widget) GetTimeSeriesTable() *TimeSeriesTable { - if x, ok := x.GetContent().(*Widget_TimeSeriesTable); ok { - return x.TimeSeriesTable - } - return nil -} - -func (x *Widget) GetCollapsibleGroup() *CollapsibleGroup { - if x, ok := x.GetContent().(*Widget_CollapsibleGroup); ok { - return x.CollapsibleGroup - } - return nil -} - -func (x *Widget) GetLogsPanel() *LogsPanel { - if x, ok := x.GetContent().(*Widget_LogsPanel); ok { - return x.LogsPanel - } - return nil -} - -func (x *Widget) GetIncidentList() *IncidentList { - if x, ok := x.GetContent().(*Widget_IncidentList); ok { - return x.IncidentList - } - return nil -} - -func (x *Widget) GetPieChart() *PieChart { - if x, ok := x.GetContent().(*Widget_PieChart); ok { - return x.PieChart - } - return nil -} - -func (x *Widget) GetErrorReportingPanel() *ErrorReportingPanel { - if x, ok := x.GetContent().(*Widget_ErrorReportingPanel); ok { - return x.ErrorReportingPanel - } - return nil -} - -func (x *Widget) GetSectionHeader() *SectionHeader { - if x, ok := x.GetContent().(*Widget_SectionHeader); ok { - return x.SectionHeader - } - return nil -} - -func (x *Widget) GetSingleViewGroup() *SingleViewGroup { - if x, ok := x.GetContent().(*Widget_SingleViewGroup); ok { - return x.SingleViewGroup - } - return nil -} - -func (x *Widget) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -type isWidget_Content interface { - isWidget_Content() -} - -type Widget_XyChart struct { - // A chart of time series data. - XyChart *XyChart `protobuf:"bytes,2,opt,name=xy_chart,json=xyChart,proto3,oneof"` -} - -type Widget_Scorecard struct { - // A scorecard summarizing time series data. - Scorecard *Scorecard `protobuf:"bytes,3,opt,name=scorecard,proto3,oneof"` -} - -type Widget_Text struct { - // A raw string or markdown displaying textual content. - Text *Text `protobuf:"bytes,4,opt,name=text,proto3,oneof"` -} - -type Widget_Blank struct { - // A blank space. - Blank *emptypb.Empty `protobuf:"bytes,5,opt,name=blank,proto3,oneof"` -} - -type Widget_AlertChart struct { - // A chart of alert policy data. - AlertChart *AlertChart `protobuf:"bytes,7,opt,name=alert_chart,json=alertChart,proto3,oneof"` -} - -type Widget_TimeSeriesTable struct { - // A widget that displays time series data in a tabular format. - TimeSeriesTable *TimeSeriesTable `protobuf:"bytes,8,opt,name=time_series_table,json=timeSeriesTable,proto3,oneof"` -} - -type Widget_CollapsibleGroup struct { - // A widget that groups the other widgets. All widgets that are within - // the area spanned by the grouping widget are considered member widgets. - CollapsibleGroup *CollapsibleGroup `protobuf:"bytes,9,opt,name=collapsible_group,json=collapsibleGroup,proto3,oneof"` -} - -type Widget_LogsPanel struct { - // A widget that shows a stream of logs. - LogsPanel *LogsPanel `protobuf:"bytes,10,opt,name=logs_panel,json=logsPanel,proto3,oneof"` -} - -type Widget_IncidentList struct { - // A widget that shows list of incidents. - IncidentList *IncidentList `protobuf:"bytes,12,opt,name=incident_list,json=incidentList,proto3,oneof"` -} - -type Widget_PieChart struct { - // A widget that displays timeseries data as a pie chart. - PieChart *PieChart `protobuf:"bytes,14,opt,name=pie_chart,json=pieChart,proto3,oneof"` -} - -type Widget_ErrorReportingPanel struct { - // A widget that displays a list of error groups. - ErrorReportingPanel *ErrorReportingPanel `protobuf:"bytes,19,opt,name=error_reporting_panel,json=errorReportingPanel,proto3,oneof"` -} - -type Widget_SectionHeader struct { - // A widget that defines a section header for easier navigation of the - // dashboard. - SectionHeader *SectionHeader `protobuf:"bytes,21,opt,name=section_header,json=sectionHeader,proto3,oneof"` -} - -type Widget_SingleViewGroup struct { - // A widget that groups the other widgets by using a dropdown menu. - SingleViewGroup *SingleViewGroup `protobuf:"bytes,22,opt,name=single_view_group,json=singleViewGroup,proto3,oneof"` -} - -func (*Widget_XyChart) isWidget_Content() {} - -func (*Widget_Scorecard) isWidget_Content() {} - -func (*Widget_Text) isWidget_Content() {} - -func (*Widget_Blank) isWidget_Content() {} - -func (*Widget_AlertChart) isWidget_Content() {} - -func (*Widget_TimeSeriesTable) isWidget_Content() {} - -func (*Widget_CollapsibleGroup) isWidget_Content() {} - -func (*Widget_LogsPanel) isWidget_Content() {} - -func (*Widget_IncidentList) isWidget_Content() {} - -func (*Widget_PieChart) isWidget_Content() {} - -func (*Widget_ErrorReportingPanel) isWidget_Content() {} - -func (*Widget_SectionHeader) isWidget_Content() {} - -func (*Widget_SingleViewGroup) isWidget_Content() {} - -var File_google_monitoring_dashboard_v1_widget_proto protoreflect.FileDescriptor - -var file_google_monitoring_dashboard_v1_widget_proto_rawDesc = []byte{ - 0x0a, 0x2b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, - 0x69, 0x6e, 0x67, 0x2f, 0x64, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2f, 0x76, 0x31, - 0x2f, 0x77, 0x69, 0x64, 0x67, 0x65, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, - 0x2e, 0x64, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2e, 0x76, 0x31, 0x1a, 0x1f, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, - 0x62, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2f, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, - 0x67, 0x2f, 0x64, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2f, 0x76, 0x31, 0x2f, 0x61, - 0x6c, 0x65, 0x72, 0x74, 0x63, 0x68, 0x61, 0x72, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, - 0x36, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, - 0x6e, 0x67, 0x2f, 0x64, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2f, 0x76, 0x31, 0x2f, - 0x63, 0x6f, 0x6c, 0x6c, 0x61, 0x70, 0x73, 0x69, 0x62, 0x6c, 0x65, 0x5f, 0x67, 0x72, 0x6f, 0x75, - 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x3a, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, - 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x2f, 0x64, 0x61, 0x73, 0x68, 0x62, - 0x6f, 0x61, 0x72, 0x64, 0x2f, 0x76, 0x31, 0x2f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x72, 0x65, - 0x70, 0x6f, 0x72, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x61, 0x6e, 0x65, 0x6c, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x1a, 0x32, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x6d, 0x6f, 0x6e, 0x69, - 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x2f, 0x64, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, - 0x2f, 0x76, 0x31, 0x2f, 0x69, 0x6e, 0x63, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x5f, 0x6c, 0x69, 0x73, - 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, - 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x2f, 0x64, 0x61, 0x73, 0x68, 0x62, - 0x6f, 0x61, 0x72, 0x64, 0x2f, 0x76, 0x31, 0x2f, 0x6c, 0x6f, 0x67, 0x73, 0x5f, 0x70, 0x61, 0x6e, - 0x65, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2d, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2f, 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x2f, 0x64, 0x61, 0x73, 0x68, - 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x69, 0x65, 0x63, 0x68, 0x61, 0x72, - 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, - 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x2f, 0x64, 0x61, 0x73, 0x68, 0x62, - 0x6f, 0x61, 0x72, 0x64, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x63, 0x61, 0x72, - 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x33, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, - 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x2f, 0x64, 0x61, 0x73, 0x68, 0x62, - 0x6f, 0x61, 0x72, 0x64, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, - 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x36, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x2f, - 0x64, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x69, 0x6e, - 0x67, 0x6c, 0x65, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2a, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x6d, 0x6f, 0x6e, - 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x2f, 0x64, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, - 0x64, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x1a, 0x29, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, - 0x69, 0x6e, 0x67, 0x2f, 0x64, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2f, 0x76, 0x31, - 0x2f, 0x74, 0x65, 0x78, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2c, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2f, 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x2f, 0x64, - 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2f, 0x76, 0x31, 0x2f, 0x78, 0x79, 0x63, 0x68, - 0x61, 0x72, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x65, 0x6d, 0x70, 0x74, 0x79, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xdb, 0x08, 0x0a, 0x06, 0x57, 0x69, 0x64, 0x67, 0x65, - 0x74, 0x12, 0x19, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x12, 0x44, 0x0a, 0x08, - 0x78, 0x79, 0x5f, 0x63, 0x68, 0x61, 0x72, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, - 0x6e, 0x67, 0x2e, 0x64, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2e, 0x76, 0x31, 0x2e, - 0x58, 0x79, 0x43, 0x68, 0x61, 0x72, 0x74, 0x48, 0x00, 0x52, 0x07, 0x78, 0x79, 0x43, 0x68, 0x61, - 0x72, 0x74, 0x12, 0x49, 0x0a, 0x09, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x63, 0x61, 0x72, 0x64, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x6d, - 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x64, 0x61, 0x73, 0x68, 0x62, 0x6f, - 0x61, 0x72, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x63, 0x61, 0x72, 0x64, - 0x48, 0x00, 0x52, 0x09, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x63, 0x61, 0x72, 0x64, 0x12, 0x3a, 0x0a, - 0x04, 0x74, 0x65, 0x78, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x2e, - 0x64, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x65, 0x78, - 0x74, 0x48, 0x00, 0x52, 0x04, 0x74, 0x65, 0x78, 0x74, 0x12, 0x2e, 0x0a, 0x05, 0x62, 0x6c, 0x61, - 0x6e, 0x6b, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, - 0x48, 0x00, 0x52, 0x05, 0x62, 0x6c, 0x61, 0x6e, 0x6b, 0x12, 0x4d, 0x0a, 0x0b, 0x61, 0x6c, 0x65, - 0x72, 0x74, 0x5f, 0x63, 0x68, 0x61, 0x72, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, - 0x6e, 0x67, 0x2e, 0x64, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2e, 0x76, 0x31, 0x2e, - 0x41, 0x6c, 0x65, 0x72, 0x74, 0x43, 0x68, 0x61, 0x72, 0x74, 0x48, 0x00, 0x52, 0x0a, 0x61, 0x6c, - 0x65, 0x72, 0x74, 0x43, 0x68, 0x61, 0x72, 0x74, 0x12, 0x5d, 0x0a, 0x11, 0x74, 0x69, 0x6d, 0x65, - 0x5f, 0x73, 0x65, 0x72, 0x69, 0x65, 0x73, 0x5f, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x08, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x6d, 0x6f, 0x6e, - 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x64, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, - 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x53, 0x65, 0x72, 0x69, 0x65, 0x73, 0x54, - 0x61, 0x62, 0x6c, 0x65, 0x48, 0x00, 0x52, 0x0f, 0x74, 0x69, 0x6d, 0x65, 0x53, 0x65, 0x72, 0x69, - 0x65, 0x73, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x5f, 0x0a, 0x11, 0x63, 0x6f, 0x6c, 0x6c, 0x61, - 0x70, 0x73, 0x69, 0x62, 0x6c, 0x65, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x18, 0x09, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x6d, 0x6f, 0x6e, 0x69, - 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x64, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, - 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6c, 0x6c, 0x61, 0x70, 0x73, 0x69, 0x62, 0x6c, 0x65, 0x47, - 0x72, 0x6f, 0x75, 0x70, 0x48, 0x00, 0x52, 0x10, 0x63, 0x6f, 0x6c, 0x6c, 0x61, 0x70, 0x73, 0x69, - 0x62, 0x6c, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x4a, 0x0a, 0x0a, 0x6c, 0x6f, 0x67, 0x73, - 0x5f, 0x70, 0x61, 0x6e, 0x65, 0x6c, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, - 0x2e, 0x64, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x6f, - 0x67, 0x73, 0x50, 0x61, 0x6e, 0x65, 0x6c, 0x48, 0x00, 0x52, 0x09, 0x6c, 0x6f, 0x67, 0x73, 0x50, - 0x61, 0x6e, 0x65, 0x6c, 0x12, 0x53, 0x0a, 0x0d, 0x69, 0x6e, 0x63, 0x69, 0x64, 0x65, 0x6e, 0x74, - 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x2e, - 0x64, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6e, 0x63, - 0x69, 0x64, 0x65, 0x6e, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x48, 0x00, 0x52, 0x0c, 0x69, 0x6e, 0x63, - 0x69, 0x64, 0x65, 0x6e, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x47, 0x0a, 0x09, 0x70, 0x69, 0x65, - 0x5f, 0x63, 0x68, 0x61, 0x72, 0x74, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, - 0x2e, 0x64, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x69, - 0x65, 0x43, 0x68, 0x61, 0x72, 0x74, 0x48, 0x00, 0x52, 0x08, 0x70, 0x69, 0x65, 0x43, 0x68, 0x61, - 0x72, 0x74, 0x12, 0x69, 0x0a, 0x15, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x72, 0x65, 0x70, 0x6f, - 0x72, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x61, 0x6e, 0x65, 0x6c, 0x18, 0x13, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x33, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x6d, 0x6f, 0x6e, 0x69, 0x74, - 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x64, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2e, - 0x76, 0x31, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x69, 0x6e, - 0x67, 0x50, 0x61, 0x6e, 0x65, 0x6c, 0x48, 0x00, 0x52, 0x13, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x52, - 0x65, 0x70, 0x6f, 0x72, 0x74, 0x69, 0x6e, 0x67, 0x50, 0x61, 0x6e, 0x65, 0x6c, 0x12, 0x56, 0x0a, - 0x0e, 0x73, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, - 0x15, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x6d, - 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x64, 0x61, 0x73, 0x68, 0x62, 0x6f, - 0x61, 0x72, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x65, - 0x61, 0x64, 0x65, 0x72, 0x48, 0x00, 0x52, 0x0d, 0x73, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x48, - 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x5d, 0x0a, 0x11, 0x73, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x5f, - 0x76, 0x69, 0x65, 0x77, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x18, 0x16, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x2f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, - 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x64, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2e, 0x76, - 0x31, 0x2e, 0x53, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x56, 0x69, 0x65, 0x77, 0x47, 0x72, 0x6f, 0x75, - 0x70, 0x48, 0x00, 0x52, 0x0f, 0x73, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x56, 0x69, 0x65, 0x77, 0x47, - 0x72, 0x6f, 0x75, 0x70, 0x12, 0x13, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x11, 0x20, 0x01, 0x28, 0x09, - 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x02, 0x69, 0x64, 0x42, 0x09, 0x0a, 0x07, 0x63, 0x6f, 0x6e, - 0x74, 0x65, 0x6e, 0x74, 0x42, 0xf4, 0x01, 0x0a, 0x22, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x64, - 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2e, 0x76, 0x31, 0x42, 0x0b, 0x57, 0x69, 0x64, - 0x67, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x46, 0x63, 0x6c, 0x6f, 0x75, - 0x64, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x2f, - 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x2f, 0x64, 0x61, 0x73, 0x68, 0x62, - 0x6f, 0x61, 0x72, 0x64, 0x2f, 0x61, 0x70, 0x69, 0x76, 0x31, 0x2f, 0x64, 0x61, 0x73, 0x68, 0x62, - 0x6f, 0x61, 0x72, 0x64, 0x70, 0x62, 0x3b, 0x64, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, - 0x70, 0x62, 0xaa, 0x02, 0x24, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x43, 0x6c, 0x6f, 0x75, - 0x64, 0x2e, 0x4d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x44, 0x61, 0x73, - 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x24, 0x47, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x5c, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x5c, 0x4d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, - 0x69, 0x6e, 0x67, 0x5c, 0x44, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x5c, 0x56, 0x31, - 0xea, 0x02, 0x28, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x3a, 0x3a, 0x43, 0x6c, 0x6f, 0x75, 0x64, - 0x3a, 0x3a, 0x4d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x3a, 0x3a, 0x44, 0x61, - 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x33, -} - -var ( - file_google_monitoring_dashboard_v1_widget_proto_rawDescOnce sync.Once - file_google_monitoring_dashboard_v1_widget_proto_rawDescData = file_google_monitoring_dashboard_v1_widget_proto_rawDesc -) - -func file_google_monitoring_dashboard_v1_widget_proto_rawDescGZIP() []byte { - file_google_monitoring_dashboard_v1_widget_proto_rawDescOnce.Do(func() { - file_google_monitoring_dashboard_v1_widget_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_monitoring_dashboard_v1_widget_proto_rawDescData) - }) - return file_google_monitoring_dashboard_v1_widget_proto_rawDescData -} - -var file_google_monitoring_dashboard_v1_widget_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_google_monitoring_dashboard_v1_widget_proto_goTypes = []any{ - (*Widget)(nil), // 0: google.monitoring.dashboard.v1.Widget - (*XyChart)(nil), // 1: google.monitoring.dashboard.v1.XyChart - (*Scorecard)(nil), // 2: google.monitoring.dashboard.v1.Scorecard - (*Text)(nil), // 3: google.monitoring.dashboard.v1.Text - (*emptypb.Empty)(nil), // 4: google.protobuf.Empty - (*AlertChart)(nil), // 5: google.monitoring.dashboard.v1.AlertChart - (*TimeSeriesTable)(nil), // 6: google.monitoring.dashboard.v1.TimeSeriesTable - (*CollapsibleGroup)(nil), // 7: google.monitoring.dashboard.v1.CollapsibleGroup - (*LogsPanel)(nil), // 8: google.monitoring.dashboard.v1.LogsPanel - (*IncidentList)(nil), // 9: google.monitoring.dashboard.v1.IncidentList - (*PieChart)(nil), // 10: google.monitoring.dashboard.v1.PieChart - (*ErrorReportingPanel)(nil), // 11: google.monitoring.dashboard.v1.ErrorReportingPanel - (*SectionHeader)(nil), // 12: google.monitoring.dashboard.v1.SectionHeader - (*SingleViewGroup)(nil), // 13: google.monitoring.dashboard.v1.SingleViewGroup -} -var file_google_monitoring_dashboard_v1_widget_proto_depIdxs = []int32{ - 1, // 0: google.monitoring.dashboard.v1.Widget.xy_chart:type_name -> google.monitoring.dashboard.v1.XyChart - 2, // 1: google.monitoring.dashboard.v1.Widget.scorecard:type_name -> google.monitoring.dashboard.v1.Scorecard - 3, // 2: google.monitoring.dashboard.v1.Widget.text:type_name -> google.monitoring.dashboard.v1.Text - 4, // 3: google.monitoring.dashboard.v1.Widget.blank:type_name -> google.protobuf.Empty - 5, // 4: google.monitoring.dashboard.v1.Widget.alert_chart:type_name -> google.monitoring.dashboard.v1.AlertChart - 6, // 5: google.monitoring.dashboard.v1.Widget.time_series_table:type_name -> google.monitoring.dashboard.v1.TimeSeriesTable - 7, // 6: google.monitoring.dashboard.v1.Widget.collapsible_group:type_name -> google.monitoring.dashboard.v1.CollapsibleGroup - 8, // 7: google.monitoring.dashboard.v1.Widget.logs_panel:type_name -> google.monitoring.dashboard.v1.LogsPanel - 9, // 8: google.monitoring.dashboard.v1.Widget.incident_list:type_name -> google.monitoring.dashboard.v1.IncidentList - 10, // 9: google.monitoring.dashboard.v1.Widget.pie_chart:type_name -> google.monitoring.dashboard.v1.PieChart - 11, // 10: google.monitoring.dashboard.v1.Widget.error_reporting_panel:type_name -> google.monitoring.dashboard.v1.ErrorReportingPanel - 12, // 11: google.monitoring.dashboard.v1.Widget.section_header:type_name -> google.monitoring.dashboard.v1.SectionHeader - 13, // 12: google.monitoring.dashboard.v1.Widget.single_view_group:type_name -> google.monitoring.dashboard.v1.SingleViewGroup - 13, // [13:13] is the sub-list for method output_type - 13, // [13:13] is the sub-list for method input_type - 13, // [13:13] is the sub-list for extension type_name - 13, // [13:13] is the sub-list for extension extendee - 0, // [0:13] is the sub-list for field type_name -} - -func init() { file_google_monitoring_dashboard_v1_widget_proto_init() } -func file_google_monitoring_dashboard_v1_widget_proto_init() { - if File_google_monitoring_dashboard_v1_widget_proto != nil { - return - } - file_google_monitoring_dashboard_v1_alertchart_proto_init() - file_google_monitoring_dashboard_v1_collapsible_group_proto_init() - file_google_monitoring_dashboard_v1_error_reporting_panel_proto_init() - file_google_monitoring_dashboard_v1_incident_list_proto_init() - file_google_monitoring_dashboard_v1_logs_panel_proto_init() - file_google_monitoring_dashboard_v1_piechart_proto_init() - file_google_monitoring_dashboard_v1_scorecard_proto_init() - file_google_monitoring_dashboard_v1_section_header_proto_init() - file_google_monitoring_dashboard_v1_single_view_group_proto_init() - file_google_monitoring_dashboard_v1_table_proto_init() - file_google_monitoring_dashboard_v1_text_proto_init() - file_google_monitoring_dashboard_v1_xychart_proto_init() - file_google_monitoring_dashboard_v1_widget_proto_msgTypes[0].OneofWrappers = []any{ - (*Widget_XyChart)(nil), - (*Widget_Scorecard)(nil), - (*Widget_Text)(nil), - (*Widget_Blank)(nil), - (*Widget_AlertChart)(nil), - (*Widget_TimeSeriesTable)(nil), - (*Widget_CollapsibleGroup)(nil), - (*Widget_LogsPanel)(nil), - (*Widget_IncidentList)(nil), - (*Widget_PieChart)(nil), - (*Widget_ErrorReportingPanel)(nil), - (*Widget_SectionHeader)(nil), - (*Widget_SingleViewGroup)(nil), - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_google_monitoring_dashboard_v1_widget_proto_rawDesc, - NumEnums: 0, - NumMessages: 1, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_google_monitoring_dashboard_v1_widget_proto_goTypes, - DependencyIndexes: file_google_monitoring_dashboard_v1_widget_proto_depIdxs, - MessageInfos: file_google_monitoring_dashboard_v1_widget_proto_msgTypes, - }.Build() - File_google_monitoring_dashboard_v1_widget_proto = out.File - file_google_monitoring_dashboard_v1_widget_proto_rawDesc = nil - file_google_monitoring_dashboard_v1_widget_proto_goTypes = nil - file_google_monitoring_dashboard_v1_widget_proto_depIdxs = nil -} diff --git a/vendor/cloud.google.com/go/monitoring/dashboard/apiv1/dashboardpb/xychart.pb.go b/vendor/cloud.google.com/go/monitoring/dashboard/apiv1/dashboardpb/xychart.pb.go deleted file mode 100644 index 01ce4b1cea..0000000000 --- a/vendor/cloud.google.com/go/monitoring/dashboard/apiv1/dashboardpb/xychart.pb.go +++ /dev/null @@ -1,768 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.35.2 -// protoc v4.25.7 -// source: google/monitoring/dashboard/v1/xychart.proto - -package dashboardpb - -import ( - _ "google.golang.org/genproto/googleapis/api/annotations" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - durationpb "google.golang.org/protobuf/types/known/durationpb" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// The types of plotting strategies for data sets. -type XyChart_DataSet_PlotType int32 - -const ( - // Plot type is unspecified. The view will default to `LINE`. - XyChart_DataSet_PLOT_TYPE_UNSPECIFIED XyChart_DataSet_PlotType = 0 - // The data is plotted as a set of lines (one line per series). - XyChart_DataSet_LINE XyChart_DataSet_PlotType = 1 - // The data is plotted as a set of filled areas (one area per series), - // with the areas stacked vertically (the base of each area is the top of - // its predecessor, and the base of the first area is the x-axis). Since - // the areas do not overlap, each is filled with a different opaque color. - XyChart_DataSet_STACKED_AREA XyChart_DataSet_PlotType = 2 - // The data is plotted as a set of rectangular boxes (one box per series), - // with the boxes stacked vertically (the base of each box is the top of - // its predecessor, and the base of the first box is the x-axis). Since - // the boxes do not overlap, each is filled with a different opaque color. - XyChart_DataSet_STACKED_BAR XyChart_DataSet_PlotType = 3 - // The data is plotted as a heatmap. The series being plotted must have a - // `DISTRIBUTION` value type. The value of each bucket in the distribution - // is displayed as a color. This type is not currently available in the - // Stackdriver Monitoring application. - XyChart_DataSet_HEATMAP XyChart_DataSet_PlotType = 4 -) - -// Enum value maps for XyChart_DataSet_PlotType. -var ( - XyChart_DataSet_PlotType_name = map[int32]string{ - 0: "PLOT_TYPE_UNSPECIFIED", - 1: "LINE", - 2: "STACKED_AREA", - 3: "STACKED_BAR", - 4: "HEATMAP", - } - XyChart_DataSet_PlotType_value = map[string]int32{ - "PLOT_TYPE_UNSPECIFIED": 0, - "LINE": 1, - "STACKED_AREA": 2, - "STACKED_BAR": 3, - "HEATMAP": 4, - } -) - -func (x XyChart_DataSet_PlotType) Enum() *XyChart_DataSet_PlotType { - p := new(XyChart_DataSet_PlotType) - *p = x - return p -} - -func (x XyChart_DataSet_PlotType) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (XyChart_DataSet_PlotType) Descriptor() protoreflect.EnumDescriptor { - return file_google_monitoring_dashboard_v1_xychart_proto_enumTypes[0].Descriptor() -} - -func (XyChart_DataSet_PlotType) Type() protoreflect.EnumType { - return &file_google_monitoring_dashboard_v1_xychart_proto_enumTypes[0] -} - -func (x XyChart_DataSet_PlotType) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use XyChart_DataSet_PlotType.Descriptor instead. -func (XyChart_DataSet_PlotType) EnumDescriptor() ([]byte, []int) { - return file_google_monitoring_dashboard_v1_xychart_proto_rawDescGZIP(), []int{0, 0, 0} -} - -// An axis identifier. -type XyChart_DataSet_TargetAxis int32 - -const ( - // The target axis was not specified. Defaults to Y1. - XyChart_DataSet_TARGET_AXIS_UNSPECIFIED XyChart_DataSet_TargetAxis = 0 - // The y_axis (the right axis of chart). - XyChart_DataSet_Y1 XyChart_DataSet_TargetAxis = 1 - // The y2_axis (the left axis of chart). - XyChart_DataSet_Y2 XyChart_DataSet_TargetAxis = 2 -) - -// Enum value maps for XyChart_DataSet_TargetAxis. -var ( - XyChart_DataSet_TargetAxis_name = map[int32]string{ - 0: "TARGET_AXIS_UNSPECIFIED", - 1: "Y1", - 2: "Y2", - } - XyChart_DataSet_TargetAxis_value = map[string]int32{ - "TARGET_AXIS_UNSPECIFIED": 0, - "Y1": 1, - "Y2": 2, - } -) - -func (x XyChart_DataSet_TargetAxis) Enum() *XyChart_DataSet_TargetAxis { - p := new(XyChart_DataSet_TargetAxis) - *p = x - return p -} - -func (x XyChart_DataSet_TargetAxis) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (XyChart_DataSet_TargetAxis) Descriptor() protoreflect.EnumDescriptor { - return file_google_monitoring_dashboard_v1_xychart_proto_enumTypes[1].Descriptor() -} - -func (XyChart_DataSet_TargetAxis) Type() protoreflect.EnumType { - return &file_google_monitoring_dashboard_v1_xychart_proto_enumTypes[1] -} - -func (x XyChart_DataSet_TargetAxis) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use XyChart_DataSet_TargetAxis.Descriptor instead. -func (XyChart_DataSet_TargetAxis) EnumDescriptor() ([]byte, []int) { - return file_google_monitoring_dashboard_v1_xychart_proto_rawDescGZIP(), []int{0, 0, 1} -} - -// Types of scales used in axes. -type XyChart_Axis_Scale int32 - -const ( - // Scale is unspecified. The view will default to `LINEAR`. - XyChart_Axis_SCALE_UNSPECIFIED XyChart_Axis_Scale = 0 - // Linear scale. - XyChart_Axis_LINEAR XyChart_Axis_Scale = 1 - // Logarithmic scale (base 10). - XyChart_Axis_LOG10 XyChart_Axis_Scale = 2 -) - -// Enum value maps for XyChart_Axis_Scale. -var ( - XyChart_Axis_Scale_name = map[int32]string{ - 0: "SCALE_UNSPECIFIED", - 1: "LINEAR", - 2: "LOG10", - } - XyChart_Axis_Scale_value = map[string]int32{ - "SCALE_UNSPECIFIED": 0, - "LINEAR": 1, - "LOG10": 2, - } -) - -func (x XyChart_Axis_Scale) Enum() *XyChart_Axis_Scale { - p := new(XyChart_Axis_Scale) - *p = x - return p -} - -func (x XyChart_Axis_Scale) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (XyChart_Axis_Scale) Descriptor() protoreflect.EnumDescriptor { - return file_google_monitoring_dashboard_v1_xychart_proto_enumTypes[2].Descriptor() -} - -func (XyChart_Axis_Scale) Type() protoreflect.EnumType { - return &file_google_monitoring_dashboard_v1_xychart_proto_enumTypes[2] -} - -func (x XyChart_Axis_Scale) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use XyChart_Axis_Scale.Descriptor instead. -func (XyChart_Axis_Scale) EnumDescriptor() ([]byte, []int) { - return file_google_monitoring_dashboard_v1_xychart_proto_rawDescGZIP(), []int{0, 1, 0} -} - -// Chart mode options. -type ChartOptions_Mode int32 - -const ( - // Mode is unspecified. The view will default to `COLOR`. - ChartOptions_MODE_UNSPECIFIED ChartOptions_Mode = 0 - // The chart distinguishes data series using different color. Line - // colors may get reused when there are many lines in the chart. - ChartOptions_COLOR ChartOptions_Mode = 1 - // The chart uses the Stackdriver x-ray mode, in which each - // data set is plotted using the same semi-transparent color. - ChartOptions_X_RAY ChartOptions_Mode = 2 - // The chart displays statistics such as average, median, 95th percentile, - // and more. - ChartOptions_STATS ChartOptions_Mode = 3 -) - -// Enum value maps for ChartOptions_Mode. -var ( - ChartOptions_Mode_name = map[int32]string{ - 0: "MODE_UNSPECIFIED", - 1: "COLOR", - 2: "X_RAY", - 3: "STATS", - } - ChartOptions_Mode_value = map[string]int32{ - "MODE_UNSPECIFIED": 0, - "COLOR": 1, - "X_RAY": 2, - "STATS": 3, - } -) - -func (x ChartOptions_Mode) Enum() *ChartOptions_Mode { - p := new(ChartOptions_Mode) - *p = x - return p -} - -func (x ChartOptions_Mode) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (ChartOptions_Mode) Descriptor() protoreflect.EnumDescriptor { - return file_google_monitoring_dashboard_v1_xychart_proto_enumTypes[3].Descriptor() -} - -func (ChartOptions_Mode) Type() protoreflect.EnumType { - return &file_google_monitoring_dashboard_v1_xychart_proto_enumTypes[3] -} - -func (x ChartOptions_Mode) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use ChartOptions_Mode.Descriptor instead. -func (ChartOptions_Mode) EnumDescriptor() ([]byte, []int) { - return file_google_monitoring_dashboard_v1_xychart_proto_rawDescGZIP(), []int{1, 0} -} - -// A chart that displays data on a 2D (X and Y axes) plane. -type XyChart struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Required. The data displayed in this chart. - DataSets []*XyChart_DataSet `protobuf:"bytes,1,rep,name=data_sets,json=dataSets,proto3" json:"data_sets,omitempty"` - // The duration used to display a comparison chart. A comparison chart - // simultaneously shows values from two similar-length time periods - // (e.g., week-over-week metrics). - // The duration must be positive, and it can only be applied to charts with - // data sets of LINE plot type. - TimeshiftDuration *durationpb.Duration `protobuf:"bytes,4,opt,name=timeshift_duration,json=timeshiftDuration,proto3" json:"timeshift_duration,omitempty"` - // Threshold lines drawn horizontally across the chart. - Thresholds []*Threshold `protobuf:"bytes,5,rep,name=thresholds,proto3" json:"thresholds,omitempty"` - // The properties applied to the x-axis. - XAxis *XyChart_Axis `protobuf:"bytes,6,opt,name=x_axis,json=xAxis,proto3" json:"x_axis,omitempty"` - // The properties applied to the y-axis. - YAxis *XyChart_Axis `protobuf:"bytes,7,opt,name=y_axis,json=yAxis,proto3" json:"y_axis,omitempty"` - // The properties applied to the y2-axis. - Y2Axis *XyChart_Axis `protobuf:"bytes,9,opt,name=y2_axis,json=y2Axis,proto3" json:"y2_axis,omitempty"` - // Display options for the chart. - ChartOptions *ChartOptions `protobuf:"bytes,8,opt,name=chart_options,json=chartOptions,proto3" json:"chart_options,omitempty"` -} - -func (x *XyChart) Reset() { - *x = XyChart{} - mi := &file_google_monitoring_dashboard_v1_xychart_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *XyChart) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*XyChart) ProtoMessage() {} - -func (x *XyChart) ProtoReflect() protoreflect.Message { - mi := &file_google_monitoring_dashboard_v1_xychart_proto_msgTypes[0] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use XyChart.ProtoReflect.Descriptor instead. -func (*XyChart) Descriptor() ([]byte, []int) { - return file_google_monitoring_dashboard_v1_xychart_proto_rawDescGZIP(), []int{0} -} - -func (x *XyChart) GetDataSets() []*XyChart_DataSet { - if x != nil { - return x.DataSets - } - return nil -} - -func (x *XyChart) GetTimeshiftDuration() *durationpb.Duration { - if x != nil { - return x.TimeshiftDuration - } - return nil -} - -func (x *XyChart) GetThresholds() []*Threshold { - if x != nil { - return x.Thresholds - } - return nil -} - -func (x *XyChart) GetXAxis() *XyChart_Axis { - if x != nil { - return x.XAxis - } - return nil -} - -func (x *XyChart) GetYAxis() *XyChart_Axis { - if x != nil { - return x.YAxis - } - return nil -} - -func (x *XyChart) GetY2Axis() *XyChart_Axis { - if x != nil { - return x.Y2Axis - } - return nil -} - -func (x *XyChart) GetChartOptions() *ChartOptions { - if x != nil { - return x.ChartOptions - } - return nil -} - -// Options to control visual rendering of a chart. -type ChartOptions struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The chart mode. - Mode ChartOptions_Mode `protobuf:"varint,1,opt,name=mode,proto3,enum=google.monitoring.dashboard.v1.ChartOptions_Mode" json:"mode,omitempty"` -} - -func (x *ChartOptions) Reset() { - *x = ChartOptions{} - mi := &file_google_monitoring_dashboard_v1_xychart_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ChartOptions) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ChartOptions) ProtoMessage() {} - -func (x *ChartOptions) ProtoReflect() protoreflect.Message { - mi := &file_google_monitoring_dashboard_v1_xychart_proto_msgTypes[1] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ChartOptions.ProtoReflect.Descriptor instead. -func (*ChartOptions) Descriptor() ([]byte, []int) { - return file_google_monitoring_dashboard_v1_xychart_proto_rawDescGZIP(), []int{1} -} - -func (x *ChartOptions) GetMode() ChartOptions_Mode { - if x != nil { - return x.Mode - } - return ChartOptions_MODE_UNSPECIFIED -} - -// Groups a time series query definition with charting options. -type XyChart_DataSet struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Required. Fields for querying time series data from the - // Stackdriver metrics API. - TimeSeriesQuery *TimeSeriesQuery `protobuf:"bytes,1,opt,name=time_series_query,json=timeSeriesQuery,proto3" json:"time_series_query,omitempty"` - // How this data should be plotted on the chart. - PlotType XyChart_DataSet_PlotType `protobuf:"varint,2,opt,name=plot_type,json=plotType,proto3,enum=google.monitoring.dashboard.v1.XyChart_DataSet_PlotType" json:"plot_type,omitempty"` - // A template string for naming `TimeSeries` in the resulting data set. - // This should be a string with interpolations of the form `${label_name}`, - // which will resolve to the label's value. - LegendTemplate string `protobuf:"bytes,3,opt,name=legend_template,json=legendTemplate,proto3" json:"legend_template,omitempty"` - // Optional. The lower bound on data point frequency for this data set, - // implemented by specifying the minimum alignment period to use in a time - // series query For example, if the data is published once every 10 minutes, - // the `min_alignment_period` should be at least 10 minutes. It would not - // make sense to fetch and align data at one minute intervals. - MinAlignmentPeriod *durationpb.Duration `protobuf:"bytes,4,opt,name=min_alignment_period,json=minAlignmentPeriod,proto3" json:"min_alignment_period,omitempty"` - // Optional. The target axis to use for plotting the metric. - TargetAxis XyChart_DataSet_TargetAxis `protobuf:"varint,5,opt,name=target_axis,json=targetAxis,proto3,enum=google.monitoring.dashboard.v1.XyChart_DataSet_TargetAxis" json:"target_axis,omitempty"` -} - -func (x *XyChart_DataSet) Reset() { - *x = XyChart_DataSet{} - mi := &file_google_monitoring_dashboard_v1_xychart_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *XyChart_DataSet) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*XyChart_DataSet) ProtoMessage() {} - -func (x *XyChart_DataSet) ProtoReflect() protoreflect.Message { - mi := &file_google_monitoring_dashboard_v1_xychart_proto_msgTypes[2] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use XyChart_DataSet.ProtoReflect.Descriptor instead. -func (*XyChart_DataSet) Descriptor() ([]byte, []int) { - return file_google_monitoring_dashboard_v1_xychart_proto_rawDescGZIP(), []int{0, 0} -} - -func (x *XyChart_DataSet) GetTimeSeriesQuery() *TimeSeriesQuery { - if x != nil { - return x.TimeSeriesQuery - } - return nil -} - -func (x *XyChart_DataSet) GetPlotType() XyChart_DataSet_PlotType { - if x != nil { - return x.PlotType - } - return XyChart_DataSet_PLOT_TYPE_UNSPECIFIED -} - -func (x *XyChart_DataSet) GetLegendTemplate() string { - if x != nil { - return x.LegendTemplate - } - return "" -} - -func (x *XyChart_DataSet) GetMinAlignmentPeriod() *durationpb.Duration { - if x != nil { - return x.MinAlignmentPeriod - } - return nil -} - -func (x *XyChart_DataSet) GetTargetAxis() XyChart_DataSet_TargetAxis { - if x != nil { - return x.TargetAxis - } - return XyChart_DataSet_TARGET_AXIS_UNSPECIFIED -} - -// A chart axis. -type XyChart_Axis struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The label of the axis. - Label string `protobuf:"bytes,1,opt,name=label,proto3" json:"label,omitempty"` - // The axis scale. By default, a linear scale is used. - Scale XyChart_Axis_Scale `protobuf:"varint,2,opt,name=scale,proto3,enum=google.monitoring.dashboard.v1.XyChart_Axis_Scale" json:"scale,omitempty"` -} - -func (x *XyChart_Axis) Reset() { - *x = XyChart_Axis{} - mi := &file_google_monitoring_dashboard_v1_xychart_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *XyChart_Axis) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*XyChart_Axis) ProtoMessage() {} - -func (x *XyChart_Axis) ProtoReflect() protoreflect.Message { - mi := &file_google_monitoring_dashboard_v1_xychart_proto_msgTypes[3] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use XyChart_Axis.ProtoReflect.Descriptor instead. -func (*XyChart_Axis) Descriptor() ([]byte, []int) { - return file_google_monitoring_dashboard_v1_xychart_proto_rawDescGZIP(), []int{0, 1} -} - -func (x *XyChart_Axis) GetLabel() string { - if x != nil { - return x.Label - } - return "" -} - -func (x *XyChart_Axis) GetScale() XyChart_Axis_Scale { - if x != nil { - return x.Scale - } - return XyChart_Axis_SCALE_UNSPECIFIED -} - -var File_google_monitoring_dashboard_v1_xychart_proto protoreflect.FileDescriptor - -var file_google_monitoring_dashboard_v1_xychart_proto_rawDesc = []byte{ - 0x0a, 0x2c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, - 0x69, 0x6e, 0x67, 0x2f, 0x64, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2f, 0x76, 0x31, - 0x2f, 0x78, 0x79, 0x63, 0x68, 0x61, 0x72, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, - 0x67, 0x2e, 0x64, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2e, 0x76, 0x31, 0x1a, 0x1f, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, - 0x5f, 0x62, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, - 0x2c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, - 0x6e, 0x67, 0x2f, 0x64, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2f, 0x76, 0x31, 0x2f, - 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, - 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xf3, 0x09, - 0x0a, 0x07, 0x58, 0x79, 0x43, 0x68, 0x61, 0x72, 0x74, 0x12, 0x51, 0x0a, 0x09, 0x64, 0x61, 0x74, - 0x61, 0x5f, 0x73, 0x65, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, - 0x2e, 0x64, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x58, 0x79, - 0x43, 0x68, 0x61, 0x72, 0x74, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x53, 0x65, 0x74, 0x42, 0x03, 0xe0, - 0x41, 0x02, 0x52, 0x08, 0x64, 0x61, 0x74, 0x61, 0x53, 0x65, 0x74, 0x73, 0x12, 0x48, 0x0a, 0x12, - 0x74, 0x69, 0x6d, 0x65, 0x73, 0x68, 0x69, 0x66, 0x74, 0x5f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x52, 0x11, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x68, 0x69, 0x66, 0x74, 0x44, 0x75, - 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x49, 0x0a, 0x0a, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, - 0x6f, 0x6c, 0x64, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x64, - 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x68, 0x72, 0x65, - 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x52, 0x0a, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, - 0x73, 0x12, 0x43, 0x0a, 0x06, 0x78, 0x5f, 0x61, 0x78, 0x69, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x2c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x6d, 0x6f, 0x6e, 0x69, 0x74, - 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x64, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2e, - 0x76, 0x31, 0x2e, 0x58, 0x79, 0x43, 0x68, 0x61, 0x72, 0x74, 0x2e, 0x41, 0x78, 0x69, 0x73, 0x52, - 0x05, 0x78, 0x41, 0x78, 0x69, 0x73, 0x12, 0x43, 0x0a, 0x06, 0x79, 0x5f, 0x61, 0x78, 0x69, 0x73, - 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x64, 0x61, 0x73, 0x68, 0x62, - 0x6f, 0x61, 0x72, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x58, 0x79, 0x43, 0x68, 0x61, 0x72, 0x74, 0x2e, - 0x41, 0x78, 0x69, 0x73, 0x52, 0x05, 0x79, 0x41, 0x78, 0x69, 0x73, 0x12, 0x45, 0x0a, 0x07, 0x79, - 0x32, 0x5f, 0x61, 0x78, 0x69, 0x73, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, - 0x2e, 0x64, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x58, 0x79, - 0x43, 0x68, 0x61, 0x72, 0x74, 0x2e, 0x41, 0x78, 0x69, 0x73, 0x52, 0x06, 0x79, 0x32, 0x41, 0x78, - 0x69, 0x73, 0x12, 0x51, 0x0a, 0x0d, 0x63, 0x68, 0x61, 0x72, 0x74, 0x5f, 0x6f, 0x70, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x64, 0x61, - 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x61, 0x72, 0x74, - 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x0c, 0x63, 0x68, 0x61, 0x72, 0x74, 0x4f, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0xbb, 0x04, 0x0a, 0x07, 0x44, 0x61, 0x74, 0x61, 0x53, 0x65, - 0x74, 0x12, 0x60, 0x0a, 0x11, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x73, 0x65, 0x72, 0x69, 0x65, 0x73, - 0x5f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, - 0x2e, 0x64, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x69, - 0x6d, 0x65, 0x53, 0x65, 0x72, 0x69, 0x65, 0x73, 0x51, 0x75, 0x65, 0x72, 0x79, 0x42, 0x03, 0xe0, - 0x41, 0x02, 0x52, 0x0f, 0x74, 0x69, 0x6d, 0x65, 0x53, 0x65, 0x72, 0x69, 0x65, 0x73, 0x51, 0x75, - 0x65, 0x72, 0x79, 0x12, 0x55, 0x0a, 0x09, 0x70, 0x6c, 0x6f, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x38, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x64, 0x61, 0x73, 0x68, 0x62, - 0x6f, 0x61, 0x72, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x58, 0x79, 0x43, 0x68, 0x61, 0x72, 0x74, 0x2e, - 0x44, 0x61, 0x74, 0x61, 0x53, 0x65, 0x74, 0x2e, 0x50, 0x6c, 0x6f, 0x74, 0x54, 0x79, 0x70, 0x65, - 0x52, 0x08, 0x70, 0x6c, 0x6f, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x27, 0x0a, 0x0f, 0x6c, 0x65, - 0x67, 0x65, 0x6e, 0x64, 0x5f, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0e, 0x6c, 0x65, 0x67, 0x65, 0x6e, 0x64, 0x54, 0x65, 0x6d, 0x70, 0x6c, - 0x61, 0x74, 0x65, 0x12, 0x50, 0x0a, 0x14, 0x6d, 0x69, 0x6e, 0x5f, 0x61, 0x6c, 0x69, 0x67, 0x6e, - 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x03, 0xe0, 0x41, - 0x01, 0x52, 0x12, 0x6d, 0x69, 0x6e, 0x41, 0x6c, 0x69, 0x67, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x50, - 0x65, 0x72, 0x69, 0x6f, 0x64, 0x12, 0x60, 0x0a, 0x0b, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x5f, - 0x61, 0x78, 0x69, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x3a, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x64, - 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x58, 0x79, 0x43, 0x68, - 0x61, 0x72, 0x74, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x53, 0x65, 0x74, 0x2e, 0x54, 0x61, 0x72, 0x67, - 0x65, 0x74, 0x41, 0x78, 0x69, 0x73, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0a, 0x74, 0x61, 0x72, - 0x67, 0x65, 0x74, 0x41, 0x78, 0x69, 0x73, 0x22, 0x5f, 0x0a, 0x08, 0x50, 0x6c, 0x6f, 0x74, 0x54, - 0x79, 0x70, 0x65, 0x12, 0x19, 0x0a, 0x15, 0x50, 0x4c, 0x4f, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, - 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x08, - 0x0a, 0x04, 0x4c, 0x49, 0x4e, 0x45, 0x10, 0x01, 0x12, 0x10, 0x0a, 0x0c, 0x53, 0x54, 0x41, 0x43, - 0x4b, 0x45, 0x44, 0x5f, 0x41, 0x52, 0x45, 0x41, 0x10, 0x02, 0x12, 0x0f, 0x0a, 0x0b, 0x53, 0x54, - 0x41, 0x43, 0x4b, 0x45, 0x44, 0x5f, 0x42, 0x41, 0x52, 0x10, 0x03, 0x12, 0x0b, 0x0a, 0x07, 0x48, - 0x45, 0x41, 0x54, 0x4d, 0x41, 0x50, 0x10, 0x04, 0x22, 0x39, 0x0a, 0x0a, 0x54, 0x61, 0x72, 0x67, - 0x65, 0x74, 0x41, 0x78, 0x69, 0x73, 0x12, 0x1b, 0x0a, 0x17, 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, - 0x5f, 0x41, 0x58, 0x49, 0x53, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, - 0x44, 0x10, 0x00, 0x12, 0x06, 0x0a, 0x02, 0x59, 0x31, 0x10, 0x01, 0x12, 0x06, 0x0a, 0x02, 0x59, - 0x32, 0x10, 0x02, 0x1a, 0x9d, 0x01, 0x0a, 0x04, 0x41, 0x78, 0x69, 0x73, 0x12, 0x14, 0x0a, 0x05, - 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6c, 0x61, 0x62, - 0x65, 0x6c, 0x12, 0x48, 0x0a, 0x05, 0x73, 0x63, 0x61, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0e, 0x32, 0x32, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x6d, 0x6f, 0x6e, 0x69, 0x74, - 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x64, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2e, - 0x76, 0x31, 0x2e, 0x58, 0x79, 0x43, 0x68, 0x61, 0x72, 0x74, 0x2e, 0x41, 0x78, 0x69, 0x73, 0x2e, - 0x53, 0x63, 0x61, 0x6c, 0x65, 0x52, 0x05, 0x73, 0x63, 0x61, 0x6c, 0x65, 0x22, 0x35, 0x0a, 0x05, - 0x53, 0x63, 0x61, 0x6c, 0x65, 0x12, 0x15, 0x0a, 0x11, 0x53, 0x43, 0x41, 0x4c, 0x45, 0x5f, 0x55, - 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, - 0x4c, 0x49, 0x4e, 0x45, 0x41, 0x52, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x4c, 0x4f, 0x47, 0x31, - 0x30, 0x10, 0x02, 0x22, 0x94, 0x01, 0x0a, 0x0c, 0x43, 0x68, 0x61, 0x72, 0x74, 0x4f, 0x70, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x45, 0x0a, 0x04, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0e, 0x32, 0x31, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x6d, 0x6f, 0x6e, 0x69, - 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x64, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, - 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x61, 0x72, 0x74, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x2e, 0x4d, 0x6f, 0x64, 0x65, 0x52, 0x04, 0x6d, 0x6f, 0x64, 0x65, 0x22, 0x3d, 0x0a, 0x04, 0x4d, - 0x6f, 0x64, 0x65, 0x12, 0x14, 0x0a, 0x10, 0x4d, 0x4f, 0x44, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, - 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x43, 0x4f, 0x4c, - 0x4f, 0x52, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x58, 0x5f, 0x52, 0x41, 0x59, 0x10, 0x02, 0x12, - 0x09, 0x0a, 0x05, 0x53, 0x54, 0x41, 0x54, 0x53, 0x10, 0x03, 0x42, 0xf5, 0x01, 0x0a, 0x22, 0x63, - 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, - 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x64, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2e, 0x76, - 0x31, 0x42, 0x0c, 0x58, 0x79, 0x43, 0x68, 0x61, 0x72, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, - 0x01, 0x5a, 0x46, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x2f, 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, - 0x67, 0x2f, 0x64, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2f, 0x61, 0x70, 0x69, 0x76, - 0x31, 0x2f, 0x64, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x70, 0x62, 0x3b, 0x64, 0x61, - 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x70, 0x62, 0xaa, 0x02, 0x24, 0x47, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x4d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, - 0x69, 0x6e, 0x67, 0x2e, 0x44, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2e, 0x56, 0x31, - 0xca, 0x02, 0x24, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x5c, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x5c, - 0x4d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x5c, 0x44, 0x61, 0x73, 0x68, 0x62, - 0x6f, 0x61, 0x72, 0x64, 0x5c, 0x56, 0x31, 0xea, 0x02, 0x28, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x3a, 0x3a, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x3a, 0x3a, 0x4d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, - 0x69, 0x6e, 0x67, 0x3a, 0x3a, 0x44, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x3a, 0x3a, - 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_google_monitoring_dashboard_v1_xychart_proto_rawDescOnce sync.Once - file_google_monitoring_dashboard_v1_xychart_proto_rawDescData = file_google_monitoring_dashboard_v1_xychart_proto_rawDesc -) - -func file_google_monitoring_dashboard_v1_xychart_proto_rawDescGZIP() []byte { - file_google_monitoring_dashboard_v1_xychart_proto_rawDescOnce.Do(func() { - file_google_monitoring_dashboard_v1_xychart_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_monitoring_dashboard_v1_xychart_proto_rawDescData) - }) - return file_google_monitoring_dashboard_v1_xychart_proto_rawDescData -} - -var file_google_monitoring_dashboard_v1_xychart_proto_enumTypes = make([]protoimpl.EnumInfo, 4) -var file_google_monitoring_dashboard_v1_xychart_proto_msgTypes = make([]protoimpl.MessageInfo, 4) -var file_google_monitoring_dashboard_v1_xychart_proto_goTypes = []any{ - (XyChart_DataSet_PlotType)(0), // 0: google.monitoring.dashboard.v1.XyChart.DataSet.PlotType - (XyChart_DataSet_TargetAxis)(0), // 1: google.monitoring.dashboard.v1.XyChart.DataSet.TargetAxis - (XyChart_Axis_Scale)(0), // 2: google.monitoring.dashboard.v1.XyChart.Axis.Scale - (ChartOptions_Mode)(0), // 3: google.monitoring.dashboard.v1.ChartOptions.Mode - (*XyChart)(nil), // 4: google.monitoring.dashboard.v1.XyChart - (*ChartOptions)(nil), // 5: google.monitoring.dashboard.v1.ChartOptions - (*XyChart_DataSet)(nil), // 6: google.monitoring.dashboard.v1.XyChart.DataSet - (*XyChart_Axis)(nil), // 7: google.monitoring.dashboard.v1.XyChart.Axis - (*durationpb.Duration)(nil), // 8: google.protobuf.Duration - (*Threshold)(nil), // 9: google.monitoring.dashboard.v1.Threshold - (*TimeSeriesQuery)(nil), // 10: google.monitoring.dashboard.v1.TimeSeriesQuery -} -var file_google_monitoring_dashboard_v1_xychart_proto_depIdxs = []int32{ - 6, // 0: google.monitoring.dashboard.v1.XyChart.data_sets:type_name -> google.monitoring.dashboard.v1.XyChart.DataSet - 8, // 1: google.monitoring.dashboard.v1.XyChart.timeshift_duration:type_name -> google.protobuf.Duration - 9, // 2: google.monitoring.dashboard.v1.XyChart.thresholds:type_name -> google.monitoring.dashboard.v1.Threshold - 7, // 3: google.monitoring.dashboard.v1.XyChart.x_axis:type_name -> google.monitoring.dashboard.v1.XyChart.Axis - 7, // 4: google.monitoring.dashboard.v1.XyChart.y_axis:type_name -> google.monitoring.dashboard.v1.XyChart.Axis - 7, // 5: google.monitoring.dashboard.v1.XyChart.y2_axis:type_name -> google.monitoring.dashboard.v1.XyChart.Axis - 5, // 6: google.monitoring.dashboard.v1.XyChart.chart_options:type_name -> google.monitoring.dashboard.v1.ChartOptions - 3, // 7: google.monitoring.dashboard.v1.ChartOptions.mode:type_name -> google.monitoring.dashboard.v1.ChartOptions.Mode - 10, // 8: google.monitoring.dashboard.v1.XyChart.DataSet.time_series_query:type_name -> google.monitoring.dashboard.v1.TimeSeriesQuery - 0, // 9: google.monitoring.dashboard.v1.XyChart.DataSet.plot_type:type_name -> google.monitoring.dashboard.v1.XyChart.DataSet.PlotType - 8, // 10: google.monitoring.dashboard.v1.XyChart.DataSet.min_alignment_period:type_name -> google.protobuf.Duration - 1, // 11: google.monitoring.dashboard.v1.XyChart.DataSet.target_axis:type_name -> google.monitoring.dashboard.v1.XyChart.DataSet.TargetAxis - 2, // 12: google.monitoring.dashboard.v1.XyChart.Axis.scale:type_name -> google.monitoring.dashboard.v1.XyChart.Axis.Scale - 13, // [13:13] is the sub-list for method output_type - 13, // [13:13] is the sub-list for method input_type - 13, // [13:13] is the sub-list for extension type_name - 13, // [13:13] is the sub-list for extension extendee - 0, // [0:13] is the sub-list for field type_name -} - -func init() { file_google_monitoring_dashboard_v1_xychart_proto_init() } -func file_google_monitoring_dashboard_v1_xychart_proto_init() { - if File_google_monitoring_dashboard_v1_xychart_proto != nil { - return - } - file_google_monitoring_dashboard_v1_metrics_proto_init() - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_google_monitoring_dashboard_v1_xychart_proto_rawDesc, - NumEnums: 4, - NumMessages: 4, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_google_monitoring_dashboard_v1_xychart_proto_goTypes, - DependencyIndexes: file_google_monitoring_dashboard_v1_xychart_proto_depIdxs, - EnumInfos: file_google_monitoring_dashboard_v1_xychart_proto_enumTypes, - MessageInfos: file_google_monitoring_dashboard_v1_xychart_proto_msgTypes, - }.Build() - File_google_monitoring_dashboard_v1_xychart_proto = out.File - file_google_monitoring_dashboard_v1_xychart_proto_rawDesc = nil - file_google_monitoring_dashboard_v1_xychart_proto_goTypes = nil - file_google_monitoring_dashboard_v1_xychart_proto_depIdxs = nil -} diff --git a/vendor/cloud.google.com/go/monitoring/dashboard/apiv1/dashboards_client.go b/vendor/cloud.google.com/go/monitoring/dashboard/apiv1/dashboards_client.go deleted file mode 100644 index aa8f200d30..0000000000 --- a/vendor/cloud.google.com/go/monitoring/dashboard/apiv1/dashboards_client.go +++ /dev/null @@ -1,811 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Code generated by protoc-gen-go_gapic. DO NOT EDIT. - -package dashboard - -import ( - "bytes" - "context" - "fmt" - "log/slog" - "math" - "net/http" - "net/url" - "time" - - dashboardpb "cloud.google.com/go/monitoring/dashboard/apiv1/dashboardpb" - gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/iterator" - "google.golang.org/api/option" - "google.golang.org/api/option/internaloption" - gtransport "google.golang.org/api/transport/grpc" - httptransport "google.golang.org/api/transport/http" - "google.golang.org/grpc" - "google.golang.org/grpc/codes" - "google.golang.org/protobuf/encoding/protojson" - "google.golang.org/protobuf/proto" -) - -var newDashboardsClientHook clientHook - -// DashboardsCallOptions contains the retry settings for each method of DashboardsClient. -type DashboardsCallOptions struct { - CreateDashboard []gax.CallOption - ListDashboards []gax.CallOption - GetDashboard []gax.CallOption - DeleteDashboard []gax.CallOption - UpdateDashboard []gax.CallOption -} - -func defaultDashboardsGRPCClientOptions() []option.ClientOption { - return []option.ClientOption{ - internaloption.WithDefaultEndpoint("monitoring.googleapis.com:443"), - internaloption.WithDefaultEndpointTemplate("monitoring.UNIVERSE_DOMAIN:443"), - internaloption.WithDefaultMTLSEndpoint("monitoring.mtls.googleapis.com:443"), - internaloption.WithDefaultUniverseDomain("googleapis.com"), - internaloption.WithDefaultAudience("https://monitoring.googleapis.com/"), - internaloption.WithDefaultScopes(DefaultAuthScopes()...), - internaloption.EnableJwtWithScope(), - internaloption.EnableNewAuthLibrary(), - option.WithGRPCDialOption(grpc.WithDefaultCallOptions( - grpc.MaxCallRecvMsgSize(math.MaxInt32))), - } -} - -func defaultDashboardsCallOptions() *DashboardsCallOptions { - return &DashboardsCallOptions{ - CreateDashboard: []gax.CallOption{ - gax.WithTimeout(30000 * time.Millisecond), - }, - ListDashboards: []gax.CallOption{ - gax.WithTimeout(30000 * time.Millisecond), - gax.WithRetry(func() gax.Retryer { - return gax.OnCodes([]codes.Code{ - codes.Unavailable, - codes.Unknown, - }, gax.Backoff{ - Initial: 1000 * time.Millisecond, - Max: 10000 * time.Millisecond, - Multiplier: 1.30, - }) - }), - }, - GetDashboard: []gax.CallOption{ - gax.WithTimeout(30000 * time.Millisecond), - gax.WithRetry(func() gax.Retryer { - return gax.OnCodes([]codes.Code{ - codes.Unavailable, - codes.Unknown, - }, gax.Backoff{ - Initial: 1000 * time.Millisecond, - Max: 10000 * time.Millisecond, - Multiplier: 1.30, - }) - }), - }, - DeleteDashboard: []gax.CallOption{ - gax.WithTimeout(30000 * time.Millisecond), - }, - UpdateDashboard: []gax.CallOption{ - gax.WithTimeout(30000 * time.Millisecond), - }, - } -} - -func defaultDashboardsRESTCallOptions() *DashboardsCallOptions { - return &DashboardsCallOptions{ - CreateDashboard: []gax.CallOption{ - gax.WithTimeout(30000 * time.Millisecond), - }, - ListDashboards: []gax.CallOption{ - gax.WithTimeout(30000 * time.Millisecond), - gax.WithRetry(func() gax.Retryer { - return gax.OnHTTPCodes(gax.Backoff{ - Initial: 1000 * time.Millisecond, - Max: 10000 * time.Millisecond, - Multiplier: 1.30, - }, - http.StatusServiceUnavailable, - http.StatusInternalServerError) - }), - }, - GetDashboard: []gax.CallOption{ - gax.WithTimeout(30000 * time.Millisecond), - gax.WithRetry(func() gax.Retryer { - return gax.OnHTTPCodes(gax.Backoff{ - Initial: 1000 * time.Millisecond, - Max: 10000 * time.Millisecond, - Multiplier: 1.30, - }, - http.StatusServiceUnavailable, - http.StatusInternalServerError) - }), - }, - DeleteDashboard: []gax.CallOption{ - gax.WithTimeout(30000 * time.Millisecond), - }, - UpdateDashboard: []gax.CallOption{ - gax.WithTimeout(30000 * time.Millisecond), - }, - } -} - -// internalDashboardsClient is an interface that defines the methods available from Cloud Monitoring API. -type internalDashboardsClient interface { - Close() error - setGoogleClientInfo(...string) - Connection() *grpc.ClientConn - CreateDashboard(context.Context, *dashboardpb.CreateDashboardRequest, ...gax.CallOption) (*dashboardpb.Dashboard, error) - ListDashboards(context.Context, *dashboardpb.ListDashboardsRequest, ...gax.CallOption) *DashboardIterator - GetDashboard(context.Context, *dashboardpb.GetDashboardRequest, ...gax.CallOption) (*dashboardpb.Dashboard, error) - DeleteDashboard(context.Context, *dashboardpb.DeleteDashboardRequest, ...gax.CallOption) error - UpdateDashboard(context.Context, *dashboardpb.UpdateDashboardRequest, ...gax.CallOption) (*dashboardpb.Dashboard, error) -} - -// DashboardsClient is a client for interacting with Cloud Monitoring API. -// Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. -// -// Manages Stackdriver dashboards. A dashboard is an arrangement of data display -// widgets in a specific layout. -type DashboardsClient struct { - // The internal transport-dependent client. - internalClient internalDashboardsClient - - // The call options for this service. - CallOptions *DashboardsCallOptions -} - -// Wrapper methods routed to the internal client. - -// Close closes the connection to the API service. The user should invoke this when -// the client is no longer required. -func (c *DashboardsClient) Close() error { - return c.internalClient.Close() -} - -// setGoogleClientInfo sets the name and version of the application in -// the `x-goog-api-client` header passed on each request. Intended for -// use by Google-written clients. -func (c *DashboardsClient) setGoogleClientInfo(keyval ...string) { - c.internalClient.setGoogleClientInfo(keyval...) -} - -// Connection returns a connection to the API service. -// -// Deprecated: Connections are now pooled so this method does not always -// return the same resource. -func (c *DashboardsClient) Connection() *grpc.ClientConn { - return c.internalClient.Connection() -} - -// CreateDashboard creates a new custom dashboard. For examples on how you can use this API to -// create dashboards, see Managing dashboards by -// API (at https://cloud.google.com/monitoring/dashboards/api-dashboard). This -// method requires the monitoring.dashboards.create permission on the -// specified project. For more information about permissions, see Cloud -// Identity and Access Management (at https://cloud.google.com/iam). -func (c *DashboardsClient) CreateDashboard(ctx context.Context, req *dashboardpb.CreateDashboardRequest, opts ...gax.CallOption) (*dashboardpb.Dashboard, error) { - return c.internalClient.CreateDashboard(ctx, req, opts...) -} - -// ListDashboards lists the existing dashboards. -// -// This method requires the monitoring.dashboards.list permission -// on the specified project. For more information, see -// Cloud Identity and Access Management (at https://cloud.google.com/iam). -func (c *DashboardsClient) ListDashboards(ctx context.Context, req *dashboardpb.ListDashboardsRequest, opts ...gax.CallOption) *DashboardIterator { - return c.internalClient.ListDashboards(ctx, req, opts...) -} - -// GetDashboard fetches a specific dashboard. -// -// This method requires the monitoring.dashboards.get permission -// on the specified dashboard. For more information, see -// Cloud Identity and Access Management (at https://cloud.google.com/iam). -func (c *DashboardsClient) GetDashboard(ctx context.Context, req *dashboardpb.GetDashboardRequest, opts ...gax.CallOption) (*dashboardpb.Dashboard, error) { - return c.internalClient.GetDashboard(ctx, req, opts...) -} - -// DeleteDashboard deletes an existing custom dashboard. -// -// This method requires the monitoring.dashboards.delete permission -// on the specified dashboard. For more information, see -// Cloud Identity and Access Management (at https://cloud.google.com/iam). -func (c *DashboardsClient) DeleteDashboard(ctx context.Context, req *dashboardpb.DeleteDashboardRequest, opts ...gax.CallOption) error { - return c.internalClient.DeleteDashboard(ctx, req, opts...) -} - -// UpdateDashboard replaces an existing custom dashboard with a new definition. -// -// This method requires the monitoring.dashboards.update permission -// on the specified dashboard. For more information, see -// Cloud Identity and Access Management (at https://cloud.google.com/iam). -func (c *DashboardsClient) UpdateDashboard(ctx context.Context, req *dashboardpb.UpdateDashboardRequest, opts ...gax.CallOption) (*dashboardpb.Dashboard, error) { - return c.internalClient.UpdateDashboard(ctx, req, opts...) -} - -// dashboardsGRPCClient is a client for interacting with Cloud Monitoring API over gRPC transport. -// -// Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. -type dashboardsGRPCClient struct { - // Connection pool of gRPC connections to the service. - connPool gtransport.ConnPool - - // Points back to the CallOptions field of the containing DashboardsClient - CallOptions **DashboardsCallOptions - - // The gRPC API client. - dashboardsClient dashboardpb.DashboardsServiceClient - - // The x-goog-* metadata to be sent with each request. - xGoogHeaders []string - - logger *slog.Logger -} - -// NewDashboardsClient creates a new dashboards service client based on gRPC. -// The returned client must be Closed when it is done being used to clean up its underlying connections. -// -// Manages Stackdriver dashboards. A dashboard is an arrangement of data display -// widgets in a specific layout. -func NewDashboardsClient(ctx context.Context, opts ...option.ClientOption) (*DashboardsClient, error) { - clientOpts := defaultDashboardsGRPCClientOptions() - if newDashboardsClientHook != nil { - hookOpts, err := newDashboardsClientHook(ctx, clientHookParams{}) - if err != nil { - return nil, err - } - clientOpts = append(clientOpts, hookOpts...) - } - - connPool, err := gtransport.DialPool(ctx, append(clientOpts, opts...)...) - if err != nil { - return nil, err - } - client := DashboardsClient{CallOptions: defaultDashboardsCallOptions()} - - c := &dashboardsGRPCClient{ - connPool: connPool, - dashboardsClient: dashboardpb.NewDashboardsServiceClient(connPool), - CallOptions: &client.CallOptions, - logger: internaloption.GetLogger(opts), - } - c.setGoogleClientInfo() - - client.internalClient = c - - return &client, nil -} - -// Connection returns a connection to the API service. -// -// Deprecated: Connections are now pooled so this method does not always -// return the same resource. -func (c *dashboardsGRPCClient) Connection() *grpc.ClientConn { - return c.connPool.Conn() -} - -// setGoogleClientInfo sets the name and version of the application in -// the `x-goog-api-client` header passed on each request. Intended for -// use by Google-written clients. -func (c *dashboardsGRPCClient) setGoogleClientInfo(keyval ...string) { - kv := append([]string{"gl-go", gax.GoVersion}, keyval...) - kv = append(kv, "gapic", getVersionClient(), "gax", gax.Version, "grpc", grpc.Version, "pb", protoVersion) - c.xGoogHeaders = []string{ - "x-goog-api-client", gax.XGoogHeader(kv...), - } -} - -// Close closes the connection to the API service. The user should invoke this when -// the client is no longer required. -func (c *dashboardsGRPCClient) Close() error { - return c.connPool.Close() -} - -// Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. -type dashboardsRESTClient struct { - // The http endpoint to connect to. - endpoint string - - // The http client. - httpClient *http.Client - - // The x-goog-* headers to be sent with each request. - xGoogHeaders []string - - // Points back to the CallOptions field of the containing DashboardsClient - CallOptions **DashboardsCallOptions - - logger *slog.Logger -} - -// NewDashboardsRESTClient creates a new dashboards service rest client. -// -// Manages Stackdriver dashboards. A dashboard is an arrangement of data display -// widgets in a specific layout. -func NewDashboardsRESTClient(ctx context.Context, opts ...option.ClientOption) (*DashboardsClient, error) { - clientOpts := append(defaultDashboardsRESTClientOptions(), opts...) - httpClient, endpoint, err := httptransport.NewClient(ctx, clientOpts...) - if err != nil { - return nil, err - } - - callOpts := defaultDashboardsRESTCallOptions() - c := &dashboardsRESTClient{ - endpoint: endpoint, - httpClient: httpClient, - CallOptions: &callOpts, - logger: internaloption.GetLogger(opts), - } - c.setGoogleClientInfo() - - return &DashboardsClient{internalClient: c, CallOptions: callOpts}, nil -} - -func defaultDashboardsRESTClientOptions() []option.ClientOption { - return []option.ClientOption{ - internaloption.WithDefaultEndpoint("https://monitoring.googleapis.com"), - internaloption.WithDefaultEndpointTemplate("https://monitoring.UNIVERSE_DOMAIN"), - internaloption.WithDefaultMTLSEndpoint("https://monitoring.mtls.googleapis.com"), - internaloption.WithDefaultUniverseDomain("googleapis.com"), - internaloption.WithDefaultAudience("https://monitoring.googleapis.com/"), - internaloption.WithDefaultScopes(DefaultAuthScopes()...), - internaloption.EnableNewAuthLibrary(), - } -} - -// setGoogleClientInfo sets the name and version of the application in -// the `x-goog-api-client` header passed on each request. Intended for -// use by Google-written clients. -func (c *dashboardsRESTClient) setGoogleClientInfo(keyval ...string) { - kv := append([]string{"gl-go", gax.GoVersion}, keyval...) - kv = append(kv, "gapic", getVersionClient(), "gax", gax.Version, "rest", "UNKNOWN", "pb", protoVersion) - c.xGoogHeaders = []string{ - "x-goog-api-client", gax.XGoogHeader(kv...), - } -} - -// Close closes the connection to the API service. The user should invoke this when -// the client is no longer required. -func (c *dashboardsRESTClient) Close() error { - // Replace httpClient with nil to force cleanup. - c.httpClient = nil - return nil -} - -// Connection returns a connection to the API service. -// -// Deprecated: This method always returns nil. -func (c *dashboardsRESTClient) Connection() *grpc.ClientConn { - return nil -} -func (c *dashboardsGRPCClient) CreateDashboard(ctx context.Context, req *dashboardpb.CreateDashboardRequest, opts ...gax.CallOption) (*dashboardpb.Dashboard, error) { - hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))} - - hds = append(c.xGoogHeaders, hds...) - ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) - opts = append((*c.CallOptions).CreateDashboard[0:len((*c.CallOptions).CreateDashboard):len((*c.CallOptions).CreateDashboard)], opts...) - var resp *dashboardpb.Dashboard - err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - var err error - resp, err = executeRPC(ctx, c.dashboardsClient.CreateDashboard, req, settings.GRPC, c.logger, "CreateDashboard") - return err - }, opts...) - if err != nil { - return nil, err - } - return resp, nil -} - -func (c *dashboardsGRPCClient) ListDashboards(ctx context.Context, req *dashboardpb.ListDashboardsRequest, opts ...gax.CallOption) *DashboardIterator { - hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))} - - hds = append(c.xGoogHeaders, hds...) - ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) - opts = append((*c.CallOptions).ListDashboards[0:len((*c.CallOptions).ListDashboards):len((*c.CallOptions).ListDashboards)], opts...) - it := &DashboardIterator{} - req = proto.Clone(req).(*dashboardpb.ListDashboardsRequest) - it.InternalFetch = func(pageSize int, pageToken string) ([]*dashboardpb.Dashboard, string, error) { - resp := &dashboardpb.ListDashboardsResponse{} - if pageToken != "" { - req.PageToken = pageToken - } - if pageSize > math.MaxInt32 { - req.PageSize = math.MaxInt32 - } else if pageSize != 0 { - req.PageSize = int32(pageSize) - } - err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - var err error - resp, err = executeRPC(ctx, c.dashboardsClient.ListDashboards, req, settings.GRPC, c.logger, "ListDashboards") - return err - }, opts...) - if err != nil { - return nil, "", err - } - - it.Response = resp - return resp.GetDashboards(), resp.GetNextPageToken(), nil - } - fetch := func(pageSize int, pageToken string) (string, error) { - items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) - if err != nil { - return "", err - } - it.items = append(it.items, items...) - return nextPageToken, nil - } - - it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) - it.pageInfo.MaxSize = int(req.GetPageSize()) - it.pageInfo.Token = req.GetPageToken() - - return it -} - -func (c *dashboardsGRPCClient) GetDashboard(ctx context.Context, req *dashboardpb.GetDashboardRequest, opts ...gax.CallOption) (*dashboardpb.Dashboard, error) { - hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))} - - hds = append(c.xGoogHeaders, hds...) - ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) - opts = append((*c.CallOptions).GetDashboard[0:len((*c.CallOptions).GetDashboard):len((*c.CallOptions).GetDashboard)], opts...) - var resp *dashboardpb.Dashboard - err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - var err error - resp, err = executeRPC(ctx, c.dashboardsClient.GetDashboard, req, settings.GRPC, c.logger, "GetDashboard") - return err - }, opts...) - if err != nil { - return nil, err - } - return resp, nil -} - -func (c *dashboardsGRPCClient) DeleteDashboard(ctx context.Context, req *dashboardpb.DeleteDashboardRequest, opts ...gax.CallOption) error { - hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))} - - hds = append(c.xGoogHeaders, hds...) - ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) - opts = append((*c.CallOptions).DeleteDashboard[0:len((*c.CallOptions).DeleteDashboard):len((*c.CallOptions).DeleteDashboard)], opts...) - err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - var err error - _, err = executeRPC(ctx, c.dashboardsClient.DeleteDashboard, req, settings.GRPC, c.logger, "DeleteDashboard") - return err - }, opts...) - return err -} - -func (c *dashboardsGRPCClient) UpdateDashboard(ctx context.Context, req *dashboardpb.UpdateDashboardRequest, opts ...gax.CallOption) (*dashboardpb.Dashboard, error) { - hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "dashboard.name", url.QueryEscape(req.GetDashboard().GetName()))} - - hds = append(c.xGoogHeaders, hds...) - ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) - opts = append((*c.CallOptions).UpdateDashboard[0:len((*c.CallOptions).UpdateDashboard):len((*c.CallOptions).UpdateDashboard)], opts...) - var resp *dashboardpb.Dashboard - err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - var err error - resp, err = executeRPC(ctx, c.dashboardsClient.UpdateDashboard, req, settings.GRPC, c.logger, "UpdateDashboard") - return err - }, opts...) - if err != nil { - return nil, err - } - return resp, nil -} - -// CreateDashboard creates a new custom dashboard. For examples on how you can use this API to -// create dashboards, see Managing dashboards by -// API (at https://cloud.google.com/monitoring/dashboards/api-dashboard). This -// method requires the monitoring.dashboards.create permission on the -// specified project. For more information about permissions, see Cloud -// Identity and Access Management (at https://cloud.google.com/iam). -func (c *dashboardsRESTClient) CreateDashboard(ctx context.Context, req *dashboardpb.CreateDashboardRequest, opts ...gax.CallOption) (*dashboardpb.Dashboard, error) { - m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} - body := req.GetDashboard() - jsonReq, err := m.Marshal(body) - if err != nil { - return nil, err - } - - baseUrl, err := url.Parse(c.endpoint) - if err != nil { - return nil, err - } - baseUrl.Path += fmt.Sprintf("/v1/%v/dashboards", req.GetParent()) - - params := url.Values{} - params.Add("$alt", "json;enum-encoding=int") - if req.GetValidateOnly() { - params.Add("validateOnly", fmt.Sprintf("%v", req.GetValidateOnly())) - } - - baseUrl.RawQuery = params.Encode() - - // Build HTTP headers from client and context metadata. - hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))} - - hds = append(c.xGoogHeaders, hds...) - hds = append(hds, "Content-Type", "application/json") - headers := gax.BuildHeaders(ctx, hds...) - opts = append((*c.CallOptions).CreateDashboard[0:len((*c.CallOptions).CreateDashboard):len((*c.CallOptions).CreateDashboard)], opts...) - unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} - resp := &dashboardpb.Dashboard{} - e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - if settings.Path != "" { - baseUrl.Path = settings.Path - } - httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) - if err != nil { - return err - } - httpReq = httpReq.WithContext(ctx) - httpReq.Header = headers - - buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateDashboard") - if err != nil { - return err - } - - if err := unm.Unmarshal(buf, resp); err != nil { - return err - } - - return nil - }, opts...) - if e != nil { - return nil, e - } - return resp, nil -} - -// ListDashboards lists the existing dashboards. -// -// This method requires the monitoring.dashboards.list permission -// on the specified project. For more information, see -// Cloud Identity and Access Management (at https://cloud.google.com/iam). -func (c *dashboardsRESTClient) ListDashboards(ctx context.Context, req *dashboardpb.ListDashboardsRequest, opts ...gax.CallOption) *DashboardIterator { - it := &DashboardIterator{} - req = proto.Clone(req).(*dashboardpb.ListDashboardsRequest) - unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} - it.InternalFetch = func(pageSize int, pageToken string) ([]*dashboardpb.Dashboard, string, error) { - resp := &dashboardpb.ListDashboardsResponse{} - if pageToken != "" { - req.PageToken = pageToken - } - if pageSize > math.MaxInt32 { - req.PageSize = math.MaxInt32 - } else if pageSize != 0 { - req.PageSize = int32(pageSize) - } - baseUrl, err := url.Parse(c.endpoint) - if err != nil { - return nil, "", err - } - baseUrl.Path += fmt.Sprintf("/v1/%v/dashboards", req.GetParent()) - - params := url.Values{} - params.Add("$alt", "json;enum-encoding=int") - if req.GetPageSize() != 0 { - params.Add("pageSize", fmt.Sprintf("%v", req.GetPageSize())) - } - if req.GetPageToken() != "" { - params.Add("pageToken", fmt.Sprintf("%v", req.GetPageToken())) - } - - baseUrl.RawQuery = params.Encode() - - // Build HTTP headers from client and context metadata. - hds := append(c.xGoogHeaders, "Content-Type", "application/json") - headers := gax.BuildHeaders(ctx, hds...) - e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - if settings.Path != "" { - baseUrl.Path = settings.Path - } - httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) - if err != nil { - return err - } - httpReq.Header = headers - - buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListDashboards") - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { - return err - } - - return nil - }, opts...) - if e != nil { - return nil, "", e - } - it.Response = resp - return resp.GetDashboards(), resp.GetNextPageToken(), nil - } - - fetch := func(pageSize int, pageToken string) (string, error) { - items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) - if err != nil { - return "", err - } - it.items = append(it.items, items...) - return nextPageToken, nil - } - - it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) - it.pageInfo.MaxSize = int(req.GetPageSize()) - it.pageInfo.Token = req.GetPageToken() - - return it -} - -// GetDashboard fetches a specific dashboard. -// -// This method requires the monitoring.dashboards.get permission -// on the specified dashboard. For more information, see -// Cloud Identity and Access Management (at https://cloud.google.com/iam). -func (c *dashboardsRESTClient) GetDashboard(ctx context.Context, req *dashboardpb.GetDashboardRequest, opts ...gax.CallOption) (*dashboardpb.Dashboard, error) { - baseUrl, err := url.Parse(c.endpoint) - if err != nil { - return nil, err - } - baseUrl.Path += fmt.Sprintf("/v1/%v", req.GetName()) - - params := url.Values{} - params.Add("$alt", "json;enum-encoding=int") - - baseUrl.RawQuery = params.Encode() - - // Build HTTP headers from client and context metadata. - hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))} - - hds = append(c.xGoogHeaders, hds...) - hds = append(hds, "Content-Type", "application/json") - headers := gax.BuildHeaders(ctx, hds...) - opts = append((*c.CallOptions).GetDashboard[0:len((*c.CallOptions).GetDashboard):len((*c.CallOptions).GetDashboard)], opts...) - unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} - resp := &dashboardpb.Dashboard{} - e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - if settings.Path != "" { - baseUrl.Path = settings.Path - } - httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) - if err != nil { - return err - } - httpReq = httpReq.WithContext(ctx) - httpReq.Header = headers - - buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetDashboard") - if err != nil { - return err - } - - if err := unm.Unmarshal(buf, resp); err != nil { - return err - } - - return nil - }, opts...) - if e != nil { - return nil, e - } - return resp, nil -} - -// DeleteDashboard deletes an existing custom dashboard. -// -// This method requires the monitoring.dashboards.delete permission -// on the specified dashboard. For more information, see -// Cloud Identity and Access Management (at https://cloud.google.com/iam). -func (c *dashboardsRESTClient) DeleteDashboard(ctx context.Context, req *dashboardpb.DeleteDashboardRequest, opts ...gax.CallOption) error { - baseUrl, err := url.Parse(c.endpoint) - if err != nil { - return err - } - baseUrl.Path += fmt.Sprintf("/v1/%v", req.GetName()) - - params := url.Values{} - params.Add("$alt", "json;enum-encoding=int") - - baseUrl.RawQuery = params.Encode() - - // Build HTTP headers from client and context metadata. - hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))} - - hds = append(c.xGoogHeaders, hds...) - hds = append(hds, "Content-Type", "application/json") - headers := gax.BuildHeaders(ctx, hds...) - return gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - if settings.Path != "" { - baseUrl.Path = settings.Path - } - httpReq, err := http.NewRequest("DELETE", baseUrl.String(), nil) - if err != nil { - return err - } - httpReq = httpReq.WithContext(ctx) - httpReq.Header = headers - - _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteDashboard") - return err - }, opts...) -} - -// UpdateDashboard replaces an existing custom dashboard with a new definition. -// -// This method requires the monitoring.dashboards.update permission -// on the specified dashboard. For more information, see -// Cloud Identity and Access Management (at https://cloud.google.com/iam). -func (c *dashboardsRESTClient) UpdateDashboard(ctx context.Context, req *dashboardpb.UpdateDashboardRequest, opts ...gax.CallOption) (*dashboardpb.Dashboard, error) { - m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} - body := req.GetDashboard() - jsonReq, err := m.Marshal(body) - if err != nil { - return nil, err - } - - baseUrl, err := url.Parse(c.endpoint) - if err != nil { - return nil, err - } - baseUrl.Path += fmt.Sprintf("/v1/%v", req.GetDashboard().GetName()) - - params := url.Values{} - params.Add("$alt", "json;enum-encoding=int") - if req.GetValidateOnly() { - params.Add("validateOnly", fmt.Sprintf("%v", req.GetValidateOnly())) - } - - baseUrl.RawQuery = params.Encode() - - // Build HTTP headers from client and context metadata. - hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "dashboard.name", url.QueryEscape(req.GetDashboard().GetName()))} - - hds = append(c.xGoogHeaders, hds...) - hds = append(hds, "Content-Type", "application/json") - headers := gax.BuildHeaders(ctx, hds...) - opts = append((*c.CallOptions).UpdateDashboard[0:len((*c.CallOptions).UpdateDashboard):len((*c.CallOptions).UpdateDashboard)], opts...) - unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} - resp := &dashboardpb.Dashboard{} - e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - if settings.Path != "" { - baseUrl.Path = settings.Path - } - httpReq, err := http.NewRequest("PATCH", baseUrl.String(), bytes.NewReader(jsonReq)) - if err != nil { - return err - } - httpReq = httpReq.WithContext(ctx) - httpReq.Header = headers - - buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateDashboard") - if err != nil { - return err - } - - if err := unm.Unmarshal(buf, resp); err != nil { - return err - } - - return nil - }, opts...) - if e != nil { - return nil, e - } - return resp, nil -} diff --git a/vendor/cloud.google.com/go/monitoring/dashboard/apiv1/doc.go b/vendor/cloud.google.com/go/monitoring/dashboard/apiv1/doc.go deleted file mode 100644 index 972bdb33fe..0000000000 --- a/vendor/cloud.google.com/go/monitoring/dashboard/apiv1/doc.go +++ /dev/null @@ -1,83 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Code generated by protoc-gen-go_gapic. DO NOT EDIT. - -// Package dashboard is an auto-generated package for the -// Cloud Monitoring API. -// -// Manages your Cloud Monitoring data and configurations. -// -// # General documentation -// -// For information that is relevant for all client libraries please reference -// https://pkg.go.dev/cloud.google.com/go#pkg-overview. Some information on this -// page includes: -// -// - [Authentication and Authorization] -// - [Timeouts and Cancellation] -// - [Testing against Client Libraries] -// - [Debugging Client Libraries] -// - [Inspecting errors] -// -// # Example usage -// -// To get started with this package, create a client. -// -// // go get cloud.google.com/go/monitoring/dashboard/apiv1@latest -// ctx := context.Background() -// // This snippet has been automatically generated and should be regarded as a code template only. -// // It will require modifications to work: -// // - It may require correct/in-range values for request initialization. -// // - It may require specifying regional endpoints when creating the service client as shown in: -// // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options -// c, err := dashboard.NewDashboardsClient(ctx) -// if err != nil { -// // TODO: Handle error. -// } -// defer c.Close() -// -// The client will use your default application credentials. Clients should be reused instead of created as needed. -// The methods of Client are safe for concurrent use by multiple goroutines. -// The returned client must be Closed when it is done being used. -// -// # Using the Client -// -// The following is an example of making an API call with the newly created client, mentioned above. -// -// req := &dashboardpb.CreateDashboardRequest{ -// // TODO: Fill request struct fields. -// // See https://pkg.go.dev/cloud.google.com/go/monitoring/dashboard/apiv1/dashboardpb#CreateDashboardRequest. -// } -// resp, err := c.CreateDashboard(ctx, req) -// if err != nil { -// // TODO: Handle error. -// } -// // TODO: Use resp. -// _ = resp -// -// # Use of Context -// -// The ctx passed to NewDashboardsClient is used for authentication requests and -// for creating the underlying connection, but is not used for subsequent calls. -// Individual methods on the client use the ctx given to them. -// -// To close the open connection, use the Close() method. -// -// [Authentication and Authorization]: https://pkg.go.dev/cloud.google.com/go#hdr-Authentication_and_Authorization -// [Timeouts and Cancellation]: https://pkg.go.dev/cloud.google.com/go#hdr-Timeouts_and_Cancellation -// [Testing against Client Libraries]: https://pkg.go.dev/cloud.google.com/go#hdr-Testing -// [Debugging Client Libraries]: https://pkg.go.dev/cloud.google.com/go#hdr-Debugging -// [Inspecting errors]: https://pkg.go.dev/cloud.google.com/go#hdr-Inspecting_errors -package dashboard // import "cloud.google.com/go/monitoring/dashboard/apiv1" diff --git a/vendor/cloud.google.com/go/monitoring/dashboard/apiv1/gapic_metadata.json b/vendor/cloud.google.com/go/monitoring/dashboard/apiv1/gapic_metadata.json deleted file mode 100644 index 8e22576143..0000000000 --- a/vendor/cloud.google.com/go/monitoring/dashboard/apiv1/gapic_metadata.json +++ /dev/null @@ -1,73 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods.", - "language": "go", - "protoPackage": "google.monitoring.dashboard.v1", - "libraryPackage": "cloud.google.com/go/monitoring/dashboard/apiv1", - "services": { - "DashboardsService": { - "clients": { - "grpc": { - "libraryClient": "DashboardsClient", - "rpcs": { - "CreateDashboard": { - "methods": [ - "CreateDashboard" - ] - }, - "DeleteDashboard": { - "methods": [ - "DeleteDashboard" - ] - }, - "GetDashboard": { - "methods": [ - "GetDashboard" - ] - }, - "ListDashboards": { - "methods": [ - "ListDashboards" - ] - }, - "UpdateDashboard": { - "methods": [ - "UpdateDashboard" - ] - } - } - }, - "rest": { - "libraryClient": "DashboardsClient", - "rpcs": { - "CreateDashboard": { - "methods": [ - "CreateDashboard" - ] - }, - "DeleteDashboard": { - "methods": [ - "DeleteDashboard" - ] - }, - "GetDashboard": { - "methods": [ - "GetDashboard" - ] - }, - "ListDashboards": { - "methods": [ - "ListDashboards" - ] - }, - "UpdateDashboard": { - "methods": [ - "UpdateDashboard" - ] - } - } - } - } - } - } -} diff --git a/vendor/cloud.google.com/go/monitoring/dashboard/apiv1/helpers.go b/vendor/cloud.google.com/go/monitoring/dashboard/apiv1/helpers.go deleted file mode 100644 index aeaf066570..0000000000 --- a/vendor/cloud.google.com/go/monitoring/dashboard/apiv1/helpers.go +++ /dev/null @@ -1,108 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Code generated by protoc-gen-go_gapic. DO NOT EDIT. - -package dashboard - -import ( - "context" - "fmt" - "io" - "log/slog" - "net/http" - - "github.com/googleapis/gax-go/v2/internallog" - "github.com/googleapis/gax-go/v2/internallog/grpclog" - "google.golang.org/api/googleapi" - "google.golang.org/api/option" - "google.golang.org/grpc" - "google.golang.org/protobuf/proto" - "google.golang.org/protobuf/runtime/protoimpl" -) - -const serviceName = "monitoring.googleapis.com" - -var protoVersion = fmt.Sprintf("1.%d", protoimpl.MaxVersion) - -// For more information on implementing a client constructor hook, see -// https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. -type clientHookParams struct{} -type clientHook func(context.Context, clientHookParams) ([]option.ClientOption, error) - -var versionClient string - -func getVersionClient() string { - if versionClient == "" { - return "UNKNOWN" - } - return versionClient -} - -// DefaultAuthScopes reports the default set of authentication scopes to use with this package. -func DefaultAuthScopes() []string { - return []string{ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/monitoring", - "https://www.googleapis.com/auth/monitoring.read", - "https://www.googleapis.com/auth/monitoring.write", - } -} - -func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { - logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) - resp, err := client.Do(req) - if err != nil { - return nil, nil, err - } - defer resp.Body.Close() - buf, err := io.ReadAll(resp.Body) - if err != nil { - return nil, nil, err - } - logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, buf)) - if err = googleapi.CheckResponseWithBody(resp, buf); err != nil { - return nil, nil, err - } - return buf, resp, nil -} - -func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { - buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) - return buf, err -} - -func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { - logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) - resp, err := client.Do(req) - if err != nil { - return nil, err - } - logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) - if err = googleapi.CheckResponse(resp); err != nil { - return nil, err - } - return resp, nil -} - -func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { - var zero O - logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) - resp, err := fn(ctx, req, opts...) - if err != nil { - return zero, err - } - logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) - return resp, err -} diff --git a/vendor/cloud.google.com/go/monitoring/dashboard/apiv1/version.go b/vendor/cloud.google.com/go/monitoring/dashboard/apiv1/version.go deleted file mode 100644 index 00cb4faa76..0000000000 --- a/vendor/cloud.google.com/go/monitoring/dashboard/apiv1/version.go +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright 2023 Google LLC -// -// Licensed under the Apache License, Version 2.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. - -// Code generated by gapicgen. DO NOT EDIT. - -package dashboard - -import "cloud.google.com/go/monitoring/internal" - -func init() { - versionClient = internal.Version -} diff --git a/vendor/cloud.google.com/go/release-please-config-individual.json b/vendor/cloud.google.com/go/release-please-config-individual.json deleted file mode 100644 index 32ea9f8208..0000000000 --- a/vendor/cloud.google.com/go/release-please-config-individual.json +++ /dev/null @@ -1,59 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json", - "release-type": "go-yoshi", - "include-component-in-tag": true, - "separate-pull-requests": true, - "tag-separator": "/", - "packages": { - "auth": { - "component": "auth" - }, - "auth/oauth2adapt": { - "component": "auth/oauth2adapt" - }, - "bigquery": { - "component": "bigquery", - "exclude-paths": ["bigquery/v2"] - }, - "bigtable": { - "component": "bigtable" - }, - "datastore": { - "component": "datastore" - }, - "errorreporting": { - "component": "errorreporting" - }, - "firestore": { - "component": "firestore" - }, - "logging": { - "component": "logging" - }, - "profiler": { - "component": "profiler" - }, - "pubsub": { - "component": "pubsub", - "exclude-paths": ["pubsub/v2"] - }, - "pubsub/v2": { - "component": "pubsub/v2" - }, - "pubsublite": { - "component": "pubsublite" - }, - "spanner": { - "component": "spanner" - }, - "storage": { - "component": "storage" - }, - "vertexai": { - "component": "vertexai" - } - }, - "plugins": [ - "sentence-case" - ] -} diff --git a/vendor/cloud.google.com/go/release-please-config-yoshi-submodules.json b/vendor/cloud.google.com/go/release-please-config-yoshi-submodules.json deleted file mode 100644 index a0b13db025..0000000000 --- a/vendor/cloud.google.com/go/release-please-config-yoshi-submodules.json +++ /dev/null @@ -1,502 +0,0 @@ -{ - "release-type": "go-yoshi", - "include-component-in-tag": true, - "tag-separator": "/", - "packages": { - "accessapproval": { - "component": "accessapproval" - }, - "accesscontextmanager": { - "component": "accesscontextmanager" - }, - "advisorynotifications": { - "component": "advisorynotifications" - }, - "ai": { - "component": "ai" - }, - "aiplatform": { - "component": "aiplatform" - }, - "alloydb": { - "component": "alloydb" - }, - "analytics": { - "component": "analytics" - }, - "apigateway": { - "component": "apigateway" - }, - "apigeeconnect": { - "component": "apigeeconnect" - }, - "apigeeregistry": { - "component": "apigeeregistry" - }, - "apihub": { - "component": "apihub" - }, - "apikeys": { - "component": "apikeys" - }, - "appengine": { - "component": "appengine" - }, - "apphub": { - "component": "apphub" - }, - "apps": { - "component": "apps" - }, - "area120": { - "component": "area120" - }, - "artifactregistry": { - "component": "artifactregistry" - }, - "asset": { - "component": "asset" - }, - "assuredworkloads": { - "component": "assuredworkloads" - }, - "automl": { - "component": "automl" - }, - "backupdr": { - "component": "backupdr" - }, - "baremetalsolution": { - "component": "baremetalsolution" - }, - "batch": { - "component": "batch" - }, - "beyondcorp": { - "component": "beyondcorp" - }, - "billing": { - "component": "billing" - }, - "binaryauthorization": { - "component": "binaryauthorization" - }, - "capacityplanner": { - "component": "capacityplanner" - }, - "certificatemanager": { - "component": "certificatemanager" - }, - "channel": { - "component": "channel" - }, - "chat": { - "component": "chat" - }, - "chronicle": { - "component": "chronicle" - }, - "cloudbuild": { - "component": "cloudbuild" - }, - "cloudcontrolspartner": { - "component": "cloudcontrolspartner" - }, - "clouddms": { - "component": "clouddms" - }, - "cloudprofiler": { - "component": "cloudprofiler" - }, - "cloudquotas": { - "component": "cloudquotas" - }, - "cloudtasks": { - "component": "cloudtasks" - }, - "commerce": { - "component": "commerce" - }, - "compute": { - "component": "compute" - }, - "compute/metadata": { - "component": "compute/metadata" - }, - "confidentialcomputing": { - "component": "confidentialcomputing" - }, - "config": { - "component": "config" - }, - "configdelivery": { - "component": "configdelivery" - }, - "contactcenterinsights": { - "component": "contactcenterinsights" - }, - "container": { - "component": "container" - }, - "containeranalysis": { - "component": "containeranalysis" - }, - "datacatalog": { - "component": "datacatalog" - }, - "dataflow": { - "component": "dataflow" - }, - "dataform": { - "component": "dataform" - }, - "datafusion": { - "component": "datafusion" - }, - "datalabeling": { - "component": "datalabeling" - }, - "dataplex": { - "component": "dataplex" - }, - "dataproc": { - "component": "dataproc" - }, - "dataqna": { - "component": "dataqna" - }, - "datastream": { - "component": "datastream" - }, - "deploy": { - "component": "deploy" - }, - "developerconnect": { - "component": "developerconnect" - }, - "devicestreaming": { - "component": "devicestreaming" - }, - "dialogflow": { - "component": "dialogflow" - }, - "discoveryengine": { - "component": "discoveryengine" - }, - "documentai": { - "component": "documentai" - }, - "domains": { - "component": "domains" - }, - "edgecontainer": { - "component": "edgecontainer" - }, - "edgenetwork": { - "component": "edgenetwork" - }, - "essentialcontacts": { - "component": "essentialcontacts" - }, - "eventarc": { - "component": "eventarc" - }, - "filestore": { - "component": "filestore" - }, - "financialservices": { - "component": "financialservices" - }, - "functions": { - "component": "functions" - }, - "geminidataanalytics": { - "component": "geminidataanalytics" - }, - "gkebackup": { - "component": "gkebackup" - }, - "gkeconnect": { - "component": "gkeconnect" - }, - "gkehub": { - "component": "gkehub" - }, - "gkemulticloud": { - "component": "gkemulticloud" - }, - "grafeas": { - "component": "grafeas" - }, - "gsuiteaddons": { - "component": "gsuiteaddons" - }, - "iam": { - "component": "iam" - }, - "iap": { - "component": "iap" - }, - "identitytoolkit": { - "component": "identitytoolkit" - }, - "ids": { - "component": "ids" - }, - "iot": { - "component": "iot" - }, - "kms": { - "component": "kms" - }, - "language": { - "component": "language" - }, - "licensemanager": { - "component": "licensemanager" - }, - "lifesciences": { - "component": "lifesciences" - }, - "locationfinder": { - "component": "locationfinder" - }, - "longrunning": { - "component": "longrunning" - }, - "lustre": { - "component": "lustre" - }, - "maintenance": { - "component": "maintenance" - }, - "managedidentities": { - "component": "managedidentities" - }, - "managedkafka": { - "component": "managedkafka" - }, - "maps": { - "component": "maps" - }, - "mediatranslation": { - "component": "mediatranslation" - }, - "memcache": { - "component": "memcache" - }, - "memorystore": { - "component": "memorystore" - }, - "metastore": { - "component": "metastore" - }, - "migrationcenter": { - "component": "migrationcenter" - }, - "modelarmor": { - "component": "modelarmor" - }, - "monitoring": { - "component": "monitoring" - }, - "netapp": { - "component": "netapp" - }, - "networkconnectivity": { - "component": "networkconnectivity" - }, - "networkmanagement": { - "component": "networkmanagement" - }, - "networksecurity": { - "component": "networksecurity" - }, - "networkservices": { - "component": "networkservices" - }, - "notebooks": { - "component": "notebooks" - }, - "optimization": { - "component": "optimization" - }, - "oracledatabase": { - "component": "oracledatabase" - }, - "orchestration": { - "component": "orchestration" - }, - "orgpolicy": { - "component": "orgpolicy" - }, - "osconfig": { - "component": "osconfig" - }, - "oslogin": { - "component": "oslogin" - }, - "parallelstore": { - "component": "parallelstore" - }, - "parametermanager": { - "component": "parametermanager" - }, - "phishingprotection": { - "component": "phishingprotection" - }, - "policysimulator": { - "component": "policysimulator" - }, - "policytroubleshooter": { - "component": "policytroubleshooter" - }, - "privatecatalog": { - "component": "privatecatalog" - }, - "privilegedaccessmanager": { - "component": "privilegedaccessmanager" - }, - "rapidmigrationassessment": { - "component": "rapidmigrationassessment" - }, - "recaptchaenterprise": { - "component": "recaptchaenterprise" - }, - "recommendationengine": { - "component": "recommendationengine" - }, - "recommender": { - "component": "recommender" - }, - "redis": { - "component": "redis" - }, - "resourcemanager": { - "component": "resourcemanager" - }, - "retail": { - "component": "retail" - }, - "run": { - "component": "run" - }, - "scheduler": { - "component": "scheduler" - }, - "secretmanager": { - "component": "secretmanager" - }, - "securesourcemanager": { - "component": "securesourcemanager" - }, - "security": { - "component": "security" - }, - "securitycenter": { - "component": "securitycenter" - }, - "securitycentermanagement": { - "component": "securitycentermanagement" - }, - "securityposture": { - "component": "securityposture" - }, - "servicecontrol": { - "component": "servicecontrol" - }, - "servicedirectory": { - "component": "servicedirectory" - }, - "servicehealth": { - "component": "servicehealth" - }, - "servicemanagement": { - "component": "servicemanagement" - }, - "serviceusage": { - "component": "serviceusage" - }, - "shell": { - "component": "shell" - }, - "shopping": { - "component": "shopping" - }, - "spanner/benchmarks": { - "component": "spanner/benchmarks" - }, - "speech": { - "component": "speech" - }, - "storagebatchoperations": { - "component": "storagebatchoperations" - }, - "storageinsights": { - "component": "storageinsights" - }, - "storagetransfer": { - "component": "storagetransfer" - }, - "streetview": { - "component": "streetview" - }, - "support": { - "component": "support" - }, - "talent": { - "component": "talent" - }, - "telcoautomation": { - "component": "telcoautomation" - }, - "texttospeech": { - "component": "texttospeech" - }, - "tpu": { - "component": "tpu" - }, - "trace": { - "component": "trace" - }, - "translate": { - "component": "translate" - }, - "video": { - "component": "video" - }, - "videointelligence": { - "component": "videointelligence" - }, - "vision": { - "component": "vision" - }, - "visionai": { - "component": "visionai" - }, - "vmmigration": { - "component": "vmmigration" - }, - "vmwareengine": { - "component": "vmwareengine" - }, - "vpcaccess": { - "component": "vpcaccess" - }, - "webrisk": { - "component": "webrisk" - }, - "websecurityscanner": { - "component": "websecurityscanner" - }, - "workflows": { - "component": "workflows" - }, - "workstations": { - "component": "workstations" - } - }, - "plugins": [ - "sentence-case" - ] -} diff --git a/vendor/cloud.google.com/go/release-please-config.json b/vendor/cloud.google.com/go/release-please-config.json deleted file mode 100644 index 1400245b8a..0000000000 --- a/vendor/cloud.google.com/go/release-please-config.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "release-type": "go-yoshi", - "separate-pull-requests": true, - "include-component-in-tag": false, - "packages": { - ".": { - "component": "main" - } - }, - "plugins": ["sentence-case"] -} diff --git a/vendor/cloud.google.com/go/resourcemanager/LICENSE b/vendor/cloud.google.com/go/resourcemanager/LICENSE deleted file mode 100644 index d645695673..0000000000 --- a/vendor/cloud.google.com/go/resourcemanager/LICENSE +++ /dev/null @@ -1,202 +0,0 @@ - - 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/vendor/cloud.google.com/go/resourcemanager/apiv3/.repo-metadata.json b/vendor/cloud.google.com/go/resourcemanager/apiv3/.repo-metadata.json deleted file mode 100644 index 2984af6e02..0000000000 --- a/vendor/cloud.google.com/go/resourcemanager/apiv3/.repo-metadata.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "api_shortname": "cloudresourcemanager", - "client_documentation": "https://cloud.google.com/go/docs/reference/cloud.google.com/go/resourcemanager/latest/apiv3", - "client_library_type": "generated", - "description": "Cloud Resource Manager API", - "distribution_name": "cloud.google.com/go/resourcemanager/apiv3", - "language": "go", - "library_type": "GAPIC_AUTO", - "release_level": "stable" -} \ No newline at end of file diff --git a/vendor/cloud.google.com/go/resourcemanager/apiv3/auxiliary.go b/vendor/cloud.google.com/go/resourcemanager/apiv3/auxiliary.go deleted file mode 100644 index 9d749bcb38..0000000000 --- a/vendor/cloud.google.com/go/resourcemanager/apiv3/auxiliary.go +++ /dev/null @@ -1,1661 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Code generated by protoc-gen-go_gapic. DO NOT EDIT. - -package resourcemanager - -import ( - "context" - "time" - - "cloud.google.com/go/longrunning" - resourcemanagerpb "cloud.google.com/go/resourcemanager/apiv3/resourcemanagerpb" - gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/iterator" -) - -// CreateFolderOperation manages a long-running operation from CreateFolder. -type CreateFolderOperation struct { - lro *longrunning.Operation - pollPath string -} - -// Wait blocks until the long-running operation is completed, returning the response and any errors encountered. -// -// See documentation of Poll for error-handling information. -func (op *CreateFolderOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*resourcemanagerpb.Folder, error) { - opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) - var resp resourcemanagerpb.Folder - if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil { - return nil, err - } - return &resp, nil -} - -// Poll fetches the latest state of the long-running operation. -// -// Poll also fetches the latest metadata, which can be retrieved by Metadata. -// -// If Poll fails, the error is returned and op is unmodified. If Poll succeeds and -// the operation has completed with failure, the error is returned and op.Done will return true. -// If Poll succeeds and the operation has completed successfully, -// op.Done will return true, and the response of the operation is returned. -// If Poll succeeds and the operation has not completed, the returned response and error are both nil. -func (op *CreateFolderOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*resourcemanagerpb.Folder, error) { - opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) - var resp resourcemanagerpb.Folder - if err := op.lro.Poll(ctx, &resp, opts...); err != nil { - return nil, err - } - if !op.Done() { - return nil, nil - } - return &resp, nil -} - -// Metadata returns metadata associated with the long-running operation. -// Metadata itself does not contact the server, but Poll does. -// To get the latest metadata, call this method after a successful call to Poll. -// If the metadata is not available, the returned metadata and error are both nil. -func (op *CreateFolderOperation) Metadata() (*resourcemanagerpb.CreateFolderMetadata, error) { - var meta resourcemanagerpb.CreateFolderMetadata - if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata { - return nil, nil - } else if err != nil { - return nil, err - } - return &meta, nil -} - -// Done reports whether the long-running operation has completed. -func (op *CreateFolderOperation) Done() bool { - return op.lro.Done() -} - -// Name returns the name of the long-running operation. -// The name is assigned by the server and is unique within the service from which the operation is created. -func (op *CreateFolderOperation) Name() string { - return op.lro.Name() -} - -// CreateProjectOperation manages a long-running operation from CreateProject. -type CreateProjectOperation struct { - lro *longrunning.Operation - pollPath string -} - -// Wait blocks until the long-running operation is completed, returning the response and any errors encountered. -// -// See documentation of Poll for error-handling information. -func (op *CreateProjectOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*resourcemanagerpb.Project, error) { - opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) - var resp resourcemanagerpb.Project - if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil { - return nil, err - } - return &resp, nil -} - -// Poll fetches the latest state of the long-running operation. -// -// Poll also fetches the latest metadata, which can be retrieved by Metadata. -// -// If Poll fails, the error is returned and op is unmodified. If Poll succeeds and -// the operation has completed with failure, the error is returned and op.Done will return true. -// If Poll succeeds and the operation has completed successfully, -// op.Done will return true, and the response of the operation is returned. -// If Poll succeeds and the operation has not completed, the returned response and error are both nil. -func (op *CreateProjectOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*resourcemanagerpb.Project, error) { - opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) - var resp resourcemanagerpb.Project - if err := op.lro.Poll(ctx, &resp, opts...); err != nil { - return nil, err - } - if !op.Done() { - return nil, nil - } - return &resp, nil -} - -// Metadata returns metadata associated with the long-running operation. -// Metadata itself does not contact the server, but Poll does. -// To get the latest metadata, call this method after a successful call to Poll. -// If the metadata is not available, the returned metadata and error are both nil. -func (op *CreateProjectOperation) Metadata() (*resourcemanagerpb.CreateProjectMetadata, error) { - var meta resourcemanagerpb.CreateProjectMetadata - if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata { - return nil, nil - } else if err != nil { - return nil, err - } - return &meta, nil -} - -// Done reports whether the long-running operation has completed. -func (op *CreateProjectOperation) Done() bool { - return op.lro.Done() -} - -// Name returns the name of the long-running operation. -// The name is assigned by the server and is unique within the service from which the operation is created. -func (op *CreateProjectOperation) Name() string { - return op.lro.Name() -} - -// CreateTagBindingOperation manages a long-running operation from CreateTagBinding. -type CreateTagBindingOperation struct { - lro *longrunning.Operation - pollPath string -} - -// Wait blocks until the long-running operation is completed, returning the response and any errors encountered. -// -// See documentation of Poll for error-handling information. -func (op *CreateTagBindingOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*resourcemanagerpb.TagBinding, error) { - opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) - var resp resourcemanagerpb.TagBinding - if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil { - return nil, err - } - return &resp, nil -} - -// Poll fetches the latest state of the long-running operation. -// -// Poll also fetches the latest metadata, which can be retrieved by Metadata. -// -// If Poll fails, the error is returned and op is unmodified. If Poll succeeds and -// the operation has completed with failure, the error is returned and op.Done will return true. -// If Poll succeeds and the operation has completed successfully, -// op.Done will return true, and the response of the operation is returned. -// If Poll succeeds and the operation has not completed, the returned response and error are both nil. -func (op *CreateTagBindingOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*resourcemanagerpb.TagBinding, error) { - opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) - var resp resourcemanagerpb.TagBinding - if err := op.lro.Poll(ctx, &resp, opts...); err != nil { - return nil, err - } - if !op.Done() { - return nil, nil - } - return &resp, nil -} - -// Metadata returns metadata associated with the long-running operation. -// Metadata itself does not contact the server, but Poll does. -// To get the latest metadata, call this method after a successful call to Poll. -// If the metadata is not available, the returned metadata and error are both nil. -func (op *CreateTagBindingOperation) Metadata() (*resourcemanagerpb.CreateTagBindingMetadata, error) { - var meta resourcemanagerpb.CreateTagBindingMetadata - if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata { - return nil, nil - } else if err != nil { - return nil, err - } - return &meta, nil -} - -// Done reports whether the long-running operation has completed. -func (op *CreateTagBindingOperation) Done() bool { - return op.lro.Done() -} - -// Name returns the name of the long-running operation. -// The name is assigned by the server and is unique within the service from which the operation is created. -func (op *CreateTagBindingOperation) Name() string { - return op.lro.Name() -} - -// CreateTagHoldOperation manages a long-running operation from CreateTagHold. -type CreateTagHoldOperation struct { - lro *longrunning.Operation - pollPath string -} - -// Wait blocks until the long-running operation is completed, returning the response and any errors encountered. -// -// See documentation of Poll for error-handling information. -func (op *CreateTagHoldOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*resourcemanagerpb.TagHold, error) { - opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) - var resp resourcemanagerpb.TagHold - if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil { - return nil, err - } - return &resp, nil -} - -// Poll fetches the latest state of the long-running operation. -// -// Poll also fetches the latest metadata, which can be retrieved by Metadata. -// -// If Poll fails, the error is returned and op is unmodified. If Poll succeeds and -// the operation has completed with failure, the error is returned and op.Done will return true. -// If Poll succeeds and the operation has completed successfully, -// op.Done will return true, and the response of the operation is returned. -// If Poll succeeds and the operation has not completed, the returned response and error are both nil. -func (op *CreateTagHoldOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*resourcemanagerpb.TagHold, error) { - opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) - var resp resourcemanagerpb.TagHold - if err := op.lro.Poll(ctx, &resp, opts...); err != nil { - return nil, err - } - if !op.Done() { - return nil, nil - } - return &resp, nil -} - -// Metadata returns metadata associated with the long-running operation. -// Metadata itself does not contact the server, but Poll does. -// To get the latest metadata, call this method after a successful call to Poll. -// If the metadata is not available, the returned metadata and error are both nil. -func (op *CreateTagHoldOperation) Metadata() (*resourcemanagerpb.CreateTagHoldMetadata, error) { - var meta resourcemanagerpb.CreateTagHoldMetadata - if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata { - return nil, nil - } else if err != nil { - return nil, err - } - return &meta, nil -} - -// Done reports whether the long-running operation has completed. -func (op *CreateTagHoldOperation) Done() bool { - return op.lro.Done() -} - -// Name returns the name of the long-running operation. -// The name is assigned by the server and is unique within the service from which the operation is created. -func (op *CreateTagHoldOperation) Name() string { - return op.lro.Name() -} - -// CreateTagKeyOperation manages a long-running operation from CreateTagKey. -type CreateTagKeyOperation struct { - lro *longrunning.Operation - pollPath string -} - -// Wait blocks until the long-running operation is completed, returning the response and any errors encountered. -// -// See documentation of Poll for error-handling information. -func (op *CreateTagKeyOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*resourcemanagerpb.TagKey, error) { - opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) - var resp resourcemanagerpb.TagKey - if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil { - return nil, err - } - return &resp, nil -} - -// Poll fetches the latest state of the long-running operation. -// -// Poll also fetches the latest metadata, which can be retrieved by Metadata. -// -// If Poll fails, the error is returned and op is unmodified. If Poll succeeds and -// the operation has completed with failure, the error is returned and op.Done will return true. -// If Poll succeeds and the operation has completed successfully, -// op.Done will return true, and the response of the operation is returned. -// If Poll succeeds and the operation has not completed, the returned response and error are both nil. -func (op *CreateTagKeyOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*resourcemanagerpb.TagKey, error) { - opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) - var resp resourcemanagerpb.TagKey - if err := op.lro.Poll(ctx, &resp, opts...); err != nil { - return nil, err - } - if !op.Done() { - return nil, nil - } - return &resp, nil -} - -// Metadata returns metadata associated with the long-running operation. -// Metadata itself does not contact the server, but Poll does. -// To get the latest metadata, call this method after a successful call to Poll. -// If the metadata is not available, the returned metadata and error are both nil. -func (op *CreateTagKeyOperation) Metadata() (*resourcemanagerpb.CreateTagKeyMetadata, error) { - var meta resourcemanagerpb.CreateTagKeyMetadata - if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata { - return nil, nil - } else if err != nil { - return nil, err - } - return &meta, nil -} - -// Done reports whether the long-running operation has completed. -func (op *CreateTagKeyOperation) Done() bool { - return op.lro.Done() -} - -// Name returns the name of the long-running operation. -// The name is assigned by the server and is unique within the service from which the operation is created. -func (op *CreateTagKeyOperation) Name() string { - return op.lro.Name() -} - -// CreateTagValueOperation manages a long-running operation from CreateTagValue. -type CreateTagValueOperation struct { - lro *longrunning.Operation - pollPath string -} - -// Wait blocks until the long-running operation is completed, returning the response and any errors encountered. -// -// See documentation of Poll for error-handling information. -func (op *CreateTagValueOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*resourcemanagerpb.TagValue, error) { - opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) - var resp resourcemanagerpb.TagValue - if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil { - return nil, err - } - return &resp, nil -} - -// Poll fetches the latest state of the long-running operation. -// -// Poll also fetches the latest metadata, which can be retrieved by Metadata. -// -// If Poll fails, the error is returned and op is unmodified. If Poll succeeds and -// the operation has completed with failure, the error is returned and op.Done will return true. -// If Poll succeeds and the operation has completed successfully, -// op.Done will return true, and the response of the operation is returned. -// If Poll succeeds and the operation has not completed, the returned response and error are both nil. -func (op *CreateTagValueOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*resourcemanagerpb.TagValue, error) { - opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) - var resp resourcemanagerpb.TagValue - if err := op.lro.Poll(ctx, &resp, opts...); err != nil { - return nil, err - } - if !op.Done() { - return nil, nil - } - return &resp, nil -} - -// Metadata returns metadata associated with the long-running operation. -// Metadata itself does not contact the server, but Poll does. -// To get the latest metadata, call this method after a successful call to Poll. -// If the metadata is not available, the returned metadata and error are both nil. -func (op *CreateTagValueOperation) Metadata() (*resourcemanagerpb.CreateTagValueMetadata, error) { - var meta resourcemanagerpb.CreateTagValueMetadata - if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata { - return nil, nil - } else if err != nil { - return nil, err - } - return &meta, nil -} - -// Done reports whether the long-running operation has completed. -func (op *CreateTagValueOperation) Done() bool { - return op.lro.Done() -} - -// Name returns the name of the long-running operation. -// The name is assigned by the server and is unique within the service from which the operation is created. -func (op *CreateTagValueOperation) Name() string { - return op.lro.Name() -} - -// DeleteFolderOperation manages a long-running operation from DeleteFolder. -type DeleteFolderOperation struct { - lro *longrunning.Operation - pollPath string -} - -// Wait blocks until the long-running operation is completed, returning the response and any errors encountered. -// -// See documentation of Poll for error-handling information. -func (op *DeleteFolderOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*resourcemanagerpb.Folder, error) { - opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) - var resp resourcemanagerpb.Folder - if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil { - return nil, err - } - return &resp, nil -} - -// Poll fetches the latest state of the long-running operation. -// -// Poll also fetches the latest metadata, which can be retrieved by Metadata. -// -// If Poll fails, the error is returned and op is unmodified. If Poll succeeds and -// the operation has completed with failure, the error is returned and op.Done will return true. -// If Poll succeeds and the operation has completed successfully, -// op.Done will return true, and the response of the operation is returned. -// If Poll succeeds and the operation has not completed, the returned response and error are both nil. -func (op *DeleteFolderOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*resourcemanagerpb.Folder, error) { - opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) - var resp resourcemanagerpb.Folder - if err := op.lro.Poll(ctx, &resp, opts...); err != nil { - return nil, err - } - if !op.Done() { - return nil, nil - } - return &resp, nil -} - -// Metadata returns metadata associated with the long-running operation. -// Metadata itself does not contact the server, but Poll does. -// To get the latest metadata, call this method after a successful call to Poll. -// If the metadata is not available, the returned metadata and error are both nil. -func (op *DeleteFolderOperation) Metadata() (*resourcemanagerpb.DeleteFolderMetadata, error) { - var meta resourcemanagerpb.DeleteFolderMetadata - if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata { - return nil, nil - } else if err != nil { - return nil, err - } - return &meta, nil -} - -// Done reports whether the long-running operation has completed. -func (op *DeleteFolderOperation) Done() bool { - return op.lro.Done() -} - -// Name returns the name of the long-running operation. -// The name is assigned by the server and is unique within the service from which the operation is created. -func (op *DeleteFolderOperation) Name() string { - return op.lro.Name() -} - -// DeleteProjectOperation manages a long-running operation from DeleteProject. -type DeleteProjectOperation struct { - lro *longrunning.Operation - pollPath string -} - -// Wait blocks until the long-running operation is completed, returning the response and any errors encountered. -// -// See documentation of Poll for error-handling information. -func (op *DeleteProjectOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*resourcemanagerpb.Project, error) { - opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) - var resp resourcemanagerpb.Project - if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil { - return nil, err - } - return &resp, nil -} - -// Poll fetches the latest state of the long-running operation. -// -// Poll also fetches the latest metadata, which can be retrieved by Metadata. -// -// If Poll fails, the error is returned and op is unmodified. If Poll succeeds and -// the operation has completed with failure, the error is returned and op.Done will return true. -// If Poll succeeds and the operation has completed successfully, -// op.Done will return true, and the response of the operation is returned. -// If Poll succeeds and the operation has not completed, the returned response and error are both nil. -func (op *DeleteProjectOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*resourcemanagerpb.Project, error) { - opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) - var resp resourcemanagerpb.Project - if err := op.lro.Poll(ctx, &resp, opts...); err != nil { - return nil, err - } - if !op.Done() { - return nil, nil - } - return &resp, nil -} - -// Metadata returns metadata associated with the long-running operation. -// Metadata itself does not contact the server, but Poll does. -// To get the latest metadata, call this method after a successful call to Poll. -// If the metadata is not available, the returned metadata and error are both nil. -func (op *DeleteProjectOperation) Metadata() (*resourcemanagerpb.DeleteProjectMetadata, error) { - var meta resourcemanagerpb.DeleteProjectMetadata - if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata { - return nil, nil - } else if err != nil { - return nil, err - } - return &meta, nil -} - -// Done reports whether the long-running operation has completed. -func (op *DeleteProjectOperation) Done() bool { - return op.lro.Done() -} - -// Name returns the name of the long-running operation. -// The name is assigned by the server and is unique within the service from which the operation is created. -func (op *DeleteProjectOperation) Name() string { - return op.lro.Name() -} - -// DeleteTagBindingOperation manages a long-running operation from DeleteTagBinding. -type DeleteTagBindingOperation struct { - lro *longrunning.Operation - pollPath string -} - -// Wait blocks until the long-running operation is completed, returning the response and any errors encountered. -// -// See documentation of Poll for error-handling information. -func (op *DeleteTagBindingOperation) Wait(ctx context.Context, opts ...gax.CallOption) error { - opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) - return op.lro.WaitWithInterval(ctx, nil, time.Minute, opts...) -} - -// Poll fetches the latest state of the long-running operation. -// -// Poll also fetches the latest metadata, which can be retrieved by Metadata. -// -// If Poll fails, the error is returned and op is unmodified. If Poll succeeds and -// the operation has completed with failure, the error is returned and op.Done will return true. -// If Poll succeeds and the operation has completed successfully, -// op.Done will return true, and the response of the operation is returned. -// If Poll succeeds and the operation has not completed, the returned response and error are both nil. -func (op *DeleteTagBindingOperation) Poll(ctx context.Context, opts ...gax.CallOption) error { - opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) - return op.lro.Poll(ctx, nil, opts...) -} - -// Metadata returns metadata associated with the long-running operation. -// Metadata itself does not contact the server, but Poll does. -// To get the latest metadata, call this method after a successful call to Poll. -// If the metadata is not available, the returned metadata and error are both nil. -func (op *DeleteTagBindingOperation) Metadata() (*resourcemanagerpb.DeleteTagBindingMetadata, error) { - var meta resourcemanagerpb.DeleteTagBindingMetadata - if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata { - return nil, nil - } else if err != nil { - return nil, err - } - return &meta, nil -} - -// Done reports whether the long-running operation has completed. -func (op *DeleteTagBindingOperation) Done() bool { - return op.lro.Done() -} - -// Name returns the name of the long-running operation. -// The name is assigned by the server and is unique within the service from which the operation is created. -func (op *DeleteTagBindingOperation) Name() string { - return op.lro.Name() -} - -// DeleteTagHoldOperation manages a long-running operation from DeleteTagHold. -type DeleteTagHoldOperation struct { - lro *longrunning.Operation - pollPath string -} - -// Wait blocks until the long-running operation is completed, returning the response and any errors encountered. -// -// See documentation of Poll for error-handling information. -func (op *DeleteTagHoldOperation) Wait(ctx context.Context, opts ...gax.CallOption) error { - opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) - return op.lro.WaitWithInterval(ctx, nil, time.Minute, opts...) -} - -// Poll fetches the latest state of the long-running operation. -// -// Poll also fetches the latest metadata, which can be retrieved by Metadata. -// -// If Poll fails, the error is returned and op is unmodified. If Poll succeeds and -// the operation has completed with failure, the error is returned and op.Done will return true. -// If Poll succeeds and the operation has completed successfully, -// op.Done will return true, and the response of the operation is returned. -// If Poll succeeds and the operation has not completed, the returned response and error are both nil. -func (op *DeleteTagHoldOperation) Poll(ctx context.Context, opts ...gax.CallOption) error { - opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) - return op.lro.Poll(ctx, nil, opts...) -} - -// Metadata returns metadata associated with the long-running operation. -// Metadata itself does not contact the server, but Poll does. -// To get the latest metadata, call this method after a successful call to Poll. -// If the metadata is not available, the returned metadata and error are both nil. -func (op *DeleteTagHoldOperation) Metadata() (*resourcemanagerpb.DeleteTagHoldMetadata, error) { - var meta resourcemanagerpb.DeleteTagHoldMetadata - if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata { - return nil, nil - } else if err != nil { - return nil, err - } - return &meta, nil -} - -// Done reports whether the long-running operation has completed. -func (op *DeleteTagHoldOperation) Done() bool { - return op.lro.Done() -} - -// Name returns the name of the long-running operation. -// The name is assigned by the server and is unique within the service from which the operation is created. -func (op *DeleteTagHoldOperation) Name() string { - return op.lro.Name() -} - -// DeleteTagKeyOperation manages a long-running operation from DeleteTagKey. -type DeleteTagKeyOperation struct { - lro *longrunning.Operation - pollPath string -} - -// Wait blocks until the long-running operation is completed, returning the response and any errors encountered. -// -// See documentation of Poll for error-handling information. -func (op *DeleteTagKeyOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*resourcemanagerpb.TagKey, error) { - opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) - var resp resourcemanagerpb.TagKey - if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil { - return nil, err - } - return &resp, nil -} - -// Poll fetches the latest state of the long-running operation. -// -// Poll also fetches the latest metadata, which can be retrieved by Metadata. -// -// If Poll fails, the error is returned and op is unmodified. If Poll succeeds and -// the operation has completed with failure, the error is returned and op.Done will return true. -// If Poll succeeds and the operation has completed successfully, -// op.Done will return true, and the response of the operation is returned. -// If Poll succeeds and the operation has not completed, the returned response and error are both nil. -func (op *DeleteTagKeyOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*resourcemanagerpb.TagKey, error) { - opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) - var resp resourcemanagerpb.TagKey - if err := op.lro.Poll(ctx, &resp, opts...); err != nil { - return nil, err - } - if !op.Done() { - return nil, nil - } - return &resp, nil -} - -// Metadata returns metadata associated with the long-running operation. -// Metadata itself does not contact the server, but Poll does. -// To get the latest metadata, call this method after a successful call to Poll. -// If the metadata is not available, the returned metadata and error are both nil. -func (op *DeleteTagKeyOperation) Metadata() (*resourcemanagerpb.DeleteTagKeyMetadata, error) { - var meta resourcemanagerpb.DeleteTagKeyMetadata - if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata { - return nil, nil - } else if err != nil { - return nil, err - } - return &meta, nil -} - -// Done reports whether the long-running operation has completed. -func (op *DeleteTagKeyOperation) Done() bool { - return op.lro.Done() -} - -// Name returns the name of the long-running operation. -// The name is assigned by the server and is unique within the service from which the operation is created. -func (op *DeleteTagKeyOperation) Name() string { - return op.lro.Name() -} - -// DeleteTagValueOperation manages a long-running operation from DeleteTagValue. -type DeleteTagValueOperation struct { - lro *longrunning.Operation - pollPath string -} - -// Wait blocks until the long-running operation is completed, returning the response and any errors encountered. -// -// See documentation of Poll for error-handling information. -func (op *DeleteTagValueOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*resourcemanagerpb.TagValue, error) { - opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) - var resp resourcemanagerpb.TagValue - if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil { - return nil, err - } - return &resp, nil -} - -// Poll fetches the latest state of the long-running operation. -// -// Poll also fetches the latest metadata, which can be retrieved by Metadata. -// -// If Poll fails, the error is returned and op is unmodified. If Poll succeeds and -// the operation has completed with failure, the error is returned and op.Done will return true. -// If Poll succeeds and the operation has completed successfully, -// op.Done will return true, and the response of the operation is returned. -// If Poll succeeds and the operation has not completed, the returned response and error are both nil. -func (op *DeleteTagValueOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*resourcemanagerpb.TagValue, error) { - opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) - var resp resourcemanagerpb.TagValue - if err := op.lro.Poll(ctx, &resp, opts...); err != nil { - return nil, err - } - if !op.Done() { - return nil, nil - } - return &resp, nil -} - -// Metadata returns metadata associated with the long-running operation. -// Metadata itself does not contact the server, but Poll does. -// To get the latest metadata, call this method after a successful call to Poll. -// If the metadata is not available, the returned metadata and error are both nil. -func (op *DeleteTagValueOperation) Metadata() (*resourcemanagerpb.DeleteTagValueMetadata, error) { - var meta resourcemanagerpb.DeleteTagValueMetadata - if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata { - return nil, nil - } else if err != nil { - return nil, err - } - return &meta, nil -} - -// Done reports whether the long-running operation has completed. -func (op *DeleteTagValueOperation) Done() bool { - return op.lro.Done() -} - -// Name returns the name of the long-running operation. -// The name is assigned by the server and is unique within the service from which the operation is created. -func (op *DeleteTagValueOperation) Name() string { - return op.lro.Name() -} - -// MoveFolderOperation manages a long-running operation from MoveFolder. -type MoveFolderOperation struct { - lro *longrunning.Operation - pollPath string -} - -// Wait blocks until the long-running operation is completed, returning the response and any errors encountered. -// -// See documentation of Poll for error-handling information. -func (op *MoveFolderOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*resourcemanagerpb.Folder, error) { - opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) - var resp resourcemanagerpb.Folder - if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil { - return nil, err - } - return &resp, nil -} - -// Poll fetches the latest state of the long-running operation. -// -// Poll also fetches the latest metadata, which can be retrieved by Metadata. -// -// If Poll fails, the error is returned and op is unmodified. If Poll succeeds and -// the operation has completed with failure, the error is returned and op.Done will return true. -// If Poll succeeds and the operation has completed successfully, -// op.Done will return true, and the response of the operation is returned. -// If Poll succeeds and the operation has not completed, the returned response and error are both nil. -func (op *MoveFolderOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*resourcemanagerpb.Folder, error) { - opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) - var resp resourcemanagerpb.Folder - if err := op.lro.Poll(ctx, &resp, opts...); err != nil { - return nil, err - } - if !op.Done() { - return nil, nil - } - return &resp, nil -} - -// Metadata returns metadata associated with the long-running operation. -// Metadata itself does not contact the server, but Poll does. -// To get the latest metadata, call this method after a successful call to Poll. -// If the metadata is not available, the returned metadata and error are both nil. -func (op *MoveFolderOperation) Metadata() (*resourcemanagerpb.MoveFolderMetadata, error) { - var meta resourcemanagerpb.MoveFolderMetadata - if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata { - return nil, nil - } else if err != nil { - return nil, err - } - return &meta, nil -} - -// Done reports whether the long-running operation has completed. -func (op *MoveFolderOperation) Done() bool { - return op.lro.Done() -} - -// Name returns the name of the long-running operation. -// The name is assigned by the server and is unique within the service from which the operation is created. -func (op *MoveFolderOperation) Name() string { - return op.lro.Name() -} - -// MoveProjectOperation manages a long-running operation from MoveProject. -type MoveProjectOperation struct { - lro *longrunning.Operation - pollPath string -} - -// Wait blocks until the long-running operation is completed, returning the response and any errors encountered. -// -// See documentation of Poll for error-handling information. -func (op *MoveProjectOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*resourcemanagerpb.Project, error) { - opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) - var resp resourcemanagerpb.Project - if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil { - return nil, err - } - return &resp, nil -} - -// Poll fetches the latest state of the long-running operation. -// -// Poll also fetches the latest metadata, which can be retrieved by Metadata. -// -// If Poll fails, the error is returned and op is unmodified. If Poll succeeds and -// the operation has completed with failure, the error is returned and op.Done will return true. -// If Poll succeeds and the operation has completed successfully, -// op.Done will return true, and the response of the operation is returned. -// If Poll succeeds and the operation has not completed, the returned response and error are both nil. -func (op *MoveProjectOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*resourcemanagerpb.Project, error) { - opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) - var resp resourcemanagerpb.Project - if err := op.lro.Poll(ctx, &resp, opts...); err != nil { - return nil, err - } - if !op.Done() { - return nil, nil - } - return &resp, nil -} - -// Metadata returns metadata associated with the long-running operation. -// Metadata itself does not contact the server, but Poll does. -// To get the latest metadata, call this method after a successful call to Poll. -// If the metadata is not available, the returned metadata and error are both nil. -func (op *MoveProjectOperation) Metadata() (*resourcemanagerpb.MoveProjectMetadata, error) { - var meta resourcemanagerpb.MoveProjectMetadata - if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata { - return nil, nil - } else if err != nil { - return nil, err - } - return &meta, nil -} - -// Done reports whether the long-running operation has completed. -func (op *MoveProjectOperation) Done() bool { - return op.lro.Done() -} - -// Name returns the name of the long-running operation. -// The name is assigned by the server and is unique within the service from which the operation is created. -func (op *MoveProjectOperation) Name() string { - return op.lro.Name() -} - -// UndeleteFolderOperation manages a long-running operation from UndeleteFolder. -type UndeleteFolderOperation struct { - lro *longrunning.Operation - pollPath string -} - -// Wait blocks until the long-running operation is completed, returning the response and any errors encountered. -// -// See documentation of Poll for error-handling information. -func (op *UndeleteFolderOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*resourcemanagerpb.Folder, error) { - opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) - var resp resourcemanagerpb.Folder - if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil { - return nil, err - } - return &resp, nil -} - -// Poll fetches the latest state of the long-running operation. -// -// Poll also fetches the latest metadata, which can be retrieved by Metadata. -// -// If Poll fails, the error is returned and op is unmodified. If Poll succeeds and -// the operation has completed with failure, the error is returned and op.Done will return true. -// If Poll succeeds and the operation has completed successfully, -// op.Done will return true, and the response of the operation is returned. -// If Poll succeeds and the operation has not completed, the returned response and error are both nil. -func (op *UndeleteFolderOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*resourcemanagerpb.Folder, error) { - opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) - var resp resourcemanagerpb.Folder - if err := op.lro.Poll(ctx, &resp, opts...); err != nil { - return nil, err - } - if !op.Done() { - return nil, nil - } - return &resp, nil -} - -// Metadata returns metadata associated with the long-running operation. -// Metadata itself does not contact the server, but Poll does. -// To get the latest metadata, call this method after a successful call to Poll. -// If the metadata is not available, the returned metadata and error are both nil. -func (op *UndeleteFolderOperation) Metadata() (*resourcemanagerpb.UndeleteFolderMetadata, error) { - var meta resourcemanagerpb.UndeleteFolderMetadata - if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata { - return nil, nil - } else if err != nil { - return nil, err - } - return &meta, nil -} - -// Done reports whether the long-running operation has completed. -func (op *UndeleteFolderOperation) Done() bool { - return op.lro.Done() -} - -// Name returns the name of the long-running operation. -// The name is assigned by the server and is unique within the service from which the operation is created. -func (op *UndeleteFolderOperation) Name() string { - return op.lro.Name() -} - -// UndeleteProjectOperation manages a long-running operation from UndeleteProject. -type UndeleteProjectOperation struct { - lro *longrunning.Operation - pollPath string -} - -// Wait blocks until the long-running operation is completed, returning the response and any errors encountered. -// -// See documentation of Poll for error-handling information. -func (op *UndeleteProjectOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*resourcemanagerpb.Project, error) { - opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) - var resp resourcemanagerpb.Project - if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil { - return nil, err - } - return &resp, nil -} - -// Poll fetches the latest state of the long-running operation. -// -// Poll also fetches the latest metadata, which can be retrieved by Metadata. -// -// If Poll fails, the error is returned and op is unmodified. If Poll succeeds and -// the operation has completed with failure, the error is returned and op.Done will return true. -// If Poll succeeds and the operation has completed successfully, -// op.Done will return true, and the response of the operation is returned. -// If Poll succeeds and the operation has not completed, the returned response and error are both nil. -func (op *UndeleteProjectOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*resourcemanagerpb.Project, error) { - opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) - var resp resourcemanagerpb.Project - if err := op.lro.Poll(ctx, &resp, opts...); err != nil { - return nil, err - } - if !op.Done() { - return nil, nil - } - return &resp, nil -} - -// Metadata returns metadata associated with the long-running operation. -// Metadata itself does not contact the server, but Poll does. -// To get the latest metadata, call this method after a successful call to Poll. -// If the metadata is not available, the returned metadata and error are both nil. -func (op *UndeleteProjectOperation) Metadata() (*resourcemanagerpb.UndeleteProjectMetadata, error) { - var meta resourcemanagerpb.UndeleteProjectMetadata - if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata { - return nil, nil - } else if err != nil { - return nil, err - } - return &meta, nil -} - -// Done reports whether the long-running operation has completed. -func (op *UndeleteProjectOperation) Done() bool { - return op.lro.Done() -} - -// Name returns the name of the long-running operation. -// The name is assigned by the server and is unique within the service from which the operation is created. -func (op *UndeleteProjectOperation) Name() string { - return op.lro.Name() -} - -// UpdateFolderOperation manages a long-running operation from UpdateFolder. -type UpdateFolderOperation struct { - lro *longrunning.Operation - pollPath string -} - -// Wait blocks until the long-running operation is completed, returning the response and any errors encountered. -// -// See documentation of Poll for error-handling information. -func (op *UpdateFolderOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*resourcemanagerpb.Folder, error) { - opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) - var resp resourcemanagerpb.Folder - if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil { - return nil, err - } - return &resp, nil -} - -// Poll fetches the latest state of the long-running operation. -// -// Poll also fetches the latest metadata, which can be retrieved by Metadata. -// -// If Poll fails, the error is returned and op is unmodified. If Poll succeeds and -// the operation has completed with failure, the error is returned and op.Done will return true. -// If Poll succeeds and the operation has completed successfully, -// op.Done will return true, and the response of the operation is returned. -// If Poll succeeds and the operation has not completed, the returned response and error are both nil. -func (op *UpdateFolderOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*resourcemanagerpb.Folder, error) { - opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) - var resp resourcemanagerpb.Folder - if err := op.lro.Poll(ctx, &resp, opts...); err != nil { - return nil, err - } - if !op.Done() { - return nil, nil - } - return &resp, nil -} - -// Metadata returns metadata associated with the long-running operation. -// Metadata itself does not contact the server, but Poll does. -// To get the latest metadata, call this method after a successful call to Poll. -// If the metadata is not available, the returned metadata and error are both nil. -func (op *UpdateFolderOperation) Metadata() (*resourcemanagerpb.UpdateFolderMetadata, error) { - var meta resourcemanagerpb.UpdateFolderMetadata - if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata { - return nil, nil - } else if err != nil { - return nil, err - } - return &meta, nil -} - -// Done reports whether the long-running operation has completed. -func (op *UpdateFolderOperation) Done() bool { - return op.lro.Done() -} - -// Name returns the name of the long-running operation. -// The name is assigned by the server and is unique within the service from which the operation is created. -func (op *UpdateFolderOperation) Name() string { - return op.lro.Name() -} - -// UpdateProjectOperation manages a long-running operation from UpdateProject. -type UpdateProjectOperation struct { - lro *longrunning.Operation - pollPath string -} - -// Wait blocks until the long-running operation is completed, returning the response and any errors encountered. -// -// See documentation of Poll for error-handling information. -func (op *UpdateProjectOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*resourcemanagerpb.Project, error) { - opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) - var resp resourcemanagerpb.Project - if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil { - return nil, err - } - return &resp, nil -} - -// Poll fetches the latest state of the long-running operation. -// -// Poll also fetches the latest metadata, which can be retrieved by Metadata. -// -// If Poll fails, the error is returned and op is unmodified. If Poll succeeds and -// the operation has completed with failure, the error is returned and op.Done will return true. -// If Poll succeeds and the operation has completed successfully, -// op.Done will return true, and the response of the operation is returned. -// If Poll succeeds and the operation has not completed, the returned response and error are both nil. -func (op *UpdateProjectOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*resourcemanagerpb.Project, error) { - opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) - var resp resourcemanagerpb.Project - if err := op.lro.Poll(ctx, &resp, opts...); err != nil { - return nil, err - } - if !op.Done() { - return nil, nil - } - return &resp, nil -} - -// Metadata returns metadata associated with the long-running operation. -// Metadata itself does not contact the server, but Poll does. -// To get the latest metadata, call this method after a successful call to Poll. -// If the metadata is not available, the returned metadata and error are both nil. -func (op *UpdateProjectOperation) Metadata() (*resourcemanagerpb.UpdateProjectMetadata, error) { - var meta resourcemanagerpb.UpdateProjectMetadata - if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata { - return nil, nil - } else if err != nil { - return nil, err - } - return &meta, nil -} - -// Done reports whether the long-running operation has completed. -func (op *UpdateProjectOperation) Done() bool { - return op.lro.Done() -} - -// Name returns the name of the long-running operation. -// The name is assigned by the server and is unique within the service from which the operation is created. -func (op *UpdateProjectOperation) Name() string { - return op.lro.Name() -} - -// UpdateTagKeyOperation manages a long-running operation from UpdateTagKey. -type UpdateTagKeyOperation struct { - lro *longrunning.Operation - pollPath string -} - -// Wait blocks until the long-running operation is completed, returning the response and any errors encountered. -// -// See documentation of Poll for error-handling information. -func (op *UpdateTagKeyOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*resourcemanagerpb.TagKey, error) { - opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) - var resp resourcemanagerpb.TagKey - if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil { - return nil, err - } - return &resp, nil -} - -// Poll fetches the latest state of the long-running operation. -// -// Poll also fetches the latest metadata, which can be retrieved by Metadata. -// -// If Poll fails, the error is returned and op is unmodified. If Poll succeeds and -// the operation has completed with failure, the error is returned and op.Done will return true. -// If Poll succeeds and the operation has completed successfully, -// op.Done will return true, and the response of the operation is returned. -// If Poll succeeds and the operation has not completed, the returned response and error are both nil. -func (op *UpdateTagKeyOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*resourcemanagerpb.TagKey, error) { - opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) - var resp resourcemanagerpb.TagKey - if err := op.lro.Poll(ctx, &resp, opts...); err != nil { - return nil, err - } - if !op.Done() { - return nil, nil - } - return &resp, nil -} - -// Metadata returns metadata associated with the long-running operation. -// Metadata itself does not contact the server, but Poll does. -// To get the latest metadata, call this method after a successful call to Poll. -// If the metadata is not available, the returned metadata and error are both nil. -func (op *UpdateTagKeyOperation) Metadata() (*resourcemanagerpb.UpdateTagKeyMetadata, error) { - var meta resourcemanagerpb.UpdateTagKeyMetadata - if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata { - return nil, nil - } else if err != nil { - return nil, err - } - return &meta, nil -} - -// Done reports whether the long-running operation has completed. -func (op *UpdateTagKeyOperation) Done() bool { - return op.lro.Done() -} - -// Name returns the name of the long-running operation. -// The name is assigned by the server and is unique within the service from which the operation is created. -func (op *UpdateTagKeyOperation) Name() string { - return op.lro.Name() -} - -// UpdateTagValueOperation manages a long-running operation from UpdateTagValue. -type UpdateTagValueOperation struct { - lro *longrunning.Operation - pollPath string -} - -// Wait blocks until the long-running operation is completed, returning the response and any errors encountered. -// -// See documentation of Poll for error-handling information. -func (op *UpdateTagValueOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*resourcemanagerpb.TagValue, error) { - opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) - var resp resourcemanagerpb.TagValue - if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil { - return nil, err - } - return &resp, nil -} - -// Poll fetches the latest state of the long-running operation. -// -// Poll also fetches the latest metadata, which can be retrieved by Metadata. -// -// If Poll fails, the error is returned and op is unmodified. If Poll succeeds and -// the operation has completed with failure, the error is returned and op.Done will return true. -// If Poll succeeds and the operation has completed successfully, -// op.Done will return true, and the response of the operation is returned. -// If Poll succeeds and the operation has not completed, the returned response and error are both nil. -func (op *UpdateTagValueOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*resourcemanagerpb.TagValue, error) { - opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) - var resp resourcemanagerpb.TagValue - if err := op.lro.Poll(ctx, &resp, opts...); err != nil { - return nil, err - } - if !op.Done() { - return nil, nil - } - return &resp, nil -} - -// Metadata returns metadata associated with the long-running operation. -// Metadata itself does not contact the server, but Poll does. -// To get the latest metadata, call this method after a successful call to Poll. -// If the metadata is not available, the returned metadata and error are both nil. -func (op *UpdateTagValueOperation) Metadata() (*resourcemanagerpb.UpdateTagValueMetadata, error) { - var meta resourcemanagerpb.UpdateTagValueMetadata - if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata { - return nil, nil - } else if err != nil { - return nil, err - } - return &meta, nil -} - -// Done reports whether the long-running operation has completed. -func (op *UpdateTagValueOperation) Done() bool { - return op.lro.Done() -} - -// Name returns the name of the long-running operation. -// The name is assigned by the server and is unique within the service from which the operation is created. -func (op *UpdateTagValueOperation) Name() string { - return op.lro.Name() -} - -// EffectiveTagIterator manages a stream of *resourcemanagerpb.EffectiveTag. -type EffectiveTagIterator struct { - items []*resourcemanagerpb.EffectiveTag - pageInfo *iterator.PageInfo - nextFunc func() error - - // Response is the raw response for the current page. - // It must be cast to the RPC response type. - // Calling Next() or InternalFetch() updates this value. - Response interface{} - - // InternalFetch is for use by the Google Cloud Libraries only. - // It is not part of the stable interface of this package. - // - // InternalFetch returns results from a single call to the underlying RPC. - // The number of results is no greater than pageSize. - // If there are no more results, nextPageToken is empty and err is nil. - InternalFetch func(pageSize int, pageToken string) (results []*resourcemanagerpb.EffectiveTag, nextPageToken string, err error) -} - -// PageInfo supports pagination. See the [google.golang.org/api/iterator] package for details. -func (it *EffectiveTagIterator) PageInfo() *iterator.PageInfo { - return it.pageInfo -} - -// Next returns the next result. Its second return value is iterator.Done if there are no more -// results. Once Next returns Done, all subsequent calls will return Done. -func (it *EffectiveTagIterator) Next() (*resourcemanagerpb.EffectiveTag, error) { - var item *resourcemanagerpb.EffectiveTag - if err := it.nextFunc(); err != nil { - return item, err - } - item = it.items[0] - it.items = it.items[1:] - return item, nil -} - -func (it *EffectiveTagIterator) bufLen() int { - return len(it.items) -} - -func (it *EffectiveTagIterator) takeBuf() interface{} { - b := it.items - it.items = nil - return b -} - -// FolderIterator manages a stream of *resourcemanagerpb.Folder. -type FolderIterator struct { - items []*resourcemanagerpb.Folder - pageInfo *iterator.PageInfo - nextFunc func() error - - // Response is the raw response for the current page. - // It must be cast to the RPC response type. - // Calling Next() or InternalFetch() updates this value. - Response interface{} - - // InternalFetch is for use by the Google Cloud Libraries only. - // It is not part of the stable interface of this package. - // - // InternalFetch returns results from a single call to the underlying RPC. - // The number of results is no greater than pageSize. - // If there are no more results, nextPageToken is empty and err is nil. - InternalFetch func(pageSize int, pageToken string) (results []*resourcemanagerpb.Folder, nextPageToken string, err error) -} - -// PageInfo supports pagination. See the [google.golang.org/api/iterator] package for details. -func (it *FolderIterator) PageInfo() *iterator.PageInfo { - return it.pageInfo -} - -// Next returns the next result. Its second return value is iterator.Done if there are no more -// results. Once Next returns Done, all subsequent calls will return Done. -func (it *FolderIterator) Next() (*resourcemanagerpb.Folder, error) { - var item *resourcemanagerpb.Folder - if err := it.nextFunc(); err != nil { - return item, err - } - item = it.items[0] - it.items = it.items[1:] - return item, nil -} - -func (it *FolderIterator) bufLen() int { - return len(it.items) -} - -func (it *FolderIterator) takeBuf() interface{} { - b := it.items - it.items = nil - return b -} - -// OrganizationIterator manages a stream of *resourcemanagerpb.Organization. -type OrganizationIterator struct { - items []*resourcemanagerpb.Organization - pageInfo *iterator.PageInfo - nextFunc func() error - - // Response is the raw response for the current page. - // It must be cast to the RPC response type. - // Calling Next() or InternalFetch() updates this value. - Response interface{} - - // InternalFetch is for use by the Google Cloud Libraries only. - // It is not part of the stable interface of this package. - // - // InternalFetch returns results from a single call to the underlying RPC. - // The number of results is no greater than pageSize. - // If there are no more results, nextPageToken is empty and err is nil. - InternalFetch func(pageSize int, pageToken string) (results []*resourcemanagerpb.Organization, nextPageToken string, err error) -} - -// PageInfo supports pagination. See the [google.golang.org/api/iterator] package for details. -func (it *OrganizationIterator) PageInfo() *iterator.PageInfo { - return it.pageInfo -} - -// Next returns the next result. Its second return value is iterator.Done if there are no more -// results. Once Next returns Done, all subsequent calls will return Done. -func (it *OrganizationIterator) Next() (*resourcemanagerpb.Organization, error) { - var item *resourcemanagerpb.Organization - if err := it.nextFunc(); err != nil { - return item, err - } - item = it.items[0] - it.items = it.items[1:] - return item, nil -} - -func (it *OrganizationIterator) bufLen() int { - return len(it.items) -} - -func (it *OrganizationIterator) takeBuf() interface{} { - b := it.items - it.items = nil - return b -} - -// ProjectIterator manages a stream of *resourcemanagerpb.Project. -type ProjectIterator struct { - items []*resourcemanagerpb.Project - pageInfo *iterator.PageInfo - nextFunc func() error - - // Response is the raw response for the current page. - // It must be cast to the RPC response type. - // Calling Next() or InternalFetch() updates this value. - Response interface{} - - // InternalFetch is for use by the Google Cloud Libraries only. - // It is not part of the stable interface of this package. - // - // InternalFetch returns results from a single call to the underlying RPC. - // The number of results is no greater than pageSize. - // If there are no more results, nextPageToken is empty and err is nil. - InternalFetch func(pageSize int, pageToken string) (results []*resourcemanagerpb.Project, nextPageToken string, err error) -} - -// PageInfo supports pagination. See the [google.golang.org/api/iterator] package for details. -func (it *ProjectIterator) PageInfo() *iterator.PageInfo { - return it.pageInfo -} - -// Next returns the next result. Its second return value is iterator.Done if there are no more -// results. Once Next returns Done, all subsequent calls will return Done. -func (it *ProjectIterator) Next() (*resourcemanagerpb.Project, error) { - var item *resourcemanagerpb.Project - if err := it.nextFunc(); err != nil { - return item, err - } - item = it.items[0] - it.items = it.items[1:] - return item, nil -} - -func (it *ProjectIterator) bufLen() int { - return len(it.items) -} - -func (it *ProjectIterator) takeBuf() interface{} { - b := it.items - it.items = nil - return b -} - -// TagBindingIterator manages a stream of *resourcemanagerpb.TagBinding. -type TagBindingIterator struct { - items []*resourcemanagerpb.TagBinding - pageInfo *iterator.PageInfo - nextFunc func() error - - // Response is the raw response for the current page. - // It must be cast to the RPC response type. - // Calling Next() or InternalFetch() updates this value. - Response interface{} - - // InternalFetch is for use by the Google Cloud Libraries only. - // It is not part of the stable interface of this package. - // - // InternalFetch returns results from a single call to the underlying RPC. - // The number of results is no greater than pageSize. - // If there are no more results, nextPageToken is empty and err is nil. - InternalFetch func(pageSize int, pageToken string) (results []*resourcemanagerpb.TagBinding, nextPageToken string, err error) -} - -// PageInfo supports pagination. See the [google.golang.org/api/iterator] package for details. -func (it *TagBindingIterator) PageInfo() *iterator.PageInfo { - return it.pageInfo -} - -// Next returns the next result. Its second return value is iterator.Done if there are no more -// results. Once Next returns Done, all subsequent calls will return Done. -func (it *TagBindingIterator) Next() (*resourcemanagerpb.TagBinding, error) { - var item *resourcemanagerpb.TagBinding - if err := it.nextFunc(); err != nil { - return item, err - } - item = it.items[0] - it.items = it.items[1:] - return item, nil -} - -func (it *TagBindingIterator) bufLen() int { - return len(it.items) -} - -func (it *TagBindingIterator) takeBuf() interface{} { - b := it.items - it.items = nil - return b -} - -// TagHoldIterator manages a stream of *resourcemanagerpb.TagHold. -type TagHoldIterator struct { - items []*resourcemanagerpb.TagHold - pageInfo *iterator.PageInfo - nextFunc func() error - - // Response is the raw response for the current page. - // It must be cast to the RPC response type. - // Calling Next() or InternalFetch() updates this value. - Response interface{} - - // InternalFetch is for use by the Google Cloud Libraries only. - // It is not part of the stable interface of this package. - // - // InternalFetch returns results from a single call to the underlying RPC. - // The number of results is no greater than pageSize. - // If there are no more results, nextPageToken is empty and err is nil. - InternalFetch func(pageSize int, pageToken string) (results []*resourcemanagerpb.TagHold, nextPageToken string, err error) -} - -// PageInfo supports pagination. See the [google.golang.org/api/iterator] package for details. -func (it *TagHoldIterator) PageInfo() *iterator.PageInfo { - return it.pageInfo -} - -// Next returns the next result. Its second return value is iterator.Done if there are no more -// results. Once Next returns Done, all subsequent calls will return Done. -func (it *TagHoldIterator) Next() (*resourcemanagerpb.TagHold, error) { - var item *resourcemanagerpb.TagHold - if err := it.nextFunc(); err != nil { - return item, err - } - item = it.items[0] - it.items = it.items[1:] - return item, nil -} - -func (it *TagHoldIterator) bufLen() int { - return len(it.items) -} - -func (it *TagHoldIterator) takeBuf() interface{} { - b := it.items - it.items = nil - return b -} - -// TagKeyIterator manages a stream of *resourcemanagerpb.TagKey. -type TagKeyIterator struct { - items []*resourcemanagerpb.TagKey - pageInfo *iterator.PageInfo - nextFunc func() error - - // Response is the raw response for the current page. - // It must be cast to the RPC response type. - // Calling Next() or InternalFetch() updates this value. - Response interface{} - - // InternalFetch is for use by the Google Cloud Libraries only. - // It is not part of the stable interface of this package. - // - // InternalFetch returns results from a single call to the underlying RPC. - // The number of results is no greater than pageSize. - // If there are no more results, nextPageToken is empty and err is nil. - InternalFetch func(pageSize int, pageToken string) (results []*resourcemanagerpb.TagKey, nextPageToken string, err error) -} - -// PageInfo supports pagination. See the [google.golang.org/api/iterator] package for details. -func (it *TagKeyIterator) PageInfo() *iterator.PageInfo { - return it.pageInfo -} - -// Next returns the next result. Its second return value is iterator.Done if there are no more -// results. Once Next returns Done, all subsequent calls will return Done. -func (it *TagKeyIterator) Next() (*resourcemanagerpb.TagKey, error) { - var item *resourcemanagerpb.TagKey - if err := it.nextFunc(); err != nil { - return item, err - } - item = it.items[0] - it.items = it.items[1:] - return item, nil -} - -func (it *TagKeyIterator) bufLen() int { - return len(it.items) -} - -func (it *TagKeyIterator) takeBuf() interface{} { - b := it.items - it.items = nil - return b -} - -// TagValueIterator manages a stream of *resourcemanagerpb.TagValue. -type TagValueIterator struct { - items []*resourcemanagerpb.TagValue - pageInfo *iterator.PageInfo - nextFunc func() error - - // Response is the raw response for the current page. - // It must be cast to the RPC response type. - // Calling Next() or InternalFetch() updates this value. - Response interface{} - - // InternalFetch is for use by the Google Cloud Libraries only. - // It is not part of the stable interface of this package. - // - // InternalFetch returns results from a single call to the underlying RPC. - // The number of results is no greater than pageSize. - // If there are no more results, nextPageToken is empty and err is nil. - InternalFetch func(pageSize int, pageToken string) (results []*resourcemanagerpb.TagValue, nextPageToken string, err error) -} - -// PageInfo supports pagination. See the [google.golang.org/api/iterator] package for details. -func (it *TagValueIterator) PageInfo() *iterator.PageInfo { - return it.pageInfo -} - -// Next returns the next result. Its second return value is iterator.Done if there are no more -// results. Once Next returns Done, all subsequent calls will return Done. -func (it *TagValueIterator) Next() (*resourcemanagerpb.TagValue, error) { - var item *resourcemanagerpb.TagValue - if err := it.nextFunc(); err != nil { - return item, err - } - item = it.items[0] - it.items = it.items[1:] - return item, nil -} - -func (it *TagValueIterator) bufLen() int { - return len(it.items) -} - -func (it *TagValueIterator) takeBuf() interface{} { - b := it.items - it.items = nil - return b -} diff --git a/vendor/cloud.google.com/go/resourcemanager/apiv3/auxiliary_go123.go b/vendor/cloud.google.com/go/resourcemanager/apiv3/auxiliary_go123.go deleted file mode 100644 index 049c649c5d..0000000000 --- a/vendor/cloud.google.com/go/resourcemanager/apiv3/auxiliary_go123.go +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Code generated by protoc-gen-go_gapic. DO NOT EDIT. - -//go:build go1.23 - -package resourcemanager - -import ( - "iter" - - resourcemanagerpb "cloud.google.com/go/resourcemanager/apiv3/resourcemanagerpb" - "github.com/googleapis/gax-go/v2/iterator" -) - -// All returns an iterator. If an error is returned by the iterator, the -// iterator will stop after that iteration. -func (it *EffectiveTagIterator) All() iter.Seq2[*resourcemanagerpb.EffectiveTag, error] { - return iterator.RangeAdapter(it.Next) -} - -// All returns an iterator. If an error is returned by the iterator, the -// iterator will stop after that iteration. -func (it *FolderIterator) All() iter.Seq2[*resourcemanagerpb.Folder, error] { - return iterator.RangeAdapter(it.Next) -} - -// All returns an iterator. If an error is returned by the iterator, the -// iterator will stop after that iteration. -func (it *OrganizationIterator) All() iter.Seq2[*resourcemanagerpb.Organization, error] { - return iterator.RangeAdapter(it.Next) -} - -// All returns an iterator. If an error is returned by the iterator, the -// iterator will stop after that iteration. -func (it *ProjectIterator) All() iter.Seq2[*resourcemanagerpb.Project, error] { - return iterator.RangeAdapter(it.Next) -} - -// All returns an iterator. If an error is returned by the iterator, the -// iterator will stop after that iteration. -func (it *TagBindingIterator) All() iter.Seq2[*resourcemanagerpb.TagBinding, error] { - return iterator.RangeAdapter(it.Next) -} - -// All returns an iterator. If an error is returned by the iterator, the -// iterator will stop after that iteration. -func (it *TagHoldIterator) All() iter.Seq2[*resourcemanagerpb.TagHold, error] { - return iterator.RangeAdapter(it.Next) -} - -// All returns an iterator. If an error is returned by the iterator, the -// iterator will stop after that iteration. -func (it *TagKeyIterator) All() iter.Seq2[*resourcemanagerpb.TagKey, error] { - return iterator.RangeAdapter(it.Next) -} - -// All returns an iterator. If an error is returned by the iterator, the -// iterator will stop after that iteration. -func (it *TagValueIterator) All() iter.Seq2[*resourcemanagerpb.TagValue, error] { - return iterator.RangeAdapter(it.Next) -} diff --git a/vendor/cloud.google.com/go/resourcemanager/apiv3/doc.go b/vendor/cloud.google.com/go/resourcemanager/apiv3/doc.go deleted file mode 100644 index 609b50677c..0000000000 --- a/vendor/cloud.google.com/go/resourcemanager/apiv3/doc.go +++ /dev/null @@ -1,89 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Code generated by protoc-gen-go_gapic. DO NOT EDIT. - -// Package resourcemanager is an auto-generated package for the -// Cloud Resource Manager API. -// -// Creates, reads, and updates metadata for Google Cloud Platform resource -// containers. -// -// # General documentation -// -// For information that is relevant for all client libraries please reference -// https://pkg.go.dev/cloud.google.com/go#pkg-overview. Some information on this -// page includes: -// -// - [Authentication and Authorization] -// - [Timeouts and Cancellation] -// - [Testing against Client Libraries] -// - [Debugging Client Libraries] -// - [Inspecting errors] -// -// # Example usage -// -// To get started with this package, create a client. -// -// // go get cloud.google.com/go/resourcemanager/apiv3@latest -// ctx := context.Background() -// // This snippet has been automatically generated and should be regarded as a code template only. -// // It will require modifications to work: -// // - It may require correct/in-range values for request initialization. -// // - It may require specifying regional endpoints when creating the service client as shown in: -// // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options -// c, err := resourcemanager.NewFoldersClient(ctx) -// if err != nil { -// // TODO: Handle error. -// } -// defer c.Close() -// -// The client will use your default application credentials. Clients should be reused instead of created as needed. -// The methods of Client are safe for concurrent use by multiple goroutines. -// The returned client must be Closed when it is done being used. -// -// # Using the Client -// -// The following is an example of making an API call with the newly created client, mentioned above. -// -// req := &resourcemanagerpb.CreateFolderRequest{ -// // TODO: Fill request struct fields. -// // See https://pkg.go.dev/cloud.google.com/go/resourcemanager/apiv3/resourcemanagerpb#CreateFolderRequest. -// } -// op, err := c.CreateFolder(ctx, req) -// if err != nil { -// // TODO: Handle error. -// } -// -// resp, err := op.Wait(ctx) -// if err != nil { -// // TODO: Handle error. -// } -// // TODO: Use resp. -// _ = resp -// -// # Use of Context -// -// The ctx passed to NewFoldersClient is used for authentication requests and -// for creating the underlying connection, but is not used for subsequent calls. -// Individual methods on the client use the ctx given to them. -// -// To close the open connection, use the Close() method. -// -// [Authentication and Authorization]: https://pkg.go.dev/cloud.google.com/go#hdr-Authentication_and_Authorization -// [Timeouts and Cancellation]: https://pkg.go.dev/cloud.google.com/go#hdr-Timeouts_and_Cancellation -// [Testing against Client Libraries]: https://pkg.go.dev/cloud.google.com/go#hdr-Testing -// [Debugging Client Libraries]: https://pkg.go.dev/cloud.google.com/go#hdr-Debugging -// [Inspecting errors]: https://pkg.go.dev/cloud.google.com/go#hdr-Inspecting_errors -package resourcemanager // import "cloud.google.com/go/resourcemanager/apiv3" diff --git a/vendor/cloud.google.com/go/resourcemanager/apiv3/folders_client.go b/vendor/cloud.google.com/go/resourcemanager/apiv3/folders_client.go deleted file mode 100644 index 87c491ce9a..0000000000 --- a/vendor/cloud.google.com/go/resourcemanager/apiv3/folders_client.go +++ /dev/null @@ -1,2043 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Code generated by protoc-gen-go_gapic. DO NOT EDIT. - -package resourcemanager - -import ( - "bytes" - "context" - "fmt" - "log/slog" - "math" - "net/http" - "net/url" - "time" - - iampb "cloud.google.com/go/iam/apiv1/iampb" - "cloud.google.com/go/longrunning" - lroauto "cloud.google.com/go/longrunning/autogen" - longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" - resourcemanagerpb "cloud.google.com/go/resourcemanager/apiv3/resourcemanagerpb" - gax "github.com/googleapis/gax-go/v2" - "github.com/googleapis/gax-go/v2/callctx" - "google.golang.org/api/iterator" - "google.golang.org/api/option" - "google.golang.org/api/option/internaloption" - gtransport "google.golang.org/api/transport/grpc" - httptransport "google.golang.org/api/transport/http" - "google.golang.org/grpc" - "google.golang.org/grpc/codes" - "google.golang.org/protobuf/encoding/protojson" - "google.golang.org/protobuf/proto" -) - -var newFoldersClientHook clientHook - -// FoldersCallOptions contains the retry settings for each method of FoldersClient. -type FoldersCallOptions struct { - GetFolder []gax.CallOption - ListFolders []gax.CallOption - SearchFolders []gax.CallOption - CreateFolder []gax.CallOption - UpdateFolder []gax.CallOption - MoveFolder []gax.CallOption - DeleteFolder []gax.CallOption - UndeleteFolder []gax.CallOption - GetIamPolicy []gax.CallOption - SetIamPolicy []gax.CallOption - TestIamPermissions []gax.CallOption - GetOperation []gax.CallOption -} - -func defaultFoldersGRPCClientOptions() []option.ClientOption { - return []option.ClientOption{ - internaloption.WithDefaultEndpoint("cloudresourcemanager.googleapis.com:443"), - internaloption.WithDefaultEndpointTemplate("cloudresourcemanager.UNIVERSE_DOMAIN:443"), - internaloption.WithDefaultMTLSEndpoint("cloudresourcemanager.mtls.googleapis.com:443"), - internaloption.WithDefaultUniverseDomain("googleapis.com"), - internaloption.WithDefaultAudience("https://cloudresourcemanager.googleapis.com/"), - internaloption.WithDefaultScopes(DefaultAuthScopes()...), - internaloption.EnableJwtWithScope(), - internaloption.AllowHardBoundTokens("MTLS_S2A"), - internaloption.EnableNewAuthLibrary(), - option.WithGRPCDialOption(grpc.WithDefaultCallOptions( - grpc.MaxCallRecvMsgSize(math.MaxInt32))), - } -} - -func defaultFoldersCallOptions() *FoldersCallOptions { - return &FoldersCallOptions{ - GetFolder: []gax.CallOption{ - gax.WithTimeout(60000 * time.Millisecond), - gax.WithRetry(func() gax.Retryer { - return gax.OnCodes([]codes.Code{ - codes.Unavailable, - }, gax.Backoff{ - Initial: 100 * time.Millisecond, - Max: 60000 * time.Millisecond, - Multiplier: 1.30, - }) - }), - }, - ListFolders: []gax.CallOption{ - gax.WithTimeout(60000 * time.Millisecond), - gax.WithRetry(func() gax.Retryer { - return gax.OnCodes([]codes.Code{ - codes.Unavailable, - }, gax.Backoff{ - Initial: 100 * time.Millisecond, - Max: 60000 * time.Millisecond, - Multiplier: 1.30, - }) - }), - }, - SearchFolders: []gax.CallOption{ - gax.WithTimeout(60000 * time.Millisecond), - }, - CreateFolder: []gax.CallOption{ - gax.WithTimeout(60000 * time.Millisecond), - }, - UpdateFolder: []gax.CallOption{ - gax.WithTimeout(60000 * time.Millisecond), - }, - MoveFolder: []gax.CallOption{ - gax.WithTimeout(60000 * time.Millisecond), - }, - DeleteFolder: []gax.CallOption{ - gax.WithTimeout(60000 * time.Millisecond), - }, - UndeleteFolder: []gax.CallOption{ - gax.WithTimeout(60000 * time.Millisecond), - }, - GetIamPolicy: []gax.CallOption{ - gax.WithTimeout(60000 * time.Millisecond), - gax.WithRetry(func() gax.Retryer { - return gax.OnCodes([]codes.Code{ - codes.Unavailable, - }, gax.Backoff{ - Initial: 100 * time.Millisecond, - Max: 60000 * time.Millisecond, - Multiplier: 1.30, - }) - }), - }, - SetIamPolicy: []gax.CallOption{ - gax.WithTimeout(60000 * time.Millisecond), - }, - TestIamPermissions: []gax.CallOption{}, - GetOperation: []gax.CallOption{}, - } -} - -func defaultFoldersRESTCallOptions() *FoldersCallOptions { - return &FoldersCallOptions{ - GetFolder: []gax.CallOption{ - gax.WithTimeout(60000 * time.Millisecond), - gax.WithRetry(func() gax.Retryer { - return gax.OnHTTPCodes(gax.Backoff{ - Initial: 100 * time.Millisecond, - Max: 60000 * time.Millisecond, - Multiplier: 1.30, - }, - http.StatusServiceUnavailable) - }), - }, - ListFolders: []gax.CallOption{ - gax.WithTimeout(60000 * time.Millisecond), - gax.WithRetry(func() gax.Retryer { - return gax.OnHTTPCodes(gax.Backoff{ - Initial: 100 * time.Millisecond, - Max: 60000 * time.Millisecond, - Multiplier: 1.30, - }, - http.StatusServiceUnavailable) - }), - }, - SearchFolders: []gax.CallOption{ - gax.WithTimeout(60000 * time.Millisecond), - }, - CreateFolder: []gax.CallOption{ - gax.WithTimeout(60000 * time.Millisecond), - }, - UpdateFolder: []gax.CallOption{ - gax.WithTimeout(60000 * time.Millisecond), - }, - MoveFolder: []gax.CallOption{ - gax.WithTimeout(60000 * time.Millisecond), - }, - DeleteFolder: []gax.CallOption{ - gax.WithTimeout(60000 * time.Millisecond), - }, - UndeleteFolder: []gax.CallOption{ - gax.WithTimeout(60000 * time.Millisecond), - }, - GetIamPolicy: []gax.CallOption{ - gax.WithTimeout(60000 * time.Millisecond), - gax.WithRetry(func() gax.Retryer { - return gax.OnHTTPCodes(gax.Backoff{ - Initial: 100 * time.Millisecond, - Max: 60000 * time.Millisecond, - Multiplier: 1.30, - }, - http.StatusServiceUnavailable) - }), - }, - SetIamPolicy: []gax.CallOption{ - gax.WithTimeout(60000 * time.Millisecond), - }, - TestIamPermissions: []gax.CallOption{}, - GetOperation: []gax.CallOption{}, - } -} - -// internalFoldersClient is an interface that defines the methods available from Cloud Resource Manager API. -type internalFoldersClient interface { - Close() error - setGoogleClientInfo(...string) - Connection() *grpc.ClientConn - GetFolder(context.Context, *resourcemanagerpb.GetFolderRequest, ...gax.CallOption) (*resourcemanagerpb.Folder, error) - ListFolders(context.Context, *resourcemanagerpb.ListFoldersRequest, ...gax.CallOption) *FolderIterator - SearchFolders(context.Context, *resourcemanagerpb.SearchFoldersRequest, ...gax.CallOption) *FolderIterator - CreateFolder(context.Context, *resourcemanagerpb.CreateFolderRequest, ...gax.CallOption) (*CreateFolderOperation, error) - CreateFolderOperation(name string) *CreateFolderOperation - UpdateFolder(context.Context, *resourcemanagerpb.UpdateFolderRequest, ...gax.CallOption) (*UpdateFolderOperation, error) - UpdateFolderOperation(name string) *UpdateFolderOperation - MoveFolder(context.Context, *resourcemanagerpb.MoveFolderRequest, ...gax.CallOption) (*MoveFolderOperation, error) - MoveFolderOperation(name string) *MoveFolderOperation - DeleteFolder(context.Context, *resourcemanagerpb.DeleteFolderRequest, ...gax.CallOption) (*DeleteFolderOperation, error) - DeleteFolderOperation(name string) *DeleteFolderOperation - UndeleteFolder(context.Context, *resourcemanagerpb.UndeleteFolderRequest, ...gax.CallOption) (*UndeleteFolderOperation, error) - UndeleteFolderOperation(name string) *UndeleteFolderOperation - GetIamPolicy(context.Context, *iampb.GetIamPolicyRequest, ...gax.CallOption) (*iampb.Policy, error) - SetIamPolicy(context.Context, *iampb.SetIamPolicyRequest, ...gax.CallOption) (*iampb.Policy, error) - TestIamPermissions(context.Context, *iampb.TestIamPermissionsRequest, ...gax.CallOption) (*iampb.TestIamPermissionsResponse, error) - GetOperation(context.Context, *longrunningpb.GetOperationRequest, ...gax.CallOption) (*longrunningpb.Operation, error) -} - -// FoldersClient is a client for interacting with Cloud Resource Manager API. -// Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. -// -// Manages Cloud Platform folder resources. -// Folders can be used to organize the resources under an -// organization and to control the policies applied to groups of resources. -type FoldersClient struct { - // The internal transport-dependent client. - internalClient internalFoldersClient - - // The call options for this service. - CallOptions *FoldersCallOptions - - // LROClient is used internally to handle long-running operations. - // It is exposed so that its CallOptions can be modified if required. - // Users should not Close this client. - LROClient *lroauto.OperationsClient -} - -// Wrapper methods routed to the internal client. - -// Close closes the connection to the API service. The user should invoke this when -// the client is no longer required. -func (c *FoldersClient) Close() error { - return c.internalClient.Close() -} - -// setGoogleClientInfo sets the name and version of the application in -// the `x-goog-api-client` header passed on each request. Intended for -// use by Google-written clients. -func (c *FoldersClient) setGoogleClientInfo(keyval ...string) { - c.internalClient.setGoogleClientInfo(keyval...) -} - -// Connection returns a connection to the API service. -// -// Deprecated: Connections are now pooled so this method does not always -// return the same resource. -func (c *FoldersClient) Connection() *grpc.ClientConn { - return c.internalClient.Connection() -} - -// GetFolder retrieves a folder identified by the supplied resource name. -// Valid folder resource names have the format folders/{folder_id} -// (for example, folders/1234). -// The caller must have resourcemanager.folders.get permission on the -// identified folder. -func (c *FoldersClient) GetFolder(ctx context.Context, req *resourcemanagerpb.GetFolderRequest, opts ...gax.CallOption) (*resourcemanagerpb.Folder, error) { - return c.internalClient.GetFolder(ctx, req, opts...) -} - -// ListFolders lists the folders that are direct descendants of supplied parent resource. -// list() provides a strongly consistent view of the folders underneath -// the specified parent resource. -// list() returns folders sorted based upon the (ascending) lexical ordering -// of their display_name. -// The caller must have resourcemanager.folders.list permission on the -// identified parent. -func (c *FoldersClient) ListFolders(ctx context.Context, req *resourcemanagerpb.ListFoldersRequest, opts ...gax.CallOption) *FolderIterator { - return c.internalClient.ListFolders(ctx, req, opts...) -} - -// SearchFolders search for folders that match specific filter criteria. -// search() provides an eventually consistent view of the folders a user has -// access to which meet the specified filter criteria. -// -// This will only return folders on which the caller has the -// permission resourcemanager.folders.get. -func (c *FoldersClient) SearchFolders(ctx context.Context, req *resourcemanagerpb.SearchFoldersRequest, opts ...gax.CallOption) *FolderIterator { - return c.internalClient.SearchFolders(ctx, req, opts...) -} - -// CreateFolder creates a folder in the resource hierarchy. -// Returns an Operation which can be used to track the progress of the -// folder creation workflow. -// Upon success, the Operation.response field will be populated with the -// created Folder. -// -// In order to succeed, the addition of this new folder must not violate -// the folder naming, height, or fanout constraints. -// -// The folder’s display_name must be distinct from all other folders that -// share its parent. -// -// The addition of the folder must not cause the active folder hierarchy -// to exceed a height of 10. Note, the full active + deleted folder hierarchy -// is allowed to reach a height of 20; this provides additional headroom when -// moving folders that contain deleted folders. -// -// The addition of the folder must not cause the total number of folders -// under its parent to exceed 300. -// -// If the operation fails due to a folder constraint violation, some errors -// may be returned by the CreateFolder request, with status code -// FAILED_PRECONDITION and an error description. Other folder constraint -// violations will be communicated in the Operation, with the specific -// PreconditionFailure returned in the details list in the Operation.error -// field. -// -// The caller must have resourcemanager.folders.create permission on the -// identified parent. -func (c *FoldersClient) CreateFolder(ctx context.Context, req *resourcemanagerpb.CreateFolderRequest, opts ...gax.CallOption) (*CreateFolderOperation, error) { - return c.internalClient.CreateFolder(ctx, req, opts...) -} - -// CreateFolderOperation returns a new CreateFolderOperation from a given name. -// The name must be that of a previously created CreateFolderOperation, possibly from a different process. -func (c *FoldersClient) CreateFolderOperation(name string) *CreateFolderOperation { - return c.internalClient.CreateFolderOperation(name) -} - -// UpdateFolder updates a folder, changing its display_name. -// Changes to the folder display_name will be rejected if they violate -// either the display_name formatting rules or the naming constraints -// described in the -// CreateFolder -// documentation. -// -// The folder’s display_name must start and end with a letter or digit, -// may contain letters, digits, spaces, hyphens and underscores and can be -// between 3 and 30 characters. This is captured by the regular expression: -// [\p{L}\p{N}][\p{L}\p{N}_- ]{1,28}[\p{L}\p{N}]. -// The caller must have resourcemanager.folders.update permission on the -// identified folder. -// -// If the update fails due to the unique name constraint then a -// PreconditionFailure explaining this violation will be returned -// in the Status.details field. -func (c *FoldersClient) UpdateFolder(ctx context.Context, req *resourcemanagerpb.UpdateFolderRequest, opts ...gax.CallOption) (*UpdateFolderOperation, error) { - return c.internalClient.UpdateFolder(ctx, req, opts...) -} - -// UpdateFolderOperation returns a new UpdateFolderOperation from a given name. -// The name must be that of a previously created UpdateFolderOperation, possibly from a different process. -func (c *FoldersClient) UpdateFolderOperation(name string) *UpdateFolderOperation { - return c.internalClient.UpdateFolderOperation(name) -} - -// MoveFolder moves a folder under a new resource parent. -// Returns an Operation which can be used to track the progress of the -// folder move workflow. -// Upon success, the Operation.response field will be populated with the -// moved folder. -// Upon failure, a FolderOperationError categorizing the failure cause will -// be returned - if the failure occurs synchronously then the -// FolderOperationError will be returned in the Status.details field. -// If it occurs asynchronously, then the FolderOperation will be returned -// in the Operation.error field. -// In addition, the Operation.metadata field will be populated with a -// FolderOperation message as an aid to stateless clients. -// Folder moves will be rejected if they violate either the naming, height, -// or fanout constraints described in the -// CreateFolder -// documentation. The caller must have resourcemanager.folders.move -// permission on the folder’s current and proposed new parent. -func (c *FoldersClient) MoveFolder(ctx context.Context, req *resourcemanagerpb.MoveFolderRequest, opts ...gax.CallOption) (*MoveFolderOperation, error) { - return c.internalClient.MoveFolder(ctx, req, opts...) -} - -// MoveFolderOperation returns a new MoveFolderOperation from a given name. -// The name must be that of a previously created MoveFolderOperation, possibly from a different process. -func (c *FoldersClient) MoveFolderOperation(name string) *MoveFolderOperation { - return c.internalClient.MoveFolderOperation(name) -} - -// DeleteFolder requests deletion of a folder. The folder is moved into the -// DELETE_REQUESTED -// state immediately, and is deleted approximately 30 days later. This method -// may only be called on an empty folder, where a folder is empty if it -// doesn’t contain any folders or projects in the -// [ACTIVE][google.cloud.resourcemanager.v3.Folder.State.ACTIVE (at http://google.cloud.resourcemanager.v3.Folder.State.ACTIVE)] state. If -// called on a folder in -// DELETE_REQUESTED -// state the operation will result in a no-op success. -// The caller must have resourcemanager.folders.delete permission on the -// identified folder. -func (c *FoldersClient) DeleteFolder(ctx context.Context, req *resourcemanagerpb.DeleteFolderRequest, opts ...gax.CallOption) (*DeleteFolderOperation, error) { - return c.internalClient.DeleteFolder(ctx, req, opts...) -} - -// DeleteFolderOperation returns a new DeleteFolderOperation from a given name. -// The name must be that of a previously created DeleteFolderOperation, possibly from a different process. -func (c *FoldersClient) DeleteFolderOperation(name string) *DeleteFolderOperation { - return c.internalClient.DeleteFolderOperation(name) -} - -// UndeleteFolder cancels the deletion request for a folder. This method may be called on a -// folder in any state. If the folder is in the -// [ACTIVE][google.cloud.resourcemanager.v3.Folder.State.ACTIVE (at http://google.cloud.resourcemanager.v3.Folder.State.ACTIVE)] state the -// result will be a no-op success. In order to succeed, the folder’s parent -// must be in the -// [ACTIVE][google.cloud.resourcemanager.v3.Folder.State.ACTIVE (at http://google.cloud.resourcemanager.v3.Folder.State.ACTIVE)] state. In -// addition, reintroducing the folder into the tree must not violate folder -// naming, height, and fanout constraints described in the -// CreateFolder -// documentation. The caller must have resourcemanager.folders.undelete -// permission on the identified folder. -func (c *FoldersClient) UndeleteFolder(ctx context.Context, req *resourcemanagerpb.UndeleteFolderRequest, opts ...gax.CallOption) (*UndeleteFolderOperation, error) { - return c.internalClient.UndeleteFolder(ctx, req, opts...) -} - -// UndeleteFolderOperation returns a new UndeleteFolderOperation from a given name. -// The name must be that of a previously created UndeleteFolderOperation, possibly from a different process. -func (c *FoldersClient) UndeleteFolderOperation(name string) *UndeleteFolderOperation { - return c.internalClient.UndeleteFolderOperation(name) -} - -// GetIamPolicy gets the access control policy for a folder. The returned policy may be -// empty if no such policy or resource exists. The resource field should -// be the folder’s resource name, for example: “folders/1234”. -// The caller must have resourcemanager.folders.getIamPolicy permission -// on the identified folder. -func (c *FoldersClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error) { - return c.internalClient.GetIamPolicy(ctx, req, opts...) -} - -// SetIamPolicy sets the access control policy on a folder, replacing any existing policy. -// The resource field should be the folder’s resource name, for example: -// “folders/1234”. -// The caller must have resourcemanager.folders.setIamPolicy permission -// on the identified folder. -func (c *FoldersClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error) { - return c.internalClient.SetIamPolicy(ctx, req, opts...) -} - -// TestIamPermissions returns permissions that a caller has on the specified folder. -// The resource field should be the folder’s resource name, -// for example: “folders/1234”. -// -// There are no permissions required for making this API call. -func (c *FoldersClient) TestIamPermissions(ctx context.Context, req *iampb.TestIamPermissionsRequest, opts ...gax.CallOption) (*iampb.TestIamPermissionsResponse, error) { - return c.internalClient.TestIamPermissions(ctx, req, opts...) -} - -// GetOperation is a utility method from google.longrunning.Operations. -func (c *FoldersClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { - return c.internalClient.GetOperation(ctx, req, opts...) -} - -// foldersGRPCClient is a client for interacting with Cloud Resource Manager API over gRPC transport. -// -// Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. -type foldersGRPCClient struct { - // Connection pool of gRPC connections to the service. - connPool gtransport.ConnPool - - // Points back to the CallOptions field of the containing FoldersClient - CallOptions **FoldersCallOptions - - // The gRPC API client. - foldersClient resourcemanagerpb.FoldersClient - - // LROClient is used internally to handle long-running operations. - // It is exposed so that its CallOptions can be modified if required. - // Users should not Close this client. - LROClient **lroauto.OperationsClient - - operationsClient longrunningpb.OperationsClient - - // The x-goog-* metadata to be sent with each request. - xGoogHeaders []string - - logger *slog.Logger -} - -// NewFoldersClient creates a new folders client based on gRPC. -// The returned client must be Closed when it is done being used to clean up its underlying connections. -// -// Manages Cloud Platform folder resources. -// Folders can be used to organize the resources under an -// organization and to control the policies applied to groups of resources. -func NewFoldersClient(ctx context.Context, opts ...option.ClientOption) (*FoldersClient, error) { - clientOpts := defaultFoldersGRPCClientOptions() - if gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - clientOpts = append(clientOpts, internaloption.WithTelemetryAttributes(map[string]string{ - "gcp.client.service": "cloudresourcemanager", - "gcp.client.version": getVersionClient(), - "gcp.client.repo": "googleapis/google-cloud-go", - "gcp.client.artifact": "cloud.google.com/go/resourcemanager/apiv3", - "gcp.client.language": "go", - "url.domain": "cloudresourcemanager.googleapis.com", - })) - } - if newFoldersClientHook != nil { - hookOpts, err := newFoldersClientHook(ctx, clientHookParams{}) - if err != nil { - return nil, err - } - clientOpts = append(clientOpts, hookOpts...) - } - - connPool, err := gtransport.DialPool(ctx, append(clientOpts, opts...)...) - if err != nil { - return nil, err - } - client := FoldersClient{CallOptions: defaultFoldersCallOptions()} - - c := &foldersGRPCClient{ - connPool: connPool, - foldersClient: resourcemanagerpb.NewFoldersClient(connPool), - CallOptions: &client.CallOptions, - logger: internaloption.GetLogger(opts), - operationsClient: longrunningpb.NewOperationsClient(connPool), - } - c.setGoogleClientInfo() - if gax.IsFeatureEnabled("METRICS") { - metrics := gax.NewClientMetrics( - gax.WithTelemetryLogger(c.logger), - gax.WithTelemetryAttributes(map[string]string{ - gax.ClientService: "cloudresourcemanager", - gax.ClientVersion: getVersionClient(), - gax.ClientArtifact: "cloud.google.com/go/resourcemanager/apiv3", - gax.RPCSystem: "grpc", - gax.URLDomain: "cloudresourcemanager.googleapis.com", - }), - ) - - client.CallOptions.GetFolder = append(client.CallOptions.GetFolder, gax.WithClientMetrics(metrics)) - client.CallOptions.ListFolders = append(client.CallOptions.ListFolders, gax.WithClientMetrics(metrics)) - client.CallOptions.SearchFolders = append(client.CallOptions.SearchFolders, gax.WithClientMetrics(metrics)) - client.CallOptions.CreateFolder = append(client.CallOptions.CreateFolder, gax.WithClientMetrics(metrics)) - client.CallOptions.UpdateFolder = append(client.CallOptions.UpdateFolder, gax.WithClientMetrics(metrics)) - client.CallOptions.MoveFolder = append(client.CallOptions.MoveFolder, gax.WithClientMetrics(metrics)) - client.CallOptions.DeleteFolder = append(client.CallOptions.DeleteFolder, gax.WithClientMetrics(metrics)) - client.CallOptions.UndeleteFolder = append(client.CallOptions.UndeleteFolder, gax.WithClientMetrics(metrics)) - client.CallOptions.GetIamPolicy = append(client.CallOptions.GetIamPolicy, gax.WithClientMetrics(metrics)) - client.CallOptions.SetIamPolicy = append(client.CallOptions.SetIamPolicy, gax.WithClientMetrics(metrics)) - client.CallOptions.TestIamPermissions = append(client.CallOptions.TestIamPermissions, gax.WithClientMetrics(metrics)) - client.CallOptions.GetOperation = append(client.CallOptions.GetOperation, gax.WithClientMetrics(metrics)) - } - - client.internalClient = c - - client.LROClient, err = lroauto.NewOperationsClient(ctx, gtransport.WithConnPool(connPool)) - if err != nil { - // This error "should not happen", since we are just reusing old connection pool - // and never actually need to dial. - // If this does happen, we could leak connp. However, we cannot close conn: - // If the user invoked the constructor with option.WithGRPCConn, - // we would close a connection that's still in use. - // TODO: investigate error conditions. - return nil, err - } - c.LROClient = &client.LROClient - return &client, nil -} - -// Connection returns a connection to the API service. -// -// Deprecated: Connections are now pooled so this method does not always -// return the same resource. -func (c *foldersGRPCClient) Connection() *grpc.ClientConn { - return c.connPool.Conn() -} - -// setGoogleClientInfo sets the name and version of the application in -// the `x-goog-api-client` header passed on each request. Intended for -// use by Google-written clients. -func (c *foldersGRPCClient) setGoogleClientInfo(keyval ...string) { - kv := append([]string{"gl-go", gax.GoVersion}, keyval...) - kv = append(kv, "gapic", getVersionClient(), "gax", gax.Version, "grpc", grpc.Version, "pb", protoVersion) - c.xGoogHeaders = []string{ - "x-goog-api-client", gax.XGoogHeader(kv...), - } -} - -// Close closes the connection to the API service. The user should invoke this when -// the client is no longer required. -func (c *foldersGRPCClient) Close() error { - return c.connPool.Close() -} - -// Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. -type foldersRESTClient struct { - // The http endpoint to connect to. - endpoint string - - // The http client. - httpClient *http.Client - - // LROClient is used internally to handle long-running operations. - // It is exposed so that its CallOptions can be modified if required. - // Users should not Close this client. - LROClient **lroauto.OperationsClient - - // The x-goog-* headers to be sent with each request. - xGoogHeaders []string - - // Points back to the CallOptions field of the containing FoldersClient - CallOptions **FoldersCallOptions - - logger *slog.Logger -} - -// NewFoldersRESTClient creates a new folders rest client. -// -// Manages Cloud Platform folder resources. -// Folders can be used to organize the resources under an -// organization and to control the policies applied to groups of resources. -func NewFoldersRESTClient(ctx context.Context, opts ...option.ClientOption) (*FoldersClient, error) { - clientOpts := append(defaultFoldersRESTClientOptions(), opts...) - if gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - clientOpts = append(clientOpts, internaloption.WithTelemetryAttributes(map[string]string{ - "gcp.client.service": "cloudresourcemanager", - "gcp.client.version": getVersionClient(), - "gcp.client.repo": "googleapis/google-cloud-go", - "gcp.client.artifact": "cloud.google.com/go/resourcemanager/apiv3", - "gcp.client.language": "go", - "url.domain": "cloudresourcemanager.googleapis.com", - })) - } - httpClient, endpoint, err := httptransport.NewClient(ctx, clientOpts...) - if err != nil { - return nil, err - } - - callOpts := defaultFoldersRESTCallOptions() - c := &foldersRESTClient{ - endpoint: endpoint, - httpClient: httpClient, - CallOptions: &callOpts, - logger: internaloption.GetLogger(opts), - } - c.setGoogleClientInfo() - - if gax.IsFeatureEnabled("METRICS") { - metrics := gax.NewClientMetrics( - gax.WithTelemetryLogger(c.logger), - gax.WithTelemetryAttributes(map[string]string{ - gax.ClientService: "cloudresourcemanager", - gax.ClientVersion: getVersionClient(), - gax.ClientArtifact: "cloud.google.com/go/resourcemanager/apiv3", - gax.RPCSystem: "http", - gax.URLDomain: "cloudresourcemanager.googleapis.com", - }), - ) - - callOpts.GetFolder = append(callOpts.GetFolder, gax.WithClientMetrics(metrics)) - callOpts.ListFolders = append(callOpts.ListFolders, gax.WithClientMetrics(metrics)) - callOpts.SearchFolders = append(callOpts.SearchFolders, gax.WithClientMetrics(metrics)) - callOpts.CreateFolder = append(callOpts.CreateFolder, gax.WithClientMetrics(metrics)) - callOpts.UpdateFolder = append(callOpts.UpdateFolder, gax.WithClientMetrics(metrics)) - callOpts.MoveFolder = append(callOpts.MoveFolder, gax.WithClientMetrics(metrics)) - callOpts.DeleteFolder = append(callOpts.DeleteFolder, gax.WithClientMetrics(metrics)) - callOpts.UndeleteFolder = append(callOpts.UndeleteFolder, gax.WithClientMetrics(metrics)) - callOpts.GetIamPolicy = append(callOpts.GetIamPolicy, gax.WithClientMetrics(metrics)) - callOpts.SetIamPolicy = append(callOpts.SetIamPolicy, gax.WithClientMetrics(metrics)) - callOpts.TestIamPermissions = append(callOpts.TestIamPermissions, gax.WithClientMetrics(metrics)) - callOpts.GetOperation = append(callOpts.GetOperation, gax.WithClientMetrics(metrics)) - } - - lroOpts := []option.ClientOption{ - option.WithHTTPClient(httpClient), - option.WithEndpoint(endpoint), - } - opClient, err := lroauto.NewOperationsRESTClient(ctx, lroOpts...) - if err != nil { - return nil, err - } - c.LROClient = &opClient - - return &FoldersClient{internalClient: c, CallOptions: callOpts}, nil -} - -func defaultFoldersRESTClientOptions() []option.ClientOption { - return []option.ClientOption{ - internaloption.WithDefaultEndpoint("https://cloudresourcemanager.googleapis.com"), - internaloption.WithDefaultEndpointTemplate("https://cloudresourcemanager.UNIVERSE_DOMAIN"), - internaloption.WithDefaultMTLSEndpoint("https://cloudresourcemanager.mtls.googleapis.com"), - internaloption.WithDefaultUniverseDomain("googleapis.com"), - internaloption.WithDefaultAudience("https://cloudresourcemanager.googleapis.com/"), - internaloption.WithDefaultScopes(DefaultAuthScopes()...), - internaloption.EnableNewAuthLibrary(), - } -} - -// setGoogleClientInfo sets the name and version of the application in -// the `x-goog-api-client` header passed on each request. Intended for -// use by Google-written clients. -func (c *foldersRESTClient) setGoogleClientInfo(keyval ...string) { - kv := append([]string{"gl-go", gax.GoVersion}, keyval...) - kv = append(kv, "gapic", getVersionClient(), "gax", gax.Version, "rest", "UNKNOWN", "pb", protoVersion) - c.xGoogHeaders = []string{ - "x-goog-api-client", gax.XGoogHeader(kv...), - } -} - -// Close closes the connection to the API service. The user should invoke this when -// the client is no longer required. -func (c *foldersRESTClient) Close() error { - // Replace httpClient with nil to force cleanup. - c.httpClient = nil - return nil -} - -// Connection returns a connection to the API service. -// -// Deprecated: This method always returns nil. -func (c *foldersRESTClient) Connection() *grpc.ClientConn { - return nil -} -func (c *foldersGRPCClient) GetFolder(ctx context.Context, req *resourcemanagerpb.GetFolderRequest, opts ...gax.CallOption) (*resourcemanagerpb.Folder, error) { - hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))} - - hds = append(c.xGoogHeaders, hds...) - ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) - if gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "resource_name", fmt.Sprintf("//cloudresourcemanager.googleapis.com/%v", req.GetName())) - } - if gax.IsFeatureEnabled("METRICS") || gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "rpc_method", "google.cloud.resourcemanager.v3.Folders/GetFolder") - } - opts = append((*c.CallOptions).GetFolder[0:len((*c.CallOptions).GetFolder):len((*c.CallOptions).GetFolder)], opts...) - var resp *resourcemanagerpb.Folder - err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - var err error - resp, err = executeRPC(ctx, c.foldersClient.GetFolder, req, settings.GRPC, c.logger, "GetFolder") - return err - }, opts...) - if err != nil { - return nil, err - } - return resp, nil -} - -func (c *foldersGRPCClient) ListFolders(ctx context.Context, req *resourcemanagerpb.ListFoldersRequest, opts ...gax.CallOption) *FolderIterator { - ctx = gax.InsertMetadataIntoOutgoingContext(ctx, c.xGoogHeaders...) - if gax.IsFeatureEnabled("METRICS") || gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "rpc_method", "google.cloud.resourcemanager.v3.Folders/ListFolders") - } - opts = append((*c.CallOptions).ListFolders[0:len((*c.CallOptions).ListFolders):len((*c.CallOptions).ListFolders)], opts...) - it := &FolderIterator{} - req = proto.Clone(req).(*resourcemanagerpb.ListFoldersRequest) - it.InternalFetch = func(pageSize int, pageToken string) ([]*resourcemanagerpb.Folder, string, error) { - resp := &resourcemanagerpb.ListFoldersResponse{} - if pageToken != "" { - req.PageToken = pageToken - } - if pageSize > math.MaxInt32 { - req.PageSize = math.MaxInt32 - } else if pageSize != 0 { - req.PageSize = int32(pageSize) - } - err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - var err error - resp, err = executeRPC(ctx, c.foldersClient.ListFolders, req, settings.GRPC, c.logger, "ListFolders") - return err - }, opts...) - if err != nil { - return nil, "", err - } - - it.Response = resp - return resp.GetFolders(), resp.GetNextPageToken(), nil - } - fetch := func(pageSize int, pageToken string) (string, error) { - items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) - if err != nil { - return "", err - } - it.items = append(it.items, items...) - return nextPageToken, nil - } - - it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) - it.pageInfo.MaxSize = int(req.GetPageSize()) - it.pageInfo.Token = req.GetPageToken() - - return it -} - -func (c *foldersGRPCClient) SearchFolders(ctx context.Context, req *resourcemanagerpb.SearchFoldersRequest, opts ...gax.CallOption) *FolderIterator { - ctx = gax.InsertMetadataIntoOutgoingContext(ctx, c.xGoogHeaders...) - if gax.IsFeatureEnabled("METRICS") || gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "rpc_method", "google.cloud.resourcemanager.v3.Folders/SearchFolders") - } - opts = append((*c.CallOptions).SearchFolders[0:len((*c.CallOptions).SearchFolders):len((*c.CallOptions).SearchFolders)], opts...) - it := &FolderIterator{} - req = proto.Clone(req).(*resourcemanagerpb.SearchFoldersRequest) - it.InternalFetch = func(pageSize int, pageToken string) ([]*resourcemanagerpb.Folder, string, error) { - resp := &resourcemanagerpb.SearchFoldersResponse{} - if pageToken != "" { - req.PageToken = pageToken - } - if pageSize > math.MaxInt32 { - req.PageSize = math.MaxInt32 - } else if pageSize != 0 { - req.PageSize = int32(pageSize) - } - err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - var err error - resp, err = executeRPC(ctx, c.foldersClient.SearchFolders, req, settings.GRPC, c.logger, "SearchFolders") - return err - }, opts...) - if err != nil { - return nil, "", err - } - - it.Response = resp - return resp.GetFolders(), resp.GetNextPageToken(), nil - } - fetch := func(pageSize int, pageToken string) (string, error) { - items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) - if err != nil { - return "", err - } - it.items = append(it.items, items...) - return nextPageToken, nil - } - - it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) - it.pageInfo.MaxSize = int(req.GetPageSize()) - it.pageInfo.Token = req.GetPageToken() - - return it -} - -func (c *foldersGRPCClient) CreateFolder(ctx context.Context, req *resourcemanagerpb.CreateFolderRequest, opts ...gax.CallOption) (*CreateFolderOperation, error) { - ctx = gax.InsertMetadataIntoOutgoingContext(ctx, c.xGoogHeaders...) - if gax.IsFeatureEnabled("METRICS") || gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "rpc_method", "google.cloud.resourcemanager.v3.Folders/CreateFolder") - } - opts = append((*c.CallOptions).CreateFolder[0:len((*c.CallOptions).CreateFolder):len((*c.CallOptions).CreateFolder)], opts...) - var resp *longrunningpb.Operation - err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - var err error - resp, err = executeRPC(ctx, c.foldersClient.CreateFolder, req, settings.GRPC, c.logger, "CreateFolder") - return err - }, opts...) - if err != nil { - return nil, err - } - return &CreateFolderOperation{ - lro: longrunning.InternalNewOperation(*c.LROClient, resp), - }, nil -} - -func (c *foldersGRPCClient) UpdateFolder(ctx context.Context, req *resourcemanagerpb.UpdateFolderRequest, opts ...gax.CallOption) (*UpdateFolderOperation, error) { - hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "folder.name", url.QueryEscape(req.GetFolder().GetName()))} - - hds = append(c.xGoogHeaders, hds...) - ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) - if gax.IsFeatureEnabled("METRICS") || gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "rpc_method", "google.cloud.resourcemanager.v3.Folders/UpdateFolder") - } - opts = append((*c.CallOptions).UpdateFolder[0:len((*c.CallOptions).UpdateFolder):len((*c.CallOptions).UpdateFolder)], opts...) - var resp *longrunningpb.Operation - err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - var err error - resp, err = executeRPC(ctx, c.foldersClient.UpdateFolder, req, settings.GRPC, c.logger, "UpdateFolder") - return err - }, opts...) - if err != nil { - return nil, err - } - return &UpdateFolderOperation{ - lro: longrunning.InternalNewOperation(*c.LROClient, resp), - }, nil -} - -func (c *foldersGRPCClient) MoveFolder(ctx context.Context, req *resourcemanagerpb.MoveFolderRequest, opts ...gax.CallOption) (*MoveFolderOperation, error) { - hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))} - - hds = append(c.xGoogHeaders, hds...) - ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) - if gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "resource_name", fmt.Sprintf("//cloudresourcemanager.googleapis.com/%v", req.GetName())) - } - if gax.IsFeatureEnabled("METRICS") || gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "rpc_method", "google.cloud.resourcemanager.v3.Folders/MoveFolder") - } - opts = append((*c.CallOptions).MoveFolder[0:len((*c.CallOptions).MoveFolder):len((*c.CallOptions).MoveFolder)], opts...) - var resp *longrunningpb.Operation - err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - var err error - resp, err = executeRPC(ctx, c.foldersClient.MoveFolder, req, settings.GRPC, c.logger, "MoveFolder") - return err - }, opts...) - if err != nil { - return nil, err - } - return &MoveFolderOperation{ - lro: longrunning.InternalNewOperation(*c.LROClient, resp), - }, nil -} - -func (c *foldersGRPCClient) DeleteFolder(ctx context.Context, req *resourcemanagerpb.DeleteFolderRequest, opts ...gax.CallOption) (*DeleteFolderOperation, error) { - hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))} - - hds = append(c.xGoogHeaders, hds...) - ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) - if gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "resource_name", fmt.Sprintf("//cloudresourcemanager.googleapis.com/%v", req.GetName())) - } - if gax.IsFeatureEnabled("METRICS") || gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "rpc_method", "google.cloud.resourcemanager.v3.Folders/DeleteFolder") - } - opts = append((*c.CallOptions).DeleteFolder[0:len((*c.CallOptions).DeleteFolder):len((*c.CallOptions).DeleteFolder)], opts...) - var resp *longrunningpb.Operation - err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - var err error - resp, err = executeRPC(ctx, c.foldersClient.DeleteFolder, req, settings.GRPC, c.logger, "DeleteFolder") - return err - }, opts...) - if err != nil { - return nil, err - } - return &DeleteFolderOperation{ - lro: longrunning.InternalNewOperation(*c.LROClient, resp), - }, nil -} - -func (c *foldersGRPCClient) UndeleteFolder(ctx context.Context, req *resourcemanagerpb.UndeleteFolderRequest, opts ...gax.CallOption) (*UndeleteFolderOperation, error) { - hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))} - - hds = append(c.xGoogHeaders, hds...) - ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) - if gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "resource_name", fmt.Sprintf("//cloudresourcemanager.googleapis.com/%v", req.GetName())) - } - if gax.IsFeatureEnabled("METRICS") || gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "rpc_method", "google.cloud.resourcemanager.v3.Folders/UndeleteFolder") - } - opts = append((*c.CallOptions).UndeleteFolder[0:len((*c.CallOptions).UndeleteFolder):len((*c.CallOptions).UndeleteFolder)], opts...) - var resp *longrunningpb.Operation - err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - var err error - resp, err = executeRPC(ctx, c.foldersClient.UndeleteFolder, req, settings.GRPC, c.logger, "UndeleteFolder") - return err - }, opts...) - if err != nil { - return nil, err - } - return &UndeleteFolderOperation{ - lro: longrunning.InternalNewOperation(*c.LROClient, resp), - }, nil -} - -func (c *foldersGRPCClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error) { - hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "resource", url.QueryEscape(req.GetResource()))} - - hds = append(c.xGoogHeaders, hds...) - ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) - if gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "resource_name", fmt.Sprintf("//cloudresourcemanager.googleapis.com/%v", req.GetResource())) - } - if gax.IsFeatureEnabled("METRICS") || gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "rpc_method", "google.cloud.resourcemanager.v3.Folders/GetIamPolicy") - } - opts = append((*c.CallOptions).GetIamPolicy[0:len((*c.CallOptions).GetIamPolicy):len((*c.CallOptions).GetIamPolicy)], opts...) - var resp *iampb.Policy - err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - var err error - resp, err = executeRPC(ctx, c.foldersClient.GetIamPolicy, req, settings.GRPC, c.logger, "GetIamPolicy") - return err - }, opts...) - if err != nil { - return nil, err - } - return resp, nil -} - -func (c *foldersGRPCClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error) { - hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "resource", url.QueryEscape(req.GetResource()))} - - hds = append(c.xGoogHeaders, hds...) - ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) - if gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "resource_name", fmt.Sprintf("//cloudresourcemanager.googleapis.com/%v", req.GetResource())) - } - if gax.IsFeatureEnabled("METRICS") || gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "rpc_method", "google.cloud.resourcemanager.v3.Folders/SetIamPolicy") - } - opts = append((*c.CallOptions).SetIamPolicy[0:len((*c.CallOptions).SetIamPolicy):len((*c.CallOptions).SetIamPolicy)], opts...) - var resp *iampb.Policy - err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - var err error - resp, err = executeRPC(ctx, c.foldersClient.SetIamPolicy, req, settings.GRPC, c.logger, "SetIamPolicy") - return err - }, opts...) - if err != nil { - return nil, err - } - return resp, nil -} - -func (c *foldersGRPCClient) TestIamPermissions(ctx context.Context, req *iampb.TestIamPermissionsRequest, opts ...gax.CallOption) (*iampb.TestIamPermissionsResponse, error) { - hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "resource", url.QueryEscape(req.GetResource()))} - - hds = append(c.xGoogHeaders, hds...) - ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) - if gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "resource_name", fmt.Sprintf("//cloudresourcemanager.googleapis.com/%v", req.GetResource())) - } - if gax.IsFeatureEnabled("METRICS") || gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "rpc_method", "google.cloud.resourcemanager.v3.Folders/TestIamPermissions") - } - opts = append((*c.CallOptions).TestIamPermissions[0:len((*c.CallOptions).TestIamPermissions):len((*c.CallOptions).TestIamPermissions)], opts...) - var resp *iampb.TestIamPermissionsResponse - err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - var err error - resp, err = executeRPC(ctx, c.foldersClient.TestIamPermissions, req, settings.GRPC, c.logger, "TestIamPermissions") - return err - }, opts...) - if err != nil { - return nil, err - } - return resp, nil -} - -func (c *foldersGRPCClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { - hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))} - - hds = append(c.xGoogHeaders, hds...) - ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) - if gax.IsFeatureEnabled("METRICS") || gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "rpc_method", "google.longrunning.Operations/GetOperation") - } - opts = append((*c.CallOptions).GetOperation[0:len((*c.CallOptions).GetOperation):len((*c.CallOptions).GetOperation)], opts...) - var resp *longrunningpb.Operation - err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - var err error - resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") - return err - }, opts...) - if err != nil { - return nil, err - } - return resp, nil -} - -// GetFolder retrieves a folder identified by the supplied resource name. -// Valid folder resource names have the format folders/{folder_id} -// (for example, folders/1234). -// The caller must have resourcemanager.folders.get permission on the -// identified folder. -func (c *foldersRESTClient) GetFolder(ctx context.Context, req *resourcemanagerpb.GetFolderRequest, opts ...gax.CallOption) (*resourcemanagerpb.Folder, error) { - baseUrl, err := url.Parse(c.endpoint) - if err != nil { - return nil, err - } - baseUrl.Path += fmt.Sprintf("/v3/%v", req.GetName()) - - params := url.Values{} - params.Add("$alt", "json;enum-encoding=int") - - baseUrl.RawQuery = params.Encode() - - // Build HTTP headers from client and context metadata. - hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))} - - hds = append(c.xGoogHeaders, hds...) - hds = append(hds, "Content-Type", "application/json") - headers := gax.BuildHeaders(ctx, hds...) - if gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "resource_name", fmt.Sprintf("//cloudresourcemanager.googleapis.com/%v", req.GetName())) - } - if gax.IsFeatureEnabled("METRICS") || gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "rpc_method", "google.cloud.resourcemanager.v3.Folders/GetFolder") - ctx = callctx.WithTelemetryContext(ctx, "url_template", "/v3/{name=folders/*}") - } - opts = append((*c.CallOptions).GetFolder[0:len((*c.CallOptions).GetFolder):len((*c.CallOptions).GetFolder)], opts...) - unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} - resp := &resourcemanagerpb.Folder{} - e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - if settings.Path != "" { - baseUrl.Path = settings.Path - } - httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) - if err != nil { - return err - } - httpReq = httpReq.WithContext(ctx) - httpReq.Header = headers - - buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetFolder") - if err != nil { - return err - } - - if err := unm.Unmarshal(buf, resp); err != nil { - return err - } - - return nil - }, opts...) - if e != nil { - return nil, e - } - return resp, nil -} - -// ListFolders lists the folders that are direct descendants of supplied parent resource. -// list() provides a strongly consistent view of the folders underneath -// the specified parent resource. -// list() returns folders sorted based upon the (ascending) lexical ordering -// of their display_name. -// The caller must have resourcemanager.folders.list permission on the -// identified parent. -func (c *foldersRESTClient) ListFolders(ctx context.Context, req *resourcemanagerpb.ListFoldersRequest, opts ...gax.CallOption) *FolderIterator { - it := &FolderIterator{} - req = proto.Clone(req).(*resourcemanagerpb.ListFoldersRequest) - unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} - it.InternalFetch = func(pageSize int, pageToken string) ([]*resourcemanagerpb.Folder, string, error) { - resp := &resourcemanagerpb.ListFoldersResponse{} - if pageToken != "" { - req.PageToken = pageToken - } - if pageSize > math.MaxInt32 { - req.PageSize = math.MaxInt32 - } else if pageSize != 0 { - req.PageSize = int32(pageSize) - } - baseUrl, err := url.Parse(c.endpoint) - if err != nil { - return nil, "", err - } - baseUrl.Path += fmt.Sprintf("/v3/folders") - - params := url.Values{} - params.Add("$alt", "json;enum-encoding=int") - if req.GetPageSize() != 0 { - params.Add("pageSize", fmt.Sprintf("%v", req.GetPageSize())) - } - if req.GetPageToken() != "" { - params.Add("pageToken", fmt.Sprintf("%v", req.GetPageToken())) - } - params.Add("parent", fmt.Sprintf("%v", req.GetParent())) - if req.GetShowDeleted() { - params.Add("showDeleted", fmt.Sprintf("%v", req.GetShowDeleted())) - } - - baseUrl.RawQuery = params.Encode() - - // Build HTTP headers from client and context metadata. - hds := append(c.xGoogHeaders, "Content-Type", "application/json") - headers := gax.BuildHeaders(ctx, hds...) - e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - if settings.Path != "" { - baseUrl.Path = settings.Path - } - httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) - if err != nil { - return err - } - httpReq.Header = headers - - buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListFolders") - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { - return err - } - - return nil - }, opts...) - if e != nil { - return nil, "", e - } - it.Response = resp - return resp.GetFolders(), resp.GetNextPageToken(), nil - } - - fetch := func(pageSize int, pageToken string) (string, error) { - items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) - if err != nil { - return "", err - } - it.items = append(it.items, items...) - return nextPageToken, nil - } - - it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) - it.pageInfo.MaxSize = int(req.GetPageSize()) - it.pageInfo.Token = req.GetPageToken() - - return it -} - -// SearchFolders search for folders that match specific filter criteria. -// search() provides an eventually consistent view of the folders a user has -// access to which meet the specified filter criteria. -// -// This will only return folders on which the caller has the -// permission resourcemanager.folders.get. -func (c *foldersRESTClient) SearchFolders(ctx context.Context, req *resourcemanagerpb.SearchFoldersRequest, opts ...gax.CallOption) *FolderIterator { - it := &FolderIterator{} - req = proto.Clone(req).(*resourcemanagerpb.SearchFoldersRequest) - unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} - it.InternalFetch = func(pageSize int, pageToken string) ([]*resourcemanagerpb.Folder, string, error) { - resp := &resourcemanagerpb.SearchFoldersResponse{} - if pageToken != "" { - req.PageToken = pageToken - } - if pageSize > math.MaxInt32 { - req.PageSize = math.MaxInt32 - } else if pageSize != 0 { - req.PageSize = int32(pageSize) - } - baseUrl, err := url.Parse(c.endpoint) - if err != nil { - return nil, "", err - } - baseUrl.Path += fmt.Sprintf("/v3/folders:search") - - params := url.Values{} - params.Add("$alt", "json;enum-encoding=int") - if req.GetPageSize() != 0 { - params.Add("pageSize", fmt.Sprintf("%v", req.GetPageSize())) - } - if req.GetPageToken() != "" { - params.Add("pageToken", fmt.Sprintf("%v", req.GetPageToken())) - } - if req.GetQuery() != "" { - params.Add("query", fmt.Sprintf("%v", req.GetQuery())) - } - - baseUrl.RawQuery = params.Encode() - - // Build HTTP headers from client and context metadata. - hds := append(c.xGoogHeaders, "Content-Type", "application/json") - headers := gax.BuildHeaders(ctx, hds...) - e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - if settings.Path != "" { - baseUrl.Path = settings.Path - } - httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) - if err != nil { - return err - } - httpReq.Header = headers - - buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "SearchFolders") - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { - return err - } - - return nil - }, opts...) - if e != nil { - return nil, "", e - } - it.Response = resp - return resp.GetFolders(), resp.GetNextPageToken(), nil - } - - fetch := func(pageSize int, pageToken string) (string, error) { - items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) - if err != nil { - return "", err - } - it.items = append(it.items, items...) - return nextPageToken, nil - } - - it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) - it.pageInfo.MaxSize = int(req.GetPageSize()) - it.pageInfo.Token = req.GetPageToken() - - return it -} - -// CreateFolder creates a folder in the resource hierarchy. -// Returns an Operation which can be used to track the progress of the -// folder creation workflow. -// Upon success, the Operation.response field will be populated with the -// created Folder. -// -// In order to succeed, the addition of this new folder must not violate -// the folder naming, height, or fanout constraints. -// -// The folder’s display_name must be distinct from all other folders that -// share its parent. -// -// The addition of the folder must not cause the active folder hierarchy -// to exceed a height of 10. Note, the full active + deleted folder hierarchy -// is allowed to reach a height of 20; this provides additional headroom when -// moving folders that contain deleted folders. -// -// The addition of the folder must not cause the total number of folders -// under its parent to exceed 300. -// -// If the operation fails due to a folder constraint violation, some errors -// may be returned by the CreateFolder request, with status code -// FAILED_PRECONDITION and an error description. Other folder constraint -// violations will be communicated in the Operation, with the specific -// PreconditionFailure returned in the details list in the Operation.error -// field. -// -// The caller must have resourcemanager.folders.create permission on the -// identified parent. -func (c *foldersRESTClient) CreateFolder(ctx context.Context, req *resourcemanagerpb.CreateFolderRequest, opts ...gax.CallOption) (*CreateFolderOperation, error) { - m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} - body := req.GetFolder() - jsonReq, err := m.Marshal(body) - if err != nil { - return nil, err - } - - baseUrl, err := url.Parse(c.endpoint) - if err != nil { - return nil, err - } - baseUrl.Path += fmt.Sprintf("/v3/folders") - - params := url.Values{} - params.Add("$alt", "json;enum-encoding=int") - - baseUrl.RawQuery = params.Encode() - - // Build HTTP headers from client and context metadata. - hds := append(c.xGoogHeaders, "Content-Type", "application/json") - headers := gax.BuildHeaders(ctx, hds...) - if gax.IsFeatureEnabled("METRICS") || gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "rpc_method", "google.cloud.resourcemanager.v3.Folders/CreateFolder") - ctx = callctx.WithTelemetryContext(ctx, "url_template", "/v3/folders") - } - unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} - resp := &longrunningpb.Operation{} - e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - if settings.Path != "" { - baseUrl.Path = settings.Path - } - httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) - if err != nil { - return err - } - httpReq = httpReq.WithContext(ctx) - httpReq.Header = headers - - buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateFolder") - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { - return err - } - - return nil - }, opts...) - if e != nil { - return nil, e - } - - override := fmt.Sprintf("/v3/%s", resp.GetName()) - return &CreateFolderOperation{ - lro: longrunning.InternalNewOperation(*c.LROClient, resp), - pollPath: override, - }, nil -} - -// UpdateFolder updates a folder, changing its display_name. -// Changes to the folder display_name will be rejected if they violate -// either the display_name formatting rules or the naming constraints -// described in the -// CreateFolder -// documentation. -// -// The folder’s display_name must start and end with a letter or digit, -// may contain letters, digits, spaces, hyphens and underscores and can be -// between 3 and 30 characters. This is captured by the regular expression: -// [\p{L}\p{N}][\p{L}\p{N}_- ]{1,28}[\p{L}\p{N}]. -// The caller must have resourcemanager.folders.update permission on the -// identified folder. -// -// If the update fails due to the unique name constraint then a -// PreconditionFailure explaining this violation will be returned -// in the Status.details field. -func (c *foldersRESTClient) UpdateFolder(ctx context.Context, req *resourcemanagerpb.UpdateFolderRequest, opts ...gax.CallOption) (*UpdateFolderOperation, error) { - m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} - body := req.GetFolder() - jsonReq, err := m.Marshal(body) - if err != nil { - return nil, err - } - - baseUrl, err := url.Parse(c.endpoint) - if err != nil { - return nil, err - } - baseUrl.Path += fmt.Sprintf("/v3/%v", req.GetFolder().GetName()) - - params := url.Values{} - params.Add("$alt", "json;enum-encoding=int") - if req.GetUpdateMask() != nil { - field, err := protojson.Marshal(req.GetUpdateMask()) - if err != nil { - return nil, err - } - params.Add("updateMask", string(field[1:len(field)-1])) - } - - baseUrl.RawQuery = params.Encode() - - // Build HTTP headers from client and context metadata. - hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "folder.name", url.QueryEscape(req.GetFolder().GetName()))} - - hds = append(c.xGoogHeaders, hds...) - hds = append(hds, "Content-Type", "application/json") - headers := gax.BuildHeaders(ctx, hds...) - if gax.IsFeatureEnabled("METRICS") || gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "rpc_method", "google.cloud.resourcemanager.v3.Folders/UpdateFolder") - ctx = callctx.WithTelemetryContext(ctx, "url_template", "/v3/{folder.name=folders/*}") - } - unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} - resp := &longrunningpb.Operation{} - e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - if settings.Path != "" { - baseUrl.Path = settings.Path - } - httpReq, err := http.NewRequest("PATCH", baseUrl.String(), bytes.NewReader(jsonReq)) - if err != nil { - return err - } - httpReq = httpReq.WithContext(ctx) - httpReq.Header = headers - - buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateFolder") - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { - return err - } - - return nil - }, opts...) - if e != nil { - return nil, e - } - - override := fmt.Sprintf("/v3/%s", resp.GetName()) - return &UpdateFolderOperation{ - lro: longrunning.InternalNewOperation(*c.LROClient, resp), - pollPath: override, - }, nil -} - -// MoveFolder moves a folder under a new resource parent. -// Returns an Operation which can be used to track the progress of the -// folder move workflow. -// Upon success, the Operation.response field will be populated with the -// moved folder. -// Upon failure, a FolderOperationError categorizing the failure cause will -// be returned - if the failure occurs synchronously then the -// FolderOperationError will be returned in the Status.details field. -// If it occurs asynchronously, then the FolderOperation will be returned -// in the Operation.error field. -// In addition, the Operation.metadata field will be populated with a -// FolderOperation message as an aid to stateless clients. -// Folder moves will be rejected if they violate either the naming, height, -// or fanout constraints described in the -// CreateFolder -// documentation. The caller must have resourcemanager.folders.move -// permission on the folder’s current and proposed new parent. -func (c *foldersRESTClient) MoveFolder(ctx context.Context, req *resourcemanagerpb.MoveFolderRequest, opts ...gax.CallOption) (*MoveFolderOperation, error) { - m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} - jsonReq, err := m.Marshal(req) - if err != nil { - return nil, err - } - - baseUrl, err := url.Parse(c.endpoint) - if err != nil { - return nil, err - } - baseUrl.Path += fmt.Sprintf("/v3/%v:move", req.GetName()) - - params := url.Values{} - params.Add("$alt", "json;enum-encoding=int") - - baseUrl.RawQuery = params.Encode() - - // Build HTTP headers from client and context metadata. - hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))} - - hds = append(c.xGoogHeaders, hds...) - hds = append(hds, "Content-Type", "application/json") - headers := gax.BuildHeaders(ctx, hds...) - if gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "resource_name", fmt.Sprintf("//cloudresourcemanager.googleapis.com/%v", req.GetName())) - } - if gax.IsFeatureEnabled("METRICS") || gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "rpc_method", "google.cloud.resourcemanager.v3.Folders/MoveFolder") - ctx = callctx.WithTelemetryContext(ctx, "url_template", "/v3/{name=folders/*}:move") - } - unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} - resp := &longrunningpb.Operation{} - e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - if settings.Path != "" { - baseUrl.Path = settings.Path - } - httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) - if err != nil { - return err - } - httpReq = httpReq.WithContext(ctx) - httpReq.Header = headers - - buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "MoveFolder") - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { - return err - } - - return nil - }, opts...) - if e != nil { - return nil, e - } - - override := fmt.Sprintf("/v3/%s", resp.GetName()) - return &MoveFolderOperation{ - lro: longrunning.InternalNewOperation(*c.LROClient, resp), - pollPath: override, - }, nil -} - -// DeleteFolder requests deletion of a folder. The folder is moved into the -// DELETE_REQUESTED -// state immediately, and is deleted approximately 30 days later. This method -// may only be called on an empty folder, where a folder is empty if it -// doesn’t contain any folders or projects in the -// [ACTIVE][google.cloud.resourcemanager.v3.Folder.State.ACTIVE (at http://google.cloud.resourcemanager.v3.Folder.State.ACTIVE)] state. If -// called on a folder in -// DELETE_REQUESTED -// state the operation will result in a no-op success. -// The caller must have resourcemanager.folders.delete permission on the -// identified folder. -func (c *foldersRESTClient) DeleteFolder(ctx context.Context, req *resourcemanagerpb.DeleteFolderRequest, opts ...gax.CallOption) (*DeleteFolderOperation, error) { - baseUrl, err := url.Parse(c.endpoint) - if err != nil { - return nil, err - } - baseUrl.Path += fmt.Sprintf("/v3/%v", req.GetName()) - - params := url.Values{} - params.Add("$alt", "json;enum-encoding=int") - - baseUrl.RawQuery = params.Encode() - - // Build HTTP headers from client and context metadata. - hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))} - - hds = append(c.xGoogHeaders, hds...) - hds = append(hds, "Content-Type", "application/json") - headers := gax.BuildHeaders(ctx, hds...) - if gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "resource_name", fmt.Sprintf("//cloudresourcemanager.googleapis.com/%v", req.GetName())) - } - if gax.IsFeatureEnabled("METRICS") || gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "rpc_method", "google.cloud.resourcemanager.v3.Folders/DeleteFolder") - ctx = callctx.WithTelemetryContext(ctx, "url_template", "/v3/{name=folders/*}") - } - unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} - resp := &longrunningpb.Operation{} - e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - if settings.Path != "" { - baseUrl.Path = settings.Path - } - httpReq, err := http.NewRequest("DELETE", baseUrl.String(), nil) - if err != nil { - return err - } - httpReq = httpReq.WithContext(ctx) - httpReq.Header = headers - - buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteFolder") - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { - return err - } - - return nil - }, opts...) - if e != nil { - return nil, e - } - - override := fmt.Sprintf("/v3/%s", resp.GetName()) - return &DeleteFolderOperation{ - lro: longrunning.InternalNewOperation(*c.LROClient, resp), - pollPath: override, - }, nil -} - -// UndeleteFolder cancels the deletion request for a folder. This method may be called on a -// folder in any state. If the folder is in the -// [ACTIVE][google.cloud.resourcemanager.v3.Folder.State.ACTIVE (at http://google.cloud.resourcemanager.v3.Folder.State.ACTIVE)] state the -// result will be a no-op success. In order to succeed, the folder’s parent -// must be in the -// [ACTIVE][google.cloud.resourcemanager.v3.Folder.State.ACTIVE (at http://google.cloud.resourcemanager.v3.Folder.State.ACTIVE)] state. In -// addition, reintroducing the folder into the tree must not violate folder -// naming, height, and fanout constraints described in the -// CreateFolder -// documentation. The caller must have resourcemanager.folders.undelete -// permission on the identified folder. -func (c *foldersRESTClient) UndeleteFolder(ctx context.Context, req *resourcemanagerpb.UndeleteFolderRequest, opts ...gax.CallOption) (*UndeleteFolderOperation, error) { - m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} - jsonReq, err := m.Marshal(req) - if err != nil { - return nil, err - } - - baseUrl, err := url.Parse(c.endpoint) - if err != nil { - return nil, err - } - baseUrl.Path += fmt.Sprintf("/v3/%v:undelete", req.GetName()) - - params := url.Values{} - params.Add("$alt", "json;enum-encoding=int") - - baseUrl.RawQuery = params.Encode() - - // Build HTTP headers from client and context metadata. - hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))} - - hds = append(c.xGoogHeaders, hds...) - hds = append(hds, "Content-Type", "application/json") - headers := gax.BuildHeaders(ctx, hds...) - if gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "resource_name", fmt.Sprintf("//cloudresourcemanager.googleapis.com/%v", req.GetName())) - } - if gax.IsFeatureEnabled("METRICS") || gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "rpc_method", "google.cloud.resourcemanager.v3.Folders/UndeleteFolder") - ctx = callctx.WithTelemetryContext(ctx, "url_template", "/v3/{name=folders/*}:undelete") - } - unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} - resp := &longrunningpb.Operation{} - e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - if settings.Path != "" { - baseUrl.Path = settings.Path - } - httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) - if err != nil { - return err - } - httpReq = httpReq.WithContext(ctx) - httpReq.Header = headers - - buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UndeleteFolder") - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { - return err - } - - return nil - }, opts...) - if e != nil { - return nil, e - } - - override := fmt.Sprintf("/v3/%s", resp.GetName()) - return &UndeleteFolderOperation{ - lro: longrunning.InternalNewOperation(*c.LROClient, resp), - pollPath: override, - }, nil -} - -// GetIamPolicy gets the access control policy for a folder. The returned policy may be -// empty if no such policy or resource exists. The resource field should -// be the folder’s resource name, for example: “folders/1234”. -// The caller must have resourcemanager.folders.getIamPolicy permission -// on the identified folder. -func (c *foldersRESTClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error) { - m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} - jsonReq, err := m.Marshal(req) - if err != nil { - return nil, err - } - - baseUrl, err := url.Parse(c.endpoint) - if err != nil { - return nil, err - } - baseUrl.Path += fmt.Sprintf("/v3/%v:getIamPolicy", req.GetResource()) - - params := url.Values{} - params.Add("$alt", "json;enum-encoding=int") - - baseUrl.RawQuery = params.Encode() - - // Build HTTP headers from client and context metadata. - hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "resource", url.QueryEscape(req.GetResource()))} - - hds = append(c.xGoogHeaders, hds...) - hds = append(hds, "Content-Type", "application/json") - headers := gax.BuildHeaders(ctx, hds...) - if gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "resource_name", fmt.Sprintf("//cloudresourcemanager.googleapis.com/%v", req.GetResource())) - } - if gax.IsFeatureEnabled("METRICS") || gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "rpc_method", "google.cloud.resourcemanager.v3.Folders/GetIamPolicy") - ctx = callctx.WithTelemetryContext(ctx, "url_template", "/v3/{resource=folders/*}:getIamPolicy") - } - opts = append((*c.CallOptions).GetIamPolicy[0:len((*c.CallOptions).GetIamPolicy):len((*c.CallOptions).GetIamPolicy)], opts...) - unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} - resp := &iampb.Policy{} - e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - if settings.Path != "" { - baseUrl.Path = settings.Path - } - httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) - if err != nil { - return err - } - httpReq = httpReq.WithContext(ctx) - httpReq.Header = headers - - buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "GetIamPolicy") - if err != nil { - return err - } - - if err := unm.Unmarshal(buf, resp); err != nil { - return err - } - - return nil - }, opts...) - if e != nil { - return nil, e - } - return resp, nil -} - -// SetIamPolicy sets the access control policy on a folder, replacing any existing policy. -// The resource field should be the folder’s resource name, for example: -// “folders/1234”. -// The caller must have resourcemanager.folders.setIamPolicy permission -// on the identified folder. -func (c *foldersRESTClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error) { - m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} - jsonReq, err := m.Marshal(req) - if err != nil { - return nil, err - } - - baseUrl, err := url.Parse(c.endpoint) - if err != nil { - return nil, err - } - baseUrl.Path += fmt.Sprintf("/v3/%v:setIamPolicy", req.GetResource()) - - params := url.Values{} - params.Add("$alt", "json;enum-encoding=int") - - baseUrl.RawQuery = params.Encode() - - // Build HTTP headers from client and context metadata. - hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "resource", url.QueryEscape(req.GetResource()))} - - hds = append(c.xGoogHeaders, hds...) - hds = append(hds, "Content-Type", "application/json") - headers := gax.BuildHeaders(ctx, hds...) - if gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "resource_name", fmt.Sprintf("//cloudresourcemanager.googleapis.com/%v", req.GetResource())) - } - if gax.IsFeatureEnabled("METRICS") || gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "rpc_method", "google.cloud.resourcemanager.v3.Folders/SetIamPolicy") - ctx = callctx.WithTelemetryContext(ctx, "url_template", "/v3/{resource=folders/*}:setIamPolicy") - } - opts = append((*c.CallOptions).SetIamPolicy[0:len((*c.CallOptions).SetIamPolicy):len((*c.CallOptions).SetIamPolicy)], opts...) - unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} - resp := &iampb.Policy{} - e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - if settings.Path != "" { - baseUrl.Path = settings.Path - } - httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) - if err != nil { - return err - } - httpReq = httpReq.WithContext(ctx) - httpReq.Header = headers - - buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetIamPolicy") - if err != nil { - return err - } - - if err := unm.Unmarshal(buf, resp); err != nil { - return err - } - - return nil - }, opts...) - if e != nil { - return nil, e - } - return resp, nil -} - -// TestIamPermissions returns permissions that a caller has on the specified folder. -// The resource field should be the folder’s resource name, -// for example: “folders/1234”. -// -// There are no permissions required for making this API call. -func (c *foldersRESTClient) TestIamPermissions(ctx context.Context, req *iampb.TestIamPermissionsRequest, opts ...gax.CallOption) (*iampb.TestIamPermissionsResponse, error) { - m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} - jsonReq, err := m.Marshal(req) - if err != nil { - return nil, err - } - - baseUrl, err := url.Parse(c.endpoint) - if err != nil { - return nil, err - } - baseUrl.Path += fmt.Sprintf("/v3/%v:testIamPermissions", req.GetResource()) - - params := url.Values{} - params.Add("$alt", "json;enum-encoding=int") - - baseUrl.RawQuery = params.Encode() - - // Build HTTP headers from client and context metadata. - hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "resource", url.QueryEscape(req.GetResource()))} - - hds = append(c.xGoogHeaders, hds...) - hds = append(hds, "Content-Type", "application/json") - headers := gax.BuildHeaders(ctx, hds...) - if gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "resource_name", fmt.Sprintf("//cloudresourcemanager.googleapis.com/%v", req.GetResource())) - } - if gax.IsFeatureEnabled("METRICS") || gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "rpc_method", "google.cloud.resourcemanager.v3.Folders/TestIamPermissions") - ctx = callctx.WithTelemetryContext(ctx, "url_template", "/v3/{resource=folders/*}:testIamPermissions") - } - opts = append((*c.CallOptions).TestIamPermissions[0:len((*c.CallOptions).TestIamPermissions):len((*c.CallOptions).TestIamPermissions)], opts...) - unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} - resp := &iampb.TestIamPermissionsResponse{} - e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - if settings.Path != "" { - baseUrl.Path = settings.Path - } - httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) - if err != nil { - return err - } - httpReq = httpReq.WithContext(ctx) - httpReq.Header = headers - - buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "TestIamPermissions") - if err != nil { - return err - } - - if err := unm.Unmarshal(buf, resp); err != nil { - return err - } - - return nil - }, opts...) - if e != nil { - return nil, e - } - return resp, nil -} - -// GetOperation is a utility method from google.longrunning.Operations. -func (c *foldersRESTClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { - baseUrl, err := url.Parse(c.endpoint) - if err != nil { - return nil, err - } - baseUrl.Path += fmt.Sprintf("/v3/%v", req.GetName()) - - params := url.Values{} - params.Add("$alt", "json;enum-encoding=int") - - baseUrl.RawQuery = params.Encode() - - // Build HTTP headers from client and context metadata. - hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))} - - hds = append(c.xGoogHeaders, hds...) - hds = append(hds, "Content-Type", "application/json") - headers := gax.BuildHeaders(ctx, hds...) - if gax.IsFeatureEnabled("METRICS") || gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "rpc_method", "google.longrunning.Operations/GetOperation") - ctx = callctx.WithTelemetryContext(ctx, "url_template", "/v3/{name=operations/**}") - } - opts = append((*c.CallOptions).GetOperation[0:len((*c.CallOptions).GetOperation):len((*c.CallOptions).GetOperation)], opts...) - unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} - resp := &longrunningpb.Operation{} - e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - if settings.Path != "" { - baseUrl.Path = settings.Path - } - httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) - if err != nil { - return err - } - httpReq = httpReq.WithContext(ctx) - httpReq.Header = headers - - buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") - if err != nil { - return err - } - - if err := unm.Unmarshal(buf, resp); err != nil { - return err - } - - return nil - }, opts...) - if e != nil { - return nil, e - } - return resp, nil -} - -// CreateFolderOperation returns a new CreateFolderOperation from a given name. -// The name must be that of a previously created CreateFolderOperation, possibly from a different process. -func (c *foldersGRPCClient) CreateFolderOperation(name string) *CreateFolderOperation { - return &CreateFolderOperation{ - lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), - } -} - -// CreateFolderOperation returns a new CreateFolderOperation from a given name. -// The name must be that of a previously created CreateFolderOperation, possibly from a different process. -func (c *foldersRESTClient) CreateFolderOperation(name string) *CreateFolderOperation { - override := fmt.Sprintf("/v3/%s", name) - return &CreateFolderOperation{ - lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), - pollPath: override, - } -} - -// DeleteFolderOperation returns a new DeleteFolderOperation from a given name. -// The name must be that of a previously created DeleteFolderOperation, possibly from a different process. -func (c *foldersGRPCClient) DeleteFolderOperation(name string) *DeleteFolderOperation { - return &DeleteFolderOperation{ - lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), - } -} - -// DeleteFolderOperation returns a new DeleteFolderOperation from a given name. -// The name must be that of a previously created DeleteFolderOperation, possibly from a different process. -func (c *foldersRESTClient) DeleteFolderOperation(name string) *DeleteFolderOperation { - override := fmt.Sprintf("/v3/%s", name) - return &DeleteFolderOperation{ - lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), - pollPath: override, - } -} - -// MoveFolderOperation returns a new MoveFolderOperation from a given name. -// The name must be that of a previously created MoveFolderOperation, possibly from a different process. -func (c *foldersGRPCClient) MoveFolderOperation(name string) *MoveFolderOperation { - return &MoveFolderOperation{ - lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), - } -} - -// MoveFolderOperation returns a new MoveFolderOperation from a given name. -// The name must be that of a previously created MoveFolderOperation, possibly from a different process. -func (c *foldersRESTClient) MoveFolderOperation(name string) *MoveFolderOperation { - override := fmt.Sprintf("/v3/%s", name) - return &MoveFolderOperation{ - lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), - pollPath: override, - } -} - -// UndeleteFolderOperation returns a new UndeleteFolderOperation from a given name. -// The name must be that of a previously created UndeleteFolderOperation, possibly from a different process. -func (c *foldersGRPCClient) UndeleteFolderOperation(name string) *UndeleteFolderOperation { - return &UndeleteFolderOperation{ - lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), - } -} - -// UndeleteFolderOperation returns a new UndeleteFolderOperation from a given name. -// The name must be that of a previously created UndeleteFolderOperation, possibly from a different process. -func (c *foldersRESTClient) UndeleteFolderOperation(name string) *UndeleteFolderOperation { - override := fmt.Sprintf("/v3/%s", name) - return &UndeleteFolderOperation{ - lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), - pollPath: override, - } -} - -// UpdateFolderOperation returns a new UpdateFolderOperation from a given name. -// The name must be that of a previously created UpdateFolderOperation, possibly from a different process. -func (c *foldersGRPCClient) UpdateFolderOperation(name string) *UpdateFolderOperation { - return &UpdateFolderOperation{ - lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), - } -} - -// UpdateFolderOperation returns a new UpdateFolderOperation from a given name. -// The name must be that of a previously created UpdateFolderOperation, possibly from a different process. -func (c *foldersRESTClient) UpdateFolderOperation(name string) *UpdateFolderOperation { - override := fmt.Sprintf("/v3/%s", name) - return &UpdateFolderOperation{ - lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), - pollPath: override, - } -} diff --git a/vendor/cloud.google.com/go/resourcemanager/apiv3/gapic_metadata.json b/vendor/cloud.google.com/go/resourcemanager/apiv3/gapic_metadata.json deleted file mode 100644 index 7f567156d1..0000000000 --- a/vendor/cloud.google.com/go/resourcemanager/apiv3/gapic_metadata.json +++ /dev/null @@ -1,697 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods.", - "language": "go", - "protoPackage": "google.cloud.resourcemanager.v3", - "libraryPackage": "cloud.google.com/go/resourcemanager/apiv3", - "services": { - "Folders": { - "clients": { - "grpc": { - "libraryClient": "FoldersClient", - "rpcs": { - "CreateFolder": { - "methods": [ - "CreateFolder" - ] - }, - "DeleteFolder": { - "methods": [ - "DeleteFolder" - ] - }, - "GetFolder": { - "methods": [ - "GetFolder" - ] - }, - "GetIamPolicy": { - "methods": [ - "GetIamPolicy" - ] - }, - "GetOperation": { - "methods": [ - "GetOperation" - ] - }, - "ListFolders": { - "methods": [ - "ListFolders" - ] - }, - "MoveFolder": { - "methods": [ - "MoveFolder" - ] - }, - "SearchFolders": { - "methods": [ - "SearchFolders" - ] - }, - "SetIamPolicy": { - "methods": [ - "SetIamPolicy" - ] - }, - "TestIamPermissions": { - "methods": [ - "TestIamPermissions" - ] - }, - "UndeleteFolder": { - "methods": [ - "UndeleteFolder" - ] - }, - "UpdateFolder": { - "methods": [ - "UpdateFolder" - ] - } - } - }, - "rest": { - "libraryClient": "FoldersClient", - "rpcs": { - "CreateFolder": { - "methods": [ - "CreateFolder" - ] - }, - "DeleteFolder": { - "methods": [ - "DeleteFolder" - ] - }, - "GetFolder": { - "methods": [ - "GetFolder" - ] - }, - "GetIamPolicy": { - "methods": [ - "GetIamPolicy" - ] - }, - "GetOperation": { - "methods": [ - "GetOperation" - ] - }, - "ListFolders": { - "methods": [ - "ListFolders" - ] - }, - "MoveFolder": { - "methods": [ - "MoveFolder" - ] - }, - "SearchFolders": { - "methods": [ - "SearchFolders" - ] - }, - "SetIamPolicy": { - "methods": [ - "SetIamPolicy" - ] - }, - "TestIamPermissions": { - "methods": [ - "TestIamPermissions" - ] - }, - "UndeleteFolder": { - "methods": [ - "UndeleteFolder" - ] - }, - "UpdateFolder": { - "methods": [ - "UpdateFolder" - ] - } - } - } - } - }, - "Organizations": { - "clients": { - "grpc": { - "libraryClient": "OrganizationsClient", - "rpcs": { - "GetIamPolicy": { - "methods": [ - "GetIamPolicy" - ] - }, - "GetOperation": { - "methods": [ - "GetOperation" - ] - }, - "GetOrganization": { - "methods": [ - "GetOrganization" - ] - }, - "SearchOrganizations": { - "methods": [ - "SearchOrganizations" - ] - }, - "SetIamPolicy": { - "methods": [ - "SetIamPolicy" - ] - }, - "TestIamPermissions": { - "methods": [ - "TestIamPermissions" - ] - } - } - }, - "rest": { - "libraryClient": "OrganizationsClient", - "rpcs": { - "GetIamPolicy": { - "methods": [ - "GetIamPolicy" - ] - }, - "GetOperation": { - "methods": [ - "GetOperation" - ] - }, - "GetOrganization": { - "methods": [ - "GetOrganization" - ] - }, - "SearchOrganizations": { - "methods": [ - "SearchOrganizations" - ] - }, - "SetIamPolicy": { - "methods": [ - "SetIamPolicy" - ] - }, - "TestIamPermissions": { - "methods": [ - "TestIamPermissions" - ] - } - } - } - } - }, - "Projects": { - "clients": { - "grpc": { - "libraryClient": "ProjectsClient", - "rpcs": { - "CreateProject": { - "methods": [ - "CreateProject" - ] - }, - "DeleteProject": { - "methods": [ - "DeleteProject" - ] - }, - "GetIamPolicy": { - "methods": [ - "GetIamPolicy" - ] - }, - "GetOperation": { - "methods": [ - "GetOperation" - ] - }, - "GetProject": { - "methods": [ - "GetProject" - ] - }, - "ListProjects": { - "methods": [ - "ListProjects" - ] - }, - "MoveProject": { - "methods": [ - "MoveProject" - ] - }, - "SearchProjects": { - "methods": [ - "SearchProjects" - ] - }, - "SetIamPolicy": { - "methods": [ - "SetIamPolicy" - ] - }, - "TestIamPermissions": { - "methods": [ - "TestIamPermissions" - ] - }, - "UndeleteProject": { - "methods": [ - "UndeleteProject" - ] - }, - "UpdateProject": { - "methods": [ - "UpdateProject" - ] - } - } - }, - "rest": { - "libraryClient": "ProjectsClient", - "rpcs": { - "CreateProject": { - "methods": [ - "CreateProject" - ] - }, - "DeleteProject": { - "methods": [ - "DeleteProject" - ] - }, - "GetIamPolicy": { - "methods": [ - "GetIamPolicy" - ] - }, - "GetOperation": { - "methods": [ - "GetOperation" - ] - }, - "GetProject": { - "methods": [ - "GetProject" - ] - }, - "ListProjects": { - "methods": [ - "ListProjects" - ] - }, - "MoveProject": { - "methods": [ - "MoveProject" - ] - }, - "SearchProjects": { - "methods": [ - "SearchProjects" - ] - }, - "SetIamPolicy": { - "methods": [ - "SetIamPolicy" - ] - }, - "TestIamPermissions": { - "methods": [ - "TestIamPermissions" - ] - }, - "UndeleteProject": { - "methods": [ - "UndeleteProject" - ] - }, - "UpdateProject": { - "methods": [ - "UpdateProject" - ] - } - } - } - } - }, - "TagBindings": { - "clients": { - "grpc": { - "libraryClient": "TagBindingsClient", - "rpcs": { - "CreateTagBinding": { - "methods": [ - "CreateTagBinding" - ] - }, - "DeleteTagBinding": { - "methods": [ - "DeleteTagBinding" - ] - }, - "GetOperation": { - "methods": [ - "GetOperation" - ] - }, - "ListEffectiveTags": { - "methods": [ - "ListEffectiveTags" - ] - }, - "ListTagBindings": { - "methods": [ - "ListTagBindings" - ] - } - } - }, - "rest": { - "libraryClient": "TagBindingsClient", - "rpcs": { - "CreateTagBinding": { - "methods": [ - "CreateTagBinding" - ] - }, - "DeleteTagBinding": { - "methods": [ - "DeleteTagBinding" - ] - }, - "GetOperation": { - "methods": [ - "GetOperation" - ] - }, - "ListEffectiveTags": { - "methods": [ - "ListEffectiveTags" - ] - }, - "ListTagBindings": { - "methods": [ - "ListTagBindings" - ] - } - } - } - } - }, - "TagHolds": { - "clients": { - "grpc": { - "libraryClient": "TagHoldsClient", - "rpcs": { - "CreateTagHold": { - "methods": [ - "CreateTagHold" - ] - }, - "DeleteTagHold": { - "methods": [ - "DeleteTagHold" - ] - }, - "GetOperation": { - "methods": [ - "GetOperation" - ] - }, - "ListTagHolds": { - "methods": [ - "ListTagHolds" - ] - } - } - }, - "rest": { - "libraryClient": "TagHoldsClient", - "rpcs": { - "CreateTagHold": { - "methods": [ - "CreateTagHold" - ] - }, - "DeleteTagHold": { - "methods": [ - "DeleteTagHold" - ] - }, - "GetOperation": { - "methods": [ - "GetOperation" - ] - }, - "ListTagHolds": { - "methods": [ - "ListTagHolds" - ] - } - } - } - } - }, - "TagKeys": { - "clients": { - "grpc": { - "libraryClient": "TagKeysClient", - "rpcs": { - "CreateTagKey": { - "methods": [ - "CreateTagKey" - ] - }, - "DeleteTagKey": { - "methods": [ - "DeleteTagKey" - ] - }, - "GetIamPolicy": { - "methods": [ - "GetIamPolicy" - ] - }, - "GetNamespacedTagKey": { - "methods": [ - "GetNamespacedTagKey" - ] - }, - "GetOperation": { - "methods": [ - "GetOperation" - ] - }, - "GetTagKey": { - "methods": [ - "GetTagKey" - ] - }, - "ListTagKeys": { - "methods": [ - "ListTagKeys" - ] - }, - "SetIamPolicy": { - "methods": [ - "SetIamPolicy" - ] - }, - "TestIamPermissions": { - "methods": [ - "TestIamPermissions" - ] - }, - "UpdateTagKey": { - "methods": [ - "UpdateTagKey" - ] - } - } - }, - "rest": { - "libraryClient": "TagKeysClient", - "rpcs": { - "CreateTagKey": { - "methods": [ - "CreateTagKey" - ] - }, - "DeleteTagKey": { - "methods": [ - "DeleteTagKey" - ] - }, - "GetIamPolicy": { - "methods": [ - "GetIamPolicy" - ] - }, - "GetNamespacedTagKey": { - "methods": [ - "GetNamespacedTagKey" - ] - }, - "GetOperation": { - "methods": [ - "GetOperation" - ] - }, - "GetTagKey": { - "methods": [ - "GetTagKey" - ] - }, - "ListTagKeys": { - "methods": [ - "ListTagKeys" - ] - }, - "SetIamPolicy": { - "methods": [ - "SetIamPolicy" - ] - }, - "TestIamPermissions": { - "methods": [ - "TestIamPermissions" - ] - }, - "UpdateTagKey": { - "methods": [ - "UpdateTagKey" - ] - } - } - } - } - }, - "TagValues": { - "clients": { - "grpc": { - "libraryClient": "TagValuesClient", - "rpcs": { - "CreateTagValue": { - "methods": [ - "CreateTagValue" - ] - }, - "DeleteTagValue": { - "methods": [ - "DeleteTagValue" - ] - }, - "GetIamPolicy": { - "methods": [ - "GetIamPolicy" - ] - }, - "GetNamespacedTagValue": { - "methods": [ - "GetNamespacedTagValue" - ] - }, - "GetOperation": { - "methods": [ - "GetOperation" - ] - }, - "GetTagValue": { - "methods": [ - "GetTagValue" - ] - }, - "ListTagValues": { - "methods": [ - "ListTagValues" - ] - }, - "SetIamPolicy": { - "methods": [ - "SetIamPolicy" - ] - }, - "TestIamPermissions": { - "methods": [ - "TestIamPermissions" - ] - }, - "UpdateTagValue": { - "methods": [ - "UpdateTagValue" - ] - } - } - }, - "rest": { - "libraryClient": "TagValuesClient", - "rpcs": { - "CreateTagValue": { - "methods": [ - "CreateTagValue" - ] - }, - "DeleteTagValue": { - "methods": [ - "DeleteTagValue" - ] - }, - "GetIamPolicy": { - "methods": [ - "GetIamPolicy" - ] - }, - "GetNamespacedTagValue": { - "methods": [ - "GetNamespacedTagValue" - ] - }, - "GetOperation": { - "methods": [ - "GetOperation" - ] - }, - "GetTagValue": { - "methods": [ - "GetTagValue" - ] - }, - "ListTagValues": { - "methods": [ - "ListTagValues" - ] - }, - "SetIamPolicy": { - "methods": [ - "SetIamPolicy" - ] - }, - "TestIamPermissions": { - "methods": [ - "TestIamPermissions" - ] - }, - "UpdateTagValue": { - "methods": [ - "UpdateTagValue" - ] - } - } - } - } - } - } -} diff --git a/vendor/cloud.google.com/go/resourcemanager/apiv3/helpers.go b/vendor/cloud.google.com/go/resourcemanager/apiv3/helpers.go deleted file mode 100644 index 47b0dffc24..0000000000 --- a/vendor/cloud.google.com/go/resourcemanager/apiv3/helpers.go +++ /dev/null @@ -1,106 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Code generated by protoc-gen-go_gapic. DO NOT EDIT. - -package resourcemanager - -import ( - "context" - "fmt" - "io" - "log/slog" - "net/http" - - "github.com/googleapis/gax-go/v2/internallog" - "github.com/googleapis/gax-go/v2/internallog/grpclog" - "google.golang.org/api/googleapi" - "google.golang.org/api/option" - "google.golang.org/grpc" - "google.golang.org/protobuf/proto" - "google.golang.org/protobuf/runtime/protoimpl" -) - -const serviceName = "cloudresourcemanager.googleapis.com" - -var protoVersion = fmt.Sprintf("1.%d", protoimpl.MaxVersion) - -// For more information on implementing a client constructor hook, see -// https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. -type clientHookParams struct{} -type clientHook func(context.Context, clientHookParams) ([]option.ClientOption, error) - -var versionClient string - -func getVersionClient() string { - if versionClient == "" { - return "UNKNOWN" - } - return versionClient -} - -// DefaultAuthScopes reports the default set of authentication scopes to use with this package. -func DefaultAuthScopes() []string { - return []string{ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only", - } -} - -func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { - logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) - resp, err := client.Do(req) - if err != nil { - return nil, nil, err - } - defer resp.Body.Close() - buf, err := io.ReadAll(resp.Body) - if err != nil { - return nil, nil, err - } - logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, buf)) - if err = googleapi.CheckResponseWithBody(resp, buf); err != nil { - return nil, nil, err - } - return buf, resp, nil -} - -func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { - buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) - return buf, err -} - -func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { - logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) - resp, err := client.Do(req) - if err != nil { - return nil, err - } - logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) - if err = googleapi.CheckResponse(resp); err != nil { - return nil, err - } - return resp, nil -} - -func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { - var zero O - logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) - resp, err := fn(ctx, req, opts...) - if err != nil { - return zero, err - } - logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) - return resp, err -} diff --git a/vendor/cloud.google.com/go/resourcemanager/apiv3/organizations_client.go b/vendor/cloud.google.com/go/resourcemanager/apiv3/organizations_client.go deleted file mode 100644 index 09856c1111..0000000000 --- a/vendor/cloud.google.com/go/resourcemanager/apiv3/organizations_client.go +++ /dev/null @@ -1,1020 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Code generated by protoc-gen-go_gapic. DO NOT EDIT. - -package resourcemanager - -import ( - "bytes" - "context" - "fmt" - "log/slog" - "math" - "net/http" - "net/url" - "time" - - iampb "cloud.google.com/go/iam/apiv1/iampb" - longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" - resourcemanagerpb "cloud.google.com/go/resourcemanager/apiv3/resourcemanagerpb" - gax "github.com/googleapis/gax-go/v2" - "github.com/googleapis/gax-go/v2/callctx" - "google.golang.org/api/iterator" - "google.golang.org/api/option" - "google.golang.org/api/option/internaloption" - gtransport "google.golang.org/api/transport/grpc" - httptransport "google.golang.org/api/transport/http" - "google.golang.org/grpc" - "google.golang.org/grpc/codes" - "google.golang.org/protobuf/encoding/protojson" - "google.golang.org/protobuf/proto" -) - -var newOrganizationsClientHook clientHook - -// OrganizationsCallOptions contains the retry settings for each method of OrganizationsClient. -type OrganizationsCallOptions struct { - GetOrganization []gax.CallOption - SearchOrganizations []gax.CallOption - GetIamPolicy []gax.CallOption - SetIamPolicy []gax.CallOption - TestIamPermissions []gax.CallOption - GetOperation []gax.CallOption -} - -func defaultOrganizationsGRPCClientOptions() []option.ClientOption { - return []option.ClientOption{ - internaloption.WithDefaultEndpoint("cloudresourcemanager.googleapis.com:443"), - internaloption.WithDefaultEndpointTemplate("cloudresourcemanager.UNIVERSE_DOMAIN:443"), - internaloption.WithDefaultMTLSEndpoint("cloudresourcemanager.mtls.googleapis.com:443"), - internaloption.WithDefaultUniverseDomain("googleapis.com"), - internaloption.WithDefaultAudience("https://cloudresourcemanager.googleapis.com/"), - internaloption.WithDefaultScopes(DefaultAuthScopes()...), - internaloption.EnableJwtWithScope(), - internaloption.AllowHardBoundTokens("MTLS_S2A"), - internaloption.EnableNewAuthLibrary(), - option.WithGRPCDialOption(grpc.WithDefaultCallOptions( - grpc.MaxCallRecvMsgSize(math.MaxInt32))), - } -} - -func defaultOrganizationsCallOptions() *OrganizationsCallOptions { - return &OrganizationsCallOptions{ - GetOrganization: []gax.CallOption{ - gax.WithTimeout(60000 * time.Millisecond), - gax.WithRetry(func() gax.Retryer { - return gax.OnCodes([]codes.Code{ - codes.Unavailable, - }, gax.Backoff{ - Initial: 100 * time.Millisecond, - Max: 60000 * time.Millisecond, - Multiplier: 1.30, - }) - }), - }, - SearchOrganizations: []gax.CallOption{ - gax.WithTimeout(60000 * time.Millisecond), - }, - GetIamPolicy: []gax.CallOption{ - gax.WithTimeout(60000 * time.Millisecond), - gax.WithRetry(func() gax.Retryer { - return gax.OnCodes([]codes.Code{ - codes.Unavailable, - }, gax.Backoff{ - Initial: 100 * time.Millisecond, - Max: 60000 * time.Millisecond, - Multiplier: 1.30, - }) - }), - }, - SetIamPolicy: []gax.CallOption{ - gax.WithTimeout(60000 * time.Millisecond), - }, - TestIamPermissions: []gax.CallOption{}, - GetOperation: []gax.CallOption{}, - } -} - -func defaultOrganizationsRESTCallOptions() *OrganizationsCallOptions { - return &OrganizationsCallOptions{ - GetOrganization: []gax.CallOption{ - gax.WithTimeout(60000 * time.Millisecond), - gax.WithRetry(func() gax.Retryer { - return gax.OnHTTPCodes(gax.Backoff{ - Initial: 100 * time.Millisecond, - Max: 60000 * time.Millisecond, - Multiplier: 1.30, - }, - http.StatusServiceUnavailable) - }), - }, - SearchOrganizations: []gax.CallOption{ - gax.WithTimeout(60000 * time.Millisecond), - }, - GetIamPolicy: []gax.CallOption{ - gax.WithTimeout(60000 * time.Millisecond), - gax.WithRetry(func() gax.Retryer { - return gax.OnHTTPCodes(gax.Backoff{ - Initial: 100 * time.Millisecond, - Max: 60000 * time.Millisecond, - Multiplier: 1.30, - }, - http.StatusServiceUnavailable) - }), - }, - SetIamPolicy: []gax.CallOption{ - gax.WithTimeout(60000 * time.Millisecond), - }, - TestIamPermissions: []gax.CallOption{}, - GetOperation: []gax.CallOption{}, - } -} - -// internalOrganizationsClient is an interface that defines the methods available from Cloud Resource Manager API. -type internalOrganizationsClient interface { - Close() error - setGoogleClientInfo(...string) - Connection() *grpc.ClientConn - GetOrganization(context.Context, *resourcemanagerpb.GetOrganizationRequest, ...gax.CallOption) (*resourcemanagerpb.Organization, error) - SearchOrganizations(context.Context, *resourcemanagerpb.SearchOrganizationsRequest, ...gax.CallOption) *OrganizationIterator - GetIamPolicy(context.Context, *iampb.GetIamPolicyRequest, ...gax.CallOption) (*iampb.Policy, error) - SetIamPolicy(context.Context, *iampb.SetIamPolicyRequest, ...gax.CallOption) (*iampb.Policy, error) - TestIamPermissions(context.Context, *iampb.TestIamPermissionsRequest, ...gax.CallOption) (*iampb.TestIamPermissionsResponse, error) - GetOperation(context.Context, *longrunningpb.GetOperationRequest, ...gax.CallOption) (*longrunningpb.Operation, error) -} - -// OrganizationsClient is a client for interacting with Cloud Resource Manager API. -// Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. -// -// Allows users to manage their organization resources. -type OrganizationsClient struct { - // The internal transport-dependent client. - internalClient internalOrganizationsClient - - // The call options for this service. - CallOptions *OrganizationsCallOptions -} - -// Wrapper methods routed to the internal client. - -// Close closes the connection to the API service. The user should invoke this when -// the client is no longer required. -func (c *OrganizationsClient) Close() error { - return c.internalClient.Close() -} - -// setGoogleClientInfo sets the name and version of the application in -// the `x-goog-api-client` header passed on each request. Intended for -// use by Google-written clients. -func (c *OrganizationsClient) setGoogleClientInfo(keyval ...string) { - c.internalClient.setGoogleClientInfo(keyval...) -} - -// Connection returns a connection to the API service. -// -// Deprecated: Connections are now pooled so this method does not always -// return the same resource. -func (c *OrganizationsClient) Connection() *grpc.ClientConn { - return c.internalClient.Connection() -} - -// GetOrganization fetches an organization resource identified by the specified resource name. -func (c *OrganizationsClient) GetOrganization(ctx context.Context, req *resourcemanagerpb.GetOrganizationRequest, opts ...gax.CallOption) (*resourcemanagerpb.Organization, error) { - return c.internalClient.GetOrganization(ctx, req, opts...) -} - -// SearchOrganizations searches organization resources that are visible to the user and satisfy -// the specified filter. This method returns organizations in an unspecified -// order. New organizations do not necessarily appear at the end of the -// results, and may take a small amount of time to appear. -// -// Search will only return organizations on which the user has the permission -// resourcemanager.organizations.get -func (c *OrganizationsClient) SearchOrganizations(ctx context.Context, req *resourcemanagerpb.SearchOrganizationsRequest, opts ...gax.CallOption) *OrganizationIterator { - return c.internalClient.SearchOrganizations(ctx, req, opts...) -} - -// GetIamPolicy gets the access control policy for an organization resource. The policy may -// be empty if no such policy or resource exists. The resource field should -// be the organization’s resource name, for example: “organizations/123”. -// -// Authorization requires the IAM permission -// resourcemanager.organizations.getIamPolicy on the specified organization. -func (c *OrganizationsClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error) { - return c.internalClient.GetIamPolicy(ctx, req, opts...) -} - -// SetIamPolicy sets the access control policy on an organization resource. Replaces any -// existing policy. The resource field should be the organization’s resource -// name, for example: “organizations/123”. -// -// Authorization requires the IAM permission -// resourcemanager.organizations.setIamPolicy on the specified organization. -func (c *OrganizationsClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error) { - return c.internalClient.SetIamPolicy(ctx, req, opts...) -} - -// TestIamPermissions returns the permissions that a caller has on the specified organization. -// The resource field should be the organization’s resource name, -// for example: “organizations/123”. -// -// There are no permissions required for making this API call. -func (c *OrganizationsClient) TestIamPermissions(ctx context.Context, req *iampb.TestIamPermissionsRequest, opts ...gax.CallOption) (*iampb.TestIamPermissionsResponse, error) { - return c.internalClient.TestIamPermissions(ctx, req, opts...) -} - -// GetOperation is a utility method from google.longrunning.Operations. -func (c *OrganizationsClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { - return c.internalClient.GetOperation(ctx, req, opts...) -} - -// organizationsGRPCClient is a client for interacting with Cloud Resource Manager API over gRPC transport. -// -// Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. -type organizationsGRPCClient struct { - // Connection pool of gRPC connections to the service. - connPool gtransport.ConnPool - - // Points back to the CallOptions field of the containing OrganizationsClient - CallOptions **OrganizationsCallOptions - - // The gRPC API client. - organizationsClient resourcemanagerpb.OrganizationsClient - - operationsClient longrunningpb.OperationsClient - - // The x-goog-* metadata to be sent with each request. - xGoogHeaders []string - - logger *slog.Logger -} - -// NewOrganizationsClient creates a new organizations client based on gRPC. -// The returned client must be Closed when it is done being used to clean up its underlying connections. -// -// Allows users to manage their organization resources. -func NewOrganizationsClient(ctx context.Context, opts ...option.ClientOption) (*OrganizationsClient, error) { - clientOpts := defaultOrganizationsGRPCClientOptions() - if gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - clientOpts = append(clientOpts, internaloption.WithTelemetryAttributes(map[string]string{ - "gcp.client.service": "cloudresourcemanager", - "gcp.client.version": getVersionClient(), - "gcp.client.repo": "googleapis/google-cloud-go", - "gcp.client.artifact": "cloud.google.com/go/resourcemanager/apiv3", - "gcp.client.language": "go", - "url.domain": "cloudresourcemanager.googleapis.com", - })) - } - if newOrganizationsClientHook != nil { - hookOpts, err := newOrganizationsClientHook(ctx, clientHookParams{}) - if err != nil { - return nil, err - } - clientOpts = append(clientOpts, hookOpts...) - } - - connPool, err := gtransport.DialPool(ctx, append(clientOpts, opts...)...) - if err != nil { - return nil, err - } - client := OrganizationsClient{CallOptions: defaultOrganizationsCallOptions()} - - c := &organizationsGRPCClient{ - connPool: connPool, - organizationsClient: resourcemanagerpb.NewOrganizationsClient(connPool), - CallOptions: &client.CallOptions, - logger: internaloption.GetLogger(opts), - operationsClient: longrunningpb.NewOperationsClient(connPool), - } - c.setGoogleClientInfo() - if gax.IsFeatureEnabled("METRICS") { - metrics := gax.NewClientMetrics( - gax.WithTelemetryLogger(c.logger), - gax.WithTelemetryAttributes(map[string]string{ - gax.ClientService: "cloudresourcemanager", - gax.ClientVersion: getVersionClient(), - gax.ClientArtifact: "cloud.google.com/go/resourcemanager/apiv3", - gax.RPCSystem: "grpc", - gax.URLDomain: "cloudresourcemanager.googleapis.com", - }), - ) - - client.CallOptions.GetOrganization = append(client.CallOptions.GetOrganization, gax.WithClientMetrics(metrics)) - client.CallOptions.SearchOrganizations = append(client.CallOptions.SearchOrganizations, gax.WithClientMetrics(metrics)) - client.CallOptions.GetIamPolicy = append(client.CallOptions.GetIamPolicy, gax.WithClientMetrics(metrics)) - client.CallOptions.SetIamPolicy = append(client.CallOptions.SetIamPolicy, gax.WithClientMetrics(metrics)) - client.CallOptions.TestIamPermissions = append(client.CallOptions.TestIamPermissions, gax.WithClientMetrics(metrics)) - client.CallOptions.GetOperation = append(client.CallOptions.GetOperation, gax.WithClientMetrics(metrics)) - } - - client.internalClient = c - - return &client, nil -} - -// Connection returns a connection to the API service. -// -// Deprecated: Connections are now pooled so this method does not always -// return the same resource. -func (c *organizationsGRPCClient) Connection() *grpc.ClientConn { - return c.connPool.Conn() -} - -// setGoogleClientInfo sets the name and version of the application in -// the `x-goog-api-client` header passed on each request. Intended for -// use by Google-written clients. -func (c *organizationsGRPCClient) setGoogleClientInfo(keyval ...string) { - kv := append([]string{"gl-go", gax.GoVersion}, keyval...) - kv = append(kv, "gapic", getVersionClient(), "gax", gax.Version, "grpc", grpc.Version, "pb", protoVersion) - c.xGoogHeaders = []string{ - "x-goog-api-client", gax.XGoogHeader(kv...), - } -} - -// Close closes the connection to the API service. The user should invoke this when -// the client is no longer required. -func (c *organizationsGRPCClient) Close() error { - return c.connPool.Close() -} - -// Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. -type organizationsRESTClient struct { - // The http endpoint to connect to. - endpoint string - - // The http client. - httpClient *http.Client - - // The x-goog-* headers to be sent with each request. - xGoogHeaders []string - - // Points back to the CallOptions field of the containing OrganizationsClient - CallOptions **OrganizationsCallOptions - - logger *slog.Logger -} - -// NewOrganizationsRESTClient creates a new organizations rest client. -// -// Allows users to manage their organization resources. -func NewOrganizationsRESTClient(ctx context.Context, opts ...option.ClientOption) (*OrganizationsClient, error) { - clientOpts := append(defaultOrganizationsRESTClientOptions(), opts...) - if gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - clientOpts = append(clientOpts, internaloption.WithTelemetryAttributes(map[string]string{ - "gcp.client.service": "cloudresourcemanager", - "gcp.client.version": getVersionClient(), - "gcp.client.repo": "googleapis/google-cloud-go", - "gcp.client.artifact": "cloud.google.com/go/resourcemanager/apiv3", - "gcp.client.language": "go", - "url.domain": "cloudresourcemanager.googleapis.com", - })) - } - httpClient, endpoint, err := httptransport.NewClient(ctx, clientOpts...) - if err != nil { - return nil, err - } - - callOpts := defaultOrganizationsRESTCallOptions() - c := &organizationsRESTClient{ - endpoint: endpoint, - httpClient: httpClient, - CallOptions: &callOpts, - logger: internaloption.GetLogger(opts), - } - c.setGoogleClientInfo() - - if gax.IsFeatureEnabled("METRICS") { - metrics := gax.NewClientMetrics( - gax.WithTelemetryLogger(c.logger), - gax.WithTelemetryAttributes(map[string]string{ - gax.ClientService: "cloudresourcemanager", - gax.ClientVersion: getVersionClient(), - gax.ClientArtifact: "cloud.google.com/go/resourcemanager/apiv3", - gax.RPCSystem: "http", - gax.URLDomain: "cloudresourcemanager.googleapis.com", - }), - ) - - callOpts.GetOrganization = append(callOpts.GetOrganization, gax.WithClientMetrics(metrics)) - callOpts.SearchOrganizations = append(callOpts.SearchOrganizations, gax.WithClientMetrics(metrics)) - callOpts.GetIamPolicy = append(callOpts.GetIamPolicy, gax.WithClientMetrics(metrics)) - callOpts.SetIamPolicy = append(callOpts.SetIamPolicy, gax.WithClientMetrics(metrics)) - callOpts.TestIamPermissions = append(callOpts.TestIamPermissions, gax.WithClientMetrics(metrics)) - callOpts.GetOperation = append(callOpts.GetOperation, gax.WithClientMetrics(metrics)) - } - - return &OrganizationsClient{internalClient: c, CallOptions: callOpts}, nil -} - -func defaultOrganizationsRESTClientOptions() []option.ClientOption { - return []option.ClientOption{ - internaloption.WithDefaultEndpoint("https://cloudresourcemanager.googleapis.com"), - internaloption.WithDefaultEndpointTemplate("https://cloudresourcemanager.UNIVERSE_DOMAIN"), - internaloption.WithDefaultMTLSEndpoint("https://cloudresourcemanager.mtls.googleapis.com"), - internaloption.WithDefaultUniverseDomain("googleapis.com"), - internaloption.WithDefaultAudience("https://cloudresourcemanager.googleapis.com/"), - internaloption.WithDefaultScopes(DefaultAuthScopes()...), - internaloption.EnableNewAuthLibrary(), - } -} - -// setGoogleClientInfo sets the name and version of the application in -// the `x-goog-api-client` header passed on each request. Intended for -// use by Google-written clients. -func (c *organizationsRESTClient) setGoogleClientInfo(keyval ...string) { - kv := append([]string{"gl-go", gax.GoVersion}, keyval...) - kv = append(kv, "gapic", getVersionClient(), "gax", gax.Version, "rest", "UNKNOWN", "pb", protoVersion) - c.xGoogHeaders = []string{ - "x-goog-api-client", gax.XGoogHeader(kv...), - } -} - -// Close closes the connection to the API service. The user should invoke this when -// the client is no longer required. -func (c *organizationsRESTClient) Close() error { - // Replace httpClient with nil to force cleanup. - c.httpClient = nil - return nil -} - -// Connection returns a connection to the API service. -// -// Deprecated: This method always returns nil. -func (c *organizationsRESTClient) Connection() *grpc.ClientConn { - return nil -} -func (c *organizationsGRPCClient) GetOrganization(ctx context.Context, req *resourcemanagerpb.GetOrganizationRequest, opts ...gax.CallOption) (*resourcemanagerpb.Organization, error) { - hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))} - - hds = append(c.xGoogHeaders, hds...) - ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) - if gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "resource_name", fmt.Sprintf("//cloudresourcemanager.googleapis.com/%v", req.GetName())) - } - if gax.IsFeatureEnabled("METRICS") || gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "rpc_method", "google.cloud.resourcemanager.v3.Organizations/GetOrganization") - } - opts = append((*c.CallOptions).GetOrganization[0:len((*c.CallOptions).GetOrganization):len((*c.CallOptions).GetOrganization)], opts...) - var resp *resourcemanagerpb.Organization - err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - var err error - resp, err = executeRPC(ctx, c.organizationsClient.GetOrganization, req, settings.GRPC, c.logger, "GetOrganization") - return err - }, opts...) - if err != nil { - return nil, err - } - return resp, nil -} - -func (c *organizationsGRPCClient) SearchOrganizations(ctx context.Context, req *resourcemanagerpb.SearchOrganizationsRequest, opts ...gax.CallOption) *OrganizationIterator { - ctx = gax.InsertMetadataIntoOutgoingContext(ctx, c.xGoogHeaders...) - if gax.IsFeatureEnabled("METRICS") || gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "rpc_method", "google.cloud.resourcemanager.v3.Organizations/SearchOrganizations") - } - opts = append((*c.CallOptions).SearchOrganizations[0:len((*c.CallOptions).SearchOrganizations):len((*c.CallOptions).SearchOrganizations)], opts...) - it := &OrganizationIterator{} - req = proto.Clone(req).(*resourcemanagerpb.SearchOrganizationsRequest) - it.InternalFetch = func(pageSize int, pageToken string) ([]*resourcemanagerpb.Organization, string, error) { - resp := &resourcemanagerpb.SearchOrganizationsResponse{} - if pageToken != "" { - req.PageToken = pageToken - } - if pageSize > math.MaxInt32 { - req.PageSize = math.MaxInt32 - } else if pageSize != 0 { - req.PageSize = int32(pageSize) - } - err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - var err error - resp, err = executeRPC(ctx, c.organizationsClient.SearchOrganizations, req, settings.GRPC, c.logger, "SearchOrganizations") - return err - }, opts...) - if err != nil { - return nil, "", err - } - - it.Response = resp - return resp.GetOrganizations(), resp.GetNextPageToken(), nil - } - fetch := func(pageSize int, pageToken string) (string, error) { - items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) - if err != nil { - return "", err - } - it.items = append(it.items, items...) - return nextPageToken, nil - } - - it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) - it.pageInfo.MaxSize = int(req.GetPageSize()) - it.pageInfo.Token = req.GetPageToken() - - return it -} - -func (c *organizationsGRPCClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error) { - hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "resource", url.QueryEscape(req.GetResource()))} - - hds = append(c.xGoogHeaders, hds...) - ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) - if gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "resource_name", fmt.Sprintf("//cloudresourcemanager.googleapis.com/%v", req.GetResource())) - } - if gax.IsFeatureEnabled("METRICS") || gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "rpc_method", "google.cloud.resourcemanager.v3.Organizations/GetIamPolicy") - } - opts = append((*c.CallOptions).GetIamPolicy[0:len((*c.CallOptions).GetIamPolicy):len((*c.CallOptions).GetIamPolicy)], opts...) - var resp *iampb.Policy - err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - var err error - resp, err = executeRPC(ctx, c.organizationsClient.GetIamPolicy, req, settings.GRPC, c.logger, "GetIamPolicy") - return err - }, opts...) - if err != nil { - return nil, err - } - return resp, nil -} - -func (c *organizationsGRPCClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error) { - hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "resource", url.QueryEscape(req.GetResource()))} - - hds = append(c.xGoogHeaders, hds...) - ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) - if gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "resource_name", fmt.Sprintf("//cloudresourcemanager.googleapis.com/%v", req.GetResource())) - } - if gax.IsFeatureEnabled("METRICS") || gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "rpc_method", "google.cloud.resourcemanager.v3.Organizations/SetIamPolicy") - } - opts = append((*c.CallOptions).SetIamPolicy[0:len((*c.CallOptions).SetIamPolicy):len((*c.CallOptions).SetIamPolicy)], opts...) - var resp *iampb.Policy - err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - var err error - resp, err = executeRPC(ctx, c.organizationsClient.SetIamPolicy, req, settings.GRPC, c.logger, "SetIamPolicy") - return err - }, opts...) - if err != nil { - return nil, err - } - return resp, nil -} - -func (c *organizationsGRPCClient) TestIamPermissions(ctx context.Context, req *iampb.TestIamPermissionsRequest, opts ...gax.CallOption) (*iampb.TestIamPermissionsResponse, error) { - hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "resource", url.QueryEscape(req.GetResource()))} - - hds = append(c.xGoogHeaders, hds...) - ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) - if gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "resource_name", fmt.Sprintf("//cloudresourcemanager.googleapis.com/%v", req.GetResource())) - } - if gax.IsFeatureEnabled("METRICS") || gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "rpc_method", "google.cloud.resourcemanager.v3.Organizations/TestIamPermissions") - } - opts = append((*c.CallOptions).TestIamPermissions[0:len((*c.CallOptions).TestIamPermissions):len((*c.CallOptions).TestIamPermissions)], opts...) - var resp *iampb.TestIamPermissionsResponse - err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - var err error - resp, err = executeRPC(ctx, c.organizationsClient.TestIamPermissions, req, settings.GRPC, c.logger, "TestIamPermissions") - return err - }, opts...) - if err != nil { - return nil, err - } - return resp, nil -} - -func (c *organizationsGRPCClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { - hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))} - - hds = append(c.xGoogHeaders, hds...) - ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) - if gax.IsFeatureEnabled("METRICS") || gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "rpc_method", "google.longrunning.Operations/GetOperation") - } - opts = append((*c.CallOptions).GetOperation[0:len((*c.CallOptions).GetOperation):len((*c.CallOptions).GetOperation)], opts...) - var resp *longrunningpb.Operation - err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - var err error - resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") - return err - }, opts...) - if err != nil { - return nil, err - } - return resp, nil -} - -// GetOrganization fetches an organization resource identified by the specified resource name. -func (c *organizationsRESTClient) GetOrganization(ctx context.Context, req *resourcemanagerpb.GetOrganizationRequest, opts ...gax.CallOption) (*resourcemanagerpb.Organization, error) { - baseUrl, err := url.Parse(c.endpoint) - if err != nil { - return nil, err - } - baseUrl.Path += fmt.Sprintf("/v3/%v", req.GetName()) - - params := url.Values{} - params.Add("$alt", "json;enum-encoding=int") - - baseUrl.RawQuery = params.Encode() - - // Build HTTP headers from client and context metadata. - hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))} - - hds = append(c.xGoogHeaders, hds...) - hds = append(hds, "Content-Type", "application/json") - headers := gax.BuildHeaders(ctx, hds...) - if gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "resource_name", fmt.Sprintf("//cloudresourcemanager.googleapis.com/%v", req.GetName())) - } - if gax.IsFeatureEnabled("METRICS") || gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "rpc_method", "google.cloud.resourcemanager.v3.Organizations/GetOrganization") - ctx = callctx.WithTelemetryContext(ctx, "url_template", "/v3/{name=organizations/*}") - } - opts = append((*c.CallOptions).GetOrganization[0:len((*c.CallOptions).GetOrganization):len((*c.CallOptions).GetOrganization)], opts...) - unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} - resp := &resourcemanagerpb.Organization{} - e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - if settings.Path != "" { - baseUrl.Path = settings.Path - } - httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) - if err != nil { - return err - } - httpReq = httpReq.WithContext(ctx) - httpReq.Header = headers - - buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOrganization") - if err != nil { - return err - } - - if err := unm.Unmarshal(buf, resp); err != nil { - return err - } - - return nil - }, opts...) - if e != nil { - return nil, e - } - return resp, nil -} - -// SearchOrganizations searches organization resources that are visible to the user and satisfy -// the specified filter. This method returns organizations in an unspecified -// order. New organizations do not necessarily appear at the end of the -// results, and may take a small amount of time to appear. -// -// Search will only return organizations on which the user has the permission -// resourcemanager.organizations.get -func (c *organizationsRESTClient) SearchOrganizations(ctx context.Context, req *resourcemanagerpb.SearchOrganizationsRequest, opts ...gax.CallOption) *OrganizationIterator { - it := &OrganizationIterator{} - req = proto.Clone(req).(*resourcemanagerpb.SearchOrganizationsRequest) - unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} - it.InternalFetch = func(pageSize int, pageToken string) ([]*resourcemanagerpb.Organization, string, error) { - resp := &resourcemanagerpb.SearchOrganizationsResponse{} - if pageToken != "" { - req.PageToken = pageToken - } - if pageSize > math.MaxInt32 { - req.PageSize = math.MaxInt32 - } else if pageSize != 0 { - req.PageSize = int32(pageSize) - } - baseUrl, err := url.Parse(c.endpoint) - if err != nil { - return nil, "", err - } - baseUrl.Path += fmt.Sprintf("/v3/organizations:search") - - params := url.Values{} - params.Add("$alt", "json;enum-encoding=int") - if req.GetPageSize() != 0 { - params.Add("pageSize", fmt.Sprintf("%v", req.GetPageSize())) - } - if req.GetPageToken() != "" { - params.Add("pageToken", fmt.Sprintf("%v", req.GetPageToken())) - } - if req.GetQuery() != "" { - params.Add("query", fmt.Sprintf("%v", req.GetQuery())) - } - - baseUrl.RawQuery = params.Encode() - - // Build HTTP headers from client and context metadata. - hds := append(c.xGoogHeaders, "Content-Type", "application/json") - headers := gax.BuildHeaders(ctx, hds...) - e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - if settings.Path != "" { - baseUrl.Path = settings.Path - } - httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) - if err != nil { - return err - } - httpReq.Header = headers - - buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "SearchOrganizations") - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { - return err - } - - return nil - }, opts...) - if e != nil { - return nil, "", e - } - it.Response = resp - return resp.GetOrganizations(), resp.GetNextPageToken(), nil - } - - fetch := func(pageSize int, pageToken string) (string, error) { - items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) - if err != nil { - return "", err - } - it.items = append(it.items, items...) - return nextPageToken, nil - } - - it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) - it.pageInfo.MaxSize = int(req.GetPageSize()) - it.pageInfo.Token = req.GetPageToken() - - return it -} - -// GetIamPolicy gets the access control policy for an organization resource. The policy may -// be empty if no such policy or resource exists. The resource field should -// be the organization’s resource name, for example: “organizations/123”. -// -// Authorization requires the IAM permission -// resourcemanager.organizations.getIamPolicy on the specified organization. -func (c *organizationsRESTClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error) { - m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} - jsonReq, err := m.Marshal(req) - if err != nil { - return nil, err - } - - baseUrl, err := url.Parse(c.endpoint) - if err != nil { - return nil, err - } - baseUrl.Path += fmt.Sprintf("/v3/%v:getIamPolicy", req.GetResource()) - - params := url.Values{} - params.Add("$alt", "json;enum-encoding=int") - - baseUrl.RawQuery = params.Encode() - - // Build HTTP headers from client and context metadata. - hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "resource", url.QueryEscape(req.GetResource()))} - - hds = append(c.xGoogHeaders, hds...) - hds = append(hds, "Content-Type", "application/json") - headers := gax.BuildHeaders(ctx, hds...) - if gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "resource_name", fmt.Sprintf("//cloudresourcemanager.googleapis.com/%v", req.GetResource())) - } - if gax.IsFeatureEnabled("METRICS") || gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "rpc_method", "google.cloud.resourcemanager.v3.Organizations/GetIamPolicy") - ctx = callctx.WithTelemetryContext(ctx, "url_template", "/v3/{resource=organizations/*}:getIamPolicy") - } - opts = append((*c.CallOptions).GetIamPolicy[0:len((*c.CallOptions).GetIamPolicy):len((*c.CallOptions).GetIamPolicy)], opts...) - unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} - resp := &iampb.Policy{} - e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - if settings.Path != "" { - baseUrl.Path = settings.Path - } - httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) - if err != nil { - return err - } - httpReq = httpReq.WithContext(ctx) - httpReq.Header = headers - - buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "GetIamPolicy") - if err != nil { - return err - } - - if err := unm.Unmarshal(buf, resp); err != nil { - return err - } - - return nil - }, opts...) - if e != nil { - return nil, e - } - return resp, nil -} - -// SetIamPolicy sets the access control policy on an organization resource. Replaces any -// existing policy. The resource field should be the organization’s resource -// name, for example: “organizations/123”. -// -// Authorization requires the IAM permission -// resourcemanager.organizations.setIamPolicy on the specified organization. -func (c *organizationsRESTClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error) { - m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} - jsonReq, err := m.Marshal(req) - if err != nil { - return nil, err - } - - baseUrl, err := url.Parse(c.endpoint) - if err != nil { - return nil, err - } - baseUrl.Path += fmt.Sprintf("/v3/%v:setIamPolicy", req.GetResource()) - - params := url.Values{} - params.Add("$alt", "json;enum-encoding=int") - - baseUrl.RawQuery = params.Encode() - - // Build HTTP headers from client and context metadata. - hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "resource", url.QueryEscape(req.GetResource()))} - - hds = append(c.xGoogHeaders, hds...) - hds = append(hds, "Content-Type", "application/json") - headers := gax.BuildHeaders(ctx, hds...) - if gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "resource_name", fmt.Sprintf("//cloudresourcemanager.googleapis.com/%v", req.GetResource())) - } - if gax.IsFeatureEnabled("METRICS") || gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "rpc_method", "google.cloud.resourcemanager.v3.Organizations/SetIamPolicy") - ctx = callctx.WithTelemetryContext(ctx, "url_template", "/v3/{resource=organizations/*}:setIamPolicy") - } - opts = append((*c.CallOptions).SetIamPolicy[0:len((*c.CallOptions).SetIamPolicy):len((*c.CallOptions).SetIamPolicy)], opts...) - unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} - resp := &iampb.Policy{} - e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - if settings.Path != "" { - baseUrl.Path = settings.Path - } - httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) - if err != nil { - return err - } - httpReq = httpReq.WithContext(ctx) - httpReq.Header = headers - - buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetIamPolicy") - if err != nil { - return err - } - - if err := unm.Unmarshal(buf, resp); err != nil { - return err - } - - return nil - }, opts...) - if e != nil { - return nil, e - } - return resp, nil -} - -// TestIamPermissions returns the permissions that a caller has on the specified organization. -// The resource field should be the organization’s resource name, -// for example: “organizations/123”. -// -// There are no permissions required for making this API call. -func (c *organizationsRESTClient) TestIamPermissions(ctx context.Context, req *iampb.TestIamPermissionsRequest, opts ...gax.CallOption) (*iampb.TestIamPermissionsResponse, error) { - m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} - jsonReq, err := m.Marshal(req) - if err != nil { - return nil, err - } - - baseUrl, err := url.Parse(c.endpoint) - if err != nil { - return nil, err - } - baseUrl.Path += fmt.Sprintf("/v3/%v:testIamPermissions", req.GetResource()) - - params := url.Values{} - params.Add("$alt", "json;enum-encoding=int") - - baseUrl.RawQuery = params.Encode() - - // Build HTTP headers from client and context metadata. - hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "resource", url.QueryEscape(req.GetResource()))} - - hds = append(c.xGoogHeaders, hds...) - hds = append(hds, "Content-Type", "application/json") - headers := gax.BuildHeaders(ctx, hds...) - if gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "resource_name", fmt.Sprintf("//cloudresourcemanager.googleapis.com/%v", req.GetResource())) - } - if gax.IsFeatureEnabled("METRICS") || gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "rpc_method", "google.cloud.resourcemanager.v3.Organizations/TestIamPermissions") - ctx = callctx.WithTelemetryContext(ctx, "url_template", "/v3/{resource=organizations/*}:testIamPermissions") - } - opts = append((*c.CallOptions).TestIamPermissions[0:len((*c.CallOptions).TestIamPermissions):len((*c.CallOptions).TestIamPermissions)], opts...) - unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} - resp := &iampb.TestIamPermissionsResponse{} - e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - if settings.Path != "" { - baseUrl.Path = settings.Path - } - httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) - if err != nil { - return err - } - httpReq = httpReq.WithContext(ctx) - httpReq.Header = headers - - buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "TestIamPermissions") - if err != nil { - return err - } - - if err := unm.Unmarshal(buf, resp); err != nil { - return err - } - - return nil - }, opts...) - if e != nil { - return nil, e - } - return resp, nil -} - -// GetOperation is a utility method from google.longrunning.Operations. -func (c *organizationsRESTClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { - baseUrl, err := url.Parse(c.endpoint) - if err != nil { - return nil, err - } - baseUrl.Path += fmt.Sprintf("/v3/%v", req.GetName()) - - params := url.Values{} - params.Add("$alt", "json;enum-encoding=int") - - baseUrl.RawQuery = params.Encode() - - // Build HTTP headers from client and context metadata. - hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))} - - hds = append(c.xGoogHeaders, hds...) - hds = append(hds, "Content-Type", "application/json") - headers := gax.BuildHeaders(ctx, hds...) - if gax.IsFeatureEnabled("METRICS") || gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "rpc_method", "google.longrunning.Operations/GetOperation") - ctx = callctx.WithTelemetryContext(ctx, "url_template", "/v3/{name=operations/**}") - } - opts = append((*c.CallOptions).GetOperation[0:len((*c.CallOptions).GetOperation):len((*c.CallOptions).GetOperation)], opts...) - unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} - resp := &longrunningpb.Operation{} - e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - if settings.Path != "" { - baseUrl.Path = settings.Path - } - httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) - if err != nil { - return err - } - httpReq = httpReq.WithContext(ctx) - httpReq.Header = headers - - buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") - if err != nil { - return err - } - - if err := unm.Unmarshal(buf, resp); err != nil { - return err - } - - return nil - }, opts...) - if e != nil { - return nil, e - } - return resp, nil -} diff --git a/vendor/cloud.google.com/go/resourcemanager/apiv3/projects_client.go b/vendor/cloud.google.com/go/resourcemanager/apiv3/projects_client.go deleted file mode 100644 index fad86d6f99..0000000000 --- a/vendor/cloud.google.com/go/resourcemanager/apiv3/projects_client.go +++ /dev/null @@ -1,2069 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Code generated by protoc-gen-go_gapic. DO NOT EDIT. - -package resourcemanager - -import ( - "bytes" - "context" - "fmt" - "log/slog" - "math" - "net/http" - "net/url" - "time" - - iampb "cloud.google.com/go/iam/apiv1/iampb" - "cloud.google.com/go/longrunning" - lroauto "cloud.google.com/go/longrunning/autogen" - longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" - resourcemanagerpb "cloud.google.com/go/resourcemanager/apiv3/resourcemanagerpb" - gax "github.com/googleapis/gax-go/v2" - "github.com/googleapis/gax-go/v2/callctx" - "google.golang.org/api/iterator" - "google.golang.org/api/option" - "google.golang.org/api/option/internaloption" - gtransport "google.golang.org/api/transport/grpc" - httptransport "google.golang.org/api/transport/http" - "google.golang.org/grpc" - "google.golang.org/grpc/codes" - "google.golang.org/protobuf/encoding/protojson" - "google.golang.org/protobuf/proto" -) - -var newProjectsClientHook clientHook - -// ProjectsCallOptions contains the retry settings for each method of ProjectsClient. -type ProjectsCallOptions struct { - GetProject []gax.CallOption - ListProjects []gax.CallOption - SearchProjects []gax.CallOption - CreateProject []gax.CallOption - UpdateProject []gax.CallOption - MoveProject []gax.CallOption - DeleteProject []gax.CallOption - UndeleteProject []gax.CallOption - GetIamPolicy []gax.CallOption - SetIamPolicy []gax.CallOption - TestIamPermissions []gax.CallOption - GetOperation []gax.CallOption -} - -func defaultProjectsGRPCClientOptions() []option.ClientOption { - return []option.ClientOption{ - internaloption.WithDefaultEndpoint("cloudresourcemanager.googleapis.com:443"), - internaloption.WithDefaultEndpointTemplate("cloudresourcemanager.UNIVERSE_DOMAIN:443"), - internaloption.WithDefaultMTLSEndpoint("cloudresourcemanager.mtls.googleapis.com:443"), - internaloption.WithDefaultUniverseDomain("googleapis.com"), - internaloption.WithDefaultAudience("https://cloudresourcemanager.googleapis.com/"), - internaloption.WithDefaultScopes(DefaultAuthScopes()...), - internaloption.EnableJwtWithScope(), - internaloption.AllowHardBoundTokens("MTLS_S2A"), - internaloption.EnableNewAuthLibrary(), - option.WithGRPCDialOption(grpc.WithDefaultCallOptions( - grpc.MaxCallRecvMsgSize(math.MaxInt32))), - } -} - -func defaultProjectsCallOptions() *ProjectsCallOptions { - return &ProjectsCallOptions{ - GetProject: []gax.CallOption{ - gax.WithTimeout(60000 * time.Millisecond), - gax.WithRetry(func() gax.Retryer { - return gax.OnCodes([]codes.Code{ - codes.Unavailable, - }, gax.Backoff{ - Initial: 100 * time.Millisecond, - Max: 60000 * time.Millisecond, - Multiplier: 1.30, - }) - }), - }, - ListProjects: []gax.CallOption{ - gax.WithTimeout(60000 * time.Millisecond), - gax.WithRetry(func() gax.Retryer { - return gax.OnCodes([]codes.Code{ - codes.Unavailable, - }, gax.Backoff{ - Initial: 100 * time.Millisecond, - Max: 60000 * time.Millisecond, - Multiplier: 1.30, - }) - }), - }, - SearchProjects: []gax.CallOption{ - gax.WithTimeout(60000 * time.Millisecond), - }, - CreateProject: []gax.CallOption{ - gax.WithTimeout(60000 * time.Millisecond), - }, - UpdateProject: []gax.CallOption{ - gax.WithTimeout(60000 * time.Millisecond), - }, - MoveProject: []gax.CallOption{ - gax.WithTimeout(60000 * time.Millisecond), - }, - DeleteProject: []gax.CallOption{ - gax.WithTimeout(60000 * time.Millisecond), - }, - UndeleteProject: []gax.CallOption{ - gax.WithTimeout(60000 * time.Millisecond), - }, - GetIamPolicy: []gax.CallOption{ - gax.WithTimeout(60000 * time.Millisecond), - gax.WithRetry(func() gax.Retryer { - return gax.OnCodes([]codes.Code{ - codes.Unavailable, - }, gax.Backoff{ - Initial: 100 * time.Millisecond, - Max: 60000 * time.Millisecond, - Multiplier: 1.30, - }) - }), - }, - SetIamPolicy: []gax.CallOption{ - gax.WithTimeout(60000 * time.Millisecond), - }, - TestIamPermissions: []gax.CallOption{}, - GetOperation: []gax.CallOption{}, - } -} - -func defaultProjectsRESTCallOptions() *ProjectsCallOptions { - return &ProjectsCallOptions{ - GetProject: []gax.CallOption{ - gax.WithTimeout(60000 * time.Millisecond), - gax.WithRetry(func() gax.Retryer { - return gax.OnHTTPCodes(gax.Backoff{ - Initial: 100 * time.Millisecond, - Max: 60000 * time.Millisecond, - Multiplier: 1.30, - }, - http.StatusServiceUnavailable) - }), - }, - ListProjects: []gax.CallOption{ - gax.WithTimeout(60000 * time.Millisecond), - gax.WithRetry(func() gax.Retryer { - return gax.OnHTTPCodes(gax.Backoff{ - Initial: 100 * time.Millisecond, - Max: 60000 * time.Millisecond, - Multiplier: 1.30, - }, - http.StatusServiceUnavailable) - }), - }, - SearchProjects: []gax.CallOption{ - gax.WithTimeout(60000 * time.Millisecond), - }, - CreateProject: []gax.CallOption{ - gax.WithTimeout(60000 * time.Millisecond), - }, - UpdateProject: []gax.CallOption{ - gax.WithTimeout(60000 * time.Millisecond), - }, - MoveProject: []gax.CallOption{ - gax.WithTimeout(60000 * time.Millisecond), - }, - DeleteProject: []gax.CallOption{ - gax.WithTimeout(60000 * time.Millisecond), - }, - UndeleteProject: []gax.CallOption{ - gax.WithTimeout(60000 * time.Millisecond), - }, - GetIamPolicy: []gax.CallOption{ - gax.WithTimeout(60000 * time.Millisecond), - gax.WithRetry(func() gax.Retryer { - return gax.OnHTTPCodes(gax.Backoff{ - Initial: 100 * time.Millisecond, - Max: 60000 * time.Millisecond, - Multiplier: 1.30, - }, - http.StatusServiceUnavailable) - }), - }, - SetIamPolicy: []gax.CallOption{ - gax.WithTimeout(60000 * time.Millisecond), - }, - TestIamPermissions: []gax.CallOption{}, - GetOperation: []gax.CallOption{}, - } -} - -// internalProjectsClient is an interface that defines the methods available from Cloud Resource Manager API. -type internalProjectsClient interface { - Close() error - setGoogleClientInfo(...string) - Connection() *grpc.ClientConn - GetProject(context.Context, *resourcemanagerpb.GetProjectRequest, ...gax.CallOption) (*resourcemanagerpb.Project, error) - ListProjects(context.Context, *resourcemanagerpb.ListProjectsRequest, ...gax.CallOption) *ProjectIterator - SearchProjects(context.Context, *resourcemanagerpb.SearchProjectsRequest, ...gax.CallOption) *ProjectIterator - CreateProject(context.Context, *resourcemanagerpb.CreateProjectRequest, ...gax.CallOption) (*CreateProjectOperation, error) - CreateProjectOperation(name string) *CreateProjectOperation - UpdateProject(context.Context, *resourcemanagerpb.UpdateProjectRequest, ...gax.CallOption) (*UpdateProjectOperation, error) - UpdateProjectOperation(name string) *UpdateProjectOperation - MoveProject(context.Context, *resourcemanagerpb.MoveProjectRequest, ...gax.CallOption) (*MoveProjectOperation, error) - MoveProjectOperation(name string) *MoveProjectOperation - DeleteProject(context.Context, *resourcemanagerpb.DeleteProjectRequest, ...gax.CallOption) (*DeleteProjectOperation, error) - DeleteProjectOperation(name string) *DeleteProjectOperation - UndeleteProject(context.Context, *resourcemanagerpb.UndeleteProjectRequest, ...gax.CallOption) (*UndeleteProjectOperation, error) - UndeleteProjectOperation(name string) *UndeleteProjectOperation - GetIamPolicy(context.Context, *iampb.GetIamPolicyRequest, ...gax.CallOption) (*iampb.Policy, error) - SetIamPolicy(context.Context, *iampb.SetIamPolicyRequest, ...gax.CallOption) (*iampb.Policy, error) - TestIamPermissions(context.Context, *iampb.TestIamPermissionsRequest, ...gax.CallOption) (*iampb.TestIamPermissionsResponse, error) - GetOperation(context.Context, *longrunningpb.GetOperationRequest, ...gax.CallOption) (*longrunningpb.Operation, error) -} - -// ProjectsClient is a client for interacting with Cloud Resource Manager API. -// Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. -// -// Manages Google Cloud Projects. -type ProjectsClient struct { - // The internal transport-dependent client. - internalClient internalProjectsClient - - // The call options for this service. - CallOptions *ProjectsCallOptions - - // LROClient is used internally to handle long-running operations. - // It is exposed so that its CallOptions can be modified if required. - // Users should not Close this client. - LROClient *lroauto.OperationsClient -} - -// Wrapper methods routed to the internal client. - -// Close closes the connection to the API service. The user should invoke this when -// the client is no longer required. -func (c *ProjectsClient) Close() error { - return c.internalClient.Close() -} - -// setGoogleClientInfo sets the name and version of the application in -// the `x-goog-api-client` header passed on each request. Intended for -// use by Google-written clients. -func (c *ProjectsClient) setGoogleClientInfo(keyval ...string) { - c.internalClient.setGoogleClientInfo(keyval...) -} - -// Connection returns a connection to the API service. -// -// Deprecated: Connections are now pooled so this method does not always -// return the same resource. -func (c *ProjectsClient) Connection() *grpc.ClientConn { - return c.internalClient.Connection() -} - -// GetProject retrieves the project identified by the specified name (for example, -// projects/415104041262). -// -// The caller must have resourcemanager.projects.get permission -// for this project. -func (c *ProjectsClient) GetProject(ctx context.Context, req *resourcemanagerpb.GetProjectRequest, opts ...gax.CallOption) (*resourcemanagerpb.Project, error) { - return c.internalClient.GetProject(ctx, req, opts...) -} - -// ListProjects lists projects that are direct children of the specified folder or -// organization resource. list() provides a strongly consistent view of the -// projects underneath the specified parent resource. list() returns -// projects sorted based upon the (ascending) lexical ordering of their -// display_name. The caller must have resourcemanager.projects.list -// permission on the identified parent. -func (c *ProjectsClient) ListProjects(ctx context.Context, req *resourcemanagerpb.ListProjectsRequest, opts ...gax.CallOption) *ProjectIterator { - return c.internalClient.ListProjects(ctx, req, opts...) -} - -// SearchProjects search for projects that the caller has both resourcemanager.projects.get -// permission on, and also satisfy the specified query. -// -// This method returns projects in an unspecified order. -// -// This method is eventually consistent with project mutations; this means -// that a newly created project may not appear in the results or recent -// updates to an existing project may not be reflected in the results. To -// retrieve the latest state of a project, use the -// GetProject method. -func (c *ProjectsClient) SearchProjects(ctx context.Context, req *resourcemanagerpb.SearchProjectsRequest, opts ...gax.CallOption) *ProjectIterator { - return c.internalClient.SearchProjects(ctx, req, opts...) -} - -// CreateProject request that a new project be created. The result is an Operation which -// can be used to track the creation process. This process usually takes a few -// seconds, but can sometimes take much longer. The tracking Operation is -// automatically deleted after a few hours, so there is no need to call -// DeleteOperation. -func (c *ProjectsClient) CreateProject(ctx context.Context, req *resourcemanagerpb.CreateProjectRequest, opts ...gax.CallOption) (*CreateProjectOperation, error) { - return c.internalClient.CreateProject(ctx, req, opts...) -} - -// CreateProjectOperation returns a new CreateProjectOperation from a given name. -// The name must be that of a previously created CreateProjectOperation, possibly from a different process. -func (c *ProjectsClient) CreateProjectOperation(name string) *CreateProjectOperation { - return c.internalClient.CreateProjectOperation(name) -} - -// UpdateProject updates the display_name and labels of the project identified by the -// specified name (for example, projects/415104041262). Deleting all -// labels requires an update mask for labels field. -// -// The caller must have resourcemanager.projects.update permission for this -// project. -func (c *ProjectsClient) UpdateProject(ctx context.Context, req *resourcemanagerpb.UpdateProjectRequest, opts ...gax.CallOption) (*UpdateProjectOperation, error) { - return c.internalClient.UpdateProject(ctx, req, opts...) -} - -// UpdateProjectOperation returns a new UpdateProjectOperation from a given name. -// The name must be that of a previously created UpdateProjectOperation, possibly from a different process. -func (c *ProjectsClient) UpdateProjectOperation(name string) *UpdateProjectOperation { - return c.internalClient.UpdateProjectOperation(name) -} - -// MoveProject move a project to another place in your resource hierarchy, under a new -// resource parent. -// -// Returns an operation which can be used to track the process of the project -// move workflow. -// Upon success, the Operation.response field will be populated with the -// moved project. -// -// The caller must have resourcemanager.projects.move permission on the -// project, on the project’s current and proposed new parent. -// -// If project has no current parent, or it currently does not have an -// associated organization resource, you will also need the -// resourcemanager.projects.setIamPolicy permission in the project. -func (c *ProjectsClient) MoveProject(ctx context.Context, req *resourcemanagerpb.MoveProjectRequest, opts ...gax.CallOption) (*MoveProjectOperation, error) { - return c.internalClient.MoveProject(ctx, req, opts...) -} - -// MoveProjectOperation returns a new MoveProjectOperation from a given name. -// The name must be that of a previously created MoveProjectOperation, possibly from a different process. -func (c *ProjectsClient) MoveProjectOperation(name string) *MoveProjectOperation { - return c.internalClient.MoveProjectOperation(name) -} - -// DeleteProject marks the project identified by the specified -// name (for example, projects/415104041262) for deletion. -// -// This method will only affect the project if it has a lifecycle state of -// [ACTIVE][google.cloud.resourcemanager.v3.Project.State.ACTIVE (at http://google.cloud.resourcemanager.v3.Project.State.ACTIVE)]. -// -// This method changes the Project’s lifecycle state from -// [ACTIVE][google.cloud.resourcemanager.v3.Project.State.ACTIVE (at http://google.cloud.resourcemanager.v3.Project.State.ACTIVE)] -// to -// DELETE_REQUESTED. -// The deletion starts at an unspecified time, -// at which point the Project is no longer accessible. -// -// Until the deletion completes, you can check the lifecycle state -// checked by retrieving the project with [GetProject] -// [google.cloud.resourcemanager.v3.Projects.GetProject], -// and the project remains visible to [ListProjects] -// [google.cloud.resourcemanager.v3.Projects.ListProjects]. -// However, you cannot update the project. -// -// After the deletion completes, the project is not retrievable by -// the [GetProject] -// [google.cloud.resourcemanager.v3.Projects.GetProject], -// [ListProjects] -// [google.cloud.resourcemanager.v3.Projects.ListProjects], and -// SearchProjects -// methods. -// -// This method behaves idempotently, such that deleting a DELETE_REQUESTED -// project will not cause an error, but also won’t do anything. -// -// The caller must have resourcemanager.projects.delete permissions for this -// project. -func (c *ProjectsClient) DeleteProject(ctx context.Context, req *resourcemanagerpb.DeleteProjectRequest, opts ...gax.CallOption) (*DeleteProjectOperation, error) { - return c.internalClient.DeleteProject(ctx, req, opts...) -} - -// DeleteProjectOperation returns a new DeleteProjectOperation from a given name. -// The name must be that of a previously created DeleteProjectOperation, possibly from a different process. -func (c *ProjectsClient) DeleteProjectOperation(name string) *DeleteProjectOperation { - return c.internalClient.DeleteProjectOperation(name) -} - -// UndeleteProject restores the project identified by the specified -// name (for example, projects/415104041262). -// You can only use this method for a project that has a lifecycle state of -// [DELETE_REQUESTED] -// [Projects.State.DELETE_REQUESTED]. -// After deletion starts, the project cannot be restored. -// -// The caller must have resourcemanager.projects.undelete permission for -// this project. -func (c *ProjectsClient) UndeleteProject(ctx context.Context, req *resourcemanagerpb.UndeleteProjectRequest, opts ...gax.CallOption) (*UndeleteProjectOperation, error) { - return c.internalClient.UndeleteProject(ctx, req, opts...) -} - -// UndeleteProjectOperation returns a new UndeleteProjectOperation from a given name. -// The name must be that of a previously created UndeleteProjectOperation, possibly from a different process. -func (c *ProjectsClient) UndeleteProjectOperation(name string) *UndeleteProjectOperation { - return c.internalClient.UndeleteProjectOperation(name) -} - -// GetIamPolicy returns the IAM access control policy for the specified project, in the -// format projects/{ProjectIdOrNumber} e.g. projects/123. -// Permission is denied if the policy or the resource do not exist. -func (c *ProjectsClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error) { - return c.internalClient.GetIamPolicy(ctx, req, opts...) -} - -// SetIamPolicy sets the IAM access control policy for the specified project, in the -// format projects/{ProjectIdOrNumber} e.g. projects/123. -// -// CAUTION: This method will replace the existing policy, and cannot be used -// to append additional IAM settings. -// -// Note: Removing service accounts from policies or changing their roles can -// render services completely inoperable. It is important to understand how -// the service account is being used before removing or updating its roles. -// -// The following constraints apply when using setIamPolicy(): -// -// Project does not support allUsers and allAuthenticatedUsers as -// members in a Binding of a Policy. -// -// The owner role can be granted to a user, serviceAccount, or a group -// that is part of an organization. For example, -// group@myownpersonaldomain.com (at mailto:group@myownpersonaldomain.com) could be added as an owner to a project in -// the myownpersonaldomain.com (at http://myownpersonaldomain.com) organization, but not the examplepetstore.com (at http://examplepetstore.com) -// organization. -// -// Service accounts can be made owners of a project directly -// without any restrictions. However, to be added as an owner, a user must be -// invited using the Cloud Platform console and must accept the invitation. -// -// A user cannot be granted the owner role using setIamPolicy(). The user -// must be granted the owner role using the Cloud Platform Console and must -// explicitly accept the invitation. -// -// Invitations to grant the owner role cannot be sent using -// setIamPolicy(); -// they must be sent only using the Cloud Platform Console. -// -// If the project is not part of an organization, there must be at least -// one owner who has accepted the Terms of Service (ToS) agreement in the -// policy. Calling setIamPolicy() to remove the last ToS-accepted owner -// from the policy will fail. This restriction also applies to legacy -// projects that no longer have owners who have accepted the ToS. Edits to -// IAM policies will be rejected until the lack of a ToS-accepting owner is -// rectified. If the project is part of an organization, you can remove all -// owners, potentially making the organization inaccessible. -func (c *ProjectsClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error) { - return c.internalClient.SetIamPolicy(ctx, req, opts...) -} - -// TestIamPermissions returns permissions that a caller has on the specified project, in the -// format projects/{ProjectIdOrNumber} e.g. projects/123… -func (c *ProjectsClient) TestIamPermissions(ctx context.Context, req *iampb.TestIamPermissionsRequest, opts ...gax.CallOption) (*iampb.TestIamPermissionsResponse, error) { - return c.internalClient.TestIamPermissions(ctx, req, opts...) -} - -// GetOperation is a utility method from google.longrunning.Operations. -func (c *ProjectsClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { - return c.internalClient.GetOperation(ctx, req, opts...) -} - -// projectsGRPCClient is a client for interacting with Cloud Resource Manager API over gRPC transport. -// -// Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. -type projectsGRPCClient struct { - // Connection pool of gRPC connections to the service. - connPool gtransport.ConnPool - - // Points back to the CallOptions field of the containing ProjectsClient - CallOptions **ProjectsCallOptions - - // The gRPC API client. - projectsClient resourcemanagerpb.ProjectsClient - - // LROClient is used internally to handle long-running operations. - // It is exposed so that its CallOptions can be modified if required. - // Users should not Close this client. - LROClient **lroauto.OperationsClient - - operationsClient longrunningpb.OperationsClient - - // The x-goog-* metadata to be sent with each request. - xGoogHeaders []string - - logger *slog.Logger -} - -// NewProjectsClient creates a new projects client based on gRPC. -// The returned client must be Closed when it is done being used to clean up its underlying connections. -// -// Manages Google Cloud Projects. -func NewProjectsClient(ctx context.Context, opts ...option.ClientOption) (*ProjectsClient, error) { - clientOpts := defaultProjectsGRPCClientOptions() - if gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - clientOpts = append(clientOpts, internaloption.WithTelemetryAttributes(map[string]string{ - "gcp.client.service": "cloudresourcemanager", - "gcp.client.version": getVersionClient(), - "gcp.client.repo": "googleapis/google-cloud-go", - "gcp.client.artifact": "cloud.google.com/go/resourcemanager/apiv3", - "gcp.client.language": "go", - "url.domain": "cloudresourcemanager.googleapis.com", - })) - } - if newProjectsClientHook != nil { - hookOpts, err := newProjectsClientHook(ctx, clientHookParams{}) - if err != nil { - return nil, err - } - clientOpts = append(clientOpts, hookOpts...) - } - - connPool, err := gtransport.DialPool(ctx, append(clientOpts, opts...)...) - if err != nil { - return nil, err - } - client := ProjectsClient{CallOptions: defaultProjectsCallOptions()} - - c := &projectsGRPCClient{ - connPool: connPool, - projectsClient: resourcemanagerpb.NewProjectsClient(connPool), - CallOptions: &client.CallOptions, - logger: internaloption.GetLogger(opts), - operationsClient: longrunningpb.NewOperationsClient(connPool), - } - c.setGoogleClientInfo() - if gax.IsFeatureEnabled("METRICS") { - metrics := gax.NewClientMetrics( - gax.WithTelemetryLogger(c.logger), - gax.WithTelemetryAttributes(map[string]string{ - gax.ClientService: "cloudresourcemanager", - gax.ClientVersion: getVersionClient(), - gax.ClientArtifact: "cloud.google.com/go/resourcemanager/apiv3", - gax.RPCSystem: "grpc", - gax.URLDomain: "cloudresourcemanager.googleapis.com", - }), - ) - - client.CallOptions.GetProject = append(client.CallOptions.GetProject, gax.WithClientMetrics(metrics)) - client.CallOptions.ListProjects = append(client.CallOptions.ListProjects, gax.WithClientMetrics(metrics)) - client.CallOptions.SearchProjects = append(client.CallOptions.SearchProjects, gax.WithClientMetrics(metrics)) - client.CallOptions.CreateProject = append(client.CallOptions.CreateProject, gax.WithClientMetrics(metrics)) - client.CallOptions.UpdateProject = append(client.CallOptions.UpdateProject, gax.WithClientMetrics(metrics)) - client.CallOptions.MoveProject = append(client.CallOptions.MoveProject, gax.WithClientMetrics(metrics)) - client.CallOptions.DeleteProject = append(client.CallOptions.DeleteProject, gax.WithClientMetrics(metrics)) - client.CallOptions.UndeleteProject = append(client.CallOptions.UndeleteProject, gax.WithClientMetrics(metrics)) - client.CallOptions.GetIamPolicy = append(client.CallOptions.GetIamPolicy, gax.WithClientMetrics(metrics)) - client.CallOptions.SetIamPolicy = append(client.CallOptions.SetIamPolicy, gax.WithClientMetrics(metrics)) - client.CallOptions.TestIamPermissions = append(client.CallOptions.TestIamPermissions, gax.WithClientMetrics(metrics)) - client.CallOptions.GetOperation = append(client.CallOptions.GetOperation, gax.WithClientMetrics(metrics)) - } - - client.internalClient = c - - client.LROClient, err = lroauto.NewOperationsClient(ctx, gtransport.WithConnPool(connPool)) - if err != nil { - // This error "should not happen", since we are just reusing old connection pool - // and never actually need to dial. - // If this does happen, we could leak connp. However, we cannot close conn: - // If the user invoked the constructor with option.WithGRPCConn, - // we would close a connection that's still in use. - // TODO: investigate error conditions. - return nil, err - } - c.LROClient = &client.LROClient - return &client, nil -} - -// Connection returns a connection to the API service. -// -// Deprecated: Connections are now pooled so this method does not always -// return the same resource. -func (c *projectsGRPCClient) Connection() *grpc.ClientConn { - return c.connPool.Conn() -} - -// setGoogleClientInfo sets the name and version of the application in -// the `x-goog-api-client` header passed on each request. Intended for -// use by Google-written clients. -func (c *projectsGRPCClient) setGoogleClientInfo(keyval ...string) { - kv := append([]string{"gl-go", gax.GoVersion}, keyval...) - kv = append(kv, "gapic", getVersionClient(), "gax", gax.Version, "grpc", grpc.Version, "pb", protoVersion) - c.xGoogHeaders = []string{ - "x-goog-api-client", gax.XGoogHeader(kv...), - } -} - -// Close closes the connection to the API service. The user should invoke this when -// the client is no longer required. -func (c *projectsGRPCClient) Close() error { - return c.connPool.Close() -} - -// Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. -type projectsRESTClient struct { - // The http endpoint to connect to. - endpoint string - - // The http client. - httpClient *http.Client - - // LROClient is used internally to handle long-running operations. - // It is exposed so that its CallOptions can be modified if required. - // Users should not Close this client. - LROClient **lroauto.OperationsClient - - // The x-goog-* headers to be sent with each request. - xGoogHeaders []string - - // Points back to the CallOptions field of the containing ProjectsClient - CallOptions **ProjectsCallOptions - - logger *slog.Logger -} - -// NewProjectsRESTClient creates a new projects rest client. -// -// Manages Google Cloud Projects. -func NewProjectsRESTClient(ctx context.Context, opts ...option.ClientOption) (*ProjectsClient, error) { - clientOpts := append(defaultProjectsRESTClientOptions(), opts...) - if gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - clientOpts = append(clientOpts, internaloption.WithTelemetryAttributes(map[string]string{ - "gcp.client.service": "cloudresourcemanager", - "gcp.client.version": getVersionClient(), - "gcp.client.repo": "googleapis/google-cloud-go", - "gcp.client.artifact": "cloud.google.com/go/resourcemanager/apiv3", - "gcp.client.language": "go", - "url.domain": "cloudresourcemanager.googleapis.com", - })) - } - httpClient, endpoint, err := httptransport.NewClient(ctx, clientOpts...) - if err != nil { - return nil, err - } - - callOpts := defaultProjectsRESTCallOptions() - c := &projectsRESTClient{ - endpoint: endpoint, - httpClient: httpClient, - CallOptions: &callOpts, - logger: internaloption.GetLogger(opts), - } - c.setGoogleClientInfo() - - if gax.IsFeatureEnabled("METRICS") { - metrics := gax.NewClientMetrics( - gax.WithTelemetryLogger(c.logger), - gax.WithTelemetryAttributes(map[string]string{ - gax.ClientService: "cloudresourcemanager", - gax.ClientVersion: getVersionClient(), - gax.ClientArtifact: "cloud.google.com/go/resourcemanager/apiv3", - gax.RPCSystem: "http", - gax.URLDomain: "cloudresourcemanager.googleapis.com", - }), - ) - - callOpts.GetProject = append(callOpts.GetProject, gax.WithClientMetrics(metrics)) - callOpts.ListProjects = append(callOpts.ListProjects, gax.WithClientMetrics(metrics)) - callOpts.SearchProjects = append(callOpts.SearchProjects, gax.WithClientMetrics(metrics)) - callOpts.CreateProject = append(callOpts.CreateProject, gax.WithClientMetrics(metrics)) - callOpts.UpdateProject = append(callOpts.UpdateProject, gax.WithClientMetrics(metrics)) - callOpts.MoveProject = append(callOpts.MoveProject, gax.WithClientMetrics(metrics)) - callOpts.DeleteProject = append(callOpts.DeleteProject, gax.WithClientMetrics(metrics)) - callOpts.UndeleteProject = append(callOpts.UndeleteProject, gax.WithClientMetrics(metrics)) - callOpts.GetIamPolicy = append(callOpts.GetIamPolicy, gax.WithClientMetrics(metrics)) - callOpts.SetIamPolicy = append(callOpts.SetIamPolicy, gax.WithClientMetrics(metrics)) - callOpts.TestIamPermissions = append(callOpts.TestIamPermissions, gax.WithClientMetrics(metrics)) - callOpts.GetOperation = append(callOpts.GetOperation, gax.WithClientMetrics(metrics)) - } - - lroOpts := []option.ClientOption{ - option.WithHTTPClient(httpClient), - option.WithEndpoint(endpoint), - } - opClient, err := lroauto.NewOperationsRESTClient(ctx, lroOpts...) - if err != nil { - return nil, err - } - c.LROClient = &opClient - - return &ProjectsClient{internalClient: c, CallOptions: callOpts}, nil -} - -func defaultProjectsRESTClientOptions() []option.ClientOption { - return []option.ClientOption{ - internaloption.WithDefaultEndpoint("https://cloudresourcemanager.googleapis.com"), - internaloption.WithDefaultEndpointTemplate("https://cloudresourcemanager.UNIVERSE_DOMAIN"), - internaloption.WithDefaultMTLSEndpoint("https://cloudresourcemanager.mtls.googleapis.com"), - internaloption.WithDefaultUniverseDomain("googleapis.com"), - internaloption.WithDefaultAudience("https://cloudresourcemanager.googleapis.com/"), - internaloption.WithDefaultScopes(DefaultAuthScopes()...), - internaloption.EnableNewAuthLibrary(), - } -} - -// setGoogleClientInfo sets the name and version of the application in -// the `x-goog-api-client` header passed on each request. Intended for -// use by Google-written clients. -func (c *projectsRESTClient) setGoogleClientInfo(keyval ...string) { - kv := append([]string{"gl-go", gax.GoVersion}, keyval...) - kv = append(kv, "gapic", getVersionClient(), "gax", gax.Version, "rest", "UNKNOWN", "pb", protoVersion) - c.xGoogHeaders = []string{ - "x-goog-api-client", gax.XGoogHeader(kv...), - } -} - -// Close closes the connection to the API service. The user should invoke this when -// the client is no longer required. -func (c *projectsRESTClient) Close() error { - // Replace httpClient with nil to force cleanup. - c.httpClient = nil - return nil -} - -// Connection returns a connection to the API service. -// -// Deprecated: This method always returns nil. -func (c *projectsRESTClient) Connection() *grpc.ClientConn { - return nil -} -func (c *projectsGRPCClient) GetProject(ctx context.Context, req *resourcemanagerpb.GetProjectRequest, opts ...gax.CallOption) (*resourcemanagerpb.Project, error) { - hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))} - - hds = append(c.xGoogHeaders, hds...) - ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) - if gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "resource_name", fmt.Sprintf("//cloudresourcemanager.googleapis.com/%v", req.GetName())) - } - if gax.IsFeatureEnabled("METRICS") || gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "rpc_method", "google.cloud.resourcemanager.v3.Projects/GetProject") - } - opts = append((*c.CallOptions).GetProject[0:len((*c.CallOptions).GetProject):len((*c.CallOptions).GetProject)], opts...) - var resp *resourcemanagerpb.Project - err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - var err error - resp, err = executeRPC(ctx, c.projectsClient.GetProject, req, settings.GRPC, c.logger, "GetProject") - return err - }, opts...) - if err != nil { - return nil, err - } - return resp, nil -} - -func (c *projectsGRPCClient) ListProjects(ctx context.Context, req *resourcemanagerpb.ListProjectsRequest, opts ...gax.CallOption) *ProjectIterator { - ctx = gax.InsertMetadataIntoOutgoingContext(ctx, c.xGoogHeaders...) - if gax.IsFeatureEnabled("METRICS") || gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "rpc_method", "google.cloud.resourcemanager.v3.Projects/ListProjects") - } - opts = append((*c.CallOptions).ListProjects[0:len((*c.CallOptions).ListProjects):len((*c.CallOptions).ListProjects)], opts...) - it := &ProjectIterator{} - req = proto.Clone(req).(*resourcemanagerpb.ListProjectsRequest) - it.InternalFetch = func(pageSize int, pageToken string) ([]*resourcemanagerpb.Project, string, error) { - resp := &resourcemanagerpb.ListProjectsResponse{} - if pageToken != "" { - req.PageToken = pageToken - } - if pageSize > math.MaxInt32 { - req.PageSize = math.MaxInt32 - } else if pageSize != 0 { - req.PageSize = int32(pageSize) - } - err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - var err error - resp, err = executeRPC(ctx, c.projectsClient.ListProjects, req, settings.GRPC, c.logger, "ListProjects") - return err - }, opts...) - if err != nil { - return nil, "", err - } - - it.Response = resp - return resp.GetProjects(), resp.GetNextPageToken(), nil - } - fetch := func(pageSize int, pageToken string) (string, error) { - items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) - if err != nil { - return "", err - } - it.items = append(it.items, items...) - return nextPageToken, nil - } - - it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) - it.pageInfo.MaxSize = int(req.GetPageSize()) - it.pageInfo.Token = req.GetPageToken() - - return it -} - -func (c *projectsGRPCClient) SearchProjects(ctx context.Context, req *resourcemanagerpb.SearchProjectsRequest, opts ...gax.CallOption) *ProjectIterator { - ctx = gax.InsertMetadataIntoOutgoingContext(ctx, c.xGoogHeaders...) - if gax.IsFeatureEnabled("METRICS") || gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "rpc_method", "google.cloud.resourcemanager.v3.Projects/SearchProjects") - } - opts = append((*c.CallOptions).SearchProjects[0:len((*c.CallOptions).SearchProjects):len((*c.CallOptions).SearchProjects)], opts...) - it := &ProjectIterator{} - req = proto.Clone(req).(*resourcemanagerpb.SearchProjectsRequest) - it.InternalFetch = func(pageSize int, pageToken string) ([]*resourcemanagerpb.Project, string, error) { - resp := &resourcemanagerpb.SearchProjectsResponse{} - if pageToken != "" { - req.PageToken = pageToken - } - if pageSize > math.MaxInt32 { - req.PageSize = math.MaxInt32 - } else if pageSize != 0 { - req.PageSize = int32(pageSize) - } - err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - var err error - resp, err = executeRPC(ctx, c.projectsClient.SearchProjects, req, settings.GRPC, c.logger, "SearchProjects") - return err - }, opts...) - if err != nil { - return nil, "", err - } - - it.Response = resp - return resp.GetProjects(), resp.GetNextPageToken(), nil - } - fetch := func(pageSize int, pageToken string) (string, error) { - items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) - if err != nil { - return "", err - } - it.items = append(it.items, items...) - return nextPageToken, nil - } - - it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) - it.pageInfo.MaxSize = int(req.GetPageSize()) - it.pageInfo.Token = req.GetPageToken() - - return it -} - -func (c *projectsGRPCClient) CreateProject(ctx context.Context, req *resourcemanagerpb.CreateProjectRequest, opts ...gax.CallOption) (*CreateProjectOperation, error) { - ctx = gax.InsertMetadataIntoOutgoingContext(ctx, c.xGoogHeaders...) - if gax.IsFeatureEnabled("METRICS") || gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "rpc_method", "google.cloud.resourcemanager.v3.Projects/CreateProject") - } - opts = append((*c.CallOptions).CreateProject[0:len((*c.CallOptions).CreateProject):len((*c.CallOptions).CreateProject)], opts...) - var resp *longrunningpb.Operation - err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - var err error - resp, err = executeRPC(ctx, c.projectsClient.CreateProject, req, settings.GRPC, c.logger, "CreateProject") - return err - }, opts...) - if err != nil { - return nil, err - } - return &CreateProjectOperation{ - lro: longrunning.InternalNewOperation(*c.LROClient, resp), - }, nil -} - -func (c *projectsGRPCClient) UpdateProject(ctx context.Context, req *resourcemanagerpb.UpdateProjectRequest, opts ...gax.CallOption) (*UpdateProjectOperation, error) { - hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "project.name", url.QueryEscape(req.GetProject().GetName()))} - - hds = append(c.xGoogHeaders, hds...) - ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) - if gax.IsFeatureEnabled("METRICS") || gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "rpc_method", "google.cloud.resourcemanager.v3.Projects/UpdateProject") - } - opts = append((*c.CallOptions).UpdateProject[0:len((*c.CallOptions).UpdateProject):len((*c.CallOptions).UpdateProject)], opts...) - var resp *longrunningpb.Operation - err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - var err error - resp, err = executeRPC(ctx, c.projectsClient.UpdateProject, req, settings.GRPC, c.logger, "UpdateProject") - return err - }, opts...) - if err != nil { - return nil, err - } - return &UpdateProjectOperation{ - lro: longrunning.InternalNewOperation(*c.LROClient, resp), - }, nil -} - -func (c *projectsGRPCClient) MoveProject(ctx context.Context, req *resourcemanagerpb.MoveProjectRequest, opts ...gax.CallOption) (*MoveProjectOperation, error) { - hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))} - - hds = append(c.xGoogHeaders, hds...) - ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) - if gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "resource_name", fmt.Sprintf("//cloudresourcemanager.googleapis.com/%v", req.GetName())) - } - if gax.IsFeatureEnabled("METRICS") || gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "rpc_method", "google.cloud.resourcemanager.v3.Projects/MoveProject") - } - opts = append((*c.CallOptions).MoveProject[0:len((*c.CallOptions).MoveProject):len((*c.CallOptions).MoveProject)], opts...) - var resp *longrunningpb.Operation - err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - var err error - resp, err = executeRPC(ctx, c.projectsClient.MoveProject, req, settings.GRPC, c.logger, "MoveProject") - return err - }, opts...) - if err != nil { - return nil, err - } - return &MoveProjectOperation{ - lro: longrunning.InternalNewOperation(*c.LROClient, resp), - }, nil -} - -func (c *projectsGRPCClient) DeleteProject(ctx context.Context, req *resourcemanagerpb.DeleteProjectRequest, opts ...gax.CallOption) (*DeleteProjectOperation, error) { - hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))} - - hds = append(c.xGoogHeaders, hds...) - ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) - if gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "resource_name", fmt.Sprintf("//cloudresourcemanager.googleapis.com/%v", req.GetName())) - } - if gax.IsFeatureEnabled("METRICS") || gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "rpc_method", "google.cloud.resourcemanager.v3.Projects/DeleteProject") - } - opts = append((*c.CallOptions).DeleteProject[0:len((*c.CallOptions).DeleteProject):len((*c.CallOptions).DeleteProject)], opts...) - var resp *longrunningpb.Operation - err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - var err error - resp, err = executeRPC(ctx, c.projectsClient.DeleteProject, req, settings.GRPC, c.logger, "DeleteProject") - return err - }, opts...) - if err != nil { - return nil, err - } - return &DeleteProjectOperation{ - lro: longrunning.InternalNewOperation(*c.LROClient, resp), - }, nil -} - -func (c *projectsGRPCClient) UndeleteProject(ctx context.Context, req *resourcemanagerpb.UndeleteProjectRequest, opts ...gax.CallOption) (*UndeleteProjectOperation, error) { - hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))} - - hds = append(c.xGoogHeaders, hds...) - ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) - if gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "resource_name", fmt.Sprintf("//cloudresourcemanager.googleapis.com/%v", req.GetName())) - } - if gax.IsFeatureEnabled("METRICS") || gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "rpc_method", "google.cloud.resourcemanager.v3.Projects/UndeleteProject") - } - opts = append((*c.CallOptions).UndeleteProject[0:len((*c.CallOptions).UndeleteProject):len((*c.CallOptions).UndeleteProject)], opts...) - var resp *longrunningpb.Operation - err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - var err error - resp, err = executeRPC(ctx, c.projectsClient.UndeleteProject, req, settings.GRPC, c.logger, "UndeleteProject") - return err - }, opts...) - if err != nil { - return nil, err - } - return &UndeleteProjectOperation{ - lro: longrunning.InternalNewOperation(*c.LROClient, resp), - }, nil -} - -func (c *projectsGRPCClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error) { - hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "resource", url.QueryEscape(req.GetResource()))} - - hds = append(c.xGoogHeaders, hds...) - ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) - if gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "resource_name", fmt.Sprintf("//cloudresourcemanager.googleapis.com/%v", req.GetResource())) - } - if gax.IsFeatureEnabled("METRICS") || gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "rpc_method", "google.cloud.resourcemanager.v3.Projects/GetIamPolicy") - } - opts = append((*c.CallOptions).GetIamPolicy[0:len((*c.CallOptions).GetIamPolicy):len((*c.CallOptions).GetIamPolicy)], opts...) - var resp *iampb.Policy - err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - var err error - resp, err = executeRPC(ctx, c.projectsClient.GetIamPolicy, req, settings.GRPC, c.logger, "GetIamPolicy") - return err - }, opts...) - if err != nil { - return nil, err - } - return resp, nil -} - -func (c *projectsGRPCClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error) { - hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "resource", url.QueryEscape(req.GetResource()))} - - hds = append(c.xGoogHeaders, hds...) - ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) - if gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "resource_name", fmt.Sprintf("//cloudresourcemanager.googleapis.com/%v", req.GetResource())) - } - if gax.IsFeatureEnabled("METRICS") || gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "rpc_method", "google.cloud.resourcemanager.v3.Projects/SetIamPolicy") - } - opts = append((*c.CallOptions).SetIamPolicy[0:len((*c.CallOptions).SetIamPolicy):len((*c.CallOptions).SetIamPolicy)], opts...) - var resp *iampb.Policy - err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - var err error - resp, err = executeRPC(ctx, c.projectsClient.SetIamPolicy, req, settings.GRPC, c.logger, "SetIamPolicy") - return err - }, opts...) - if err != nil { - return nil, err - } - return resp, nil -} - -func (c *projectsGRPCClient) TestIamPermissions(ctx context.Context, req *iampb.TestIamPermissionsRequest, opts ...gax.CallOption) (*iampb.TestIamPermissionsResponse, error) { - hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "resource", url.QueryEscape(req.GetResource()))} - - hds = append(c.xGoogHeaders, hds...) - ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) - if gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "resource_name", fmt.Sprintf("//cloudresourcemanager.googleapis.com/%v", req.GetResource())) - } - if gax.IsFeatureEnabled("METRICS") || gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "rpc_method", "google.cloud.resourcemanager.v3.Projects/TestIamPermissions") - } - opts = append((*c.CallOptions).TestIamPermissions[0:len((*c.CallOptions).TestIamPermissions):len((*c.CallOptions).TestIamPermissions)], opts...) - var resp *iampb.TestIamPermissionsResponse - err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - var err error - resp, err = executeRPC(ctx, c.projectsClient.TestIamPermissions, req, settings.GRPC, c.logger, "TestIamPermissions") - return err - }, opts...) - if err != nil { - return nil, err - } - return resp, nil -} - -func (c *projectsGRPCClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { - hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))} - - hds = append(c.xGoogHeaders, hds...) - ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) - if gax.IsFeatureEnabled("METRICS") || gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "rpc_method", "google.longrunning.Operations/GetOperation") - } - opts = append((*c.CallOptions).GetOperation[0:len((*c.CallOptions).GetOperation):len((*c.CallOptions).GetOperation)], opts...) - var resp *longrunningpb.Operation - err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - var err error - resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") - return err - }, opts...) - if err != nil { - return nil, err - } - return resp, nil -} - -// GetProject retrieves the project identified by the specified name (for example, -// projects/415104041262). -// -// The caller must have resourcemanager.projects.get permission -// for this project. -func (c *projectsRESTClient) GetProject(ctx context.Context, req *resourcemanagerpb.GetProjectRequest, opts ...gax.CallOption) (*resourcemanagerpb.Project, error) { - baseUrl, err := url.Parse(c.endpoint) - if err != nil { - return nil, err - } - baseUrl.Path += fmt.Sprintf("/v3/%v", req.GetName()) - - params := url.Values{} - params.Add("$alt", "json;enum-encoding=int") - - baseUrl.RawQuery = params.Encode() - - // Build HTTP headers from client and context metadata. - hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))} - - hds = append(c.xGoogHeaders, hds...) - hds = append(hds, "Content-Type", "application/json") - headers := gax.BuildHeaders(ctx, hds...) - if gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "resource_name", fmt.Sprintf("//cloudresourcemanager.googleapis.com/%v", req.GetName())) - } - if gax.IsFeatureEnabled("METRICS") || gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "rpc_method", "google.cloud.resourcemanager.v3.Projects/GetProject") - ctx = callctx.WithTelemetryContext(ctx, "url_template", "/v3/{name=projects/*}") - } - opts = append((*c.CallOptions).GetProject[0:len((*c.CallOptions).GetProject):len((*c.CallOptions).GetProject)], opts...) - unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} - resp := &resourcemanagerpb.Project{} - e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - if settings.Path != "" { - baseUrl.Path = settings.Path - } - httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) - if err != nil { - return err - } - httpReq = httpReq.WithContext(ctx) - httpReq.Header = headers - - buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetProject") - if err != nil { - return err - } - - if err := unm.Unmarshal(buf, resp); err != nil { - return err - } - - return nil - }, opts...) - if e != nil { - return nil, e - } - return resp, nil -} - -// ListProjects lists projects that are direct children of the specified folder or -// organization resource. list() provides a strongly consistent view of the -// projects underneath the specified parent resource. list() returns -// projects sorted based upon the (ascending) lexical ordering of their -// display_name. The caller must have resourcemanager.projects.list -// permission on the identified parent. -func (c *projectsRESTClient) ListProjects(ctx context.Context, req *resourcemanagerpb.ListProjectsRequest, opts ...gax.CallOption) *ProjectIterator { - it := &ProjectIterator{} - req = proto.Clone(req).(*resourcemanagerpb.ListProjectsRequest) - unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} - it.InternalFetch = func(pageSize int, pageToken string) ([]*resourcemanagerpb.Project, string, error) { - resp := &resourcemanagerpb.ListProjectsResponse{} - if pageToken != "" { - req.PageToken = pageToken - } - if pageSize > math.MaxInt32 { - req.PageSize = math.MaxInt32 - } else if pageSize != 0 { - req.PageSize = int32(pageSize) - } - baseUrl, err := url.Parse(c.endpoint) - if err != nil { - return nil, "", err - } - baseUrl.Path += fmt.Sprintf("/v3/projects") - - params := url.Values{} - params.Add("$alt", "json;enum-encoding=int") - if req.GetPageSize() != 0 { - params.Add("pageSize", fmt.Sprintf("%v", req.GetPageSize())) - } - if req.GetPageToken() != "" { - params.Add("pageToken", fmt.Sprintf("%v", req.GetPageToken())) - } - params.Add("parent", fmt.Sprintf("%v", req.GetParent())) - if req.GetShowDeleted() { - params.Add("showDeleted", fmt.Sprintf("%v", req.GetShowDeleted())) - } - - baseUrl.RawQuery = params.Encode() - - // Build HTTP headers from client and context metadata. - hds := append(c.xGoogHeaders, "Content-Type", "application/json") - headers := gax.BuildHeaders(ctx, hds...) - e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - if settings.Path != "" { - baseUrl.Path = settings.Path - } - httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) - if err != nil { - return err - } - httpReq.Header = headers - - buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListProjects") - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { - return err - } - - return nil - }, opts...) - if e != nil { - return nil, "", e - } - it.Response = resp - return resp.GetProjects(), resp.GetNextPageToken(), nil - } - - fetch := func(pageSize int, pageToken string) (string, error) { - items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) - if err != nil { - return "", err - } - it.items = append(it.items, items...) - return nextPageToken, nil - } - - it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) - it.pageInfo.MaxSize = int(req.GetPageSize()) - it.pageInfo.Token = req.GetPageToken() - - return it -} - -// SearchProjects search for projects that the caller has both resourcemanager.projects.get -// permission on, and also satisfy the specified query. -// -// This method returns projects in an unspecified order. -// -// This method is eventually consistent with project mutations; this means -// that a newly created project may not appear in the results or recent -// updates to an existing project may not be reflected in the results. To -// retrieve the latest state of a project, use the -// GetProject method. -func (c *projectsRESTClient) SearchProjects(ctx context.Context, req *resourcemanagerpb.SearchProjectsRequest, opts ...gax.CallOption) *ProjectIterator { - it := &ProjectIterator{} - req = proto.Clone(req).(*resourcemanagerpb.SearchProjectsRequest) - unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} - it.InternalFetch = func(pageSize int, pageToken string) ([]*resourcemanagerpb.Project, string, error) { - resp := &resourcemanagerpb.SearchProjectsResponse{} - if pageToken != "" { - req.PageToken = pageToken - } - if pageSize > math.MaxInt32 { - req.PageSize = math.MaxInt32 - } else if pageSize != 0 { - req.PageSize = int32(pageSize) - } - baseUrl, err := url.Parse(c.endpoint) - if err != nil { - return nil, "", err - } - baseUrl.Path += fmt.Sprintf("/v3/projects:search") - - params := url.Values{} - params.Add("$alt", "json;enum-encoding=int") - if req.GetPageSize() != 0 { - params.Add("pageSize", fmt.Sprintf("%v", req.GetPageSize())) - } - if req.GetPageToken() != "" { - params.Add("pageToken", fmt.Sprintf("%v", req.GetPageToken())) - } - if req.GetQuery() != "" { - params.Add("query", fmt.Sprintf("%v", req.GetQuery())) - } - - baseUrl.RawQuery = params.Encode() - - // Build HTTP headers from client and context metadata. - hds := append(c.xGoogHeaders, "Content-Type", "application/json") - headers := gax.BuildHeaders(ctx, hds...) - e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - if settings.Path != "" { - baseUrl.Path = settings.Path - } - httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) - if err != nil { - return err - } - httpReq.Header = headers - - buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "SearchProjects") - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { - return err - } - - return nil - }, opts...) - if e != nil { - return nil, "", e - } - it.Response = resp - return resp.GetProjects(), resp.GetNextPageToken(), nil - } - - fetch := func(pageSize int, pageToken string) (string, error) { - items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) - if err != nil { - return "", err - } - it.items = append(it.items, items...) - return nextPageToken, nil - } - - it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) - it.pageInfo.MaxSize = int(req.GetPageSize()) - it.pageInfo.Token = req.GetPageToken() - - return it -} - -// CreateProject request that a new project be created. The result is an Operation which -// can be used to track the creation process. This process usually takes a few -// seconds, but can sometimes take much longer. The tracking Operation is -// automatically deleted after a few hours, so there is no need to call -// DeleteOperation. -func (c *projectsRESTClient) CreateProject(ctx context.Context, req *resourcemanagerpb.CreateProjectRequest, opts ...gax.CallOption) (*CreateProjectOperation, error) { - m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} - body := req.GetProject() - jsonReq, err := m.Marshal(body) - if err != nil { - return nil, err - } - - baseUrl, err := url.Parse(c.endpoint) - if err != nil { - return nil, err - } - baseUrl.Path += fmt.Sprintf("/v3/projects") - - params := url.Values{} - params.Add("$alt", "json;enum-encoding=int") - - baseUrl.RawQuery = params.Encode() - - // Build HTTP headers from client and context metadata. - hds := append(c.xGoogHeaders, "Content-Type", "application/json") - headers := gax.BuildHeaders(ctx, hds...) - if gax.IsFeatureEnabled("METRICS") || gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "rpc_method", "google.cloud.resourcemanager.v3.Projects/CreateProject") - ctx = callctx.WithTelemetryContext(ctx, "url_template", "/v3/projects") - } - unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} - resp := &longrunningpb.Operation{} - e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - if settings.Path != "" { - baseUrl.Path = settings.Path - } - httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) - if err != nil { - return err - } - httpReq = httpReq.WithContext(ctx) - httpReq.Header = headers - - buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateProject") - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { - return err - } - - return nil - }, opts...) - if e != nil { - return nil, e - } - - override := fmt.Sprintf("/v3/%s", resp.GetName()) - return &CreateProjectOperation{ - lro: longrunning.InternalNewOperation(*c.LROClient, resp), - pollPath: override, - }, nil -} - -// UpdateProject updates the display_name and labels of the project identified by the -// specified name (for example, projects/415104041262). Deleting all -// labels requires an update mask for labels field. -// -// The caller must have resourcemanager.projects.update permission for this -// project. -func (c *projectsRESTClient) UpdateProject(ctx context.Context, req *resourcemanagerpb.UpdateProjectRequest, opts ...gax.CallOption) (*UpdateProjectOperation, error) { - m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} - body := req.GetProject() - jsonReq, err := m.Marshal(body) - if err != nil { - return nil, err - } - - baseUrl, err := url.Parse(c.endpoint) - if err != nil { - return nil, err - } - baseUrl.Path += fmt.Sprintf("/v3/%v", req.GetProject().GetName()) - - params := url.Values{} - params.Add("$alt", "json;enum-encoding=int") - if req.GetUpdateMask() != nil { - field, err := protojson.Marshal(req.GetUpdateMask()) - if err != nil { - return nil, err - } - params.Add("updateMask", string(field[1:len(field)-1])) - } - - baseUrl.RawQuery = params.Encode() - - // Build HTTP headers from client and context metadata. - hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "project.name", url.QueryEscape(req.GetProject().GetName()))} - - hds = append(c.xGoogHeaders, hds...) - hds = append(hds, "Content-Type", "application/json") - headers := gax.BuildHeaders(ctx, hds...) - if gax.IsFeatureEnabled("METRICS") || gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "rpc_method", "google.cloud.resourcemanager.v3.Projects/UpdateProject") - ctx = callctx.WithTelemetryContext(ctx, "url_template", "/v3/{project.name=projects/*}") - } - unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} - resp := &longrunningpb.Operation{} - e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - if settings.Path != "" { - baseUrl.Path = settings.Path - } - httpReq, err := http.NewRequest("PATCH", baseUrl.String(), bytes.NewReader(jsonReq)) - if err != nil { - return err - } - httpReq = httpReq.WithContext(ctx) - httpReq.Header = headers - - buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateProject") - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { - return err - } - - return nil - }, opts...) - if e != nil { - return nil, e - } - - override := fmt.Sprintf("/v3/%s", resp.GetName()) - return &UpdateProjectOperation{ - lro: longrunning.InternalNewOperation(*c.LROClient, resp), - pollPath: override, - }, nil -} - -// MoveProject move a project to another place in your resource hierarchy, under a new -// resource parent. -// -// Returns an operation which can be used to track the process of the project -// move workflow. -// Upon success, the Operation.response field will be populated with the -// moved project. -// -// The caller must have resourcemanager.projects.move permission on the -// project, on the project’s current and proposed new parent. -// -// If project has no current parent, or it currently does not have an -// associated organization resource, you will also need the -// resourcemanager.projects.setIamPolicy permission in the project. -func (c *projectsRESTClient) MoveProject(ctx context.Context, req *resourcemanagerpb.MoveProjectRequest, opts ...gax.CallOption) (*MoveProjectOperation, error) { - m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} - jsonReq, err := m.Marshal(req) - if err != nil { - return nil, err - } - - baseUrl, err := url.Parse(c.endpoint) - if err != nil { - return nil, err - } - baseUrl.Path += fmt.Sprintf("/v3/%v:move", req.GetName()) - - params := url.Values{} - params.Add("$alt", "json;enum-encoding=int") - - baseUrl.RawQuery = params.Encode() - - // Build HTTP headers from client and context metadata. - hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))} - - hds = append(c.xGoogHeaders, hds...) - hds = append(hds, "Content-Type", "application/json") - headers := gax.BuildHeaders(ctx, hds...) - if gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "resource_name", fmt.Sprintf("//cloudresourcemanager.googleapis.com/%v", req.GetName())) - } - if gax.IsFeatureEnabled("METRICS") || gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "rpc_method", "google.cloud.resourcemanager.v3.Projects/MoveProject") - ctx = callctx.WithTelemetryContext(ctx, "url_template", "/v3/{name=projects/*}:move") - } - unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} - resp := &longrunningpb.Operation{} - e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - if settings.Path != "" { - baseUrl.Path = settings.Path - } - httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) - if err != nil { - return err - } - httpReq = httpReq.WithContext(ctx) - httpReq.Header = headers - - buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "MoveProject") - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { - return err - } - - return nil - }, opts...) - if e != nil { - return nil, e - } - - override := fmt.Sprintf("/v3/%s", resp.GetName()) - return &MoveProjectOperation{ - lro: longrunning.InternalNewOperation(*c.LROClient, resp), - pollPath: override, - }, nil -} - -// DeleteProject marks the project identified by the specified -// name (for example, projects/415104041262) for deletion. -// -// This method will only affect the project if it has a lifecycle state of -// [ACTIVE][google.cloud.resourcemanager.v3.Project.State.ACTIVE (at http://google.cloud.resourcemanager.v3.Project.State.ACTIVE)]. -// -// This method changes the Project’s lifecycle state from -// [ACTIVE][google.cloud.resourcemanager.v3.Project.State.ACTIVE (at http://google.cloud.resourcemanager.v3.Project.State.ACTIVE)] -// to -// DELETE_REQUESTED. -// The deletion starts at an unspecified time, -// at which point the Project is no longer accessible. -// -// Until the deletion completes, you can check the lifecycle state -// checked by retrieving the project with [GetProject] -// [google.cloud.resourcemanager.v3.Projects.GetProject], -// and the project remains visible to [ListProjects] -// [google.cloud.resourcemanager.v3.Projects.ListProjects]. -// However, you cannot update the project. -// -// After the deletion completes, the project is not retrievable by -// the [GetProject] -// [google.cloud.resourcemanager.v3.Projects.GetProject], -// [ListProjects] -// [google.cloud.resourcemanager.v3.Projects.ListProjects], and -// SearchProjects -// methods. -// -// This method behaves idempotently, such that deleting a DELETE_REQUESTED -// project will not cause an error, but also won’t do anything. -// -// The caller must have resourcemanager.projects.delete permissions for this -// project. -func (c *projectsRESTClient) DeleteProject(ctx context.Context, req *resourcemanagerpb.DeleteProjectRequest, opts ...gax.CallOption) (*DeleteProjectOperation, error) { - baseUrl, err := url.Parse(c.endpoint) - if err != nil { - return nil, err - } - baseUrl.Path += fmt.Sprintf("/v3/%v", req.GetName()) - - params := url.Values{} - params.Add("$alt", "json;enum-encoding=int") - - baseUrl.RawQuery = params.Encode() - - // Build HTTP headers from client and context metadata. - hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))} - - hds = append(c.xGoogHeaders, hds...) - hds = append(hds, "Content-Type", "application/json") - headers := gax.BuildHeaders(ctx, hds...) - if gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "resource_name", fmt.Sprintf("//cloudresourcemanager.googleapis.com/%v", req.GetName())) - } - if gax.IsFeatureEnabled("METRICS") || gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "rpc_method", "google.cloud.resourcemanager.v3.Projects/DeleteProject") - ctx = callctx.WithTelemetryContext(ctx, "url_template", "/v3/{name=projects/*}") - } - unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} - resp := &longrunningpb.Operation{} - e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - if settings.Path != "" { - baseUrl.Path = settings.Path - } - httpReq, err := http.NewRequest("DELETE", baseUrl.String(), nil) - if err != nil { - return err - } - httpReq = httpReq.WithContext(ctx) - httpReq.Header = headers - - buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteProject") - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { - return err - } - - return nil - }, opts...) - if e != nil { - return nil, e - } - - override := fmt.Sprintf("/v3/%s", resp.GetName()) - return &DeleteProjectOperation{ - lro: longrunning.InternalNewOperation(*c.LROClient, resp), - pollPath: override, - }, nil -} - -// UndeleteProject restores the project identified by the specified -// name (for example, projects/415104041262). -// You can only use this method for a project that has a lifecycle state of -// [DELETE_REQUESTED] -// [Projects.State.DELETE_REQUESTED]. -// After deletion starts, the project cannot be restored. -// -// The caller must have resourcemanager.projects.undelete permission for -// this project. -func (c *projectsRESTClient) UndeleteProject(ctx context.Context, req *resourcemanagerpb.UndeleteProjectRequest, opts ...gax.CallOption) (*UndeleteProjectOperation, error) { - m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} - jsonReq, err := m.Marshal(req) - if err != nil { - return nil, err - } - - baseUrl, err := url.Parse(c.endpoint) - if err != nil { - return nil, err - } - baseUrl.Path += fmt.Sprintf("/v3/%v:undelete", req.GetName()) - - params := url.Values{} - params.Add("$alt", "json;enum-encoding=int") - - baseUrl.RawQuery = params.Encode() - - // Build HTTP headers from client and context metadata. - hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))} - - hds = append(c.xGoogHeaders, hds...) - hds = append(hds, "Content-Type", "application/json") - headers := gax.BuildHeaders(ctx, hds...) - if gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "resource_name", fmt.Sprintf("//cloudresourcemanager.googleapis.com/%v", req.GetName())) - } - if gax.IsFeatureEnabled("METRICS") || gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "rpc_method", "google.cloud.resourcemanager.v3.Projects/UndeleteProject") - ctx = callctx.WithTelemetryContext(ctx, "url_template", "/v3/{name=projects/*}:undelete") - } - unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} - resp := &longrunningpb.Operation{} - e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - if settings.Path != "" { - baseUrl.Path = settings.Path - } - httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) - if err != nil { - return err - } - httpReq = httpReq.WithContext(ctx) - httpReq.Header = headers - - buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UndeleteProject") - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { - return err - } - - return nil - }, opts...) - if e != nil { - return nil, e - } - - override := fmt.Sprintf("/v3/%s", resp.GetName()) - return &UndeleteProjectOperation{ - lro: longrunning.InternalNewOperation(*c.LROClient, resp), - pollPath: override, - }, nil -} - -// GetIamPolicy returns the IAM access control policy for the specified project, in the -// format projects/{ProjectIdOrNumber} e.g. projects/123. -// Permission is denied if the policy or the resource do not exist. -func (c *projectsRESTClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error) { - m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} - jsonReq, err := m.Marshal(req) - if err != nil { - return nil, err - } - - baseUrl, err := url.Parse(c.endpoint) - if err != nil { - return nil, err - } - baseUrl.Path += fmt.Sprintf("/v3/%v:getIamPolicy", req.GetResource()) - - params := url.Values{} - params.Add("$alt", "json;enum-encoding=int") - - baseUrl.RawQuery = params.Encode() - - // Build HTTP headers from client and context metadata. - hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "resource", url.QueryEscape(req.GetResource()))} - - hds = append(c.xGoogHeaders, hds...) - hds = append(hds, "Content-Type", "application/json") - headers := gax.BuildHeaders(ctx, hds...) - if gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "resource_name", fmt.Sprintf("//cloudresourcemanager.googleapis.com/%v", req.GetResource())) - } - if gax.IsFeatureEnabled("METRICS") || gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "rpc_method", "google.cloud.resourcemanager.v3.Projects/GetIamPolicy") - ctx = callctx.WithTelemetryContext(ctx, "url_template", "/v3/{resource=projects/*}:getIamPolicy") - } - opts = append((*c.CallOptions).GetIamPolicy[0:len((*c.CallOptions).GetIamPolicy):len((*c.CallOptions).GetIamPolicy)], opts...) - unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} - resp := &iampb.Policy{} - e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - if settings.Path != "" { - baseUrl.Path = settings.Path - } - httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) - if err != nil { - return err - } - httpReq = httpReq.WithContext(ctx) - httpReq.Header = headers - - buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "GetIamPolicy") - if err != nil { - return err - } - - if err := unm.Unmarshal(buf, resp); err != nil { - return err - } - - return nil - }, opts...) - if e != nil { - return nil, e - } - return resp, nil -} - -// SetIamPolicy sets the IAM access control policy for the specified project, in the -// format projects/{ProjectIdOrNumber} e.g. projects/123. -// -// CAUTION: This method will replace the existing policy, and cannot be used -// to append additional IAM settings. -// -// Note: Removing service accounts from policies or changing their roles can -// render services completely inoperable. It is important to understand how -// the service account is being used before removing or updating its roles. -// -// The following constraints apply when using setIamPolicy(): -// -// Project does not support allUsers and allAuthenticatedUsers as -// members in a Binding of a Policy. -// -// The owner role can be granted to a user, serviceAccount, or a group -// that is part of an organization. For example, -// group@myownpersonaldomain.com (at mailto:group@myownpersonaldomain.com) could be added as an owner to a project in -// the myownpersonaldomain.com (at http://myownpersonaldomain.com) organization, but not the examplepetstore.com (at http://examplepetstore.com) -// organization. -// -// Service accounts can be made owners of a project directly -// without any restrictions. However, to be added as an owner, a user must be -// invited using the Cloud Platform console and must accept the invitation. -// -// A user cannot be granted the owner role using setIamPolicy(). The user -// must be granted the owner role using the Cloud Platform Console and must -// explicitly accept the invitation. -// -// Invitations to grant the owner role cannot be sent using -// setIamPolicy(); -// they must be sent only using the Cloud Platform Console. -// -// If the project is not part of an organization, there must be at least -// one owner who has accepted the Terms of Service (ToS) agreement in the -// policy. Calling setIamPolicy() to remove the last ToS-accepted owner -// from the policy will fail. This restriction also applies to legacy -// projects that no longer have owners who have accepted the ToS. Edits to -// IAM policies will be rejected until the lack of a ToS-accepting owner is -// rectified. If the project is part of an organization, you can remove all -// owners, potentially making the organization inaccessible. -func (c *projectsRESTClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error) { - m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} - jsonReq, err := m.Marshal(req) - if err != nil { - return nil, err - } - - baseUrl, err := url.Parse(c.endpoint) - if err != nil { - return nil, err - } - baseUrl.Path += fmt.Sprintf("/v3/%v:setIamPolicy", req.GetResource()) - - params := url.Values{} - params.Add("$alt", "json;enum-encoding=int") - - baseUrl.RawQuery = params.Encode() - - // Build HTTP headers from client and context metadata. - hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "resource", url.QueryEscape(req.GetResource()))} - - hds = append(c.xGoogHeaders, hds...) - hds = append(hds, "Content-Type", "application/json") - headers := gax.BuildHeaders(ctx, hds...) - if gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "resource_name", fmt.Sprintf("//cloudresourcemanager.googleapis.com/%v", req.GetResource())) - } - if gax.IsFeatureEnabled("METRICS") || gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "rpc_method", "google.cloud.resourcemanager.v3.Projects/SetIamPolicy") - ctx = callctx.WithTelemetryContext(ctx, "url_template", "/v3/{resource=projects/*}:setIamPolicy") - } - opts = append((*c.CallOptions).SetIamPolicy[0:len((*c.CallOptions).SetIamPolicy):len((*c.CallOptions).SetIamPolicy)], opts...) - unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} - resp := &iampb.Policy{} - e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - if settings.Path != "" { - baseUrl.Path = settings.Path - } - httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) - if err != nil { - return err - } - httpReq = httpReq.WithContext(ctx) - httpReq.Header = headers - - buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetIamPolicy") - if err != nil { - return err - } - - if err := unm.Unmarshal(buf, resp); err != nil { - return err - } - - return nil - }, opts...) - if e != nil { - return nil, e - } - return resp, nil -} - -// TestIamPermissions returns permissions that a caller has on the specified project, in the -// format projects/{ProjectIdOrNumber} e.g. projects/123… -func (c *projectsRESTClient) TestIamPermissions(ctx context.Context, req *iampb.TestIamPermissionsRequest, opts ...gax.CallOption) (*iampb.TestIamPermissionsResponse, error) { - m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} - jsonReq, err := m.Marshal(req) - if err != nil { - return nil, err - } - - baseUrl, err := url.Parse(c.endpoint) - if err != nil { - return nil, err - } - baseUrl.Path += fmt.Sprintf("/v3/%v:testIamPermissions", req.GetResource()) - - params := url.Values{} - params.Add("$alt", "json;enum-encoding=int") - - baseUrl.RawQuery = params.Encode() - - // Build HTTP headers from client and context metadata. - hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "resource", url.QueryEscape(req.GetResource()))} - - hds = append(c.xGoogHeaders, hds...) - hds = append(hds, "Content-Type", "application/json") - headers := gax.BuildHeaders(ctx, hds...) - if gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "resource_name", fmt.Sprintf("//cloudresourcemanager.googleapis.com/%v", req.GetResource())) - } - if gax.IsFeatureEnabled("METRICS") || gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "rpc_method", "google.cloud.resourcemanager.v3.Projects/TestIamPermissions") - ctx = callctx.WithTelemetryContext(ctx, "url_template", "/v3/{resource=projects/*}:testIamPermissions") - } - opts = append((*c.CallOptions).TestIamPermissions[0:len((*c.CallOptions).TestIamPermissions):len((*c.CallOptions).TestIamPermissions)], opts...) - unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} - resp := &iampb.TestIamPermissionsResponse{} - e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - if settings.Path != "" { - baseUrl.Path = settings.Path - } - httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) - if err != nil { - return err - } - httpReq = httpReq.WithContext(ctx) - httpReq.Header = headers - - buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "TestIamPermissions") - if err != nil { - return err - } - - if err := unm.Unmarshal(buf, resp); err != nil { - return err - } - - return nil - }, opts...) - if e != nil { - return nil, e - } - return resp, nil -} - -// GetOperation is a utility method from google.longrunning.Operations. -func (c *projectsRESTClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { - baseUrl, err := url.Parse(c.endpoint) - if err != nil { - return nil, err - } - baseUrl.Path += fmt.Sprintf("/v3/%v", req.GetName()) - - params := url.Values{} - params.Add("$alt", "json;enum-encoding=int") - - baseUrl.RawQuery = params.Encode() - - // Build HTTP headers from client and context metadata. - hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))} - - hds = append(c.xGoogHeaders, hds...) - hds = append(hds, "Content-Type", "application/json") - headers := gax.BuildHeaders(ctx, hds...) - if gax.IsFeatureEnabled("METRICS") || gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "rpc_method", "google.longrunning.Operations/GetOperation") - ctx = callctx.WithTelemetryContext(ctx, "url_template", "/v3/{name=operations/**}") - } - opts = append((*c.CallOptions).GetOperation[0:len((*c.CallOptions).GetOperation):len((*c.CallOptions).GetOperation)], opts...) - unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} - resp := &longrunningpb.Operation{} - e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - if settings.Path != "" { - baseUrl.Path = settings.Path - } - httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) - if err != nil { - return err - } - httpReq = httpReq.WithContext(ctx) - httpReq.Header = headers - - buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") - if err != nil { - return err - } - - if err := unm.Unmarshal(buf, resp); err != nil { - return err - } - - return nil - }, opts...) - if e != nil { - return nil, e - } - return resp, nil -} - -// CreateProjectOperation returns a new CreateProjectOperation from a given name. -// The name must be that of a previously created CreateProjectOperation, possibly from a different process. -func (c *projectsGRPCClient) CreateProjectOperation(name string) *CreateProjectOperation { - return &CreateProjectOperation{ - lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), - } -} - -// CreateProjectOperation returns a new CreateProjectOperation from a given name. -// The name must be that of a previously created CreateProjectOperation, possibly from a different process. -func (c *projectsRESTClient) CreateProjectOperation(name string) *CreateProjectOperation { - override := fmt.Sprintf("/v3/%s", name) - return &CreateProjectOperation{ - lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), - pollPath: override, - } -} - -// DeleteProjectOperation returns a new DeleteProjectOperation from a given name. -// The name must be that of a previously created DeleteProjectOperation, possibly from a different process. -func (c *projectsGRPCClient) DeleteProjectOperation(name string) *DeleteProjectOperation { - return &DeleteProjectOperation{ - lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), - } -} - -// DeleteProjectOperation returns a new DeleteProjectOperation from a given name. -// The name must be that of a previously created DeleteProjectOperation, possibly from a different process. -func (c *projectsRESTClient) DeleteProjectOperation(name string) *DeleteProjectOperation { - override := fmt.Sprintf("/v3/%s", name) - return &DeleteProjectOperation{ - lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), - pollPath: override, - } -} - -// MoveProjectOperation returns a new MoveProjectOperation from a given name. -// The name must be that of a previously created MoveProjectOperation, possibly from a different process. -func (c *projectsGRPCClient) MoveProjectOperation(name string) *MoveProjectOperation { - return &MoveProjectOperation{ - lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), - } -} - -// MoveProjectOperation returns a new MoveProjectOperation from a given name. -// The name must be that of a previously created MoveProjectOperation, possibly from a different process. -func (c *projectsRESTClient) MoveProjectOperation(name string) *MoveProjectOperation { - override := fmt.Sprintf("/v3/%s", name) - return &MoveProjectOperation{ - lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), - pollPath: override, - } -} - -// UndeleteProjectOperation returns a new UndeleteProjectOperation from a given name. -// The name must be that of a previously created UndeleteProjectOperation, possibly from a different process. -func (c *projectsGRPCClient) UndeleteProjectOperation(name string) *UndeleteProjectOperation { - return &UndeleteProjectOperation{ - lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), - } -} - -// UndeleteProjectOperation returns a new UndeleteProjectOperation from a given name. -// The name must be that of a previously created UndeleteProjectOperation, possibly from a different process. -func (c *projectsRESTClient) UndeleteProjectOperation(name string) *UndeleteProjectOperation { - override := fmt.Sprintf("/v3/%s", name) - return &UndeleteProjectOperation{ - lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), - pollPath: override, - } -} - -// UpdateProjectOperation returns a new UpdateProjectOperation from a given name. -// The name must be that of a previously created UpdateProjectOperation, possibly from a different process. -func (c *projectsGRPCClient) UpdateProjectOperation(name string) *UpdateProjectOperation { - return &UpdateProjectOperation{ - lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), - } -} - -// UpdateProjectOperation returns a new UpdateProjectOperation from a given name. -// The name must be that of a previously created UpdateProjectOperation, possibly from a different process. -func (c *projectsRESTClient) UpdateProjectOperation(name string) *UpdateProjectOperation { - override := fmt.Sprintf("/v3/%s", name) - return &UpdateProjectOperation{ - lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), - pollPath: override, - } -} diff --git a/vendor/cloud.google.com/go/resourcemanager/apiv3/resourcemanagerpb/folders.pb.go b/vendor/cloud.google.com/go/resourcemanager/apiv3/resourcemanagerpb/folders.pb.go deleted file mode 100644 index 257d8f2e2c..0000000000 --- a/vendor/cloud.google.com/go/resourcemanager/apiv3/resourcemanagerpb/folders.pb.go +++ /dev/null @@ -1,1254 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.36.11 -// protoc v6.31.0 -// source: google/cloud/resourcemanager/v3/folders.proto - -package resourcemanagerpb - -import ( - reflect "reflect" - sync "sync" - unsafe "unsafe" - - iampb "cloud.google.com/go/iam/apiv1/iampb" - longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" - _ "google.golang.org/genproto/googleapis/api/annotations" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - fieldmaskpb "google.golang.org/protobuf/types/known/fieldmaskpb" - timestamppb "google.golang.org/protobuf/types/known/timestamppb" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// Folder lifecycle states. -type Folder_State int32 - -const ( - // Unspecified state. - Folder_STATE_UNSPECIFIED Folder_State = 0 - // The normal and active state. - Folder_ACTIVE Folder_State = 1 - // The folder has been marked for deletion by the user. - Folder_DELETE_REQUESTED Folder_State = 2 -) - -// Enum value maps for Folder_State. -var ( - Folder_State_name = map[int32]string{ - 0: "STATE_UNSPECIFIED", - 1: "ACTIVE", - 2: "DELETE_REQUESTED", - } - Folder_State_value = map[string]int32{ - "STATE_UNSPECIFIED": 0, - "ACTIVE": 1, - "DELETE_REQUESTED": 2, - } -) - -func (x Folder_State) Enum() *Folder_State { - p := new(Folder_State) - *p = x - return p -} - -func (x Folder_State) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (Folder_State) Descriptor() protoreflect.EnumDescriptor { - return file_google_cloud_resourcemanager_v3_folders_proto_enumTypes[0].Descriptor() -} - -func (Folder_State) Type() protoreflect.EnumType { - return &file_google_cloud_resourcemanager_v3_folders_proto_enumTypes[0] -} - -func (x Folder_State) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use Folder_State.Descriptor instead. -func (Folder_State) EnumDescriptor() ([]byte, []int) { - return file_google_cloud_resourcemanager_v3_folders_proto_rawDescGZIP(), []int{0, 0} -} - -// A folder in an organization's resource hierarchy, used to -// organize that organization's resources. -type Folder struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Output only. The resource name of the folder. - // Its format is `folders/{folder_id}`, for example: "folders/1234". - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // Required. The folder's parent's resource name. - // Updates to the folder's parent must be performed using - // [MoveFolder][google.cloud.resourcemanager.v3.Folders.MoveFolder]. - Parent string `protobuf:"bytes,2,opt,name=parent,proto3" json:"parent,omitempty"` - // The folder's display name. - // A folder's display name must be unique amongst its siblings. For example, - // no two folders with the same parent can share the same display name. - // The display name must start and end with a letter or digit, may contain - // letters, digits, spaces, hyphens and underscores and can be no longer - // than 30 characters. This is captured by the regular expression: - // `[\p{L}\p{N}]([\p{L}\p{N}_- ]{0,28}[\p{L}\p{N}])?`. - DisplayName string `protobuf:"bytes,3,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"` - // Output only. The lifecycle state of the folder. - // Updates to the state must be performed using - // [DeleteFolder][google.cloud.resourcemanager.v3.Folders.DeleteFolder] and - // [UndeleteFolder][google.cloud.resourcemanager.v3.Folders.UndeleteFolder]. - State Folder_State `protobuf:"varint,4,opt,name=state,proto3,enum=google.cloud.resourcemanager.v3.Folder_State" json:"state,omitempty"` - // Output only. Timestamp when the folder was created. - CreateTime *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"` - // Output only. Timestamp when the folder was last modified. - UpdateTime *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=update_time,json=updateTime,proto3" json:"update_time,omitempty"` - // Output only. Timestamp when the folder was requested to be deleted. - DeleteTime *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=delete_time,json=deleteTime,proto3" json:"delete_time,omitempty"` - // Output only. A checksum computed by the server based on the current value - // of the folder resource. This may be sent on update and delete requests to - // ensure the client has an up-to-date value before proceeding. - Etag string `protobuf:"bytes,8,opt,name=etag,proto3" json:"etag,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *Folder) Reset() { - *x = Folder{} - mi := &file_google_cloud_resourcemanager_v3_folders_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *Folder) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Folder) ProtoMessage() {} - -func (x *Folder) ProtoReflect() protoreflect.Message { - mi := &file_google_cloud_resourcemanager_v3_folders_proto_msgTypes[0] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Folder.ProtoReflect.Descriptor instead. -func (*Folder) Descriptor() ([]byte, []int) { - return file_google_cloud_resourcemanager_v3_folders_proto_rawDescGZIP(), []int{0} -} - -func (x *Folder) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *Folder) GetParent() string { - if x != nil { - return x.Parent - } - return "" -} - -func (x *Folder) GetDisplayName() string { - if x != nil { - return x.DisplayName - } - return "" -} - -func (x *Folder) GetState() Folder_State { - if x != nil { - return x.State - } - return Folder_STATE_UNSPECIFIED -} - -func (x *Folder) GetCreateTime() *timestamppb.Timestamp { - if x != nil { - return x.CreateTime - } - return nil -} - -func (x *Folder) GetUpdateTime() *timestamppb.Timestamp { - if x != nil { - return x.UpdateTime - } - return nil -} - -func (x *Folder) GetDeleteTime() *timestamppb.Timestamp { - if x != nil { - return x.DeleteTime - } - return nil -} - -func (x *Folder) GetEtag() string { - if x != nil { - return x.Etag - } - return "" -} - -// The GetFolder request message. -type GetFolderRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Required. The resource name of the folder to retrieve. - // Must be of the form `folders/{folder_id}`. - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *GetFolderRequest) Reset() { - *x = GetFolderRequest{} - mi := &file_google_cloud_resourcemanager_v3_folders_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *GetFolderRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetFolderRequest) ProtoMessage() {} - -func (x *GetFolderRequest) ProtoReflect() protoreflect.Message { - mi := &file_google_cloud_resourcemanager_v3_folders_proto_msgTypes[1] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetFolderRequest.ProtoReflect.Descriptor instead. -func (*GetFolderRequest) Descriptor() ([]byte, []int) { - return file_google_cloud_resourcemanager_v3_folders_proto_rawDescGZIP(), []int{1} -} - -func (x *GetFolderRequest) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -// The ListFolders request message. -type ListFoldersRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Required. The name of the parent resource whose folders are being listed. - // Only children of this parent resource are listed; descendants are not - // listed. - // - // If the parent is a folder, use the value `folders/{folder_id}`. If the - // parent is an organization, use the value `organizations/{org_id}`. - // - // Access to this method is controlled by checking the - // `resourcemanager.folders.list` permission on the `parent`. - Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` - // Optional. The maximum number of folders to return in the response. The - // server can return fewer folders than requested. If unspecified, server - // picks an appropriate default. - PageSize int32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` - // Optional. A pagination token returned from a previous call to `ListFolders` - // that indicates where this listing should continue from. - PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` - // Optional. Controls whether folders in the - // [DELETE_REQUESTED][google.cloud.resourcemanager.v3.Folder.State.DELETE_REQUESTED] - // state should be returned. Defaults to false. - ShowDeleted bool `protobuf:"varint,4,opt,name=show_deleted,json=showDeleted,proto3" json:"show_deleted,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ListFoldersRequest) Reset() { - *x = ListFoldersRequest{} - mi := &file_google_cloud_resourcemanager_v3_folders_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ListFoldersRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListFoldersRequest) ProtoMessage() {} - -func (x *ListFoldersRequest) ProtoReflect() protoreflect.Message { - mi := &file_google_cloud_resourcemanager_v3_folders_proto_msgTypes[2] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ListFoldersRequest.ProtoReflect.Descriptor instead. -func (*ListFoldersRequest) Descriptor() ([]byte, []int) { - return file_google_cloud_resourcemanager_v3_folders_proto_rawDescGZIP(), []int{2} -} - -func (x *ListFoldersRequest) GetParent() string { - if x != nil { - return x.Parent - } - return "" -} - -func (x *ListFoldersRequest) GetPageSize() int32 { - if x != nil { - return x.PageSize - } - return 0 -} - -func (x *ListFoldersRequest) GetPageToken() string { - if x != nil { - return x.PageToken - } - return "" -} - -func (x *ListFoldersRequest) GetShowDeleted() bool { - if x != nil { - return x.ShowDeleted - } - return false -} - -// The ListFolders response message. -type ListFoldersResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - // A possibly paginated list of folders that are direct descendants of - // the specified parent resource. - Folders []*Folder `protobuf:"bytes,1,rep,name=folders,proto3" json:"folders,omitempty"` - // A pagination token returned from a previous call to `ListFolders` - // that indicates from where listing should continue. - NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ListFoldersResponse) Reset() { - *x = ListFoldersResponse{} - mi := &file_google_cloud_resourcemanager_v3_folders_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ListFoldersResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListFoldersResponse) ProtoMessage() {} - -func (x *ListFoldersResponse) ProtoReflect() protoreflect.Message { - mi := &file_google_cloud_resourcemanager_v3_folders_proto_msgTypes[3] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ListFoldersResponse.ProtoReflect.Descriptor instead. -func (*ListFoldersResponse) Descriptor() ([]byte, []int) { - return file_google_cloud_resourcemanager_v3_folders_proto_rawDescGZIP(), []int{3} -} - -func (x *ListFoldersResponse) GetFolders() []*Folder { - if x != nil { - return x.Folders - } - return nil -} - -func (x *ListFoldersResponse) GetNextPageToken() string { - if x != nil { - return x.NextPageToken - } - return "" -} - -// The request message for searching folders. -type SearchFoldersRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Optional. The maximum number of folders to return in the response. The - // server can return fewer folders than requested. If unspecified, server - // picks an appropriate default. - PageSize int32 `protobuf:"varint,1,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` - // Optional. A pagination token returned from a previous call to - // `SearchFolders` that indicates from where search should continue. - PageToken string `protobuf:"bytes,2,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` - // Optional. Search criteria used to select the folders to return. - // If no search criteria is specified then all accessible folders will be - // returned. - // - // Query expressions can be used to restrict results based upon displayName, - // state and parent, where the operators `=` (`:`) `NOT`, `AND` and `OR` - // can be used along with the suffix wildcard symbol `*`. - // - // The `displayName` field in a query expression should use escaped quotes - // for values that include whitespace to prevent unexpected behavior. - // - // ``` - // | Field | Description | - // |-------------------------|----------------------------------------| - // | displayName | Filters by displayName. | - // | parent | Filters by parent (for example: folders/123). | - // | state, lifecycleState | Filters by state. | - // ``` - // - // Some example queries are: - // - // * Query `displayName=Test*` returns Folder resources whose display name - // starts with "Test". - // * Query `state=ACTIVE` returns Folder resources with - // `state` set to `ACTIVE`. - // * Query `parent=folders/123` returns Folder resources that have - // `folders/123` as a parent resource. - // * Query `parent=folders/123 AND state=ACTIVE` returns active - // Folder resources that have `folders/123` as a parent resource. - // * Query `displayName=\\"Test String\\"` returns Folder resources with - // display names that include both "Test" and "String". - Query string `protobuf:"bytes,3,opt,name=query,proto3" json:"query,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *SearchFoldersRequest) Reset() { - *x = SearchFoldersRequest{} - mi := &file_google_cloud_resourcemanager_v3_folders_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *SearchFoldersRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SearchFoldersRequest) ProtoMessage() {} - -func (x *SearchFoldersRequest) ProtoReflect() protoreflect.Message { - mi := &file_google_cloud_resourcemanager_v3_folders_proto_msgTypes[4] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SearchFoldersRequest.ProtoReflect.Descriptor instead. -func (*SearchFoldersRequest) Descriptor() ([]byte, []int) { - return file_google_cloud_resourcemanager_v3_folders_proto_rawDescGZIP(), []int{4} -} - -func (x *SearchFoldersRequest) GetPageSize() int32 { - if x != nil { - return x.PageSize - } - return 0 -} - -func (x *SearchFoldersRequest) GetPageToken() string { - if x != nil { - return x.PageToken - } - return "" -} - -func (x *SearchFoldersRequest) GetQuery() string { - if x != nil { - return x.Query - } - return "" -} - -// The response message for searching folders. -type SearchFoldersResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - // A possibly paginated folder search results. - // the specified parent resource. - Folders []*Folder `protobuf:"bytes,1,rep,name=folders,proto3" json:"folders,omitempty"` - // A pagination token returned from a previous call to `SearchFolders` - // that indicates from where searching should continue. - NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *SearchFoldersResponse) Reset() { - *x = SearchFoldersResponse{} - mi := &file_google_cloud_resourcemanager_v3_folders_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *SearchFoldersResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SearchFoldersResponse) ProtoMessage() {} - -func (x *SearchFoldersResponse) ProtoReflect() protoreflect.Message { - mi := &file_google_cloud_resourcemanager_v3_folders_proto_msgTypes[5] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SearchFoldersResponse.ProtoReflect.Descriptor instead. -func (*SearchFoldersResponse) Descriptor() ([]byte, []int) { - return file_google_cloud_resourcemanager_v3_folders_proto_rawDescGZIP(), []int{5} -} - -func (x *SearchFoldersResponse) GetFolders() []*Folder { - if x != nil { - return x.Folders - } - return nil -} - -func (x *SearchFoldersResponse) GetNextPageToken() string { - if x != nil { - return x.NextPageToken - } - return "" -} - -// The CreateFolder request message. -type CreateFolderRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Required. The folder being created, only the display name and parent will - // be consulted. All other fields will be ignored. - Folder *Folder `protobuf:"bytes,2,opt,name=folder,proto3" json:"folder,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *CreateFolderRequest) Reset() { - *x = CreateFolderRequest{} - mi := &file_google_cloud_resourcemanager_v3_folders_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *CreateFolderRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CreateFolderRequest) ProtoMessage() {} - -func (x *CreateFolderRequest) ProtoReflect() protoreflect.Message { - mi := &file_google_cloud_resourcemanager_v3_folders_proto_msgTypes[6] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CreateFolderRequest.ProtoReflect.Descriptor instead. -func (*CreateFolderRequest) Descriptor() ([]byte, []int) { - return file_google_cloud_resourcemanager_v3_folders_proto_rawDescGZIP(), []int{6} -} - -func (x *CreateFolderRequest) GetFolder() *Folder { - if x != nil { - return x.Folder - } - return nil -} - -// Metadata pertaining to the Folder creation process. -type CreateFolderMetadata struct { - state protoimpl.MessageState `protogen:"open.v1"` - // The display name of the folder. - DisplayName string `protobuf:"bytes,1,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"` - // The resource name of the folder or organization we are creating the folder - // under. - Parent string `protobuf:"bytes,2,opt,name=parent,proto3" json:"parent,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *CreateFolderMetadata) Reset() { - *x = CreateFolderMetadata{} - mi := &file_google_cloud_resourcemanager_v3_folders_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *CreateFolderMetadata) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CreateFolderMetadata) ProtoMessage() {} - -func (x *CreateFolderMetadata) ProtoReflect() protoreflect.Message { - mi := &file_google_cloud_resourcemanager_v3_folders_proto_msgTypes[7] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CreateFolderMetadata.ProtoReflect.Descriptor instead. -func (*CreateFolderMetadata) Descriptor() ([]byte, []int) { - return file_google_cloud_resourcemanager_v3_folders_proto_rawDescGZIP(), []int{7} -} - -func (x *CreateFolderMetadata) GetDisplayName() string { - if x != nil { - return x.DisplayName - } - return "" -} - -func (x *CreateFolderMetadata) GetParent() string { - if x != nil { - return x.Parent - } - return "" -} - -// The request sent to the -// [UpdateFolder][google.cloud.resourcemanager.v3.Folder.UpdateFolder] -// method. -// -// Only the `display_name` field can be changed. All other fields will be -// ignored. Use the -// [MoveFolder][google.cloud.resourcemanager.v3.Folders.MoveFolder] method to -// change the `parent` field. -type UpdateFolderRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Required. The new definition of the Folder. It must include the `name` - // field, which cannot be changed. - Folder *Folder `protobuf:"bytes,1,opt,name=folder,proto3" json:"folder,omitempty"` - // Required. Fields to be updated. - // Only the `display_name` can be updated. - UpdateMask *fieldmaskpb.FieldMask `protobuf:"bytes,2,opt,name=update_mask,json=updateMask,proto3" json:"update_mask,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *UpdateFolderRequest) Reset() { - *x = UpdateFolderRequest{} - mi := &file_google_cloud_resourcemanager_v3_folders_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *UpdateFolderRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UpdateFolderRequest) ProtoMessage() {} - -func (x *UpdateFolderRequest) ProtoReflect() protoreflect.Message { - mi := &file_google_cloud_resourcemanager_v3_folders_proto_msgTypes[8] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use UpdateFolderRequest.ProtoReflect.Descriptor instead. -func (*UpdateFolderRequest) Descriptor() ([]byte, []int) { - return file_google_cloud_resourcemanager_v3_folders_proto_rawDescGZIP(), []int{8} -} - -func (x *UpdateFolderRequest) GetFolder() *Folder { - if x != nil { - return x.Folder - } - return nil -} - -func (x *UpdateFolderRequest) GetUpdateMask() *fieldmaskpb.FieldMask { - if x != nil { - return x.UpdateMask - } - return nil -} - -// A status object which is used as the `metadata` field for the Operation -// returned by UpdateFolder. -type UpdateFolderMetadata struct { - state protoimpl.MessageState `protogen:"open.v1"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *UpdateFolderMetadata) Reset() { - *x = UpdateFolderMetadata{} - mi := &file_google_cloud_resourcemanager_v3_folders_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *UpdateFolderMetadata) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UpdateFolderMetadata) ProtoMessage() {} - -func (x *UpdateFolderMetadata) ProtoReflect() protoreflect.Message { - mi := &file_google_cloud_resourcemanager_v3_folders_proto_msgTypes[9] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use UpdateFolderMetadata.ProtoReflect.Descriptor instead. -func (*UpdateFolderMetadata) Descriptor() ([]byte, []int) { - return file_google_cloud_resourcemanager_v3_folders_proto_rawDescGZIP(), []int{9} -} - -// The MoveFolder request message. -type MoveFolderRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Required. The resource name of the Folder to move. - // Must be of the form folders/{folder_id} - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // Required. The resource name of the folder or organization which should be - // the folder's new parent. Must be of the form `folders/{folder_id}` or - // `organizations/{org_id}`. - DestinationParent string `protobuf:"bytes,2,opt,name=destination_parent,json=destinationParent,proto3" json:"destination_parent,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *MoveFolderRequest) Reset() { - *x = MoveFolderRequest{} - mi := &file_google_cloud_resourcemanager_v3_folders_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *MoveFolderRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MoveFolderRequest) ProtoMessage() {} - -func (x *MoveFolderRequest) ProtoReflect() protoreflect.Message { - mi := &file_google_cloud_resourcemanager_v3_folders_proto_msgTypes[10] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use MoveFolderRequest.ProtoReflect.Descriptor instead. -func (*MoveFolderRequest) Descriptor() ([]byte, []int) { - return file_google_cloud_resourcemanager_v3_folders_proto_rawDescGZIP(), []int{10} -} - -func (x *MoveFolderRequest) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *MoveFolderRequest) GetDestinationParent() string { - if x != nil { - return x.DestinationParent - } - return "" -} - -// Metadata pertaining to the folder move process. -type MoveFolderMetadata struct { - state protoimpl.MessageState `protogen:"open.v1"` - // The display name of the folder. - DisplayName string `protobuf:"bytes,1,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"` - // The resource name of the folder's parent. - SourceParent string `protobuf:"bytes,2,opt,name=source_parent,json=sourceParent,proto3" json:"source_parent,omitempty"` - // The resource name of the folder or organization to move the folder to. - DestinationParent string `protobuf:"bytes,3,opt,name=destination_parent,json=destinationParent,proto3" json:"destination_parent,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *MoveFolderMetadata) Reset() { - *x = MoveFolderMetadata{} - mi := &file_google_cloud_resourcemanager_v3_folders_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *MoveFolderMetadata) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MoveFolderMetadata) ProtoMessage() {} - -func (x *MoveFolderMetadata) ProtoReflect() protoreflect.Message { - mi := &file_google_cloud_resourcemanager_v3_folders_proto_msgTypes[11] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use MoveFolderMetadata.ProtoReflect.Descriptor instead. -func (*MoveFolderMetadata) Descriptor() ([]byte, []int) { - return file_google_cloud_resourcemanager_v3_folders_proto_rawDescGZIP(), []int{11} -} - -func (x *MoveFolderMetadata) GetDisplayName() string { - if x != nil { - return x.DisplayName - } - return "" -} - -func (x *MoveFolderMetadata) GetSourceParent() string { - if x != nil { - return x.SourceParent - } - return "" -} - -func (x *MoveFolderMetadata) GetDestinationParent() string { - if x != nil { - return x.DestinationParent - } - return "" -} - -// The DeleteFolder request message. -type DeleteFolderRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Required. The resource name of the folder to be deleted. - // Must be of the form `folders/{folder_id}`. - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *DeleteFolderRequest) Reset() { - *x = DeleteFolderRequest{} - mi := &file_google_cloud_resourcemanager_v3_folders_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *DeleteFolderRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DeleteFolderRequest) ProtoMessage() {} - -func (x *DeleteFolderRequest) ProtoReflect() protoreflect.Message { - mi := &file_google_cloud_resourcemanager_v3_folders_proto_msgTypes[12] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DeleteFolderRequest.ProtoReflect.Descriptor instead. -func (*DeleteFolderRequest) Descriptor() ([]byte, []int) { - return file_google_cloud_resourcemanager_v3_folders_proto_rawDescGZIP(), []int{12} -} - -func (x *DeleteFolderRequest) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -// A status object which is used as the `metadata` field for the `Operation` -// returned by `DeleteFolder`. -type DeleteFolderMetadata struct { - state protoimpl.MessageState `protogen:"open.v1"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *DeleteFolderMetadata) Reset() { - *x = DeleteFolderMetadata{} - mi := &file_google_cloud_resourcemanager_v3_folders_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *DeleteFolderMetadata) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DeleteFolderMetadata) ProtoMessage() {} - -func (x *DeleteFolderMetadata) ProtoReflect() protoreflect.Message { - mi := &file_google_cloud_resourcemanager_v3_folders_proto_msgTypes[13] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DeleteFolderMetadata.ProtoReflect.Descriptor instead. -func (*DeleteFolderMetadata) Descriptor() ([]byte, []int) { - return file_google_cloud_resourcemanager_v3_folders_proto_rawDescGZIP(), []int{13} -} - -// The UndeleteFolder request message. -type UndeleteFolderRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Required. The resource name of the folder to undelete. - // Must be of the form `folders/{folder_id}`. - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *UndeleteFolderRequest) Reset() { - *x = UndeleteFolderRequest{} - mi := &file_google_cloud_resourcemanager_v3_folders_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *UndeleteFolderRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UndeleteFolderRequest) ProtoMessage() {} - -func (x *UndeleteFolderRequest) ProtoReflect() protoreflect.Message { - mi := &file_google_cloud_resourcemanager_v3_folders_proto_msgTypes[14] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use UndeleteFolderRequest.ProtoReflect.Descriptor instead. -func (*UndeleteFolderRequest) Descriptor() ([]byte, []int) { - return file_google_cloud_resourcemanager_v3_folders_proto_rawDescGZIP(), []int{14} -} - -func (x *UndeleteFolderRequest) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -// A status object which is used as the `metadata` field for the `Operation` -// returned by `UndeleteFolder`. -type UndeleteFolderMetadata struct { - state protoimpl.MessageState `protogen:"open.v1"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *UndeleteFolderMetadata) Reset() { - *x = UndeleteFolderMetadata{} - mi := &file_google_cloud_resourcemanager_v3_folders_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *UndeleteFolderMetadata) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UndeleteFolderMetadata) ProtoMessage() {} - -func (x *UndeleteFolderMetadata) ProtoReflect() protoreflect.Message { - mi := &file_google_cloud_resourcemanager_v3_folders_proto_msgTypes[15] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use UndeleteFolderMetadata.ProtoReflect.Descriptor instead. -func (*UndeleteFolderMetadata) Descriptor() ([]byte, []int) { - return file_google_cloud_resourcemanager_v3_folders_proto_rawDescGZIP(), []int{15} -} - -var File_google_cloud_resourcemanager_v3_folders_proto protoreflect.FileDescriptor - -const file_google_cloud_resourcemanager_v3_folders_proto_rawDesc = "" + - "\n" + - "-google/cloud/resourcemanager/v3/folders.proto\x12\x1fgoogle.cloud.resourcemanager.v3\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1egoogle/iam/v1/iam_policy.proto\x1a\x1agoogle/iam/v1/policy.proto\x1a#google/longrunning/operations.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x92\x04\n" + - "\x06Folder\x12\x17\n" + - "\x04name\x18\x01 \x01(\tB\x03\xe0A\x03R\x04name\x12\x1b\n" + - "\x06parent\x18\x02 \x01(\tB\x03\xe0A\x02R\x06parent\x12!\n" + - "\fdisplay_name\x18\x03 \x01(\tR\vdisplayName\x12H\n" + - "\x05state\x18\x04 \x01(\x0e2-.google.cloud.resourcemanager.v3.Folder.StateB\x03\xe0A\x03R\x05state\x12@\n" + - "\vcreate_time\x18\x05 \x01(\v2\x1a.google.protobuf.TimestampB\x03\xe0A\x03R\n" + - "createTime\x12@\n" + - "\vupdate_time\x18\x06 \x01(\v2\x1a.google.protobuf.TimestampB\x03\xe0A\x03R\n" + - "updateTime\x12@\n" + - "\vdelete_time\x18\a \x01(\v2\x1a.google.protobuf.TimestampB\x03\xe0A\x03R\n" + - "deleteTime\x12\x17\n" + - "\x04etag\x18\b \x01(\tB\x03\xe0A\x03R\x04etag\"@\n" + - "\x05State\x12\x15\n" + - "\x11STATE_UNSPECIFIED\x10\x00\x12\n" + - "\n" + - "\x06ACTIVE\x10\x01\x12\x14\n" + - "\x10DELETE_REQUESTED\x10\x02:D\xeaAA\n" + - "*cloudresourcemanager.googleapis.com/Folder\x12\x10folders/{folder}R\x01\x01\"Z\n" + - "\x10GetFolderRequest\x12F\n" + - "\x04name\x18\x01 \x01(\tB2\xe0A\x02\xfaA,\n" + - "*cloudresourcemanager.googleapis.com/FolderR\x04name\"\xa5\x01\n" + - "\x12ListFoldersRequest\x12!\n" + - "\x06parent\x18\x01 \x01(\tB\t\xe0A\x02\xfaA\x03\x12\x01*R\x06parent\x12 \n" + - "\tpage_size\x18\x02 \x01(\x05B\x03\xe0A\x01R\bpageSize\x12\"\n" + - "\n" + - "page_token\x18\x03 \x01(\tB\x03\xe0A\x01R\tpageToken\x12&\n" + - "\fshow_deleted\x18\x04 \x01(\bB\x03\xe0A\x01R\vshowDeleted\"\x80\x01\n" + - "\x13ListFoldersResponse\x12A\n" + - "\afolders\x18\x01 \x03(\v2'.google.cloud.resourcemanager.v3.FolderR\afolders\x12&\n" + - "\x0fnext_page_token\x18\x02 \x01(\tR\rnextPageToken\"w\n" + - "\x14SearchFoldersRequest\x12 \n" + - "\tpage_size\x18\x01 \x01(\x05B\x03\xe0A\x01R\bpageSize\x12\"\n" + - "\n" + - "page_token\x18\x02 \x01(\tB\x03\xe0A\x01R\tpageToken\x12\x19\n" + - "\x05query\x18\x03 \x01(\tB\x03\xe0A\x01R\x05query\"\x82\x01\n" + - "\x15SearchFoldersResponse\x12A\n" + - "\afolders\x18\x01 \x03(\v2'.google.cloud.resourcemanager.v3.FolderR\afolders\x12&\n" + - "\x0fnext_page_token\x18\x02 \x01(\tR\rnextPageToken\"[\n" + - "\x13CreateFolderRequest\x12D\n" + - "\x06folder\x18\x02 \x01(\v2'.google.cloud.resourcemanager.v3.FolderB\x03\xe0A\x02R\x06folder\"Q\n" + - "\x14CreateFolderMetadata\x12!\n" + - "\fdisplay_name\x18\x01 \x01(\tR\vdisplayName\x12\x16\n" + - "\x06parent\x18\x02 \x01(\tR\x06parent\"\x9d\x01\n" + - "\x13UpdateFolderRequest\x12D\n" + - "\x06folder\x18\x01 \x01(\v2'.google.cloud.resourcemanager.v3.FolderB\x03\xe0A\x02R\x06folder\x12@\n" + - "\vupdate_mask\x18\x02 \x01(\v2\x1a.google.protobuf.FieldMaskB\x03\xe0A\x02R\n" + - "updateMask\"\x16\n" + - "\x14UpdateFolderMetadata\"\x95\x01\n" + - "\x11MoveFolderRequest\x12F\n" + - "\x04name\x18\x01 \x01(\tB2\xe0A\x02\xfaA,\n" + - "*cloudresourcemanager.googleapis.com/FolderR\x04name\x128\n" + - "\x12destination_parent\x18\x02 \x01(\tB\t\xe0A\x02\xfaA\x03\x12\x01*R\x11destinationParent\"\x8b\x01\n" + - "\x12MoveFolderMetadata\x12!\n" + - "\fdisplay_name\x18\x01 \x01(\tR\vdisplayName\x12#\n" + - "\rsource_parent\x18\x02 \x01(\tR\fsourceParent\x12-\n" + - "\x12destination_parent\x18\x03 \x01(\tR\x11destinationParent\"]\n" + - "\x13DeleteFolderRequest\x12F\n" + - "\x04name\x18\x01 \x01(\tB2\xe0A\x02\xfaA,\n" + - "*cloudresourcemanager.googleapis.com/FolderR\x04name\"\x16\n" + - "\x14DeleteFolderMetadata\"_\n" + - "\x15UndeleteFolderRequest\x12F\n" + - "\x04name\x18\x01 \x01(\tB2\xe0A\x02\xfaA,\n" + - "*cloudresourcemanager.googleapis.com/FolderR\x04name\"\x18\n" + - "\x16UndeleteFolderMetadata2\xde\x0f\n" + - "\aFolders\x12\x8c\x01\n" + - "\tGetFolder\x121.google.cloud.resourcemanager.v3.GetFolderRequest\x1a'.google.cloud.resourcemanager.v3.Folder\"#\xdaA\x04name\x82\xd3\xe4\x93\x02\x16\x12\x14/v3/{name=folders/*}\x12\x96\x01\n" + - "\vListFolders\x123.google.cloud.resourcemanager.v3.ListFoldersRequest\x1a4.google.cloud.resourcemanager.v3.ListFoldersResponse\"\x1c\xdaA\x06parent\x82\xd3\xe4\x93\x02\r\x12\v/v3/folders\x12\xa2\x01\n" + - "\rSearchFolders\x125.google.cloud.resourcemanager.v3.SearchFoldersRequest\x1a6.google.cloud.resourcemanager.v3.SearchFoldersResponse\"\"\xdaA\x05query\x82\xd3\xe4\x93\x02\x14\x12\x12/v3/folders:search\x12\xaa\x01\n" + - "\fCreateFolder\x124.google.cloud.resourcemanager.v3.CreateFolderRequest\x1a\x1d.google.longrunning.Operation\"E\xcaA\x1e\n" + - "\x06Folder\x12\x14CreateFolderMetadata\xdaA\x06folder\x82\xd3\xe4\x93\x02\x15:\x06folder\"\v/v3/folders\x12\xc6\x01\n" + - "\fUpdateFolder\x124.google.cloud.resourcemanager.v3.UpdateFolderRequest\x1a\x1d.google.longrunning.Operation\"a\xcaA\x1e\n" + - "\x06Folder\x12\x14UpdateFolderMetadata\xdaA\x12folder,update_mask\x82\xd3\xe4\x93\x02%:\x06folder2\x1b/v3/{folder.name=folders/*}\x12\xbe\x01\n" + - "\n" + - "MoveFolder\x122.google.cloud.resourcemanager.v3.MoveFolderRequest\x1a\x1d.google.longrunning.Operation\"]\xcaA\x1c\n" + - "\x06Folder\x12\x12MoveFolderMetadata\xdaA\x17name,destination_parent\x82\xd3\xe4\x93\x02\x1e:\x01*\"\x19/v3/{name=folders/*}:move\x12\xa9\x01\n" + - "\fDeleteFolder\x124.google.cloud.resourcemanager.v3.DeleteFolderRequest\x1a\x1d.google.longrunning.Operation\"D\xcaA\x1e\n" + - "\x06Folder\x12\x14DeleteFolderMetadata\xdaA\x04name\x82\xd3\xe4\x93\x02\x16*\x14/v3/{name=folders/*}\x12\xbb\x01\n" + - "\x0eUndeleteFolder\x126.google.cloud.resourcemanager.v3.UndeleteFolderRequest\x1a\x1d.google.longrunning.Operation\"R\xcaA \n" + - "\x06Folder\x12\x16UndeleteFolderMetadata\xdaA\x04name\x82\xd3\xe4\x93\x02\":\x01*\"\x1d/v3/{name=folders/*}:undelete\x12\x86\x01\n" + - "\fGetIamPolicy\x12\".google.iam.v1.GetIamPolicyRequest\x1a\x15.google.iam.v1.Policy\";\xdaA\bresource\x82\xd3\xe4\x93\x02*:\x01*\"%/v3/{resource=folders/*}:getIamPolicy\x12\x8d\x01\n" + - "\fSetIamPolicy\x12\".google.iam.v1.SetIamPolicyRequest\x1a\x15.google.iam.v1.Policy\"B\xdaA\x0fresource,policy\x82\xd3\xe4\x93\x02*:\x01*\"%/v3/{resource=folders/*}:setIamPolicy\x12\xb8\x01\n" + - "\x12TestIamPermissions\x12(.google.iam.v1.TestIamPermissionsRequest\x1a).google.iam.v1.TestIamPermissionsResponse\"M\xdaA\x14resource,permissions\x82\xd3\xe4\x93\x020:\x01*\"+/v3/{resource=folders/*}:testIamPermissions\x1a\x90\x01\xcaA#cloudresourcemanager.googleapis.com\xd2Aghttps://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-platform.read-onlyB\xed\x01\n" + - "#com.google.cloud.resourcemanager.v3B\fFoldersProtoP\x01ZMcloud.google.com/go/resourcemanager/apiv3/resourcemanagerpb;resourcemanagerpb\xaa\x02\x1fGoogle.Cloud.ResourceManager.V3\xca\x02\x1fGoogle\\Cloud\\ResourceManager\\V3\xea\x02\"Google::Cloud::ResourceManager::V3b\x06proto3" - -var ( - file_google_cloud_resourcemanager_v3_folders_proto_rawDescOnce sync.Once - file_google_cloud_resourcemanager_v3_folders_proto_rawDescData []byte -) - -func file_google_cloud_resourcemanager_v3_folders_proto_rawDescGZIP() []byte { - file_google_cloud_resourcemanager_v3_folders_proto_rawDescOnce.Do(func() { - file_google_cloud_resourcemanager_v3_folders_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_google_cloud_resourcemanager_v3_folders_proto_rawDesc), len(file_google_cloud_resourcemanager_v3_folders_proto_rawDesc))) - }) - return file_google_cloud_resourcemanager_v3_folders_proto_rawDescData -} - -var file_google_cloud_resourcemanager_v3_folders_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_google_cloud_resourcemanager_v3_folders_proto_msgTypes = make([]protoimpl.MessageInfo, 16) -var file_google_cloud_resourcemanager_v3_folders_proto_goTypes = []any{ - (Folder_State)(0), // 0: google.cloud.resourcemanager.v3.Folder.State - (*Folder)(nil), // 1: google.cloud.resourcemanager.v3.Folder - (*GetFolderRequest)(nil), // 2: google.cloud.resourcemanager.v3.GetFolderRequest - (*ListFoldersRequest)(nil), // 3: google.cloud.resourcemanager.v3.ListFoldersRequest - (*ListFoldersResponse)(nil), // 4: google.cloud.resourcemanager.v3.ListFoldersResponse - (*SearchFoldersRequest)(nil), // 5: google.cloud.resourcemanager.v3.SearchFoldersRequest - (*SearchFoldersResponse)(nil), // 6: google.cloud.resourcemanager.v3.SearchFoldersResponse - (*CreateFolderRequest)(nil), // 7: google.cloud.resourcemanager.v3.CreateFolderRequest - (*CreateFolderMetadata)(nil), // 8: google.cloud.resourcemanager.v3.CreateFolderMetadata - (*UpdateFolderRequest)(nil), // 9: google.cloud.resourcemanager.v3.UpdateFolderRequest - (*UpdateFolderMetadata)(nil), // 10: google.cloud.resourcemanager.v3.UpdateFolderMetadata - (*MoveFolderRequest)(nil), // 11: google.cloud.resourcemanager.v3.MoveFolderRequest - (*MoveFolderMetadata)(nil), // 12: google.cloud.resourcemanager.v3.MoveFolderMetadata - (*DeleteFolderRequest)(nil), // 13: google.cloud.resourcemanager.v3.DeleteFolderRequest - (*DeleteFolderMetadata)(nil), // 14: google.cloud.resourcemanager.v3.DeleteFolderMetadata - (*UndeleteFolderRequest)(nil), // 15: google.cloud.resourcemanager.v3.UndeleteFolderRequest - (*UndeleteFolderMetadata)(nil), // 16: google.cloud.resourcemanager.v3.UndeleteFolderMetadata - (*timestamppb.Timestamp)(nil), // 17: google.protobuf.Timestamp - (*fieldmaskpb.FieldMask)(nil), // 18: google.protobuf.FieldMask - (*iampb.GetIamPolicyRequest)(nil), // 19: google.iam.v1.GetIamPolicyRequest - (*iampb.SetIamPolicyRequest)(nil), // 20: google.iam.v1.SetIamPolicyRequest - (*iampb.TestIamPermissionsRequest)(nil), // 21: google.iam.v1.TestIamPermissionsRequest - (*longrunningpb.Operation)(nil), // 22: google.longrunning.Operation - (*iampb.Policy)(nil), // 23: google.iam.v1.Policy - (*iampb.TestIamPermissionsResponse)(nil), // 24: google.iam.v1.TestIamPermissionsResponse -} -var file_google_cloud_resourcemanager_v3_folders_proto_depIdxs = []int32{ - 0, // 0: google.cloud.resourcemanager.v3.Folder.state:type_name -> google.cloud.resourcemanager.v3.Folder.State - 17, // 1: google.cloud.resourcemanager.v3.Folder.create_time:type_name -> google.protobuf.Timestamp - 17, // 2: google.cloud.resourcemanager.v3.Folder.update_time:type_name -> google.protobuf.Timestamp - 17, // 3: google.cloud.resourcemanager.v3.Folder.delete_time:type_name -> google.protobuf.Timestamp - 1, // 4: google.cloud.resourcemanager.v3.ListFoldersResponse.folders:type_name -> google.cloud.resourcemanager.v3.Folder - 1, // 5: google.cloud.resourcemanager.v3.SearchFoldersResponse.folders:type_name -> google.cloud.resourcemanager.v3.Folder - 1, // 6: google.cloud.resourcemanager.v3.CreateFolderRequest.folder:type_name -> google.cloud.resourcemanager.v3.Folder - 1, // 7: google.cloud.resourcemanager.v3.UpdateFolderRequest.folder:type_name -> google.cloud.resourcemanager.v3.Folder - 18, // 8: google.cloud.resourcemanager.v3.UpdateFolderRequest.update_mask:type_name -> google.protobuf.FieldMask - 2, // 9: google.cloud.resourcemanager.v3.Folders.GetFolder:input_type -> google.cloud.resourcemanager.v3.GetFolderRequest - 3, // 10: google.cloud.resourcemanager.v3.Folders.ListFolders:input_type -> google.cloud.resourcemanager.v3.ListFoldersRequest - 5, // 11: google.cloud.resourcemanager.v3.Folders.SearchFolders:input_type -> google.cloud.resourcemanager.v3.SearchFoldersRequest - 7, // 12: google.cloud.resourcemanager.v3.Folders.CreateFolder:input_type -> google.cloud.resourcemanager.v3.CreateFolderRequest - 9, // 13: google.cloud.resourcemanager.v3.Folders.UpdateFolder:input_type -> google.cloud.resourcemanager.v3.UpdateFolderRequest - 11, // 14: google.cloud.resourcemanager.v3.Folders.MoveFolder:input_type -> google.cloud.resourcemanager.v3.MoveFolderRequest - 13, // 15: google.cloud.resourcemanager.v3.Folders.DeleteFolder:input_type -> google.cloud.resourcemanager.v3.DeleteFolderRequest - 15, // 16: google.cloud.resourcemanager.v3.Folders.UndeleteFolder:input_type -> google.cloud.resourcemanager.v3.UndeleteFolderRequest - 19, // 17: google.cloud.resourcemanager.v3.Folders.GetIamPolicy:input_type -> google.iam.v1.GetIamPolicyRequest - 20, // 18: google.cloud.resourcemanager.v3.Folders.SetIamPolicy:input_type -> google.iam.v1.SetIamPolicyRequest - 21, // 19: google.cloud.resourcemanager.v3.Folders.TestIamPermissions:input_type -> google.iam.v1.TestIamPermissionsRequest - 1, // 20: google.cloud.resourcemanager.v3.Folders.GetFolder:output_type -> google.cloud.resourcemanager.v3.Folder - 4, // 21: google.cloud.resourcemanager.v3.Folders.ListFolders:output_type -> google.cloud.resourcemanager.v3.ListFoldersResponse - 6, // 22: google.cloud.resourcemanager.v3.Folders.SearchFolders:output_type -> google.cloud.resourcemanager.v3.SearchFoldersResponse - 22, // 23: google.cloud.resourcemanager.v3.Folders.CreateFolder:output_type -> google.longrunning.Operation - 22, // 24: google.cloud.resourcemanager.v3.Folders.UpdateFolder:output_type -> google.longrunning.Operation - 22, // 25: google.cloud.resourcemanager.v3.Folders.MoveFolder:output_type -> google.longrunning.Operation - 22, // 26: google.cloud.resourcemanager.v3.Folders.DeleteFolder:output_type -> google.longrunning.Operation - 22, // 27: google.cloud.resourcemanager.v3.Folders.UndeleteFolder:output_type -> google.longrunning.Operation - 23, // 28: google.cloud.resourcemanager.v3.Folders.GetIamPolicy:output_type -> google.iam.v1.Policy - 23, // 29: google.cloud.resourcemanager.v3.Folders.SetIamPolicy:output_type -> google.iam.v1.Policy - 24, // 30: google.cloud.resourcemanager.v3.Folders.TestIamPermissions:output_type -> google.iam.v1.TestIamPermissionsResponse - 20, // [20:31] is the sub-list for method output_type - 9, // [9:20] is the sub-list for method input_type - 9, // [9:9] is the sub-list for extension type_name - 9, // [9:9] is the sub-list for extension extendee - 0, // [0:9] is the sub-list for field type_name -} - -func init() { file_google_cloud_resourcemanager_v3_folders_proto_init() } -func file_google_cloud_resourcemanager_v3_folders_proto_init() { - if File_google_cloud_resourcemanager_v3_folders_proto != nil { - return - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: unsafe.Slice(unsafe.StringData(file_google_cloud_resourcemanager_v3_folders_proto_rawDesc), len(file_google_cloud_resourcemanager_v3_folders_proto_rawDesc)), - NumEnums: 1, - NumMessages: 16, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_google_cloud_resourcemanager_v3_folders_proto_goTypes, - DependencyIndexes: file_google_cloud_resourcemanager_v3_folders_proto_depIdxs, - EnumInfos: file_google_cloud_resourcemanager_v3_folders_proto_enumTypes, - MessageInfos: file_google_cloud_resourcemanager_v3_folders_proto_msgTypes, - }.Build() - File_google_cloud_resourcemanager_v3_folders_proto = out.File - file_google_cloud_resourcemanager_v3_folders_proto_goTypes = nil - file_google_cloud_resourcemanager_v3_folders_proto_depIdxs = nil -} diff --git a/vendor/cloud.google.com/go/resourcemanager/apiv3/resourcemanagerpb/folders_grpc.pb.go b/vendor/cloud.google.com/go/resourcemanager/apiv3/resourcemanagerpb/folders_grpc.pb.go deleted file mode 100644 index cd64b922bd..0000000000 --- a/vendor/cloud.google.com/go/resourcemanager/apiv3/resourcemanagerpb/folders_grpc.pb.go +++ /dev/null @@ -1,726 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Code generated by protoc-gen-go-grpc. DO NOT EDIT. -// versions: -// - protoc-gen-go-grpc v1.3.0 -// - protoc v6.31.0 -// source: google/cloud/resourcemanager/v3/folders.proto - -package resourcemanagerpb - -import ( - context "context" - - iampb "cloud.google.com/go/iam/apiv1/iampb" - longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" -) - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 - -const ( - Folders_GetFolder_FullMethodName = "/google.cloud.resourcemanager.v3.Folders/GetFolder" - Folders_ListFolders_FullMethodName = "/google.cloud.resourcemanager.v3.Folders/ListFolders" - Folders_SearchFolders_FullMethodName = "/google.cloud.resourcemanager.v3.Folders/SearchFolders" - Folders_CreateFolder_FullMethodName = "/google.cloud.resourcemanager.v3.Folders/CreateFolder" - Folders_UpdateFolder_FullMethodName = "/google.cloud.resourcemanager.v3.Folders/UpdateFolder" - Folders_MoveFolder_FullMethodName = "/google.cloud.resourcemanager.v3.Folders/MoveFolder" - Folders_DeleteFolder_FullMethodName = "/google.cloud.resourcemanager.v3.Folders/DeleteFolder" - Folders_UndeleteFolder_FullMethodName = "/google.cloud.resourcemanager.v3.Folders/UndeleteFolder" - Folders_GetIamPolicy_FullMethodName = "/google.cloud.resourcemanager.v3.Folders/GetIamPolicy" - Folders_SetIamPolicy_FullMethodName = "/google.cloud.resourcemanager.v3.Folders/SetIamPolicy" - Folders_TestIamPermissions_FullMethodName = "/google.cloud.resourcemanager.v3.Folders/TestIamPermissions" -) - -// FoldersClient is the client API for Folders service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. -type FoldersClient interface { - // Retrieves a folder identified by the supplied resource name. - // Valid folder resource names have the format `folders/{folder_id}` - // (for example, `folders/1234`). - // The caller must have `resourcemanager.folders.get` permission on the - // identified folder. - GetFolder(ctx context.Context, in *GetFolderRequest, opts ...grpc.CallOption) (*Folder, error) - // Lists the folders that are direct descendants of supplied parent resource. - // `list()` provides a strongly consistent view of the folders underneath - // the specified parent resource. - // `list()` returns folders sorted based upon the (ascending) lexical ordering - // of their display_name. - // The caller must have `resourcemanager.folders.list` permission on the - // identified parent. - ListFolders(ctx context.Context, in *ListFoldersRequest, opts ...grpc.CallOption) (*ListFoldersResponse, error) - // Search for folders that match specific filter criteria. - // `search()` provides an eventually consistent view of the folders a user has - // access to which meet the specified filter criteria. - // - // This will only return folders on which the caller has the - // permission `resourcemanager.folders.get`. - SearchFolders(ctx context.Context, in *SearchFoldersRequest, opts ...grpc.CallOption) (*SearchFoldersResponse, error) - // Creates a folder in the resource hierarchy. - // Returns an `Operation` which can be used to track the progress of the - // folder creation workflow. - // Upon success, the `Operation.response` field will be populated with the - // created Folder. - // - // In order to succeed, the addition of this new folder must not violate - // the folder naming, height, or fanout constraints. - // - // + The folder's `display_name` must be distinct from all other folders that - // share its parent. - // + The addition of the folder must not cause the active folder hierarchy - // to exceed a height of 10. Note, the full active + deleted folder hierarchy - // is allowed to reach a height of 20; this provides additional headroom when - // moving folders that contain deleted folders. - // + The addition of the folder must not cause the total number of folders - // under its parent to exceed 300. - // - // If the operation fails due to a folder constraint violation, some errors - // may be returned by the `CreateFolder` request, with status code - // `FAILED_PRECONDITION` and an error description. Other folder constraint - // violations will be communicated in the `Operation`, with the specific - // `PreconditionFailure` returned in the details list in the `Operation.error` - // field. - // - // The caller must have `resourcemanager.folders.create` permission on the - // identified parent. - CreateFolder(ctx context.Context, in *CreateFolderRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) - // Updates a folder, changing its `display_name`. - // Changes to the folder `display_name` will be rejected if they violate - // either the `display_name` formatting rules or the naming constraints - // described in the - // [CreateFolder][google.cloud.resourcemanager.v3.Folders.CreateFolder] - // documentation. - // - // The folder's `display_name` must start and end with a letter or digit, - // may contain letters, digits, spaces, hyphens and underscores and can be - // between 3 and 30 characters. This is captured by the regular expression: - // `[\p{L}\p{N}][\p{L}\p{N}_- ]{1,28}[\p{L}\p{N}]`. - // The caller must have `resourcemanager.folders.update` permission on the - // identified folder. - // - // If the update fails due to the unique name constraint then a - // `PreconditionFailure` explaining this violation will be returned - // in the Status.details field. - UpdateFolder(ctx context.Context, in *UpdateFolderRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) - // Moves a folder under a new resource parent. - // Returns an `Operation` which can be used to track the progress of the - // folder move workflow. - // Upon success, the `Operation.response` field will be populated with the - // moved folder. - // Upon failure, a `FolderOperationError` categorizing the failure cause will - // be returned - if the failure occurs synchronously then the - // `FolderOperationError` will be returned in the `Status.details` field. - // If it occurs asynchronously, then the FolderOperation will be returned - // in the `Operation.error` field. - // In addition, the `Operation.metadata` field will be populated with a - // `FolderOperation` message as an aid to stateless clients. - // Folder moves will be rejected if they violate either the naming, height, - // or fanout constraints described in the - // [CreateFolder][google.cloud.resourcemanager.v3.Folders.CreateFolder] - // documentation. The caller must have `resourcemanager.folders.move` - // permission on the folder's current and proposed new parent. - MoveFolder(ctx context.Context, in *MoveFolderRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) - // Requests deletion of a folder. The folder is moved into the - // [DELETE_REQUESTED][google.cloud.resourcemanager.v3.Folder.State.DELETE_REQUESTED] - // state immediately, and is deleted approximately 30 days later. This method - // may only be called on an empty folder, where a folder is empty if it - // doesn't contain any folders or projects in the - // [ACTIVE][google.cloud.resourcemanager.v3.Folder.State.ACTIVE] state. If - // called on a folder in - // [DELETE_REQUESTED][google.cloud.resourcemanager.v3.Folder.State.DELETE_REQUESTED] - // state the operation will result in a no-op success. - // The caller must have `resourcemanager.folders.delete` permission on the - // identified folder. - DeleteFolder(ctx context.Context, in *DeleteFolderRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) - // Cancels the deletion request for a folder. This method may be called on a - // folder in any state. If the folder is in the - // [ACTIVE][google.cloud.resourcemanager.v3.Folder.State.ACTIVE] state the - // result will be a no-op success. In order to succeed, the folder's parent - // must be in the - // [ACTIVE][google.cloud.resourcemanager.v3.Folder.State.ACTIVE] state. In - // addition, reintroducing the folder into the tree must not violate folder - // naming, height, and fanout constraints described in the - // [CreateFolder][google.cloud.resourcemanager.v3.Folders.CreateFolder] - // documentation. The caller must have `resourcemanager.folders.undelete` - // permission on the identified folder. - UndeleteFolder(ctx context.Context, in *UndeleteFolderRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) - // Gets the access control policy for a folder. The returned policy may be - // empty if no such policy or resource exists. The `resource` field should - // be the folder's resource name, for example: "folders/1234". - // The caller must have `resourcemanager.folders.getIamPolicy` permission - // on the identified folder. - GetIamPolicy(ctx context.Context, in *iampb.GetIamPolicyRequest, opts ...grpc.CallOption) (*iampb.Policy, error) - // Sets the access control policy on a folder, replacing any existing policy. - // The `resource` field should be the folder's resource name, for example: - // "folders/1234". - // The caller must have `resourcemanager.folders.setIamPolicy` permission - // on the identified folder. - SetIamPolicy(ctx context.Context, in *iampb.SetIamPolicyRequest, opts ...grpc.CallOption) (*iampb.Policy, error) - // Returns permissions that a caller has on the specified folder. - // The `resource` field should be the folder's resource name, - // for example: "folders/1234". - // - // There are no permissions required for making this API call. - TestIamPermissions(ctx context.Context, in *iampb.TestIamPermissionsRequest, opts ...grpc.CallOption) (*iampb.TestIamPermissionsResponse, error) -} - -type foldersClient struct { - cc grpc.ClientConnInterface -} - -func NewFoldersClient(cc grpc.ClientConnInterface) FoldersClient { - return &foldersClient{cc} -} - -func (c *foldersClient) GetFolder(ctx context.Context, in *GetFolderRequest, opts ...grpc.CallOption) (*Folder, error) { - out := new(Folder) - err := c.cc.Invoke(ctx, Folders_GetFolder_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *foldersClient) ListFolders(ctx context.Context, in *ListFoldersRequest, opts ...grpc.CallOption) (*ListFoldersResponse, error) { - out := new(ListFoldersResponse) - err := c.cc.Invoke(ctx, Folders_ListFolders_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *foldersClient) SearchFolders(ctx context.Context, in *SearchFoldersRequest, opts ...grpc.CallOption) (*SearchFoldersResponse, error) { - out := new(SearchFoldersResponse) - err := c.cc.Invoke(ctx, Folders_SearchFolders_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *foldersClient) CreateFolder(ctx context.Context, in *CreateFolderRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) { - out := new(longrunningpb.Operation) - err := c.cc.Invoke(ctx, Folders_CreateFolder_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *foldersClient) UpdateFolder(ctx context.Context, in *UpdateFolderRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) { - out := new(longrunningpb.Operation) - err := c.cc.Invoke(ctx, Folders_UpdateFolder_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *foldersClient) MoveFolder(ctx context.Context, in *MoveFolderRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) { - out := new(longrunningpb.Operation) - err := c.cc.Invoke(ctx, Folders_MoveFolder_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *foldersClient) DeleteFolder(ctx context.Context, in *DeleteFolderRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) { - out := new(longrunningpb.Operation) - err := c.cc.Invoke(ctx, Folders_DeleteFolder_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *foldersClient) UndeleteFolder(ctx context.Context, in *UndeleteFolderRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) { - out := new(longrunningpb.Operation) - err := c.cc.Invoke(ctx, Folders_UndeleteFolder_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *foldersClient) GetIamPolicy(ctx context.Context, in *iampb.GetIamPolicyRequest, opts ...grpc.CallOption) (*iampb.Policy, error) { - out := new(iampb.Policy) - err := c.cc.Invoke(ctx, Folders_GetIamPolicy_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *foldersClient) SetIamPolicy(ctx context.Context, in *iampb.SetIamPolicyRequest, opts ...grpc.CallOption) (*iampb.Policy, error) { - out := new(iampb.Policy) - err := c.cc.Invoke(ctx, Folders_SetIamPolicy_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *foldersClient) TestIamPermissions(ctx context.Context, in *iampb.TestIamPermissionsRequest, opts ...grpc.CallOption) (*iampb.TestIamPermissionsResponse, error) { - out := new(iampb.TestIamPermissionsResponse) - err := c.cc.Invoke(ctx, Folders_TestIamPermissions_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// FoldersServer is the server API for Folders service. -// All implementations should embed UnimplementedFoldersServer -// for forward compatibility -type FoldersServer interface { - // Retrieves a folder identified by the supplied resource name. - // Valid folder resource names have the format `folders/{folder_id}` - // (for example, `folders/1234`). - // The caller must have `resourcemanager.folders.get` permission on the - // identified folder. - GetFolder(context.Context, *GetFolderRequest) (*Folder, error) - // Lists the folders that are direct descendants of supplied parent resource. - // `list()` provides a strongly consistent view of the folders underneath - // the specified parent resource. - // `list()` returns folders sorted based upon the (ascending) lexical ordering - // of their display_name. - // The caller must have `resourcemanager.folders.list` permission on the - // identified parent. - ListFolders(context.Context, *ListFoldersRequest) (*ListFoldersResponse, error) - // Search for folders that match specific filter criteria. - // `search()` provides an eventually consistent view of the folders a user has - // access to which meet the specified filter criteria. - // - // This will only return folders on which the caller has the - // permission `resourcemanager.folders.get`. - SearchFolders(context.Context, *SearchFoldersRequest) (*SearchFoldersResponse, error) - // Creates a folder in the resource hierarchy. - // Returns an `Operation` which can be used to track the progress of the - // folder creation workflow. - // Upon success, the `Operation.response` field will be populated with the - // created Folder. - // - // In order to succeed, the addition of this new folder must not violate - // the folder naming, height, or fanout constraints. - // - // + The folder's `display_name` must be distinct from all other folders that - // share its parent. - // + The addition of the folder must not cause the active folder hierarchy - // to exceed a height of 10. Note, the full active + deleted folder hierarchy - // is allowed to reach a height of 20; this provides additional headroom when - // moving folders that contain deleted folders. - // + The addition of the folder must not cause the total number of folders - // under its parent to exceed 300. - // - // If the operation fails due to a folder constraint violation, some errors - // may be returned by the `CreateFolder` request, with status code - // `FAILED_PRECONDITION` and an error description. Other folder constraint - // violations will be communicated in the `Operation`, with the specific - // `PreconditionFailure` returned in the details list in the `Operation.error` - // field. - // - // The caller must have `resourcemanager.folders.create` permission on the - // identified parent. - CreateFolder(context.Context, *CreateFolderRequest) (*longrunningpb.Operation, error) - // Updates a folder, changing its `display_name`. - // Changes to the folder `display_name` will be rejected if they violate - // either the `display_name` formatting rules or the naming constraints - // described in the - // [CreateFolder][google.cloud.resourcemanager.v3.Folders.CreateFolder] - // documentation. - // - // The folder's `display_name` must start and end with a letter or digit, - // may contain letters, digits, spaces, hyphens and underscores and can be - // between 3 and 30 characters. This is captured by the regular expression: - // `[\p{L}\p{N}][\p{L}\p{N}_- ]{1,28}[\p{L}\p{N}]`. - // The caller must have `resourcemanager.folders.update` permission on the - // identified folder. - // - // If the update fails due to the unique name constraint then a - // `PreconditionFailure` explaining this violation will be returned - // in the Status.details field. - UpdateFolder(context.Context, *UpdateFolderRequest) (*longrunningpb.Operation, error) - // Moves a folder under a new resource parent. - // Returns an `Operation` which can be used to track the progress of the - // folder move workflow. - // Upon success, the `Operation.response` field will be populated with the - // moved folder. - // Upon failure, a `FolderOperationError` categorizing the failure cause will - // be returned - if the failure occurs synchronously then the - // `FolderOperationError` will be returned in the `Status.details` field. - // If it occurs asynchronously, then the FolderOperation will be returned - // in the `Operation.error` field. - // In addition, the `Operation.metadata` field will be populated with a - // `FolderOperation` message as an aid to stateless clients. - // Folder moves will be rejected if they violate either the naming, height, - // or fanout constraints described in the - // [CreateFolder][google.cloud.resourcemanager.v3.Folders.CreateFolder] - // documentation. The caller must have `resourcemanager.folders.move` - // permission on the folder's current and proposed new parent. - MoveFolder(context.Context, *MoveFolderRequest) (*longrunningpb.Operation, error) - // Requests deletion of a folder. The folder is moved into the - // [DELETE_REQUESTED][google.cloud.resourcemanager.v3.Folder.State.DELETE_REQUESTED] - // state immediately, and is deleted approximately 30 days later. This method - // may only be called on an empty folder, where a folder is empty if it - // doesn't contain any folders or projects in the - // [ACTIVE][google.cloud.resourcemanager.v3.Folder.State.ACTIVE] state. If - // called on a folder in - // [DELETE_REQUESTED][google.cloud.resourcemanager.v3.Folder.State.DELETE_REQUESTED] - // state the operation will result in a no-op success. - // The caller must have `resourcemanager.folders.delete` permission on the - // identified folder. - DeleteFolder(context.Context, *DeleteFolderRequest) (*longrunningpb.Operation, error) - // Cancels the deletion request for a folder. This method may be called on a - // folder in any state. If the folder is in the - // [ACTIVE][google.cloud.resourcemanager.v3.Folder.State.ACTIVE] state the - // result will be a no-op success. In order to succeed, the folder's parent - // must be in the - // [ACTIVE][google.cloud.resourcemanager.v3.Folder.State.ACTIVE] state. In - // addition, reintroducing the folder into the tree must not violate folder - // naming, height, and fanout constraints described in the - // [CreateFolder][google.cloud.resourcemanager.v3.Folders.CreateFolder] - // documentation. The caller must have `resourcemanager.folders.undelete` - // permission on the identified folder. - UndeleteFolder(context.Context, *UndeleteFolderRequest) (*longrunningpb.Operation, error) - // Gets the access control policy for a folder. The returned policy may be - // empty if no such policy or resource exists. The `resource` field should - // be the folder's resource name, for example: "folders/1234". - // The caller must have `resourcemanager.folders.getIamPolicy` permission - // on the identified folder. - GetIamPolicy(context.Context, *iampb.GetIamPolicyRequest) (*iampb.Policy, error) - // Sets the access control policy on a folder, replacing any existing policy. - // The `resource` field should be the folder's resource name, for example: - // "folders/1234". - // The caller must have `resourcemanager.folders.setIamPolicy` permission - // on the identified folder. - SetIamPolicy(context.Context, *iampb.SetIamPolicyRequest) (*iampb.Policy, error) - // Returns permissions that a caller has on the specified folder. - // The `resource` field should be the folder's resource name, - // for example: "folders/1234". - // - // There are no permissions required for making this API call. - TestIamPermissions(context.Context, *iampb.TestIamPermissionsRequest) (*iampb.TestIamPermissionsResponse, error) -} - -// UnimplementedFoldersServer should be embedded to have forward compatible implementations. -type UnimplementedFoldersServer struct { -} - -func (UnimplementedFoldersServer) GetFolder(context.Context, *GetFolderRequest) (*Folder, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetFolder not implemented") -} -func (UnimplementedFoldersServer) ListFolders(context.Context, *ListFoldersRequest) (*ListFoldersResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ListFolders not implemented") -} -func (UnimplementedFoldersServer) SearchFolders(context.Context, *SearchFoldersRequest) (*SearchFoldersResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method SearchFolders not implemented") -} -func (UnimplementedFoldersServer) CreateFolder(context.Context, *CreateFolderRequest) (*longrunningpb.Operation, error) { - return nil, status.Errorf(codes.Unimplemented, "method CreateFolder not implemented") -} -func (UnimplementedFoldersServer) UpdateFolder(context.Context, *UpdateFolderRequest) (*longrunningpb.Operation, error) { - return nil, status.Errorf(codes.Unimplemented, "method UpdateFolder not implemented") -} -func (UnimplementedFoldersServer) MoveFolder(context.Context, *MoveFolderRequest) (*longrunningpb.Operation, error) { - return nil, status.Errorf(codes.Unimplemented, "method MoveFolder not implemented") -} -func (UnimplementedFoldersServer) DeleteFolder(context.Context, *DeleteFolderRequest) (*longrunningpb.Operation, error) { - return nil, status.Errorf(codes.Unimplemented, "method DeleteFolder not implemented") -} -func (UnimplementedFoldersServer) UndeleteFolder(context.Context, *UndeleteFolderRequest) (*longrunningpb.Operation, error) { - return nil, status.Errorf(codes.Unimplemented, "method UndeleteFolder not implemented") -} -func (UnimplementedFoldersServer) GetIamPolicy(context.Context, *iampb.GetIamPolicyRequest) (*iampb.Policy, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetIamPolicy not implemented") -} -func (UnimplementedFoldersServer) SetIamPolicy(context.Context, *iampb.SetIamPolicyRequest) (*iampb.Policy, error) { - return nil, status.Errorf(codes.Unimplemented, "method SetIamPolicy not implemented") -} -func (UnimplementedFoldersServer) TestIamPermissions(context.Context, *iampb.TestIamPermissionsRequest) (*iampb.TestIamPermissionsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method TestIamPermissions not implemented") -} - -// UnsafeFoldersServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to FoldersServer will -// result in compilation errors. -type UnsafeFoldersServer interface { - mustEmbedUnimplementedFoldersServer() -} - -func RegisterFoldersServer(s grpc.ServiceRegistrar, srv FoldersServer) { - s.RegisterService(&Folders_ServiceDesc, srv) -} - -func _Folders_GetFolder_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetFolderRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(FoldersServer).GetFolder(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Folders_GetFolder_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(FoldersServer).GetFolder(ctx, req.(*GetFolderRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Folders_ListFolders_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ListFoldersRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(FoldersServer).ListFolders(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Folders_ListFolders_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(FoldersServer).ListFolders(ctx, req.(*ListFoldersRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Folders_SearchFolders_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(SearchFoldersRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(FoldersServer).SearchFolders(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Folders_SearchFolders_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(FoldersServer).SearchFolders(ctx, req.(*SearchFoldersRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Folders_CreateFolder_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CreateFolderRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(FoldersServer).CreateFolder(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Folders_CreateFolder_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(FoldersServer).CreateFolder(ctx, req.(*CreateFolderRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Folders_UpdateFolder_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(UpdateFolderRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(FoldersServer).UpdateFolder(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Folders_UpdateFolder_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(FoldersServer).UpdateFolder(ctx, req.(*UpdateFolderRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Folders_MoveFolder_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MoveFolderRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(FoldersServer).MoveFolder(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Folders_MoveFolder_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(FoldersServer).MoveFolder(ctx, req.(*MoveFolderRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Folders_DeleteFolder_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DeleteFolderRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(FoldersServer).DeleteFolder(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Folders_DeleteFolder_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(FoldersServer).DeleteFolder(ctx, req.(*DeleteFolderRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Folders_UndeleteFolder_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(UndeleteFolderRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(FoldersServer).UndeleteFolder(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Folders_UndeleteFolder_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(FoldersServer).UndeleteFolder(ctx, req.(*UndeleteFolderRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Folders_GetIamPolicy_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(iampb.GetIamPolicyRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(FoldersServer).GetIamPolicy(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Folders_GetIamPolicy_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(FoldersServer).GetIamPolicy(ctx, req.(*iampb.GetIamPolicyRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Folders_SetIamPolicy_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(iampb.SetIamPolicyRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(FoldersServer).SetIamPolicy(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Folders_SetIamPolicy_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(FoldersServer).SetIamPolicy(ctx, req.(*iampb.SetIamPolicyRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Folders_TestIamPermissions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(iampb.TestIamPermissionsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(FoldersServer).TestIamPermissions(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Folders_TestIamPermissions_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(FoldersServer).TestIamPermissions(ctx, req.(*iampb.TestIamPermissionsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -// Folders_ServiceDesc is the grpc.ServiceDesc for Folders service. -// It's only intended for direct use with grpc.RegisterService, -// and not to be introspected or modified (even as a copy) -var Folders_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "google.cloud.resourcemanager.v3.Folders", - HandlerType: (*FoldersServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "GetFolder", - Handler: _Folders_GetFolder_Handler, - }, - { - MethodName: "ListFolders", - Handler: _Folders_ListFolders_Handler, - }, - { - MethodName: "SearchFolders", - Handler: _Folders_SearchFolders_Handler, - }, - { - MethodName: "CreateFolder", - Handler: _Folders_CreateFolder_Handler, - }, - { - MethodName: "UpdateFolder", - Handler: _Folders_UpdateFolder_Handler, - }, - { - MethodName: "MoveFolder", - Handler: _Folders_MoveFolder_Handler, - }, - { - MethodName: "DeleteFolder", - Handler: _Folders_DeleteFolder_Handler, - }, - { - MethodName: "UndeleteFolder", - Handler: _Folders_UndeleteFolder_Handler, - }, - { - MethodName: "GetIamPolicy", - Handler: _Folders_GetIamPolicy_Handler, - }, - { - MethodName: "SetIamPolicy", - Handler: _Folders_SetIamPolicy_Handler, - }, - { - MethodName: "TestIamPermissions", - Handler: _Folders_TestIamPermissions_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "google/cloud/resourcemanager/v3/folders.proto", -} diff --git a/vendor/cloud.google.com/go/resourcemanager/apiv3/resourcemanagerpb/organizations.pb.go b/vendor/cloud.google.com/go/resourcemanager/apiv3/resourcemanagerpb/organizations.pb.go deleted file mode 100644 index dea8edf63f..0000000000 --- a/vendor/cloud.google.com/go/resourcemanager/apiv3/resourcemanagerpb/organizations.pb.go +++ /dev/null @@ -1,633 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.36.11 -// protoc v6.31.0 -// source: google/cloud/resourcemanager/v3/organizations.proto - -package resourcemanagerpb - -import ( - reflect "reflect" - sync "sync" - unsafe "unsafe" - - iampb "cloud.google.com/go/iam/apiv1/iampb" - _ "google.golang.org/genproto/googleapis/api/annotations" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - timestamppb "google.golang.org/protobuf/types/known/timestamppb" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// Organization lifecycle states. -type Organization_State int32 - -const ( - // Unspecified state. This is only useful for distinguishing unset values. - Organization_STATE_UNSPECIFIED Organization_State = 0 - // The normal and active state. - Organization_ACTIVE Organization_State = 1 - // The organization has been marked for deletion by the user. - Organization_DELETE_REQUESTED Organization_State = 2 -) - -// Enum value maps for Organization_State. -var ( - Organization_State_name = map[int32]string{ - 0: "STATE_UNSPECIFIED", - 1: "ACTIVE", - 2: "DELETE_REQUESTED", - } - Organization_State_value = map[string]int32{ - "STATE_UNSPECIFIED": 0, - "ACTIVE": 1, - "DELETE_REQUESTED": 2, - } -) - -func (x Organization_State) Enum() *Organization_State { - p := new(Organization_State) - *p = x - return p -} - -func (x Organization_State) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (Organization_State) Descriptor() protoreflect.EnumDescriptor { - return file_google_cloud_resourcemanager_v3_organizations_proto_enumTypes[0].Descriptor() -} - -func (Organization_State) Type() protoreflect.EnumType { - return &file_google_cloud_resourcemanager_v3_organizations_proto_enumTypes[0] -} - -func (x Organization_State) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use Organization_State.Descriptor instead. -func (Organization_State) EnumDescriptor() ([]byte, []int) { - return file_google_cloud_resourcemanager_v3_organizations_proto_rawDescGZIP(), []int{0, 0} -} - -// The root node in the resource hierarchy to which a particular entity's -// (a company, for example) resources belong. -type Organization struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Output only. The resource name of the organization. This is the - // organization's relative path in the API. Its format is - // "organizations/[organization_id]". For example, "organizations/1234". - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // Output only. A human-readable string that refers to the organization in the - // Google Cloud Console. This string is set by the server and cannot be - // changed. The string will be set to the primary domain (for example, - // "google.com") of the Google Workspace customer that owns the organization. - DisplayName string `protobuf:"bytes,2,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"` - // The owner of this organization. The owner should be specified on - // creation. Once set, it cannot be changed. - // - // The lifetime of the organization and all of its descendants are bound to - // the owner. If the owner is deleted, the organization and all its - // descendants will be deleted. - // - // Types that are valid to be assigned to Owner: - // - // *Organization_DirectoryCustomerId - Owner isOrganization_Owner `protobuf_oneof:"owner"` - // Output only. The organization's current lifecycle state. - State Organization_State `protobuf:"varint,4,opt,name=state,proto3,enum=google.cloud.resourcemanager.v3.Organization_State" json:"state,omitempty"` - // Output only. Timestamp when the Organization was created. - CreateTime *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"` - // Output only. Timestamp when the Organization was last modified. - UpdateTime *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=update_time,json=updateTime,proto3" json:"update_time,omitempty"` - // Output only. Timestamp when the Organization was requested for deletion. - DeleteTime *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=delete_time,json=deleteTime,proto3" json:"delete_time,omitempty"` - // Output only. A checksum computed by the server based on the current value - // of the Organization resource. This may be sent on update and delete - // requests to ensure the client has an up-to-date value before proceeding. - Etag string `protobuf:"bytes,8,opt,name=etag,proto3" json:"etag,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *Organization) Reset() { - *x = Organization{} - mi := &file_google_cloud_resourcemanager_v3_organizations_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *Organization) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Organization) ProtoMessage() {} - -func (x *Organization) ProtoReflect() protoreflect.Message { - mi := &file_google_cloud_resourcemanager_v3_organizations_proto_msgTypes[0] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Organization.ProtoReflect.Descriptor instead. -func (*Organization) Descriptor() ([]byte, []int) { - return file_google_cloud_resourcemanager_v3_organizations_proto_rawDescGZIP(), []int{0} -} - -func (x *Organization) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *Organization) GetDisplayName() string { - if x != nil { - return x.DisplayName - } - return "" -} - -func (x *Organization) GetOwner() isOrganization_Owner { - if x != nil { - return x.Owner - } - return nil -} - -func (x *Organization) GetDirectoryCustomerId() string { - if x != nil { - if x, ok := x.Owner.(*Organization_DirectoryCustomerId); ok { - return x.DirectoryCustomerId - } - } - return "" -} - -func (x *Organization) GetState() Organization_State { - if x != nil { - return x.State - } - return Organization_STATE_UNSPECIFIED -} - -func (x *Organization) GetCreateTime() *timestamppb.Timestamp { - if x != nil { - return x.CreateTime - } - return nil -} - -func (x *Organization) GetUpdateTime() *timestamppb.Timestamp { - if x != nil { - return x.UpdateTime - } - return nil -} - -func (x *Organization) GetDeleteTime() *timestamppb.Timestamp { - if x != nil { - return x.DeleteTime - } - return nil -} - -func (x *Organization) GetEtag() string { - if x != nil { - return x.Etag - } - return "" -} - -type isOrganization_Owner interface { - isOrganization_Owner() -} - -type Organization_DirectoryCustomerId struct { - // Immutable. The G Suite / Workspace customer id used in the Directory API. - DirectoryCustomerId string `protobuf:"bytes,3,opt,name=directory_customer_id,json=directoryCustomerId,proto3,oneof"` -} - -func (*Organization_DirectoryCustomerId) isOrganization_Owner() {} - -// The request sent to the `GetOrganization` method. The `name` field is -// required. `organization_id` is no longer accepted. -type GetOrganizationRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Required. The resource name of the Organization to fetch. This is the - // organization's relative path in the API, formatted as - // "organizations/[organizationId]". For example, "organizations/1234". - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *GetOrganizationRequest) Reset() { - *x = GetOrganizationRequest{} - mi := &file_google_cloud_resourcemanager_v3_organizations_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *GetOrganizationRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetOrganizationRequest) ProtoMessage() {} - -func (x *GetOrganizationRequest) ProtoReflect() protoreflect.Message { - mi := &file_google_cloud_resourcemanager_v3_organizations_proto_msgTypes[1] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetOrganizationRequest.ProtoReflect.Descriptor instead. -func (*GetOrganizationRequest) Descriptor() ([]byte, []int) { - return file_google_cloud_resourcemanager_v3_organizations_proto_rawDescGZIP(), []int{1} -} - -func (x *GetOrganizationRequest) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -// The request sent to the `SearchOrganizations` method. -type SearchOrganizationsRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Optional. The maximum number of organizations to return in the response. - // The server can return fewer organizations than requested. If unspecified, - // server picks an appropriate default. - PageSize int32 `protobuf:"varint,1,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` - // Optional. A pagination token returned from a previous call to - // `SearchOrganizations` that indicates from where listing should continue. - PageToken string `protobuf:"bytes,2,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` - // Optional. An optional query string used to filter the Organizations to - // return in the response. Query rules are case-insensitive. - // - // ``` - // | Field | Description | - // |------------------|--------------------------------------------| - // | directoryCustomerId, owner.directoryCustomerId | Filters by directory - // customer id. | - // | domain | Filters by domain. | - // ``` - // - // Organizations may be queried by `directoryCustomerId` or by - // `domain`, where the domain is a G Suite domain, for example: - // - // * Query `directorycustomerid:123456789` returns Organization - // resources with `owner.directory_customer_id` equal to `123456789`. - // * Query `domain:google.com` returns Organization resources corresponding - // to the domain `google.com`. - Query string `protobuf:"bytes,3,opt,name=query,proto3" json:"query,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *SearchOrganizationsRequest) Reset() { - *x = SearchOrganizationsRequest{} - mi := &file_google_cloud_resourcemanager_v3_organizations_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *SearchOrganizationsRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SearchOrganizationsRequest) ProtoMessage() {} - -func (x *SearchOrganizationsRequest) ProtoReflect() protoreflect.Message { - mi := &file_google_cloud_resourcemanager_v3_organizations_proto_msgTypes[2] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SearchOrganizationsRequest.ProtoReflect.Descriptor instead. -func (*SearchOrganizationsRequest) Descriptor() ([]byte, []int) { - return file_google_cloud_resourcemanager_v3_organizations_proto_rawDescGZIP(), []int{2} -} - -func (x *SearchOrganizationsRequest) GetPageSize() int32 { - if x != nil { - return x.PageSize - } - return 0 -} - -func (x *SearchOrganizationsRequest) GetPageToken() string { - if x != nil { - return x.PageToken - } - return "" -} - -func (x *SearchOrganizationsRequest) GetQuery() string { - if x != nil { - return x.Query - } - return "" -} - -// The response returned from the `SearchOrganizations` method. -type SearchOrganizationsResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - // The list of Organizations that matched the search query, possibly - // paginated. - Organizations []*Organization `protobuf:"bytes,1,rep,name=organizations,proto3" json:"organizations,omitempty"` - // A pagination token to be used to retrieve the next page of results. If the - // result is too large to fit within the page size specified in the request, - // this field will be set with a token that can be used to fetch the next page - // of results. If this field is empty, it indicates that this response - // contains the last page of results. - NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *SearchOrganizationsResponse) Reset() { - *x = SearchOrganizationsResponse{} - mi := &file_google_cloud_resourcemanager_v3_organizations_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *SearchOrganizationsResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SearchOrganizationsResponse) ProtoMessage() {} - -func (x *SearchOrganizationsResponse) ProtoReflect() protoreflect.Message { - mi := &file_google_cloud_resourcemanager_v3_organizations_proto_msgTypes[3] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SearchOrganizationsResponse.ProtoReflect.Descriptor instead. -func (*SearchOrganizationsResponse) Descriptor() ([]byte, []int) { - return file_google_cloud_resourcemanager_v3_organizations_proto_rawDescGZIP(), []int{3} -} - -func (x *SearchOrganizationsResponse) GetOrganizations() []*Organization { - if x != nil { - return x.Organizations - } - return nil -} - -func (x *SearchOrganizationsResponse) GetNextPageToken() string { - if x != nil { - return x.NextPageToken - } - return "" -} - -// A status object which is used as the `metadata` field for the operation -// returned by DeleteOrganization. -type DeleteOrganizationMetadata struct { - state protoimpl.MessageState `protogen:"open.v1"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *DeleteOrganizationMetadata) Reset() { - *x = DeleteOrganizationMetadata{} - mi := &file_google_cloud_resourcemanager_v3_organizations_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *DeleteOrganizationMetadata) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DeleteOrganizationMetadata) ProtoMessage() {} - -func (x *DeleteOrganizationMetadata) ProtoReflect() protoreflect.Message { - mi := &file_google_cloud_resourcemanager_v3_organizations_proto_msgTypes[4] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DeleteOrganizationMetadata.ProtoReflect.Descriptor instead. -func (*DeleteOrganizationMetadata) Descriptor() ([]byte, []int) { - return file_google_cloud_resourcemanager_v3_organizations_proto_rawDescGZIP(), []int{4} -} - -// A status object which is used as the `metadata` field for the Operation -// returned by UndeleteOrganization. -type UndeleteOrganizationMetadata struct { - state protoimpl.MessageState `protogen:"open.v1"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *UndeleteOrganizationMetadata) Reset() { - *x = UndeleteOrganizationMetadata{} - mi := &file_google_cloud_resourcemanager_v3_organizations_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *UndeleteOrganizationMetadata) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UndeleteOrganizationMetadata) ProtoMessage() {} - -func (x *UndeleteOrganizationMetadata) ProtoReflect() protoreflect.Message { - mi := &file_google_cloud_resourcemanager_v3_organizations_proto_msgTypes[5] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use UndeleteOrganizationMetadata.ProtoReflect.Descriptor instead. -func (*UndeleteOrganizationMetadata) Descriptor() ([]byte, []int) { - return file_google_cloud_resourcemanager_v3_organizations_proto_rawDescGZIP(), []int{5} -} - -var File_google_cloud_resourcemanager_v3_organizations_proto protoreflect.FileDescriptor - -const file_google_cloud_resourcemanager_v3_organizations_proto_rawDesc = "" + - "\n" + - "3google/cloud/resourcemanager/v3/organizations.proto\x12\x1fgoogle.cloud.resourcemanager.v3\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1egoogle/iam/v1/iam_policy.proto\x1a\x1agoogle/iam/v1/policy.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xdc\x04\n" + - "\fOrganization\x12\x17\n" + - "\x04name\x18\x01 \x01(\tB\x03\xe0A\x03R\x04name\x12&\n" + - "\fdisplay_name\x18\x02 \x01(\tB\x03\xe0A\x03R\vdisplayName\x129\n" + - "\x15directory_customer_id\x18\x03 \x01(\tB\x03\xe0A\x05H\x00R\x13directoryCustomerId\x12N\n" + - "\x05state\x18\x04 \x01(\x0e23.google.cloud.resourcemanager.v3.Organization.StateB\x03\xe0A\x03R\x05state\x12@\n" + - "\vcreate_time\x18\x05 \x01(\v2\x1a.google.protobuf.TimestampB\x03\xe0A\x03R\n" + - "createTime\x12@\n" + - "\vupdate_time\x18\x06 \x01(\v2\x1a.google.protobuf.TimestampB\x03\xe0A\x03R\n" + - "updateTime\x12@\n" + - "\vdelete_time\x18\a \x01(\v2\x1a.google.protobuf.TimestampB\x03\xe0A\x03R\n" + - "deleteTime\x12\x17\n" + - "\x04etag\x18\b \x01(\tB\x03\xe0A\x03R\x04etag\"@\n" + - "\x05State\x12\x15\n" + - "\x11STATE_UNSPECIFIED\x10\x00\x12\n" + - "\n" + - "\x06ACTIVE\x10\x01\x12\x14\n" + - "\x10DELETE_REQUESTED\x10\x02:V\xeaAS\n" + - "0cloudresourcemanager.googleapis.com/Organization\x12\x1corganizations/{organization}R\x01\x01B\a\n" + - "\x05owner\"f\n" + - "\x16GetOrganizationRequest\x12L\n" + - "\x04name\x18\x01 \x01(\tB8\xe0A\x02\xfaA2\n" + - "0cloudresourcemanager.googleapis.com/OrganizationR\x04name\"}\n" + - "\x1aSearchOrganizationsRequest\x12 \n" + - "\tpage_size\x18\x01 \x01(\x05B\x03\xe0A\x01R\bpageSize\x12\"\n" + - "\n" + - "page_token\x18\x02 \x01(\tB\x03\xe0A\x01R\tpageToken\x12\x19\n" + - "\x05query\x18\x03 \x01(\tB\x03\xe0A\x01R\x05query\"\x9a\x01\n" + - "\x1bSearchOrganizationsResponse\x12S\n" + - "\rorganizations\x18\x01 \x03(\v2-.google.cloud.resourcemanager.v3.OrganizationR\rorganizations\x12&\n" + - "\x0fnext_page_token\x18\x02 \x01(\tR\rnextPageToken\"\x1c\n" + - "\x1aDeleteOrganizationMetadata\"\x1e\n" + - "\x1cUndeleteOrganizationMetadata2\xe5\a\n" + - "\rOrganizations\x12\xa4\x01\n" + - "\x0fGetOrganization\x127.google.cloud.resourcemanager.v3.GetOrganizationRequest\x1a-.google.cloud.resourcemanager.v3.Organization\")\xdaA\x04name\x82\xd3\xe4\x93\x02\x1c\x12\x1a/v3/{name=organizations/*}\x12\xba\x01\n" + - "\x13SearchOrganizations\x12;.google.cloud.resourcemanager.v3.SearchOrganizationsRequest\x1a<.google.cloud.resourcemanager.v3.SearchOrganizationsResponse\"(\xdaA\x05query\x82\xd3\xe4\x93\x02\x1a\x12\x18/v3/organizations:search\x12\x8c\x01\n" + - "\fGetIamPolicy\x12\".google.iam.v1.GetIamPolicyRequest\x1a\x15.google.iam.v1.Policy\"A\xdaA\bresource\x82\xd3\xe4\x93\x020:\x01*\"+/v3/{resource=organizations/*}:getIamPolicy\x12\x8c\x01\n" + - "\fSetIamPolicy\x12\".google.iam.v1.SetIamPolicyRequest\x1a\x15.google.iam.v1.Policy\"A\xdaA\bresource\x82\xd3\xe4\x93\x020:\x01*\"+/v3/{resource=organizations/*}:setIamPolicy\x12\xbe\x01\n" + - "\x12TestIamPermissions\x12(.google.iam.v1.TestIamPermissionsRequest\x1a).google.iam.v1.TestIamPermissionsResponse\"S\xdaA\x14resource,permissions\x82\xd3\xe4\x93\x026:\x01*\"1/v3/{resource=organizations/*}:testIamPermissions\x1a\x90\x01\xcaA#cloudresourcemanager.googleapis.com\xd2Aghttps://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-platform.read-onlyB\xf3\x01\n" + - "#com.google.cloud.resourcemanager.v3B\x12OrganizationsProtoP\x01ZMcloud.google.com/go/resourcemanager/apiv3/resourcemanagerpb;resourcemanagerpb\xaa\x02\x1fGoogle.Cloud.ResourceManager.V3\xca\x02\x1fGoogle\\Cloud\\ResourceManager\\V3\xea\x02\"Google::Cloud::ResourceManager::V3b\x06proto3" - -var ( - file_google_cloud_resourcemanager_v3_organizations_proto_rawDescOnce sync.Once - file_google_cloud_resourcemanager_v3_organizations_proto_rawDescData []byte -) - -func file_google_cloud_resourcemanager_v3_organizations_proto_rawDescGZIP() []byte { - file_google_cloud_resourcemanager_v3_organizations_proto_rawDescOnce.Do(func() { - file_google_cloud_resourcemanager_v3_organizations_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_google_cloud_resourcemanager_v3_organizations_proto_rawDesc), len(file_google_cloud_resourcemanager_v3_organizations_proto_rawDesc))) - }) - return file_google_cloud_resourcemanager_v3_organizations_proto_rawDescData -} - -var file_google_cloud_resourcemanager_v3_organizations_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_google_cloud_resourcemanager_v3_organizations_proto_msgTypes = make([]protoimpl.MessageInfo, 6) -var file_google_cloud_resourcemanager_v3_organizations_proto_goTypes = []any{ - (Organization_State)(0), // 0: google.cloud.resourcemanager.v3.Organization.State - (*Organization)(nil), // 1: google.cloud.resourcemanager.v3.Organization - (*GetOrganizationRequest)(nil), // 2: google.cloud.resourcemanager.v3.GetOrganizationRequest - (*SearchOrganizationsRequest)(nil), // 3: google.cloud.resourcemanager.v3.SearchOrganizationsRequest - (*SearchOrganizationsResponse)(nil), // 4: google.cloud.resourcemanager.v3.SearchOrganizationsResponse - (*DeleteOrganizationMetadata)(nil), // 5: google.cloud.resourcemanager.v3.DeleteOrganizationMetadata - (*UndeleteOrganizationMetadata)(nil), // 6: google.cloud.resourcemanager.v3.UndeleteOrganizationMetadata - (*timestamppb.Timestamp)(nil), // 7: google.protobuf.Timestamp - (*iampb.GetIamPolicyRequest)(nil), // 8: google.iam.v1.GetIamPolicyRequest - (*iampb.SetIamPolicyRequest)(nil), // 9: google.iam.v1.SetIamPolicyRequest - (*iampb.TestIamPermissionsRequest)(nil), // 10: google.iam.v1.TestIamPermissionsRequest - (*iampb.Policy)(nil), // 11: google.iam.v1.Policy - (*iampb.TestIamPermissionsResponse)(nil), // 12: google.iam.v1.TestIamPermissionsResponse -} -var file_google_cloud_resourcemanager_v3_organizations_proto_depIdxs = []int32{ - 0, // 0: google.cloud.resourcemanager.v3.Organization.state:type_name -> google.cloud.resourcemanager.v3.Organization.State - 7, // 1: google.cloud.resourcemanager.v3.Organization.create_time:type_name -> google.protobuf.Timestamp - 7, // 2: google.cloud.resourcemanager.v3.Organization.update_time:type_name -> google.protobuf.Timestamp - 7, // 3: google.cloud.resourcemanager.v3.Organization.delete_time:type_name -> google.protobuf.Timestamp - 1, // 4: google.cloud.resourcemanager.v3.SearchOrganizationsResponse.organizations:type_name -> google.cloud.resourcemanager.v3.Organization - 2, // 5: google.cloud.resourcemanager.v3.Organizations.GetOrganization:input_type -> google.cloud.resourcemanager.v3.GetOrganizationRequest - 3, // 6: google.cloud.resourcemanager.v3.Organizations.SearchOrganizations:input_type -> google.cloud.resourcemanager.v3.SearchOrganizationsRequest - 8, // 7: google.cloud.resourcemanager.v3.Organizations.GetIamPolicy:input_type -> google.iam.v1.GetIamPolicyRequest - 9, // 8: google.cloud.resourcemanager.v3.Organizations.SetIamPolicy:input_type -> google.iam.v1.SetIamPolicyRequest - 10, // 9: google.cloud.resourcemanager.v3.Organizations.TestIamPermissions:input_type -> google.iam.v1.TestIamPermissionsRequest - 1, // 10: google.cloud.resourcemanager.v3.Organizations.GetOrganization:output_type -> google.cloud.resourcemanager.v3.Organization - 4, // 11: google.cloud.resourcemanager.v3.Organizations.SearchOrganizations:output_type -> google.cloud.resourcemanager.v3.SearchOrganizationsResponse - 11, // 12: google.cloud.resourcemanager.v3.Organizations.GetIamPolicy:output_type -> google.iam.v1.Policy - 11, // 13: google.cloud.resourcemanager.v3.Organizations.SetIamPolicy:output_type -> google.iam.v1.Policy - 12, // 14: google.cloud.resourcemanager.v3.Organizations.TestIamPermissions:output_type -> google.iam.v1.TestIamPermissionsResponse - 10, // [10:15] is the sub-list for method output_type - 5, // [5:10] is the sub-list for method input_type - 5, // [5:5] is the sub-list for extension type_name - 5, // [5:5] is the sub-list for extension extendee - 0, // [0:5] is the sub-list for field type_name -} - -func init() { file_google_cloud_resourcemanager_v3_organizations_proto_init() } -func file_google_cloud_resourcemanager_v3_organizations_proto_init() { - if File_google_cloud_resourcemanager_v3_organizations_proto != nil { - return - } - file_google_cloud_resourcemanager_v3_organizations_proto_msgTypes[0].OneofWrappers = []any{ - (*Organization_DirectoryCustomerId)(nil), - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: unsafe.Slice(unsafe.StringData(file_google_cloud_resourcemanager_v3_organizations_proto_rawDesc), len(file_google_cloud_resourcemanager_v3_organizations_proto_rawDesc)), - NumEnums: 1, - NumMessages: 6, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_google_cloud_resourcemanager_v3_organizations_proto_goTypes, - DependencyIndexes: file_google_cloud_resourcemanager_v3_organizations_proto_depIdxs, - EnumInfos: file_google_cloud_resourcemanager_v3_organizations_proto_enumTypes, - MessageInfos: file_google_cloud_resourcemanager_v3_organizations_proto_msgTypes, - }.Build() - File_google_cloud_resourcemanager_v3_organizations_proto = out.File - file_google_cloud_resourcemanager_v3_organizations_proto_goTypes = nil - file_google_cloud_resourcemanager_v3_organizations_proto_depIdxs = nil -} diff --git a/vendor/cloud.google.com/go/resourcemanager/apiv3/resourcemanagerpb/organizations_grpc.pb.go b/vendor/cloud.google.com/go/resourcemanager/apiv3/resourcemanagerpb/organizations_grpc.pb.go deleted file mode 100644 index 7163fffdda..0000000000 --- a/vendor/cloud.google.com/go/resourcemanager/apiv3/resourcemanagerpb/organizations_grpc.pb.go +++ /dev/null @@ -1,321 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Code generated by protoc-gen-go-grpc. DO NOT EDIT. -// versions: -// - protoc-gen-go-grpc v1.3.0 -// - protoc v6.31.0 -// source: google/cloud/resourcemanager/v3/organizations.proto - -package resourcemanagerpb - -import ( - context "context" - - iampb "cloud.google.com/go/iam/apiv1/iampb" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" -) - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 - -const ( - Organizations_GetOrganization_FullMethodName = "/google.cloud.resourcemanager.v3.Organizations/GetOrganization" - Organizations_SearchOrganizations_FullMethodName = "/google.cloud.resourcemanager.v3.Organizations/SearchOrganizations" - Organizations_GetIamPolicy_FullMethodName = "/google.cloud.resourcemanager.v3.Organizations/GetIamPolicy" - Organizations_SetIamPolicy_FullMethodName = "/google.cloud.resourcemanager.v3.Organizations/SetIamPolicy" - Organizations_TestIamPermissions_FullMethodName = "/google.cloud.resourcemanager.v3.Organizations/TestIamPermissions" -) - -// OrganizationsClient is the client API for Organizations service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. -type OrganizationsClient interface { - // Fetches an organization resource identified by the specified resource name. - GetOrganization(ctx context.Context, in *GetOrganizationRequest, opts ...grpc.CallOption) (*Organization, error) - // Searches organization resources that are visible to the user and satisfy - // the specified filter. This method returns organizations in an unspecified - // order. New organizations do not necessarily appear at the end of the - // results, and may take a small amount of time to appear. - // - // Search will only return organizations on which the user has the permission - // `resourcemanager.organizations.get` - SearchOrganizations(ctx context.Context, in *SearchOrganizationsRequest, opts ...grpc.CallOption) (*SearchOrganizationsResponse, error) - // Gets the access control policy for an organization resource. The policy may - // be empty if no such policy or resource exists. The `resource` field should - // be the organization's resource name, for example: "organizations/123". - // - // Authorization requires the IAM permission - // `resourcemanager.organizations.getIamPolicy` on the specified organization. - GetIamPolicy(ctx context.Context, in *iampb.GetIamPolicyRequest, opts ...grpc.CallOption) (*iampb.Policy, error) - // Sets the access control policy on an organization resource. Replaces any - // existing policy. The `resource` field should be the organization's resource - // name, for example: "organizations/123". - // - // Authorization requires the IAM permission - // `resourcemanager.organizations.setIamPolicy` on the specified organization. - SetIamPolicy(ctx context.Context, in *iampb.SetIamPolicyRequest, opts ...grpc.CallOption) (*iampb.Policy, error) - // Returns the permissions that a caller has on the specified organization. - // The `resource` field should be the organization's resource name, - // for example: "organizations/123". - // - // There are no permissions required for making this API call. - TestIamPermissions(ctx context.Context, in *iampb.TestIamPermissionsRequest, opts ...grpc.CallOption) (*iampb.TestIamPermissionsResponse, error) -} - -type organizationsClient struct { - cc grpc.ClientConnInterface -} - -func NewOrganizationsClient(cc grpc.ClientConnInterface) OrganizationsClient { - return &organizationsClient{cc} -} - -func (c *organizationsClient) GetOrganization(ctx context.Context, in *GetOrganizationRequest, opts ...grpc.CallOption) (*Organization, error) { - out := new(Organization) - err := c.cc.Invoke(ctx, Organizations_GetOrganization_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *organizationsClient) SearchOrganizations(ctx context.Context, in *SearchOrganizationsRequest, opts ...grpc.CallOption) (*SearchOrganizationsResponse, error) { - out := new(SearchOrganizationsResponse) - err := c.cc.Invoke(ctx, Organizations_SearchOrganizations_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *organizationsClient) GetIamPolicy(ctx context.Context, in *iampb.GetIamPolicyRequest, opts ...grpc.CallOption) (*iampb.Policy, error) { - out := new(iampb.Policy) - err := c.cc.Invoke(ctx, Organizations_GetIamPolicy_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *organizationsClient) SetIamPolicy(ctx context.Context, in *iampb.SetIamPolicyRequest, opts ...grpc.CallOption) (*iampb.Policy, error) { - out := new(iampb.Policy) - err := c.cc.Invoke(ctx, Organizations_SetIamPolicy_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *organizationsClient) TestIamPermissions(ctx context.Context, in *iampb.TestIamPermissionsRequest, opts ...grpc.CallOption) (*iampb.TestIamPermissionsResponse, error) { - out := new(iampb.TestIamPermissionsResponse) - err := c.cc.Invoke(ctx, Organizations_TestIamPermissions_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// OrganizationsServer is the server API for Organizations service. -// All implementations should embed UnimplementedOrganizationsServer -// for forward compatibility -type OrganizationsServer interface { - // Fetches an organization resource identified by the specified resource name. - GetOrganization(context.Context, *GetOrganizationRequest) (*Organization, error) - // Searches organization resources that are visible to the user and satisfy - // the specified filter. This method returns organizations in an unspecified - // order. New organizations do not necessarily appear at the end of the - // results, and may take a small amount of time to appear. - // - // Search will only return organizations on which the user has the permission - // `resourcemanager.organizations.get` - SearchOrganizations(context.Context, *SearchOrganizationsRequest) (*SearchOrganizationsResponse, error) - // Gets the access control policy for an organization resource. The policy may - // be empty if no such policy or resource exists. The `resource` field should - // be the organization's resource name, for example: "organizations/123". - // - // Authorization requires the IAM permission - // `resourcemanager.organizations.getIamPolicy` on the specified organization. - GetIamPolicy(context.Context, *iampb.GetIamPolicyRequest) (*iampb.Policy, error) - // Sets the access control policy on an organization resource. Replaces any - // existing policy. The `resource` field should be the organization's resource - // name, for example: "organizations/123". - // - // Authorization requires the IAM permission - // `resourcemanager.organizations.setIamPolicy` on the specified organization. - SetIamPolicy(context.Context, *iampb.SetIamPolicyRequest) (*iampb.Policy, error) - // Returns the permissions that a caller has on the specified organization. - // The `resource` field should be the organization's resource name, - // for example: "organizations/123". - // - // There are no permissions required for making this API call. - TestIamPermissions(context.Context, *iampb.TestIamPermissionsRequest) (*iampb.TestIamPermissionsResponse, error) -} - -// UnimplementedOrganizationsServer should be embedded to have forward compatible implementations. -type UnimplementedOrganizationsServer struct { -} - -func (UnimplementedOrganizationsServer) GetOrganization(context.Context, *GetOrganizationRequest) (*Organization, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetOrganization not implemented") -} -func (UnimplementedOrganizationsServer) SearchOrganizations(context.Context, *SearchOrganizationsRequest) (*SearchOrganizationsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method SearchOrganizations not implemented") -} -func (UnimplementedOrganizationsServer) GetIamPolicy(context.Context, *iampb.GetIamPolicyRequest) (*iampb.Policy, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetIamPolicy not implemented") -} -func (UnimplementedOrganizationsServer) SetIamPolicy(context.Context, *iampb.SetIamPolicyRequest) (*iampb.Policy, error) { - return nil, status.Errorf(codes.Unimplemented, "method SetIamPolicy not implemented") -} -func (UnimplementedOrganizationsServer) TestIamPermissions(context.Context, *iampb.TestIamPermissionsRequest) (*iampb.TestIamPermissionsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method TestIamPermissions not implemented") -} - -// UnsafeOrganizationsServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to OrganizationsServer will -// result in compilation errors. -type UnsafeOrganizationsServer interface { - mustEmbedUnimplementedOrganizationsServer() -} - -func RegisterOrganizationsServer(s grpc.ServiceRegistrar, srv OrganizationsServer) { - s.RegisterService(&Organizations_ServiceDesc, srv) -} - -func _Organizations_GetOrganization_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetOrganizationRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(OrganizationsServer).GetOrganization(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Organizations_GetOrganization_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(OrganizationsServer).GetOrganization(ctx, req.(*GetOrganizationRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Organizations_SearchOrganizations_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(SearchOrganizationsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(OrganizationsServer).SearchOrganizations(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Organizations_SearchOrganizations_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(OrganizationsServer).SearchOrganizations(ctx, req.(*SearchOrganizationsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Organizations_GetIamPolicy_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(iampb.GetIamPolicyRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(OrganizationsServer).GetIamPolicy(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Organizations_GetIamPolicy_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(OrganizationsServer).GetIamPolicy(ctx, req.(*iampb.GetIamPolicyRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Organizations_SetIamPolicy_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(iampb.SetIamPolicyRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(OrganizationsServer).SetIamPolicy(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Organizations_SetIamPolicy_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(OrganizationsServer).SetIamPolicy(ctx, req.(*iampb.SetIamPolicyRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Organizations_TestIamPermissions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(iampb.TestIamPermissionsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(OrganizationsServer).TestIamPermissions(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Organizations_TestIamPermissions_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(OrganizationsServer).TestIamPermissions(ctx, req.(*iampb.TestIamPermissionsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -// Organizations_ServiceDesc is the grpc.ServiceDesc for Organizations service. -// It's only intended for direct use with grpc.RegisterService, -// and not to be introspected or modified (even as a copy) -var Organizations_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "google.cloud.resourcemanager.v3.Organizations", - HandlerType: (*OrganizationsServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "GetOrganization", - Handler: _Organizations_GetOrganization_Handler, - }, - { - MethodName: "SearchOrganizations", - Handler: _Organizations_SearchOrganizations_Handler, - }, - { - MethodName: "GetIamPolicy", - Handler: _Organizations_GetIamPolicy_Handler, - }, - { - MethodName: "SetIamPolicy", - Handler: _Organizations_SetIamPolicy_Handler, - }, - { - MethodName: "TestIamPermissions", - Handler: _Organizations_TestIamPermissions_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "google/cloud/resourcemanager/v3/organizations.proto", -} diff --git a/vendor/cloud.google.com/go/resourcemanager/apiv3/resourcemanagerpb/projects.pb.go b/vendor/cloud.google.com/go/resourcemanager/apiv3/resourcemanagerpb/projects.pb.go deleted file mode 100644 index 2b6e839e99..0000000000 --- a/vendor/cloud.google.com/go/resourcemanager/apiv3/resourcemanagerpb/projects.pb.go +++ /dev/null @@ -1,1333 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.36.11 -// protoc v6.31.0 -// source: google/cloud/resourcemanager/v3/projects.proto - -package resourcemanagerpb - -import ( - reflect "reflect" - sync "sync" - unsafe "unsafe" - - iampb "cloud.google.com/go/iam/apiv1/iampb" - longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" - _ "google.golang.org/genproto/googleapis/api/annotations" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - fieldmaskpb "google.golang.org/protobuf/types/known/fieldmaskpb" - timestamppb "google.golang.org/protobuf/types/known/timestamppb" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// Project lifecycle states. -type Project_State int32 - -const ( - // Unspecified state. This is only used/useful for distinguishing - // unset values. - Project_STATE_UNSPECIFIED Project_State = 0 - // The normal and active state. - Project_ACTIVE Project_State = 1 - // The project has been marked for deletion by the user - // (by invoking - // [DeleteProject][google.cloud.resourcemanager.v3.Projects.DeleteProject]) - // or by the system (Google Cloud Platform). - // This can generally be reversed by invoking [UndeleteProject] - // [google.cloud.resourcemanager.v3.Projects.UndeleteProject]. - Project_DELETE_REQUESTED Project_State = 2 -) - -// Enum value maps for Project_State. -var ( - Project_State_name = map[int32]string{ - 0: "STATE_UNSPECIFIED", - 1: "ACTIVE", - 2: "DELETE_REQUESTED", - } - Project_State_value = map[string]int32{ - "STATE_UNSPECIFIED": 0, - "ACTIVE": 1, - "DELETE_REQUESTED": 2, - } -) - -func (x Project_State) Enum() *Project_State { - p := new(Project_State) - *p = x - return p -} - -func (x Project_State) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (Project_State) Descriptor() protoreflect.EnumDescriptor { - return file_google_cloud_resourcemanager_v3_projects_proto_enumTypes[0].Descriptor() -} - -func (Project_State) Type() protoreflect.EnumType { - return &file_google_cloud_resourcemanager_v3_projects_proto_enumTypes[0] -} - -func (x Project_State) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use Project_State.Descriptor instead. -func (Project_State) EnumDescriptor() ([]byte, []int) { - return file_google_cloud_resourcemanager_v3_projects_proto_rawDescGZIP(), []int{0, 0} -} - -// A project is a high-level Google Cloud entity. It is a -// container for ACLs, APIs, App Engine Apps, VMs, and other -// Google Cloud Platform resources. -type Project struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Output only. The unique resource name of the project. It is an int64 - // generated number prefixed by "projects/". - // - // Example: `projects/415104041262` - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // Optional. A reference to a parent Resource. eg., `organizations/123` or - // `folders/876`. - Parent string `protobuf:"bytes,2,opt,name=parent,proto3" json:"parent,omitempty"` - // Immutable. The unique, user-assigned id of the project. - // It must be 6 to 30 lowercase ASCII letters, digits, or hyphens. - // It must start with a letter. - // Trailing hyphens are prohibited. - // - // Example: `tokyo-rain-123` - ProjectId string `protobuf:"bytes,3,opt,name=project_id,json=projectId,proto3" json:"project_id,omitempty"` - // Output only. The project lifecycle state. - State Project_State `protobuf:"varint,4,opt,name=state,proto3,enum=google.cloud.resourcemanager.v3.Project_State" json:"state,omitempty"` - // Optional. A user-assigned display name of the project. - // When present it must be between 4 to 30 characters. - // Allowed characters are: lowercase and uppercase letters, numbers, - // hyphen, single-quote, double-quote, space, and exclamation point. - // - // Example: `My Project` - DisplayName string `protobuf:"bytes,5,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"` - // Output only. Creation time. - CreateTime *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"` - // Output only. The most recent time this resource was modified. - UpdateTime *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=update_time,json=updateTime,proto3" json:"update_time,omitempty"` - // Output only. The time at which this resource was requested for deletion. - DeleteTime *timestamppb.Timestamp `protobuf:"bytes,8,opt,name=delete_time,json=deleteTime,proto3" json:"delete_time,omitempty"` - // Output only. A checksum computed by the server based on the current value - // of the Project resource. This may be sent on update and delete requests to - // ensure the client has an up-to-date value before proceeding. - Etag string `protobuf:"bytes,9,opt,name=etag,proto3" json:"etag,omitempty"` - // Optional. The labels associated with this project. - // - // Label keys must be between 1 and 63 characters long and must conform - // to the following regular expression: \[a-z\](\[-a-z0-9\]*\[a-z0-9\])?. - // - // Label values must be between 0 and 63 characters long and must conform - // to the regular expression (\[a-z\](\[-a-z0-9\]*\[a-z0-9\])?)?. - // - // No more than 64 labels can be associated with a given resource. - // - // Clients should store labels in a representation such as JSON that does not - // depend on specific characters being disallowed. - // - // Example: `"myBusinessDimension" : "businessValue"` - Labels map[string]string `protobuf:"bytes,10,rep,name=labels,proto3" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *Project) Reset() { - *x = Project{} - mi := &file_google_cloud_resourcemanager_v3_projects_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *Project) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Project) ProtoMessage() {} - -func (x *Project) ProtoReflect() protoreflect.Message { - mi := &file_google_cloud_resourcemanager_v3_projects_proto_msgTypes[0] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Project.ProtoReflect.Descriptor instead. -func (*Project) Descriptor() ([]byte, []int) { - return file_google_cloud_resourcemanager_v3_projects_proto_rawDescGZIP(), []int{0} -} - -func (x *Project) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *Project) GetParent() string { - if x != nil { - return x.Parent - } - return "" -} - -func (x *Project) GetProjectId() string { - if x != nil { - return x.ProjectId - } - return "" -} - -func (x *Project) GetState() Project_State { - if x != nil { - return x.State - } - return Project_STATE_UNSPECIFIED -} - -func (x *Project) GetDisplayName() string { - if x != nil { - return x.DisplayName - } - return "" -} - -func (x *Project) GetCreateTime() *timestamppb.Timestamp { - if x != nil { - return x.CreateTime - } - return nil -} - -func (x *Project) GetUpdateTime() *timestamppb.Timestamp { - if x != nil { - return x.UpdateTime - } - return nil -} - -func (x *Project) GetDeleteTime() *timestamppb.Timestamp { - if x != nil { - return x.DeleteTime - } - return nil -} - -func (x *Project) GetEtag() string { - if x != nil { - return x.Etag - } - return "" -} - -func (x *Project) GetLabels() map[string]string { - if x != nil { - return x.Labels - } - return nil -} - -// The request sent to the -// [GetProject][google.cloud.resourcemanager.v3.Projects.GetProject] -// method. -type GetProjectRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Required. The name of the project (for example, `projects/415104041262`). - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *GetProjectRequest) Reset() { - *x = GetProjectRequest{} - mi := &file_google_cloud_resourcemanager_v3_projects_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *GetProjectRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetProjectRequest) ProtoMessage() {} - -func (x *GetProjectRequest) ProtoReflect() protoreflect.Message { - mi := &file_google_cloud_resourcemanager_v3_projects_proto_msgTypes[1] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetProjectRequest.ProtoReflect.Descriptor instead. -func (*GetProjectRequest) Descriptor() ([]byte, []int) { - return file_google_cloud_resourcemanager_v3_projects_proto_rawDescGZIP(), []int{1} -} - -func (x *GetProjectRequest) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -// The request sent to the -// [ListProjects][google.cloud.resourcemanager.v3.Projects.ListProjects] -// method. -type ListProjectsRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Required. The name of the parent resource whose projects are being listed. - // Only children of this parent resource are listed; descendants are not - // listed. - // - // If the parent is a folder, use the value `folders/{folder_id}`. If the - // parent is an organization, use the value `organizations/{org_id}`. - Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` - // Optional. A pagination token returned from a previous call to - // [ListProjects] [google.cloud.resourcemanager.v3.Projects.ListProjects] that - // indicates from where listing should continue. - PageToken string `protobuf:"bytes,2,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` - // Optional. The maximum number of projects to return in the response. - // The server can return fewer projects than requested. - // If unspecified, server picks an appropriate default. - PageSize int32 `protobuf:"varint,3,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` - // Optional. Indicate that projects in the `DELETE_REQUESTED` state should - // also be returned. Normally only `ACTIVE` projects are returned. - ShowDeleted bool `protobuf:"varint,4,opt,name=show_deleted,json=showDeleted,proto3" json:"show_deleted,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ListProjectsRequest) Reset() { - *x = ListProjectsRequest{} - mi := &file_google_cloud_resourcemanager_v3_projects_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ListProjectsRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListProjectsRequest) ProtoMessage() {} - -func (x *ListProjectsRequest) ProtoReflect() protoreflect.Message { - mi := &file_google_cloud_resourcemanager_v3_projects_proto_msgTypes[2] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ListProjectsRequest.ProtoReflect.Descriptor instead. -func (*ListProjectsRequest) Descriptor() ([]byte, []int) { - return file_google_cloud_resourcemanager_v3_projects_proto_rawDescGZIP(), []int{2} -} - -func (x *ListProjectsRequest) GetParent() string { - if x != nil { - return x.Parent - } - return "" -} - -func (x *ListProjectsRequest) GetPageToken() string { - if x != nil { - return x.PageToken - } - return "" -} - -func (x *ListProjectsRequest) GetPageSize() int32 { - if x != nil { - return x.PageSize - } - return 0 -} - -func (x *ListProjectsRequest) GetShowDeleted() bool { - if x != nil { - return x.ShowDeleted - } - return false -} - -// A page of the response received from the -// [ListProjects][google.cloud.resourcemanager.v3.Projects.ListProjects] -// method. -// -// A paginated response where more pages are available has -// `next_page_token` set. This token can be used in a subsequent request to -// retrieve the next request page. -// -// NOTE: A response may contain fewer elements than the request `page_size` and -// still have a `next_page_token`. -type ListProjectsResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - // The list of Projects under the parent. This list can be paginated. - Projects []*Project `protobuf:"bytes,1,rep,name=projects,proto3" json:"projects,omitempty"` - // Pagination token. - // - // If the result set is too large to fit in a single response, this token - // is returned. It encodes the position of the current result cursor. - // Feeding this value into a new list request with the `page_token` parameter - // gives the next page of the results. - // - // When `next_page_token` is not filled in, there is no next page and - // the list returned is the last page in the result set. - // - // Pagination tokens have a limited lifetime. - NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ListProjectsResponse) Reset() { - *x = ListProjectsResponse{} - mi := &file_google_cloud_resourcemanager_v3_projects_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ListProjectsResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListProjectsResponse) ProtoMessage() {} - -func (x *ListProjectsResponse) ProtoReflect() protoreflect.Message { - mi := &file_google_cloud_resourcemanager_v3_projects_proto_msgTypes[3] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ListProjectsResponse.ProtoReflect.Descriptor instead. -func (*ListProjectsResponse) Descriptor() ([]byte, []int) { - return file_google_cloud_resourcemanager_v3_projects_proto_rawDescGZIP(), []int{3} -} - -func (x *ListProjectsResponse) GetProjects() []*Project { - if x != nil { - return x.Projects - } - return nil -} - -func (x *ListProjectsResponse) GetNextPageToken() string { - if x != nil { - return x.NextPageToken - } - return "" -} - -// The request sent to the -// [SearchProjects][google.cloud.resourcemanager.v3.Projects.SearchProjects] -// method. -type SearchProjectsRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Optional. A query string for searching for projects that the caller has - // `resourcemanager.projects.get` permission to. If multiple fields are - // included in the query, then it will return results that match any of the - // fields. Some eligible fields are: - // - // - **`displayName`, `name`**: Filters by displayName. - // - **`parent`**: Project's parent (for example: `folders/123`, - // `organizations/*`). Prefer `parent` field over `parent.type` and - // `parent.id`. - // - **`parent.type`**: Parent's type: `folder` or `organization`. - // - **`parent.id`**: Parent's id number (for example: `123`). - // - **`id`, `projectId`**: Filters by projectId. - // - **`state`, `lifecycleState`**: Filters by state. - // - **`labels`**: Filters by label name or value. - // - **`labels.` (where `` is the name of a label)**: Filters by label - // name. - // - // Search expressions are case insensitive. - // - // Some examples queries: - // - // - **`name:how*`**: The project's name starts with "how". - // - **`name:Howl`**: The project's name is `Howl` or `howl`. - // - **`name:HOWL`**: Equivalent to above. - // - **`NAME:howl`**: Equivalent to above. - // - **`labels.color:*`**: The project has the label `color`. - // - **`labels.color:red`**: The project's label `color` has the value `red`. - // - **`labels.color:red labels.size:big`**: The project's label `color` has - // the value `red` or its label `size` has the value `big`. - // - // If no query is specified, the call will return projects for which the user - // has the `resourcemanager.projects.get` permission. - Query string `protobuf:"bytes,1,opt,name=query,proto3" json:"query,omitempty"` - // Optional. A pagination token returned from a previous call to - // [ListProjects] [google.cloud.resourcemanager.v3.Projects.ListProjects] that - // indicates from where listing should continue. - PageToken string `protobuf:"bytes,2,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` - // Optional. The maximum number of projects to return in the response. - // The server can return fewer projects than requested. - // If unspecified, server picks an appropriate default. - PageSize int32 `protobuf:"varint,3,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *SearchProjectsRequest) Reset() { - *x = SearchProjectsRequest{} - mi := &file_google_cloud_resourcemanager_v3_projects_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *SearchProjectsRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SearchProjectsRequest) ProtoMessage() {} - -func (x *SearchProjectsRequest) ProtoReflect() protoreflect.Message { - mi := &file_google_cloud_resourcemanager_v3_projects_proto_msgTypes[4] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SearchProjectsRequest.ProtoReflect.Descriptor instead. -func (*SearchProjectsRequest) Descriptor() ([]byte, []int) { - return file_google_cloud_resourcemanager_v3_projects_proto_rawDescGZIP(), []int{4} -} - -func (x *SearchProjectsRequest) GetQuery() string { - if x != nil { - return x.Query - } - return "" -} - -func (x *SearchProjectsRequest) GetPageToken() string { - if x != nil { - return x.PageToken - } - return "" -} - -func (x *SearchProjectsRequest) GetPageSize() int32 { - if x != nil { - return x.PageSize - } - return 0 -} - -// A page of the response received from the -// [SearchProjects][google.cloud.resourcemanager.v3.Projects.SearchProjects] -// method. -// -// A paginated response where more pages are available has -// `next_page_token` set. This token can be used in a subsequent request to -// retrieve the next request page. -type SearchProjectsResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - // The list of Projects that matched the list filter query. This list can - // be paginated. - Projects []*Project `protobuf:"bytes,1,rep,name=projects,proto3" json:"projects,omitempty"` - // Pagination token. - // - // If the result set is too large to fit in a single response, this token - // is returned. It encodes the position of the current result cursor. - // Feeding this value into a new list request with the `page_token` parameter - // gives the next page of the results. - // - // When `next_page_token` is not filled in, there is no next page and - // the list returned is the last page in the result set. - // - // Pagination tokens have a limited lifetime. - NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *SearchProjectsResponse) Reset() { - *x = SearchProjectsResponse{} - mi := &file_google_cloud_resourcemanager_v3_projects_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *SearchProjectsResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SearchProjectsResponse) ProtoMessage() {} - -func (x *SearchProjectsResponse) ProtoReflect() protoreflect.Message { - mi := &file_google_cloud_resourcemanager_v3_projects_proto_msgTypes[5] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SearchProjectsResponse.ProtoReflect.Descriptor instead. -func (*SearchProjectsResponse) Descriptor() ([]byte, []int) { - return file_google_cloud_resourcemanager_v3_projects_proto_rawDescGZIP(), []int{5} -} - -func (x *SearchProjectsResponse) GetProjects() []*Project { - if x != nil { - return x.Projects - } - return nil -} - -func (x *SearchProjectsResponse) GetNextPageToken() string { - if x != nil { - return x.NextPageToken - } - return "" -} - -// The request sent to the -// [CreateProject][google.cloud.resourcemanager.v3.Projects.CreateProject] -// method. -type CreateProjectRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Required. The Project to create. - // - // Project ID is required. If the requested ID is unavailable, the request - // fails. - // - // If the `parent` field is set, the `resourcemanager.projects.create` - // permission is checked on the parent resource. If no parent is set and - // the authorization credentials belong to an Organization, the parent - // will be set to that Organization. - Project *Project `protobuf:"bytes,1,opt,name=project,proto3" json:"project,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *CreateProjectRequest) Reset() { - *x = CreateProjectRequest{} - mi := &file_google_cloud_resourcemanager_v3_projects_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *CreateProjectRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CreateProjectRequest) ProtoMessage() {} - -func (x *CreateProjectRequest) ProtoReflect() protoreflect.Message { - mi := &file_google_cloud_resourcemanager_v3_projects_proto_msgTypes[6] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CreateProjectRequest.ProtoReflect.Descriptor instead. -func (*CreateProjectRequest) Descriptor() ([]byte, []int) { - return file_google_cloud_resourcemanager_v3_projects_proto_rawDescGZIP(), []int{6} -} - -func (x *CreateProjectRequest) GetProject() *Project { - if x != nil { - return x.Project - } - return nil -} - -// A status object which is used as the `metadata` field for the Operation -// returned by CreateProject. It provides insight for when significant phases of -// Project creation have completed. -type CreateProjectMetadata struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Creation time of the project creation workflow. - CreateTime *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"` - // True if the project can be retrieved using `GetProject`. No other - // operations on the project are guaranteed to work until the project creation - // is complete. - Gettable bool `protobuf:"varint,2,opt,name=gettable,proto3" json:"gettable,omitempty"` - // True if the project creation process is complete. - Ready bool `protobuf:"varint,3,opt,name=ready,proto3" json:"ready,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *CreateProjectMetadata) Reset() { - *x = CreateProjectMetadata{} - mi := &file_google_cloud_resourcemanager_v3_projects_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *CreateProjectMetadata) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CreateProjectMetadata) ProtoMessage() {} - -func (x *CreateProjectMetadata) ProtoReflect() protoreflect.Message { - mi := &file_google_cloud_resourcemanager_v3_projects_proto_msgTypes[7] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CreateProjectMetadata.ProtoReflect.Descriptor instead. -func (*CreateProjectMetadata) Descriptor() ([]byte, []int) { - return file_google_cloud_resourcemanager_v3_projects_proto_rawDescGZIP(), []int{7} -} - -func (x *CreateProjectMetadata) GetCreateTime() *timestamppb.Timestamp { - if x != nil { - return x.CreateTime - } - return nil -} - -func (x *CreateProjectMetadata) GetGettable() bool { - if x != nil { - return x.Gettable - } - return false -} - -func (x *CreateProjectMetadata) GetReady() bool { - if x != nil { - return x.Ready - } - return false -} - -// The request sent to the -// [UpdateProject][google.cloud.resourcemanager.v3.Projects.UpdateProject] -// method. -// -// Only the `display_name` and `labels` fields can be change. Use the -// [MoveProject][google.cloud.resourcemanager.v3.Projects.MoveProject] method to -// change the `parent` field. -type UpdateProjectRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Required. The new definition of the project. - Project *Project `protobuf:"bytes,1,opt,name=project,proto3" json:"project,omitempty"` - // Optional. An update mask to selectively update fields. - UpdateMask *fieldmaskpb.FieldMask `protobuf:"bytes,2,opt,name=update_mask,json=updateMask,proto3" json:"update_mask,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *UpdateProjectRequest) Reset() { - *x = UpdateProjectRequest{} - mi := &file_google_cloud_resourcemanager_v3_projects_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *UpdateProjectRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UpdateProjectRequest) ProtoMessage() {} - -func (x *UpdateProjectRequest) ProtoReflect() protoreflect.Message { - mi := &file_google_cloud_resourcemanager_v3_projects_proto_msgTypes[8] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use UpdateProjectRequest.ProtoReflect.Descriptor instead. -func (*UpdateProjectRequest) Descriptor() ([]byte, []int) { - return file_google_cloud_resourcemanager_v3_projects_proto_rawDescGZIP(), []int{8} -} - -func (x *UpdateProjectRequest) GetProject() *Project { - if x != nil { - return x.Project - } - return nil -} - -func (x *UpdateProjectRequest) GetUpdateMask() *fieldmaskpb.FieldMask { - if x != nil { - return x.UpdateMask - } - return nil -} - -// A status object which is used as the `metadata` field for the Operation -// returned by UpdateProject. -type UpdateProjectMetadata struct { - state protoimpl.MessageState `protogen:"open.v1"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *UpdateProjectMetadata) Reset() { - *x = UpdateProjectMetadata{} - mi := &file_google_cloud_resourcemanager_v3_projects_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *UpdateProjectMetadata) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UpdateProjectMetadata) ProtoMessage() {} - -func (x *UpdateProjectMetadata) ProtoReflect() protoreflect.Message { - mi := &file_google_cloud_resourcemanager_v3_projects_proto_msgTypes[9] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use UpdateProjectMetadata.ProtoReflect.Descriptor instead. -func (*UpdateProjectMetadata) Descriptor() ([]byte, []int) { - return file_google_cloud_resourcemanager_v3_projects_proto_rawDescGZIP(), []int{9} -} - -// The request sent to -// [MoveProject][google.cloud.resourcemanager.v3.Projects.MoveProject] -// method. -type MoveProjectRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Required. The name of the project to move. - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // Required. The new parent to move the Project under. - DestinationParent string `protobuf:"bytes,2,opt,name=destination_parent,json=destinationParent,proto3" json:"destination_parent,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *MoveProjectRequest) Reset() { - *x = MoveProjectRequest{} - mi := &file_google_cloud_resourcemanager_v3_projects_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *MoveProjectRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MoveProjectRequest) ProtoMessage() {} - -func (x *MoveProjectRequest) ProtoReflect() protoreflect.Message { - mi := &file_google_cloud_resourcemanager_v3_projects_proto_msgTypes[10] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use MoveProjectRequest.ProtoReflect.Descriptor instead. -func (*MoveProjectRequest) Descriptor() ([]byte, []int) { - return file_google_cloud_resourcemanager_v3_projects_proto_rawDescGZIP(), []int{10} -} - -func (x *MoveProjectRequest) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *MoveProjectRequest) GetDestinationParent() string { - if x != nil { - return x.DestinationParent - } - return "" -} - -// A status object which is used as the `metadata` field for the Operation -// returned by MoveProject. -type MoveProjectMetadata struct { - state protoimpl.MessageState `protogen:"open.v1"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *MoveProjectMetadata) Reset() { - *x = MoveProjectMetadata{} - mi := &file_google_cloud_resourcemanager_v3_projects_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *MoveProjectMetadata) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MoveProjectMetadata) ProtoMessage() {} - -func (x *MoveProjectMetadata) ProtoReflect() protoreflect.Message { - mi := &file_google_cloud_resourcemanager_v3_projects_proto_msgTypes[11] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use MoveProjectMetadata.ProtoReflect.Descriptor instead. -func (*MoveProjectMetadata) Descriptor() ([]byte, []int) { - return file_google_cloud_resourcemanager_v3_projects_proto_rawDescGZIP(), []int{11} -} - -// [DeleteProject][google.cloud.resourcemanager.v3.Projects.DeleteProject] -// method. -type DeleteProjectRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Required. The name of the Project (for example, `projects/415104041262`). - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *DeleteProjectRequest) Reset() { - *x = DeleteProjectRequest{} - mi := &file_google_cloud_resourcemanager_v3_projects_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *DeleteProjectRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DeleteProjectRequest) ProtoMessage() {} - -func (x *DeleteProjectRequest) ProtoReflect() protoreflect.Message { - mi := &file_google_cloud_resourcemanager_v3_projects_proto_msgTypes[12] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DeleteProjectRequest.ProtoReflect.Descriptor instead. -func (*DeleteProjectRequest) Descriptor() ([]byte, []int) { - return file_google_cloud_resourcemanager_v3_projects_proto_rawDescGZIP(), []int{12} -} - -func (x *DeleteProjectRequest) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -// A status object which is used as the `metadata` field for the Operation -// returned by `DeleteProject`. -type DeleteProjectMetadata struct { - state protoimpl.MessageState `protogen:"open.v1"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *DeleteProjectMetadata) Reset() { - *x = DeleteProjectMetadata{} - mi := &file_google_cloud_resourcemanager_v3_projects_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *DeleteProjectMetadata) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DeleteProjectMetadata) ProtoMessage() {} - -func (x *DeleteProjectMetadata) ProtoReflect() protoreflect.Message { - mi := &file_google_cloud_resourcemanager_v3_projects_proto_msgTypes[13] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DeleteProjectMetadata.ProtoReflect.Descriptor instead. -func (*DeleteProjectMetadata) Descriptor() ([]byte, []int) { - return file_google_cloud_resourcemanager_v3_projects_proto_rawDescGZIP(), []int{13} -} - -// The request sent to the [UndeleteProject] -// [google.cloud.resourcemanager.v3.Projects.UndeleteProject] -// method. -type UndeleteProjectRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Required. The name of the project (for example, `projects/415104041262`). - // - // Required. - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *UndeleteProjectRequest) Reset() { - *x = UndeleteProjectRequest{} - mi := &file_google_cloud_resourcemanager_v3_projects_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *UndeleteProjectRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UndeleteProjectRequest) ProtoMessage() {} - -func (x *UndeleteProjectRequest) ProtoReflect() protoreflect.Message { - mi := &file_google_cloud_resourcemanager_v3_projects_proto_msgTypes[14] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use UndeleteProjectRequest.ProtoReflect.Descriptor instead. -func (*UndeleteProjectRequest) Descriptor() ([]byte, []int) { - return file_google_cloud_resourcemanager_v3_projects_proto_rawDescGZIP(), []int{14} -} - -func (x *UndeleteProjectRequest) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -// A status object which is used as the `metadata` field for the Operation -// returned by `UndeleteProject`. -type UndeleteProjectMetadata struct { - state protoimpl.MessageState `protogen:"open.v1"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *UndeleteProjectMetadata) Reset() { - *x = UndeleteProjectMetadata{} - mi := &file_google_cloud_resourcemanager_v3_projects_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *UndeleteProjectMetadata) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UndeleteProjectMetadata) ProtoMessage() {} - -func (x *UndeleteProjectMetadata) ProtoReflect() protoreflect.Message { - mi := &file_google_cloud_resourcemanager_v3_projects_proto_msgTypes[15] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use UndeleteProjectMetadata.ProtoReflect.Descriptor instead. -func (*UndeleteProjectMetadata) Descriptor() ([]byte, []int) { - return file_google_cloud_resourcemanager_v3_projects_proto_rawDescGZIP(), []int{15} -} - -var File_google_cloud_resourcemanager_v3_projects_proto protoreflect.FileDescriptor - -const file_google_cloud_resourcemanager_v3_projects_proto_rawDesc = "" + - "\n" + - ".google/cloud/resourcemanager/v3/projects.proto\x12\x1fgoogle.cloud.resourcemanager.v3\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1egoogle/iam/v1/iam_policy.proto\x1a\x1agoogle/iam/v1/policy.proto\x1a#google/longrunning/operations.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xce\x05\n" + - "\aProject\x12\x17\n" + - "\x04name\x18\x01 \x01(\tB\x03\xe0A\x03R\x04name\x12\x1b\n" + - "\x06parent\x18\x02 \x01(\tB\x03\xe0A\x01R\x06parent\x12\"\n" + - "\n" + - "project_id\x18\x03 \x01(\tB\x03\xe0A\x05R\tprojectId\x12I\n" + - "\x05state\x18\x04 \x01(\x0e2..google.cloud.resourcemanager.v3.Project.StateB\x03\xe0A\x03R\x05state\x12&\n" + - "\fdisplay_name\x18\x05 \x01(\tB\x03\xe0A\x01R\vdisplayName\x12@\n" + - "\vcreate_time\x18\x06 \x01(\v2\x1a.google.protobuf.TimestampB\x03\xe0A\x03R\n" + - "createTime\x12@\n" + - "\vupdate_time\x18\a \x01(\v2\x1a.google.protobuf.TimestampB\x03\xe0A\x03R\n" + - "updateTime\x12@\n" + - "\vdelete_time\x18\b \x01(\v2\x1a.google.protobuf.TimestampB\x03\xe0A\x03R\n" + - "deleteTime\x12\x17\n" + - "\x04etag\x18\t \x01(\tB\x03\xe0A\x03R\x04etag\x12Q\n" + - "\x06labels\x18\n" + - " \x03(\v24.google.cloud.resourcemanager.v3.Project.LabelsEntryB\x03\xe0A\x01R\x06labels\x1a9\n" + - "\vLabelsEntry\x12\x10\n" + - "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" + - "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\"@\n" + - "\x05State\x12\x15\n" + - "\x11STATE_UNSPECIFIED\x10\x00\x12\n" + - "\n" + - "\x06ACTIVE\x10\x01\x12\x14\n" + - "\x10DELETE_REQUESTED\x10\x02:G\xeaAD\n" + - "+cloudresourcemanager.googleapis.com/Project\x12\x12projects/{project}R\x01\x01\"\\\n" + - "\x11GetProjectRequest\x12G\n" + - "\x04name\x18\x01 \x01(\tB3\xe0A\x02\xfaA-\n" + - "+cloudresourcemanager.googleapis.com/ProjectR\x04name\"\xa6\x01\n" + - "\x13ListProjectsRequest\x12!\n" + - "\x06parent\x18\x01 \x01(\tB\t\xe0A\x02\xfaA\x03\x12\x01*R\x06parent\x12\"\n" + - "\n" + - "page_token\x18\x02 \x01(\tB\x03\xe0A\x01R\tpageToken\x12 \n" + - "\tpage_size\x18\x03 \x01(\x05B\x03\xe0A\x01R\bpageSize\x12&\n" + - "\fshow_deleted\x18\x04 \x01(\bB\x03\xe0A\x01R\vshowDeleted\"\x84\x01\n" + - "\x14ListProjectsResponse\x12D\n" + - "\bprojects\x18\x01 \x03(\v2(.google.cloud.resourcemanager.v3.ProjectR\bprojects\x12&\n" + - "\x0fnext_page_token\x18\x02 \x01(\tR\rnextPageToken\"x\n" + - "\x15SearchProjectsRequest\x12\x19\n" + - "\x05query\x18\x01 \x01(\tB\x03\xe0A\x01R\x05query\x12\"\n" + - "\n" + - "page_token\x18\x02 \x01(\tB\x03\xe0A\x01R\tpageToken\x12 \n" + - "\tpage_size\x18\x03 \x01(\x05B\x03\xe0A\x01R\bpageSize\"\x86\x01\n" + - "\x16SearchProjectsResponse\x12D\n" + - "\bprojects\x18\x01 \x03(\v2(.google.cloud.resourcemanager.v3.ProjectR\bprojects\x12&\n" + - "\x0fnext_page_token\x18\x02 \x01(\tR\rnextPageToken\"_\n" + - "\x14CreateProjectRequest\x12G\n" + - "\aproject\x18\x01 \x01(\v2(.google.cloud.resourcemanager.v3.ProjectB\x03\xe0A\x02R\aproject\"\x86\x01\n" + - "\x15CreateProjectMetadata\x12;\n" + - "\vcreate_time\x18\x01 \x01(\v2\x1a.google.protobuf.TimestampR\n" + - "createTime\x12\x1a\n" + - "\bgettable\x18\x02 \x01(\bR\bgettable\x12\x14\n" + - "\x05ready\x18\x03 \x01(\bR\x05ready\"\xa1\x01\n" + - "\x14UpdateProjectRequest\x12G\n" + - "\aproject\x18\x01 \x01(\v2(.google.cloud.resourcemanager.v3.ProjectB\x03\xe0A\x02R\aproject\x12@\n" + - "\vupdate_mask\x18\x02 \x01(\v2\x1a.google.protobuf.FieldMaskB\x03\xe0A\x01R\n" + - "updateMask\"\x17\n" + - "\x15UpdateProjectMetadata\"\x97\x01\n" + - "\x12MoveProjectRequest\x12G\n" + - "\x04name\x18\x01 \x01(\tB3\xe0A\x02\xfaA-\n" + - "+cloudresourcemanager.googleapis.com/ProjectR\x04name\x128\n" + - "\x12destination_parent\x18\x02 \x01(\tB\t\xe0A\x02\xfaA\x03\x12\x01*R\x11destinationParent\"\x15\n" + - "\x13MoveProjectMetadata\"_\n" + - "\x14DeleteProjectRequest\x12G\n" + - "\x04name\x18\x01 \x01(\tB3\xe0A\x02\xfaA-\n" + - "+cloudresourcemanager.googleapis.com/ProjectR\x04name\"\x17\n" + - "\x15DeleteProjectMetadata\"a\n" + - "\x16UndeleteProjectRequest\x12G\n" + - "\x04name\x18\x01 \x01(\tB3\xe0A\x02\xfaA-\n" + - "+cloudresourcemanager.googleapis.com/ProjectR\x04name\"\x19\n" + - "\x17UndeleteProjectMetadata2\x8f\x10\n" + - "\bProjects\x12\x90\x01\n" + - "\n" + - "GetProject\x122.google.cloud.resourcemanager.v3.GetProjectRequest\x1a(.google.cloud.resourcemanager.v3.Project\"$\xdaA\x04name\x82\xd3\xe4\x93\x02\x17\x12\x15/v3/{name=projects/*}\x12\x9a\x01\n" + - "\fListProjects\x124.google.cloud.resourcemanager.v3.ListProjectsRequest\x1a5.google.cloud.resourcemanager.v3.ListProjectsResponse\"\x1d\xdaA\x06parent\x82\xd3\xe4\x93\x02\x0e\x12\f/v3/projects\x12\xa6\x01\n" + - "\x0eSearchProjects\x126.google.cloud.resourcemanager.v3.SearchProjectsRequest\x1a7.google.cloud.resourcemanager.v3.SearchProjectsResponse\"#\xdaA\x05query\x82\xd3\xe4\x93\x02\x15\x12\x13/v3/projects:search\x12\xb1\x01\n" + - "\rCreateProject\x125.google.cloud.resourcemanager.v3.CreateProjectRequest\x1a\x1d.google.longrunning.Operation\"J\xcaA \n" + - "\aProject\x12\x15CreateProjectMetadata\xdaA\aproject\x82\xd3\xe4\x93\x02\x17:\aproject\"\f/v3/projects\x12\xce\x01\n" + - "\rUpdateProject\x125.google.cloud.resourcemanager.v3.UpdateProjectRequest\x1a\x1d.google.longrunning.Operation\"g\xcaA \n" + - "\aProject\x12\x15UpdateProjectMetadata\xdaA\x13project,update_mask\x82\xd3\xe4\x93\x02(:\aproject2\x1d/v3/{project.name=projects/*}\x12\xc4\x01\n" + - "\vMoveProject\x123.google.cloud.resourcemanager.v3.MoveProjectRequest\x1a\x1d.google.longrunning.Operation\"a\xcaA\x1e\n" + - "\aProject\x12\x13MoveProjectMetadata\xdaA\x18name, destination_parent\x82\xd3\xe4\x93\x02\x1f:\x01*\"\x1a/v3/{name=projects/*}:move\x12\xae\x01\n" + - "\rDeleteProject\x125.google.cloud.resourcemanager.v3.DeleteProjectRequest\x1a\x1d.google.longrunning.Operation\"G\xcaA \n" + - "\aProject\x12\x15DeleteProjectMetadata\xdaA\x04name\x82\xd3\xe4\x93\x02\x17*\x15/v3/{name=projects/*}\x12\xc0\x01\n" + - "\x0fUndeleteProject\x127.google.cloud.resourcemanager.v3.UndeleteProjectRequest\x1a\x1d.google.longrunning.Operation\"U\xcaA\"\n" + - "\aProject\x12\x17UndeleteProjectMetadata\xdaA\x04name\x82\xd3\xe4\x93\x02#:\x01*\"\x1e/v3/{name=projects/*}:undelete\x12\x87\x01\n" + - "\fGetIamPolicy\x12\".google.iam.v1.GetIamPolicyRequest\x1a\x15.google.iam.v1.Policy\"<\xdaA\bresource\x82\xd3\xe4\x93\x02+:\x01*\"&/v3/{resource=projects/*}:getIamPolicy\x12\x8f\x01\n" + - "\fSetIamPolicy\x12\".google.iam.v1.SetIamPolicyRequest\x1a\x15.google.iam.v1.Policy\"D\xdaA\x10resource, policy\x82\xd3\xe4\x93\x02+:\x01*\"&/v3/{resource=projects/*}:setIamPolicy\x12\xba\x01\n" + - "\x12TestIamPermissions\x12(.google.iam.v1.TestIamPermissionsRequest\x1a).google.iam.v1.TestIamPermissionsResponse\"O\xdaA\x15resource, permissions\x82\xd3\xe4\x93\x021:\x01*\",/v3/{resource=projects/*}:testIamPermissions\x1a\x90\x01\xcaA#cloudresourcemanager.googleapis.com\xd2Aghttps://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-platform.read-onlyB\xee\x01\n" + - "#com.google.cloud.resourcemanager.v3B\rProjectsProtoP\x01ZMcloud.google.com/go/resourcemanager/apiv3/resourcemanagerpb;resourcemanagerpb\xaa\x02\x1fGoogle.Cloud.ResourceManager.V3\xca\x02\x1fGoogle\\Cloud\\ResourceManager\\V3\xea\x02\"Google::Cloud::ResourceManager::V3b\x06proto3" - -var ( - file_google_cloud_resourcemanager_v3_projects_proto_rawDescOnce sync.Once - file_google_cloud_resourcemanager_v3_projects_proto_rawDescData []byte -) - -func file_google_cloud_resourcemanager_v3_projects_proto_rawDescGZIP() []byte { - file_google_cloud_resourcemanager_v3_projects_proto_rawDescOnce.Do(func() { - file_google_cloud_resourcemanager_v3_projects_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_google_cloud_resourcemanager_v3_projects_proto_rawDesc), len(file_google_cloud_resourcemanager_v3_projects_proto_rawDesc))) - }) - return file_google_cloud_resourcemanager_v3_projects_proto_rawDescData -} - -var file_google_cloud_resourcemanager_v3_projects_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_google_cloud_resourcemanager_v3_projects_proto_msgTypes = make([]protoimpl.MessageInfo, 17) -var file_google_cloud_resourcemanager_v3_projects_proto_goTypes = []any{ - (Project_State)(0), // 0: google.cloud.resourcemanager.v3.Project.State - (*Project)(nil), // 1: google.cloud.resourcemanager.v3.Project - (*GetProjectRequest)(nil), // 2: google.cloud.resourcemanager.v3.GetProjectRequest - (*ListProjectsRequest)(nil), // 3: google.cloud.resourcemanager.v3.ListProjectsRequest - (*ListProjectsResponse)(nil), // 4: google.cloud.resourcemanager.v3.ListProjectsResponse - (*SearchProjectsRequest)(nil), // 5: google.cloud.resourcemanager.v3.SearchProjectsRequest - (*SearchProjectsResponse)(nil), // 6: google.cloud.resourcemanager.v3.SearchProjectsResponse - (*CreateProjectRequest)(nil), // 7: google.cloud.resourcemanager.v3.CreateProjectRequest - (*CreateProjectMetadata)(nil), // 8: google.cloud.resourcemanager.v3.CreateProjectMetadata - (*UpdateProjectRequest)(nil), // 9: google.cloud.resourcemanager.v3.UpdateProjectRequest - (*UpdateProjectMetadata)(nil), // 10: google.cloud.resourcemanager.v3.UpdateProjectMetadata - (*MoveProjectRequest)(nil), // 11: google.cloud.resourcemanager.v3.MoveProjectRequest - (*MoveProjectMetadata)(nil), // 12: google.cloud.resourcemanager.v3.MoveProjectMetadata - (*DeleteProjectRequest)(nil), // 13: google.cloud.resourcemanager.v3.DeleteProjectRequest - (*DeleteProjectMetadata)(nil), // 14: google.cloud.resourcemanager.v3.DeleteProjectMetadata - (*UndeleteProjectRequest)(nil), // 15: google.cloud.resourcemanager.v3.UndeleteProjectRequest - (*UndeleteProjectMetadata)(nil), // 16: google.cloud.resourcemanager.v3.UndeleteProjectMetadata - nil, // 17: google.cloud.resourcemanager.v3.Project.LabelsEntry - (*timestamppb.Timestamp)(nil), // 18: google.protobuf.Timestamp - (*fieldmaskpb.FieldMask)(nil), // 19: google.protobuf.FieldMask - (*iampb.GetIamPolicyRequest)(nil), // 20: google.iam.v1.GetIamPolicyRequest - (*iampb.SetIamPolicyRequest)(nil), // 21: google.iam.v1.SetIamPolicyRequest - (*iampb.TestIamPermissionsRequest)(nil), // 22: google.iam.v1.TestIamPermissionsRequest - (*longrunningpb.Operation)(nil), // 23: google.longrunning.Operation - (*iampb.Policy)(nil), // 24: google.iam.v1.Policy - (*iampb.TestIamPermissionsResponse)(nil), // 25: google.iam.v1.TestIamPermissionsResponse -} -var file_google_cloud_resourcemanager_v3_projects_proto_depIdxs = []int32{ - 0, // 0: google.cloud.resourcemanager.v3.Project.state:type_name -> google.cloud.resourcemanager.v3.Project.State - 18, // 1: google.cloud.resourcemanager.v3.Project.create_time:type_name -> google.protobuf.Timestamp - 18, // 2: google.cloud.resourcemanager.v3.Project.update_time:type_name -> google.protobuf.Timestamp - 18, // 3: google.cloud.resourcemanager.v3.Project.delete_time:type_name -> google.protobuf.Timestamp - 17, // 4: google.cloud.resourcemanager.v3.Project.labels:type_name -> google.cloud.resourcemanager.v3.Project.LabelsEntry - 1, // 5: google.cloud.resourcemanager.v3.ListProjectsResponse.projects:type_name -> google.cloud.resourcemanager.v3.Project - 1, // 6: google.cloud.resourcemanager.v3.SearchProjectsResponse.projects:type_name -> google.cloud.resourcemanager.v3.Project - 1, // 7: google.cloud.resourcemanager.v3.CreateProjectRequest.project:type_name -> google.cloud.resourcemanager.v3.Project - 18, // 8: google.cloud.resourcemanager.v3.CreateProjectMetadata.create_time:type_name -> google.protobuf.Timestamp - 1, // 9: google.cloud.resourcemanager.v3.UpdateProjectRequest.project:type_name -> google.cloud.resourcemanager.v3.Project - 19, // 10: google.cloud.resourcemanager.v3.UpdateProjectRequest.update_mask:type_name -> google.protobuf.FieldMask - 2, // 11: google.cloud.resourcemanager.v3.Projects.GetProject:input_type -> google.cloud.resourcemanager.v3.GetProjectRequest - 3, // 12: google.cloud.resourcemanager.v3.Projects.ListProjects:input_type -> google.cloud.resourcemanager.v3.ListProjectsRequest - 5, // 13: google.cloud.resourcemanager.v3.Projects.SearchProjects:input_type -> google.cloud.resourcemanager.v3.SearchProjectsRequest - 7, // 14: google.cloud.resourcemanager.v3.Projects.CreateProject:input_type -> google.cloud.resourcemanager.v3.CreateProjectRequest - 9, // 15: google.cloud.resourcemanager.v3.Projects.UpdateProject:input_type -> google.cloud.resourcemanager.v3.UpdateProjectRequest - 11, // 16: google.cloud.resourcemanager.v3.Projects.MoveProject:input_type -> google.cloud.resourcemanager.v3.MoveProjectRequest - 13, // 17: google.cloud.resourcemanager.v3.Projects.DeleteProject:input_type -> google.cloud.resourcemanager.v3.DeleteProjectRequest - 15, // 18: google.cloud.resourcemanager.v3.Projects.UndeleteProject:input_type -> google.cloud.resourcemanager.v3.UndeleteProjectRequest - 20, // 19: google.cloud.resourcemanager.v3.Projects.GetIamPolicy:input_type -> google.iam.v1.GetIamPolicyRequest - 21, // 20: google.cloud.resourcemanager.v3.Projects.SetIamPolicy:input_type -> google.iam.v1.SetIamPolicyRequest - 22, // 21: google.cloud.resourcemanager.v3.Projects.TestIamPermissions:input_type -> google.iam.v1.TestIamPermissionsRequest - 1, // 22: google.cloud.resourcemanager.v3.Projects.GetProject:output_type -> google.cloud.resourcemanager.v3.Project - 4, // 23: google.cloud.resourcemanager.v3.Projects.ListProjects:output_type -> google.cloud.resourcemanager.v3.ListProjectsResponse - 6, // 24: google.cloud.resourcemanager.v3.Projects.SearchProjects:output_type -> google.cloud.resourcemanager.v3.SearchProjectsResponse - 23, // 25: google.cloud.resourcemanager.v3.Projects.CreateProject:output_type -> google.longrunning.Operation - 23, // 26: google.cloud.resourcemanager.v3.Projects.UpdateProject:output_type -> google.longrunning.Operation - 23, // 27: google.cloud.resourcemanager.v3.Projects.MoveProject:output_type -> google.longrunning.Operation - 23, // 28: google.cloud.resourcemanager.v3.Projects.DeleteProject:output_type -> google.longrunning.Operation - 23, // 29: google.cloud.resourcemanager.v3.Projects.UndeleteProject:output_type -> google.longrunning.Operation - 24, // 30: google.cloud.resourcemanager.v3.Projects.GetIamPolicy:output_type -> google.iam.v1.Policy - 24, // 31: google.cloud.resourcemanager.v3.Projects.SetIamPolicy:output_type -> google.iam.v1.Policy - 25, // 32: google.cloud.resourcemanager.v3.Projects.TestIamPermissions:output_type -> google.iam.v1.TestIamPermissionsResponse - 22, // [22:33] is the sub-list for method output_type - 11, // [11:22] is the sub-list for method input_type - 11, // [11:11] is the sub-list for extension type_name - 11, // [11:11] is the sub-list for extension extendee - 0, // [0:11] is the sub-list for field type_name -} - -func init() { file_google_cloud_resourcemanager_v3_projects_proto_init() } -func file_google_cloud_resourcemanager_v3_projects_proto_init() { - if File_google_cloud_resourcemanager_v3_projects_proto != nil { - return - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: unsafe.Slice(unsafe.StringData(file_google_cloud_resourcemanager_v3_projects_proto_rawDesc), len(file_google_cloud_resourcemanager_v3_projects_proto_rawDesc)), - NumEnums: 1, - NumMessages: 17, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_google_cloud_resourcemanager_v3_projects_proto_goTypes, - DependencyIndexes: file_google_cloud_resourcemanager_v3_projects_proto_depIdxs, - EnumInfos: file_google_cloud_resourcemanager_v3_projects_proto_enumTypes, - MessageInfos: file_google_cloud_resourcemanager_v3_projects_proto_msgTypes, - }.Build() - File_google_cloud_resourcemanager_v3_projects_proto = out.File - file_google_cloud_resourcemanager_v3_projects_proto_goTypes = nil - file_google_cloud_resourcemanager_v3_projects_proto_depIdxs = nil -} diff --git a/vendor/cloud.google.com/go/resourcemanager/apiv3/resourcemanagerpb/projects_grpc.pb.go b/vendor/cloud.google.com/go/resourcemanager/apiv3/resourcemanagerpb/projects_grpc.pb.go deleted file mode 100644 index 6c70a47de5..0000000000 --- a/vendor/cloud.google.com/go/resourcemanager/apiv3/resourcemanagerpb/projects_grpc.pb.go +++ /dev/null @@ -1,762 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Code generated by protoc-gen-go-grpc. DO NOT EDIT. -// versions: -// - protoc-gen-go-grpc v1.3.0 -// - protoc v6.31.0 -// source: google/cloud/resourcemanager/v3/projects.proto - -package resourcemanagerpb - -import ( - context "context" - - iampb "cloud.google.com/go/iam/apiv1/iampb" - longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" -) - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 - -const ( - Projects_GetProject_FullMethodName = "/google.cloud.resourcemanager.v3.Projects/GetProject" - Projects_ListProjects_FullMethodName = "/google.cloud.resourcemanager.v3.Projects/ListProjects" - Projects_SearchProjects_FullMethodName = "/google.cloud.resourcemanager.v3.Projects/SearchProjects" - Projects_CreateProject_FullMethodName = "/google.cloud.resourcemanager.v3.Projects/CreateProject" - Projects_UpdateProject_FullMethodName = "/google.cloud.resourcemanager.v3.Projects/UpdateProject" - Projects_MoveProject_FullMethodName = "/google.cloud.resourcemanager.v3.Projects/MoveProject" - Projects_DeleteProject_FullMethodName = "/google.cloud.resourcemanager.v3.Projects/DeleteProject" - Projects_UndeleteProject_FullMethodName = "/google.cloud.resourcemanager.v3.Projects/UndeleteProject" - Projects_GetIamPolicy_FullMethodName = "/google.cloud.resourcemanager.v3.Projects/GetIamPolicy" - Projects_SetIamPolicy_FullMethodName = "/google.cloud.resourcemanager.v3.Projects/SetIamPolicy" - Projects_TestIamPermissions_FullMethodName = "/google.cloud.resourcemanager.v3.Projects/TestIamPermissions" -) - -// ProjectsClient is the client API for Projects service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. -type ProjectsClient interface { - // Retrieves the project identified by the specified `name` (for example, - // `projects/415104041262`). - // - // The caller must have `resourcemanager.projects.get` permission - // for this project. - GetProject(ctx context.Context, in *GetProjectRequest, opts ...grpc.CallOption) (*Project, error) - // Lists projects that are direct children of the specified folder or - // organization resource. `list()` provides a strongly consistent view of the - // projects underneath the specified parent resource. `list()` returns - // projects sorted based upon the (ascending) lexical ordering of their - // `display_name`. The caller must have `resourcemanager.projects.list` - // permission on the identified parent. - ListProjects(ctx context.Context, in *ListProjectsRequest, opts ...grpc.CallOption) (*ListProjectsResponse, error) - // Search for projects that the caller has both `resourcemanager.projects.get` - // permission on, and also satisfy the specified query. - // - // This method returns projects in an unspecified order. - // - // This method is eventually consistent with project mutations; this means - // that a newly created project may not appear in the results or recent - // updates to an existing project may not be reflected in the results. To - // retrieve the latest state of a project, use the - // [GetProject][google.cloud.resourcemanager.v3.Projects.GetProject] method. - SearchProjects(ctx context.Context, in *SearchProjectsRequest, opts ...grpc.CallOption) (*SearchProjectsResponse, error) - // Request that a new project be created. The result is an `Operation` which - // can be used to track the creation process. This process usually takes a few - // seconds, but can sometimes take much longer. The tracking `Operation` is - // automatically deleted after a few hours, so there is no need to call - // `DeleteOperation`. - CreateProject(ctx context.Context, in *CreateProjectRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) - // Updates the `display_name` and labels of the project identified by the - // specified `name` (for example, `projects/415104041262`). Deleting all - // labels requires an update mask for labels field. - // - // The caller must have `resourcemanager.projects.update` permission for this - // project. - UpdateProject(ctx context.Context, in *UpdateProjectRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) - // Move a project to another place in your resource hierarchy, under a new - // resource parent. - // - // Returns an operation which can be used to track the process of the project - // move workflow. - // Upon success, the `Operation.response` field will be populated with the - // moved project. - // - // The caller must have `resourcemanager.projects.move` permission on the - // project, on the project's current and proposed new parent. - // - // If project has no current parent, or it currently does not have an - // associated organization resource, you will also need the - // `resourcemanager.projects.setIamPolicy` permission in the project. - MoveProject(ctx context.Context, in *MoveProjectRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) - // Marks the project identified by the specified - // `name` (for example, `projects/415104041262`) for deletion. - // - // This method will only affect the project if it has a lifecycle state of - // [ACTIVE][google.cloud.resourcemanager.v3.Project.State.ACTIVE]. - // - // This method changes the Project's lifecycle state from - // [ACTIVE][google.cloud.resourcemanager.v3.Project.State.ACTIVE] - // to - // [DELETE_REQUESTED][google.cloud.resourcemanager.v3.Project.State.DELETE_REQUESTED]. - // The deletion starts at an unspecified time, - // at which point the Project is no longer accessible. - // - // Until the deletion completes, you can check the lifecycle state - // checked by retrieving the project with [GetProject] - // [google.cloud.resourcemanager.v3.Projects.GetProject], - // and the project remains visible to [ListProjects] - // [google.cloud.resourcemanager.v3.Projects.ListProjects]. - // However, you cannot update the project. - // - // After the deletion completes, the project is not retrievable by - // the [GetProject] - // [google.cloud.resourcemanager.v3.Projects.GetProject], - // [ListProjects] - // [google.cloud.resourcemanager.v3.Projects.ListProjects], and - // [SearchProjects][google.cloud.resourcemanager.v3.Projects.SearchProjects] - // methods. - // - // This method behaves idempotently, such that deleting a `DELETE_REQUESTED` - // project will not cause an error, but also won't do anything. - // - // The caller must have `resourcemanager.projects.delete` permissions for this - // project. - DeleteProject(ctx context.Context, in *DeleteProjectRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) - // Restores the project identified by the specified - // `name` (for example, `projects/415104041262`). - // You can only use this method for a project that has a lifecycle state of - // [DELETE_REQUESTED] - // [Projects.State.DELETE_REQUESTED]. - // After deletion starts, the project cannot be restored. - // - // The caller must have `resourcemanager.projects.undelete` permission for - // this project. - UndeleteProject(ctx context.Context, in *UndeleteProjectRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) - // Returns the IAM access control policy for the specified project, in the - // format `projects/{ProjectIdOrNumber}` e.g. projects/123. - // Permission is denied if the policy or the resource do not exist. - GetIamPolicy(ctx context.Context, in *iampb.GetIamPolicyRequest, opts ...grpc.CallOption) (*iampb.Policy, error) - // Sets the IAM access control policy for the specified project, in the - // format `projects/{ProjectIdOrNumber}` e.g. projects/123. - // - // CAUTION: This method will replace the existing policy, and cannot be used - // to append additional IAM settings. - // - // Note: Removing service accounts from policies or changing their roles can - // render services completely inoperable. It is important to understand how - // the service account is being used before removing or updating its roles. - // - // The following constraints apply when using `setIamPolicy()`: - // - // + Project does not support `allUsers` and `allAuthenticatedUsers` as - // `members` in a `Binding` of a `Policy`. - // - // + The owner role can be granted to a `user`, `serviceAccount`, or a group - // that is part of an organization. For example, - // group@myownpersonaldomain.com could be added as an owner to a project in - // the myownpersonaldomain.com organization, but not the examplepetstore.com - // organization. - // - // + Service accounts can be made owners of a project directly - // without any restrictions. However, to be added as an owner, a user must be - // invited using the Cloud Platform console and must accept the invitation. - // - // + A user cannot be granted the owner role using `setIamPolicy()`. The user - // must be granted the owner role using the Cloud Platform Console and must - // explicitly accept the invitation. - // - // + Invitations to grant the owner role cannot be sent using - // `setIamPolicy()`; - // they must be sent only using the Cloud Platform Console. - // - // + If the project is not part of an organization, there must be at least - // one owner who has accepted the Terms of Service (ToS) agreement in the - // policy. Calling `setIamPolicy()` to remove the last ToS-accepted owner - // from the policy will fail. This restriction also applies to legacy - // projects that no longer have owners who have accepted the ToS. Edits to - // IAM policies will be rejected until the lack of a ToS-accepting owner is - // rectified. If the project is part of an organization, you can remove all - // owners, potentially making the organization inaccessible. - SetIamPolicy(ctx context.Context, in *iampb.SetIamPolicyRequest, opts ...grpc.CallOption) (*iampb.Policy, error) - // Returns permissions that a caller has on the specified project, in the - // format `projects/{ProjectIdOrNumber}` e.g. projects/123.. - TestIamPermissions(ctx context.Context, in *iampb.TestIamPermissionsRequest, opts ...grpc.CallOption) (*iampb.TestIamPermissionsResponse, error) -} - -type projectsClient struct { - cc grpc.ClientConnInterface -} - -func NewProjectsClient(cc grpc.ClientConnInterface) ProjectsClient { - return &projectsClient{cc} -} - -func (c *projectsClient) GetProject(ctx context.Context, in *GetProjectRequest, opts ...grpc.CallOption) (*Project, error) { - out := new(Project) - err := c.cc.Invoke(ctx, Projects_GetProject_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *projectsClient) ListProjects(ctx context.Context, in *ListProjectsRequest, opts ...grpc.CallOption) (*ListProjectsResponse, error) { - out := new(ListProjectsResponse) - err := c.cc.Invoke(ctx, Projects_ListProjects_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *projectsClient) SearchProjects(ctx context.Context, in *SearchProjectsRequest, opts ...grpc.CallOption) (*SearchProjectsResponse, error) { - out := new(SearchProjectsResponse) - err := c.cc.Invoke(ctx, Projects_SearchProjects_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *projectsClient) CreateProject(ctx context.Context, in *CreateProjectRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) { - out := new(longrunningpb.Operation) - err := c.cc.Invoke(ctx, Projects_CreateProject_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *projectsClient) UpdateProject(ctx context.Context, in *UpdateProjectRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) { - out := new(longrunningpb.Operation) - err := c.cc.Invoke(ctx, Projects_UpdateProject_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *projectsClient) MoveProject(ctx context.Context, in *MoveProjectRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) { - out := new(longrunningpb.Operation) - err := c.cc.Invoke(ctx, Projects_MoveProject_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *projectsClient) DeleteProject(ctx context.Context, in *DeleteProjectRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) { - out := new(longrunningpb.Operation) - err := c.cc.Invoke(ctx, Projects_DeleteProject_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *projectsClient) UndeleteProject(ctx context.Context, in *UndeleteProjectRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) { - out := new(longrunningpb.Operation) - err := c.cc.Invoke(ctx, Projects_UndeleteProject_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *projectsClient) GetIamPolicy(ctx context.Context, in *iampb.GetIamPolicyRequest, opts ...grpc.CallOption) (*iampb.Policy, error) { - out := new(iampb.Policy) - err := c.cc.Invoke(ctx, Projects_GetIamPolicy_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *projectsClient) SetIamPolicy(ctx context.Context, in *iampb.SetIamPolicyRequest, opts ...grpc.CallOption) (*iampb.Policy, error) { - out := new(iampb.Policy) - err := c.cc.Invoke(ctx, Projects_SetIamPolicy_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *projectsClient) TestIamPermissions(ctx context.Context, in *iampb.TestIamPermissionsRequest, opts ...grpc.CallOption) (*iampb.TestIamPermissionsResponse, error) { - out := new(iampb.TestIamPermissionsResponse) - err := c.cc.Invoke(ctx, Projects_TestIamPermissions_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// ProjectsServer is the server API for Projects service. -// All implementations should embed UnimplementedProjectsServer -// for forward compatibility -type ProjectsServer interface { - // Retrieves the project identified by the specified `name` (for example, - // `projects/415104041262`). - // - // The caller must have `resourcemanager.projects.get` permission - // for this project. - GetProject(context.Context, *GetProjectRequest) (*Project, error) - // Lists projects that are direct children of the specified folder or - // organization resource. `list()` provides a strongly consistent view of the - // projects underneath the specified parent resource. `list()` returns - // projects sorted based upon the (ascending) lexical ordering of their - // `display_name`. The caller must have `resourcemanager.projects.list` - // permission on the identified parent. - ListProjects(context.Context, *ListProjectsRequest) (*ListProjectsResponse, error) - // Search for projects that the caller has both `resourcemanager.projects.get` - // permission on, and also satisfy the specified query. - // - // This method returns projects in an unspecified order. - // - // This method is eventually consistent with project mutations; this means - // that a newly created project may not appear in the results or recent - // updates to an existing project may not be reflected in the results. To - // retrieve the latest state of a project, use the - // [GetProject][google.cloud.resourcemanager.v3.Projects.GetProject] method. - SearchProjects(context.Context, *SearchProjectsRequest) (*SearchProjectsResponse, error) - // Request that a new project be created. The result is an `Operation` which - // can be used to track the creation process. This process usually takes a few - // seconds, but can sometimes take much longer. The tracking `Operation` is - // automatically deleted after a few hours, so there is no need to call - // `DeleteOperation`. - CreateProject(context.Context, *CreateProjectRequest) (*longrunningpb.Operation, error) - // Updates the `display_name` and labels of the project identified by the - // specified `name` (for example, `projects/415104041262`). Deleting all - // labels requires an update mask for labels field. - // - // The caller must have `resourcemanager.projects.update` permission for this - // project. - UpdateProject(context.Context, *UpdateProjectRequest) (*longrunningpb.Operation, error) - // Move a project to another place in your resource hierarchy, under a new - // resource parent. - // - // Returns an operation which can be used to track the process of the project - // move workflow. - // Upon success, the `Operation.response` field will be populated with the - // moved project. - // - // The caller must have `resourcemanager.projects.move` permission on the - // project, on the project's current and proposed new parent. - // - // If project has no current parent, or it currently does not have an - // associated organization resource, you will also need the - // `resourcemanager.projects.setIamPolicy` permission in the project. - MoveProject(context.Context, *MoveProjectRequest) (*longrunningpb.Operation, error) - // Marks the project identified by the specified - // `name` (for example, `projects/415104041262`) for deletion. - // - // This method will only affect the project if it has a lifecycle state of - // [ACTIVE][google.cloud.resourcemanager.v3.Project.State.ACTIVE]. - // - // This method changes the Project's lifecycle state from - // [ACTIVE][google.cloud.resourcemanager.v3.Project.State.ACTIVE] - // to - // [DELETE_REQUESTED][google.cloud.resourcemanager.v3.Project.State.DELETE_REQUESTED]. - // The deletion starts at an unspecified time, - // at which point the Project is no longer accessible. - // - // Until the deletion completes, you can check the lifecycle state - // checked by retrieving the project with [GetProject] - // [google.cloud.resourcemanager.v3.Projects.GetProject], - // and the project remains visible to [ListProjects] - // [google.cloud.resourcemanager.v3.Projects.ListProjects]. - // However, you cannot update the project. - // - // After the deletion completes, the project is not retrievable by - // the [GetProject] - // [google.cloud.resourcemanager.v3.Projects.GetProject], - // [ListProjects] - // [google.cloud.resourcemanager.v3.Projects.ListProjects], and - // [SearchProjects][google.cloud.resourcemanager.v3.Projects.SearchProjects] - // methods. - // - // This method behaves idempotently, such that deleting a `DELETE_REQUESTED` - // project will not cause an error, but also won't do anything. - // - // The caller must have `resourcemanager.projects.delete` permissions for this - // project. - DeleteProject(context.Context, *DeleteProjectRequest) (*longrunningpb.Operation, error) - // Restores the project identified by the specified - // `name` (for example, `projects/415104041262`). - // You can only use this method for a project that has a lifecycle state of - // [DELETE_REQUESTED] - // [Projects.State.DELETE_REQUESTED]. - // After deletion starts, the project cannot be restored. - // - // The caller must have `resourcemanager.projects.undelete` permission for - // this project. - UndeleteProject(context.Context, *UndeleteProjectRequest) (*longrunningpb.Operation, error) - // Returns the IAM access control policy for the specified project, in the - // format `projects/{ProjectIdOrNumber}` e.g. projects/123. - // Permission is denied if the policy or the resource do not exist. - GetIamPolicy(context.Context, *iampb.GetIamPolicyRequest) (*iampb.Policy, error) - // Sets the IAM access control policy for the specified project, in the - // format `projects/{ProjectIdOrNumber}` e.g. projects/123. - // - // CAUTION: This method will replace the existing policy, and cannot be used - // to append additional IAM settings. - // - // Note: Removing service accounts from policies or changing their roles can - // render services completely inoperable. It is important to understand how - // the service account is being used before removing or updating its roles. - // - // The following constraints apply when using `setIamPolicy()`: - // - // + Project does not support `allUsers` and `allAuthenticatedUsers` as - // `members` in a `Binding` of a `Policy`. - // - // + The owner role can be granted to a `user`, `serviceAccount`, or a group - // that is part of an organization. For example, - // group@myownpersonaldomain.com could be added as an owner to a project in - // the myownpersonaldomain.com organization, but not the examplepetstore.com - // organization. - // - // + Service accounts can be made owners of a project directly - // without any restrictions. However, to be added as an owner, a user must be - // invited using the Cloud Platform console and must accept the invitation. - // - // + A user cannot be granted the owner role using `setIamPolicy()`. The user - // must be granted the owner role using the Cloud Platform Console and must - // explicitly accept the invitation. - // - // + Invitations to grant the owner role cannot be sent using - // `setIamPolicy()`; - // they must be sent only using the Cloud Platform Console. - // - // + If the project is not part of an organization, there must be at least - // one owner who has accepted the Terms of Service (ToS) agreement in the - // policy. Calling `setIamPolicy()` to remove the last ToS-accepted owner - // from the policy will fail. This restriction also applies to legacy - // projects that no longer have owners who have accepted the ToS. Edits to - // IAM policies will be rejected until the lack of a ToS-accepting owner is - // rectified. If the project is part of an organization, you can remove all - // owners, potentially making the organization inaccessible. - SetIamPolicy(context.Context, *iampb.SetIamPolicyRequest) (*iampb.Policy, error) - // Returns permissions that a caller has on the specified project, in the - // format `projects/{ProjectIdOrNumber}` e.g. projects/123.. - TestIamPermissions(context.Context, *iampb.TestIamPermissionsRequest) (*iampb.TestIamPermissionsResponse, error) -} - -// UnimplementedProjectsServer should be embedded to have forward compatible implementations. -type UnimplementedProjectsServer struct { -} - -func (UnimplementedProjectsServer) GetProject(context.Context, *GetProjectRequest) (*Project, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetProject not implemented") -} -func (UnimplementedProjectsServer) ListProjects(context.Context, *ListProjectsRequest) (*ListProjectsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ListProjects not implemented") -} -func (UnimplementedProjectsServer) SearchProjects(context.Context, *SearchProjectsRequest) (*SearchProjectsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method SearchProjects not implemented") -} -func (UnimplementedProjectsServer) CreateProject(context.Context, *CreateProjectRequest) (*longrunningpb.Operation, error) { - return nil, status.Errorf(codes.Unimplemented, "method CreateProject not implemented") -} -func (UnimplementedProjectsServer) UpdateProject(context.Context, *UpdateProjectRequest) (*longrunningpb.Operation, error) { - return nil, status.Errorf(codes.Unimplemented, "method UpdateProject not implemented") -} -func (UnimplementedProjectsServer) MoveProject(context.Context, *MoveProjectRequest) (*longrunningpb.Operation, error) { - return nil, status.Errorf(codes.Unimplemented, "method MoveProject not implemented") -} -func (UnimplementedProjectsServer) DeleteProject(context.Context, *DeleteProjectRequest) (*longrunningpb.Operation, error) { - return nil, status.Errorf(codes.Unimplemented, "method DeleteProject not implemented") -} -func (UnimplementedProjectsServer) UndeleteProject(context.Context, *UndeleteProjectRequest) (*longrunningpb.Operation, error) { - return nil, status.Errorf(codes.Unimplemented, "method UndeleteProject not implemented") -} -func (UnimplementedProjectsServer) GetIamPolicy(context.Context, *iampb.GetIamPolicyRequest) (*iampb.Policy, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetIamPolicy not implemented") -} -func (UnimplementedProjectsServer) SetIamPolicy(context.Context, *iampb.SetIamPolicyRequest) (*iampb.Policy, error) { - return nil, status.Errorf(codes.Unimplemented, "method SetIamPolicy not implemented") -} -func (UnimplementedProjectsServer) TestIamPermissions(context.Context, *iampb.TestIamPermissionsRequest) (*iampb.TestIamPermissionsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method TestIamPermissions not implemented") -} - -// UnsafeProjectsServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to ProjectsServer will -// result in compilation errors. -type UnsafeProjectsServer interface { - mustEmbedUnimplementedProjectsServer() -} - -func RegisterProjectsServer(s grpc.ServiceRegistrar, srv ProjectsServer) { - s.RegisterService(&Projects_ServiceDesc, srv) -} - -func _Projects_GetProject_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetProjectRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ProjectsServer).GetProject(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Projects_GetProject_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ProjectsServer).GetProject(ctx, req.(*GetProjectRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Projects_ListProjects_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ListProjectsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ProjectsServer).ListProjects(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Projects_ListProjects_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ProjectsServer).ListProjects(ctx, req.(*ListProjectsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Projects_SearchProjects_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(SearchProjectsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ProjectsServer).SearchProjects(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Projects_SearchProjects_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ProjectsServer).SearchProjects(ctx, req.(*SearchProjectsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Projects_CreateProject_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CreateProjectRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ProjectsServer).CreateProject(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Projects_CreateProject_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ProjectsServer).CreateProject(ctx, req.(*CreateProjectRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Projects_UpdateProject_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(UpdateProjectRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ProjectsServer).UpdateProject(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Projects_UpdateProject_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ProjectsServer).UpdateProject(ctx, req.(*UpdateProjectRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Projects_MoveProject_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MoveProjectRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ProjectsServer).MoveProject(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Projects_MoveProject_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ProjectsServer).MoveProject(ctx, req.(*MoveProjectRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Projects_DeleteProject_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DeleteProjectRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ProjectsServer).DeleteProject(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Projects_DeleteProject_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ProjectsServer).DeleteProject(ctx, req.(*DeleteProjectRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Projects_UndeleteProject_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(UndeleteProjectRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ProjectsServer).UndeleteProject(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Projects_UndeleteProject_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ProjectsServer).UndeleteProject(ctx, req.(*UndeleteProjectRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Projects_GetIamPolicy_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(iampb.GetIamPolicyRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ProjectsServer).GetIamPolicy(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Projects_GetIamPolicy_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ProjectsServer).GetIamPolicy(ctx, req.(*iampb.GetIamPolicyRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Projects_SetIamPolicy_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(iampb.SetIamPolicyRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ProjectsServer).SetIamPolicy(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Projects_SetIamPolicy_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ProjectsServer).SetIamPolicy(ctx, req.(*iampb.SetIamPolicyRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Projects_TestIamPermissions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(iampb.TestIamPermissionsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ProjectsServer).TestIamPermissions(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Projects_TestIamPermissions_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ProjectsServer).TestIamPermissions(ctx, req.(*iampb.TestIamPermissionsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -// Projects_ServiceDesc is the grpc.ServiceDesc for Projects service. -// It's only intended for direct use with grpc.RegisterService, -// and not to be introspected or modified (even as a copy) -var Projects_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "google.cloud.resourcemanager.v3.Projects", - HandlerType: (*ProjectsServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "GetProject", - Handler: _Projects_GetProject_Handler, - }, - { - MethodName: "ListProjects", - Handler: _Projects_ListProjects_Handler, - }, - { - MethodName: "SearchProjects", - Handler: _Projects_SearchProjects_Handler, - }, - { - MethodName: "CreateProject", - Handler: _Projects_CreateProject_Handler, - }, - { - MethodName: "UpdateProject", - Handler: _Projects_UpdateProject_Handler, - }, - { - MethodName: "MoveProject", - Handler: _Projects_MoveProject_Handler, - }, - { - MethodName: "DeleteProject", - Handler: _Projects_DeleteProject_Handler, - }, - { - MethodName: "UndeleteProject", - Handler: _Projects_UndeleteProject_Handler, - }, - { - MethodName: "GetIamPolicy", - Handler: _Projects_GetIamPolicy_Handler, - }, - { - MethodName: "SetIamPolicy", - Handler: _Projects_SetIamPolicy_Handler, - }, - { - MethodName: "TestIamPermissions", - Handler: _Projects_TestIamPermissions_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "google/cloud/resourcemanager/v3/projects.proto", -} diff --git a/vendor/cloud.google.com/go/resourcemanager/apiv3/resourcemanagerpb/tag_bindings.pb.go b/vendor/cloud.google.com/go/resourcemanager/apiv3/resourcemanagerpb/tag_bindings.pb.go deleted file mode 100644 index 6596f31575..0000000000 --- a/vendor/cloud.google.com/go/resourcemanager/apiv3/resourcemanagerpb/tag_bindings.pb.go +++ /dev/null @@ -1,803 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.36.11 -// protoc v6.31.0 -// source: google/cloud/resourcemanager/v3/tag_bindings.proto - -package resourcemanagerpb - -import ( - reflect "reflect" - sync "sync" - unsafe "unsafe" - - longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" - _ "google.golang.org/genproto/googleapis/api/annotations" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - _ "google.golang.org/protobuf/types/known/emptypb" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// A TagBinding represents a connection between a TagValue and a cloud -// resource Once a TagBinding is created, the TagValue is applied to all the -// descendants of the Google Cloud resource. -type TagBinding struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Output only. The name of the TagBinding. This is a String of the form: - // `tagBindings/{full-resource-name}/{tag-value-name}` (e.g. - // `tagBindings/%2F%2Fcloudresourcemanager.googleapis.com%2Fprojects%2F123/tagValues/456`). - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // The full resource name of the resource the TagValue is bound to. - // E.g. `//cloudresourcemanager.googleapis.com/projects/123` - Parent string `protobuf:"bytes,2,opt,name=parent,proto3" json:"parent,omitempty"` - // The TagValue of the TagBinding. - // Must be of the form `tagValues/456`. - TagValue string `protobuf:"bytes,3,opt,name=tag_value,json=tagValue,proto3" json:"tag_value,omitempty"` - // The namespaced name for the TagValue of the TagBinding. - // Must be in the format - // `{parent_id}/{tag_key_short_name}/{short_name}`. - // - // For methods that support TagValue namespaced name, only one of - // tag_value_namespaced_name or tag_value may be filled. Requests with both - // fields will be rejected. - TagValueNamespacedName string `protobuf:"bytes,4,opt,name=tag_value_namespaced_name,json=tagValueNamespacedName,proto3" json:"tag_value_namespaced_name,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *TagBinding) Reset() { - *x = TagBinding{} - mi := &file_google_cloud_resourcemanager_v3_tag_bindings_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *TagBinding) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*TagBinding) ProtoMessage() {} - -func (x *TagBinding) ProtoReflect() protoreflect.Message { - mi := &file_google_cloud_resourcemanager_v3_tag_bindings_proto_msgTypes[0] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use TagBinding.ProtoReflect.Descriptor instead. -func (*TagBinding) Descriptor() ([]byte, []int) { - return file_google_cloud_resourcemanager_v3_tag_bindings_proto_rawDescGZIP(), []int{0} -} - -func (x *TagBinding) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *TagBinding) GetParent() string { - if x != nil { - return x.Parent - } - return "" -} - -func (x *TagBinding) GetTagValue() string { - if x != nil { - return x.TagValue - } - return "" -} - -func (x *TagBinding) GetTagValueNamespacedName() string { - if x != nil { - return x.TagValueNamespacedName - } - return "" -} - -// Runtime operation information for creating a TagValue. -type CreateTagBindingMetadata struct { - state protoimpl.MessageState `protogen:"open.v1"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *CreateTagBindingMetadata) Reset() { - *x = CreateTagBindingMetadata{} - mi := &file_google_cloud_resourcemanager_v3_tag_bindings_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *CreateTagBindingMetadata) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CreateTagBindingMetadata) ProtoMessage() {} - -func (x *CreateTagBindingMetadata) ProtoReflect() protoreflect.Message { - mi := &file_google_cloud_resourcemanager_v3_tag_bindings_proto_msgTypes[1] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CreateTagBindingMetadata.ProtoReflect.Descriptor instead. -func (*CreateTagBindingMetadata) Descriptor() ([]byte, []int) { - return file_google_cloud_resourcemanager_v3_tag_bindings_proto_rawDescGZIP(), []int{1} -} - -// The request message to create a TagBinding. -type CreateTagBindingRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Required. The TagBinding to be created. - TagBinding *TagBinding `protobuf:"bytes,1,opt,name=tag_binding,json=tagBinding,proto3" json:"tag_binding,omitempty"` - // Optional. Set to true to perform the validations necessary for creating the - // resource, but not actually perform the action. - ValidateOnly bool `protobuf:"varint,2,opt,name=validate_only,json=validateOnly,proto3" json:"validate_only,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *CreateTagBindingRequest) Reset() { - *x = CreateTagBindingRequest{} - mi := &file_google_cloud_resourcemanager_v3_tag_bindings_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *CreateTagBindingRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CreateTagBindingRequest) ProtoMessage() {} - -func (x *CreateTagBindingRequest) ProtoReflect() protoreflect.Message { - mi := &file_google_cloud_resourcemanager_v3_tag_bindings_proto_msgTypes[2] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CreateTagBindingRequest.ProtoReflect.Descriptor instead. -func (*CreateTagBindingRequest) Descriptor() ([]byte, []int) { - return file_google_cloud_resourcemanager_v3_tag_bindings_proto_rawDescGZIP(), []int{2} -} - -func (x *CreateTagBindingRequest) GetTagBinding() *TagBinding { - if x != nil { - return x.TagBinding - } - return nil -} - -func (x *CreateTagBindingRequest) GetValidateOnly() bool { - if x != nil { - return x.ValidateOnly - } - return false -} - -// Runtime operation information for deleting a TagBinding. -type DeleteTagBindingMetadata struct { - state protoimpl.MessageState `protogen:"open.v1"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *DeleteTagBindingMetadata) Reset() { - *x = DeleteTagBindingMetadata{} - mi := &file_google_cloud_resourcemanager_v3_tag_bindings_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *DeleteTagBindingMetadata) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DeleteTagBindingMetadata) ProtoMessage() {} - -func (x *DeleteTagBindingMetadata) ProtoReflect() protoreflect.Message { - mi := &file_google_cloud_resourcemanager_v3_tag_bindings_proto_msgTypes[3] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DeleteTagBindingMetadata.ProtoReflect.Descriptor instead. -func (*DeleteTagBindingMetadata) Descriptor() ([]byte, []int) { - return file_google_cloud_resourcemanager_v3_tag_bindings_proto_rawDescGZIP(), []int{3} -} - -// The request message to delete a TagBinding. -type DeleteTagBindingRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Required. The name of the TagBinding. This is a String of the form: - // `tagBindings/{id}` (e.g. - // `tagBindings/%2F%2Fcloudresourcemanager.googleapis.com%2Fprojects%2F123/tagValues/456`). - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *DeleteTagBindingRequest) Reset() { - *x = DeleteTagBindingRequest{} - mi := &file_google_cloud_resourcemanager_v3_tag_bindings_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *DeleteTagBindingRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DeleteTagBindingRequest) ProtoMessage() {} - -func (x *DeleteTagBindingRequest) ProtoReflect() protoreflect.Message { - mi := &file_google_cloud_resourcemanager_v3_tag_bindings_proto_msgTypes[4] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DeleteTagBindingRequest.ProtoReflect.Descriptor instead. -func (*DeleteTagBindingRequest) Descriptor() ([]byte, []int) { - return file_google_cloud_resourcemanager_v3_tag_bindings_proto_rawDescGZIP(), []int{4} -} - -func (x *DeleteTagBindingRequest) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -// The request message to list all TagBindings for a parent. -type ListTagBindingsRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Required. The full resource name of a resource for which you want to list - // existing TagBindings. E.g. - // "//cloudresourcemanager.googleapis.com/projects/123" - Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` - // Optional. The maximum number of TagBindings to return in the response. The - // server allows a maximum of 300 TagBindings to return. If unspecified, the - // server will use 100 as the default. - PageSize int32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` - // Optional. A pagination token returned from a previous call to - // `ListTagBindings` that indicates where this listing should continue from. - PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ListTagBindingsRequest) Reset() { - *x = ListTagBindingsRequest{} - mi := &file_google_cloud_resourcemanager_v3_tag_bindings_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ListTagBindingsRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListTagBindingsRequest) ProtoMessage() {} - -func (x *ListTagBindingsRequest) ProtoReflect() protoreflect.Message { - mi := &file_google_cloud_resourcemanager_v3_tag_bindings_proto_msgTypes[5] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ListTagBindingsRequest.ProtoReflect.Descriptor instead. -func (*ListTagBindingsRequest) Descriptor() ([]byte, []int) { - return file_google_cloud_resourcemanager_v3_tag_bindings_proto_rawDescGZIP(), []int{5} -} - -func (x *ListTagBindingsRequest) GetParent() string { - if x != nil { - return x.Parent - } - return "" -} - -func (x *ListTagBindingsRequest) GetPageSize() int32 { - if x != nil { - return x.PageSize - } - return 0 -} - -func (x *ListTagBindingsRequest) GetPageToken() string { - if x != nil { - return x.PageToken - } - return "" -} - -// The ListTagBindings response. -type ListTagBindingsResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - // A possibly paginated list of TagBindings for the specified resource. - TagBindings []*TagBinding `protobuf:"bytes,1,rep,name=tag_bindings,json=tagBindings,proto3" json:"tag_bindings,omitempty"` - // Pagination token. - // - // If the result set is too large to fit in a single response, this token - // is returned. It encodes the position of the current result cursor. - // Feeding this value into a new list request with the `page_token` parameter - // gives the next page of the results. - // - // When `next_page_token` is not filled in, there is no next page and - // the list returned is the last page in the result set. - // - // Pagination tokens have a limited lifetime. - NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ListTagBindingsResponse) Reset() { - *x = ListTagBindingsResponse{} - mi := &file_google_cloud_resourcemanager_v3_tag_bindings_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ListTagBindingsResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListTagBindingsResponse) ProtoMessage() {} - -func (x *ListTagBindingsResponse) ProtoReflect() protoreflect.Message { - mi := &file_google_cloud_resourcemanager_v3_tag_bindings_proto_msgTypes[6] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ListTagBindingsResponse.ProtoReflect.Descriptor instead. -func (*ListTagBindingsResponse) Descriptor() ([]byte, []int) { - return file_google_cloud_resourcemanager_v3_tag_bindings_proto_rawDescGZIP(), []int{6} -} - -func (x *ListTagBindingsResponse) GetTagBindings() []*TagBinding { - if x != nil { - return x.TagBindings - } - return nil -} - -func (x *ListTagBindingsResponse) GetNextPageToken() string { - if x != nil { - return x.NextPageToken - } - return "" -} - -// The request message to ListEffectiveTags -type ListEffectiveTagsRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Required. The full resource name of a resource for which you want to list - // the effective tags. E.g. - // "//cloudresourcemanager.googleapis.com/projects/123" - Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` - // Optional. The maximum number of effective tags to return in the response. - // The server allows a maximum of 300 effective tags to return in a single - // page. If unspecified, the server will use 100 as the default. - PageSize int32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` - // Optional. A pagination token returned from a previous call to - // `ListEffectiveTags` that indicates from where this listing should continue. - PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ListEffectiveTagsRequest) Reset() { - *x = ListEffectiveTagsRequest{} - mi := &file_google_cloud_resourcemanager_v3_tag_bindings_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ListEffectiveTagsRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListEffectiveTagsRequest) ProtoMessage() {} - -func (x *ListEffectiveTagsRequest) ProtoReflect() protoreflect.Message { - mi := &file_google_cloud_resourcemanager_v3_tag_bindings_proto_msgTypes[7] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ListEffectiveTagsRequest.ProtoReflect.Descriptor instead. -func (*ListEffectiveTagsRequest) Descriptor() ([]byte, []int) { - return file_google_cloud_resourcemanager_v3_tag_bindings_proto_rawDescGZIP(), []int{7} -} - -func (x *ListEffectiveTagsRequest) GetParent() string { - if x != nil { - return x.Parent - } - return "" -} - -func (x *ListEffectiveTagsRequest) GetPageSize() int32 { - if x != nil { - return x.PageSize - } - return 0 -} - -func (x *ListEffectiveTagsRequest) GetPageToken() string { - if x != nil { - return x.PageToken - } - return "" -} - -// The response of ListEffectiveTags. -type ListEffectiveTagsResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - // A possibly paginated list of effective tags for the specified resource. - EffectiveTags []*EffectiveTag `protobuf:"bytes,1,rep,name=effective_tags,json=effectiveTags,proto3" json:"effective_tags,omitempty"` - // Pagination token. - // - // If the result set is too large to fit in a single response, this token - // is returned. It encodes the position of the current result cursor. - // Feeding this value into a new list request with the `page_token` parameter - // gives the next page of the results. - // - // When `next_page_token` is not filled in, there is no next page and - // the list returned is the last page in the result set. - // - // Pagination tokens have a limited lifetime. - NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ListEffectiveTagsResponse) Reset() { - *x = ListEffectiveTagsResponse{} - mi := &file_google_cloud_resourcemanager_v3_tag_bindings_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ListEffectiveTagsResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListEffectiveTagsResponse) ProtoMessage() {} - -func (x *ListEffectiveTagsResponse) ProtoReflect() protoreflect.Message { - mi := &file_google_cloud_resourcemanager_v3_tag_bindings_proto_msgTypes[8] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ListEffectiveTagsResponse.ProtoReflect.Descriptor instead. -func (*ListEffectiveTagsResponse) Descriptor() ([]byte, []int) { - return file_google_cloud_resourcemanager_v3_tag_bindings_proto_rawDescGZIP(), []int{8} -} - -func (x *ListEffectiveTagsResponse) GetEffectiveTags() []*EffectiveTag { - if x != nil { - return x.EffectiveTags - } - return nil -} - -func (x *ListEffectiveTagsResponse) GetNextPageToken() string { - if x != nil { - return x.NextPageToken - } - return "" -} - -// An EffectiveTag represents a tag that applies to a resource during policy -// evaluation. Tags can be either directly bound to a resource or inherited from -// its ancestor. EffectiveTag contains the name and -// namespaced_name of the tag value and tag key, with additional fields of -// `inherited` to indicate the inheritance status of the effective tag. -type EffectiveTag struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Resource name for TagValue in the format `tagValues/456`. - TagValue string `protobuf:"bytes,1,opt,name=tag_value,json=tagValue,proto3" json:"tag_value,omitempty"` - // The namespaced name of the TagValue. Can be in the form - // `{organization_id}/{tag_key_short_name}/{tag_value_short_name}` or - // `{project_id}/{tag_key_short_name}/{tag_value_short_name}` or - // `{project_number}/{tag_key_short_name}/{tag_value_short_name}`. - NamespacedTagValue string `protobuf:"bytes,2,opt,name=namespaced_tag_value,json=namespacedTagValue,proto3" json:"namespaced_tag_value,omitempty"` - // The name of the TagKey, in the format `tagKeys/{id}`, such as - // `tagKeys/123`. - TagKey string `protobuf:"bytes,3,opt,name=tag_key,json=tagKey,proto3" json:"tag_key,omitempty"` - // The namespaced name of the TagKey. Can be in the form - // `{organization_id}/{tag_key_short_name}` or - // `{project_id}/{tag_key_short_name}` or - // `{project_number}/{tag_key_short_name}`. - NamespacedTagKey string `protobuf:"bytes,4,opt,name=namespaced_tag_key,json=namespacedTagKey,proto3" json:"namespaced_tag_key,omitempty"` - // The parent name of the tag key. - // Must be in the format `organizations/{organization_id}` or - // `projects/{project_number}` - TagKeyParentName string `protobuf:"bytes,6,opt,name=tag_key_parent_name,json=tagKeyParentName,proto3" json:"tag_key_parent_name,omitempty"` - // Indicates the inheritance status of a tag value - // attached to the given resource. If the tag value is inherited from one of - // the resource's ancestors, inherited will be true. If false, then the tag - // value is directly attached to the resource, inherited will be false. - Inherited bool `protobuf:"varint,5,opt,name=inherited,proto3" json:"inherited,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *EffectiveTag) Reset() { - *x = EffectiveTag{} - mi := &file_google_cloud_resourcemanager_v3_tag_bindings_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *EffectiveTag) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*EffectiveTag) ProtoMessage() {} - -func (x *EffectiveTag) ProtoReflect() protoreflect.Message { - mi := &file_google_cloud_resourcemanager_v3_tag_bindings_proto_msgTypes[9] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use EffectiveTag.ProtoReflect.Descriptor instead. -func (*EffectiveTag) Descriptor() ([]byte, []int) { - return file_google_cloud_resourcemanager_v3_tag_bindings_proto_rawDescGZIP(), []int{9} -} - -func (x *EffectiveTag) GetTagValue() string { - if x != nil { - return x.TagValue - } - return "" -} - -func (x *EffectiveTag) GetNamespacedTagValue() string { - if x != nil { - return x.NamespacedTagValue - } - return "" -} - -func (x *EffectiveTag) GetTagKey() string { - if x != nil { - return x.TagKey - } - return "" -} - -func (x *EffectiveTag) GetNamespacedTagKey() string { - if x != nil { - return x.NamespacedTagKey - } - return "" -} - -func (x *EffectiveTag) GetTagKeyParentName() string { - if x != nil { - return x.TagKeyParentName - } - return "" -} - -func (x *EffectiveTag) GetInherited() bool { - if x != nil { - return x.Inherited - } - return false -} - -var File_google_cloud_resourcemanager_v3_tag_bindings_proto protoreflect.FileDescriptor - -const file_google_cloud_resourcemanager_v3_tag_bindings_proto_rawDesc = "" + - "\n" + - "2google/cloud/resourcemanager/v3/tag_bindings.proto\x12\x1fgoogle.cloud.resourcemanager.v3\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto\"\xe5\x01\n" + - "\n" + - "TagBinding\x12\x17\n" + - "\x04name\x18\x01 \x01(\tB\x03\xe0A\x03R\x04name\x12\x16\n" + - "\x06parent\x18\x02 \x01(\tR\x06parent\x12\x1b\n" + - "\ttag_value\x18\x03 \x01(\tR\btagValue\x129\n" + - "\x19tag_value_namespaced_name\x18\x04 \x01(\tR\x16tagValueNamespacedName:N\xeaAK\n" + - ".cloudresourcemanager.googleapis.com/TagBinding\x12\x19tagBindings/{tag_binding}\"\x1a\n" + - "\x18CreateTagBindingMetadata\"\x96\x01\n" + - "\x17CreateTagBindingRequest\x12Q\n" + - "\vtag_binding\x18\x01 \x01(\v2+.google.cloud.resourcemanager.v3.TagBindingB\x03\xe0A\x02R\n" + - "tagBinding\x12(\n" + - "\rvalidate_only\x18\x02 \x01(\bB\x03\xe0A\x01R\fvalidateOnly\"\x1a\n" + - "\x18DeleteTagBindingMetadata\"e\n" + - "\x17DeleteTagBindingRequest\x12J\n" + - "\x04name\x18\x01 \x01(\tB6\xe0A\x02\xfaA0\n" + - ".cloudresourcemanager.googleapis.com/TagBindingR\x04name\"\x81\x01\n" + - "\x16ListTagBindingsRequest\x12!\n" + - "\x06parent\x18\x01 \x01(\tB\t\xe0A\x02\xfaA\x03\x12\x01*R\x06parent\x12 \n" + - "\tpage_size\x18\x02 \x01(\x05B\x03\xe0A\x01R\bpageSize\x12\"\n" + - "\n" + - "page_token\x18\x03 \x01(\tB\x03\xe0A\x01R\tpageToken\"\x91\x01\n" + - "\x17ListTagBindingsResponse\x12N\n" + - "\ftag_bindings\x18\x01 \x03(\v2+.google.cloud.resourcemanager.v3.TagBindingR\vtagBindings\x12&\n" + - "\x0fnext_page_token\x18\x02 \x01(\tR\rnextPageToken\"}\n" + - "\x18ListEffectiveTagsRequest\x12\x1b\n" + - "\x06parent\x18\x01 \x01(\tB\x03\xe0A\x02R\x06parent\x12 \n" + - "\tpage_size\x18\x02 \x01(\x05B\x03\xe0A\x01R\bpageSize\x12\"\n" + - "\n" + - "page_token\x18\x03 \x01(\tB\x03\xe0A\x01R\tpageToken\"\x99\x01\n" + - "\x19ListEffectiveTagsResponse\x12T\n" + - "\x0eeffective_tags\x18\x01 \x03(\v2-.google.cloud.resourcemanager.v3.EffectiveTagR\reffectiveTags\x12&\n" + - "\x0fnext_page_token\x18\x02 \x01(\tR\rnextPageToken\"\xd5\x02\n" + - "\fEffectiveTag\x12N\n" + - "\ttag_value\x18\x01 \x01(\tB1\xfaA.\n" + - ",cloudresourcemanager.googleapis.com/TagValueR\btagValue\x120\n" + - "\x14namespaced_tag_value\x18\x02 \x01(\tR\x12namespacedTagValue\x12H\n" + - "\atag_key\x18\x03 \x01(\tB/\xfaA,\n" + - "*cloudresourcemanager.googleapis.com/TagKeyR\x06tagKey\x12,\n" + - "\x12namespaced_tag_key\x18\x04 \x01(\tR\x10namespacedTagKey\x12-\n" + - "\x13tag_key_parent_name\x18\x06 \x01(\tR\x10tagKeyParentName\x12\x1c\n" + - "\tinherited\x18\x05 \x01(\bR\tinherited2\x91\a\n" + - "\vTagBindings\x12\xa6\x01\n" + - "\x0fListTagBindings\x127.google.cloud.resourcemanager.v3.ListTagBindingsRequest\x1a8.google.cloud.resourcemanager.v3.ListTagBindingsResponse\" \xdaA\x06parent\x82\xd3\xe4\x93\x02\x11\x12\x0f/v3/tagBindings\x12\xc8\x01\n" + - "\x10CreateTagBinding\x128.google.cloud.resourcemanager.v3.CreateTagBindingRequest\x1a\x1d.google.longrunning.Operation\"[\xcaA&\n" + - "\n" + - "TagBinding\x12\x18CreateTagBindingMetadata\xdaA\vtag_binding\x82\xd3\xe4\x93\x02\x1e:\vtag_binding\"\x0f/v3/tagBindings\x12\xc9\x01\n" + - "\x10DeleteTagBinding\x128.google.cloud.resourcemanager.v3.DeleteTagBindingRequest\x1a\x1d.google.longrunning.Operation\"\\\xcaA1\n" + - "\x15google.protobuf.Empty\x12\x18DeleteTagBindingMetadata\xdaA\x04name\x82\xd3\xe4\x93\x02\x1b*\x19/v3/{name=tagBindings/**}\x12\xae\x01\n" + - "\x11ListEffectiveTags\x129.google.cloud.resourcemanager.v3.ListEffectiveTagsRequest\x1a:.google.cloud.resourcemanager.v3.ListEffectiveTagsResponse\"\"\xdaA\x06parent\x82\xd3\xe4\x93\x02\x13\x12\x11/v3/effectiveTags\x1a\x90\x01\xcaA#cloudresourcemanager.googleapis.com\xd2Aghttps://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-platform.read-onlyB\xf1\x01\n" + - "#com.google.cloud.resourcemanager.v3B\x10TagBindingsProtoP\x01ZMcloud.google.com/go/resourcemanager/apiv3/resourcemanagerpb;resourcemanagerpb\xaa\x02\x1fGoogle.Cloud.ResourceManager.V3\xca\x02\x1fGoogle\\Cloud\\ResourceManager\\V3\xea\x02\"Google::Cloud::ResourceManager::V3b\x06proto3" - -var ( - file_google_cloud_resourcemanager_v3_tag_bindings_proto_rawDescOnce sync.Once - file_google_cloud_resourcemanager_v3_tag_bindings_proto_rawDescData []byte -) - -func file_google_cloud_resourcemanager_v3_tag_bindings_proto_rawDescGZIP() []byte { - file_google_cloud_resourcemanager_v3_tag_bindings_proto_rawDescOnce.Do(func() { - file_google_cloud_resourcemanager_v3_tag_bindings_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_google_cloud_resourcemanager_v3_tag_bindings_proto_rawDesc), len(file_google_cloud_resourcemanager_v3_tag_bindings_proto_rawDesc))) - }) - return file_google_cloud_resourcemanager_v3_tag_bindings_proto_rawDescData -} - -var file_google_cloud_resourcemanager_v3_tag_bindings_proto_msgTypes = make([]protoimpl.MessageInfo, 10) -var file_google_cloud_resourcemanager_v3_tag_bindings_proto_goTypes = []any{ - (*TagBinding)(nil), // 0: google.cloud.resourcemanager.v3.TagBinding - (*CreateTagBindingMetadata)(nil), // 1: google.cloud.resourcemanager.v3.CreateTagBindingMetadata - (*CreateTagBindingRequest)(nil), // 2: google.cloud.resourcemanager.v3.CreateTagBindingRequest - (*DeleteTagBindingMetadata)(nil), // 3: google.cloud.resourcemanager.v3.DeleteTagBindingMetadata - (*DeleteTagBindingRequest)(nil), // 4: google.cloud.resourcemanager.v3.DeleteTagBindingRequest - (*ListTagBindingsRequest)(nil), // 5: google.cloud.resourcemanager.v3.ListTagBindingsRequest - (*ListTagBindingsResponse)(nil), // 6: google.cloud.resourcemanager.v3.ListTagBindingsResponse - (*ListEffectiveTagsRequest)(nil), // 7: google.cloud.resourcemanager.v3.ListEffectiveTagsRequest - (*ListEffectiveTagsResponse)(nil), // 8: google.cloud.resourcemanager.v3.ListEffectiveTagsResponse - (*EffectiveTag)(nil), // 9: google.cloud.resourcemanager.v3.EffectiveTag - (*longrunningpb.Operation)(nil), // 10: google.longrunning.Operation -} -var file_google_cloud_resourcemanager_v3_tag_bindings_proto_depIdxs = []int32{ - 0, // 0: google.cloud.resourcemanager.v3.CreateTagBindingRequest.tag_binding:type_name -> google.cloud.resourcemanager.v3.TagBinding - 0, // 1: google.cloud.resourcemanager.v3.ListTagBindingsResponse.tag_bindings:type_name -> google.cloud.resourcemanager.v3.TagBinding - 9, // 2: google.cloud.resourcemanager.v3.ListEffectiveTagsResponse.effective_tags:type_name -> google.cloud.resourcemanager.v3.EffectiveTag - 5, // 3: google.cloud.resourcemanager.v3.TagBindings.ListTagBindings:input_type -> google.cloud.resourcemanager.v3.ListTagBindingsRequest - 2, // 4: google.cloud.resourcemanager.v3.TagBindings.CreateTagBinding:input_type -> google.cloud.resourcemanager.v3.CreateTagBindingRequest - 4, // 5: google.cloud.resourcemanager.v3.TagBindings.DeleteTagBinding:input_type -> google.cloud.resourcemanager.v3.DeleteTagBindingRequest - 7, // 6: google.cloud.resourcemanager.v3.TagBindings.ListEffectiveTags:input_type -> google.cloud.resourcemanager.v3.ListEffectiveTagsRequest - 6, // 7: google.cloud.resourcemanager.v3.TagBindings.ListTagBindings:output_type -> google.cloud.resourcemanager.v3.ListTagBindingsResponse - 10, // 8: google.cloud.resourcemanager.v3.TagBindings.CreateTagBinding:output_type -> google.longrunning.Operation - 10, // 9: google.cloud.resourcemanager.v3.TagBindings.DeleteTagBinding:output_type -> google.longrunning.Operation - 8, // 10: google.cloud.resourcemanager.v3.TagBindings.ListEffectiveTags:output_type -> google.cloud.resourcemanager.v3.ListEffectiveTagsResponse - 7, // [7:11] is the sub-list for method output_type - 3, // [3:7] is the sub-list for method input_type - 3, // [3:3] is the sub-list for extension type_name - 3, // [3:3] is the sub-list for extension extendee - 0, // [0:3] is the sub-list for field type_name -} - -func init() { file_google_cloud_resourcemanager_v3_tag_bindings_proto_init() } -func file_google_cloud_resourcemanager_v3_tag_bindings_proto_init() { - if File_google_cloud_resourcemanager_v3_tag_bindings_proto != nil { - return - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: unsafe.Slice(unsafe.StringData(file_google_cloud_resourcemanager_v3_tag_bindings_proto_rawDesc), len(file_google_cloud_resourcemanager_v3_tag_bindings_proto_rawDesc)), - NumEnums: 0, - NumMessages: 10, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_google_cloud_resourcemanager_v3_tag_bindings_proto_goTypes, - DependencyIndexes: file_google_cloud_resourcemanager_v3_tag_bindings_proto_depIdxs, - MessageInfos: file_google_cloud_resourcemanager_v3_tag_bindings_proto_msgTypes, - }.Build() - File_google_cloud_resourcemanager_v3_tag_bindings_proto = out.File - file_google_cloud_resourcemanager_v3_tag_bindings_proto_goTypes = nil - file_google_cloud_resourcemanager_v3_tag_bindings_proto_depIdxs = nil -} diff --git a/vendor/cloud.google.com/go/resourcemanager/apiv3/resourcemanagerpb/tag_bindings_grpc.pb.go b/vendor/cloud.google.com/go/resourcemanager/apiv3/resourcemanagerpb/tag_bindings_grpc.pb.go deleted file mode 100644 index f8b08fcd58..0000000000 --- a/vendor/cloud.google.com/go/resourcemanager/apiv3/resourcemanagerpb/tag_bindings_grpc.pb.go +++ /dev/null @@ -1,252 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Code generated by protoc-gen-go-grpc. DO NOT EDIT. -// versions: -// - protoc-gen-go-grpc v1.3.0 -// - protoc v6.31.0 -// source: google/cloud/resourcemanager/v3/tag_bindings.proto - -package resourcemanagerpb - -import ( - context "context" - - longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" -) - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 - -const ( - TagBindings_ListTagBindings_FullMethodName = "/google.cloud.resourcemanager.v3.TagBindings/ListTagBindings" - TagBindings_CreateTagBinding_FullMethodName = "/google.cloud.resourcemanager.v3.TagBindings/CreateTagBinding" - TagBindings_DeleteTagBinding_FullMethodName = "/google.cloud.resourcemanager.v3.TagBindings/DeleteTagBinding" - TagBindings_ListEffectiveTags_FullMethodName = "/google.cloud.resourcemanager.v3.TagBindings/ListEffectiveTags" -) - -// TagBindingsClient is the client API for TagBindings service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. -type TagBindingsClient interface { - // Lists the TagBindings for the given Google Cloud resource, as specified - // with `parent`. - // - // NOTE: The `parent` field is expected to be a full resource name: - // https://cloud.google.com/apis/design/resource_names#full_resource_name - ListTagBindings(ctx context.Context, in *ListTagBindingsRequest, opts ...grpc.CallOption) (*ListTagBindingsResponse, error) - // Creates a TagBinding between a TagValue and a Google Cloud resource. - CreateTagBinding(ctx context.Context, in *CreateTagBindingRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) - // Deletes a TagBinding. - DeleteTagBinding(ctx context.Context, in *DeleteTagBindingRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) - // Return a list of effective tags for the given Google Cloud resource, as - // specified in `parent`. - ListEffectiveTags(ctx context.Context, in *ListEffectiveTagsRequest, opts ...grpc.CallOption) (*ListEffectiveTagsResponse, error) -} - -type tagBindingsClient struct { - cc grpc.ClientConnInterface -} - -func NewTagBindingsClient(cc grpc.ClientConnInterface) TagBindingsClient { - return &tagBindingsClient{cc} -} - -func (c *tagBindingsClient) ListTagBindings(ctx context.Context, in *ListTagBindingsRequest, opts ...grpc.CallOption) (*ListTagBindingsResponse, error) { - out := new(ListTagBindingsResponse) - err := c.cc.Invoke(ctx, TagBindings_ListTagBindings_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *tagBindingsClient) CreateTagBinding(ctx context.Context, in *CreateTagBindingRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) { - out := new(longrunningpb.Operation) - err := c.cc.Invoke(ctx, TagBindings_CreateTagBinding_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *tagBindingsClient) DeleteTagBinding(ctx context.Context, in *DeleteTagBindingRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) { - out := new(longrunningpb.Operation) - err := c.cc.Invoke(ctx, TagBindings_DeleteTagBinding_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *tagBindingsClient) ListEffectiveTags(ctx context.Context, in *ListEffectiveTagsRequest, opts ...grpc.CallOption) (*ListEffectiveTagsResponse, error) { - out := new(ListEffectiveTagsResponse) - err := c.cc.Invoke(ctx, TagBindings_ListEffectiveTags_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// TagBindingsServer is the server API for TagBindings service. -// All implementations should embed UnimplementedTagBindingsServer -// for forward compatibility -type TagBindingsServer interface { - // Lists the TagBindings for the given Google Cloud resource, as specified - // with `parent`. - // - // NOTE: The `parent` field is expected to be a full resource name: - // https://cloud.google.com/apis/design/resource_names#full_resource_name - ListTagBindings(context.Context, *ListTagBindingsRequest) (*ListTagBindingsResponse, error) - // Creates a TagBinding between a TagValue and a Google Cloud resource. - CreateTagBinding(context.Context, *CreateTagBindingRequest) (*longrunningpb.Operation, error) - // Deletes a TagBinding. - DeleteTagBinding(context.Context, *DeleteTagBindingRequest) (*longrunningpb.Operation, error) - // Return a list of effective tags for the given Google Cloud resource, as - // specified in `parent`. - ListEffectiveTags(context.Context, *ListEffectiveTagsRequest) (*ListEffectiveTagsResponse, error) -} - -// UnimplementedTagBindingsServer should be embedded to have forward compatible implementations. -type UnimplementedTagBindingsServer struct { -} - -func (UnimplementedTagBindingsServer) ListTagBindings(context.Context, *ListTagBindingsRequest) (*ListTagBindingsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ListTagBindings not implemented") -} -func (UnimplementedTagBindingsServer) CreateTagBinding(context.Context, *CreateTagBindingRequest) (*longrunningpb.Operation, error) { - return nil, status.Errorf(codes.Unimplemented, "method CreateTagBinding not implemented") -} -func (UnimplementedTagBindingsServer) DeleteTagBinding(context.Context, *DeleteTagBindingRequest) (*longrunningpb.Operation, error) { - return nil, status.Errorf(codes.Unimplemented, "method DeleteTagBinding not implemented") -} -func (UnimplementedTagBindingsServer) ListEffectiveTags(context.Context, *ListEffectiveTagsRequest) (*ListEffectiveTagsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ListEffectiveTags not implemented") -} - -// UnsafeTagBindingsServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to TagBindingsServer will -// result in compilation errors. -type UnsafeTagBindingsServer interface { - mustEmbedUnimplementedTagBindingsServer() -} - -func RegisterTagBindingsServer(s grpc.ServiceRegistrar, srv TagBindingsServer) { - s.RegisterService(&TagBindings_ServiceDesc, srv) -} - -func _TagBindings_ListTagBindings_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ListTagBindingsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(TagBindingsServer).ListTagBindings(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: TagBindings_ListTagBindings_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(TagBindingsServer).ListTagBindings(ctx, req.(*ListTagBindingsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _TagBindings_CreateTagBinding_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CreateTagBindingRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(TagBindingsServer).CreateTagBinding(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: TagBindings_CreateTagBinding_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(TagBindingsServer).CreateTagBinding(ctx, req.(*CreateTagBindingRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _TagBindings_DeleteTagBinding_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DeleteTagBindingRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(TagBindingsServer).DeleteTagBinding(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: TagBindings_DeleteTagBinding_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(TagBindingsServer).DeleteTagBinding(ctx, req.(*DeleteTagBindingRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _TagBindings_ListEffectiveTags_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ListEffectiveTagsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(TagBindingsServer).ListEffectiveTags(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: TagBindings_ListEffectiveTags_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(TagBindingsServer).ListEffectiveTags(ctx, req.(*ListEffectiveTagsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -// TagBindings_ServiceDesc is the grpc.ServiceDesc for TagBindings service. -// It's only intended for direct use with grpc.RegisterService, -// and not to be introspected or modified (even as a copy) -var TagBindings_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "google.cloud.resourcemanager.v3.TagBindings", - HandlerType: (*TagBindingsServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "ListTagBindings", - Handler: _TagBindings_ListTagBindings_Handler, - }, - { - MethodName: "CreateTagBinding", - Handler: _TagBindings_CreateTagBinding_Handler, - }, - { - MethodName: "DeleteTagBinding", - Handler: _TagBindings_DeleteTagBinding_Handler, - }, - { - MethodName: "ListEffectiveTags", - Handler: _TagBindings_ListEffectiveTags_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "google/cloud/resourcemanager/v3/tag_bindings.proto", -} diff --git a/vendor/cloud.google.com/go/resourcemanager/apiv3/resourcemanagerpb/tag_holds.pb.go b/vendor/cloud.google.com/go/resourcemanager/apiv3/resourcemanagerpb/tag_holds.pb.go deleted file mode 100644 index bb43dd171e..0000000000 --- a/vendor/cloud.google.com/go/resourcemanager/apiv3/resourcemanagerpb/tag_holds.pb.go +++ /dev/null @@ -1,594 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.36.11 -// protoc v6.31.0 -// source: google/cloud/resourcemanager/v3/tag_holds.proto - -package resourcemanagerpb - -import ( - reflect "reflect" - sync "sync" - unsafe "unsafe" - - longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" - _ "google.golang.org/genproto/googleapis/api/annotations" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - _ "google.golang.org/protobuf/types/known/emptypb" - timestamppb "google.golang.org/protobuf/types/known/timestamppb" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// A TagHold represents the use of a TagValue that is not captured by -// TagBindings. If a TagValue has any TagHolds, deletion will be blocked. -// This resource is intended to be created in the same cloud location as the -// `holder`. -type TagHold struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Output only. The resource name of a TagHold. This is a String of the form: - // `tagValues/{tag-value-id}/tagHolds/{tag-hold-id}` - // (e.g. `tagValues/123/tagHolds/456`). This resource name is generated by - // the server. - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // Required. The name of the resource where the TagValue is being used. Must - // be less than 200 characters. E.g. - // `//compute.googleapis.com/compute/projects/myproject/regions/us-east-1/instanceGroupManagers/instance-group` - Holder string `protobuf:"bytes,2,opt,name=holder,proto3" json:"holder,omitempty"` - // Optional. An optional string representing the origin of this request. This - // field should include human-understandable information to distinguish - // origins from each other. Must be less than 200 characters. E.g. - // `migs-35678234` - Origin string `protobuf:"bytes,3,opt,name=origin,proto3" json:"origin,omitempty"` - // Optional. A URL where an end user can learn more about removing this hold. - // E.g. - // `https://cloud.google.com/resource-manager/docs/tags/tags-creating-and-managing` - HelpLink string `protobuf:"bytes,4,opt,name=help_link,json=helpLink,proto3" json:"help_link,omitempty"` - // Output only. The time this TagHold was created. - CreateTime *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *TagHold) Reset() { - *x = TagHold{} - mi := &file_google_cloud_resourcemanager_v3_tag_holds_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *TagHold) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*TagHold) ProtoMessage() {} - -func (x *TagHold) ProtoReflect() protoreflect.Message { - mi := &file_google_cloud_resourcemanager_v3_tag_holds_proto_msgTypes[0] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use TagHold.ProtoReflect.Descriptor instead. -func (*TagHold) Descriptor() ([]byte, []int) { - return file_google_cloud_resourcemanager_v3_tag_holds_proto_rawDescGZIP(), []int{0} -} - -func (x *TagHold) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *TagHold) GetHolder() string { - if x != nil { - return x.Holder - } - return "" -} - -func (x *TagHold) GetOrigin() string { - if x != nil { - return x.Origin - } - return "" -} - -func (x *TagHold) GetHelpLink() string { - if x != nil { - return x.HelpLink - } - return "" -} - -func (x *TagHold) GetCreateTime() *timestamppb.Timestamp { - if x != nil { - return x.CreateTime - } - return nil -} - -// The request message to create a TagHold. -type CreateTagHoldRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Required. The resource name of the TagHold's parent TagValue. Must be of - // the form: `tagValues/{tag-value-id}`. - Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` - // Required. The TagHold to be created. - TagHold *TagHold `protobuf:"bytes,2,opt,name=tag_hold,json=tagHold,proto3" json:"tag_hold,omitempty"` - // Optional. Set to true to perform the validations necessary for creating the - // resource, but not actually perform the action. - ValidateOnly bool `protobuf:"varint,3,opt,name=validate_only,json=validateOnly,proto3" json:"validate_only,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *CreateTagHoldRequest) Reset() { - *x = CreateTagHoldRequest{} - mi := &file_google_cloud_resourcemanager_v3_tag_holds_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *CreateTagHoldRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CreateTagHoldRequest) ProtoMessage() {} - -func (x *CreateTagHoldRequest) ProtoReflect() protoreflect.Message { - mi := &file_google_cloud_resourcemanager_v3_tag_holds_proto_msgTypes[1] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CreateTagHoldRequest.ProtoReflect.Descriptor instead. -func (*CreateTagHoldRequest) Descriptor() ([]byte, []int) { - return file_google_cloud_resourcemanager_v3_tag_holds_proto_rawDescGZIP(), []int{1} -} - -func (x *CreateTagHoldRequest) GetParent() string { - if x != nil { - return x.Parent - } - return "" -} - -func (x *CreateTagHoldRequest) GetTagHold() *TagHold { - if x != nil { - return x.TagHold - } - return nil -} - -func (x *CreateTagHoldRequest) GetValidateOnly() bool { - if x != nil { - return x.ValidateOnly - } - return false -} - -// Runtime operation information for creating a TagHold. -// (-- The metadata is currently empty, but may include information in the -// future. --) -type CreateTagHoldMetadata struct { - state protoimpl.MessageState `protogen:"open.v1"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *CreateTagHoldMetadata) Reset() { - *x = CreateTagHoldMetadata{} - mi := &file_google_cloud_resourcemanager_v3_tag_holds_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *CreateTagHoldMetadata) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CreateTagHoldMetadata) ProtoMessage() {} - -func (x *CreateTagHoldMetadata) ProtoReflect() protoreflect.Message { - mi := &file_google_cloud_resourcemanager_v3_tag_holds_proto_msgTypes[2] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CreateTagHoldMetadata.ProtoReflect.Descriptor instead. -func (*CreateTagHoldMetadata) Descriptor() ([]byte, []int) { - return file_google_cloud_resourcemanager_v3_tag_holds_proto_rawDescGZIP(), []int{2} -} - -// The request message to delete a TagHold. -type DeleteTagHoldRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Required. The resource name of the TagHold to delete. Must be of the form: - // `tagValues/{tag-value-id}/tagHolds/{tag-hold-id}`. - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // Optional. Set to true to perform the validations necessary for deleting the - // resource, but not actually perform the action. - ValidateOnly bool `protobuf:"varint,2,opt,name=validate_only,json=validateOnly,proto3" json:"validate_only,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *DeleteTagHoldRequest) Reset() { - *x = DeleteTagHoldRequest{} - mi := &file_google_cloud_resourcemanager_v3_tag_holds_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *DeleteTagHoldRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DeleteTagHoldRequest) ProtoMessage() {} - -func (x *DeleteTagHoldRequest) ProtoReflect() protoreflect.Message { - mi := &file_google_cloud_resourcemanager_v3_tag_holds_proto_msgTypes[3] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DeleteTagHoldRequest.ProtoReflect.Descriptor instead. -func (*DeleteTagHoldRequest) Descriptor() ([]byte, []int) { - return file_google_cloud_resourcemanager_v3_tag_holds_proto_rawDescGZIP(), []int{3} -} - -func (x *DeleteTagHoldRequest) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *DeleteTagHoldRequest) GetValidateOnly() bool { - if x != nil { - return x.ValidateOnly - } - return false -} - -// Runtime operation information for deleting a TagHold. -// (-- The metadata is currently empty, but may include information in the -// future. --) -type DeleteTagHoldMetadata struct { - state protoimpl.MessageState `protogen:"open.v1"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *DeleteTagHoldMetadata) Reset() { - *x = DeleteTagHoldMetadata{} - mi := &file_google_cloud_resourcemanager_v3_tag_holds_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *DeleteTagHoldMetadata) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DeleteTagHoldMetadata) ProtoMessage() {} - -func (x *DeleteTagHoldMetadata) ProtoReflect() protoreflect.Message { - mi := &file_google_cloud_resourcemanager_v3_tag_holds_proto_msgTypes[4] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DeleteTagHoldMetadata.ProtoReflect.Descriptor instead. -func (*DeleteTagHoldMetadata) Descriptor() ([]byte, []int) { - return file_google_cloud_resourcemanager_v3_tag_holds_proto_rawDescGZIP(), []int{4} -} - -// The request message for listing the TagHolds under a TagValue. -type ListTagHoldsRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Required. The resource name of the parent TagValue. Must be of the form: - // `tagValues/{tag-value-id}`. - Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` - // Optional. The maximum number of TagHolds to return in the response. The - // server allows a maximum of 300 TagHolds to return. If unspecified, the - // server will use 100 as the default. - PageSize int32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` - // Optional. A pagination token returned from a previous call to - // `ListTagHolds` that indicates where this listing should continue from. - PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` - // Optional. Criteria used to select a subset of TagHolds parented by the - // TagValue to return. This field follows the syntax defined by aip.dev/160; - // the `holder` and `origin` fields are supported for filtering. Currently - // only `AND` syntax is supported. Some example queries are: - // - // - `holder = - // //compute.googleapis.com/compute/projects/myproject/regions/us-east-1/instanceGroupManagers/instance-group` - // - `origin = 35678234` - // - `holder = - // //compute.googleapis.com/compute/projects/myproject/regions/us-east-1/instanceGroupManagers/instance-group - // AND origin = 35678234` - Filter string `protobuf:"bytes,4,opt,name=filter,proto3" json:"filter,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ListTagHoldsRequest) Reset() { - *x = ListTagHoldsRequest{} - mi := &file_google_cloud_resourcemanager_v3_tag_holds_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ListTagHoldsRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListTagHoldsRequest) ProtoMessage() {} - -func (x *ListTagHoldsRequest) ProtoReflect() protoreflect.Message { - mi := &file_google_cloud_resourcemanager_v3_tag_holds_proto_msgTypes[5] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ListTagHoldsRequest.ProtoReflect.Descriptor instead. -func (*ListTagHoldsRequest) Descriptor() ([]byte, []int) { - return file_google_cloud_resourcemanager_v3_tag_holds_proto_rawDescGZIP(), []int{5} -} - -func (x *ListTagHoldsRequest) GetParent() string { - if x != nil { - return x.Parent - } - return "" -} - -func (x *ListTagHoldsRequest) GetPageSize() int32 { - if x != nil { - return x.PageSize - } - return 0 -} - -func (x *ListTagHoldsRequest) GetPageToken() string { - if x != nil { - return x.PageToken - } - return "" -} - -func (x *ListTagHoldsRequest) GetFilter() string { - if x != nil { - return x.Filter - } - return "" -} - -// The ListTagHolds response. -type ListTagHoldsResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - // A possibly paginated list of TagHolds. - TagHolds []*TagHold `protobuf:"bytes,1,rep,name=tag_holds,json=tagHolds,proto3" json:"tag_holds,omitempty"` - // Pagination token. - // - // If the result set is too large to fit in a single response, this token - // is returned. It encodes the position of the current result cursor. - // Feeding this value into a new list request with the `page_token` parameter - // gives the next page of the results. - // - // When `next_page_token` is not filled in, there is no next page and - // the list returned is the last page in the result set. - // - // Pagination tokens have a limited lifetime. - NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ListTagHoldsResponse) Reset() { - *x = ListTagHoldsResponse{} - mi := &file_google_cloud_resourcemanager_v3_tag_holds_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ListTagHoldsResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListTagHoldsResponse) ProtoMessage() {} - -func (x *ListTagHoldsResponse) ProtoReflect() protoreflect.Message { - mi := &file_google_cloud_resourcemanager_v3_tag_holds_proto_msgTypes[6] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ListTagHoldsResponse.ProtoReflect.Descriptor instead. -func (*ListTagHoldsResponse) Descriptor() ([]byte, []int) { - return file_google_cloud_resourcemanager_v3_tag_holds_proto_rawDescGZIP(), []int{6} -} - -func (x *ListTagHoldsResponse) GetTagHolds() []*TagHold { - if x != nil { - return x.TagHolds - } - return nil -} - -func (x *ListTagHoldsResponse) GetNextPageToken() string { - if x != nil { - return x.NextPageToken - } - return "" -} - -var File_google_cloud_resourcemanager_v3_tag_holds_proto protoreflect.FileDescriptor - -const file_google_cloud_resourcemanager_v3_tag_holds_proto_rawDesc = "" + - "\n" + - "/google/cloud/resourcemanager/v3/tag_holds.proto\x12\x1fgoogle.cloud.resourcemanager.v3\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x9d\x02\n" + - "\aTagHold\x12\x17\n" + - "\x04name\x18\x01 \x01(\tB\x03\xe0A\x03R\x04name\x12\x1b\n" + - "\x06holder\x18\x02 \x01(\tB\x03\xe0A\x02R\x06holder\x12\x1b\n" + - "\x06origin\x18\x03 \x01(\tB\x03\xe0A\x01R\x06origin\x12 \n" + - "\thelp_link\x18\x04 \x01(\tB\x03\xe0A\x01R\bhelpLink\x12@\n" + - "\vcreate_time\x18\x05 \x01(\v2\x1a.google.protobuf.TimestampB\x03\xe0A\x03R\n" + - "createTime:[\xeaAX\n" + - "+cloudresourcemanager.googleapis.com/TagHold\x12)tagValues/{tag_value}/tagHolds/{tag_hold}\"\xd7\x01\n" + - "\x14CreateTagHoldRequest\x12K\n" + - "\x06parent\x18\x01 \x01(\tB3\xe0A\x02\xfaA-\x12+cloudresourcemanager.googleapis.com/TagHoldR\x06parent\x12H\n" + - "\btag_hold\x18\x02 \x01(\v2(.google.cloud.resourcemanager.v3.TagHoldB\x03\xe0A\x02R\atagHold\x12(\n" + - "\rvalidate_only\x18\x03 \x01(\bB\x03\xe0A\x01R\fvalidateOnly\"\x17\n" + - "\x15CreateTagHoldMetadata\"\x89\x01\n" + - "\x14DeleteTagHoldRequest\x12G\n" + - "\x04name\x18\x01 \x01(\tB3\xe0A\x02\xfaA-\n" + - "+cloudresourcemanager.googleapis.com/TagHoldR\x04name\x12(\n" + - "\rvalidate_only\x18\x02 \x01(\bB\x03\xe0A\x01R\fvalidateOnly\"\x17\n" + - "\x15DeleteTagHoldMetadata\"\xc5\x01\n" + - "\x13ListTagHoldsRequest\x12K\n" + - "\x06parent\x18\x01 \x01(\tB3\xe0A\x02\xfaA-\x12+cloudresourcemanager.googleapis.com/TagHoldR\x06parent\x12 \n" + - "\tpage_size\x18\x02 \x01(\x05B\x03\xe0A\x01R\bpageSize\x12\"\n" + - "\n" + - "page_token\x18\x03 \x01(\tB\x03\xe0A\x01R\tpageToken\x12\x1b\n" + - "\x06filter\x18\x04 \x01(\tB\x03\xe0A\x01R\x06filter\"\x85\x01\n" + - "\x14ListTagHoldsResponse\x12E\n" + - "\ttag_holds\x18\x01 \x03(\v2(.google.cloud.resourcemanager.v3.TagHoldR\btagHolds\x12&\n" + - "\x0fnext_page_token\x18\x02 \x01(\tR\rnextPageToken2\xec\x05\n" + - "\bTagHolds\x12\xcf\x01\n" + - "\rCreateTagHold\x125.google.cloud.resourcemanager.v3.CreateTagHoldRequest\x1a\x1d.google.longrunning.Operation\"h\xcaA \n" + - "\aTagHold\x12\x15CreateTagHoldMetadata\xdaA\x0fparent,tag_hold\x82\xd3\xe4\x93\x02-:\btag_hold\"!/v3/{parent=tagValues/*}/tagHolds\x12\xc8\x01\n" + - "\rDeleteTagHold\x125.google.cloud.resourcemanager.v3.DeleteTagHoldRequest\x1a\x1d.google.longrunning.Operation\"a\xcaA.\n" + - "\x15google.protobuf.Empty\x12\x15DeleteTagHoldMetadata\xdaA\x04name\x82\xd3\xe4\x93\x02#*!/v3/{name=tagValues/*/tagHolds/*}\x12\xaf\x01\n" + - "\fListTagHolds\x124.google.cloud.resourcemanager.v3.ListTagHoldsRequest\x1a5.google.cloud.resourcemanager.v3.ListTagHoldsResponse\"2\xdaA\x06parent\x82\xd3\xe4\x93\x02#\x12!/v3/{parent=tagValues/*}/tagHolds\x1a\x90\x01\xcaA#cloudresourcemanager.googleapis.com\xd2Aghttps://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-platform.read-onlyB\xee\x01\n" + - "#com.google.cloud.resourcemanager.v3B\rTagHoldsProtoP\x01ZMcloud.google.com/go/resourcemanager/apiv3/resourcemanagerpb;resourcemanagerpb\xaa\x02\x1fGoogle.Cloud.ResourceManager.V3\xca\x02\x1fGoogle\\Cloud\\ResourceManager\\V3\xea\x02\"Google::Cloud::ResourceManager::V3b\x06proto3" - -var ( - file_google_cloud_resourcemanager_v3_tag_holds_proto_rawDescOnce sync.Once - file_google_cloud_resourcemanager_v3_tag_holds_proto_rawDescData []byte -) - -func file_google_cloud_resourcemanager_v3_tag_holds_proto_rawDescGZIP() []byte { - file_google_cloud_resourcemanager_v3_tag_holds_proto_rawDescOnce.Do(func() { - file_google_cloud_resourcemanager_v3_tag_holds_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_google_cloud_resourcemanager_v3_tag_holds_proto_rawDesc), len(file_google_cloud_resourcemanager_v3_tag_holds_proto_rawDesc))) - }) - return file_google_cloud_resourcemanager_v3_tag_holds_proto_rawDescData -} - -var file_google_cloud_resourcemanager_v3_tag_holds_proto_msgTypes = make([]protoimpl.MessageInfo, 7) -var file_google_cloud_resourcemanager_v3_tag_holds_proto_goTypes = []any{ - (*TagHold)(nil), // 0: google.cloud.resourcemanager.v3.TagHold - (*CreateTagHoldRequest)(nil), // 1: google.cloud.resourcemanager.v3.CreateTagHoldRequest - (*CreateTagHoldMetadata)(nil), // 2: google.cloud.resourcemanager.v3.CreateTagHoldMetadata - (*DeleteTagHoldRequest)(nil), // 3: google.cloud.resourcemanager.v3.DeleteTagHoldRequest - (*DeleteTagHoldMetadata)(nil), // 4: google.cloud.resourcemanager.v3.DeleteTagHoldMetadata - (*ListTagHoldsRequest)(nil), // 5: google.cloud.resourcemanager.v3.ListTagHoldsRequest - (*ListTagHoldsResponse)(nil), // 6: google.cloud.resourcemanager.v3.ListTagHoldsResponse - (*timestamppb.Timestamp)(nil), // 7: google.protobuf.Timestamp - (*longrunningpb.Operation)(nil), // 8: google.longrunning.Operation -} -var file_google_cloud_resourcemanager_v3_tag_holds_proto_depIdxs = []int32{ - 7, // 0: google.cloud.resourcemanager.v3.TagHold.create_time:type_name -> google.protobuf.Timestamp - 0, // 1: google.cloud.resourcemanager.v3.CreateTagHoldRequest.tag_hold:type_name -> google.cloud.resourcemanager.v3.TagHold - 0, // 2: google.cloud.resourcemanager.v3.ListTagHoldsResponse.tag_holds:type_name -> google.cloud.resourcemanager.v3.TagHold - 1, // 3: google.cloud.resourcemanager.v3.TagHolds.CreateTagHold:input_type -> google.cloud.resourcemanager.v3.CreateTagHoldRequest - 3, // 4: google.cloud.resourcemanager.v3.TagHolds.DeleteTagHold:input_type -> google.cloud.resourcemanager.v3.DeleteTagHoldRequest - 5, // 5: google.cloud.resourcemanager.v3.TagHolds.ListTagHolds:input_type -> google.cloud.resourcemanager.v3.ListTagHoldsRequest - 8, // 6: google.cloud.resourcemanager.v3.TagHolds.CreateTagHold:output_type -> google.longrunning.Operation - 8, // 7: google.cloud.resourcemanager.v3.TagHolds.DeleteTagHold:output_type -> google.longrunning.Operation - 6, // 8: google.cloud.resourcemanager.v3.TagHolds.ListTagHolds:output_type -> google.cloud.resourcemanager.v3.ListTagHoldsResponse - 6, // [6:9] is the sub-list for method output_type - 3, // [3:6] is the sub-list for method input_type - 3, // [3:3] is the sub-list for extension type_name - 3, // [3:3] is the sub-list for extension extendee - 0, // [0:3] is the sub-list for field type_name -} - -func init() { file_google_cloud_resourcemanager_v3_tag_holds_proto_init() } -func file_google_cloud_resourcemanager_v3_tag_holds_proto_init() { - if File_google_cloud_resourcemanager_v3_tag_holds_proto != nil { - return - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: unsafe.Slice(unsafe.StringData(file_google_cloud_resourcemanager_v3_tag_holds_proto_rawDesc), len(file_google_cloud_resourcemanager_v3_tag_holds_proto_rawDesc)), - NumEnums: 0, - NumMessages: 7, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_google_cloud_resourcemanager_v3_tag_holds_proto_goTypes, - DependencyIndexes: file_google_cloud_resourcemanager_v3_tag_holds_proto_depIdxs, - MessageInfos: file_google_cloud_resourcemanager_v3_tag_holds_proto_msgTypes, - }.Build() - File_google_cloud_resourcemanager_v3_tag_holds_proto = out.File - file_google_cloud_resourcemanager_v3_tag_holds_proto_goTypes = nil - file_google_cloud_resourcemanager_v3_tag_holds_proto_depIdxs = nil -} diff --git a/vendor/cloud.google.com/go/resourcemanager/apiv3/resourcemanagerpb/tag_holds_grpc.pb.go b/vendor/cloud.google.com/go/resourcemanager/apiv3/resourcemanagerpb/tag_holds_grpc.pb.go deleted file mode 100644 index 74b77f5b17..0000000000 --- a/vendor/cloud.google.com/go/resourcemanager/apiv3/resourcemanagerpb/tag_holds_grpc.pb.go +++ /dev/null @@ -1,205 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Code generated by protoc-gen-go-grpc. DO NOT EDIT. -// versions: -// - protoc-gen-go-grpc v1.3.0 -// - protoc v6.31.0 -// source: google/cloud/resourcemanager/v3/tag_holds.proto - -package resourcemanagerpb - -import ( - context "context" - - longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" -) - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 - -const ( - TagHolds_CreateTagHold_FullMethodName = "/google.cloud.resourcemanager.v3.TagHolds/CreateTagHold" - TagHolds_DeleteTagHold_FullMethodName = "/google.cloud.resourcemanager.v3.TagHolds/DeleteTagHold" - TagHolds_ListTagHolds_FullMethodName = "/google.cloud.resourcemanager.v3.TagHolds/ListTagHolds" -) - -// TagHoldsClient is the client API for TagHolds service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. -type TagHoldsClient interface { - // Creates a TagHold. Returns ALREADY_EXISTS if a TagHold with the same - // resource and origin exists under the same TagValue. - CreateTagHold(ctx context.Context, in *CreateTagHoldRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) - // Deletes a TagHold. - DeleteTagHold(ctx context.Context, in *DeleteTagHoldRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) - // Lists TagHolds under a TagValue. - ListTagHolds(ctx context.Context, in *ListTagHoldsRequest, opts ...grpc.CallOption) (*ListTagHoldsResponse, error) -} - -type tagHoldsClient struct { - cc grpc.ClientConnInterface -} - -func NewTagHoldsClient(cc grpc.ClientConnInterface) TagHoldsClient { - return &tagHoldsClient{cc} -} - -func (c *tagHoldsClient) CreateTagHold(ctx context.Context, in *CreateTagHoldRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) { - out := new(longrunningpb.Operation) - err := c.cc.Invoke(ctx, TagHolds_CreateTagHold_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *tagHoldsClient) DeleteTagHold(ctx context.Context, in *DeleteTagHoldRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) { - out := new(longrunningpb.Operation) - err := c.cc.Invoke(ctx, TagHolds_DeleteTagHold_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *tagHoldsClient) ListTagHolds(ctx context.Context, in *ListTagHoldsRequest, opts ...grpc.CallOption) (*ListTagHoldsResponse, error) { - out := new(ListTagHoldsResponse) - err := c.cc.Invoke(ctx, TagHolds_ListTagHolds_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// TagHoldsServer is the server API for TagHolds service. -// All implementations should embed UnimplementedTagHoldsServer -// for forward compatibility -type TagHoldsServer interface { - // Creates a TagHold. Returns ALREADY_EXISTS if a TagHold with the same - // resource and origin exists under the same TagValue. - CreateTagHold(context.Context, *CreateTagHoldRequest) (*longrunningpb.Operation, error) - // Deletes a TagHold. - DeleteTagHold(context.Context, *DeleteTagHoldRequest) (*longrunningpb.Operation, error) - // Lists TagHolds under a TagValue. - ListTagHolds(context.Context, *ListTagHoldsRequest) (*ListTagHoldsResponse, error) -} - -// UnimplementedTagHoldsServer should be embedded to have forward compatible implementations. -type UnimplementedTagHoldsServer struct { -} - -func (UnimplementedTagHoldsServer) CreateTagHold(context.Context, *CreateTagHoldRequest) (*longrunningpb.Operation, error) { - return nil, status.Errorf(codes.Unimplemented, "method CreateTagHold not implemented") -} -func (UnimplementedTagHoldsServer) DeleteTagHold(context.Context, *DeleteTagHoldRequest) (*longrunningpb.Operation, error) { - return nil, status.Errorf(codes.Unimplemented, "method DeleteTagHold not implemented") -} -func (UnimplementedTagHoldsServer) ListTagHolds(context.Context, *ListTagHoldsRequest) (*ListTagHoldsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ListTagHolds not implemented") -} - -// UnsafeTagHoldsServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to TagHoldsServer will -// result in compilation errors. -type UnsafeTagHoldsServer interface { - mustEmbedUnimplementedTagHoldsServer() -} - -func RegisterTagHoldsServer(s grpc.ServiceRegistrar, srv TagHoldsServer) { - s.RegisterService(&TagHolds_ServiceDesc, srv) -} - -func _TagHolds_CreateTagHold_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CreateTagHoldRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(TagHoldsServer).CreateTagHold(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: TagHolds_CreateTagHold_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(TagHoldsServer).CreateTagHold(ctx, req.(*CreateTagHoldRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _TagHolds_DeleteTagHold_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DeleteTagHoldRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(TagHoldsServer).DeleteTagHold(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: TagHolds_DeleteTagHold_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(TagHoldsServer).DeleteTagHold(ctx, req.(*DeleteTagHoldRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _TagHolds_ListTagHolds_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ListTagHoldsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(TagHoldsServer).ListTagHolds(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: TagHolds_ListTagHolds_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(TagHoldsServer).ListTagHolds(ctx, req.(*ListTagHoldsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -// TagHolds_ServiceDesc is the grpc.ServiceDesc for TagHolds service. -// It's only intended for direct use with grpc.RegisterService, -// and not to be introspected or modified (even as a copy) -var TagHolds_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "google.cloud.resourcemanager.v3.TagHolds", - HandlerType: (*TagHoldsServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "CreateTagHold", - Handler: _TagHolds_CreateTagHold_Handler, - }, - { - MethodName: "DeleteTagHold", - Handler: _TagHolds_DeleteTagHold_Handler, - }, - { - MethodName: "ListTagHolds", - Handler: _TagHolds_ListTagHolds_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "google/cloud/resourcemanager/v3/tag_holds.proto", -} diff --git a/vendor/cloud.google.com/go/resourcemanager/apiv3/resourcemanagerpb/tag_keys.pb.go b/vendor/cloud.google.com/go/resourcemanager/apiv3/resourcemanagerpb/tag_keys.pb.go deleted file mode 100644 index efb4a36771..0000000000 --- a/vendor/cloud.google.com/go/resourcemanager/apiv3/resourcemanagerpb/tag_keys.pb.go +++ /dev/null @@ -1,952 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.36.11 -// protoc v6.31.0 -// source: google/cloud/resourcemanager/v3/tag_keys.proto - -package resourcemanagerpb - -import ( - reflect "reflect" - sync "sync" - unsafe "unsafe" - - iampb "cloud.google.com/go/iam/apiv1/iampb" - longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" - _ "google.golang.org/genproto/googleapis/api/annotations" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - fieldmaskpb "google.golang.org/protobuf/types/known/fieldmaskpb" - timestamppb "google.golang.org/protobuf/types/known/timestamppb" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// A purpose for each policy engine requiring such an integration. A single -// policy engine may have multiple purposes defined, however a TagKey may only -// specify a single purpose. -type Purpose int32 - -const ( - // Unspecified purpose. - Purpose_PURPOSE_UNSPECIFIED Purpose = 0 - // Purpose for Compute Engine firewalls. - // A corresponding `purpose_data` should be set for the network the tag is - // intended for. The key should be `network` and the value should be in - // either of these two formats: - // - // - - // `https://www.googleapis.com/compute/{compute_version}/projects/{project_id}/global/networks/{network_id}` - // - `{project_id}/{network_name}` - // - // Examples: - // - // - - // `https://www.googleapis.com/compute/staging_v1/projects/fail-closed-load-testing/global/networks/6992953698831725600` - // - `fail-closed-load-testing/load-testing-network` - Purpose_GCE_FIREWALL Purpose = 1 -) - -// Enum value maps for Purpose. -var ( - Purpose_name = map[int32]string{ - 0: "PURPOSE_UNSPECIFIED", - 1: "GCE_FIREWALL", - } - Purpose_value = map[string]int32{ - "PURPOSE_UNSPECIFIED": 0, - "GCE_FIREWALL": 1, - } -) - -func (x Purpose) Enum() *Purpose { - p := new(Purpose) - *p = x - return p -} - -func (x Purpose) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (Purpose) Descriptor() protoreflect.EnumDescriptor { - return file_google_cloud_resourcemanager_v3_tag_keys_proto_enumTypes[0].Descriptor() -} - -func (Purpose) Type() protoreflect.EnumType { - return &file_google_cloud_resourcemanager_v3_tag_keys_proto_enumTypes[0] -} - -func (x Purpose) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use Purpose.Descriptor instead. -func (Purpose) EnumDescriptor() ([]byte, []int) { - return file_google_cloud_resourcemanager_v3_tag_keys_proto_rawDescGZIP(), []int{0} -} - -// A TagKey, used to group a set of TagValues. -type TagKey struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Immutable. The resource name for a TagKey. Must be in the format - // `tagKeys/{tag_key_id}`, where `tag_key_id` is the generated numeric id for - // the TagKey. - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // Immutable. The resource name of the TagKey's parent. A TagKey can be - // parented by an Organization or a Project. For a TagKey parented by an - // Organization, its parent must be in the form `organizations/{org_id}`. For - // a TagKey parented by a Project, its parent can be in the form - // `projects/{project_id}` or `projects/{project_number}`. - Parent string `protobuf:"bytes,2,opt,name=parent,proto3" json:"parent,omitempty"` - // Required. Immutable. The user friendly name for a TagKey. The short name - // should be unique for TagKeys within the same tag namespace. - // - // The short name must be 1-63 characters, beginning and ending with - // an alphanumeric character ([a-z0-9A-Z]) with dashes (-), underscores (_), - // dots (.), and alphanumerics between. - ShortName string `protobuf:"bytes,3,opt,name=short_name,json=shortName,proto3" json:"short_name,omitempty"` - // Output only. Immutable. Namespaced name of the TagKey. - NamespacedName string `protobuf:"bytes,4,opt,name=namespaced_name,json=namespacedName,proto3" json:"namespaced_name,omitempty"` - // Optional. User-assigned description of the TagKey. Must not exceed 256 - // characters. - // - // Read-write. - Description string `protobuf:"bytes,5,opt,name=description,proto3" json:"description,omitempty"` - // Output only. Creation time. - CreateTime *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"` - // Output only. Update time. - UpdateTime *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=update_time,json=updateTime,proto3" json:"update_time,omitempty"` - // Optional. Entity tag which users can pass to prevent race conditions. This - // field is always set in server responses. See UpdateTagKeyRequest for - // details. - Etag string `protobuf:"bytes,8,opt,name=etag,proto3" json:"etag,omitempty"` - // Optional. A purpose denotes that this Tag is intended for use in policies - // of a specific policy engine, and will involve that policy engine in - // management operations involving this Tag. A purpose does not grant a - // policy engine exclusive rights to the Tag, and it may be referenced by - // other policy engines. - // - // A purpose cannot be changed once set. - Purpose Purpose `protobuf:"varint,11,opt,name=purpose,proto3,enum=google.cloud.resourcemanager.v3.Purpose" json:"purpose,omitempty"` - // Optional. Purpose data corresponds to the policy system that the tag is - // intended for. See documentation for `Purpose` for formatting of this field. - // - // Purpose data cannot be changed once set. - PurposeData map[string]string `protobuf:"bytes,12,rep,name=purpose_data,json=purposeData,proto3" json:"purpose_data,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *TagKey) Reset() { - *x = TagKey{} - mi := &file_google_cloud_resourcemanager_v3_tag_keys_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *TagKey) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*TagKey) ProtoMessage() {} - -func (x *TagKey) ProtoReflect() protoreflect.Message { - mi := &file_google_cloud_resourcemanager_v3_tag_keys_proto_msgTypes[0] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use TagKey.ProtoReflect.Descriptor instead. -func (*TagKey) Descriptor() ([]byte, []int) { - return file_google_cloud_resourcemanager_v3_tag_keys_proto_rawDescGZIP(), []int{0} -} - -func (x *TagKey) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *TagKey) GetParent() string { - if x != nil { - return x.Parent - } - return "" -} - -func (x *TagKey) GetShortName() string { - if x != nil { - return x.ShortName - } - return "" -} - -func (x *TagKey) GetNamespacedName() string { - if x != nil { - return x.NamespacedName - } - return "" -} - -func (x *TagKey) GetDescription() string { - if x != nil { - return x.Description - } - return "" -} - -func (x *TagKey) GetCreateTime() *timestamppb.Timestamp { - if x != nil { - return x.CreateTime - } - return nil -} - -func (x *TagKey) GetUpdateTime() *timestamppb.Timestamp { - if x != nil { - return x.UpdateTime - } - return nil -} - -func (x *TagKey) GetEtag() string { - if x != nil { - return x.Etag - } - return "" -} - -func (x *TagKey) GetPurpose() Purpose { - if x != nil { - return x.Purpose - } - return Purpose_PURPOSE_UNSPECIFIED -} - -func (x *TagKey) GetPurposeData() map[string]string { - if x != nil { - return x.PurposeData - } - return nil -} - -// The request message for listing all TagKeys under a parent resource. -type ListTagKeysRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Required. The resource name of the TagKey's parent. - // Must be of the form `organizations/{org_id}` or `projects/{project_id}` or - // `projects/{project_number}` - Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` - // Optional. The maximum number of TagKeys to return in the response. The - // server allows a maximum of 300 TagKeys to return. If unspecified, the - // server will use 100 as the default. - PageSize int32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` - // Optional. A pagination token returned from a previous call to `ListTagKey` - // that indicates where this listing should continue from. - PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ListTagKeysRequest) Reset() { - *x = ListTagKeysRequest{} - mi := &file_google_cloud_resourcemanager_v3_tag_keys_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ListTagKeysRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListTagKeysRequest) ProtoMessage() {} - -func (x *ListTagKeysRequest) ProtoReflect() protoreflect.Message { - mi := &file_google_cloud_resourcemanager_v3_tag_keys_proto_msgTypes[1] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ListTagKeysRequest.ProtoReflect.Descriptor instead. -func (*ListTagKeysRequest) Descriptor() ([]byte, []int) { - return file_google_cloud_resourcemanager_v3_tag_keys_proto_rawDescGZIP(), []int{1} -} - -func (x *ListTagKeysRequest) GetParent() string { - if x != nil { - return x.Parent - } - return "" -} - -func (x *ListTagKeysRequest) GetPageSize() int32 { - if x != nil { - return x.PageSize - } - return 0 -} - -func (x *ListTagKeysRequest) GetPageToken() string { - if x != nil { - return x.PageToken - } - return "" -} - -// The ListTagKeys response message. -type ListTagKeysResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - // List of TagKeys that live under the specified parent in the request. - TagKeys []*TagKey `protobuf:"bytes,1,rep,name=tag_keys,json=tagKeys,proto3" json:"tag_keys,omitempty"` - // A pagination token returned from a previous call to `ListTagKeys` - // that indicates from where listing should continue. - NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ListTagKeysResponse) Reset() { - *x = ListTagKeysResponse{} - mi := &file_google_cloud_resourcemanager_v3_tag_keys_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ListTagKeysResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListTagKeysResponse) ProtoMessage() {} - -func (x *ListTagKeysResponse) ProtoReflect() protoreflect.Message { - mi := &file_google_cloud_resourcemanager_v3_tag_keys_proto_msgTypes[2] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ListTagKeysResponse.ProtoReflect.Descriptor instead. -func (*ListTagKeysResponse) Descriptor() ([]byte, []int) { - return file_google_cloud_resourcemanager_v3_tag_keys_proto_rawDescGZIP(), []int{2} -} - -func (x *ListTagKeysResponse) GetTagKeys() []*TagKey { - if x != nil { - return x.TagKeys - } - return nil -} - -func (x *ListTagKeysResponse) GetNextPageToken() string { - if x != nil { - return x.NextPageToken - } - return "" -} - -// The request message for getting a TagKey. -type GetTagKeyRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Required. A resource name in the format `tagKeys/{id}`, such as - // `tagKeys/123`. - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *GetTagKeyRequest) Reset() { - *x = GetTagKeyRequest{} - mi := &file_google_cloud_resourcemanager_v3_tag_keys_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *GetTagKeyRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetTagKeyRequest) ProtoMessage() {} - -func (x *GetTagKeyRequest) ProtoReflect() protoreflect.Message { - mi := &file_google_cloud_resourcemanager_v3_tag_keys_proto_msgTypes[3] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetTagKeyRequest.ProtoReflect.Descriptor instead. -func (*GetTagKeyRequest) Descriptor() ([]byte, []int) { - return file_google_cloud_resourcemanager_v3_tag_keys_proto_rawDescGZIP(), []int{3} -} - -func (x *GetTagKeyRequest) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -// The request message for getting a TagKey by its namespaced name. -type GetNamespacedTagKeyRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Required. A namespaced tag key name in the format - // `{parentId}/{tagKeyShort}`, such as `42/foo` for a key with short name - // "foo" under the organization with ID 42 or `r2-d2/bar` for a key with short - // name "bar" under the project `r2-d2`. - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *GetNamespacedTagKeyRequest) Reset() { - *x = GetNamespacedTagKeyRequest{} - mi := &file_google_cloud_resourcemanager_v3_tag_keys_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *GetNamespacedTagKeyRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetNamespacedTagKeyRequest) ProtoMessage() {} - -func (x *GetNamespacedTagKeyRequest) ProtoReflect() protoreflect.Message { - mi := &file_google_cloud_resourcemanager_v3_tag_keys_proto_msgTypes[4] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetNamespacedTagKeyRequest.ProtoReflect.Descriptor instead. -func (*GetNamespacedTagKeyRequest) Descriptor() ([]byte, []int) { - return file_google_cloud_resourcemanager_v3_tag_keys_proto_rawDescGZIP(), []int{4} -} - -func (x *GetNamespacedTagKeyRequest) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -// The request message for creating a TagKey. -type CreateTagKeyRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Required. The TagKey to be created. Only fields `short_name`, - // `description`, and `parent` are considered during the creation request. - TagKey *TagKey `protobuf:"bytes,1,opt,name=tag_key,json=tagKey,proto3" json:"tag_key,omitempty"` - // Optional. Set to true to perform validations necessary for creating the - // resource, but not actually perform the action. - ValidateOnly bool `protobuf:"varint,2,opt,name=validate_only,json=validateOnly,proto3" json:"validate_only,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *CreateTagKeyRequest) Reset() { - *x = CreateTagKeyRequest{} - mi := &file_google_cloud_resourcemanager_v3_tag_keys_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *CreateTagKeyRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CreateTagKeyRequest) ProtoMessage() {} - -func (x *CreateTagKeyRequest) ProtoReflect() protoreflect.Message { - mi := &file_google_cloud_resourcemanager_v3_tag_keys_proto_msgTypes[5] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CreateTagKeyRequest.ProtoReflect.Descriptor instead. -func (*CreateTagKeyRequest) Descriptor() ([]byte, []int) { - return file_google_cloud_resourcemanager_v3_tag_keys_proto_rawDescGZIP(), []int{5} -} - -func (x *CreateTagKeyRequest) GetTagKey() *TagKey { - if x != nil { - return x.TagKey - } - return nil -} - -func (x *CreateTagKeyRequest) GetValidateOnly() bool { - if x != nil { - return x.ValidateOnly - } - return false -} - -// Runtime operation information for creating a TagKey. -type CreateTagKeyMetadata struct { - state protoimpl.MessageState `protogen:"open.v1"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *CreateTagKeyMetadata) Reset() { - *x = CreateTagKeyMetadata{} - mi := &file_google_cloud_resourcemanager_v3_tag_keys_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *CreateTagKeyMetadata) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CreateTagKeyMetadata) ProtoMessage() {} - -func (x *CreateTagKeyMetadata) ProtoReflect() protoreflect.Message { - mi := &file_google_cloud_resourcemanager_v3_tag_keys_proto_msgTypes[6] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CreateTagKeyMetadata.ProtoReflect.Descriptor instead. -func (*CreateTagKeyMetadata) Descriptor() ([]byte, []int) { - return file_google_cloud_resourcemanager_v3_tag_keys_proto_rawDescGZIP(), []int{6} -} - -// The request message for updating a TagKey. -type UpdateTagKeyRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Required. The new definition of the TagKey. Only the `description` and - // `etag` fields can be updated by this request. If the `etag` field is not - // empty, it must match the `etag` field of the existing tag key. Otherwise, - // `ABORTED` will be returned. - TagKey *TagKey `protobuf:"bytes,1,opt,name=tag_key,json=tagKey,proto3" json:"tag_key,omitempty"` - // Fields to be updated. The mask may only contain `description` or - // `etag`. If omitted entirely, both `description` and `etag` are assumed to - // be significant. - UpdateMask *fieldmaskpb.FieldMask `protobuf:"bytes,2,opt,name=update_mask,json=updateMask,proto3" json:"update_mask,omitempty"` - // Set as true to perform validations necessary for updating the resource, but - // not actually perform the action. - ValidateOnly bool `protobuf:"varint,3,opt,name=validate_only,json=validateOnly,proto3" json:"validate_only,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *UpdateTagKeyRequest) Reset() { - *x = UpdateTagKeyRequest{} - mi := &file_google_cloud_resourcemanager_v3_tag_keys_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *UpdateTagKeyRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UpdateTagKeyRequest) ProtoMessage() {} - -func (x *UpdateTagKeyRequest) ProtoReflect() protoreflect.Message { - mi := &file_google_cloud_resourcemanager_v3_tag_keys_proto_msgTypes[7] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use UpdateTagKeyRequest.ProtoReflect.Descriptor instead. -func (*UpdateTagKeyRequest) Descriptor() ([]byte, []int) { - return file_google_cloud_resourcemanager_v3_tag_keys_proto_rawDescGZIP(), []int{7} -} - -func (x *UpdateTagKeyRequest) GetTagKey() *TagKey { - if x != nil { - return x.TagKey - } - return nil -} - -func (x *UpdateTagKeyRequest) GetUpdateMask() *fieldmaskpb.FieldMask { - if x != nil { - return x.UpdateMask - } - return nil -} - -func (x *UpdateTagKeyRequest) GetValidateOnly() bool { - if x != nil { - return x.ValidateOnly - } - return false -} - -// Runtime operation information for updating a TagKey. -type UpdateTagKeyMetadata struct { - state protoimpl.MessageState `protogen:"open.v1"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *UpdateTagKeyMetadata) Reset() { - *x = UpdateTagKeyMetadata{} - mi := &file_google_cloud_resourcemanager_v3_tag_keys_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *UpdateTagKeyMetadata) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UpdateTagKeyMetadata) ProtoMessage() {} - -func (x *UpdateTagKeyMetadata) ProtoReflect() protoreflect.Message { - mi := &file_google_cloud_resourcemanager_v3_tag_keys_proto_msgTypes[8] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use UpdateTagKeyMetadata.ProtoReflect.Descriptor instead. -func (*UpdateTagKeyMetadata) Descriptor() ([]byte, []int) { - return file_google_cloud_resourcemanager_v3_tag_keys_proto_rawDescGZIP(), []int{8} -} - -// The request message for deleting a TagKey. -type DeleteTagKeyRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Required. The resource name of a TagKey to be deleted in the format - // `tagKeys/123`. The TagKey cannot be a parent of any existing TagValues or - // it will not be deleted successfully. - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // Optional. Set as true to perform validations necessary for deletion, but - // not actually perform the action. - ValidateOnly bool `protobuf:"varint,2,opt,name=validate_only,json=validateOnly,proto3" json:"validate_only,omitempty"` - // Optional. The etag known to the client for the expected state of the - // TagKey. This is to be used for optimistic concurrency. - Etag string `protobuf:"bytes,3,opt,name=etag,proto3" json:"etag,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *DeleteTagKeyRequest) Reset() { - *x = DeleteTagKeyRequest{} - mi := &file_google_cloud_resourcemanager_v3_tag_keys_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *DeleteTagKeyRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DeleteTagKeyRequest) ProtoMessage() {} - -func (x *DeleteTagKeyRequest) ProtoReflect() protoreflect.Message { - mi := &file_google_cloud_resourcemanager_v3_tag_keys_proto_msgTypes[9] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DeleteTagKeyRequest.ProtoReflect.Descriptor instead. -func (*DeleteTagKeyRequest) Descriptor() ([]byte, []int) { - return file_google_cloud_resourcemanager_v3_tag_keys_proto_rawDescGZIP(), []int{9} -} - -func (x *DeleteTagKeyRequest) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *DeleteTagKeyRequest) GetValidateOnly() bool { - if x != nil { - return x.ValidateOnly - } - return false -} - -func (x *DeleteTagKeyRequest) GetEtag() string { - if x != nil { - return x.Etag - } - return "" -} - -// Runtime operation information for deleting a TagKey. -type DeleteTagKeyMetadata struct { - state protoimpl.MessageState `protogen:"open.v1"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *DeleteTagKeyMetadata) Reset() { - *x = DeleteTagKeyMetadata{} - mi := &file_google_cloud_resourcemanager_v3_tag_keys_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *DeleteTagKeyMetadata) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DeleteTagKeyMetadata) ProtoMessage() {} - -func (x *DeleteTagKeyMetadata) ProtoReflect() protoreflect.Message { - mi := &file_google_cloud_resourcemanager_v3_tag_keys_proto_msgTypes[10] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DeleteTagKeyMetadata.ProtoReflect.Descriptor instead. -func (*DeleteTagKeyMetadata) Descriptor() ([]byte, []int) { - return file_google_cloud_resourcemanager_v3_tag_keys_proto_rawDescGZIP(), []int{10} -} - -var File_google_cloud_resourcemanager_v3_tag_keys_proto protoreflect.FileDescriptor - -const file_google_cloud_resourcemanager_v3_tag_keys_proto_rawDesc = "" + - "\n" + - ".google/cloud/resourcemanager/v3/tag_keys.proto\x12\x1fgoogle.cloud.resourcemanager.v3\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1egoogle/iam/v1/iam_policy.proto\x1a\x1agoogle/iam/v1/policy.proto\x1a#google/longrunning/operations.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x8c\x05\n" + - "\x06TagKey\x12\x17\n" + - "\x04name\x18\x01 \x01(\tB\x03\xe0A\x05R\x04name\x12\x1b\n" + - "\x06parent\x18\x02 \x01(\tB\x03\xe0A\x05R\x06parent\x12%\n" + - "\n" + - "short_name\x18\x03 \x01(\tB\x06\xe0A\x02\xe0A\x05R\tshortName\x12/\n" + - "\x0fnamespaced_name\x18\x04 \x01(\tB\x06\xe0A\x03\xe0A\x05R\x0enamespacedName\x12%\n" + - "\vdescription\x18\x05 \x01(\tB\x03\xe0A\x01R\vdescription\x12@\n" + - "\vcreate_time\x18\x06 \x01(\v2\x1a.google.protobuf.TimestampB\x03\xe0A\x03R\n" + - "createTime\x12@\n" + - "\vupdate_time\x18\a \x01(\v2\x1a.google.protobuf.TimestampB\x03\xe0A\x03R\n" + - "updateTime\x12\x17\n" + - "\x04etag\x18\b \x01(\tB\x03\xe0A\x01R\x04etag\x12G\n" + - "\apurpose\x18\v \x01(\x0e2(.google.cloud.resourcemanager.v3.PurposeB\x03\xe0A\x01R\apurpose\x12`\n" + - "\fpurpose_data\x18\f \x03(\v28.google.cloud.resourcemanager.v3.TagKey.PurposeDataEntryB\x03\xe0A\x01R\vpurposeData\x1a>\n" + - "\x10PurposeDataEntry\x12\x10\n" + - "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" + - "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01:E\xeaAB\n" + - "*cloudresourcemanager.googleapis.com/TagKey\x12\x11tagKeys/{tag_key}R\x01\x01\"}\n" + - "\x12ListTagKeysRequest\x12!\n" + - "\x06parent\x18\x01 \x01(\tB\t\xe0A\x02\xfaA\x03\x12\x01*R\x06parent\x12 \n" + - "\tpage_size\x18\x02 \x01(\x05B\x03\xe0A\x01R\bpageSize\x12\"\n" + - "\n" + - "page_token\x18\x03 \x01(\tB\x03\xe0A\x01R\tpageToken\"\x81\x01\n" + - "\x13ListTagKeysResponse\x12B\n" + - "\btag_keys\x18\x01 \x03(\v2'.google.cloud.resourcemanager.v3.TagKeyR\atagKeys\x12&\n" + - "\x0fnext_page_token\x18\x02 \x01(\tR\rnextPageToken\"Z\n" + - "\x10GetTagKeyRequest\x12F\n" + - "\x04name\x18\x01 \x01(\tB2\xe0A\x02\xfaA,\n" + - "*cloudresourcemanager.googleapis.com/TagKeyR\x04name\"d\n" + - "\x1aGetNamespacedTagKeyRequest\x12F\n" + - "\x04name\x18\x01 \x01(\tB2\xe0A\x02\xfaA,\n" + - "*cloudresourcemanager.googleapis.com/TagKeyR\x04name\"\x86\x01\n" + - "\x13CreateTagKeyRequest\x12E\n" + - "\atag_key\x18\x01 \x01(\v2'.google.cloud.resourcemanager.v3.TagKeyB\x03\xe0A\x02R\x06tagKey\x12(\n" + - "\rvalidate_only\x18\x02 \x01(\bB\x03\xe0A\x01R\fvalidateOnly\"\x16\n" + - "\x14CreateTagKeyMetadata\"\xbe\x01\n" + - "\x13UpdateTagKeyRequest\x12E\n" + - "\atag_key\x18\x01 \x01(\v2'.google.cloud.resourcemanager.v3.TagKeyB\x03\xe0A\x02R\x06tagKey\x12;\n" + - "\vupdate_mask\x18\x02 \x01(\v2\x1a.google.protobuf.FieldMaskR\n" + - "updateMask\x12#\n" + - "\rvalidate_only\x18\x03 \x01(\bR\fvalidateOnly\"\x16\n" + - "\x14UpdateTagKeyMetadata\"\xa0\x01\n" + - "\x13DeleteTagKeyRequest\x12F\n" + - "\x04name\x18\x01 \x01(\tB2\xe0A\x02\xfaA,\n" + - "*cloudresourcemanager.googleapis.com/TagKeyR\x04name\x12(\n" + - "\rvalidate_only\x18\x02 \x01(\bB\x03\xe0A\x01R\fvalidateOnly\x12\x17\n" + - "\x04etag\x18\x03 \x01(\tB\x03\xe0A\x01R\x04etag\"\x16\n" + - "\x14DeleteTagKeyMetadata*4\n" + - "\aPurpose\x12\x17\n" + - "\x13PURPOSE_UNSPECIFIED\x10\x00\x12\x10\n" + - "\fGCE_FIREWALL\x10\x012\xe4\f\n" + - "\aTagKeys\x12\x96\x01\n" + - "\vListTagKeys\x123.google.cloud.resourcemanager.v3.ListTagKeysRequest\x1a4.google.cloud.resourcemanager.v3.ListTagKeysResponse\"\x1c\xdaA\x06parent\x82\xd3\xe4\x93\x02\r\x12\v/v3/tagKeys\x12\x8c\x01\n" + - "\tGetTagKey\x121.google.cloud.resourcemanager.v3.GetTagKeyRequest\x1a'.google.cloud.resourcemanager.v3.TagKey\"#\xdaA\x04name\x82\xd3\xe4\x93\x02\x16\x12\x14/v3/{name=tagKeys/*}\x12\xa2\x01\n" + - "\x13GetNamespacedTagKey\x12;.google.cloud.resourcemanager.v3.GetNamespacedTagKeyRequest\x1a'.google.cloud.resourcemanager.v3.TagKey\"%\xdaA\x04name\x82\xd3\xe4\x93\x02\x18\x12\x16/v3/tagKeys/namespaced\x12\xac\x01\n" + - "\fCreateTagKey\x124.google.cloud.resourcemanager.v3.CreateTagKeyRequest\x1a\x1d.google.longrunning.Operation\"G\xcaA\x1e\n" + - "\x06TagKey\x12\x14CreateTagKeyMetadata\xdaA\atag_key\x82\xd3\xe4\x93\x02\x16:\atag_key\"\v/v3/tagKeys\x12\xc9\x01\n" + - "\fUpdateTagKey\x124.google.cloud.resourcemanager.v3.UpdateTagKeyRequest\x1a\x1d.google.longrunning.Operation\"d\xcaA\x1e\n" + - "\x06TagKey\x12\x14UpdateTagKeyMetadata\xdaA\x13tag_key,update_mask\x82\xd3\xe4\x93\x02':\atag_key2\x1c/v3/{tag_key.name=tagKeys/*}\x12\xa9\x01\n" + - "\fDeleteTagKey\x124.google.cloud.resourcemanager.v3.DeleteTagKeyRequest\x1a\x1d.google.longrunning.Operation\"D\xcaA\x1e\n" + - "\x06TagKey\x12\x14DeleteTagKeyMetadata\xdaA\x04name\x82\xd3\xe4\x93\x02\x16*\x14/v3/{name=tagKeys/*}\x12\x86\x01\n" + - "\fGetIamPolicy\x12\".google.iam.v1.GetIamPolicyRequest\x1a\x15.google.iam.v1.Policy\";\xdaA\bresource\x82\xd3\xe4\x93\x02*:\x01*\"%/v3/{resource=tagKeys/*}:getIamPolicy\x12\x8d\x01\n" + - "\fSetIamPolicy\x12\".google.iam.v1.SetIamPolicyRequest\x1a\x15.google.iam.v1.Policy\"B\xdaA\x0fresource,policy\x82\xd3\xe4\x93\x02*:\x01*\"%/v3/{resource=tagKeys/*}:setIamPolicy\x12\xb8\x01\n" + - "\x12TestIamPermissions\x12(.google.iam.v1.TestIamPermissionsRequest\x1a).google.iam.v1.TestIamPermissionsResponse\"M\xdaA\x14resource,permissions\x82\xd3\xe4\x93\x020:\x01*\"+/v3/{resource=tagKeys/*}:testIamPermissions\x1a\x90\x01\xcaA#cloudresourcemanager.googleapis.com\xd2Aghttps://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-platform.read-onlyB\xed\x01\n" + - "#com.google.cloud.resourcemanager.v3B\fTagKeysProtoP\x01ZMcloud.google.com/go/resourcemanager/apiv3/resourcemanagerpb;resourcemanagerpb\xaa\x02\x1fGoogle.Cloud.ResourceManager.V3\xca\x02\x1fGoogle\\Cloud\\ResourceManager\\V3\xea\x02\"Google::Cloud::ResourceManager::V3b\x06proto3" - -var ( - file_google_cloud_resourcemanager_v3_tag_keys_proto_rawDescOnce sync.Once - file_google_cloud_resourcemanager_v3_tag_keys_proto_rawDescData []byte -) - -func file_google_cloud_resourcemanager_v3_tag_keys_proto_rawDescGZIP() []byte { - file_google_cloud_resourcemanager_v3_tag_keys_proto_rawDescOnce.Do(func() { - file_google_cloud_resourcemanager_v3_tag_keys_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_google_cloud_resourcemanager_v3_tag_keys_proto_rawDesc), len(file_google_cloud_resourcemanager_v3_tag_keys_proto_rawDesc))) - }) - return file_google_cloud_resourcemanager_v3_tag_keys_proto_rawDescData -} - -var file_google_cloud_resourcemanager_v3_tag_keys_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_google_cloud_resourcemanager_v3_tag_keys_proto_msgTypes = make([]protoimpl.MessageInfo, 12) -var file_google_cloud_resourcemanager_v3_tag_keys_proto_goTypes = []any{ - (Purpose)(0), // 0: google.cloud.resourcemanager.v3.Purpose - (*TagKey)(nil), // 1: google.cloud.resourcemanager.v3.TagKey - (*ListTagKeysRequest)(nil), // 2: google.cloud.resourcemanager.v3.ListTagKeysRequest - (*ListTagKeysResponse)(nil), // 3: google.cloud.resourcemanager.v3.ListTagKeysResponse - (*GetTagKeyRequest)(nil), // 4: google.cloud.resourcemanager.v3.GetTagKeyRequest - (*GetNamespacedTagKeyRequest)(nil), // 5: google.cloud.resourcemanager.v3.GetNamespacedTagKeyRequest - (*CreateTagKeyRequest)(nil), // 6: google.cloud.resourcemanager.v3.CreateTagKeyRequest - (*CreateTagKeyMetadata)(nil), // 7: google.cloud.resourcemanager.v3.CreateTagKeyMetadata - (*UpdateTagKeyRequest)(nil), // 8: google.cloud.resourcemanager.v3.UpdateTagKeyRequest - (*UpdateTagKeyMetadata)(nil), // 9: google.cloud.resourcemanager.v3.UpdateTagKeyMetadata - (*DeleteTagKeyRequest)(nil), // 10: google.cloud.resourcemanager.v3.DeleteTagKeyRequest - (*DeleteTagKeyMetadata)(nil), // 11: google.cloud.resourcemanager.v3.DeleteTagKeyMetadata - nil, // 12: google.cloud.resourcemanager.v3.TagKey.PurposeDataEntry - (*timestamppb.Timestamp)(nil), // 13: google.protobuf.Timestamp - (*fieldmaskpb.FieldMask)(nil), // 14: google.protobuf.FieldMask - (*iampb.GetIamPolicyRequest)(nil), // 15: google.iam.v1.GetIamPolicyRequest - (*iampb.SetIamPolicyRequest)(nil), // 16: google.iam.v1.SetIamPolicyRequest - (*iampb.TestIamPermissionsRequest)(nil), // 17: google.iam.v1.TestIamPermissionsRequest - (*longrunningpb.Operation)(nil), // 18: google.longrunning.Operation - (*iampb.Policy)(nil), // 19: google.iam.v1.Policy - (*iampb.TestIamPermissionsResponse)(nil), // 20: google.iam.v1.TestIamPermissionsResponse -} -var file_google_cloud_resourcemanager_v3_tag_keys_proto_depIdxs = []int32{ - 13, // 0: google.cloud.resourcemanager.v3.TagKey.create_time:type_name -> google.protobuf.Timestamp - 13, // 1: google.cloud.resourcemanager.v3.TagKey.update_time:type_name -> google.protobuf.Timestamp - 0, // 2: google.cloud.resourcemanager.v3.TagKey.purpose:type_name -> google.cloud.resourcemanager.v3.Purpose - 12, // 3: google.cloud.resourcemanager.v3.TagKey.purpose_data:type_name -> google.cloud.resourcemanager.v3.TagKey.PurposeDataEntry - 1, // 4: google.cloud.resourcemanager.v3.ListTagKeysResponse.tag_keys:type_name -> google.cloud.resourcemanager.v3.TagKey - 1, // 5: google.cloud.resourcemanager.v3.CreateTagKeyRequest.tag_key:type_name -> google.cloud.resourcemanager.v3.TagKey - 1, // 6: google.cloud.resourcemanager.v3.UpdateTagKeyRequest.tag_key:type_name -> google.cloud.resourcemanager.v3.TagKey - 14, // 7: google.cloud.resourcemanager.v3.UpdateTagKeyRequest.update_mask:type_name -> google.protobuf.FieldMask - 2, // 8: google.cloud.resourcemanager.v3.TagKeys.ListTagKeys:input_type -> google.cloud.resourcemanager.v3.ListTagKeysRequest - 4, // 9: google.cloud.resourcemanager.v3.TagKeys.GetTagKey:input_type -> google.cloud.resourcemanager.v3.GetTagKeyRequest - 5, // 10: google.cloud.resourcemanager.v3.TagKeys.GetNamespacedTagKey:input_type -> google.cloud.resourcemanager.v3.GetNamespacedTagKeyRequest - 6, // 11: google.cloud.resourcemanager.v3.TagKeys.CreateTagKey:input_type -> google.cloud.resourcemanager.v3.CreateTagKeyRequest - 8, // 12: google.cloud.resourcemanager.v3.TagKeys.UpdateTagKey:input_type -> google.cloud.resourcemanager.v3.UpdateTagKeyRequest - 10, // 13: google.cloud.resourcemanager.v3.TagKeys.DeleteTagKey:input_type -> google.cloud.resourcemanager.v3.DeleteTagKeyRequest - 15, // 14: google.cloud.resourcemanager.v3.TagKeys.GetIamPolicy:input_type -> google.iam.v1.GetIamPolicyRequest - 16, // 15: google.cloud.resourcemanager.v3.TagKeys.SetIamPolicy:input_type -> google.iam.v1.SetIamPolicyRequest - 17, // 16: google.cloud.resourcemanager.v3.TagKeys.TestIamPermissions:input_type -> google.iam.v1.TestIamPermissionsRequest - 3, // 17: google.cloud.resourcemanager.v3.TagKeys.ListTagKeys:output_type -> google.cloud.resourcemanager.v3.ListTagKeysResponse - 1, // 18: google.cloud.resourcemanager.v3.TagKeys.GetTagKey:output_type -> google.cloud.resourcemanager.v3.TagKey - 1, // 19: google.cloud.resourcemanager.v3.TagKeys.GetNamespacedTagKey:output_type -> google.cloud.resourcemanager.v3.TagKey - 18, // 20: google.cloud.resourcemanager.v3.TagKeys.CreateTagKey:output_type -> google.longrunning.Operation - 18, // 21: google.cloud.resourcemanager.v3.TagKeys.UpdateTagKey:output_type -> google.longrunning.Operation - 18, // 22: google.cloud.resourcemanager.v3.TagKeys.DeleteTagKey:output_type -> google.longrunning.Operation - 19, // 23: google.cloud.resourcemanager.v3.TagKeys.GetIamPolicy:output_type -> google.iam.v1.Policy - 19, // 24: google.cloud.resourcemanager.v3.TagKeys.SetIamPolicy:output_type -> google.iam.v1.Policy - 20, // 25: google.cloud.resourcemanager.v3.TagKeys.TestIamPermissions:output_type -> google.iam.v1.TestIamPermissionsResponse - 17, // [17:26] is the sub-list for method output_type - 8, // [8:17] is the sub-list for method input_type - 8, // [8:8] is the sub-list for extension type_name - 8, // [8:8] is the sub-list for extension extendee - 0, // [0:8] is the sub-list for field type_name -} - -func init() { file_google_cloud_resourcemanager_v3_tag_keys_proto_init() } -func file_google_cloud_resourcemanager_v3_tag_keys_proto_init() { - if File_google_cloud_resourcemanager_v3_tag_keys_proto != nil { - return - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: unsafe.Slice(unsafe.StringData(file_google_cloud_resourcemanager_v3_tag_keys_proto_rawDesc), len(file_google_cloud_resourcemanager_v3_tag_keys_proto_rawDesc)), - NumEnums: 1, - NumMessages: 12, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_google_cloud_resourcemanager_v3_tag_keys_proto_goTypes, - DependencyIndexes: file_google_cloud_resourcemanager_v3_tag_keys_proto_depIdxs, - EnumInfos: file_google_cloud_resourcemanager_v3_tag_keys_proto_enumTypes, - MessageInfos: file_google_cloud_resourcemanager_v3_tag_keys_proto_msgTypes, - }.Build() - File_google_cloud_resourcemanager_v3_tag_keys_proto = out.File - file_google_cloud_resourcemanager_v3_tag_keys_proto_goTypes = nil - file_google_cloud_resourcemanager_v3_tag_keys_proto_depIdxs = nil -} diff --git a/vendor/cloud.google.com/go/resourcemanager/apiv3/resourcemanagerpb/tag_keys_grpc.pb.go b/vendor/cloud.google.com/go/resourcemanager/apiv3/resourcemanagerpb/tag_keys_grpc.pb.go deleted file mode 100644 index 4c74126073..0000000000 --- a/vendor/cloud.google.com/go/resourcemanager/apiv3/resourcemanagerpb/tag_keys_grpc.pb.go +++ /dev/null @@ -1,478 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Code generated by protoc-gen-go-grpc. DO NOT EDIT. -// versions: -// - protoc-gen-go-grpc v1.3.0 -// - protoc v6.31.0 -// source: google/cloud/resourcemanager/v3/tag_keys.proto - -package resourcemanagerpb - -import ( - context "context" - - iampb "cloud.google.com/go/iam/apiv1/iampb" - longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" -) - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 - -const ( - TagKeys_ListTagKeys_FullMethodName = "/google.cloud.resourcemanager.v3.TagKeys/ListTagKeys" - TagKeys_GetTagKey_FullMethodName = "/google.cloud.resourcemanager.v3.TagKeys/GetTagKey" - TagKeys_GetNamespacedTagKey_FullMethodName = "/google.cloud.resourcemanager.v3.TagKeys/GetNamespacedTagKey" - TagKeys_CreateTagKey_FullMethodName = "/google.cloud.resourcemanager.v3.TagKeys/CreateTagKey" - TagKeys_UpdateTagKey_FullMethodName = "/google.cloud.resourcemanager.v3.TagKeys/UpdateTagKey" - TagKeys_DeleteTagKey_FullMethodName = "/google.cloud.resourcemanager.v3.TagKeys/DeleteTagKey" - TagKeys_GetIamPolicy_FullMethodName = "/google.cloud.resourcemanager.v3.TagKeys/GetIamPolicy" - TagKeys_SetIamPolicy_FullMethodName = "/google.cloud.resourcemanager.v3.TagKeys/SetIamPolicy" - TagKeys_TestIamPermissions_FullMethodName = "/google.cloud.resourcemanager.v3.TagKeys/TestIamPermissions" -) - -// TagKeysClient is the client API for TagKeys service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. -type TagKeysClient interface { - // Lists all TagKeys for a parent resource. - ListTagKeys(ctx context.Context, in *ListTagKeysRequest, opts ...grpc.CallOption) (*ListTagKeysResponse, error) - // Retrieves a TagKey. This method will return `PERMISSION_DENIED` if the - // key does not exist or the user does not have permission to view it. - GetTagKey(ctx context.Context, in *GetTagKeyRequest, opts ...grpc.CallOption) (*TagKey, error) - // Retrieves a TagKey by its namespaced name. - // This method will return `PERMISSION_DENIED` if the key does not exist - // or the user does not have permission to view it. - GetNamespacedTagKey(ctx context.Context, in *GetNamespacedTagKeyRequest, opts ...grpc.CallOption) (*TagKey, error) - // Creates a new TagKey. If another request with the same parameters is - // sent while the original request is in process, the second request - // will receive an error. A maximum of 1000 TagKeys can exist under a parent - // at any given time. - CreateTagKey(ctx context.Context, in *CreateTagKeyRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) - // Updates the attributes of the TagKey resource. - UpdateTagKey(ctx context.Context, in *UpdateTagKeyRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) - // Deletes a TagKey. The TagKey cannot be deleted if it has any child - // TagValues. - DeleteTagKey(ctx context.Context, in *DeleteTagKeyRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) - // Gets the access control policy for a TagKey. The returned policy may be - // empty if no such policy or resource exists. The `resource` field should - // be the TagKey's resource name. For example, "tagKeys/1234". - // The caller must have - // `cloudresourcemanager.googleapis.com/tagKeys.getIamPolicy` permission on - // the specified TagKey. - GetIamPolicy(ctx context.Context, in *iampb.GetIamPolicyRequest, opts ...grpc.CallOption) (*iampb.Policy, error) - // Sets the access control policy on a TagKey, replacing any existing - // policy. The `resource` field should be the TagKey's resource name. - // For example, "tagKeys/1234". - // The caller must have `resourcemanager.tagKeys.setIamPolicy` permission - // on the identified tagValue. - SetIamPolicy(ctx context.Context, in *iampb.SetIamPolicyRequest, opts ...grpc.CallOption) (*iampb.Policy, error) - // Returns permissions that a caller has on the specified TagKey. - // The `resource` field should be the TagKey's resource name. - // For example, "tagKeys/1234". - // - // There are no permissions required for making this API call. - TestIamPermissions(ctx context.Context, in *iampb.TestIamPermissionsRequest, opts ...grpc.CallOption) (*iampb.TestIamPermissionsResponse, error) -} - -type tagKeysClient struct { - cc grpc.ClientConnInterface -} - -func NewTagKeysClient(cc grpc.ClientConnInterface) TagKeysClient { - return &tagKeysClient{cc} -} - -func (c *tagKeysClient) ListTagKeys(ctx context.Context, in *ListTagKeysRequest, opts ...grpc.CallOption) (*ListTagKeysResponse, error) { - out := new(ListTagKeysResponse) - err := c.cc.Invoke(ctx, TagKeys_ListTagKeys_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *tagKeysClient) GetTagKey(ctx context.Context, in *GetTagKeyRequest, opts ...grpc.CallOption) (*TagKey, error) { - out := new(TagKey) - err := c.cc.Invoke(ctx, TagKeys_GetTagKey_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *tagKeysClient) GetNamespacedTagKey(ctx context.Context, in *GetNamespacedTagKeyRequest, opts ...grpc.CallOption) (*TagKey, error) { - out := new(TagKey) - err := c.cc.Invoke(ctx, TagKeys_GetNamespacedTagKey_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *tagKeysClient) CreateTagKey(ctx context.Context, in *CreateTagKeyRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) { - out := new(longrunningpb.Operation) - err := c.cc.Invoke(ctx, TagKeys_CreateTagKey_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *tagKeysClient) UpdateTagKey(ctx context.Context, in *UpdateTagKeyRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) { - out := new(longrunningpb.Operation) - err := c.cc.Invoke(ctx, TagKeys_UpdateTagKey_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *tagKeysClient) DeleteTagKey(ctx context.Context, in *DeleteTagKeyRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) { - out := new(longrunningpb.Operation) - err := c.cc.Invoke(ctx, TagKeys_DeleteTagKey_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *tagKeysClient) GetIamPolicy(ctx context.Context, in *iampb.GetIamPolicyRequest, opts ...grpc.CallOption) (*iampb.Policy, error) { - out := new(iampb.Policy) - err := c.cc.Invoke(ctx, TagKeys_GetIamPolicy_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *tagKeysClient) SetIamPolicy(ctx context.Context, in *iampb.SetIamPolicyRequest, opts ...grpc.CallOption) (*iampb.Policy, error) { - out := new(iampb.Policy) - err := c.cc.Invoke(ctx, TagKeys_SetIamPolicy_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *tagKeysClient) TestIamPermissions(ctx context.Context, in *iampb.TestIamPermissionsRequest, opts ...grpc.CallOption) (*iampb.TestIamPermissionsResponse, error) { - out := new(iampb.TestIamPermissionsResponse) - err := c.cc.Invoke(ctx, TagKeys_TestIamPermissions_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// TagKeysServer is the server API for TagKeys service. -// All implementations should embed UnimplementedTagKeysServer -// for forward compatibility -type TagKeysServer interface { - // Lists all TagKeys for a parent resource. - ListTagKeys(context.Context, *ListTagKeysRequest) (*ListTagKeysResponse, error) - // Retrieves a TagKey. This method will return `PERMISSION_DENIED` if the - // key does not exist or the user does not have permission to view it. - GetTagKey(context.Context, *GetTagKeyRequest) (*TagKey, error) - // Retrieves a TagKey by its namespaced name. - // This method will return `PERMISSION_DENIED` if the key does not exist - // or the user does not have permission to view it. - GetNamespacedTagKey(context.Context, *GetNamespacedTagKeyRequest) (*TagKey, error) - // Creates a new TagKey. If another request with the same parameters is - // sent while the original request is in process, the second request - // will receive an error. A maximum of 1000 TagKeys can exist under a parent - // at any given time. - CreateTagKey(context.Context, *CreateTagKeyRequest) (*longrunningpb.Operation, error) - // Updates the attributes of the TagKey resource. - UpdateTagKey(context.Context, *UpdateTagKeyRequest) (*longrunningpb.Operation, error) - // Deletes a TagKey. The TagKey cannot be deleted if it has any child - // TagValues. - DeleteTagKey(context.Context, *DeleteTagKeyRequest) (*longrunningpb.Operation, error) - // Gets the access control policy for a TagKey. The returned policy may be - // empty if no such policy or resource exists. The `resource` field should - // be the TagKey's resource name. For example, "tagKeys/1234". - // The caller must have - // `cloudresourcemanager.googleapis.com/tagKeys.getIamPolicy` permission on - // the specified TagKey. - GetIamPolicy(context.Context, *iampb.GetIamPolicyRequest) (*iampb.Policy, error) - // Sets the access control policy on a TagKey, replacing any existing - // policy. The `resource` field should be the TagKey's resource name. - // For example, "tagKeys/1234". - // The caller must have `resourcemanager.tagKeys.setIamPolicy` permission - // on the identified tagValue. - SetIamPolicy(context.Context, *iampb.SetIamPolicyRequest) (*iampb.Policy, error) - // Returns permissions that a caller has on the specified TagKey. - // The `resource` field should be the TagKey's resource name. - // For example, "tagKeys/1234". - // - // There are no permissions required for making this API call. - TestIamPermissions(context.Context, *iampb.TestIamPermissionsRequest) (*iampb.TestIamPermissionsResponse, error) -} - -// UnimplementedTagKeysServer should be embedded to have forward compatible implementations. -type UnimplementedTagKeysServer struct { -} - -func (UnimplementedTagKeysServer) ListTagKeys(context.Context, *ListTagKeysRequest) (*ListTagKeysResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ListTagKeys not implemented") -} -func (UnimplementedTagKeysServer) GetTagKey(context.Context, *GetTagKeyRequest) (*TagKey, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetTagKey not implemented") -} -func (UnimplementedTagKeysServer) GetNamespacedTagKey(context.Context, *GetNamespacedTagKeyRequest) (*TagKey, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetNamespacedTagKey not implemented") -} -func (UnimplementedTagKeysServer) CreateTagKey(context.Context, *CreateTagKeyRequest) (*longrunningpb.Operation, error) { - return nil, status.Errorf(codes.Unimplemented, "method CreateTagKey not implemented") -} -func (UnimplementedTagKeysServer) UpdateTagKey(context.Context, *UpdateTagKeyRequest) (*longrunningpb.Operation, error) { - return nil, status.Errorf(codes.Unimplemented, "method UpdateTagKey not implemented") -} -func (UnimplementedTagKeysServer) DeleteTagKey(context.Context, *DeleteTagKeyRequest) (*longrunningpb.Operation, error) { - return nil, status.Errorf(codes.Unimplemented, "method DeleteTagKey not implemented") -} -func (UnimplementedTagKeysServer) GetIamPolicy(context.Context, *iampb.GetIamPolicyRequest) (*iampb.Policy, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetIamPolicy not implemented") -} -func (UnimplementedTagKeysServer) SetIamPolicy(context.Context, *iampb.SetIamPolicyRequest) (*iampb.Policy, error) { - return nil, status.Errorf(codes.Unimplemented, "method SetIamPolicy not implemented") -} -func (UnimplementedTagKeysServer) TestIamPermissions(context.Context, *iampb.TestIamPermissionsRequest) (*iampb.TestIamPermissionsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method TestIamPermissions not implemented") -} - -// UnsafeTagKeysServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to TagKeysServer will -// result in compilation errors. -type UnsafeTagKeysServer interface { - mustEmbedUnimplementedTagKeysServer() -} - -func RegisterTagKeysServer(s grpc.ServiceRegistrar, srv TagKeysServer) { - s.RegisterService(&TagKeys_ServiceDesc, srv) -} - -func _TagKeys_ListTagKeys_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ListTagKeysRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(TagKeysServer).ListTagKeys(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: TagKeys_ListTagKeys_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(TagKeysServer).ListTagKeys(ctx, req.(*ListTagKeysRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _TagKeys_GetTagKey_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetTagKeyRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(TagKeysServer).GetTagKey(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: TagKeys_GetTagKey_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(TagKeysServer).GetTagKey(ctx, req.(*GetTagKeyRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _TagKeys_GetNamespacedTagKey_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetNamespacedTagKeyRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(TagKeysServer).GetNamespacedTagKey(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: TagKeys_GetNamespacedTagKey_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(TagKeysServer).GetNamespacedTagKey(ctx, req.(*GetNamespacedTagKeyRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _TagKeys_CreateTagKey_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CreateTagKeyRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(TagKeysServer).CreateTagKey(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: TagKeys_CreateTagKey_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(TagKeysServer).CreateTagKey(ctx, req.(*CreateTagKeyRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _TagKeys_UpdateTagKey_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(UpdateTagKeyRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(TagKeysServer).UpdateTagKey(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: TagKeys_UpdateTagKey_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(TagKeysServer).UpdateTagKey(ctx, req.(*UpdateTagKeyRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _TagKeys_DeleteTagKey_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DeleteTagKeyRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(TagKeysServer).DeleteTagKey(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: TagKeys_DeleteTagKey_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(TagKeysServer).DeleteTagKey(ctx, req.(*DeleteTagKeyRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _TagKeys_GetIamPolicy_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(iampb.GetIamPolicyRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(TagKeysServer).GetIamPolicy(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: TagKeys_GetIamPolicy_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(TagKeysServer).GetIamPolicy(ctx, req.(*iampb.GetIamPolicyRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _TagKeys_SetIamPolicy_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(iampb.SetIamPolicyRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(TagKeysServer).SetIamPolicy(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: TagKeys_SetIamPolicy_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(TagKeysServer).SetIamPolicy(ctx, req.(*iampb.SetIamPolicyRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _TagKeys_TestIamPermissions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(iampb.TestIamPermissionsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(TagKeysServer).TestIamPermissions(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: TagKeys_TestIamPermissions_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(TagKeysServer).TestIamPermissions(ctx, req.(*iampb.TestIamPermissionsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -// TagKeys_ServiceDesc is the grpc.ServiceDesc for TagKeys service. -// It's only intended for direct use with grpc.RegisterService, -// and not to be introspected or modified (even as a copy) -var TagKeys_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "google.cloud.resourcemanager.v3.TagKeys", - HandlerType: (*TagKeysServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "ListTagKeys", - Handler: _TagKeys_ListTagKeys_Handler, - }, - { - MethodName: "GetTagKey", - Handler: _TagKeys_GetTagKey_Handler, - }, - { - MethodName: "GetNamespacedTagKey", - Handler: _TagKeys_GetNamespacedTagKey_Handler, - }, - { - MethodName: "CreateTagKey", - Handler: _TagKeys_CreateTagKey_Handler, - }, - { - MethodName: "UpdateTagKey", - Handler: _TagKeys_UpdateTagKey_Handler, - }, - { - MethodName: "DeleteTagKey", - Handler: _TagKeys_DeleteTagKey_Handler, - }, - { - MethodName: "GetIamPolicy", - Handler: _TagKeys_GetIamPolicy_Handler, - }, - { - MethodName: "SetIamPolicy", - Handler: _TagKeys_SetIamPolicy_Handler, - }, - { - MethodName: "TestIamPermissions", - Handler: _TagKeys_TestIamPermissions_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "google/cloud/resourcemanager/v3/tag_keys.proto", -} diff --git a/vendor/cloud.google.com/go/resourcemanager/apiv3/resourcemanagerpb/tag_values.pb.go b/vendor/cloud.google.com/go/resourcemanager/apiv3/resourcemanagerpb/tag_values.pb.go deleted file mode 100644 index 74ee4ed5c3..0000000000 --- a/vendor/cloud.google.com/go/resourcemanager/apiv3/resourcemanagerpb/tag_values.pb.go +++ /dev/null @@ -1,851 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.36.11 -// protoc v6.31.0 -// source: google/cloud/resourcemanager/v3/tag_values.proto - -package resourcemanagerpb - -import ( - reflect "reflect" - sync "sync" - unsafe "unsafe" - - iampb "cloud.google.com/go/iam/apiv1/iampb" - longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" - _ "google.golang.org/genproto/googleapis/api/annotations" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - fieldmaskpb "google.golang.org/protobuf/types/known/fieldmaskpb" - timestamppb "google.golang.org/protobuf/types/known/timestamppb" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// A TagValue is a child of a particular TagKey. This is used to group -// cloud resources for the purpose of controlling them using policies. -type TagValue struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Immutable. Resource name for TagValue in the format `tagValues/456`. - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // Immutable. The resource name of the new TagValue's parent TagKey. - // Must be of the form `tagKeys/{tag_key_id}`. - Parent string `protobuf:"bytes,2,opt,name=parent,proto3" json:"parent,omitempty"` - // Required. Immutable. User-assigned short name for TagValue. The short name - // should be unique for TagValues within the same parent TagKey. - // - // The short name must be 63 characters or less, beginning and ending with - // an alphanumeric character ([a-z0-9A-Z]) with dashes (-), underscores (_), - // dots (.), and alphanumerics between. - ShortName string `protobuf:"bytes,3,opt,name=short_name,json=shortName,proto3" json:"short_name,omitempty"` - // Output only. The namespaced name of the TagValue. Can be in the form - // `{organization_id}/{tag_key_short_name}/{tag_value_short_name}` or - // `{project_id}/{tag_key_short_name}/{tag_value_short_name}` or - // `{project_number}/{tag_key_short_name}/{tag_value_short_name}`. - NamespacedName string `protobuf:"bytes,4,opt,name=namespaced_name,json=namespacedName,proto3" json:"namespaced_name,omitempty"` - // Optional. User-assigned description of the TagValue. - // Must not exceed 256 characters. - // - // Read-write. - Description string `protobuf:"bytes,5,opt,name=description,proto3" json:"description,omitempty"` - // Output only. Creation time. - CreateTime *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"` - // Output only. Update time. - UpdateTime *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=update_time,json=updateTime,proto3" json:"update_time,omitempty"` - // Optional. Entity tag which users can pass to prevent race conditions. This - // field is always set in server responses. See UpdateTagValueRequest for - // details. - Etag string `protobuf:"bytes,8,opt,name=etag,proto3" json:"etag,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *TagValue) Reset() { - *x = TagValue{} - mi := &file_google_cloud_resourcemanager_v3_tag_values_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *TagValue) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*TagValue) ProtoMessage() {} - -func (x *TagValue) ProtoReflect() protoreflect.Message { - mi := &file_google_cloud_resourcemanager_v3_tag_values_proto_msgTypes[0] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use TagValue.ProtoReflect.Descriptor instead. -func (*TagValue) Descriptor() ([]byte, []int) { - return file_google_cloud_resourcemanager_v3_tag_values_proto_rawDescGZIP(), []int{0} -} - -func (x *TagValue) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *TagValue) GetParent() string { - if x != nil { - return x.Parent - } - return "" -} - -func (x *TagValue) GetShortName() string { - if x != nil { - return x.ShortName - } - return "" -} - -func (x *TagValue) GetNamespacedName() string { - if x != nil { - return x.NamespacedName - } - return "" -} - -func (x *TagValue) GetDescription() string { - if x != nil { - return x.Description - } - return "" -} - -func (x *TagValue) GetCreateTime() *timestamppb.Timestamp { - if x != nil { - return x.CreateTime - } - return nil -} - -func (x *TagValue) GetUpdateTime() *timestamppb.Timestamp { - if x != nil { - return x.UpdateTime - } - return nil -} - -func (x *TagValue) GetEtag() string { - if x != nil { - return x.Etag - } - return "" -} - -// The request message for listing TagValues for the specified TagKey. -// Resource name for TagKey, parent of the TagValues to be listed, -// in the format `tagKeys/123`. -type ListTagValuesRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Required. - Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` - // Optional. The maximum number of TagValues to return in the response. The - // server allows a maximum of 300 TagValues to return. If unspecified, the - // server will use 100 as the default. - PageSize int32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` - // Optional. A pagination token returned from a previous call to - // `ListTagValues` that indicates where this listing should continue from. - PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ListTagValuesRequest) Reset() { - *x = ListTagValuesRequest{} - mi := &file_google_cloud_resourcemanager_v3_tag_values_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ListTagValuesRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListTagValuesRequest) ProtoMessage() {} - -func (x *ListTagValuesRequest) ProtoReflect() protoreflect.Message { - mi := &file_google_cloud_resourcemanager_v3_tag_values_proto_msgTypes[1] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ListTagValuesRequest.ProtoReflect.Descriptor instead. -func (*ListTagValuesRequest) Descriptor() ([]byte, []int) { - return file_google_cloud_resourcemanager_v3_tag_values_proto_rawDescGZIP(), []int{1} -} - -func (x *ListTagValuesRequest) GetParent() string { - if x != nil { - return x.Parent - } - return "" -} - -func (x *ListTagValuesRequest) GetPageSize() int32 { - if x != nil { - return x.PageSize - } - return 0 -} - -func (x *ListTagValuesRequest) GetPageToken() string { - if x != nil { - return x.PageToken - } - return "" -} - -// The ListTagValues response. -type ListTagValuesResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - // A possibly paginated list of TagValues that are direct descendants of - // the specified parent TagKey. - TagValues []*TagValue `protobuf:"bytes,1,rep,name=tag_values,json=tagValues,proto3" json:"tag_values,omitempty"` - // A pagination token returned from a previous call to `ListTagValues` - // that indicates from where listing should continue. This is currently not - // used, but the server may at any point start supplying a valid token. - NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ListTagValuesResponse) Reset() { - *x = ListTagValuesResponse{} - mi := &file_google_cloud_resourcemanager_v3_tag_values_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ListTagValuesResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListTagValuesResponse) ProtoMessage() {} - -func (x *ListTagValuesResponse) ProtoReflect() protoreflect.Message { - mi := &file_google_cloud_resourcemanager_v3_tag_values_proto_msgTypes[2] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ListTagValuesResponse.ProtoReflect.Descriptor instead. -func (*ListTagValuesResponse) Descriptor() ([]byte, []int) { - return file_google_cloud_resourcemanager_v3_tag_values_proto_rawDescGZIP(), []int{2} -} - -func (x *ListTagValuesResponse) GetTagValues() []*TagValue { - if x != nil { - return x.TagValues - } - return nil -} - -func (x *ListTagValuesResponse) GetNextPageToken() string { - if x != nil { - return x.NextPageToken - } - return "" -} - -// The request message for getting a TagValue. -type GetTagValueRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Required. Resource name for TagValue to be fetched in the format - // `tagValues/456`. - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *GetTagValueRequest) Reset() { - *x = GetTagValueRequest{} - mi := &file_google_cloud_resourcemanager_v3_tag_values_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *GetTagValueRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetTagValueRequest) ProtoMessage() {} - -func (x *GetTagValueRequest) ProtoReflect() protoreflect.Message { - mi := &file_google_cloud_resourcemanager_v3_tag_values_proto_msgTypes[3] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetTagValueRequest.ProtoReflect.Descriptor instead. -func (*GetTagValueRequest) Descriptor() ([]byte, []int) { - return file_google_cloud_resourcemanager_v3_tag_values_proto_rawDescGZIP(), []int{3} -} - -func (x *GetTagValueRequest) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -// The request message for getting a TagValue by its namespaced name. -type GetNamespacedTagValueRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Required. A namespaced tag value name in the following format: - // - // `{parentId}/{tagKeyShort}/{tagValueShort}` - // - // Examples: - // - `42/foo/abc` for a value with short name "abc" under the key with short - // name "foo" under the organization with ID 42 - // - `r2-d2/bar/xyz` for a value with short name "xyz" under the key with - // short name "bar" under the project with ID "r2-d2" - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *GetNamespacedTagValueRequest) Reset() { - *x = GetNamespacedTagValueRequest{} - mi := &file_google_cloud_resourcemanager_v3_tag_values_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *GetNamespacedTagValueRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetNamespacedTagValueRequest) ProtoMessage() {} - -func (x *GetNamespacedTagValueRequest) ProtoReflect() protoreflect.Message { - mi := &file_google_cloud_resourcemanager_v3_tag_values_proto_msgTypes[4] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetNamespacedTagValueRequest.ProtoReflect.Descriptor instead. -func (*GetNamespacedTagValueRequest) Descriptor() ([]byte, []int) { - return file_google_cloud_resourcemanager_v3_tag_values_proto_rawDescGZIP(), []int{4} -} - -func (x *GetNamespacedTagValueRequest) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -// The request message for creating a TagValue. -type CreateTagValueRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Required. The TagValue to be created. Only fields `short_name`, - // `description`, and `parent` are considered during the creation request. - TagValue *TagValue `protobuf:"bytes,1,opt,name=tag_value,json=tagValue,proto3" json:"tag_value,omitempty"` - // Optional. Set as true to perform the validations necessary for creating the - // resource, but not actually perform the action. - ValidateOnly bool `protobuf:"varint,2,opt,name=validate_only,json=validateOnly,proto3" json:"validate_only,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *CreateTagValueRequest) Reset() { - *x = CreateTagValueRequest{} - mi := &file_google_cloud_resourcemanager_v3_tag_values_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *CreateTagValueRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CreateTagValueRequest) ProtoMessage() {} - -func (x *CreateTagValueRequest) ProtoReflect() protoreflect.Message { - mi := &file_google_cloud_resourcemanager_v3_tag_values_proto_msgTypes[5] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CreateTagValueRequest.ProtoReflect.Descriptor instead. -func (*CreateTagValueRequest) Descriptor() ([]byte, []int) { - return file_google_cloud_resourcemanager_v3_tag_values_proto_rawDescGZIP(), []int{5} -} - -func (x *CreateTagValueRequest) GetTagValue() *TagValue { - if x != nil { - return x.TagValue - } - return nil -} - -func (x *CreateTagValueRequest) GetValidateOnly() bool { - if x != nil { - return x.ValidateOnly - } - return false -} - -// Runtime operation information for creating a TagValue. -type CreateTagValueMetadata struct { - state protoimpl.MessageState `protogen:"open.v1"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *CreateTagValueMetadata) Reset() { - *x = CreateTagValueMetadata{} - mi := &file_google_cloud_resourcemanager_v3_tag_values_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *CreateTagValueMetadata) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CreateTagValueMetadata) ProtoMessage() {} - -func (x *CreateTagValueMetadata) ProtoReflect() protoreflect.Message { - mi := &file_google_cloud_resourcemanager_v3_tag_values_proto_msgTypes[6] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CreateTagValueMetadata.ProtoReflect.Descriptor instead. -func (*CreateTagValueMetadata) Descriptor() ([]byte, []int) { - return file_google_cloud_resourcemanager_v3_tag_values_proto_rawDescGZIP(), []int{6} -} - -// The request message for updating a TagValue. -type UpdateTagValueRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Required. The new definition of the TagValue. Only fields `description` and - // `etag` fields can be updated by this request. If the `etag` field is - // nonempty, it must match the `etag` field of the existing ControlGroup. - // Otherwise, `ABORTED` will be returned. - TagValue *TagValue `protobuf:"bytes,1,opt,name=tag_value,json=tagValue,proto3" json:"tag_value,omitempty"` - // Optional. Fields to be updated. - UpdateMask *fieldmaskpb.FieldMask `protobuf:"bytes,2,opt,name=update_mask,json=updateMask,proto3" json:"update_mask,omitempty"` - // Optional. True to perform validations necessary for updating the resource, - // but not actually perform the action. - ValidateOnly bool `protobuf:"varint,3,opt,name=validate_only,json=validateOnly,proto3" json:"validate_only,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *UpdateTagValueRequest) Reset() { - *x = UpdateTagValueRequest{} - mi := &file_google_cloud_resourcemanager_v3_tag_values_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *UpdateTagValueRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UpdateTagValueRequest) ProtoMessage() {} - -func (x *UpdateTagValueRequest) ProtoReflect() protoreflect.Message { - mi := &file_google_cloud_resourcemanager_v3_tag_values_proto_msgTypes[7] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use UpdateTagValueRequest.ProtoReflect.Descriptor instead. -func (*UpdateTagValueRequest) Descriptor() ([]byte, []int) { - return file_google_cloud_resourcemanager_v3_tag_values_proto_rawDescGZIP(), []int{7} -} - -func (x *UpdateTagValueRequest) GetTagValue() *TagValue { - if x != nil { - return x.TagValue - } - return nil -} - -func (x *UpdateTagValueRequest) GetUpdateMask() *fieldmaskpb.FieldMask { - if x != nil { - return x.UpdateMask - } - return nil -} - -func (x *UpdateTagValueRequest) GetValidateOnly() bool { - if x != nil { - return x.ValidateOnly - } - return false -} - -// Runtime operation information for updating a TagValue. -type UpdateTagValueMetadata struct { - state protoimpl.MessageState `protogen:"open.v1"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *UpdateTagValueMetadata) Reset() { - *x = UpdateTagValueMetadata{} - mi := &file_google_cloud_resourcemanager_v3_tag_values_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *UpdateTagValueMetadata) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UpdateTagValueMetadata) ProtoMessage() {} - -func (x *UpdateTagValueMetadata) ProtoReflect() protoreflect.Message { - mi := &file_google_cloud_resourcemanager_v3_tag_values_proto_msgTypes[8] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use UpdateTagValueMetadata.ProtoReflect.Descriptor instead. -func (*UpdateTagValueMetadata) Descriptor() ([]byte, []int) { - return file_google_cloud_resourcemanager_v3_tag_values_proto_rawDescGZIP(), []int{8} -} - -// The request message for deleting a TagValue. -type DeleteTagValueRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Required. Resource name for TagValue to be deleted in the format - // tagValues/456. - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // Optional. Set as true to perform the validations necessary for deletion, - // but not actually perform the action. - ValidateOnly bool `protobuf:"varint,2,opt,name=validate_only,json=validateOnly,proto3" json:"validate_only,omitempty"` - // Optional. The etag known to the client for the expected state of the - // TagValue. This is to be used for optimistic concurrency. - Etag string `protobuf:"bytes,3,opt,name=etag,proto3" json:"etag,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *DeleteTagValueRequest) Reset() { - *x = DeleteTagValueRequest{} - mi := &file_google_cloud_resourcemanager_v3_tag_values_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *DeleteTagValueRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DeleteTagValueRequest) ProtoMessage() {} - -func (x *DeleteTagValueRequest) ProtoReflect() protoreflect.Message { - mi := &file_google_cloud_resourcemanager_v3_tag_values_proto_msgTypes[9] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DeleteTagValueRequest.ProtoReflect.Descriptor instead. -func (*DeleteTagValueRequest) Descriptor() ([]byte, []int) { - return file_google_cloud_resourcemanager_v3_tag_values_proto_rawDescGZIP(), []int{9} -} - -func (x *DeleteTagValueRequest) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *DeleteTagValueRequest) GetValidateOnly() bool { - if x != nil { - return x.ValidateOnly - } - return false -} - -func (x *DeleteTagValueRequest) GetEtag() string { - if x != nil { - return x.Etag - } - return "" -} - -// Runtime operation information for deleting a TagValue. -type DeleteTagValueMetadata struct { - state protoimpl.MessageState `protogen:"open.v1"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *DeleteTagValueMetadata) Reset() { - *x = DeleteTagValueMetadata{} - mi := &file_google_cloud_resourcemanager_v3_tag_values_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *DeleteTagValueMetadata) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DeleteTagValueMetadata) ProtoMessage() {} - -func (x *DeleteTagValueMetadata) ProtoReflect() protoreflect.Message { - mi := &file_google_cloud_resourcemanager_v3_tag_values_proto_msgTypes[10] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DeleteTagValueMetadata.ProtoReflect.Descriptor instead. -func (*DeleteTagValueMetadata) Descriptor() ([]byte, []int) { - return file_google_cloud_resourcemanager_v3_tag_values_proto_rawDescGZIP(), []int{10} -} - -var File_google_cloud_resourcemanager_v3_tag_values_proto protoreflect.FileDescriptor - -const file_google_cloud_resourcemanager_v3_tag_values_proto_rawDesc = "" + - "\n" + - "0google/cloud/resourcemanager/v3/tag_values.proto\x12\x1fgoogle.cloud.resourcemanager.v3\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1egoogle/iam/v1/iam_policy.proto\x1a\x1agoogle/iam/v1/policy.proto\x1a#google/longrunning/operations.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xa6\x03\n" + - "\bTagValue\x12\x17\n" + - "\x04name\x18\x01 \x01(\tB\x03\xe0A\x05R\x04name\x12\x1b\n" + - "\x06parent\x18\x02 \x01(\tB\x03\xe0A\x05R\x06parent\x12%\n" + - "\n" + - "short_name\x18\x03 \x01(\tB\x06\xe0A\x02\xe0A\x05R\tshortName\x12,\n" + - "\x0fnamespaced_name\x18\x04 \x01(\tB\x03\xe0A\x03R\x0enamespacedName\x12%\n" + - "\vdescription\x18\x05 \x01(\tB\x03\xe0A\x01R\vdescription\x12@\n" + - "\vcreate_time\x18\x06 \x01(\v2\x1a.google.protobuf.TimestampB\x03\xe0A\x03R\n" + - "createTime\x12@\n" + - "\vupdate_time\x18\a \x01(\v2\x1a.google.protobuf.TimestampB\x03\xe0A\x03R\n" + - "updateTime\x12\x17\n" + - "\x04etag\x18\b \x01(\tB\x03\xe0A\x01R\x04etag:K\xeaAH\n" + - ",cloudresourcemanager.googleapis.com/TagValue\x12\x15tagValues/{tag_value}R\x01\x01\"\x7f\n" + - "\x14ListTagValuesRequest\x12!\n" + - "\x06parent\x18\x01 \x01(\tB\t\xe0A\x02\xfaA\x03\x12\x01*R\x06parent\x12 \n" + - "\tpage_size\x18\x02 \x01(\x05B\x03\xe0A\x01R\bpageSize\x12\"\n" + - "\n" + - "page_token\x18\x03 \x01(\tB\x03\xe0A\x01R\tpageToken\"\x89\x01\n" + - "\x15ListTagValuesResponse\x12H\n" + - "\n" + - "tag_values\x18\x01 \x03(\v2).google.cloud.resourcemanager.v3.TagValueR\ttagValues\x12&\n" + - "\x0fnext_page_token\x18\x02 \x01(\tR\rnextPageToken\"^\n" + - "\x12GetTagValueRequest\x12H\n" + - "\x04name\x18\x01 \x01(\tB4\xe0A\x02\xfaA.\n" + - ",cloudresourcemanager.googleapis.com/TagValueR\x04name\"h\n" + - "\x1cGetNamespacedTagValueRequest\x12H\n" + - "\x04name\x18\x01 \x01(\tB4\xe0A\x02\xfaA.\n" + - ",cloudresourcemanager.googleapis.com/TagValueR\x04name\"\x8e\x01\n" + - "\x15CreateTagValueRequest\x12K\n" + - "\ttag_value\x18\x01 \x01(\v2).google.cloud.resourcemanager.v3.TagValueB\x03\xe0A\x02R\btagValue\x12(\n" + - "\rvalidate_only\x18\x02 \x01(\bB\x03\xe0A\x01R\fvalidateOnly\"\x18\n" + - "\x16CreateTagValueMetadata\"\xd0\x01\n" + - "\x15UpdateTagValueRequest\x12K\n" + - "\ttag_value\x18\x01 \x01(\v2).google.cloud.resourcemanager.v3.TagValueB\x03\xe0A\x02R\btagValue\x12@\n" + - "\vupdate_mask\x18\x02 \x01(\v2\x1a.google.protobuf.FieldMaskB\x03\xe0A\x01R\n" + - "updateMask\x12(\n" + - "\rvalidate_only\x18\x03 \x01(\bB\x03\xe0A\x01R\fvalidateOnly\"\x18\n" + - "\x16UpdateTagValueMetadata\"\xa4\x01\n" + - "\x15DeleteTagValueRequest\x12H\n" + - "\x04name\x18\x01 \x01(\tB4\xe0A\x02\xfaA.\n" + - ",cloudresourcemanager.googleapis.com/TagValueR\x04name\x12(\n" + - "\rvalidate_only\x18\x02 \x01(\bB\x03\xe0A\x01R\fvalidateOnly\x12\x17\n" + - "\x04etag\x18\x03 \x01(\tB\x03\xe0A\x01R\x04etag\"\x18\n" + - "\x16DeleteTagValueMetadata2\xac\r\n" + - "\tTagValues\x12\x9e\x01\n" + - "\rListTagValues\x125.google.cloud.resourcemanager.v3.ListTagValuesRequest\x1a6.google.cloud.resourcemanager.v3.ListTagValuesResponse\"\x1e\xdaA\x06parent\x82\xd3\xe4\x93\x02\x0f\x12\r/v3/tagValues\x12\x94\x01\n" + - "\vGetTagValue\x123.google.cloud.resourcemanager.v3.GetTagValueRequest\x1a).google.cloud.resourcemanager.v3.TagValue\"%\xdaA\x04name\x82\xd3\xe4\x93\x02\x18\x12\x16/v3/{name=tagValues/*}\x12\xaa\x01\n" + - "\x15GetNamespacedTagValue\x12=.google.cloud.resourcemanager.v3.GetNamespacedTagValueRequest\x1a).google.cloud.resourcemanager.v3.TagValue\"'\xdaA\x04name\x82\xd3\xe4\x93\x02\x1a\x12\x18/v3/tagValues/namespaced\x12\xba\x01\n" + - "\x0eCreateTagValue\x126.google.cloud.resourcemanager.v3.CreateTagValueRequest\x1a\x1d.google.longrunning.Operation\"Q\xcaA\"\n" + - "\bTagValue\x12\x16CreateTagValueMetadata\xdaA\ttag_value\x82\xd3\xe4\x93\x02\x1a:\ttag_value\"\r/v3/tagValues\x12\xd9\x01\n" + - "\x0eUpdateTagValue\x126.google.cloud.resourcemanager.v3.UpdateTagValueRequest\x1a\x1d.google.longrunning.Operation\"p\xcaA\"\n" + - "\bTagValue\x12\x16UpdateTagValueMetadata\xdaA\x15tag_value,update_mask\x82\xd3\xe4\x93\x02-:\ttag_value2 /v3/{tag_value.name=tagValues/*}\x12\xb3\x01\n" + - "\x0eDeleteTagValue\x126.google.cloud.resourcemanager.v3.DeleteTagValueRequest\x1a\x1d.google.longrunning.Operation\"J\xcaA\"\n" + - "\bTagValue\x12\x16DeleteTagValueMetadata\xdaA\x04name\x82\xd3\xe4\x93\x02\x18*\x16/v3/{name=tagValues/*}\x12\x88\x01\n" + - "\fGetIamPolicy\x12\".google.iam.v1.GetIamPolicyRequest\x1a\x15.google.iam.v1.Policy\"=\xdaA\bresource\x82\xd3\xe4\x93\x02,:\x01*\"'/v3/{resource=tagValues/*}:getIamPolicy\x12\x8f\x01\n" + - "\fSetIamPolicy\x12\".google.iam.v1.SetIamPolicyRequest\x1a\x15.google.iam.v1.Policy\"D\xdaA\x0fresource,policy\x82\xd3\xe4\x93\x02,:\x01*\"'/v3/{resource=tagValues/*}:setIamPolicy\x12\xba\x01\n" + - "\x12TestIamPermissions\x12(.google.iam.v1.TestIamPermissionsRequest\x1a).google.iam.v1.TestIamPermissionsResponse\"O\xdaA\x14resource,permissions\x82\xd3\xe4\x93\x022:\x01*\"-/v3/{resource=tagValues/*}:testIamPermissions\x1a\x90\x01\xcaA#cloudresourcemanager.googleapis.com\xd2Aghttps://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-platform.read-onlyB\xef\x01\n" + - "#com.google.cloud.resourcemanager.v3B\x0eTagValuesProtoP\x01ZMcloud.google.com/go/resourcemanager/apiv3/resourcemanagerpb;resourcemanagerpb\xaa\x02\x1fGoogle.Cloud.ResourceManager.V3\xca\x02\x1fGoogle\\Cloud\\ResourceManager\\V3\xea\x02\"Google::Cloud::ResourceManager::V3b\x06proto3" - -var ( - file_google_cloud_resourcemanager_v3_tag_values_proto_rawDescOnce sync.Once - file_google_cloud_resourcemanager_v3_tag_values_proto_rawDescData []byte -) - -func file_google_cloud_resourcemanager_v3_tag_values_proto_rawDescGZIP() []byte { - file_google_cloud_resourcemanager_v3_tag_values_proto_rawDescOnce.Do(func() { - file_google_cloud_resourcemanager_v3_tag_values_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_google_cloud_resourcemanager_v3_tag_values_proto_rawDesc), len(file_google_cloud_resourcemanager_v3_tag_values_proto_rawDesc))) - }) - return file_google_cloud_resourcemanager_v3_tag_values_proto_rawDescData -} - -var file_google_cloud_resourcemanager_v3_tag_values_proto_msgTypes = make([]protoimpl.MessageInfo, 11) -var file_google_cloud_resourcemanager_v3_tag_values_proto_goTypes = []any{ - (*TagValue)(nil), // 0: google.cloud.resourcemanager.v3.TagValue - (*ListTagValuesRequest)(nil), // 1: google.cloud.resourcemanager.v3.ListTagValuesRequest - (*ListTagValuesResponse)(nil), // 2: google.cloud.resourcemanager.v3.ListTagValuesResponse - (*GetTagValueRequest)(nil), // 3: google.cloud.resourcemanager.v3.GetTagValueRequest - (*GetNamespacedTagValueRequest)(nil), // 4: google.cloud.resourcemanager.v3.GetNamespacedTagValueRequest - (*CreateTagValueRequest)(nil), // 5: google.cloud.resourcemanager.v3.CreateTagValueRequest - (*CreateTagValueMetadata)(nil), // 6: google.cloud.resourcemanager.v3.CreateTagValueMetadata - (*UpdateTagValueRequest)(nil), // 7: google.cloud.resourcemanager.v3.UpdateTagValueRequest - (*UpdateTagValueMetadata)(nil), // 8: google.cloud.resourcemanager.v3.UpdateTagValueMetadata - (*DeleteTagValueRequest)(nil), // 9: google.cloud.resourcemanager.v3.DeleteTagValueRequest - (*DeleteTagValueMetadata)(nil), // 10: google.cloud.resourcemanager.v3.DeleteTagValueMetadata - (*timestamppb.Timestamp)(nil), // 11: google.protobuf.Timestamp - (*fieldmaskpb.FieldMask)(nil), // 12: google.protobuf.FieldMask - (*iampb.GetIamPolicyRequest)(nil), // 13: google.iam.v1.GetIamPolicyRequest - (*iampb.SetIamPolicyRequest)(nil), // 14: google.iam.v1.SetIamPolicyRequest - (*iampb.TestIamPermissionsRequest)(nil), // 15: google.iam.v1.TestIamPermissionsRequest - (*longrunningpb.Operation)(nil), // 16: google.longrunning.Operation - (*iampb.Policy)(nil), // 17: google.iam.v1.Policy - (*iampb.TestIamPermissionsResponse)(nil), // 18: google.iam.v1.TestIamPermissionsResponse -} -var file_google_cloud_resourcemanager_v3_tag_values_proto_depIdxs = []int32{ - 11, // 0: google.cloud.resourcemanager.v3.TagValue.create_time:type_name -> google.protobuf.Timestamp - 11, // 1: google.cloud.resourcemanager.v3.TagValue.update_time:type_name -> google.protobuf.Timestamp - 0, // 2: google.cloud.resourcemanager.v3.ListTagValuesResponse.tag_values:type_name -> google.cloud.resourcemanager.v3.TagValue - 0, // 3: google.cloud.resourcemanager.v3.CreateTagValueRequest.tag_value:type_name -> google.cloud.resourcemanager.v3.TagValue - 0, // 4: google.cloud.resourcemanager.v3.UpdateTagValueRequest.tag_value:type_name -> google.cloud.resourcemanager.v3.TagValue - 12, // 5: google.cloud.resourcemanager.v3.UpdateTagValueRequest.update_mask:type_name -> google.protobuf.FieldMask - 1, // 6: google.cloud.resourcemanager.v3.TagValues.ListTagValues:input_type -> google.cloud.resourcemanager.v3.ListTagValuesRequest - 3, // 7: google.cloud.resourcemanager.v3.TagValues.GetTagValue:input_type -> google.cloud.resourcemanager.v3.GetTagValueRequest - 4, // 8: google.cloud.resourcemanager.v3.TagValues.GetNamespacedTagValue:input_type -> google.cloud.resourcemanager.v3.GetNamespacedTagValueRequest - 5, // 9: google.cloud.resourcemanager.v3.TagValues.CreateTagValue:input_type -> google.cloud.resourcemanager.v3.CreateTagValueRequest - 7, // 10: google.cloud.resourcemanager.v3.TagValues.UpdateTagValue:input_type -> google.cloud.resourcemanager.v3.UpdateTagValueRequest - 9, // 11: google.cloud.resourcemanager.v3.TagValues.DeleteTagValue:input_type -> google.cloud.resourcemanager.v3.DeleteTagValueRequest - 13, // 12: google.cloud.resourcemanager.v3.TagValues.GetIamPolicy:input_type -> google.iam.v1.GetIamPolicyRequest - 14, // 13: google.cloud.resourcemanager.v3.TagValues.SetIamPolicy:input_type -> google.iam.v1.SetIamPolicyRequest - 15, // 14: google.cloud.resourcemanager.v3.TagValues.TestIamPermissions:input_type -> google.iam.v1.TestIamPermissionsRequest - 2, // 15: google.cloud.resourcemanager.v3.TagValues.ListTagValues:output_type -> google.cloud.resourcemanager.v3.ListTagValuesResponse - 0, // 16: google.cloud.resourcemanager.v3.TagValues.GetTagValue:output_type -> google.cloud.resourcemanager.v3.TagValue - 0, // 17: google.cloud.resourcemanager.v3.TagValues.GetNamespacedTagValue:output_type -> google.cloud.resourcemanager.v3.TagValue - 16, // 18: google.cloud.resourcemanager.v3.TagValues.CreateTagValue:output_type -> google.longrunning.Operation - 16, // 19: google.cloud.resourcemanager.v3.TagValues.UpdateTagValue:output_type -> google.longrunning.Operation - 16, // 20: google.cloud.resourcemanager.v3.TagValues.DeleteTagValue:output_type -> google.longrunning.Operation - 17, // 21: google.cloud.resourcemanager.v3.TagValues.GetIamPolicy:output_type -> google.iam.v1.Policy - 17, // 22: google.cloud.resourcemanager.v3.TagValues.SetIamPolicy:output_type -> google.iam.v1.Policy - 18, // 23: google.cloud.resourcemanager.v3.TagValues.TestIamPermissions:output_type -> google.iam.v1.TestIamPermissionsResponse - 15, // [15:24] is the sub-list for method output_type - 6, // [6:15] is the sub-list for method input_type - 6, // [6:6] is the sub-list for extension type_name - 6, // [6:6] is the sub-list for extension extendee - 0, // [0:6] is the sub-list for field type_name -} - -func init() { file_google_cloud_resourcemanager_v3_tag_values_proto_init() } -func file_google_cloud_resourcemanager_v3_tag_values_proto_init() { - if File_google_cloud_resourcemanager_v3_tag_values_proto != nil { - return - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: unsafe.Slice(unsafe.StringData(file_google_cloud_resourcemanager_v3_tag_values_proto_rawDesc), len(file_google_cloud_resourcemanager_v3_tag_values_proto_rawDesc)), - NumEnums: 0, - NumMessages: 11, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_google_cloud_resourcemanager_v3_tag_values_proto_goTypes, - DependencyIndexes: file_google_cloud_resourcemanager_v3_tag_values_proto_depIdxs, - MessageInfos: file_google_cloud_resourcemanager_v3_tag_values_proto_msgTypes, - }.Build() - File_google_cloud_resourcemanager_v3_tag_values_proto = out.File - file_google_cloud_resourcemanager_v3_tag_values_proto_goTypes = nil - file_google_cloud_resourcemanager_v3_tag_values_proto_depIdxs = nil -} diff --git a/vendor/cloud.google.com/go/resourcemanager/apiv3/resourcemanagerpb/tag_values_grpc.pb.go b/vendor/cloud.google.com/go/resourcemanager/apiv3/resourcemanagerpb/tag_values_grpc.pb.go deleted file mode 100644 index e466dcf27b..0000000000 --- a/vendor/cloud.google.com/go/resourcemanager/apiv3/resourcemanagerpb/tag_values_grpc.pb.go +++ /dev/null @@ -1,478 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Code generated by protoc-gen-go-grpc. DO NOT EDIT. -// versions: -// - protoc-gen-go-grpc v1.3.0 -// - protoc v6.31.0 -// source: google/cloud/resourcemanager/v3/tag_values.proto - -package resourcemanagerpb - -import ( - context "context" - - iampb "cloud.google.com/go/iam/apiv1/iampb" - longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" -) - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 - -const ( - TagValues_ListTagValues_FullMethodName = "/google.cloud.resourcemanager.v3.TagValues/ListTagValues" - TagValues_GetTagValue_FullMethodName = "/google.cloud.resourcemanager.v3.TagValues/GetTagValue" - TagValues_GetNamespacedTagValue_FullMethodName = "/google.cloud.resourcemanager.v3.TagValues/GetNamespacedTagValue" - TagValues_CreateTagValue_FullMethodName = "/google.cloud.resourcemanager.v3.TagValues/CreateTagValue" - TagValues_UpdateTagValue_FullMethodName = "/google.cloud.resourcemanager.v3.TagValues/UpdateTagValue" - TagValues_DeleteTagValue_FullMethodName = "/google.cloud.resourcemanager.v3.TagValues/DeleteTagValue" - TagValues_GetIamPolicy_FullMethodName = "/google.cloud.resourcemanager.v3.TagValues/GetIamPolicy" - TagValues_SetIamPolicy_FullMethodName = "/google.cloud.resourcemanager.v3.TagValues/SetIamPolicy" - TagValues_TestIamPermissions_FullMethodName = "/google.cloud.resourcemanager.v3.TagValues/TestIamPermissions" -) - -// TagValuesClient is the client API for TagValues service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. -type TagValuesClient interface { - // Lists all TagValues for a specific TagKey. - ListTagValues(ctx context.Context, in *ListTagValuesRequest, opts ...grpc.CallOption) (*ListTagValuesResponse, error) - // Retrieves a TagValue. This method will return `PERMISSION_DENIED` if the - // value does not exist or the user does not have permission to view it. - GetTagValue(ctx context.Context, in *GetTagValueRequest, opts ...grpc.CallOption) (*TagValue, error) - // Retrieves a TagValue by its namespaced name. - // This method will return `PERMISSION_DENIED` if the value does not exist - // or the user does not have permission to view it. - GetNamespacedTagValue(ctx context.Context, in *GetNamespacedTagValueRequest, opts ...grpc.CallOption) (*TagValue, error) - // Creates a TagValue as a child of the specified TagKey. If a another - // request with the same parameters is sent while the original request is in - // process the second request will receive an error. A maximum of 1000 - // TagValues can exist under a TagKey at any given time. - CreateTagValue(ctx context.Context, in *CreateTagValueRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) - // Updates the attributes of the TagValue resource. - UpdateTagValue(ctx context.Context, in *UpdateTagValueRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) - // Deletes a TagValue. The TagValue cannot have any bindings when it is - // deleted. - DeleteTagValue(ctx context.Context, in *DeleteTagValueRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) - // Gets the access control policy for a TagValue. The returned policy may be - // empty if no such policy or resource exists. The `resource` field should - // be the TagValue's resource name. For example: `tagValues/1234`. - // The caller must have the - // `cloudresourcemanager.googleapis.com/tagValues.getIamPolicy` permission on - // the identified TagValue to get the access control policy. - GetIamPolicy(ctx context.Context, in *iampb.GetIamPolicyRequest, opts ...grpc.CallOption) (*iampb.Policy, error) - // Sets the access control policy on a TagValue, replacing any existing - // policy. The `resource` field should be the TagValue's resource name. - // For example: `tagValues/1234`. - // The caller must have `resourcemanager.tagValues.setIamPolicy` permission - // on the identified tagValue. - SetIamPolicy(ctx context.Context, in *iampb.SetIamPolicyRequest, opts ...grpc.CallOption) (*iampb.Policy, error) - // Returns permissions that a caller has on the specified TagValue. - // The `resource` field should be the TagValue's resource name. For example: - // `tagValues/1234`. - // - // There are no permissions required for making this API call. - TestIamPermissions(ctx context.Context, in *iampb.TestIamPermissionsRequest, opts ...grpc.CallOption) (*iampb.TestIamPermissionsResponse, error) -} - -type tagValuesClient struct { - cc grpc.ClientConnInterface -} - -func NewTagValuesClient(cc grpc.ClientConnInterface) TagValuesClient { - return &tagValuesClient{cc} -} - -func (c *tagValuesClient) ListTagValues(ctx context.Context, in *ListTagValuesRequest, opts ...grpc.CallOption) (*ListTagValuesResponse, error) { - out := new(ListTagValuesResponse) - err := c.cc.Invoke(ctx, TagValues_ListTagValues_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *tagValuesClient) GetTagValue(ctx context.Context, in *GetTagValueRequest, opts ...grpc.CallOption) (*TagValue, error) { - out := new(TagValue) - err := c.cc.Invoke(ctx, TagValues_GetTagValue_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *tagValuesClient) GetNamespacedTagValue(ctx context.Context, in *GetNamespacedTagValueRequest, opts ...grpc.CallOption) (*TagValue, error) { - out := new(TagValue) - err := c.cc.Invoke(ctx, TagValues_GetNamespacedTagValue_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *tagValuesClient) CreateTagValue(ctx context.Context, in *CreateTagValueRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) { - out := new(longrunningpb.Operation) - err := c.cc.Invoke(ctx, TagValues_CreateTagValue_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *tagValuesClient) UpdateTagValue(ctx context.Context, in *UpdateTagValueRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) { - out := new(longrunningpb.Operation) - err := c.cc.Invoke(ctx, TagValues_UpdateTagValue_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *tagValuesClient) DeleteTagValue(ctx context.Context, in *DeleteTagValueRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) { - out := new(longrunningpb.Operation) - err := c.cc.Invoke(ctx, TagValues_DeleteTagValue_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *tagValuesClient) GetIamPolicy(ctx context.Context, in *iampb.GetIamPolicyRequest, opts ...grpc.CallOption) (*iampb.Policy, error) { - out := new(iampb.Policy) - err := c.cc.Invoke(ctx, TagValues_GetIamPolicy_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *tagValuesClient) SetIamPolicy(ctx context.Context, in *iampb.SetIamPolicyRequest, opts ...grpc.CallOption) (*iampb.Policy, error) { - out := new(iampb.Policy) - err := c.cc.Invoke(ctx, TagValues_SetIamPolicy_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *tagValuesClient) TestIamPermissions(ctx context.Context, in *iampb.TestIamPermissionsRequest, opts ...grpc.CallOption) (*iampb.TestIamPermissionsResponse, error) { - out := new(iampb.TestIamPermissionsResponse) - err := c.cc.Invoke(ctx, TagValues_TestIamPermissions_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// TagValuesServer is the server API for TagValues service. -// All implementations should embed UnimplementedTagValuesServer -// for forward compatibility -type TagValuesServer interface { - // Lists all TagValues for a specific TagKey. - ListTagValues(context.Context, *ListTagValuesRequest) (*ListTagValuesResponse, error) - // Retrieves a TagValue. This method will return `PERMISSION_DENIED` if the - // value does not exist or the user does not have permission to view it. - GetTagValue(context.Context, *GetTagValueRequest) (*TagValue, error) - // Retrieves a TagValue by its namespaced name. - // This method will return `PERMISSION_DENIED` if the value does not exist - // or the user does not have permission to view it. - GetNamespacedTagValue(context.Context, *GetNamespacedTagValueRequest) (*TagValue, error) - // Creates a TagValue as a child of the specified TagKey. If a another - // request with the same parameters is sent while the original request is in - // process the second request will receive an error. A maximum of 1000 - // TagValues can exist under a TagKey at any given time. - CreateTagValue(context.Context, *CreateTagValueRequest) (*longrunningpb.Operation, error) - // Updates the attributes of the TagValue resource. - UpdateTagValue(context.Context, *UpdateTagValueRequest) (*longrunningpb.Operation, error) - // Deletes a TagValue. The TagValue cannot have any bindings when it is - // deleted. - DeleteTagValue(context.Context, *DeleteTagValueRequest) (*longrunningpb.Operation, error) - // Gets the access control policy for a TagValue. The returned policy may be - // empty if no such policy or resource exists. The `resource` field should - // be the TagValue's resource name. For example: `tagValues/1234`. - // The caller must have the - // `cloudresourcemanager.googleapis.com/tagValues.getIamPolicy` permission on - // the identified TagValue to get the access control policy. - GetIamPolicy(context.Context, *iampb.GetIamPolicyRequest) (*iampb.Policy, error) - // Sets the access control policy on a TagValue, replacing any existing - // policy. The `resource` field should be the TagValue's resource name. - // For example: `tagValues/1234`. - // The caller must have `resourcemanager.tagValues.setIamPolicy` permission - // on the identified tagValue. - SetIamPolicy(context.Context, *iampb.SetIamPolicyRequest) (*iampb.Policy, error) - // Returns permissions that a caller has on the specified TagValue. - // The `resource` field should be the TagValue's resource name. For example: - // `tagValues/1234`. - // - // There are no permissions required for making this API call. - TestIamPermissions(context.Context, *iampb.TestIamPermissionsRequest) (*iampb.TestIamPermissionsResponse, error) -} - -// UnimplementedTagValuesServer should be embedded to have forward compatible implementations. -type UnimplementedTagValuesServer struct { -} - -func (UnimplementedTagValuesServer) ListTagValues(context.Context, *ListTagValuesRequest) (*ListTagValuesResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ListTagValues not implemented") -} -func (UnimplementedTagValuesServer) GetTagValue(context.Context, *GetTagValueRequest) (*TagValue, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetTagValue not implemented") -} -func (UnimplementedTagValuesServer) GetNamespacedTagValue(context.Context, *GetNamespacedTagValueRequest) (*TagValue, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetNamespacedTagValue not implemented") -} -func (UnimplementedTagValuesServer) CreateTagValue(context.Context, *CreateTagValueRequest) (*longrunningpb.Operation, error) { - return nil, status.Errorf(codes.Unimplemented, "method CreateTagValue not implemented") -} -func (UnimplementedTagValuesServer) UpdateTagValue(context.Context, *UpdateTagValueRequest) (*longrunningpb.Operation, error) { - return nil, status.Errorf(codes.Unimplemented, "method UpdateTagValue not implemented") -} -func (UnimplementedTagValuesServer) DeleteTagValue(context.Context, *DeleteTagValueRequest) (*longrunningpb.Operation, error) { - return nil, status.Errorf(codes.Unimplemented, "method DeleteTagValue not implemented") -} -func (UnimplementedTagValuesServer) GetIamPolicy(context.Context, *iampb.GetIamPolicyRequest) (*iampb.Policy, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetIamPolicy not implemented") -} -func (UnimplementedTagValuesServer) SetIamPolicy(context.Context, *iampb.SetIamPolicyRequest) (*iampb.Policy, error) { - return nil, status.Errorf(codes.Unimplemented, "method SetIamPolicy not implemented") -} -func (UnimplementedTagValuesServer) TestIamPermissions(context.Context, *iampb.TestIamPermissionsRequest) (*iampb.TestIamPermissionsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method TestIamPermissions not implemented") -} - -// UnsafeTagValuesServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to TagValuesServer will -// result in compilation errors. -type UnsafeTagValuesServer interface { - mustEmbedUnimplementedTagValuesServer() -} - -func RegisterTagValuesServer(s grpc.ServiceRegistrar, srv TagValuesServer) { - s.RegisterService(&TagValues_ServiceDesc, srv) -} - -func _TagValues_ListTagValues_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ListTagValuesRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(TagValuesServer).ListTagValues(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: TagValues_ListTagValues_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(TagValuesServer).ListTagValues(ctx, req.(*ListTagValuesRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _TagValues_GetTagValue_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetTagValueRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(TagValuesServer).GetTagValue(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: TagValues_GetTagValue_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(TagValuesServer).GetTagValue(ctx, req.(*GetTagValueRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _TagValues_GetNamespacedTagValue_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetNamespacedTagValueRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(TagValuesServer).GetNamespacedTagValue(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: TagValues_GetNamespacedTagValue_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(TagValuesServer).GetNamespacedTagValue(ctx, req.(*GetNamespacedTagValueRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _TagValues_CreateTagValue_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CreateTagValueRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(TagValuesServer).CreateTagValue(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: TagValues_CreateTagValue_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(TagValuesServer).CreateTagValue(ctx, req.(*CreateTagValueRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _TagValues_UpdateTagValue_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(UpdateTagValueRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(TagValuesServer).UpdateTagValue(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: TagValues_UpdateTagValue_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(TagValuesServer).UpdateTagValue(ctx, req.(*UpdateTagValueRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _TagValues_DeleteTagValue_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DeleteTagValueRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(TagValuesServer).DeleteTagValue(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: TagValues_DeleteTagValue_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(TagValuesServer).DeleteTagValue(ctx, req.(*DeleteTagValueRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _TagValues_GetIamPolicy_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(iampb.GetIamPolicyRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(TagValuesServer).GetIamPolicy(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: TagValues_GetIamPolicy_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(TagValuesServer).GetIamPolicy(ctx, req.(*iampb.GetIamPolicyRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _TagValues_SetIamPolicy_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(iampb.SetIamPolicyRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(TagValuesServer).SetIamPolicy(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: TagValues_SetIamPolicy_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(TagValuesServer).SetIamPolicy(ctx, req.(*iampb.SetIamPolicyRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _TagValues_TestIamPermissions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(iampb.TestIamPermissionsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(TagValuesServer).TestIamPermissions(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: TagValues_TestIamPermissions_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(TagValuesServer).TestIamPermissions(ctx, req.(*iampb.TestIamPermissionsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -// TagValues_ServiceDesc is the grpc.ServiceDesc for TagValues service. -// It's only intended for direct use with grpc.RegisterService, -// and not to be introspected or modified (even as a copy) -var TagValues_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "google.cloud.resourcemanager.v3.TagValues", - HandlerType: (*TagValuesServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "ListTagValues", - Handler: _TagValues_ListTagValues_Handler, - }, - { - MethodName: "GetTagValue", - Handler: _TagValues_GetTagValue_Handler, - }, - { - MethodName: "GetNamespacedTagValue", - Handler: _TagValues_GetNamespacedTagValue_Handler, - }, - { - MethodName: "CreateTagValue", - Handler: _TagValues_CreateTagValue_Handler, - }, - { - MethodName: "UpdateTagValue", - Handler: _TagValues_UpdateTagValue_Handler, - }, - { - MethodName: "DeleteTagValue", - Handler: _TagValues_DeleteTagValue_Handler, - }, - { - MethodName: "GetIamPolicy", - Handler: _TagValues_GetIamPolicy_Handler, - }, - { - MethodName: "SetIamPolicy", - Handler: _TagValues_SetIamPolicy_Handler, - }, - { - MethodName: "TestIamPermissions", - Handler: _TagValues_TestIamPermissions_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "google/cloud/resourcemanager/v3/tag_values.proto", -} diff --git a/vendor/cloud.google.com/go/resourcemanager/apiv3/tag_bindings_client.go b/vendor/cloud.google.com/go/resourcemanager/apiv3/tag_bindings_client.go deleted file mode 100644 index c59d25f6df..0000000000 --- a/vendor/cloud.google.com/go/resourcemanager/apiv3/tag_bindings_client.go +++ /dev/null @@ -1,999 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Code generated by protoc-gen-go_gapic. DO NOT EDIT. - -package resourcemanager - -import ( - "bytes" - "context" - "fmt" - "log/slog" - "math" - "net/http" - "net/url" - "time" - - "cloud.google.com/go/longrunning" - lroauto "cloud.google.com/go/longrunning/autogen" - longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" - resourcemanagerpb "cloud.google.com/go/resourcemanager/apiv3/resourcemanagerpb" - gax "github.com/googleapis/gax-go/v2" - "github.com/googleapis/gax-go/v2/callctx" - "google.golang.org/api/iterator" - "google.golang.org/api/option" - "google.golang.org/api/option/internaloption" - gtransport "google.golang.org/api/transport/grpc" - httptransport "google.golang.org/api/transport/http" - "google.golang.org/grpc" - "google.golang.org/grpc/codes" - "google.golang.org/protobuf/encoding/protojson" - "google.golang.org/protobuf/proto" -) - -var newTagBindingsClientHook clientHook - -// TagBindingsCallOptions contains the retry settings for each method of TagBindingsClient. -type TagBindingsCallOptions struct { - ListTagBindings []gax.CallOption - CreateTagBinding []gax.CallOption - DeleteTagBinding []gax.CallOption - ListEffectiveTags []gax.CallOption - GetOperation []gax.CallOption -} - -func defaultTagBindingsGRPCClientOptions() []option.ClientOption { - return []option.ClientOption{ - internaloption.WithDefaultEndpoint("cloudresourcemanager.googleapis.com:443"), - internaloption.WithDefaultEndpointTemplate("cloudresourcemanager.UNIVERSE_DOMAIN:443"), - internaloption.WithDefaultMTLSEndpoint("cloudresourcemanager.mtls.googleapis.com:443"), - internaloption.WithDefaultUniverseDomain("googleapis.com"), - internaloption.WithDefaultAudience("https://cloudresourcemanager.googleapis.com/"), - internaloption.WithDefaultScopes(DefaultAuthScopes()...), - internaloption.EnableJwtWithScope(), - internaloption.AllowHardBoundTokens("MTLS_S2A"), - internaloption.EnableNewAuthLibrary(), - option.WithGRPCDialOption(grpc.WithDefaultCallOptions( - grpc.MaxCallRecvMsgSize(math.MaxInt32))), - } -} - -func defaultTagBindingsCallOptions() *TagBindingsCallOptions { - return &TagBindingsCallOptions{ - ListTagBindings: []gax.CallOption{ - gax.WithTimeout(60000 * time.Millisecond), - gax.WithRetry(func() gax.Retryer { - return gax.OnCodes([]codes.Code{ - codes.Unavailable, - }, gax.Backoff{ - Initial: 100 * time.Millisecond, - Max: 60000 * time.Millisecond, - Multiplier: 1.30, - }) - }), - }, - CreateTagBinding: []gax.CallOption{ - gax.WithTimeout(60000 * time.Millisecond), - }, - DeleteTagBinding: []gax.CallOption{ - gax.WithTimeout(60000 * time.Millisecond), - }, - ListEffectiveTags: []gax.CallOption{}, - GetOperation: []gax.CallOption{}, - } -} - -func defaultTagBindingsRESTCallOptions() *TagBindingsCallOptions { - return &TagBindingsCallOptions{ - ListTagBindings: []gax.CallOption{ - gax.WithTimeout(60000 * time.Millisecond), - gax.WithRetry(func() gax.Retryer { - return gax.OnHTTPCodes(gax.Backoff{ - Initial: 100 * time.Millisecond, - Max: 60000 * time.Millisecond, - Multiplier: 1.30, - }, - http.StatusServiceUnavailable) - }), - }, - CreateTagBinding: []gax.CallOption{ - gax.WithTimeout(60000 * time.Millisecond), - }, - DeleteTagBinding: []gax.CallOption{ - gax.WithTimeout(60000 * time.Millisecond), - }, - ListEffectiveTags: []gax.CallOption{}, - GetOperation: []gax.CallOption{}, - } -} - -// internalTagBindingsClient is an interface that defines the methods available from Cloud Resource Manager API. -type internalTagBindingsClient interface { - Close() error - setGoogleClientInfo(...string) - Connection() *grpc.ClientConn - ListTagBindings(context.Context, *resourcemanagerpb.ListTagBindingsRequest, ...gax.CallOption) *TagBindingIterator - CreateTagBinding(context.Context, *resourcemanagerpb.CreateTagBindingRequest, ...gax.CallOption) (*CreateTagBindingOperation, error) - CreateTagBindingOperation(name string) *CreateTagBindingOperation - DeleteTagBinding(context.Context, *resourcemanagerpb.DeleteTagBindingRequest, ...gax.CallOption) (*DeleteTagBindingOperation, error) - DeleteTagBindingOperation(name string) *DeleteTagBindingOperation - ListEffectiveTags(context.Context, *resourcemanagerpb.ListEffectiveTagsRequest, ...gax.CallOption) *EffectiveTagIterator - GetOperation(context.Context, *longrunningpb.GetOperationRequest, ...gax.CallOption) (*longrunningpb.Operation, error) -} - -// TagBindingsClient is a client for interacting with Cloud Resource Manager API. -// Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. -// -// Allow users to create and manage TagBindings between TagValues and -// different Google Cloud resources throughout the GCP resource hierarchy. -type TagBindingsClient struct { - // The internal transport-dependent client. - internalClient internalTagBindingsClient - - // The call options for this service. - CallOptions *TagBindingsCallOptions - - // LROClient is used internally to handle long-running operations. - // It is exposed so that its CallOptions can be modified if required. - // Users should not Close this client. - LROClient *lroauto.OperationsClient -} - -// Wrapper methods routed to the internal client. - -// Close closes the connection to the API service. The user should invoke this when -// the client is no longer required. -func (c *TagBindingsClient) Close() error { - return c.internalClient.Close() -} - -// setGoogleClientInfo sets the name and version of the application in -// the `x-goog-api-client` header passed on each request. Intended for -// use by Google-written clients. -func (c *TagBindingsClient) setGoogleClientInfo(keyval ...string) { - c.internalClient.setGoogleClientInfo(keyval...) -} - -// Connection returns a connection to the API service. -// -// Deprecated: Connections are now pooled so this method does not always -// return the same resource. -func (c *TagBindingsClient) Connection() *grpc.ClientConn { - return c.internalClient.Connection() -} - -// ListTagBindings lists the TagBindings for the given Google Cloud resource, as specified -// with parent. -// -// NOTE: The parent field is expected to be a full resource name: -// https://cloud.google.com/apis/design/resource_names#full_resource_name (at https://cloud.google.com/apis/design/resource_names#full_resource_name) -func (c *TagBindingsClient) ListTagBindings(ctx context.Context, req *resourcemanagerpb.ListTagBindingsRequest, opts ...gax.CallOption) *TagBindingIterator { - return c.internalClient.ListTagBindings(ctx, req, opts...) -} - -// CreateTagBinding creates a TagBinding between a TagValue and a Google Cloud resource. -func (c *TagBindingsClient) CreateTagBinding(ctx context.Context, req *resourcemanagerpb.CreateTagBindingRequest, opts ...gax.CallOption) (*CreateTagBindingOperation, error) { - return c.internalClient.CreateTagBinding(ctx, req, opts...) -} - -// CreateTagBindingOperation returns a new CreateTagBindingOperation from a given name. -// The name must be that of a previously created CreateTagBindingOperation, possibly from a different process. -func (c *TagBindingsClient) CreateTagBindingOperation(name string) *CreateTagBindingOperation { - return c.internalClient.CreateTagBindingOperation(name) -} - -// DeleteTagBinding deletes a TagBinding. -func (c *TagBindingsClient) DeleteTagBinding(ctx context.Context, req *resourcemanagerpb.DeleteTagBindingRequest, opts ...gax.CallOption) (*DeleteTagBindingOperation, error) { - return c.internalClient.DeleteTagBinding(ctx, req, opts...) -} - -// DeleteTagBindingOperation returns a new DeleteTagBindingOperation from a given name. -// The name must be that of a previously created DeleteTagBindingOperation, possibly from a different process. -func (c *TagBindingsClient) DeleteTagBindingOperation(name string) *DeleteTagBindingOperation { - return c.internalClient.DeleteTagBindingOperation(name) -} - -// ListEffectiveTags return a list of effective tags for the given Google Cloud resource, as -// specified in parent. -func (c *TagBindingsClient) ListEffectiveTags(ctx context.Context, req *resourcemanagerpb.ListEffectiveTagsRequest, opts ...gax.CallOption) *EffectiveTagIterator { - return c.internalClient.ListEffectiveTags(ctx, req, opts...) -} - -// GetOperation is a utility method from google.longrunning.Operations. -func (c *TagBindingsClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { - return c.internalClient.GetOperation(ctx, req, opts...) -} - -// tagBindingsGRPCClient is a client for interacting with Cloud Resource Manager API over gRPC transport. -// -// Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. -type tagBindingsGRPCClient struct { - // Connection pool of gRPC connections to the service. - connPool gtransport.ConnPool - - // Points back to the CallOptions field of the containing TagBindingsClient - CallOptions **TagBindingsCallOptions - - // The gRPC API client. - tagBindingsClient resourcemanagerpb.TagBindingsClient - - // LROClient is used internally to handle long-running operations. - // It is exposed so that its CallOptions can be modified if required. - // Users should not Close this client. - LROClient **lroauto.OperationsClient - - operationsClient longrunningpb.OperationsClient - - // The x-goog-* metadata to be sent with each request. - xGoogHeaders []string - - logger *slog.Logger -} - -// NewTagBindingsClient creates a new tag bindings client based on gRPC. -// The returned client must be Closed when it is done being used to clean up its underlying connections. -// -// Allow users to create and manage TagBindings between TagValues and -// different Google Cloud resources throughout the GCP resource hierarchy. -func NewTagBindingsClient(ctx context.Context, opts ...option.ClientOption) (*TagBindingsClient, error) { - clientOpts := defaultTagBindingsGRPCClientOptions() - if gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - clientOpts = append(clientOpts, internaloption.WithTelemetryAttributes(map[string]string{ - "gcp.client.service": "cloudresourcemanager", - "gcp.client.version": getVersionClient(), - "gcp.client.repo": "googleapis/google-cloud-go", - "gcp.client.artifact": "cloud.google.com/go/resourcemanager/apiv3", - "gcp.client.language": "go", - "url.domain": "cloudresourcemanager.googleapis.com", - })) - } - if newTagBindingsClientHook != nil { - hookOpts, err := newTagBindingsClientHook(ctx, clientHookParams{}) - if err != nil { - return nil, err - } - clientOpts = append(clientOpts, hookOpts...) - } - - connPool, err := gtransport.DialPool(ctx, append(clientOpts, opts...)...) - if err != nil { - return nil, err - } - client := TagBindingsClient{CallOptions: defaultTagBindingsCallOptions()} - - c := &tagBindingsGRPCClient{ - connPool: connPool, - tagBindingsClient: resourcemanagerpb.NewTagBindingsClient(connPool), - CallOptions: &client.CallOptions, - logger: internaloption.GetLogger(opts), - operationsClient: longrunningpb.NewOperationsClient(connPool), - } - c.setGoogleClientInfo() - if gax.IsFeatureEnabled("METRICS") { - metrics := gax.NewClientMetrics( - gax.WithTelemetryLogger(c.logger), - gax.WithTelemetryAttributes(map[string]string{ - gax.ClientService: "cloudresourcemanager", - gax.ClientVersion: getVersionClient(), - gax.ClientArtifact: "cloud.google.com/go/resourcemanager/apiv3", - gax.RPCSystem: "grpc", - gax.URLDomain: "cloudresourcemanager.googleapis.com", - }), - ) - - client.CallOptions.ListTagBindings = append(client.CallOptions.ListTagBindings, gax.WithClientMetrics(metrics)) - client.CallOptions.CreateTagBinding = append(client.CallOptions.CreateTagBinding, gax.WithClientMetrics(metrics)) - client.CallOptions.DeleteTagBinding = append(client.CallOptions.DeleteTagBinding, gax.WithClientMetrics(metrics)) - client.CallOptions.ListEffectiveTags = append(client.CallOptions.ListEffectiveTags, gax.WithClientMetrics(metrics)) - client.CallOptions.GetOperation = append(client.CallOptions.GetOperation, gax.WithClientMetrics(metrics)) - } - - client.internalClient = c - - client.LROClient, err = lroauto.NewOperationsClient(ctx, gtransport.WithConnPool(connPool)) - if err != nil { - // This error "should not happen", since we are just reusing old connection pool - // and never actually need to dial. - // If this does happen, we could leak connp. However, we cannot close conn: - // If the user invoked the constructor with option.WithGRPCConn, - // we would close a connection that's still in use. - // TODO: investigate error conditions. - return nil, err - } - c.LROClient = &client.LROClient - return &client, nil -} - -// Connection returns a connection to the API service. -// -// Deprecated: Connections are now pooled so this method does not always -// return the same resource. -func (c *tagBindingsGRPCClient) Connection() *grpc.ClientConn { - return c.connPool.Conn() -} - -// setGoogleClientInfo sets the name and version of the application in -// the `x-goog-api-client` header passed on each request. Intended for -// use by Google-written clients. -func (c *tagBindingsGRPCClient) setGoogleClientInfo(keyval ...string) { - kv := append([]string{"gl-go", gax.GoVersion}, keyval...) - kv = append(kv, "gapic", getVersionClient(), "gax", gax.Version, "grpc", grpc.Version, "pb", protoVersion) - c.xGoogHeaders = []string{ - "x-goog-api-client", gax.XGoogHeader(kv...), - } -} - -// Close closes the connection to the API service. The user should invoke this when -// the client is no longer required. -func (c *tagBindingsGRPCClient) Close() error { - return c.connPool.Close() -} - -// Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. -type tagBindingsRESTClient struct { - // The http endpoint to connect to. - endpoint string - - // The http client. - httpClient *http.Client - - // LROClient is used internally to handle long-running operations. - // It is exposed so that its CallOptions can be modified if required. - // Users should not Close this client. - LROClient **lroauto.OperationsClient - - // The x-goog-* headers to be sent with each request. - xGoogHeaders []string - - // Points back to the CallOptions field of the containing TagBindingsClient - CallOptions **TagBindingsCallOptions - - logger *slog.Logger -} - -// NewTagBindingsRESTClient creates a new tag bindings rest client. -// -// Allow users to create and manage TagBindings between TagValues and -// different Google Cloud resources throughout the GCP resource hierarchy. -func NewTagBindingsRESTClient(ctx context.Context, opts ...option.ClientOption) (*TagBindingsClient, error) { - clientOpts := append(defaultTagBindingsRESTClientOptions(), opts...) - if gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - clientOpts = append(clientOpts, internaloption.WithTelemetryAttributes(map[string]string{ - "gcp.client.service": "cloudresourcemanager", - "gcp.client.version": getVersionClient(), - "gcp.client.repo": "googleapis/google-cloud-go", - "gcp.client.artifact": "cloud.google.com/go/resourcemanager/apiv3", - "gcp.client.language": "go", - "url.domain": "cloudresourcemanager.googleapis.com", - })) - } - httpClient, endpoint, err := httptransport.NewClient(ctx, clientOpts...) - if err != nil { - return nil, err - } - - callOpts := defaultTagBindingsRESTCallOptions() - c := &tagBindingsRESTClient{ - endpoint: endpoint, - httpClient: httpClient, - CallOptions: &callOpts, - logger: internaloption.GetLogger(opts), - } - c.setGoogleClientInfo() - - if gax.IsFeatureEnabled("METRICS") { - metrics := gax.NewClientMetrics( - gax.WithTelemetryLogger(c.logger), - gax.WithTelemetryAttributes(map[string]string{ - gax.ClientService: "cloudresourcemanager", - gax.ClientVersion: getVersionClient(), - gax.ClientArtifact: "cloud.google.com/go/resourcemanager/apiv3", - gax.RPCSystem: "http", - gax.URLDomain: "cloudresourcemanager.googleapis.com", - }), - ) - - callOpts.ListTagBindings = append(callOpts.ListTagBindings, gax.WithClientMetrics(metrics)) - callOpts.CreateTagBinding = append(callOpts.CreateTagBinding, gax.WithClientMetrics(metrics)) - callOpts.DeleteTagBinding = append(callOpts.DeleteTagBinding, gax.WithClientMetrics(metrics)) - callOpts.ListEffectiveTags = append(callOpts.ListEffectiveTags, gax.WithClientMetrics(metrics)) - callOpts.GetOperation = append(callOpts.GetOperation, gax.WithClientMetrics(metrics)) - } - - lroOpts := []option.ClientOption{ - option.WithHTTPClient(httpClient), - option.WithEndpoint(endpoint), - } - opClient, err := lroauto.NewOperationsRESTClient(ctx, lroOpts...) - if err != nil { - return nil, err - } - c.LROClient = &opClient - - return &TagBindingsClient{internalClient: c, CallOptions: callOpts}, nil -} - -func defaultTagBindingsRESTClientOptions() []option.ClientOption { - return []option.ClientOption{ - internaloption.WithDefaultEndpoint("https://cloudresourcemanager.googleapis.com"), - internaloption.WithDefaultEndpointTemplate("https://cloudresourcemanager.UNIVERSE_DOMAIN"), - internaloption.WithDefaultMTLSEndpoint("https://cloudresourcemanager.mtls.googleapis.com"), - internaloption.WithDefaultUniverseDomain("googleapis.com"), - internaloption.WithDefaultAudience("https://cloudresourcemanager.googleapis.com/"), - internaloption.WithDefaultScopes(DefaultAuthScopes()...), - internaloption.EnableNewAuthLibrary(), - } -} - -// setGoogleClientInfo sets the name and version of the application in -// the `x-goog-api-client` header passed on each request. Intended for -// use by Google-written clients. -func (c *tagBindingsRESTClient) setGoogleClientInfo(keyval ...string) { - kv := append([]string{"gl-go", gax.GoVersion}, keyval...) - kv = append(kv, "gapic", getVersionClient(), "gax", gax.Version, "rest", "UNKNOWN", "pb", protoVersion) - c.xGoogHeaders = []string{ - "x-goog-api-client", gax.XGoogHeader(kv...), - } -} - -// Close closes the connection to the API service. The user should invoke this when -// the client is no longer required. -func (c *tagBindingsRESTClient) Close() error { - // Replace httpClient with nil to force cleanup. - c.httpClient = nil - return nil -} - -// Connection returns a connection to the API service. -// -// Deprecated: This method always returns nil. -func (c *tagBindingsRESTClient) Connection() *grpc.ClientConn { - return nil -} -func (c *tagBindingsGRPCClient) ListTagBindings(ctx context.Context, req *resourcemanagerpb.ListTagBindingsRequest, opts ...gax.CallOption) *TagBindingIterator { - ctx = gax.InsertMetadataIntoOutgoingContext(ctx, c.xGoogHeaders...) - if gax.IsFeatureEnabled("METRICS") || gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "rpc_method", "google.cloud.resourcemanager.v3.TagBindings/ListTagBindings") - } - opts = append((*c.CallOptions).ListTagBindings[0:len((*c.CallOptions).ListTagBindings):len((*c.CallOptions).ListTagBindings)], opts...) - it := &TagBindingIterator{} - req = proto.Clone(req).(*resourcemanagerpb.ListTagBindingsRequest) - it.InternalFetch = func(pageSize int, pageToken string) ([]*resourcemanagerpb.TagBinding, string, error) { - resp := &resourcemanagerpb.ListTagBindingsResponse{} - if pageToken != "" { - req.PageToken = pageToken - } - if pageSize > math.MaxInt32 { - req.PageSize = math.MaxInt32 - } else if pageSize != 0 { - req.PageSize = int32(pageSize) - } - err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - var err error - resp, err = executeRPC(ctx, c.tagBindingsClient.ListTagBindings, req, settings.GRPC, c.logger, "ListTagBindings") - return err - }, opts...) - if err != nil { - return nil, "", err - } - - it.Response = resp - return resp.GetTagBindings(), resp.GetNextPageToken(), nil - } - fetch := func(pageSize int, pageToken string) (string, error) { - items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) - if err != nil { - return "", err - } - it.items = append(it.items, items...) - return nextPageToken, nil - } - - it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) - it.pageInfo.MaxSize = int(req.GetPageSize()) - it.pageInfo.Token = req.GetPageToken() - - return it -} - -func (c *tagBindingsGRPCClient) CreateTagBinding(ctx context.Context, req *resourcemanagerpb.CreateTagBindingRequest, opts ...gax.CallOption) (*CreateTagBindingOperation, error) { - ctx = gax.InsertMetadataIntoOutgoingContext(ctx, c.xGoogHeaders...) - if gax.IsFeatureEnabled("METRICS") || gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "rpc_method", "google.cloud.resourcemanager.v3.TagBindings/CreateTagBinding") - } - opts = append((*c.CallOptions).CreateTagBinding[0:len((*c.CallOptions).CreateTagBinding):len((*c.CallOptions).CreateTagBinding)], opts...) - var resp *longrunningpb.Operation - err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - var err error - resp, err = executeRPC(ctx, c.tagBindingsClient.CreateTagBinding, req, settings.GRPC, c.logger, "CreateTagBinding") - return err - }, opts...) - if err != nil { - return nil, err - } - return &CreateTagBindingOperation{ - lro: longrunning.InternalNewOperation(*c.LROClient, resp), - }, nil -} - -func (c *tagBindingsGRPCClient) DeleteTagBinding(ctx context.Context, req *resourcemanagerpb.DeleteTagBindingRequest, opts ...gax.CallOption) (*DeleteTagBindingOperation, error) { - hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))} - - hds = append(c.xGoogHeaders, hds...) - ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) - if gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "resource_name", fmt.Sprintf("//cloudresourcemanager.googleapis.com/%v", req.GetName())) - } - if gax.IsFeatureEnabled("METRICS") || gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "rpc_method", "google.cloud.resourcemanager.v3.TagBindings/DeleteTagBinding") - } - opts = append((*c.CallOptions).DeleteTagBinding[0:len((*c.CallOptions).DeleteTagBinding):len((*c.CallOptions).DeleteTagBinding)], opts...) - var resp *longrunningpb.Operation - err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - var err error - resp, err = executeRPC(ctx, c.tagBindingsClient.DeleteTagBinding, req, settings.GRPC, c.logger, "DeleteTagBinding") - return err - }, opts...) - if err != nil { - return nil, err - } - return &DeleteTagBindingOperation{ - lro: longrunning.InternalNewOperation(*c.LROClient, resp), - }, nil -} - -func (c *tagBindingsGRPCClient) ListEffectiveTags(ctx context.Context, req *resourcemanagerpb.ListEffectiveTagsRequest, opts ...gax.CallOption) *EffectiveTagIterator { - ctx = gax.InsertMetadataIntoOutgoingContext(ctx, c.xGoogHeaders...) - if gax.IsFeatureEnabled("METRICS") || gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "rpc_method", "google.cloud.resourcemanager.v3.TagBindings/ListEffectiveTags") - } - opts = append((*c.CallOptions).ListEffectiveTags[0:len((*c.CallOptions).ListEffectiveTags):len((*c.CallOptions).ListEffectiveTags)], opts...) - it := &EffectiveTagIterator{} - req = proto.Clone(req).(*resourcemanagerpb.ListEffectiveTagsRequest) - it.InternalFetch = func(pageSize int, pageToken string) ([]*resourcemanagerpb.EffectiveTag, string, error) { - resp := &resourcemanagerpb.ListEffectiveTagsResponse{} - if pageToken != "" { - req.PageToken = pageToken - } - if pageSize > math.MaxInt32 { - req.PageSize = math.MaxInt32 - } else if pageSize != 0 { - req.PageSize = int32(pageSize) - } - err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - var err error - resp, err = executeRPC(ctx, c.tagBindingsClient.ListEffectiveTags, req, settings.GRPC, c.logger, "ListEffectiveTags") - return err - }, opts...) - if err != nil { - return nil, "", err - } - - it.Response = resp - return resp.GetEffectiveTags(), resp.GetNextPageToken(), nil - } - fetch := func(pageSize int, pageToken string) (string, error) { - items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) - if err != nil { - return "", err - } - it.items = append(it.items, items...) - return nextPageToken, nil - } - - it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) - it.pageInfo.MaxSize = int(req.GetPageSize()) - it.pageInfo.Token = req.GetPageToken() - - return it -} - -func (c *tagBindingsGRPCClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { - hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))} - - hds = append(c.xGoogHeaders, hds...) - ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) - if gax.IsFeatureEnabled("METRICS") || gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "rpc_method", "google.longrunning.Operations/GetOperation") - } - opts = append((*c.CallOptions).GetOperation[0:len((*c.CallOptions).GetOperation):len((*c.CallOptions).GetOperation)], opts...) - var resp *longrunningpb.Operation - err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - var err error - resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") - return err - }, opts...) - if err != nil { - return nil, err - } - return resp, nil -} - -// ListTagBindings lists the TagBindings for the given Google Cloud resource, as specified -// with parent. -// -// NOTE: The parent field is expected to be a full resource name: -// https://cloud.google.com/apis/design/resource_names#full_resource_name (at https://cloud.google.com/apis/design/resource_names#full_resource_name) -func (c *tagBindingsRESTClient) ListTagBindings(ctx context.Context, req *resourcemanagerpb.ListTagBindingsRequest, opts ...gax.CallOption) *TagBindingIterator { - it := &TagBindingIterator{} - req = proto.Clone(req).(*resourcemanagerpb.ListTagBindingsRequest) - unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} - it.InternalFetch = func(pageSize int, pageToken string) ([]*resourcemanagerpb.TagBinding, string, error) { - resp := &resourcemanagerpb.ListTagBindingsResponse{} - if pageToken != "" { - req.PageToken = pageToken - } - if pageSize > math.MaxInt32 { - req.PageSize = math.MaxInt32 - } else if pageSize != 0 { - req.PageSize = int32(pageSize) - } - baseUrl, err := url.Parse(c.endpoint) - if err != nil { - return nil, "", err - } - baseUrl.Path += fmt.Sprintf("/v3/tagBindings") - - params := url.Values{} - params.Add("$alt", "json;enum-encoding=int") - if req.GetPageSize() != 0 { - params.Add("pageSize", fmt.Sprintf("%v", req.GetPageSize())) - } - if req.GetPageToken() != "" { - params.Add("pageToken", fmt.Sprintf("%v", req.GetPageToken())) - } - params.Add("parent", fmt.Sprintf("%v", req.GetParent())) - - baseUrl.RawQuery = params.Encode() - - // Build HTTP headers from client and context metadata. - hds := append(c.xGoogHeaders, "Content-Type", "application/json") - headers := gax.BuildHeaders(ctx, hds...) - e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - if settings.Path != "" { - baseUrl.Path = settings.Path - } - httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) - if err != nil { - return err - } - httpReq.Header = headers - - buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListTagBindings") - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { - return err - } - - return nil - }, opts...) - if e != nil { - return nil, "", e - } - it.Response = resp - return resp.GetTagBindings(), resp.GetNextPageToken(), nil - } - - fetch := func(pageSize int, pageToken string) (string, error) { - items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) - if err != nil { - return "", err - } - it.items = append(it.items, items...) - return nextPageToken, nil - } - - it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) - it.pageInfo.MaxSize = int(req.GetPageSize()) - it.pageInfo.Token = req.GetPageToken() - - return it -} - -// CreateTagBinding creates a TagBinding between a TagValue and a Google Cloud resource. -func (c *tagBindingsRESTClient) CreateTagBinding(ctx context.Context, req *resourcemanagerpb.CreateTagBindingRequest, opts ...gax.CallOption) (*CreateTagBindingOperation, error) { - m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} - body := req.GetTagBinding() - jsonReq, err := m.Marshal(body) - if err != nil { - return nil, err - } - - baseUrl, err := url.Parse(c.endpoint) - if err != nil { - return nil, err - } - baseUrl.Path += fmt.Sprintf("/v3/tagBindings") - - params := url.Values{} - params.Add("$alt", "json;enum-encoding=int") - if req.GetValidateOnly() { - params.Add("validateOnly", fmt.Sprintf("%v", req.GetValidateOnly())) - } - - baseUrl.RawQuery = params.Encode() - - // Build HTTP headers from client and context metadata. - hds := append(c.xGoogHeaders, "Content-Type", "application/json") - headers := gax.BuildHeaders(ctx, hds...) - if gax.IsFeatureEnabled("METRICS") || gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "rpc_method", "google.cloud.resourcemanager.v3.TagBindings/CreateTagBinding") - ctx = callctx.WithTelemetryContext(ctx, "url_template", "/v3/tagBindings") - } - unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} - resp := &longrunningpb.Operation{} - e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - if settings.Path != "" { - baseUrl.Path = settings.Path - } - httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) - if err != nil { - return err - } - httpReq = httpReq.WithContext(ctx) - httpReq.Header = headers - - buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateTagBinding") - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { - return err - } - - return nil - }, opts...) - if e != nil { - return nil, e - } - - override := fmt.Sprintf("/v3/%s", resp.GetName()) - return &CreateTagBindingOperation{ - lro: longrunning.InternalNewOperation(*c.LROClient, resp), - pollPath: override, - }, nil -} - -// DeleteTagBinding deletes a TagBinding. -func (c *tagBindingsRESTClient) DeleteTagBinding(ctx context.Context, req *resourcemanagerpb.DeleteTagBindingRequest, opts ...gax.CallOption) (*DeleteTagBindingOperation, error) { - baseUrl, err := url.Parse(c.endpoint) - if err != nil { - return nil, err - } - baseUrl.Path += fmt.Sprintf("/v3/%v", req.GetName()) - - params := url.Values{} - params.Add("$alt", "json;enum-encoding=int") - - baseUrl.RawQuery = params.Encode() - - // Build HTTP headers from client and context metadata. - hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))} - - hds = append(c.xGoogHeaders, hds...) - hds = append(hds, "Content-Type", "application/json") - headers := gax.BuildHeaders(ctx, hds...) - if gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "resource_name", fmt.Sprintf("//cloudresourcemanager.googleapis.com/%v", req.GetName())) - } - if gax.IsFeatureEnabled("METRICS") || gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "rpc_method", "google.cloud.resourcemanager.v3.TagBindings/DeleteTagBinding") - ctx = callctx.WithTelemetryContext(ctx, "url_template", "/v3/{name=tagBindings/**}") - } - unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} - resp := &longrunningpb.Operation{} - e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - if settings.Path != "" { - baseUrl.Path = settings.Path - } - httpReq, err := http.NewRequest("DELETE", baseUrl.String(), nil) - if err != nil { - return err - } - httpReq = httpReq.WithContext(ctx) - httpReq.Header = headers - - buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteTagBinding") - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { - return err - } - - return nil - }, opts...) - if e != nil { - return nil, e - } - - override := fmt.Sprintf("/v3/%s", resp.GetName()) - return &DeleteTagBindingOperation{ - lro: longrunning.InternalNewOperation(*c.LROClient, resp), - pollPath: override, - }, nil -} - -// ListEffectiveTags return a list of effective tags for the given Google Cloud resource, as -// specified in parent. -func (c *tagBindingsRESTClient) ListEffectiveTags(ctx context.Context, req *resourcemanagerpb.ListEffectiveTagsRequest, opts ...gax.CallOption) *EffectiveTagIterator { - it := &EffectiveTagIterator{} - req = proto.Clone(req).(*resourcemanagerpb.ListEffectiveTagsRequest) - unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} - it.InternalFetch = func(pageSize int, pageToken string) ([]*resourcemanagerpb.EffectiveTag, string, error) { - resp := &resourcemanagerpb.ListEffectiveTagsResponse{} - if pageToken != "" { - req.PageToken = pageToken - } - if pageSize > math.MaxInt32 { - req.PageSize = math.MaxInt32 - } else if pageSize != 0 { - req.PageSize = int32(pageSize) - } - baseUrl, err := url.Parse(c.endpoint) - if err != nil { - return nil, "", err - } - baseUrl.Path += fmt.Sprintf("/v3/effectiveTags") - - params := url.Values{} - params.Add("$alt", "json;enum-encoding=int") - if req.GetPageSize() != 0 { - params.Add("pageSize", fmt.Sprintf("%v", req.GetPageSize())) - } - if req.GetPageToken() != "" { - params.Add("pageToken", fmt.Sprintf("%v", req.GetPageToken())) - } - params.Add("parent", fmt.Sprintf("%v", req.GetParent())) - - baseUrl.RawQuery = params.Encode() - - // Build HTTP headers from client and context metadata. - hds := append(c.xGoogHeaders, "Content-Type", "application/json") - headers := gax.BuildHeaders(ctx, hds...) - e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - if settings.Path != "" { - baseUrl.Path = settings.Path - } - httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) - if err != nil { - return err - } - httpReq.Header = headers - - buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListEffectiveTags") - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { - return err - } - - return nil - }, opts...) - if e != nil { - return nil, "", e - } - it.Response = resp - return resp.GetEffectiveTags(), resp.GetNextPageToken(), nil - } - - fetch := func(pageSize int, pageToken string) (string, error) { - items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) - if err != nil { - return "", err - } - it.items = append(it.items, items...) - return nextPageToken, nil - } - - it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) - it.pageInfo.MaxSize = int(req.GetPageSize()) - it.pageInfo.Token = req.GetPageToken() - - return it -} - -// GetOperation is a utility method from google.longrunning.Operations. -func (c *tagBindingsRESTClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { - baseUrl, err := url.Parse(c.endpoint) - if err != nil { - return nil, err - } - baseUrl.Path += fmt.Sprintf("/v3/%v", req.GetName()) - - params := url.Values{} - params.Add("$alt", "json;enum-encoding=int") - - baseUrl.RawQuery = params.Encode() - - // Build HTTP headers from client and context metadata. - hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))} - - hds = append(c.xGoogHeaders, hds...) - hds = append(hds, "Content-Type", "application/json") - headers := gax.BuildHeaders(ctx, hds...) - if gax.IsFeatureEnabled("METRICS") || gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "rpc_method", "google.longrunning.Operations/GetOperation") - ctx = callctx.WithTelemetryContext(ctx, "url_template", "/v3/{name=operations/**}") - } - opts = append((*c.CallOptions).GetOperation[0:len((*c.CallOptions).GetOperation):len((*c.CallOptions).GetOperation)], opts...) - unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} - resp := &longrunningpb.Operation{} - e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - if settings.Path != "" { - baseUrl.Path = settings.Path - } - httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) - if err != nil { - return err - } - httpReq = httpReq.WithContext(ctx) - httpReq.Header = headers - - buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") - if err != nil { - return err - } - - if err := unm.Unmarshal(buf, resp); err != nil { - return err - } - - return nil - }, opts...) - if e != nil { - return nil, e - } - return resp, nil -} - -// CreateTagBindingOperation returns a new CreateTagBindingOperation from a given name. -// The name must be that of a previously created CreateTagBindingOperation, possibly from a different process. -func (c *tagBindingsGRPCClient) CreateTagBindingOperation(name string) *CreateTagBindingOperation { - return &CreateTagBindingOperation{ - lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), - } -} - -// CreateTagBindingOperation returns a new CreateTagBindingOperation from a given name. -// The name must be that of a previously created CreateTagBindingOperation, possibly from a different process. -func (c *tagBindingsRESTClient) CreateTagBindingOperation(name string) *CreateTagBindingOperation { - override := fmt.Sprintf("/v3/%s", name) - return &CreateTagBindingOperation{ - lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), - pollPath: override, - } -} - -// DeleteTagBindingOperation returns a new DeleteTagBindingOperation from a given name. -// The name must be that of a previously created DeleteTagBindingOperation, possibly from a different process. -func (c *tagBindingsGRPCClient) DeleteTagBindingOperation(name string) *DeleteTagBindingOperation { - return &DeleteTagBindingOperation{ - lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), - } -} - -// DeleteTagBindingOperation returns a new DeleteTagBindingOperation from a given name. -// The name must be that of a previously created DeleteTagBindingOperation, possibly from a different process. -func (c *tagBindingsRESTClient) DeleteTagBindingOperation(name string) *DeleteTagBindingOperation { - override := fmt.Sprintf("/v3/%s", name) - return &DeleteTagBindingOperation{ - lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), - pollPath: override, - } -} diff --git a/vendor/cloud.google.com/go/resourcemanager/apiv3/tag_holds_client.go b/vendor/cloud.google.com/go/resourcemanager/apiv3/tag_holds_client.go deleted file mode 100644 index 7ae04dfcba..0000000000 --- a/vendor/cloud.google.com/go/resourcemanager/apiv3/tag_holds_client.go +++ /dev/null @@ -1,856 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Code generated by protoc-gen-go_gapic. DO NOT EDIT. - -package resourcemanager - -import ( - "bytes" - "context" - "fmt" - "log/slog" - "math" - "net/http" - "net/url" - - "cloud.google.com/go/longrunning" - lroauto "cloud.google.com/go/longrunning/autogen" - longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" - resourcemanagerpb "cloud.google.com/go/resourcemanager/apiv3/resourcemanagerpb" - gax "github.com/googleapis/gax-go/v2" - "github.com/googleapis/gax-go/v2/callctx" - "google.golang.org/api/iterator" - "google.golang.org/api/option" - "google.golang.org/api/option/internaloption" - gtransport "google.golang.org/api/transport/grpc" - httptransport "google.golang.org/api/transport/http" - "google.golang.org/grpc" - "google.golang.org/protobuf/encoding/protojson" - "google.golang.org/protobuf/proto" -) - -var newTagHoldsClientHook clientHook - -// TagHoldsCallOptions contains the retry settings for each method of TagHoldsClient. -type TagHoldsCallOptions struct { - CreateTagHold []gax.CallOption - DeleteTagHold []gax.CallOption - ListTagHolds []gax.CallOption - GetOperation []gax.CallOption -} - -func defaultTagHoldsGRPCClientOptions() []option.ClientOption { - return []option.ClientOption{ - internaloption.WithDefaultEndpoint("cloudresourcemanager.googleapis.com:443"), - internaloption.WithDefaultEndpointTemplate("cloudresourcemanager.UNIVERSE_DOMAIN:443"), - internaloption.WithDefaultMTLSEndpoint("cloudresourcemanager.mtls.googleapis.com:443"), - internaloption.WithDefaultUniverseDomain("googleapis.com"), - internaloption.WithDefaultAudience("https://cloudresourcemanager.googleapis.com/"), - internaloption.WithDefaultScopes(DefaultAuthScopes()...), - internaloption.EnableJwtWithScope(), - internaloption.AllowHardBoundTokens("MTLS_S2A"), - internaloption.EnableNewAuthLibrary(), - option.WithGRPCDialOption(grpc.WithDefaultCallOptions( - grpc.MaxCallRecvMsgSize(math.MaxInt32))), - } -} - -func defaultTagHoldsCallOptions() *TagHoldsCallOptions { - return &TagHoldsCallOptions{ - CreateTagHold: []gax.CallOption{}, - DeleteTagHold: []gax.CallOption{}, - ListTagHolds: []gax.CallOption{}, - GetOperation: []gax.CallOption{}, - } -} - -func defaultTagHoldsRESTCallOptions() *TagHoldsCallOptions { - return &TagHoldsCallOptions{ - CreateTagHold: []gax.CallOption{}, - DeleteTagHold: []gax.CallOption{}, - ListTagHolds: []gax.CallOption{}, - GetOperation: []gax.CallOption{}, - } -} - -// internalTagHoldsClient is an interface that defines the methods available from Cloud Resource Manager API. -type internalTagHoldsClient interface { - Close() error - setGoogleClientInfo(...string) - Connection() *grpc.ClientConn - CreateTagHold(context.Context, *resourcemanagerpb.CreateTagHoldRequest, ...gax.CallOption) (*CreateTagHoldOperation, error) - CreateTagHoldOperation(name string) *CreateTagHoldOperation - DeleteTagHold(context.Context, *resourcemanagerpb.DeleteTagHoldRequest, ...gax.CallOption) (*DeleteTagHoldOperation, error) - DeleteTagHoldOperation(name string) *DeleteTagHoldOperation - ListTagHolds(context.Context, *resourcemanagerpb.ListTagHoldsRequest, ...gax.CallOption) *TagHoldIterator - GetOperation(context.Context, *longrunningpb.GetOperationRequest, ...gax.CallOption) (*longrunningpb.Operation, error) -} - -// TagHoldsClient is a client for interacting with Cloud Resource Manager API. -// Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. -// -// Allow users to create and manage TagHolds for TagValues. TagHolds represent -// the use of a Tag Value that is not captured by TagBindings but -// should still block TagValue deletion (such as a reference in a policy -// condition). This service provides isolated failure domains by cloud location -// so that TagHolds can be managed in the same location as their usage. -type TagHoldsClient struct { - // The internal transport-dependent client. - internalClient internalTagHoldsClient - - // The call options for this service. - CallOptions *TagHoldsCallOptions - - // LROClient is used internally to handle long-running operations. - // It is exposed so that its CallOptions can be modified if required. - // Users should not Close this client. - LROClient *lroauto.OperationsClient -} - -// Wrapper methods routed to the internal client. - -// Close closes the connection to the API service. The user should invoke this when -// the client is no longer required. -func (c *TagHoldsClient) Close() error { - return c.internalClient.Close() -} - -// setGoogleClientInfo sets the name and version of the application in -// the `x-goog-api-client` header passed on each request. Intended for -// use by Google-written clients. -func (c *TagHoldsClient) setGoogleClientInfo(keyval ...string) { - c.internalClient.setGoogleClientInfo(keyval...) -} - -// Connection returns a connection to the API service. -// -// Deprecated: Connections are now pooled so this method does not always -// return the same resource. -func (c *TagHoldsClient) Connection() *grpc.ClientConn { - return c.internalClient.Connection() -} - -// CreateTagHold creates a TagHold. Returns ALREADY_EXISTS if a TagHold with the same -// resource and origin exists under the same TagValue. -func (c *TagHoldsClient) CreateTagHold(ctx context.Context, req *resourcemanagerpb.CreateTagHoldRequest, opts ...gax.CallOption) (*CreateTagHoldOperation, error) { - return c.internalClient.CreateTagHold(ctx, req, opts...) -} - -// CreateTagHoldOperation returns a new CreateTagHoldOperation from a given name. -// The name must be that of a previously created CreateTagHoldOperation, possibly from a different process. -func (c *TagHoldsClient) CreateTagHoldOperation(name string) *CreateTagHoldOperation { - return c.internalClient.CreateTagHoldOperation(name) -} - -// DeleteTagHold deletes a TagHold. -func (c *TagHoldsClient) DeleteTagHold(ctx context.Context, req *resourcemanagerpb.DeleteTagHoldRequest, opts ...gax.CallOption) (*DeleteTagHoldOperation, error) { - return c.internalClient.DeleteTagHold(ctx, req, opts...) -} - -// DeleteTagHoldOperation returns a new DeleteTagHoldOperation from a given name. -// The name must be that of a previously created DeleteTagHoldOperation, possibly from a different process. -func (c *TagHoldsClient) DeleteTagHoldOperation(name string) *DeleteTagHoldOperation { - return c.internalClient.DeleteTagHoldOperation(name) -} - -// ListTagHolds lists TagHolds under a TagValue. -func (c *TagHoldsClient) ListTagHolds(ctx context.Context, req *resourcemanagerpb.ListTagHoldsRequest, opts ...gax.CallOption) *TagHoldIterator { - return c.internalClient.ListTagHolds(ctx, req, opts...) -} - -// GetOperation is a utility method from google.longrunning.Operations. -func (c *TagHoldsClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { - return c.internalClient.GetOperation(ctx, req, opts...) -} - -// tagHoldsGRPCClient is a client for interacting with Cloud Resource Manager API over gRPC transport. -// -// Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. -type tagHoldsGRPCClient struct { - // Connection pool of gRPC connections to the service. - connPool gtransport.ConnPool - - // Points back to the CallOptions field of the containing TagHoldsClient - CallOptions **TagHoldsCallOptions - - // The gRPC API client. - tagHoldsClient resourcemanagerpb.TagHoldsClient - - // LROClient is used internally to handle long-running operations. - // It is exposed so that its CallOptions can be modified if required. - // Users should not Close this client. - LROClient **lroauto.OperationsClient - - operationsClient longrunningpb.OperationsClient - - // The x-goog-* metadata to be sent with each request. - xGoogHeaders []string - - logger *slog.Logger -} - -// NewTagHoldsClient creates a new tag holds client based on gRPC. -// The returned client must be Closed when it is done being used to clean up its underlying connections. -// -// Allow users to create and manage TagHolds for TagValues. TagHolds represent -// the use of a Tag Value that is not captured by TagBindings but -// should still block TagValue deletion (such as a reference in a policy -// condition). This service provides isolated failure domains by cloud location -// so that TagHolds can be managed in the same location as their usage. -func NewTagHoldsClient(ctx context.Context, opts ...option.ClientOption) (*TagHoldsClient, error) { - clientOpts := defaultTagHoldsGRPCClientOptions() - if gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - clientOpts = append(clientOpts, internaloption.WithTelemetryAttributes(map[string]string{ - "gcp.client.service": "cloudresourcemanager", - "gcp.client.version": getVersionClient(), - "gcp.client.repo": "googleapis/google-cloud-go", - "gcp.client.artifact": "cloud.google.com/go/resourcemanager/apiv3", - "gcp.client.language": "go", - "url.domain": "cloudresourcemanager.googleapis.com", - })) - } - if newTagHoldsClientHook != nil { - hookOpts, err := newTagHoldsClientHook(ctx, clientHookParams{}) - if err != nil { - return nil, err - } - clientOpts = append(clientOpts, hookOpts...) - } - - connPool, err := gtransport.DialPool(ctx, append(clientOpts, opts...)...) - if err != nil { - return nil, err - } - client := TagHoldsClient{CallOptions: defaultTagHoldsCallOptions()} - - c := &tagHoldsGRPCClient{ - connPool: connPool, - tagHoldsClient: resourcemanagerpb.NewTagHoldsClient(connPool), - CallOptions: &client.CallOptions, - logger: internaloption.GetLogger(opts), - operationsClient: longrunningpb.NewOperationsClient(connPool), - } - c.setGoogleClientInfo() - if gax.IsFeatureEnabled("METRICS") { - metrics := gax.NewClientMetrics( - gax.WithTelemetryLogger(c.logger), - gax.WithTelemetryAttributes(map[string]string{ - gax.ClientService: "cloudresourcemanager", - gax.ClientVersion: getVersionClient(), - gax.ClientArtifact: "cloud.google.com/go/resourcemanager/apiv3", - gax.RPCSystem: "grpc", - gax.URLDomain: "cloudresourcemanager.googleapis.com", - }), - ) - - client.CallOptions.CreateTagHold = append(client.CallOptions.CreateTagHold, gax.WithClientMetrics(metrics)) - client.CallOptions.DeleteTagHold = append(client.CallOptions.DeleteTagHold, gax.WithClientMetrics(metrics)) - client.CallOptions.ListTagHolds = append(client.CallOptions.ListTagHolds, gax.WithClientMetrics(metrics)) - client.CallOptions.GetOperation = append(client.CallOptions.GetOperation, gax.WithClientMetrics(metrics)) - } - - client.internalClient = c - - client.LROClient, err = lroauto.NewOperationsClient(ctx, gtransport.WithConnPool(connPool)) - if err != nil { - // This error "should not happen", since we are just reusing old connection pool - // and never actually need to dial. - // If this does happen, we could leak connp. However, we cannot close conn: - // If the user invoked the constructor with option.WithGRPCConn, - // we would close a connection that's still in use. - // TODO: investigate error conditions. - return nil, err - } - c.LROClient = &client.LROClient - return &client, nil -} - -// Connection returns a connection to the API service. -// -// Deprecated: Connections are now pooled so this method does not always -// return the same resource. -func (c *tagHoldsGRPCClient) Connection() *grpc.ClientConn { - return c.connPool.Conn() -} - -// setGoogleClientInfo sets the name and version of the application in -// the `x-goog-api-client` header passed on each request. Intended for -// use by Google-written clients. -func (c *tagHoldsGRPCClient) setGoogleClientInfo(keyval ...string) { - kv := append([]string{"gl-go", gax.GoVersion}, keyval...) - kv = append(kv, "gapic", getVersionClient(), "gax", gax.Version, "grpc", grpc.Version, "pb", protoVersion) - c.xGoogHeaders = []string{ - "x-goog-api-client", gax.XGoogHeader(kv...), - } -} - -// Close closes the connection to the API service. The user should invoke this when -// the client is no longer required. -func (c *tagHoldsGRPCClient) Close() error { - return c.connPool.Close() -} - -// Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. -type tagHoldsRESTClient struct { - // The http endpoint to connect to. - endpoint string - - // The http client. - httpClient *http.Client - - // LROClient is used internally to handle long-running operations. - // It is exposed so that its CallOptions can be modified if required. - // Users should not Close this client. - LROClient **lroauto.OperationsClient - - // The x-goog-* headers to be sent with each request. - xGoogHeaders []string - - // Points back to the CallOptions field of the containing TagHoldsClient - CallOptions **TagHoldsCallOptions - - logger *slog.Logger -} - -// NewTagHoldsRESTClient creates a new tag holds rest client. -// -// Allow users to create and manage TagHolds for TagValues. TagHolds represent -// the use of a Tag Value that is not captured by TagBindings but -// should still block TagValue deletion (such as a reference in a policy -// condition). This service provides isolated failure domains by cloud location -// so that TagHolds can be managed in the same location as their usage. -func NewTagHoldsRESTClient(ctx context.Context, opts ...option.ClientOption) (*TagHoldsClient, error) { - clientOpts := append(defaultTagHoldsRESTClientOptions(), opts...) - if gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - clientOpts = append(clientOpts, internaloption.WithTelemetryAttributes(map[string]string{ - "gcp.client.service": "cloudresourcemanager", - "gcp.client.version": getVersionClient(), - "gcp.client.repo": "googleapis/google-cloud-go", - "gcp.client.artifact": "cloud.google.com/go/resourcemanager/apiv3", - "gcp.client.language": "go", - "url.domain": "cloudresourcemanager.googleapis.com", - })) - } - httpClient, endpoint, err := httptransport.NewClient(ctx, clientOpts...) - if err != nil { - return nil, err - } - - callOpts := defaultTagHoldsRESTCallOptions() - c := &tagHoldsRESTClient{ - endpoint: endpoint, - httpClient: httpClient, - CallOptions: &callOpts, - logger: internaloption.GetLogger(opts), - } - c.setGoogleClientInfo() - - if gax.IsFeatureEnabled("METRICS") { - metrics := gax.NewClientMetrics( - gax.WithTelemetryLogger(c.logger), - gax.WithTelemetryAttributes(map[string]string{ - gax.ClientService: "cloudresourcemanager", - gax.ClientVersion: getVersionClient(), - gax.ClientArtifact: "cloud.google.com/go/resourcemanager/apiv3", - gax.RPCSystem: "http", - gax.URLDomain: "cloudresourcemanager.googleapis.com", - }), - ) - - callOpts.CreateTagHold = append(callOpts.CreateTagHold, gax.WithClientMetrics(metrics)) - callOpts.DeleteTagHold = append(callOpts.DeleteTagHold, gax.WithClientMetrics(metrics)) - callOpts.ListTagHolds = append(callOpts.ListTagHolds, gax.WithClientMetrics(metrics)) - callOpts.GetOperation = append(callOpts.GetOperation, gax.WithClientMetrics(metrics)) - } - - lroOpts := []option.ClientOption{ - option.WithHTTPClient(httpClient), - option.WithEndpoint(endpoint), - } - opClient, err := lroauto.NewOperationsRESTClient(ctx, lroOpts...) - if err != nil { - return nil, err - } - c.LROClient = &opClient - - return &TagHoldsClient{internalClient: c, CallOptions: callOpts}, nil -} - -func defaultTagHoldsRESTClientOptions() []option.ClientOption { - return []option.ClientOption{ - internaloption.WithDefaultEndpoint("https://cloudresourcemanager.googleapis.com"), - internaloption.WithDefaultEndpointTemplate("https://cloudresourcemanager.UNIVERSE_DOMAIN"), - internaloption.WithDefaultMTLSEndpoint("https://cloudresourcemanager.mtls.googleapis.com"), - internaloption.WithDefaultUniverseDomain("googleapis.com"), - internaloption.WithDefaultAudience("https://cloudresourcemanager.googleapis.com/"), - internaloption.WithDefaultScopes(DefaultAuthScopes()...), - internaloption.EnableNewAuthLibrary(), - } -} - -// setGoogleClientInfo sets the name and version of the application in -// the `x-goog-api-client` header passed on each request. Intended for -// use by Google-written clients. -func (c *tagHoldsRESTClient) setGoogleClientInfo(keyval ...string) { - kv := append([]string{"gl-go", gax.GoVersion}, keyval...) - kv = append(kv, "gapic", getVersionClient(), "gax", gax.Version, "rest", "UNKNOWN", "pb", protoVersion) - c.xGoogHeaders = []string{ - "x-goog-api-client", gax.XGoogHeader(kv...), - } -} - -// Close closes the connection to the API service. The user should invoke this when -// the client is no longer required. -func (c *tagHoldsRESTClient) Close() error { - // Replace httpClient with nil to force cleanup. - c.httpClient = nil - return nil -} - -// Connection returns a connection to the API service. -// -// Deprecated: This method always returns nil. -func (c *tagHoldsRESTClient) Connection() *grpc.ClientConn { - return nil -} -func (c *tagHoldsGRPCClient) CreateTagHold(ctx context.Context, req *resourcemanagerpb.CreateTagHoldRequest, opts ...gax.CallOption) (*CreateTagHoldOperation, error) { - hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))} - - hds = append(c.xGoogHeaders, hds...) - ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) - if gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "resource_name", fmt.Sprintf("//cloudresourcemanager.googleapis.com/%v", req.GetParent())) - } - if gax.IsFeatureEnabled("METRICS") || gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "rpc_method", "google.cloud.resourcemanager.v3.TagHolds/CreateTagHold") - } - opts = append((*c.CallOptions).CreateTagHold[0:len((*c.CallOptions).CreateTagHold):len((*c.CallOptions).CreateTagHold)], opts...) - var resp *longrunningpb.Operation - err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - var err error - resp, err = executeRPC(ctx, c.tagHoldsClient.CreateTagHold, req, settings.GRPC, c.logger, "CreateTagHold") - return err - }, opts...) - if err != nil { - return nil, err - } - return &CreateTagHoldOperation{ - lro: longrunning.InternalNewOperation(*c.LROClient, resp), - }, nil -} - -func (c *tagHoldsGRPCClient) DeleteTagHold(ctx context.Context, req *resourcemanagerpb.DeleteTagHoldRequest, opts ...gax.CallOption) (*DeleteTagHoldOperation, error) { - hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))} - - hds = append(c.xGoogHeaders, hds...) - ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) - if gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "resource_name", fmt.Sprintf("//cloudresourcemanager.googleapis.com/%v", req.GetName())) - } - if gax.IsFeatureEnabled("METRICS") || gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "rpc_method", "google.cloud.resourcemanager.v3.TagHolds/DeleteTagHold") - } - opts = append((*c.CallOptions).DeleteTagHold[0:len((*c.CallOptions).DeleteTagHold):len((*c.CallOptions).DeleteTagHold)], opts...) - var resp *longrunningpb.Operation - err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - var err error - resp, err = executeRPC(ctx, c.tagHoldsClient.DeleteTagHold, req, settings.GRPC, c.logger, "DeleteTagHold") - return err - }, opts...) - if err != nil { - return nil, err - } - return &DeleteTagHoldOperation{ - lro: longrunning.InternalNewOperation(*c.LROClient, resp), - }, nil -} - -func (c *tagHoldsGRPCClient) ListTagHolds(ctx context.Context, req *resourcemanagerpb.ListTagHoldsRequest, opts ...gax.CallOption) *TagHoldIterator { - hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))} - - hds = append(c.xGoogHeaders, hds...) - ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) - if gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "resource_name", fmt.Sprintf("//cloudresourcemanager.googleapis.com/%v", req.GetParent())) - } - if gax.IsFeatureEnabled("METRICS") || gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "rpc_method", "google.cloud.resourcemanager.v3.TagHolds/ListTagHolds") - } - opts = append((*c.CallOptions).ListTagHolds[0:len((*c.CallOptions).ListTagHolds):len((*c.CallOptions).ListTagHolds)], opts...) - it := &TagHoldIterator{} - req = proto.Clone(req).(*resourcemanagerpb.ListTagHoldsRequest) - it.InternalFetch = func(pageSize int, pageToken string) ([]*resourcemanagerpb.TagHold, string, error) { - resp := &resourcemanagerpb.ListTagHoldsResponse{} - if pageToken != "" { - req.PageToken = pageToken - } - if pageSize > math.MaxInt32 { - req.PageSize = math.MaxInt32 - } else if pageSize != 0 { - req.PageSize = int32(pageSize) - } - err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - var err error - resp, err = executeRPC(ctx, c.tagHoldsClient.ListTagHolds, req, settings.GRPC, c.logger, "ListTagHolds") - return err - }, opts...) - if err != nil { - return nil, "", err - } - - it.Response = resp - return resp.GetTagHolds(), resp.GetNextPageToken(), nil - } - fetch := func(pageSize int, pageToken string) (string, error) { - items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) - if err != nil { - return "", err - } - it.items = append(it.items, items...) - return nextPageToken, nil - } - - it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) - it.pageInfo.MaxSize = int(req.GetPageSize()) - it.pageInfo.Token = req.GetPageToken() - - return it -} - -func (c *tagHoldsGRPCClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { - hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))} - - hds = append(c.xGoogHeaders, hds...) - ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) - if gax.IsFeatureEnabled("METRICS") || gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "rpc_method", "google.longrunning.Operations/GetOperation") - } - opts = append((*c.CallOptions).GetOperation[0:len((*c.CallOptions).GetOperation):len((*c.CallOptions).GetOperation)], opts...) - var resp *longrunningpb.Operation - err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - var err error - resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") - return err - }, opts...) - if err != nil { - return nil, err - } - return resp, nil -} - -// CreateTagHold creates a TagHold. Returns ALREADY_EXISTS if a TagHold with the same -// resource and origin exists under the same TagValue. -func (c *tagHoldsRESTClient) CreateTagHold(ctx context.Context, req *resourcemanagerpb.CreateTagHoldRequest, opts ...gax.CallOption) (*CreateTagHoldOperation, error) { - m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} - body := req.GetTagHold() - jsonReq, err := m.Marshal(body) - if err != nil { - return nil, err - } - - baseUrl, err := url.Parse(c.endpoint) - if err != nil { - return nil, err - } - baseUrl.Path += fmt.Sprintf("/v3/%v/tagHolds", req.GetParent()) - - params := url.Values{} - params.Add("$alt", "json;enum-encoding=int") - if req.GetValidateOnly() { - params.Add("validateOnly", fmt.Sprintf("%v", req.GetValidateOnly())) - } - - baseUrl.RawQuery = params.Encode() - - // Build HTTP headers from client and context metadata. - hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))} - - hds = append(c.xGoogHeaders, hds...) - hds = append(hds, "Content-Type", "application/json") - headers := gax.BuildHeaders(ctx, hds...) - if gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "resource_name", fmt.Sprintf("//cloudresourcemanager.googleapis.com/%v", req.GetParent())) - } - if gax.IsFeatureEnabled("METRICS") || gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "rpc_method", "google.cloud.resourcemanager.v3.TagHolds/CreateTagHold") - ctx = callctx.WithTelemetryContext(ctx, "url_template", "/v3/{parent=tagValues/*}/tagHolds") - } - unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} - resp := &longrunningpb.Operation{} - e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - if settings.Path != "" { - baseUrl.Path = settings.Path - } - httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) - if err != nil { - return err - } - httpReq = httpReq.WithContext(ctx) - httpReq.Header = headers - - buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateTagHold") - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { - return err - } - - return nil - }, opts...) - if e != nil { - return nil, e - } - - override := fmt.Sprintf("/v3/%s", resp.GetName()) - return &CreateTagHoldOperation{ - lro: longrunning.InternalNewOperation(*c.LROClient, resp), - pollPath: override, - }, nil -} - -// DeleteTagHold deletes a TagHold. -func (c *tagHoldsRESTClient) DeleteTagHold(ctx context.Context, req *resourcemanagerpb.DeleteTagHoldRequest, opts ...gax.CallOption) (*DeleteTagHoldOperation, error) { - baseUrl, err := url.Parse(c.endpoint) - if err != nil { - return nil, err - } - baseUrl.Path += fmt.Sprintf("/v3/%v", req.GetName()) - - params := url.Values{} - params.Add("$alt", "json;enum-encoding=int") - if req.GetValidateOnly() { - params.Add("validateOnly", fmt.Sprintf("%v", req.GetValidateOnly())) - } - - baseUrl.RawQuery = params.Encode() - - // Build HTTP headers from client and context metadata. - hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))} - - hds = append(c.xGoogHeaders, hds...) - hds = append(hds, "Content-Type", "application/json") - headers := gax.BuildHeaders(ctx, hds...) - if gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "resource_name", fmt.Sprintf("//cloudresourcemanager.googleapis.com/%v", req.GetName())) - } - if gax.IsFeatureEnabled("METRICS") || gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "rpc_method", "google.cloud.resourcemanager.v3.TagHolds/DeleteTagHold") - ctx = callctx.WithTelemetryContext(ctx, "url_template", "/v3/{name=tagValues/*/tagHolds/*}") - } - unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} - resp := &longrunningpb.Operation{} - e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - if settings.Path != "" { - baseUrl.Path = settings.Path - } - httpReq, err := http.NewRequest("DELETE", baseUrl.String(), nil) - if err != nil { - return err - } - httpReq = httpReq.WithContext(ctx) - httpReq.Header = headers - - buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteTagHold") - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { - return err - } - - return nil - }, opts...) - if e != nil { - return nil, e - } - - override := fmt.Sprintf("/v3/%s", resp.GetName()) - return &DeleteTagHoldOperation{ - lro: longrunning.InternalNewOperation(*c.LROClient, resp), - pollPath: override, - }, nil -} - -// ListTagHolds lists TagHolds under a TagValue. -func (c *tagHoldsRESTClient) ListTagHolds(ctx context.Context, req *resourcemanagerpb.ListTagHoldsRequest, opts ...gax.CallOption) *TagHoldIterator { - it := &TagHoldIterator{} - req = proto.Clone(req).(*resourcemanagerpb.ListTagHoldsRequest) - unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} - it.InternalFetch = func(pageSize int, pageToken string) ([]*resourcemanagerpb.TagHold, string, error) { - resp := &resourcemanagerpb.ListTagHoldsResponse{} - if pageToken != "" { - req.PageToken = pageToken - } - if pageSize > math.MaxInt32 { - req.PageSize = math.MaxInt32 - } else if pageSize != 0 { - req.PageSize = int32(pageSize) - } - baseUrl, err := url.Parse(c.endpoint) - if err != nil { - return nil, "", err - } - baseUrl.Path += fmt.Sprintf("/v3/%v/tagHolds", req.GetParent()) - - params := url.Values{} - params.Add("$alt", "json;enum-encoding=int") - if req.GetFilter() != "" { - params.Add("filter", fmt.Sprintf("%v", req.GetFilter())) - } - if req.GetPageSize() != 0 { - params.Add("pageSize", fmt.Sprintf("%v", req.GetPageSize())) - } - if req.GetPageToken() != "" { - params.Add("pageToken", fmt.Sprintf("%v", req.GetPageToken())) - } - - baseUrl.RawQuery = params.Encode() - - // Build HTTP headers from client and context metadata. - hds := append(c.xGoogHeaders, "Content-Type", "application/json") - headers := gax.BuildHeaders(ctx, hds...) - e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - if settings.Path != "" { - baseUrl.Path = settings.Path - } - httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) - if err != nil { - return err - } - httpReq.Header = headers - - buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListTagHolds") - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { - return err - } - - return nil - }, opts...) - if e != nil { - return nil, "", e - } - it.Response = resp - return resp.GetTagHolds(), resp.GetNextPageToken(), nil - } - - fetch := func(pageSize int, pageToken string) (string, error) { - items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) - if err != nil { - return "", err - } - it.items = append(it.items, items...) - return nextPageToken, nil - } - - it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) - it.pageInfo.MaxSize = int(req.GetPageSize()) - it.pageInfo.Token = req.GetPageToken() - - return it -} - -// GetOperation is a utility method from google.longrunning.Operations. -func (c *tagHoldsRESTClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { - baseUrl, err := url.Parse(c.endpoint) - if err != nil { - return nil, err - } - baseUrl.Path += fmt.Sprintf("/v3/%v", req.GetName()) - - params := url.Values{} - params.Add("$alt", "json;enum-encoding=int") - - baseUrl.RawQuery = params.Encode() - - // Build HTTP headers from client and context metadata. - hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))} - - hds = append(c.xGoogHeaders, hds...) - hds = append(hds, "Content-Type", "application/json") - headers := gax.BuildHeaders(ctx, hds...) - if gax.IsFeatureEnabled("METRICS") || gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "rpc_method", "google.longrunning.Operations/GetOperation") - ctx = callctx.WithTelemetryContext(ctx, "url_template", "/v3/{name=operations/**}") - } - opts = append((*c.CallOptions).GetOperation[0:len((*c.CallOptions).GetOperation):len((*c.CallOptions).GetOperation)], opts...) - unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} - resp := &longrunningpb.Operation{} - e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - if settings.Path != "" { - baseUrl.Path = settings.Path - } - httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) - if err != nil { - return err - } - httpReq = httpReq.WithContext(ctx) - httpReq.Header = headers - - buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") - if err != nil { - return err - } - - if err := unm.Unmarshal(buf, resp); err != nil { - return err - } - - return nil - }, opts...) - if e != nil { - return nil, e - } - return resp, nil -} - -// CreateTagHoldOperation returns a new CreateTagHoldOperation from a given name. -// The name must be that of a previously created CreateTagHoldOperation, possibly from a different process. -func (c *tagHoldsGRPCClient) CreateTagHoldOperation(name string) *CreateTagHoldOperation { - return &CreateTagHoldOperation{ - lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), - } -} - -// CreateTagHoldOperation returns a new CreateTagHoldOperation from a given name. -// The name must be that of a previously created CreateTagHoldOperation, possibly from a different process. -func (c *tagHoldsRESTClient) CreateTagHoldOperation(name string) *CreateTagHoldOperation { - override := fmt.Sprintf("/v3/%s", name) - return &CreateTagHoldOperation{ - lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), - pollPath: override, - } -} - -// DeleteTagHoldOperation returns a new DeleteTagHoldOperation from a given name. -// The name must be that of a previously created DeleteTagHoldOperation, possibly from a different process. -func (c *tagHoldsGRPCClient) DeleteTagHoldOperation(name string) *DeleteTagHoldOperation { - return &DeleteTagHoldOperation{ - lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), - } -} - -// DeleteTagHoldOperation returns a new DeleteTagHoldOperation from a given name. -// The name must be that of a previously created DeleteTagHoldOperation, possibly from a different process. -func (c *tagHoldsRESTClient) DeleteTagHoldOperation(name string) *DeleteTagHoldOperation { - override := fmt.Sprintf("/v3/%s", name) - return &DeleteTagHoldOperation{ - lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), - pollPath: override, - } -} diff --git a/vendor/cloud.google.com/go/resourcemanager/apiv3/tag_keys_client.go b/vendor/cloud.google.com/go/resourcemanager/apiv3/tag_keys_client.go deleted file mode 100644 index f20ae06d82..0000000000 --- a/vendor/cloud.google.com/go/resourcemanager/apiv3/tag_keys_client.go +++ /dev/null @@ -1,1547 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Code generated by protoc-gen-go_gapic. DO NOT EDIT. - -package resourcemanager - -import ( - "bytes" - "context" - "fmt" - "log/slog" - "math" - "net/http" - "net/url" - "time" - - iampb "cloud.google.com/go/iam/apiv1/iampb" - "cloud.google.com/go/longrunning" - lroauto "cloud.google.com/go/longrunning/autogen" - longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" - resourcemanagerpb "cloud.google.com/go/resourcemanager/apiv3/resourcemanagerpb" - gax "github.com/googleapis/gax-go/v2" - "github.com/googleapis/gax-go/v2/callctx" - "google.golang.org/api/iterator" - "google.golang.org/api/option" - "google.golang.org/api/option/internaloption" - gtransport "google.golang.org/api/transport/grpc" - httptransport "google.golang.org/api/transport/http" - "google.golang.org/grpc" - "google.golang.org/grpc/codes" - "google.golang.org/protobuf/encoding/protojson" - "google.golang.org/protobuf/proto" -) - -var newTagKeysClientHook clientHook - -// TagKeysCallOptions contains the retry settings for each method of TagKeysClient. -type TagKeysCallOptions struct { - ListTagKeys []gax.CallOption - GetTagKey []gax.CallOption - GetNamespacedTagKey []gax.CallOption - CreateTagKey []gax.CallOption - UpdateTagKey []gax.CallOption - DeleteTagKey []gax.CallOption - GetIamPolicy []gax.CallOption - SetIamPolicy []gax.CallOption - TestIamPermissions []gax.CallOption - GetOperation []gax.CallOption -} - -func defaultTagKeysGRPCClientOptions() []option.ClientOption { - return []option.ClientOption{ - internaloption.WithDefaultEndpoint("cloudresourcemanager.googleapis.com:443"), - internaloption.WithDefaultEndpointTemplate("cloudresourcemanager.UNIVERSE_DOMAIN:443"), - internaloption.WithDefaultMTLSEndpoint("cloudresourcemanager.mtls.googleapis.com:443"), - internaloption.WithDefaultUniverseDomain("googleapis.com"), - internaloption.WithDefaultAudience("https://cloudresourcemanager.googleapis.com/"), - internaloption.WithDefaultScopes(DefaultAuthScopes()...), - internaloption.EnableJwtWithScope(), - internaloption.AllowHardBoundTokens("MTLS_S2A"), - internaloption.EnableNewAuthLibrary(), - option.WithGRPCDialOption(grpc.WithDefaultCallOptions( - grpc.MaxCallRecvMsgSize(math.MaxInt32))), - } -} - -func defaultTagKeysCallOptions() *TagKeysCallOptions { - return &TagKeysCallOptions{ - ListTagKeys: []gax.CallOption{ - gax.WithTimeout(60000 * time.Millisecond), - gax.WithRetry(func() gax.Retryer { - return gax.OnCodes([]codes.Code{ - codes.Unavailable, - }, gax.Backoff{ - Initial: 100 * time.Millisecond, - Max: 60000 * time.Millisecond, - Multiplier: 1.30, - }) - }), - }, - GetTagKey: []gax.CallOption{ - gax.WithTimeout(60000 * time.Millisecond), - gax.WithRetry(func() gax.Retryer { - return gax.OnCodes([]codes.Code{ - codes.Unavailable, - }, gax.Backoff{ - Initial: 100 * time.Millisecond, - Max: 60000 * time.Millisecond, - Multiplier: 1.30, - }) - }), - }, - GetNamespacedTagKey: []gax.CallOption{}, - CreateTagKey: []gax.CallOption{ - gax.WithTimeout(60000 * time.Millisecond), - }, - UpdateTagKey: []gax.CallOption{ - gax.WithTimeout(60000 * time.Millisecond), - }, - DeleteTagKey: []gax.CallOption{ - gax.WithTimeout(60000 * time.Millisecond), - }, - GetIamPolicy: []gax.CallOption{ - gax.WithTimeout(60000 * time.Millisecond), - gax.WithRetry(func() gax.Retryer { - return gax.OnCodes([]codes.Code{ - codes.Unavailable, - }, gax.Backoff{ - Initial: 100 * time.Millisecond, - Max: 60000 * time.Millisecond, - Multiplier: 1.30, - }) - }), - }, - SetIamPolicy: []gax.CallOption{ - gax.WithTimeout(60000 * time.Millisecond), - }, - TestIamPermissions: []gax.CallOption{}, - GetOperation: []gax.CallOption{}, - } -} - -func defaultTagKeysRESTCallOptions() *TagKeysCallOptions { - return &TagKeysCallOptions{ - ListTagKeys: []gax.CallOption{ - gax.WithTimeout(60000 * time.Millisecond), - gax.WithRetry(func() gax.Retryer { - return gax.OnHTTPCodes(gax.Backoff{ - Initial: 100 * time.Millisecond, - Max: 60000 * time.Millisecond, - Multiplier: 1.30, - }, - http.StatusServiceUnavailable) - }), - }, - GetTagKey: []gax.CallOption{ - gax.WithTimeout(60000 * time.Millisecond), - gax.WithRetry(func() gax.Retryer { - return gax.OnHTTPCodes(gax.Backoff{ - Initial: 100 * time.Millisecond, - Max: 60000 * time.Millisecond, - Multiplier: 1.30, - }, - http.StatusServiceUnavailable) - }), - }, - GetNamespacedTagKey: []gax.CallOption{}, - CreateTagKey: []gax.CallOption{ - gax.WithTimeout(60000 * time.Millisecond), - }, - UpdateTagKey: []gax.CallOption{ - gax.WithTimeout(60000 * time.Millisecond), - }, - DeleteTagKey: []gax.CallOption{ - gax.WithTimeout(60000 * time.Millisecond), - }, - GetIamPolicy: []gax.CallOption{ - gax.WithTimeout(60000 * time.Millisecond), - gax.WithRetry(func() gax.Retryer { - return gax.OnHTTPCodes(gax.Backoff{ - Initial: 100 * time.Millisecond, - Max: 60000 * time.Millisecond, - Multiplier: 1.30, - }, - http.StatusServiceUnavailable) - }), - }, - SetIamPolicy: []gax.CallOption{ - gax.WithTimeout(60000 * time.Millisecond), - }, - TestIamPermissions: []gax.CallOption{}, - GetOperation: []gax.CallOption{}, - } -} - -// internalTagKeysClient is an interface that defines the methods available from Cloud Resource Manager API. -type internalTagKeysClient interface { - Close() error - setGoogleClientInfo(...string) - Connection() *grpc.ClientConn - ListTagKeys(context.Context, *resourcemanagerpb.ListTagKeysRequest, ...gax.CallOption) *TagKeyIterator - GetTagKey(context.Context, *resourcemanagerpb.GetTagKeyRequest, ...gax.CallOption) (*resourcemanagerpb.TagKey, error) - GetNamespacedTagKey(context.Context, *resourcemanagerpb.GetNamespacedTagKeyRequest, ...gax.CallOption) (*resourcemanagerpb.TagKey, error) - CreateTagKey(context.Context, *resourcemanagerpb.CreateTagKeyRequest, ...gax.CallOption) (*CreateTagKeyOperation, error) - CreateTagKeyOperation(name string) *CreateTagKeyOperation - UpdateTagKey(context.Context, *resourcemanagerpb.UpdateTagKeyRequest, ...gax.CallOption) (*UpdateTagKeyOperation, error) - UpdateTagKeyOperation(name string) *UpdateTagKeyOperation - DeleteTagKey(context.Context, *resourcemanagerpb.DeleteTagKeyRequest, ...gax.CallOption) (*DeleteTagKeyOperation, error) - DeleteTagKeyOperation(name string) *DeleteTagKeyOperation - GetIamPolicy(context.Context, *iampb.GetIamPolicyRequest, ...gax.CallOption) (*iampb.Policy, error) - SetIamPolicy(context.Context, *iampb.SetIamPolicyRequest, ...gax.CallOption) (*iampb.Policy, error) - TestIamPermissions(context.Context, *iampb.TestIamPermissionsRequest, ...gax.CallOption) (*iampb.TestIamPermissionsResponse, error) - GetOperation(context.Context, *longrunningpb.GetOperationRequest, ...gax.CallOption) (*longrunningpb.Operation, error) -} - -// TagKeysClient is a client for interacting with Cloud Resource Manager API. -// Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. -// -// Allow users to create and manage tag keys. -type TagKeysClient struct { - // The internal transport-dependent client. - internalClient internalTagKeysClient - - // The call options for this service. - CallOptions *TagKeysCallOptions - - // LROClient is used internally to handle long-running operations. - // It is exposed so that its CallOptions can be modified if required. - // Users should not Close this client. - LROClient *lroauto.OperationsClient -} - -// Wrapper methods routed to the internal client. - -// Close closes the connection to the API service. The user should invoke this when -// the client is no longer required. -func (c *TagKeysClient) Close() error { - return c.internalClient.Close() -} - -// setGoogleClientInfo sets the name and version of the application in -// the `x-goog-api-client` header passed on each request. Intended for -// use by Google-written clients. -func (c *TagKeysClient) setGoogleClientInfo(keyval ...string) { - c.internalClient.setGoogleClientInfo(keyval...) -} - -// Connection returns a connection to the API service. -// -// Deprecated: Connections are now pooled so this method does not always -// return the same resource. -func (c *TagKeysClient) Connection() *grpc.ClientConn { - return c.internalClient.Connection() -} - -// ListTagKeys lists all TagKeys for a parent resource. -func (c *TagKeysClient) ListTagKeys(ctx context.Context, req *resourcemanagerpb.ListTagKeysRequest, opts ...gax.CallOption) *TagKeyIterator { - return c.internalClient.ListTagKeys(ctx, req, opts...) -} - -// GetTagKey retrieves a TagKey. This method will return PERMISSION_DENIED if the -// key does not exist or the user does not have permission to view it. -func (c *TagKeysClient) GetTagKey(ctx context.Context, req *resourcemanagerpb.GetTagKeyRequest, opts ...gax.CallOption) (*resourcemanagerpb.TagKey, error) { - return c.internalClient.GetTagKey(ctx, req, opts...) -} - -// GetNamespacedTagKey retrieves a TagKey by its namespaced name. -// This method will return PERMISSION_DENIED if the key does not exist -// or the user does not have permission to view it. -func (c *TagKeysClient) GetNamespacedTagKey(ctx context.Context, req *resourcemanagerpb.GetNamespacedTagKeyRequest, opts ...gax.CallOption) (*resourcemanagerpb.TagKey, error) { - return c.internalClient.GetNamespacedTagKey(ctx, req, opts...) -} - -// CreateTagKey creates a new TagKey. If another request with the same parameters is -// sent while the original request is in process, the second request -// will receive an error. A maximum of 1000 TagKeys can exist under a parent -// at any given time. -func (c *TagKeysClient) CreateTagKey(ctx context.Context, req *resourcemanagerpb.CreateTagKeyRequest, opts ...gax.CallOption) (*CreateTagKeyOperation, error) { - return c.internalClient.CreateTagKey(ctx, req, opts...) -} - -// CreateTagKeyOperation returns a new CreateTagKeyOperation from a given name. -// The name must be that of a previously created CreateTagKeyOperation, possibly from a different process. -func (c *TagKeysClient) CreateTagKeyOperation(name string) *CreateTagKeyOperation { - return c.internalClient.CreateTagKeyOperation(name) -} - -// UpdateTagKey updates the attributes of the TagKey resource. -func (c *TagKeysClient) UpdateTagKey(ctx context.Context, req *resourcemanagerpb.UpdateTagKeyRequest, opts ...gax.CallOption) (*UpdateTagKeyOperation, error) { - return c.internalClient.UpdateTagKey(ctx, req, opts...) -} - -// UpdateTagKeyOperation returns a new UpdateTagKeyOperation from a given name. -// The name must be that of a previously created UpdateTagKeyOperation, possibly from a different process. -func (c *TagKeysClient) UpdateTagKeyOperation(name string) *UpdateTagKeyOperation { - return c.internalClient.UpdateTagKeyOperation(name) -} - -// DeleteTagKey deletes a TagKey. The TagKey cannot be deleted if it has any child -// TagValues. -func (c *TagKeysClient) DeleteTagKey(ctx context.Context, req *resourcemanagerpb.DeleteTagKeyRequest, opts ...gax.CallOption) (*DeleteTagKeyOperation, error) { - return c.internalClient.DeleteTagKey(ctx, req, opts...) -} - -// DeleteTagKeyOperation returns a new DeleteTagKeyOperation from a given name. -// The name must be that of a previously created DeleteTagKeyOperation, possibly from a different process. -func (c *TagKeysClient) DeleteTagKeyOperation(name string) *DeleteTagKeyOperation { - return c.internalClient.DeleteTagKeyOperation(name) -} - -// GetIamPolicy gets the access control policy for a TagKey. The returned policy may be -// empty if no such policy or resource exists. The resource field should -// be the TagKey’s resource name. For example, “tagKeys/1234”. -// The caller must have -// cloudresourcemanager.googleapis.com/tagKeys.getIamPolicy permission on -// the specified TagKey. -func (c *TagKeysClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error) { - return c.internalClient.GetIamPolicy(ctx, req, opts...) -} - -// SetIamPolicy sets the access control policy on a TagKey, replacing any existing -// policy. The resource field should be the TagKey’s resource name. -// For example, “tagKeys/1234”. -// The caller must have resourcemanager.tagKeys.setIamPolicy permission -// on the identified tagValue. -func (c *TagKeysClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error) { - return c.internalClient.SetIamPolicy(ctx, req, opts...) -} - -// TestIamPermissions returns permissions that a caller has on the specified TagKey. -// The resource field should be the TagKey’s resource name. -// For example, “tagKeys/1234”. -// -// There are no permissions required for making this API call. -func (c *TagKeysClient) TestIamPermissions(ctx context.Context, req *iampb.TestIamPermissionsRequest, opts ...gax.CallOption) (*iampb.TestIamPermissionsResponse, error) { - return c.internalClient.TestIamPermissions(ctx, req, opts...) -} - -// GetOperation is a utility method from google.longrunning.Operations. -func (c *TagKeysClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { - return c.internalClient.GetOperation(ctx, req, opts...) -} - -// tagKeysGRPCClient is a client for interacting with Cloud Resource Manager API over gRPC transport. -// -// Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. -type tagKeysGRPCClient struct { - // Connection pool of gRPC connections to the service. - connPool gtransport.ConnPool - - // Points back to the CallOptions field of the containing TagKeysClient - CallOptions **TagKeysCallOptions - - // The gRPC API client. - tagKeysClient resourcemanagerpb.TagKeysClient - - // LROClient is used internally to handle long-running operations. - // It is exposed so that its CallOptions can be modified if required. - // Users should not Close this client. - LROClient **lroauto.OperationsClient - - operationsClient longrunningpb.OperationsClient - - // The x-goog-* metadata to be sent with each request. - xGoogHeaders []string - - logger *slog.Logger -} - -// NewTagKeysClient creates a new tag keys client based on gRPC. -// The returned client must be Closed when it is done being used to clean up its underlying connections. -// -// Allow users to create and manage tag keys. -func NewTagKeysClient(ctx context.Context, opts ...option.ClientOption) (*TagKeysClient, error) { - clientOpts := defaultTagKeysGRPCClientOptions() - if gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - clientOpts = append(clientOpts, internaloption.WithTelemetryAttributes(map[string]string{ - "gcp.client.service": "cloudresourcemanager", - "gcp.client.version": getVersionClient(), - "gcp.client.repo": "googleapis/google-cloud-go", - "gcp.client.artifact": "cloud.google.com/go/resourcemanager/apiv3", - "gcp.client.language": "go", - "url.domain": "cloudresourcemanager.googleapis.com", - })) - } - if newTagKeysClientHook != nil { - hookOpts, err := newTagKeysClientHook(ctx, clientHookParams{}) - if err != nil { - return nil, err - } - clientOpts = append(clientOpts, hookOpts...) - } - - connPool, err := gtransport.DialPool(ctx, append(clientOpts, opts...)...) - if err != nil { - return nil, err - } - client := TagKeysClient{CallOptions: defaultTagKeysCallOptions()} - - c := &tagKeysGRPCClient{ - connPool: connPool, - tagKeysClient: resourcemanagerpb.NewTagKeysClient(connPool), - CallOptions: &client.CallOptions, - logger: internaloption.GetLogger(opts), - operationsClient: longrunningpb.NewOperationsClient(connPool), - } - c.setGoogleClientInfo() - if gax.IsFeatureEnabled("METRICS") { - metrics := gax.NewClientMetrics( - gax.WithTelemetryLogger(c.logger), - gax.WithTelemetryAttributes(map[string]string{ - gax.ClientService: "cloudresourcemanager", - gax.ClientVersion: getVersionClient(), - gax.ClientArtifact: "cloud.google.com/go/resourcemanager/apiv3", - gax.RPCSystem: "grpc", - gax.URLDomain: "cloudresourcemanager.googleapis.com", - }), - ) - - client.CallOptions.ListTagKeys = append(client.CallOptions.ListTagKeys, gax.WithClientMetrics(metrics)) - client.CallOptions.GetTagKey = append(client.CallOptions.GetTagKey, gax.WithClientMetrics(metrics)) - client.CallOptions.GetNamespacedTagKey = append(client.CallOptions.GetNamespacedTagKey, gax.WithClientMetrics(metrics)) - client.CallOptions.CreateTagKey = append(client.CallOptions.CreateTagKey, gax.WithClientMetrics(metrics)) - client.CallOptions.UpdateTagKey = append(client.CallOptions.UpdateTagKey, gax.WithClientMetrics(metrics)) - client.CallOptions.DeleteTagKey = append(client.CallOptions.DeleteTagKey, gax.WithClientMetrics(metrics)) - client.CallOptions.GetIamPolicy = append(client.CallOptions.GetIamPolicy, gax.WithClientMetrics(metrics)) - client.CallOptions.SetIamPolicy = append(client.CallOptions.SetIamPolicy, gax.WithClientMetrics(metrics)) - client.CallOptions.TestIamPermissions = append(client.CallOptions.TestIamPermissions, gax.WithClientMetrics(metrics)) - client.CallOptions.GetOperation = append(client.CallOptions.GetOperation, gax.WithClientMetrics(metrics)) - } - - client.internalClient = c - - client.LROClient, err = lroauto.NewOperationsClient(ctx, gtransport.WithConnPool(connPool)) - if err != nil { - // This error "should not happen", since we are just reusing old connection pool - // and never actually need to dial. - // If this does happen, we could leak connp. However, we cannot close conn: - // If the user invoked the constructor with option.WithGRPCConn, - // we would close a connection that's still in use. - // TODO: investigate error conditions. - return nil, err - } - c.LROClient = &client.LROClient - return &client, nil -} - -// Connection returns a connection to the API service. -// -// Deprecated: Connections are now pooled so this method does not always -// return the same resource. -func (c *tagKeysGRPCClient) Connection() *grpc.ClientConn { - return c.connPool.Conn() -} - -// setGoogleClientInfo sets the name and version of the application in -// the `x-goog-api-client` header passed on each request. Intended for -// use by Google-written clients. -func (c *tagKeysGRPCClient) setGoogleClientInfo(keyval ...string) { - kv := append([]string{"gl-go", gax.GoVersion}, keyval...) - kv = append(kv, "gapic", getVersionClient(), "gax", gax.Version, "grpc", grpc.Version, "pb", protoVersion) - c.xGoogHeaders = []string{ - "x-goog-api-client", gax.XGoogHeader(kv...), - } -} - -// Close closes the connection to the API service. The user should invoke this when -// the client is no longer required. -func (c *tagKeysGRPCClient) Close() error { - return c.connPool.Close() -} - -// Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. -type tagKeysRESTClient struct { - // The http endpoint to connect to. - endpoint string - - // The http client. - httpClient *http.Client - - // LROClient is used internally to handle long-running operations. - // It is exposed so that its CallOptions can be modified if required. - // Users should not Close this client. - LROClient **lroauto.OperationsClient - - // The x-goog-* headers to be sent with each request. - xGoogHeaders []string - - // Points back to the CallOptions field of the containing TagKeysClient - CallOptions **TagKeysCallOptions - - logger *slog.Logger -} - -// NewTagKeysRESTClient creates a new tag keys rest client. -// -// Allow users to create and manage tag keys. -func NewTagKeysRESTClient(ctx context.Context, opts ...option.ClientOption) (*TagKeysClient, error) { - clientOpts := append(defaultTagKeysRESTClientOptions(), opts...) - if gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - clientOpts = append(clientOpts, internaloption.WithTelemetryAttributes(map[string]string{ - "gcp.client.service": "cloudresourcemanager", - "gcp.client.version": getVersionClient(), - "gcp.client.repo": "googleapis/google-cloud-go", - "gcp.client.artifact": "cloud.google.com/go/resourcemanager/apiv3", - "gcp.client.language": "go", - "url.domain": "cloudresourcemanager.googleapis.com", - })) - } - httpClient, endpoint, err := httptransport.NewClient(ctx, clientOpts...) - if err != nil { - return nil, err - } - - callOpts := defaultTagKeysRESTCallOptions() - c := &tagKeysRESTClient{ - endpoint: endpoint, - httpClient: httpClient, - CallOptions: &callOpts, - logger: internaloption.GetLogger(opts), - } - c.setGoogleClientInfo() - - if gax.IsFeatureEnabled("METRICS") { - metrics := gax.NewClientMetrics( - gax.WithTelemetryLogger(c.logger), - gax.WithTelemetryAttributes(map[string]string{ - gax.ClientService: "cloudresourcemanager", - gax.ClientVersion: getVersionClient(), - gax.ClientArtifact: "cloud.google.com/go/resourcemanager/apiv3", - gax.RPCSystem: "http", - gax.URLDomain: "cloudresourcemanager.googleapis.com", - }), - ) - - callOpts.ListTagKeys = append(callOpts.ListTagKeys, gax.WithClientMetrics(metrics)) - callOpts.GetTagKey = append(callOpts.GetTagKey, gax.WithClientMetrics(metrics)) - callOpts.GetNamespacedTagKey = append(callOpts.GetNamespacedTagKey, gax.WithClientMetrics(metrics)) - callOpts.CreateTagKey = append(callOpts.CreateTagKey, gax.WithClientMetrics(metrics)) - callOpts.UpdateTagKey = append(callOpts.UpdateTagKey, gax.WithClientMetrics(metrics)) - callOpts.DeleteTagKey = append(callOpts.DeleteTagKey, gax.WithClientMetrics(metrics)) - callOpts.GetIamPolicy = append(callOpts.GetIamPolicy, gax.WithClientMetrics(metrics)) - callOpts.SetIamPolicy = append(callOpts.SetIamPolicy, gax.WithClientMetrics(metrics)) - callOpts.TestIamPermissions = append(callOpts.TestIamPermissions, gax.WithClientMetrics(metrics)) - callOpts.GetOperation = append(callOpts.GetOperation, gax.WithClientMetrics(metrics)) - } - - lroOpts := []option.ClientOption{ - option.WithHTTPClient(httpClient), - option.WithEndpoint(endpoint), - } - opClient, err := lroauto.NewOperationsRESTClient(ctx, lroOpts...) - if err != nil { - return nil, err - } - c.LROClient = &opClient - - return &TagKeysClient{internalClient: c, CallOptions: callOpts}, nil -} - -func defaultTagKeysRESTClientOptions() []option.ClientOption { - return []option.ClientOption{ - internaloption.WithDefaultEndpoint("https://cloudresourcemanager.googleapis.com"), - internaloption.WithDefaultEndpointTemplate("https://cloudresourcemanager.UNIVERSE_DOMAIN"), - internaloption.WithDefaultMTLSEndpoint("https://cloudresourcemanager.mtls.googleapis.com"), - internaloption.WithDefaultUniverseDomain("googleapis.com"), - internaloption.WithDefaultAudience("https://cloudresourcemanager.googleapis.com/"), - internaloption.WithDefaultScopes(DefaultAuthScopes()...), - internaloption.EnableNewAuthLibrary(), - } -} - -// setGoogleClientInfo sets the name and version of the application in -// the `x-goog-api-client` header passed on each request. Intended for -// use by Google-written clients. -func (c *tagKeysRESTClient) setGoogleClientInfo(keyval ...string) { - kv := append([]string{"gl-go", gax.GoVersion}, keyval...) - kv = append(kv, "gapic", getVersionClient(), "gax", gax.Version, "rest", "UNKNOWN", "pb", protoVersion) - c.xGoogHeaders = []string{ - "x-goog-api-client", gax.XGoogHeader(kv...), - } -} - -// Close closes the connection to the API service. The user should invoke this when -// the client is no longer required. -func (c *tagKeysRESTClient) Close() error { - // Replace httpClient with nil to force cleanup. - c.httpClient = nil - return nil -} - -// Connection returns a connection to the API service. -// -// Deprecated: This method always returns nil. -func (c *tagKeysRESTClient) Connection() *grpc.ClientConn { - return nil -} -func (c *tagKeysGRPCClient) ListTagKeys(ctx context.Context, req *resourcemanagerpb.ListTagKeysRequest, opts ...gax.CallOption) *TagKeyIterator { - ctx = gax.InsertMetadataIntoOutgoingContext(ctx, c.xGoogHeaders...) - if gax.IsFeatureEnabled("METRICS") || gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "rpc_method", "google.cloud.resourcemanager.v3.TagKeys/ListTagKeys") - } - opts = append((*c.CallOptions).ListTagKeys[0:len((*c.CallOptions).ListTagKeys):len((*c.CallOptions).ListTagKeys)], opts...) - it := &TagKeyIterator{} - req = proto.Clone(req).(*resourcemanagerpb.ListTagKeysRequest) - it.InternalFetch = func(pageSize int, pageToken string) ([]*resourcemanagerpb.TagKey, string, error) { - resp := &resourcemanagerpb.ListTagKeysResponse{} - if pageToken != "" { - req.PageToken = pageToken - } - if pageSize > math.MaxInt32 { - req.PageSize = math.MaxInt32 - } else if pageSize != 0 { - req.PageSize = int32(pageSize) - } - err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - var err error - resp, err = executeRPC(ctx, c.tagKeysClient.ListTagKeys, req, settings.GRPC, c.logger, "ListTagKeys") - return err - }, opts...) - if err != nil { - return nil, "", err - } - - it.Response = resp - return resp.GetTagKeys(), resp.GetNextPageToken(), nil - } - fetch := func(pageSize int, pageToken string) (string, error) { - items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) - if err != nil { - return "", err - } - it.items = append(it.items, items...) - return nextPageToken, nil - } - - it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) - it.pageInfo.MaxSize = int(req.GetPageSize()) - it.pageInfo.Token = req.GetPageToken() - - return it -} - -func (c *tagKeysGRPCClient) GetTagKey(ctx context.Context, req *resourcemanagerpb.GetTagKeyRequest, opts ...gax.CallOption) (*resourcemanagerpb.TagKey, error) { - hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))} - - hds = append(c.xGoogHeaders, hds...) - ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) - if gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "resource_name", fmt.Sprintf("//cloudresourcemanager.googleapis.com/%v", req.GetName())) - } - if gax.IsFeatureEnabled("METRICS") || gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "rpc_method", "google.cloud.resourcemanager.v3.TagKeys/GetTagKey") - } - opts = append((*c.CallOptions).GetTagKey[0:len((*c.CallOptions).GetTagKey):len((*c.CallOptions).GetTagKey)], opts...) - var resp *resourcemanagerpb.TagKey - err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - var err error - resp, err = executeRPC(ctx, c.tagKeysClient.GetTagKey, req, settings.GRPC, c.logger, "GetTagKey") - return err - }, opts...) - if err != nil { - return nil, err - } - return resp, nil -} - -func (c *tagKeysGRPCClient) GetNamespacedTagKey(ctx context.Context, req *resourcemanagerpb.GetNamespacedTagKeyRequest, opts ...gax.CallOption) (*resourcemanagerpb.TagKey, error) { - ctx = gax.InsertMetadataIntoOutgoingContext(ctx, c.xGoogHeaders...) - if gax.IsFeatureEnabled("METRICS") || gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "rpc_method", "google.cloud.resourcemanager.v3.TagKeys/GetNamespacedTagKey") - } - opts = append((*c.CallOptions).GetNamespacedTagKey[0:len((*c.CallOptions).GetNamespacedTagKey):len((*c.CallOptions).GetNamespacedTagKey)], opts...) - var resp *resourcemanagerpb.TagKey - err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - var err error - resp, err = executeRPC(ctx, c.tagKeysClient.GetNamespacedTagKey, req, settings.GRPC, c.logger, "GetNamespacedTagKey") - return err - }, opts...) - if err != nil { - return nil, err - } - return resp, nil -} - -func (c *tagKeysGRPCClient) CreateTagKey(ctx context.Context, req *resourcemanagerpb.CreateTagKeyRequest, opts ...gax.CallOption) (*CreateTagKeyOperation, error) { - ctx = gax.InsertMetadataIntoOutgoingContext(ctx, c.xGoogHeaders...) - if gax.IsFeatureEnabled("METRICS") || gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "rpc_method", "google.cloud.resourcemanager.v3.TagKeys/CreateTagKey") - } - opts = append((*c.CallOptions).CreateTagKey[0:len((*c.CallOptions).CreateTagKey):len((*c.CallOptions).CreateTagKey)], opts...) - var resp *longrunningpb.Operation - err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - var err error - resp, err = executeRPC(ctx, c.tagKeysClient.CreateTagKey, req, settings.GRPC, c.logger, "CreateTagKey") - return err - }, opts...) - if err != nil { - return nil, err - } - return &CreateTagKeyOperation{ - lro: longrunning.InternalNewOperation(*c.LROClient, resp), - }, nil -} - -func (c *tagKeysGRPCClient) UpdateTagKey(ctx context.Context, req *resourcemanagerpb.UpdateTagKeyRequest, opts ...gax.CallOption) (*UpdateTagKeyOperation, error) { - hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "tag_key.name", url.QueryEscape(req.GetTagKey().GetName()))} - - hds = append(c.xGoogHeaders, hds...) - ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) - if gax.IsFeatureEnabled("METRICS") || gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "rpc_method", "google.cloud.resourcemanager.v3.TagKeys/UpdateTagKey") - } - opts = append((*c.CallOptions).UpdateTagKey[0:len((*c.CallOptions).UpdateTagKey):len((*c.CallOptions).UpdateTagKey)], opts...) - var resp *longrunningpb.Operation - err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - var err error - resp, err = executeRPC(ctx, c.tagKeysClient.UpdateTagKey, req, settings.GRPC, c.logger, "UpdateTagKey") - return err - }, opts...) - if err != nil { - return nil, err - } - return &UpdateTagKeyOperation{ - lro: longrunning.InternalNewOperation(*c.LROClient, resp), - }, nil -} - -func (c *tagKeysGRPCClient) DeleteTagKey(ctx context.Context, req *resourcemanagerpb.DeleteTagKeyRequest, opts ...gax.CallOption) (*DeleteTagKeyOperation, error) { - hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))} - - hds = append(c.xGoogHeaders, hds...) - ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) - if gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "resource_name", fmt.Sprintf("//cloudresourcemanager.googleapis.com/%v", req.GetName())) - } - if gax.IsFeatureEnabled("METRICS") || gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "rpc_method", "google.cloud.resourcemanager.v3.TagKeys/DeleteTagKey") - } - opts = append((*c.CallOptions).DeleteTagKey[0:len((*c.CallOptions).DeleteTagKey):len((*c.CallOptions).DeleteTagKey)], opts...) - var resp *longrunningpb.Operation - err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - var err error - resp, err = executeRPC(ctx, c.tagKeysClient.DeleteTagKey, req, settings.GRPC, c.logger, "DeleteTagKey") - return err - }, opts...) - if err != nil { - return nil, err - } - return &DeleteTagKeyOperation{ - lro: longrunning.InternalNewOperation(*c.LROClient, resp), - }, nil -} - -func (c *tagKeysGRPCClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error) { - hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "resource", url.QueryEscape(req.GetResource()))} - - hds = append(c.xGoogHeaders, hds...) - ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) - if gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "resource_name", fmt.Sprintf("//cloudresourcemanager.googleapis.com/%v", req.GetResource())) - } - if gax.IsFeatureEnabled("METRICS") || gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "rpc_method", "google.cloud.resourcemanager.v3.TagKeys/GetIamPolicy") - } - opts = append((*c.CallOptions).GetIamPolicy[0:len((*c.CallOptions).GetIamPolicy):len((*c.CallOptions).GetIamPolicy)], opts...) - var resp *iampb.Policy - err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - var err error - resp, err = executeRPC(ctx, c.tagKeysClient.GetIamPolicy, req, settings.GRPC, c.logger, "GetIamPolicy") - return err - }, opts...) - if err != nil { - return nil, err - } - return resp, nil -} - -func (c *tagKeysGRPCClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error) { - hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "resource", url.QueryEscape(req.GetResource()))} - - hds = append(c.xGoogHeaders, hds...) - ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) - if gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "resource_name", fmt.Sprintf("//cloudresourcemanager.googleapis.com/%v", req.GetResource())) - } - if gax.IsFeatureEnabled("METRICS") || gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "rpc_method", "google.cloud.resourcemanager.v3.TagKeys/SetIamPolicy") - } - opts = append((*c.CallOptions).SetIamPolicy[0:len((*c.CallOptions).SetIamPolicy):len((*c.CallOptions).SetIamPolicy)], opts...) - var resp *iampb.Policy - err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - var err error - resp, err = executeRPC(ctx, c.tagKeysClient.SetIamPolicy, req, settings.GRPC, c.logger, "SetIamPolicy") - return err - }, opts...) - if err != nil { - return nil, err - } - return resp, nil -} - -func (c *tagKeysGRPCClient) TestIamPermissions(ctx context.Context, req *iampb.TestIamPermissionsRequest, opts ...gax.CallOption) (*iampb.TestIamPermissionsResponse, error) { - hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "resource", url.QueryEscape(req.GetResource()))} - - hds = append(c.xGoogHeaders, hds...) - ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) - if gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "resource_name", fmt.Sprintf("//cloudresourcemanager.googleapis.com/%v", req.GetResource())) - } - if gax.IsFeatureEnabled("METRICS") || gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "rpc_method", "google.cloud.resourcemanager.v3.TagKeys/TestIamPermissions") - } - opts = append((*c.CallOptions).TestIamPermissions[0:len((*c.CallOptions).TestIamPermissions):len((*c.CallOptions).TestIamPermissions)], opts...) - var resp *iampb.TestIamPermissionsResponse - err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - var err error - resp, err = executeRPC(ctx, c.tagKeysClient.TestIamPermissions, req, settings.GRPC, c.logger, "TestIamPermissions") - return err - }, opts...) - if err != nil { - return nil, err - } - return resp, nil -} - -func (c *tagKeysGRPCClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { - hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))} - - hds = append(c.xGoogHeaders, hds...) - ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) - if gax.IsFeatureEnabled("METRICS") || gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "rpc_method", "google.longrunning.Operations/GetOperation") - } - opts = append((*c.CallOptions).GetOperation[0:len((*c.CallOptions).GetOperation):len((*c.CallOptions).GetOperation)], opts...) - var resp *longrunningpb.Operation - err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - var err error - resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") - return err - }, opts...) - if err != nil { - return nil, err - } - return resp, nil -} - -// ListTagKeys lists all TagKeys for a parent resource. -func (c *tagKeysRESTClient) ListTagKeys(ctx context.Context, req *resourcemanagerpb.ListTagKeysRequest, opts ...gax.CallOption) *TagKeyIterator { - it := &TagKeyIterator{} - req = proto.Clone(req).(*resourcemanagerpb.ListTagKeysRequest) - unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} - it.InternalFetch = func(pageSize int, pageToken string) ([]*resourcemanagerpb.TagKey, string, error) { - resp := &resourcemanagerpb.ListTagKeysResponse{} - if pageToken != "" { - req.PageToken = pageToken - } - if pageSize > math.MaxInt32 { - req.PageSize = math.MaxInt32 - } else if pageSize != 0 { - req.PageSize = int32(pageSize) - } - baseUrl, err := url.Parse(c.endpoint) - if err != nil { - return nil, "", err - } - baseUrl.Path += fmt.Sprintf("/v3/tagKeys") - - params := url.Values{} - params.Add("$alt", "json;enum-encoding=int") - if req.GetPageSize() != 0 { - params.Add("pageSize", fmt.Sprintf("%v", req.GetPageSize())) - } - if req.GetPageToken() != "" { - params.Add("pageToken", fmt.Sprintf("%v", req.GetPageToken())) - } - params.Add("parent", fmt.Sprintf("%v", req.GetParent())) - - baseUrl.RawQuery = params.Encode() - - // Build HTTP headers from client and context metadata. - hds := append(c.xGoogHeaders, "Content-Type", "application/json") - headers := gax.BuildHeaders(ctx, hds...) - e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - if settings.Path != "" { - baseUrl.Path = settings.Path - } - httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) - if err != nil { - return err - } - httpReq.Header = headers - - buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListTagKeys") - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { - return err - } - - return nil - }, opts...) - if e != nil { - return nil, "", e - } - it.Response = resp - return resp.GetTagKeys(), resp.GetNextPageToken(), nil - } - - fetch := func(pageSize int, pageToken string) (string, error) { - items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) - if err != nil { - return "", err - } - it.items = append(it.items, items...) - return nextPageToken, nil - } - - it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) - it.pageInfo.MaxSize = int(req.GetPageSize()) - it.pageInfo.Token = req.GetPageToken() - - return it -} - -// GetTagKey retrieves a TagKey. This method will return PERMISSION_DENIED if the -// key does not exist or the user does not have permission to view it. -func (c *tagKeysRESTClient) GetTagKey(ctx context.Context, req *resourcemanagerpb.GetTagKeyRequest, opts ...gax.CallOption) (*resourcemanagerpb.TagKey, error) { - baseUrl, err := url.Parse(c.endpoint) - if err != nil { - return nil, err - } - baseUrl.Path += fmt.Sprintf("/v3/%v", req.GetName()) - - params := url.Values{} - params.Add("$alt", "json;enum-encoding=int") - - baseUrl.RawQuery = params.Encode() - - // Build HTTP headers from client and context metadata. - hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))} - - hds = append(c.xGoogHeaders, hds...) - hds = append(hds, "Content-Type", "application/json") - headers := gax.BuildHeaders(ctx, hds...) - if gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "resource_name", fmt.Sprintf("//cloudresourcemanager.googleapis.com/%v", req.GetName())) - } - if gax.IsFeatureEnabled("METRICS") || gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "rpc_method", "google.cloud.resourcemanager.v3.TagKeys/GetTagKey") - ctx = callctx.WithTelemetryContext(ctx, "url_template", "/v3/{name=tagKeys/*}") - } - opts = append((*c.CallOptions).GetTagKey[0:len((*c.CallOptions).GetTagKey):len((*c.CallOptions).GetTagKey)], opts...) - unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} - resp := &resourcemanagerpb.TagKey{} - e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - if settings.Path != "" { - baseUrl.Path = settings.Path - } - httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) - if err != nil { - return err - } - httpReq = httpReq.WithContext(ctx) - httpReq.Header = headers - - buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetTagKey") - if err != nil { - return err - } - - if err := unm.Unmarshal(buf, resp); err != nil { - return err - } - - return nil - }, opts...) - if e != nil { - return nil, e - } - return resp, nil -} - -// GetNamespacedTagKey retrieves a TagKey by its namespaced name. -// This method will return PERMISSION_DENIED if the key does not exist -// or the user does not have permission to view it. -func (c *tagKeysRESTClient) GetNamespacedTagKey(ctx context.Context, req *resourcemanagerpb.GetNamespacedTagKeyRequest, opts ...gax.CallOption) (*resourcemanagerpb.TagKey, error) { - baseUrl, err := url.Parse(c.endpoint) - if err != nil { - return nil, err - } - baseUrl.Path += fmt.Sprintf("/v3/tagKeys/namespaced") - - params := url.Values{} - params.Add("$alt", "json;enum-encoding=int") - params.Add("name", fmt.Sprintf("%v", req.GetName())) - - baseUrl.RawQuery = params.Encode() - - // Build HTTP headers from client and context metadata. - hds := append(c.xGoogHeaders, "Content-Type", "application/json") - headers := gax.BuildHeaders(ctx, hds...) - if gax.IsFeatureEnabled("METRICS") || gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "rpc_method", "google.cloud.resourcemanager.v3.TagKeys/GetNamespacedTagKey") - ctx = callctx.WithTelemetryContext(ctx, "url_template", "/v3/tagKeys/namespaced") - } - opts = append((*c.CallOptions).GetNamespacedTagKey[0:len((*c.CallOptions).GetNamespacedTagKey):len((*c.CallOptions).GetNamespacedTagKey)], opts...) - unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} - resp := &resourcemanagerpb.TagKey{} - e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - if settings.Path != "" { - baseUrl.Path = settings.Path - } - httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) - if err != nil { - return err - } - httpReq = httpReq.WithContext(ctx) - httpReq.Header = headers - - buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetNamespacedTagKey") - if err != nil { - return err - } - - if err := unm.Unmarshal(buf, resp); err != nil { - return err - } - - return nil - }, opts...) - if e != nil { - return nil, e - } - return resp, nil -} - -// CreateTagKey creates a new TagKey. If another request with the same parameters is -// sent while the original request is in process, the second request -// will receive an error. A maximum of 1000 TagKeys can exist under a parent -// at any given time. -func (c *tagKeysRESTClient) CreateTagKey(ctx context.Context, req *resourcemanagerpb.CreateTagKeyRequest, opts ...gax.CallOption) (*CreateTagKeyOperation, error) { - m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} - body := req.GetTagKey() - jsonReq, err := m.Marshal(body) - if err != nil { - return nil, err - } - - baseUrl, err := url.Parse(c.endpoint) - if err != nil { - return nil, err - } - baseUrl.Path += fmt.Sprintf("/v3/tagKeys") - - params := url.Values{} - params.Add("$alt", "json;enum-encoding=int") - if req.GetValidateOnly() { - params.Add("validateOnly", fmt.Sprintf("%v", req.GetValidateOnly())) - } - - baseUrl.RawQuery = params.Encode() - - // Build HTTP headers from client and context metadata. - hds := append(c.xGoogHeaders, "Content-Type", "application/json") - headers := gax.BuildHeaders(ctx, hds...) - if gax.IsFeatureEnabled("METRICS") || gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "rpc_method", "google.cloud.resourcemanager.v3.TagKeys/CreateTagKey") - ctx = callctx.WithTelemetryContext(ctx, "url_template", "/v3/tagKeys") - } - unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} - resp := &longrunningpb.Operation{} - e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - if settings.Path != "" { - baseUrl.Path = settings.Path - } - httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) - if err != nil { - return err - } - httpReq = httpReq.WithContext(ctx) - httpReq.Header = headers - - buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateTagKey") - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { - return err - } - - return nil - }, opts...) - if e != nil { - return nil, e - } - - override := fmt.Sprintf("/v3/%s", resp.GetName()) - return &CreateTagKeyOperation{ - lro: longrunning.InternalNewOperation(*c.LROClient, resp), - pollPath: override, - }, nil -} - -// UpdateTagKey updates the attributes of the TagKey resource. -func (c *tagKeysRESTClient) UpdateTagKey(ctx context.Context, req *resourcemanagerpb.UpdateTagKeyRequest, opts ...gax.CallOption) (*UpdateTagKeyOperation, error) { - m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} - body := req.GetTagKey() - jsonReq, err := m.Marshal(body) - if err != nil { - return nil, err - } - - baseUrl, err := url.Parse(c.endpoint) - if err != nil { - return nil, err - } - baseUrl.Path += fmt.Sprintf("/v3/%v", req.GetTagKey().GetName()) - - params := url.Values{} - params.Add("$alt", "json;enum-encoding=int") - if req.GetUpdateMask() != nil { - field, err := protojson.Marshal(req.GetUpdateMask()) - if err != nil { - return nil, err - } - params.Add("updateMask", string(field[1:len(field)-1])) - } - if req.GetValidateOnly() { - params.Add("validateOnly", fmt.Sprintf("%v", req.GetValidateOnly())) - } - - baseUrl.RawQuery = params.Encode() - - // Build HTTP headers from client and context metadata. - hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "tag_key.name", url.QueryEscape(req.GetTagKey().GetName()))} - - hds = append(c.xGoogHeaders, hds...) - hds = append(hds, "Content-Type", "application/json") - headers := gax.BuildHeaders(ctx, hds...) - if gax.IsFeatureEnabled("METRICS") || gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "rpc_method", "google.cloud.resourcemanager.v3.TagKeys/UpdateTagKey") - ctx = callctx.WithTelemetryContext(ctx, "url_template", "/v3/{tag_key.name=tagKeys/*}") - } - unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} - resp := &longrunningpb.Operation{} - e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - if settings.Path != "" { - baseUrl.Path = settings.Path - } - httpReq, err := http.NewRequest("PATCH", baseUrl.String(), bytes.NewReader(jsonReq)) - if err != nil { - return err - } - httpReq = httpReq.WithContext(ctx) - httpReq.Header = headers - - buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateTagKey") - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { - return err - } - - return nil - }, opts...) - if e != nil { - return nil, e - } - - override := fmt.Sprintf("/v3/%s", resp.GetName()) - return &UpdateTagKeyOperation{ - lro: longrunning.InternalNewOperation(*c.LROClient, resp), - pollPath: override, - }, nil -} - -// DeleteTagKey deletes a TagKey. The TagKey cannot be deleted if it has any child -// TagValues. -func (c *tagKeysRESTClient) DeleteTagKey(ctx context.Context, req *resourcemanagerpb.DeleteTagKeyRequest, opts ...gax.CallOption) (*DeleteTagKeyOperation, error) { - baseUrl, err := url.Parse(c.endpoint) - if err != nil { - return nil, err - } - baseUrl.Path += fmt.Sprintf("/v3/%v", req.GetName()) - - params := url.Values{} - params.Add("$alt", "json;enum-encoding=int") - if req.GetEtag() != "" { - params.Add("etag", fmt.Sprintf("%v", req.GetEtag())) - } - if req.GetValidateOnly() { - params.Add("validateOnly", fmt.Sprintf("%v", req.GetValidateOnly())) - } - - baseUrl.RawQuery = params.Encode() - - // Build HTTP headers from client and context metadata. - hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))} - - hds = append(c.xGoogHeaders, hds...) - hds = append(hds, "Content-Type", "application/json") - headers := gax.BuildHeaders(ctx, hds...) - if gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "resource_name", fmt.Sprintf("//cloudresourcemanager.googleapis.com/%v", req.GetName())) - } - if gax.IsFeatureEnabled("METRICS") || gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "rpc_method", "google.cloud.resourcemanager.v3.TagKeys/DeleteTagKey") - ctx = callctx.WithTelemetryContext(ctx, "url_template", "/v3/{name=tagKeys/*}") - } - unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} - resp := &longrunningpb.Operation{} - e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - if settings.Path != "" { - baseUrl.Path = settings.Path - } - httpReq, err := http.NewRequest("DELETE", baseUrl.String(), nil) - if err != nil { - return err - } - httpReq = httpReq.WithContext(ctx) - httpReq.Header = headers - - buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteTagKey") - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { - return err - } - - return nil - }, opts...) - if e != nil { - return nil, e - } - - override := fmt.Sprintf("/v3/%s", resp.GetName()) - return &DeleteTagKeyOperation{ - lro: longrunning.InternalNewOperation(*c.LROClient, resp), - pollPath: override, - }, nil -} - -// GetIamPolicy gets the access control policy for a TagKey. The returned policy may be -// empty if no such policy or resource exists. The resource field should -// be the TagKey’s resource name. For example, “tagKeys/1234”. -// The caller must have -// cloudresourcemanager.googleapis.com/tagKeys.getIamPolicy permission on -// the specified TagKey. -func (c *tagKeysRESTClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error) { - m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} - jsonReq, err := m.Marshal(req) - if err != nil { - return nil, err - } - - baseUrl, err := url.Parse(c.endpoint) - if err != nil { - return nil, err - } - baseUrl.Path += fmt.Sprintf("/v3/%v:getIamPolicy", req.GetResource()) - - params := url.Values{} - params.Add("$alt", "json;enum-encoding=int") - - baseUrl.RawQuery = params.Encode() - - // Build HTTP headers from client and context metadata. - hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "resource", url.QueryEscape(req.GetResource()))} - - hds = append(c.xGoogHeaders, hds...) - hds = append(hds, "Content-Type", "application/json") - headers := gax.BuildHeaders(ctx, hds...) - if gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "resource_name", fmt.Sprintf("//cloudresourcemanager.googleapis.com/%v", req.GetResource())) - } - if gax.IsFeatureEnabled("METRICS") || gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "rpc_method", "google.cloud.resourcemanager.v3.TagKeys/GetIamPolicy") - ctx = callctx.WithTelemetryContext(ctx, "url_template", "/v3/{resource=tagKeys/*}:getIamPolicy") - } - opts = append((*c.CallOptions).GetIamPolicy[0:len((*c.CallOptions).GetIamPolicy):len((*c.CallOptions).GetIamPolicy)], opts...) - unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} - resp := &iampb.Policy{} - e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - if settings.Path != "" { - baseUrl.Path = settings.Path - } - httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) - if err != nil { - return err - } - httpReq = httpReq.WithContext(ctx) - httpReq.Header = headers - - buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "GetIamPolicy") - if err != nil { - return err - } - - if err := unm.Unmarshal(buf, resp); err != nil { - return err - } - - return nil - }, opts...) - if e != nil { - return nil, e - } - return resp, nil -} - -// SetIamPolicy sets the access control policy on a TagKey, replacing any existing -// policy. The resource field should be the TagKey’s resource name. -// For example, “tagKeys/1234”. -// The caller must have resourcemanager.tagKeys.setIamPolicy permission -// on the identified tagValue. -func (c *tagKeysRESTClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error) { - m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} - jsonReq, err := m.Marshal(req) - if err != nil { - return nil, err - } - - baseUrl, err := url.Parse(c.endpoint) - if err != nil { - return nil, err - } - baseUrl.Path += fmt.Sprintf("/v3/%v:setIamPolicy", req.GetResource()) - - params := url.Values{} - params.Add("$alt", "json;enum-encoding=int") - - baseUrl.RawQuery = params.Encode() - - // Build HTTP headers from client and context metadata. - hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "resource", url.QueryEscape(req.GetResource()))} - - hds = append(c.xGoogHeaders, hds...) - hds = append(hds, "Content-Type", "application/json") - headers := gax.BuildHeaders(ctx, hds...) - if gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "resource_name", fmt.Sprintf("//cloudresourcemanager.googleapis.com/%v", req.GetResource())) - } - if gax.IsFeatureEnabled("METRICS") || gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "rpc_method", "google.cloud.resourcemanager.v3.TagKeys/SetIamPolicy") - ctx = callctx.WithTelemetryContext(ctx, "url_template", "/v3/{resource=tagKeys/*}:setIamPolicy") - } - opts = append((*c.CallOptions).SetIamPolicy[0:len((*c.CallOptions).SetIamPolicy):len((*c.CallOptions).SetIamPolicy)], opts...) - unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} - resp := &iampb.Policy{} - e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - if settings.Path != "" { - baseUrl.Path = settings.Path - } - httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) - if err != nil { - return err - } - httpReq = httpReq.WithContext(ctx) - httpReq.Header = headers - - buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetIamPolicy") - if err != nil { - return err - } - - if err := unm.Unmarshal(buf, resp); err != nil { - return err - } - - return nil - }, opts...) - if e != nil { - return nil, e - } - return resp, nil -} - -// TestIamPermissions returns permissions that a caller has on the specified TagKey. -// The resource field should be the TagKey’s resource name. -// For example, “tagKeys/1234”. -// -// There are no permissions required for making this API call. -func (c *tagKeysRESTClient) TestIamPermissions(ctx context.Context, req *iampb.TestIamPermissionsRequest, opts ...gax.CallOption) (*iampb.TestIamPermissionsResponse, error) { - m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} - jsonReq, err := m.Marshal(req) - if err != nil { - return nil, err - } - - baseUrl, err := url.Parse(c.endpoint) - if err != nil { - return nil, err - } - baseUrl.Path += fmt.Sprintf("/v3/%v:testIamPermissions", req.GetResource()) - - params := url.Values{} - params.Add("$alt", "json;enum-encoding=int") - - baseUrl.RawQuery = params.Encode() - - // Build HTTP headers from client and context metadata. - hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "resource", url.QueryEscape(req.GetResource()))} - - hds = append(c.xGoogHeaders, hds...) - hds = append(hds, "Content-Type", "application/json") - headers := gax.BuildHeaders(ctx, hds...) - if gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "resource_name", fmt.Sprintf("//cloudresourcemanager.googleapis.com/%v", req.GetResource())) - } - if gax.IsFeatureEnabled("METRICS") || gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "rpc_method", "google.cloud.resourcemanager.v3.TagKeys/TestIamPermissions") - ctx = callctx.WithTelemetryContext(ctx, "url_template", "/v3/{resource=tagKeys/*}:testIamPermissions") - } - opts = append((*c.CallOptions).TestIamPermissions[0:len((*c.CallOptions).TestIamPermissions):len((*c.CallOptions).TestIamPermissions)], opts...) - unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} - resp := &iampb.TestIamPermissionsResponse{} - e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - if settings.Path != "" { - baseUrl.Path = settings.Path - } - httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) - if err != nil { - return err - } - httpReq = httpReq.WithContext(ctx) - httpReq.Header = headers - - buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "TestIamPermissions") - if err != nil { - return err - } - - if err := unm.Unmarshal(buf, resp); err != nil { - return err - } - - return nil - }, opts...) - if e != nil { - return nil, e - } - return resp, nil -} - -// GetOperation is a utility method from google.longrunning.Operations. -func (c *tagKeysRESTClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { - baseUrl, err := url.Parse(c.endpoint) - if err != nil { - return nil, err - } - baseUrl.Path += fmt.Sprintf("/v3/%v", req.GetName()) - - params := url.Values{} - params.Add("$alt", "json;enum-encoding=int") - - baseUrl.RawQuery = params.Encode() - - // Build HTTP headers from client and context metadata. - hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))} - - hds = append(c.xGoogHeaders, hds...) - hds = append(hds, "Content-Type", "application/json") - headers := gax.BuildHeaders(ctx, hds...) - if gax.IsFeatureEnabled("METRICS") || gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "rpc_method", "google.longrunning.Operations/GetOperation") - ctx = callctx.WithTelemetryContext(ctx, "url_template", "/v3/{name=operations/**}") - } - opts = append((*c.CallOptions).GetOperation[0:len((*c.CallOptions).GetOperation):len((*c.CallOptions).GetOperation)], opts...) - unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} - resp := &longrunningpb.Operation{} - e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - if settings.Path != "" { - baseUrl.Path = settings.Path - } - httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) - if err != nil { - return err - } - httpReq = httpReq.WithContext(ctx) - httpReq.Header = headers - - buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") - if err != nil { - return err - } - - if err := unm.Unmarshal(buf, resp); err != nil { - return err - } - - return nil - }, opts...) - if e != nil { - return nil, e - } - return resp, nil -} - -// CreateTagKeyOperation returns a new CreateTagKeyOperation from a given name. -// The name must be that of a previously created CreateTagKeyOperation, possibly from a different process. -func (c *tagKeysGRPCClient) CreateTagKeyOperation(name string) *CreateTagKeyOperation { - return &CreateTagKeyOperation{ - lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), - } -} - -// CreateTagKeyOperation returns a new CreateTagKeyOperation from a given name. -// The name must be that of a previously created CreateTagKeyOperation, possibly from a different process. -func (c *tagKeysRESTClient) CreateTagKeyOperation(name string) *CreateTagKeyOperation { - override := fmt.Sprintf("/v3/%s", name) - return &CreateTagKeyOperation{ - lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), - pollPath: override, - } -} - -// DeleteTagKeyOperation returns a new DeleteTagKeyOperation from a given name. -// The name must be that of a previously created DeleteTagKeyOperation, possibly from a different process. -func (c *tagKeysGRPCClient) DeleteTagKeyOperation(name string) *DeleteTagKeyOperation { - return &DeleteTagKeyOperation{ - lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), - } -} - -// DeleteTagKeyOperation returns a new DeleteTagKeyOperation from a given name. -// The name must be that of a previously created DeleteTagKeyOperation, possibly from a different process. -func (c *tagKeysRESTClient) DeleteTagKeyOperation(name string) *DeleteTagKeyOperation { - override := fmt.Sprintf("/v3/%s", name) - return &DeleteTagKeyOperation{ - lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), - pollPath: override, - } -} - -// UpdateTagKeyOperation returns a new UpdateTagKeyOperation from a given name. -// The name must be that of a previously created UpdateTagKeyOperation, possibly from a different process. -func (c *tagKeysGRPCClient) UpdateTagKeyOperation(name string) *UpdateTagKeyOperation { - return &UpdateTagKeyOperation{ - lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), - } -} - -// UpdateTagKeyOperation returns a new UpdateTagKeyOperation from a given name. -// The name must be that of a previously created UpdateTagKeyOperation, possibly from a different process. -func (c *tagKeysRESTClient) UpdateTagKeyOperation(name string) *UpdateTagKeyOperation { - override := fmt.Sprintf("/v3/%s", name) - return &UpdateTagKeyOperation{ - lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), - pollPath: override, - } -} diff --git a/vendor/cloud.google.com/go/resourcemanager/apiv3/tag_values_client.go b/vendor/cloud.google.com/go/resourcemanager/apiv3/tag_values_client.go deleted file mode 100644 index a4bba75a26..0000000000 --- a/vendor/cloud.google.com/go/resourcemanager/apiv3/tag_values_client.go +++ /dev/null @@ -1,1547 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Code generated by protoc-gen-go_gapic. DO NOT EDIT. - -package resourcemanager - -import ( - "bytes" - "context" - "fmt" - "log/slog" - "math" - "net/http" - "net/url" - "time" - - iampb "cloud.google.com/go/iam/apiv1/iampb" - "cloud.google.com/go/longrunning" - lroauto "cloud.google.com/go/longrunning/autogen" - longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" - resourcemanagerpb "cloud.google.com/go/resourcemanager/apiv3/resourcemanagerpb" - gax "github.com/googleapis/gax-go/v2" - "github.com/googleapis/gax-go/v2/callctx" - "google.golang.org/api/iterator" - "google.golang.org/api/option" - "google.golang.org/api/option/internaloption" - gtransport "google.golang.org/api/transport/grpc" - httptransport "google.golang.org/api/transport/http" - "google.golang.org/grpc" - "google.golang.org/grpc/codes" - "google.golang.org/protobuf/encoding/protojson" - "google.golang.org/protobuf/proto" -) - -var newTagValuesClientHook clientHook - -// TagValuesCallOptions contains the retry settings for each method of TagValuesClient. -type TagValuesCallOptions struct { - ListTagValues []gax.CallOption - GetTagValue []gax.CallOption - GetNamespacedTagValue []gax.CallOption - CreateTagValue []gax.CallOption - UpdateTagValue []gax.CallOption - DeleteTagValue []gax.CallOption - GetIamPolicy []gax.CallOption - SetIamPolicy []gax.CallOption - TestIamPermissions []gax.CallOption - GetOperation []gax.CallOption -} - -func defaultTagValuesGRPCClientOptions() []option.ClientOption { - return []option.ClientOption{ - internaloption.WithDefaultEndpoint("cloudresourcemanager.googleapis.com:443"), - internaloption.WithDefaultEndpointTemplate("cloudresourcemanager.UNIVERSE_DOMAIN:443"), - internaloption.WithDefaultMTLSEndpoint("cloudresourcemanager.mtls.googleapis.com:443"), - internaloption.WithDefaultUniverseDomain("googleapis.com"), - internaloption.WithDefaultAudience("https://cloudresourcemanager.googleapis.com/"), - internaloption.WithDefaultScopes(DefaultAuthScopes()...), - internaloption.EnableJwtWithScope(), - internaloption.AllowHardBoundTokens("MTLS_S2A"), - internaloption.EnableNewAuthLibrary(), - option.WithGRPCDialOption(grpc.WithDefaultCallOptions( - grpc.MaxCallRecvMsgSize(math.MaxInt32))), - } -} - -func defaultTagValuesCallOptions() *TagValuesCallOptions { - return &TagValuesCallOptions{ - ListTagValues: []gax.CallOption{ - gax.WithTimeout(60000 * time.Millisecond), - gax.WithRetry(func() gax.Retryer { - return gax.OnCodes([]codes.Code{ - codes.Unavailable, - }, gax.Backoff{ - Initial: 100 * time.Millisecond, - Max: 60000 * time.Millisecond, - Multiplier: 1.30, - }) - }), - }, - GetTagValue: []gax.CallOption{ - gax.WithTimeout(60000 * time.Millisecond), - gax.WithRetry(func() gax.Retryer { - return gax.OnCodes([]codes.Code{ - codes.Unavailable, - }, gax.Backoff{ - Initial: 100 * time.Millisecond, - Max: 60000 * time.Millisecond, - Multiplier: 1.30, - }) - }), - }, - GetNamespacedTagValue: []gax.CallOption{}, - CreateTagValue: []gax.CallOption{ - gax.WithTimeout(60000 * time.Millisecond), - }, - UpdateTagValue: []gax.CallOption{ - gax.WithTimeout(60000 * time.Millisecond), - }, - DeleteTagValue: []gax.CallOption{ - gax.WithTimeout(60000 * time.Millisecond), - }, - GetIamPolicy: []gax.CallOption{ - gax.WithTimeout(60000 * time.Millisecond), - gax.WithRetry(func() gax.Retryer { - return gax.OnCodes([]codes.Code{ - codes.Unavailable, - }, gax.Backoff{ - Initial: 100 * time.Millisecond, - Max: 60000 * time.Millisecond, - Multiplier: 1.30, - }) - }), - }, - SetIamPolicy: []gax.CallOption{ - gax.WithTimeout(60000 * time.Millisecond), - }, - TestIamPermissions: []gax.CallOption{}, - GetOperation: []gax.CallOption{}, - } -} - -func defaultTagValuesRESTCallOptions() *TagValuesCallOptions { - return &TagValuesCallOptions{ - ListTagValues: []gax.CallOption{ - gax.WithTimeout(60000 * time.Millisecond), - gax.WithRetry(func() gax.Retryer { - return gax.OnHTTPCodes(gax.Backoff{ - Initial: 100 * time.Millisecond, - Max: 60000 * time.Millisecond, - Multiplier: 1.30, - }, - http.StatusServiceUnavailable) - }), - }, - GetTagValue: []gax.CallOption{ - gax.WithTimeout(60000 * time.Millisecond), - gax.WithRetry(func() gax.Retryer { - return gax.OnHTTPCodes(gax.Backoff{ - Initial: 100 * time.Millisecond, - Max: 60000 * time.Millisecond, - Multiplier: 1.30, - }, - http.StatusServiceUnavailable) - }), - }, - GetNamespacedTagValue: []gax.CallOption{}, - CreateTagValue: []gax.CallOption{ - gax.WithTimeout(60000 * time.Millisecond), - }, - UpdateTagValue: []gax.CallOption{ - gax.WithTimeout(60000 * time.Millisecond), - }, - DeleteTagValue: []gax.CallOption{ - gax.WithTimeout(60000 * time.Millisecond), - }, - GetIamPolicy: []gax.CallOption{ - gax.WithTimeout(60000 * time.Millisecond), - gax.WithRetry(func() gax.Retryer { - return gax.OnHTTPCodes(gax.Backoff{ - Initial: 100 * time.Millisecond, - Max: 60000 * time.Millisecond, - Multiplier: 1.30, - }, - http.StatusServiceUnavailable) - }), - }, - SetIamPolicy: []gax.CallOption{ - gax.WithTimeout(60000 * time.Millisecond), - }, - TestIamPermissions: []gax.CallOption{}, - GetOperation: []gax.CallOption{}, - } -} - -// internalTagValuesClient is an interface that defines the methods available from Cloud Resource Manager API. -type internalTagValuesClient interface { - Close() error - setGoogleClientInfo(...string) - Connection() *grpc.ClientConn - ListTagValues(context.Context, *resourcemanagerpb.ListTagValuesRequest, ...gax.CallOption) *TagValueIterator - GetTagValue(context.Context, *resourcemanagerpb.GetTagValueRequest, ...gax.CallOption) (*resourcemanagerpb.TagValue, error) - GetNamespacedTagValue(context.Context, *resourcemanagerpb.GetNamespacedTagValueRequest, ...gax.CallOption) (*resourcemanagerpb.TagValue, error) - CreateTagValue(context.Context, *resourcemanagerpb.CreateTagValueRequest, ...gax.CallOption) (*CreateTagValueOperation, error) - CreateTagValueOperation(name string) *CreateTagValueOperation - UpdateTagValue(context.Context, *resourcemanagerpb.UpdateTagValueRequest, ...gax.CallOption) (*UpdateTagValueOperation, error) - UpdateTagValueOperation(name string) *UpdateTagValueOperation - DeleteTagValue(context.Context, *resourcemanagerpb.DeleteTagValueRequest, ...gax.CallOption) (*DeleteTagValueOperation, error) - DeleteTagValueOperation(name string) *DeleteTagValueOperation - GetIamPolicy(context.Context, *iampb.GetIamPolicyRequest, ...gax.CallOption) (*iampb.Policy, error) - SetIamPolicy(context.Context, *iampb.SetIamPolicyRequest, ...gax.CallOption) (*iampb.Policy, error) - TestIamPermissions(context.Context, *iampb.TestIamPermissionsRequest, ...gax.CallOption) (*iampb.TestIamPermissionsResponse, error) - GetOperation(context.Context, *longrunningpb.GetOperationRequest, ...gax.CallOption) (*longrunningpb.Operation, error) -} - -// TagValuesClient is a client for interacting with Cloud Resource Manager API. -// Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. -// -// Allow users to create and manage tag values. -type TagValuesClient struct { - // The internal transport-dependent client. - internalClient internalTagValuesClient - - // The call options for this service. - CallOptions *TagValuesCallOptions - - // LROClient is used internally to handle long-running operations. - // It is exposed so that its CallOptions can be modified if required. - // Users should not Close this client. - LROClient *lroauto.OperationsClient -} - -// Wrapper methods routed to the internal client. - -// Close closes the connection to the API service. The user should invoke this when -// the client is no longer required. -func (c *TagValuesClient) Close() error { - return c.internalClient.Close() -} - -// setGoogleClientInfo sets the name and version of the application in -// the `x-goog-api-client` header passed on each request. Intended for -// use by Google-written clients. -func (c *TagValuesClient) setGoogleClientInfo(keyval ...string) { - c.internalClient.setGoogleClientInfo(keyval...) -} - -// Connection returns a connection to the API service. -// -// Deprecated: Connections are now pooled so this method does not always -// return the same resource. -func (c *TagValuesClient) Connection() *grpc.ClientConn { - return c.internalClient.Connection() -} - -// ListTagValues lists all TagValues for a specific TagKey. -func (c *TagValuesClient) ListTagValues(ctx context.Context, req *resourcemanagerpb.ListTagValuesRequest, opts ...gax.CallOption) *TagValueIterator { - return c.internalClient.ListTagValues(ctx, req, opts...) -} - -// GetTagValue retrieves a TagValue. This method will return PERMISSION_DENIED if the -// value does not exist or the user does not have permission to view it. -func (c *TagValuesClient) GetTagValue(ctx context.Context, req *resourcemanagerpb.GetTagValueRequest, opts ...gax.CallOption) (*resourcemanagerpb.TagValue, error) { - return c.internalClient.GetTagValue(ctx, req, opts...) -} - -// GetNamespacedTagValue retrieves a TagValue by its namespaced name. -// This method will return PERMISSION_DENIED if the value does not exist -// or the user does not have permission to view it. -func (c *TagValuesClient) GetNamespacedTagValue(ctx context.Context, req *resourcemanagerpb.GetNamespacedTagValueRequest, opts ...gax.CallOption) (*resourcemanagerpb.TagValue, error) { - return c.internalClient.GetNamespacedTagValue(ctx, req, opts...) -} - -// CreateTagValue creates a TagValue as a child of the specified TagKey. If a another -// request with the same parameters is sent while the original request is in -// process the second request will receive an error. A maximum of 1000 -// TagValues can exist under a TagKey at any given time. -func (c *TagValuesClient) CreateTagValue(ctx context.Context, req *resourcemanagerpb.CreateTagValueRequest, opts ...gax.CallOption) (*CreateTagValueOperation, error) { - return c.internalClient.CreateTagValue(ctx, req, opts...) -} - -// CreateTagValueOperation returns a new CreateTagValueOperation from a given name. -// The name must be that of a previously created CreateTagValueOperation, possibly from a different process. -func (c *TagValuesClient) CreateTagValueOperation(name string) *CreateTagValueOperation { - return c.internalClient.CreateTagValueOperation(name) -} - -// UpdateTagValue updates the attributes of the TagValue resource. -func (c *TagValuesClient) UpdateTagValue(ctx context.Context, req *resourcemanagerpb.UpdateTagValueRequest, opts ...gax.CallOption) (*UpdateTagValueOperation, error) { - return c.internalClient.UpdateTagValue(ctx, req, opts...) -} - -// UpdateTagValueOperation returns a new UpdateTagValueOperation from a given name. -// The name must be that of a previously created UpdateTagValueOperation, possibly from a different process. -func (c *TagValuesClient) UpdateTagValueOperation(name string) *UpdateTagValueOperation { - return c.internalClient.UpdateTagValueOperation(name) -} - -// DeleteTagValue deletes a TagValue. The TagValue cannot have any bindings when it is -// deleted. -func (c *TagValuesClient) DeleteTagValue(ctx context.Context, req *resourcemanagerpb.DeleteTagValueRequest, opts ...gax.CallOption) (*DeleteTagValueOperation, error) { - return c.internalClient.DeleteTagValue(ctx, req, opts...) -} - -// DeleteTagValueOperation returns a new DeleteTagValueOperation from a given name. -// The name must be that of a previously created DeleteTagValueOperation, possibly from a different process. -func (c *TagValuesClient) DeleteTagValueOperation(name string) *DeleteTagValueOperation { - return c.internalClient.DeleteTagValueOperation(name) -} - -// GetIamPolicy gets the access control policy for a TagValue. The returned policy may be -// empty if no such policy or resource exists. The resource field should -// be the TagValue’s resource name. For example: tagValues/1234. -// The caller must have the -// cloudresourcemanager.googleapis.com/tagValues.getIamPolicy permission on -// the identified TagValue to get the access control policy. -func (c *TagValuesClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error) { - return c.internalClient.GetIamPolicy(ctx, req, opts...) -} - -// SetIamPolicy sets the access control policy on a TagValue, replacing any existing -// policy. The resource field should be the TagValue’s resource name. -// For example: tagValues/1234. -// The caller must have resourcemanager.tagValues.setIamPolicy permission -// on the identified tagValue. -func (c *TagValuesClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error) { - return c.internalClient.SetIamPolicy(ctx, req, opts...) -} - -// TestIamPermissions returns permissions that a caller has on the specified TagValue. -// The resource field should be the TagValue’s resource name. For example: -// tagValues/1234. -// -// There are no permissions required for making this API call. -func (c *TagValuesClient) TestIamPermissions(ctx context.Context, req *iampb.TestIamPermissionsRequest, opts ...gax.CallOption) (*iampb.TestIamPermissionsResponse, error) { - return c.internalClient.TestIamPermissions(ctx, req, opts...) -} - -// GetOperation is a utility method from google.longrunning.Operations. -func (c *TagValuesClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { - return c.internalClient.GetOperation(ctx, req, opts...) -} - -// tagValuesGRPCClient is a client for interacting with Cloud Resource Manager API over gRPC transport. -// -// Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. -type tagValuesGRPCClient struct { - // Connection pool of gRPC connections to the service. - connPool gtransport.ConnPool - - // Points back to the CallOptions field of the containing TagValuesClient - CallOptions **TagValuesCallOptions - - // The gRPC API client. - tagValuesClient resourcemanagerpb.TagValuesClient - - // LROClient is used internally to handle long-running operations. - // It is exposed so that its CallOptions can be modified if required. - // Users should not Close this client. - LROClient **lroauto.OperationsClient - - operationsClient longrunningpb.OperationsClient - - // The x-goog-* metadata to be sent with each request. - xGoogHeaders []string - - logger *slog.Logger -} - -// NewTagValuesClient creates a new tag values client based on gRPC. -// The returned client must be Closed when it is done being used to clean up its underlying connections. -// -// Allow users to create and manage tag values. -func NewTagValuesClient(ctx context.Context, opts ...option.ClientOption) (*TagValuesClient, error) { - clientOpts := defaultTagValuesGRPCClientOptions() - if gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - clientOpts = append(clientOpts, internaloption.WithTelemetryAttributes(map[string]string{ - "gcp.client.service": "cloudresourcemanager", - "gcp.client.version": getVersionClient(), - "gcp.client.repo": "googleapis/google-cloud-go", - "gcp.client.artifact": "cloud.google.com/go/resourcemanager/apiv3", - "gcp.client.language": "go", - "url.domain": "cloudresourcemanager.googleapis.com", - })) - } - if newTagValuesClientHook != nil { - hookOpts, err := newTagValuesClientHook(ctx, clientHookParams{}) - if err != nil { - return nil, err - } - clientOpts = append(clientOpts, hookOpts...) - } - - connPool, err := gtransport.DialPool(ctx, append(clientOpts, opts...)...) - if err != nil { - return nil, err - } - client := TagValuesClient{CallOptions: defaultTagValuesCallOptions()} - - c := &tagValuesGRPCClient{ - connPool: connPool, - tagValuesClient: resourcemanagerpb.NewTagValuesClient(connPool), - CallOptions: &client.CallOptions, - logger: internaloption.GetLogger(opts), - operationsClient: longrunningpb.NewOperationsClient(connPool), - } - c.setGoogleClientInfo() - if gax.IsFeatureEnabled("METRICS") { - metrics := gax.NewClientMetrics( - gax.WithTelemetryLogger(c.logger), - gax.WithTelemetryAttributes(map[string]string{ - gax.ClientService: "cloudresourcemanager", - gax.ClientVersion: getVersionClient(), - gax.ClientArtifact: "cloud.google.com/go/resourcemanager/apiv3", - gax.RPCSystem: "grpc", - gax.URLDomain: "cloudresourcemanager.googleapis.com", - }), - ) - - client.CallOptions.ListTagValues = append(client.CallOptions.ListTagValues, gax.WithClientMetrics(metrics)) - client.CallOptions.GetTagValue = append(client.CallOptions.GetTagValue, gax.WithClientMetrics(metrics)) - client.CallOptions.GetNamespacedTagValue = append(client.CallOptions.GetNamespacedTagValue, gax.WithClientMetrics(metrics)) - client.CallOptions.CreateTagValue = append(client.CallOptions.CreateTagValue, gax.WithClientMetrics(metrics)) - client.CallOptions.UpdateTagValue = append(client.CallOptions.UpdateTagValue, gax.WithClientMetrics(metrics)) - client.CallOptions.DeleteTagValue = append(client.CallOptions.DeleteTagValue, gax.WithClientMetrics(metrics)) - client.CallOptions.GetIamPolicy = append(client.CallOptions.GetIamPolicy, gax.WithClientMetrics(metrics)) - client.CallOptions.SetIamPolicy = append(client.CallOptions.SetIamPolicy, gax.WithClientMetrics(metrics)) - client.CallOptions.TestIamPermissions = append(client.CallOptions.TestIamPermissions, gax.WithClientMetrics(metrics)) - client.CallOptions.GetOperation = append(client.CallOptions.GetOperation, gax.WithClientMetrics(metrics)) - } - - client.internalClient = c - - client.LROClient, err = lroauto.NewOperationsClient(ctx, gtransport.WithConnPool(connPool)) - if err != nil { - // This error "should not happen", since we are just reusing old connection pool - // and never actually need to dial. - // If this does happen, we could leak connp. However, we cannot close conn: - // If the user invoked the constructor with option.WithGRPCConn, - // we would close a connection that's still in use. - // TODO: investigate error conditions. - return nil, err - } - c.LROClient = &client.LROClient - return &client, nil -} - -// Connection returns a connection to the API service. -// -// Deprecated: Connections are now pooled so this method does not always -// return the same resource. -func (c *tagValuesGRPCClient) Connection() *grpc.ClientConn { - return c.connPool.Conn() -} - -// setGoogleClientInfo sets the name and version of the application in -// the `x-goog-api-client` header passed on each request. Intended for -// use by Google-written clients. -func (c *tagValuesGRPCClient) setGoogleClientInfo(keyval ...string) { - kv := append([]string{"gl-go", gax.GoVersion}, keyval...) - kv = append(kv, "gapic", getVersionClient(), "gax", gax.Version, "grpc", grpc.Version, "pb", protoVersion) - c.xGoogHeaders = []string{ - "x-goog-api-client", gax.XGoogHeader(kv...), - } -} - -// Close closes the connection to the API service. The user should invoke this when -// the client is no longer required. -func (c *tagValuesGRPCClient) Close() error { - return c.connPool.Close() -} - -// Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. -type tagValuesRESTClient struct { - // The http endpoint to connect to. - endpoint string - - // The http client. - httpClient *http.Client - - // LROClient is used internally to handle long-running operations. - // It is exposed so that its CallOptions can be modified if required. - // Users should not Close this client. - LROClient **lroauto.OperationsClient - - // The x-goog-* headers to be sent with each request. - xGoogHeaders []string - - // Points back to the CallOptions field of the containing TagValuesClient - CallOptions **TagValuesCallOptions - - logger *slog.Logger -} - -// NewTagValuesRESTClient creates a new tag values rest client. -// -// Allow users to create and manage tag values. -func NewTagValuesRESTClient(ctx context.Context, opts ...option.ClientOption) (*TagValuesClient, error) { - clientOpts := append(defaultTagValuesRESTClientOptions(), opts...) - if gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - clientOpts = append(clientOpts, internaloption.WithTelemetryAttributes(map[string]string{ - "gcp.client.service": "cloudresourcemanager", - "gcp.client.version": getVersionClient(), - "gcp.client.repo": "googleapis/google-cloud-go", - "gcp.client.artifact": "cloud.google.com/go/resourcemanager/apiv3", - "gcp.client.language": "go", - "url.domain": "cloudresourcemanager.googleapis.com", - })) - } - httpClient, endpoint, err := httptransport.NewClient(ctx, clientOpts...) - if err != nil { - return nil, err - } - - callOpts := defaultTagValuesRESTCallOptions() - c := &tagValuesRESTClient{ - endpoint: endpoint, - httpClient: httpClient, - CallOptions: &callOpts, - logger: internaloption.GetLogger(opts), - } - c.setGoogleClientInfo() - - if gax.IsFeatureEnabled("METRICS") { - metrics := gax.NewClientMetrics( - gax.WithTelemetryLogger(c.logger), - gax.WithTelemetryAttributes(map[string]string{ - gax.ClientService: "cloudresourcemanager", - gax.ClientVersion: getVersionClient(), - gax.ClientArtifact: "cloud.google.com/go/resourcemanager/apiv3", - gax.RPCSystem: "http", - gax.URLDomain: "cloudresourcemanager.googleapis.com", - }), - ) - - callOpts.ListTagValues = append(callOpts.ListTagValues, gax.WithClientMetrics(metrics)) - callOpts.GetTagValue = append(callOpts.GetTagValue, gax.WithClientMetrics(metrics)) - callOpts.GetNamespacedTagValue = append(callOpts.GetNamespacedTagValue, gax.WithClientMetrics(metrics)) - callOpts.CreateTagValue = append(callOpts.CreateTagValue, gax.WithClientMetrics(metrics)) - callOpts.UpdateTagValue = append(callOpts.UpdateTagValue, gax.WithClientMetrics(metrics)) - callOpts.DeleteTagValue = append(callOpts.DeleteTagValue, gax.WithClientMetrics(metrics)) - callOpts.GetIamPolicy = append(callOpts.GetIamPolicy, gax.WithClientMetrics(metrics)) - callOpts.SetIamPolicy = append(callOpts.SetIamPolicy, gax.WithClientMetrics(metrics)) - callOpts.TestIamPermissions = append(callOpts.TestIamPermissions, gax.WithClientMetrics(metrics)) - callOpts.GetOperation = append(callOpts.GetOperation, gax.WithClientMetrics(metrics)) - } - - lroOpts := []option.ClientOption{ - option.WithHTTPClient(httpClient), - option.WithEndpoint(endpoint), - } - opClient, err := lroauto.NewOperationsRESTClient(ctx, lroOpts...) - if err != nil { - return nil, err - } - c.LROClient = &opClient - - return &TagValuesClient{internalClient: c, CallOptions: callOpts}, nil -} - -func defaultTagValuesRESTClientOptions() []option.ClientOption { - return []option.ClientOption{ - internaloption.WithDefaultEndpoint("https://cloudresourcemanager.googleapis.com"), - internaloption.WithDefaultEndpointTemplate("https://cloudresourcemanager.UNIVERSE_DOMAIN"), - internaloption.WithDefaultMTLSEndpoint("https://cloudresourcemanager.mtls.googleapis.com"), - internaloption.WithDefaultUniverseDomain("googleapis.com"), - internaloption.WithDefaultAudience("https://cloudresourcemanager.googleapis.com/"), - internaloption.WithDefaultScopes(DefaultAuthScopes()...), - internaloption.EnableNewAuthLibrary(), - } -} - -// setGoogleClientInfo sets the name and version of the application in -// the `x-goog-api-client` header passed on each request. Intended for -// use by Google-written clients. -func (c *tagValuesRESTClient) setGoogleClientInfo(keyval ...string) { - kv := append([]string{"gl-go", gax.GoVersion}, keyval...) - kv = append(kv, "gapic", getVersionClient(), "gax", gax.Version, "rest", "UNKNOWN", "pb", protoVersion) - c.xGoogHeaders = []string{ - "x-goog-api-client", gax.XGoogHeader(kv...), - } -} - -// Close closes the connection to the API service. The user should invoke this when -// the client is no longer required. -func (c *tagValuesRESTClient) Close() error { - // Replace httpClient with nil to force cleanup. - c.httpClient = nil - return nil -} - -// Connection returns a connection to the API service. -// -// Deprecated: This method always returns nil. -func (c *tagValuesRESTClient) Connection() *grpc.ClientConn { - return nil -} -func (c *tagValuesGRPCClient) ListTagValues(ctx context.Context, req *resourcemanagerpb.ListTagValuesRequest, opts ...gax.CallOption) *TagValueIterator { - ctx = gax.InsertMetadataIntoOutgoingContext(ctx, c.xGoogHeaders...) - if gax.IsFeatureEnabled("METRICS") || gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "rpc_method", "google.cloud.resourcemanager.v3.TagValues/ListTagValues") - } - opts = append((*c.CallOptions).ListTagValues[0:len((*c.CallOptions).ListTagValues):len((*c.CallOptions).ListTagValues)], opts...) - it := &TagValueIterator{} - req = proto.Clone(req).(*resourcemanagerpb.ListTagValuesRequest) - it.InternalFetch = func(pageSize int, pageToken string) ([]*resourcemanagerpb.TagValue, string, error) { - resp := &resourcemanagerpb.ListTagValuesResponse{} - if pageToken != "" { - req.PageToken = pageToken - } - if pageSize > math.MaxInt32 { - req.PageSize = math.MaxInt32 - } else if pageSize != 0 { - req.PageSize = int32(pageSize) - } - err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - var err error - resp, err = executeRPC(ctx, c.tagValuesClient.ListTagValues, req, settings.GRPC, c.logger, "ListTagValues") - return err - }, opts...) - if err != nil { - return nil, "", err - } - - it.Response = resp - return resp.GetTagValues(), resp.GetNextPageToken(), nil - } - fetch := func(pageSize int, pageToken string) (string, error) { - items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) - if err != nil { - return "", err - } - it.items = append(it.items, items...) - return nextPageToken, nil - } - - it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) - it.pageInfo.MaxSize = int(req.GetPageSize()) - it.pageInfo.Token = req.GetPageToken() - - return it -} - -func (c *tagValuesGRPCClient) GetTagValue(ctx context.Context, req *resourcemanagerpb.GetTagValueRequest, opts ...gax.CallOption) (*resourcemanagerpb.TagValue, error) { - hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))} - - hds = append(c.xGoogHeaders, hds...) - ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) - if gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "resource_name", fmt.Sprintf("//cloudresourcemanager.googleapis.com/%v", req.GetName())) - } - if gax.IsFeatureEnabled("METRICS") || gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "rpc_method", "google.cloud.resourcemanager.v3.TagValues/GetTagValue") - } - opts = append((*c.CallOptions).GetTagValue[0:len((*c.CallOptions).GetTagValue):len((*c.CallOptions).GetTagValue)], opts...) - var resp *resourcemanagerpb.TagValue - err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - var err error - resp, err = executeRPC(ctx, c.tagValuesClient.GetTagValue, req, settings.GRPC, c.logger, "GetTagValue") - return err - }, opts...) - if err != nil { - return nil, err - } - return resp, nil -} - -func (c *tagValuesGRPCClient) GetNamespacedTagValue(ctx context.Context, req *resourcemanagerpb.GetNamespacedTagValueRequest, opts ...gax.CallOption) (*resourcemanagerpb.TagValue, error) { - ctx = gax.InsertMetadataIntoOutgoingContext(ctx, c.xGoogHeaders...) - if gax.IsFeatureEnabled("METRICS") || gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "rpc_method", "google.cloud.resourcemanager.v3.TagValues/GetNamespacedTagValue") - } - opts = append((*c.CallOptions).GetNamespacedTagValue[0:len((*c.CallOptions).GetNamespacedTagValue):len((*c.CallOptions).GetNamespacedTagValue)], opts...) - var resp *resourcemanagerpb.TagValue - err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - var err error - resp, err = executeRPC(ctx, c.tagValuesClient.GetNamespacedTagValue, req, settings.GRPC, c.logger, "GetNamespacedTagValue") - return err - }, opts...) - if err != nil { - return nil, err - } - return resp, nil -} - -func (c *tagValuesGRPCClient) CreateTagValue(ctx context.Context, req *resourcemanagerpb.CreateTagValueRequest, opts ...gax.CallOption) (*CreateTagValueOperation, error) { - ctx = gax.InsertMetadataIntoOutgoingContext(ctx, c.xGoogHeaders...) - if gax.IsFeatureEnabled("METRICS") || gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "rpc_method", "google.cloud.resourcemanager.v3.TagValues/CreateTagValue") - } - opts = append((*c.CallOptions).CreateTagValue[0:len((*c.CallOptions).CreateTagValue):len((*c.CallOptions).CreateTagValue)], opts...) - var resp *longrunningpb.Operation - err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - var err error - resp, err = executeRPC(ctx, c.tagValuesClient.CreateTagValue, req, settings.GRPC, c.logger, "CreateTagValue") - return err - }, opts...) - if err != nil { - return nil, err - } - return &CreateTagValueOperation{ - lro: longrunning.InternalNewOperation(*c.LROClient, resp), - }, nil -} - -func (c *tagValuesGRPCClient) UpdateTagValue(ctx context.Context, req *resourcemanagerpb.UpdateTagValueRequest, opts ...gax.CallOption) (*UpdateTagValueOperation, error) { - hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "tag_value.name", url.QueryEscape(req.GetTagValue().GetName()))} - - hds = append(c.xGoogHeaders, hds...) - ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) - if gax.IsFeatureEnabled("METRICS") || gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "rpc_method", "google.cloud.resourcemanager.v3.TagValues/UpdateTagValue") - } - opts = append((*c.CallOptions).UpdateTagValue[0:len((*c.CallOptions).UpdateTagValue):len((*c.CallOptions).UpdateTagValue)], opts...) - var resp *longrunningpb.Operation - err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - var err error - resp, err = executeRPC(ctx, c.tagValuesClient.UpdateTagValue, req, settings.GRPC, c.logger, "UpdateTagValue") - return err - }, opts...) - if err != nil { - return nil, err - } - return &UpdateTagValueOperation{ - lro: longrunning.InternalNewOperation(*c.LROClient, resp), - }, nil -} - -func (c *tagValuesGRPCClient) DeleteTagValue(ctx context.Context, req *resourcemanagerpb.DeleteTagValueRequest, opts ...gax.CallOption) (*DeleteTagValueOperation, error) { - hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))} - - hds = append(c.xGoogHeaders, hds...) - ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) - if gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "resource_name", fmt.Sprintf("//cloudresourcemanager.googleapis.com/%v", req.GetName())) - } - if gax.IsFeatureEnabled("METRICS") || gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "rpc_method", "google.cloud.resourcemanager.v3.TagValues/DeleteTagValue") - } - opts = append((*c.CallOptions).DeleteTagValue[0:len((*c.CallOptions).DeleteTagValue):len((*c.CallOptions).DeleteTagValue)], opts...) - var resp *longrunningpb.Operation - err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - var err error - resp, err = executeRPC(ctx, c.tagValuesClient.DeleteTagValue, req, settings.GRPC, c.logger, "DeleteTagValue") - return err - }, opts...) - if err != nil { - return nil, err - } - return &DeleteTagValueOperation{ - lro: longrunning.InternalNewOperation(*c.LROClient, resp), - }, nil -} - -func (c *tagValuesGRPCClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error) { - hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "resource", url.QueryEscape(req.GetResource()))} - - hds = append(c.xGoogHeaders, hds...) - ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) - if gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "resource_name", fmt.Sprintf("//cloudresourcemanager.googleapis.com/%v", req.GetResource())) - } - if gax.IsFeatureEnabled("METRICS") || gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "rpc_method", "google.cloud.resourcemanager.v3.TagValues/GetIamPolicy") - } - opts = append((*c.CallOptions).GetIamPolicy[0:len((*c.CallOptions).GetIamPolicy):len((*c.CallOptions).GetIamPolicy)], opts...) - var resp *iampb.Policy - err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - var err error - resp, err = executeRPC(ctx, c.tagValuesClient.GetIamPolicy, req, settings.GRPC, c.logger, "GetIamPolicy") - return err - }, opts...) - if err != nil { - return nil, err - } - return resp, nil -} - -func (c *tagValuesGRPCClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error) { - hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "resource", url.QueryEscape(req.GetResource()))} - - hds = append(c.xGoogHeaders, hds...) - ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) - if gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "resource_name", fmt.Sprintf("//cloudresourcemanager.googleapis.com/%v", req.GetResource())) - } - if gax.IsFeatureEnabled("METRICS") || gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "rpc_method", "google.cloud.resourcemanager.v3.TagValues/SetIamPolicy") - } - opts = append((*c.CallOptions).SetIamPolicy[0:len((*c.CallOptions).SetIamPolicy):len((*c.CallOptions).SetIamPolicy)], opts...) - var resp *iampb.Policy - err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - var err error - resp, err = executeRPC(ctx, c.tagValuesClient.SetIamPolicy, req, settings.GRPC, c.logger, "SetIamPolicy") - return err - }, opts...) - if err != nil { - return nil, err - } - return resp, nil -} - -func (c *tagValuesGRPCClient) TestIamPermissions(ctx context.Context, req *iampb.TestIamPermissionsRequest, opts ...gax.CallOption) (*iampb.TestIamPermissionsResponse, error) { - hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "resource", url.QueryEscape(req.GetResource()))} - - hds = append(c.xGoogHeaders, hds...) - ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) - if gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "resource_name", fmt.Sprintf("//cloudresourcemanager.googleapis.com/%v", req.GetResource())) - } - if gax.IsFeatureEnabled("METRICS") || gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "rpc_method", "google.cloud.resourcemanager.v3.TagValues/TestIamPermissions") - } - opts = append((*c.CallOptions).TestIamPermissions[0:len((*c.CallOptions).TestIamPermissions):len((*c.CallOptions).TestIamPermissions)], opts...) - var resp *iampb.TestIamPermissionsResponse - err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - var err error - resp, err = executeRPC(ctx, c.tagValuesClient.TestIamPermissions, req, settings.GRPC, c.logger, "TestIamPermissions") - return err - }, opts...) - if err != nil { - return nil, err - } - return resp, nil -} - -func (c *tagValuesGRPCClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { - hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))} - - hds = append(c.xGoogHeaders, hds...) - ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) - if gax.IsFeatureEnabled("METRICS") || gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "rpc_method", "google.longrunning.Operations/GetOperation") - } - opts = append((*c.CallOptions).GetOperation[0:len((*c.CallOptions).GetOperation):len((*c.CallOptions).GetOperation)], opts...) - var resp *longrunningpb.Operation - err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - var err error - resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") - return err - }, opts...) - if err != nil { - return nil, err - } - return resp, nil -} - -// ListTagValues lists all TagValues for a specific TagKey. -func (c *tagValuesRESTClient) ListTagValues(ctx context.Context, req *resourcemanagerpb.ListTagValuesRequest, opts ...gax.CallOption) *TagValueIterator { - it := &TagValueIterator{} - req = proto.Clone(req).(*resourcemanagerpb.ListTagValuesRequest) - unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} - it.InternalFetch = func(pageSize int, pageToken string) ([]*resourcemanagerpb.TagValue, string, error) { - resp := &resourcemanagerpb.ListTagValuesResponse{} - if pageToken != "" { - req.PageToken = pageToken - } - if pageSize > math.MaxInt32 { - req.PageSize = math.MaxInt32 - } else if pageSize != 0 { - req.PageSize = int32(pageSize) - } - baseUrl, err := url.Parse(c.endpoint) - if err != nil { - return nil, "", err - } - baseUrl.Path += fmt.Sprintf("/v3/tagValues") - - params := url.Values{} - params.Add("$alt", "json;enum-encoding=int") - if req.GetPageSize() != 0 { - params.Add("pageSize", fmt.Sprintf("%v", req.GetPageSize())) - } - if req.GetPageToken() != "" { - params.Add("pageToken", fmt.Sprintf("%v", req.GetPageToken())) - } - params.Add("parent", fmt.Sprintf("%v", req.GetParent())) - - baseUrl.RawQuery = params.Encode() - - // Build HTTP headers from client and context metadata. - hds := append(c.xGoogHeaders, "Content-Type", "application/json") - headers := gax.BuildHeaders(ctx, hds...) - e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - if settings.Path != "" { - baseUrl.Path = settings.Path - } - httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) - if err != nil { - return err - } - httpReq.Header = headers - - buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListTagValues") - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { - return err - } - - return nil - }, opts...) - if e != nil { - return nil, "", e - } - it.Response = resp - return resp.GetTagValues(), resp.GetNextPageToken(), nil - } - - fetch := func(pageSize int, pageToken string) (string, error) { - items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) - if err != nil { - return "", err - } - it.items = append(it.items, items...) - return nextPageToken, nil - } - - it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) - it.pageInfo.MaxSize = int(req.GetPageSize()) - it.pageInfo.Token = req.GetPageToken() - - return it -} - -// GetTagValue retrieves a TagValue. This method will return PERMISSION_DENIED if the -// value does not exist or the user does not have permission to view it. -func (c *tagValuesRESTClient) GetTagValue(ctx context.Context, req *resourcemanagerpb.GetTagValueRequest, opts ...gax.CallOption) (*resourcemanagerpb.TagValue, error) { - baseUrl, err := url.Parse(c.endpoint) - if err != nil { - return nil, err - } - baseUrl.Path += fmt.Sprintf("/v3/%v", req.GetName()) - - params := url.Values{} - params.Add("$alt", "json;enum-encoding=int") - - baseUrl.RawQuery = params.Encode() - - // Build HTTP headers from client and context metadata. - hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))} - - hds = append(c.xGoogHeaders, hds...) - hds = append(hds, "Content-Type", "application/json") - headers := gax.BuildHeaders(ctx, hds...) - if gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "resource_name", fmt.Sprintf("//cloudresourcemanager.googleapis.com/%v", req.GetName())) - } - if gax.IsFeatureEnabled("METRICS") || gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "rpc_method", "google.cloud.resourcemanager.v3.TagValues/GetTagValue") - ctx = callctx.WithTelemetryContext(ctx, "url_template", "/v3/{name=tagValues/*}") - } - opts = append((*c.CallOptions).GetTagValue[0:len((*c.CallOptions).GetTagValue):len((*c.CallOptions).GetTagValue)], opts...) - unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} - resp := &resourcemanagerpb.TagValue{} - e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - if settings.Path != "" { - baseUrl.Path = settings.Path - } - httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) - if err != nil { - return err - } - httpReq = httpReq.WithContext(ctx) - httpReq.Header = headers - - buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetTagValue") - if err != nil { - return err - } - - if err := unm.Unmarshal(buf, resp); err != nil { - return err - } - - return nil - }, opts...) - if e != nil { - return nil, e - } - return resp, nil -} - -// GetNamespacedTagValue retrieves a TagValue by its namespaced name. -// This method will return PERMISSION_DENIED if the value does not exist -// or the user does not have permission to view it. -func (c *tagValuesRESTClient) GetNamespacedTagValue(ctx context.Context, req *resourcemanagerpb.GetNamespacedTagValueRequest, opts ...gax.CallOption) (*resourcemanagerpb.TagValue, error) { - baseUrl, err := url.Parse(c.endpoint) - if err != nil { - return nil, err - } - baseUrl.Path += fmt.Sprintf("/v3/tagValues/namespaced") - - params := url.Values{} - params.Add("$alt", "json;enum-encoding=int") - params.Add("name", fmt.Sprintf("%v", req.GetName())) - - baseUrl.RawQuery = params.Encode() - - // Build HTTP headers from client and context metadata. - hds := append(c.xGoogHeaders, "Content-Type", "application/json") - headers := gax.BuildHeaders(ctx, hds...) - if gax.IsFeatureEnabled("METRICS") || gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "rpc_method", "google.cloud.resourcemanager.v3.TagValues/GetNamespacedTagValue") - ctx = callctx.WithTelemetryContext(ctx, "url_template", "/v3/tagValues/namespaced") - } - opts = append((*c.CallOptions).GetNamespacedTagValue[0:len((*c.CallOptions).GetNamespacedTagValue):len((*c.CallOptions).GetNamespacedTagValue)], opts...) - unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} - resp := &resourcemanagerpb.TagValue{} - e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - if settings.Path != "" { - baseUrl.Path = settings.Path - } - httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) - if err != nil { - return err - } - httpReq = httpReq.WithContext(ctx) - httpReq.Header = headers - - buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetNamespacedTagValue") - if err != nil { - return err - } - - if err := unm.Unmarshal(buf, resp); err != nil { - return err - } - - return nil - }, opts...) - if e != nil { - return nil, e - } - return resp, nil -} - -// CreateTagValue creates a TagValue as a child of the specified TagKey. If a another -// request with the same parameters is sent while the original request is in -// process the second request will receive an error. A maximum of 1000 -// TagValues can exist under a TagKey at any given time. -func (c *tagValuesRESTClient) CreateTagValue(ctx context.Context, req *resourcemanagerpb.CreateTagValueRequest, opts ...gax.CallOption) (*CreateTagValueOperation, error) { - m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} - body := req.GetTagValue() - jsonReq, err := m.Marshal(body) - if err != nil { - return nil, err - } - - baseUrl, err := url.Parse(c.endpoint) - if err != nil { - return nil, err - } - baseUrl.Path += fmt.Sprintf("/v3/tagValues") - - params := url.Values{} - params.Add("$alt", "json;enum-encoding=int") - if req.GetValidateOnly() { - params.Add("validateOnly", fmt.Sprintf("%v", req.GetValidateOnly())) - } - - baseUrl.RawQuery = params.Encode() - - // Build HTTP headers from client and context metadata. - hds := append(c.xGoogHeaders, "Content-Type", "application/json") - headers := gax.BuildHeaders(ctx, hds...) - if gax.IsFeatureEnabled("METRICS") || gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "rpc_method", "google.cloud.resourcemanager.v3.TagValues/CreateTagValue") - ctx = callctx.WithTelemetryContext(ctx, "url_template", "/v3/tagValues") - } - unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} - resp := &longrunningpb.Operation{} - e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - if settings.Path != "" { - baseUrl.Path = settings.Path - } - httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) - if err != nil { - return err - } - httpReq = httpReq.WithContext(ctx) - httpReq.Header = headers - - buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateTagValue") - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { - return err - } - - return nil - }, opts...) - if e != nil { - return nil, e - } - - override := fmt.Sprintf("/v3/%s", resp.GetName()) - return &CreateTagValueOperation{ - lro: longrunning.InternalNewOperation(*c.LROClient, resp), - pollPath: override, - }, nil -} - -// UpdateTagValue updates the attributes of the TagValue resource. -func (c *tagValuesRESTClient) UpdateTagValue(ctx context.Context, req *resourcemanagerpb.UpdateTagValueRequest, opts ...gax.CallOption) (*UpdateTagValueOperation, error) { - m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} - body := req.GetTagValue() - jsonReq, err := m.Marshal(body) - if err != nil { - return nil, err - } - - baseUrl, err := url.Parse(c.endpoint) - if err != nil { - return nil, err - } - baseUrl.Path += fmt.Sprintf("/v3/%v", req.GetTagValue().GetName()) - - params := url.Values{} - params.Add("$alt", "json;enum-encoding=int") - if req.GetUpdateMask() != nil { - field, err := protojson.Marshal(req.GetUpdateMask()) - if err != nil { - return nil, err - } - params.Add("updateMask", string(field[1:len(field)-1])) - } - if req.GetValidateOnly() { - params.Add("validateOnly", fmt.Sprintf("%v", req.GetValidateOnly())) - } - - baseUrl.RawQuery = params.Encode() - - // Build HTTP headers from client and context metadata. - hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "tag_value.name", url.QueryEscape(req.GetTagValue().GetName()))} - - hds = append(c.xGoogHeaders, hds...) - hds = append(hds, "Content-Type", "application/json") - headers := gax.BuildHeaders(ctx, hds...) - if gax.IsFeatureEnabled("METRICS") || gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "rpc_method", "google.cloud.resourcemanager.v3.TagValues/UpdateTagValue") - ctx = callctx.WithTelemetryContext(ctx, "url_template", "/v3/{tag_value.name=tagValues/*}") - } - unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} - resp := &longrunningpb.Operation{} - e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - if settings.Path != "" { - baseUrl.Path = settings.Path - } - httpReq, err := http.NewRequest("PATCH", baseUrl.String(), bytes.NewReader(jsonReq)) - if err != nil { - return err - } - httpReq = httpReq.WithContext(ctx) - httpReq.Header = headers - - buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateTagValue") - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { - return err - } - - return nil - }, opts...) - if e != nil { - return nil, e - } - - override := fmt.Sprintf("/v3/%s", resp.GetName()) - return &UpdateTagValueOperation{ - lro: longrunning.InternalNewOperation(*c.LROClient, resp), - pollPath: override, - }, nil -} - -// DeleteTagValue deletes a TagValue. The TagValue cannot have any bindings when it is -// deleted. -func (c *tagValuesRESTClient) DeleteTagValue(ctx context.Context, req *resourcemanagerpb.DeleteTagValueRequest, opts ...gax.CallOption) (*DeleteTagValueOperation, error) { - baseUrl, err := url.Parse(c.endpoint) - if err != nil { - return nil, err - } - baseUrl.Path += fmt.Sprintf("/v3/%v", req.GetName()) - - params := url.Values{} - params.Add("$alt", "json;enum-encoding=int") - if req.GetEtag() != "" { - params.Add("etag", fmt.Sprintf("%v", req.GetEtag())) - } - if req.GetValidateOnly() { - params.Add("validateOnly", fmt.Sprintf("%v", req.GetValidateOnly())) - } - - baseUrl.RawQuery = params.Encode() - - // Build HTTP headers from client and context metadata. - hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))} - - hds = append(c.xGoogHeaders, hds...) - hds = append(hds, "Content-Type", "application/json") - headers := gax.BuildHeaders(ctx, hds...) - if gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "resource_name", fmt.Sprintf("//cloudresourcemanager.googleapis.com/%v", req.GetName())) - } - if gax.IsFeatureEnabled("METRICS") || gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "rpc_method", "google.cloud.resourcemanager.v3.TagValues/DeleteTagValue") - ctx = callctx.WithTelemetryContext(ctx, "url_template", "/v3/{name=tagValues/*}") - } - unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} - resp := &longrunningpb.Operation{} - e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - if settings.Path != "" { - baseUrl.Path = settings.Path - } - httpReq, err := http.NewRequest("DELETE", baseUrl.String(), nil) - if err != nil { - return err - } - httpReq = httpReq.WithContext(ctx) - httpReq.Header = headers - - buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteTagValue") - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { - return err - } - - return nil - }, opts...) - if e != nil { - return nil, e - } - - override := fmt.Sprintf("/v3/%s", resp.GetName()) - return &DeleteTagValueOperation{ - lro: longrunning.InternalNewOperation(*c.LROClient, resp), - pollPath: override, - }, nil -} - -// GetIamPolicy gets the access control policy for a TagValue. The returned policy may be -// empty if no such policy or resource exists. The resource field should -// be the TagValue’s resource name. For example: tagValues/1234. -// The caller must have the -// cloudresourcemanager.googleapis.com/tagValues.getIamPolicy permission on -// the identified TagValue to get the access control policy. -func (c *tagValuesRESTClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error) { - m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} - jsonReq, err := m.Marshal(req) - if err != nil { - return nil, err - } - - baseUrl, err := url.Parse(c.endpoint) - if err != nil { - return nil, err - } - baseUrl.Path += fmt.Sprintf("/v3/%v:getIamPolicy", req.GetResource()) - - params := url.Values{} - params.Add("$alt", "json;enum-encoding=int") - - baseUrl.RawQuery = params.Encode() - - // Build HTTP headers from client and context metadata. - hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "resource", url.QueryEscape(req.GetResource()))} - - hds = append(c.xGoogHeaders, hds...) - hds = append(hds, "Content-Type", "application/json") - headers := gax.BuildHeaders(ctx, hds...) - if gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "resource_name", fmt.Sprintf("//cloudresourcemanager.googleapis.com/%v", req.GetResource())) - } - if gax.IsFeatureEnabled("METRICS") || gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "rpc_method", "google.cloud.resourcemanager.v3.TagValues/GetIamPolicy") - ctx = callctx.WithTelemetryContext(ctx, "url_template", "/v3/{resource=tagValues/*}:getIamPolicy") - } - opts = append((*c.CallOptions).GetIamPolicy[0:len((*c.CallOptions).GetIamPolicy):len((*c.CallOptions).GetIamPolicy)], opts...) - unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} - resp := &iampb.Policy{} - e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - if settings.Path != "" { - baseUrl.Path = settings.Path - } - httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) - if err != nil { - return err - } - httpReq = httpReq.WithContext(ctx) - httpReq.Header = headers - - buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "GetIamPolicy") - if err != nil { - return err - } - - if err := unm.Unmarshal(buf, resp); err != nil { - return err - } - - return nil - }, opts...) - if e != nil { - return nil, e - } - return resp, nil -} - -// SetIamPolicy sets the access control policy on a TagValue, replacing any existing -// policy. The resource field should be the TagValue’s resource name. -// For example: tagValues/1234. -// The caller must have resourcemanager.tagValues.setIamPolicy permission -// on the identified tagValue. -func (c *tagValuesRESTClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error) { - m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} - jsonReq, err := m.Marshal(req) - if err != nil { - return nil, err - } - - baseUrl, err := url.Parse(c.endpoint) - if err != nil { - return nil, err - } - baseUrl.Path += fmt.Sprintf("/v3/%v:setIamPolicy", req.GetResource()) - - params := url.Values{} - params.Add("$alt", "json;enum-encoding=int") - - baseUrl.RawQuery = params.Encode() - - // Build HTTP headers from client and context metadata. - hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "resource", url.QueryEscape(req.GetResource()))} - - hds = append(c.xGoogHeaders, hds...) - hds = append(hds, "Content-Type", "application/json") - headers := gax.BuildHeaders(ctx, hds...) - if gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "resource_name", fmt.Sprintf("//cloudresourcemanager.googleapis.com/%v", req.GetResource())) - } - if gax.IsFeatureEnabled("METRICS") || gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "rpc_method", "google.cloud.resourcemanager.v3.TagValues/SetIamPolicy") - ctx = callctx.WithTelemetryContext(ctx, "url_template", "/v3/{resource=tagValues/*}:setIamPolicy") - } - opts = append((*c.CallOptions).SetIamPolicy[0:len((*c.CallOptions).SetIamPolicy):len((*c.CallOptions).SetIamPolicy)], opts...) - unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} - resp := &iampb.Policy{} - e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - if settings.Path != "" { - baseUrl.Path = settings.Path - } - httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) - if err != nil { - return err - } - httpReq = httpReq.WithContext(ctx) - httpReq.Header = headers - - buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetIamPolicy") - if err != nil { - return err - } - - if err := unm.Unmarshal(buf, resp); err != nil { - return err - } - - return nil - }, opts...) - if e != nil { - return nil, e - } - return resp, nil -} - -// TestIamPermissions returns permissions that a caller has on the specified TagValue. -// The resource field should be the TagValue’s resource name. For example: -// tagValues/1234. -// -// There are no permissions required for making this API call. -func (c *tagValuesRESTClient) TestIamPermissions(ctx context.Context, req *iampb.TestIamPermissionsRequest, opts ...gax.CallOption) (*iampb.TestIamPermissionsResponse, error) { - m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} - jsonReq, err := m.Marshal(req) - if err != nil { - return nil, err - } - - baseUrl, err := url.Parse(c.endpoint) - if err != nil { - return nil, err - } - baseUrl.Path += fmt.Sprintf("/v3/%v:testIamPermissions", req.GetResource()) - - params := url.Values{} - params.Add("$alt", "json;enum-encoding=int") - - baseUrl.RawQuery = params.Encode() - - // Build HTTP headers from client and context metadata. - hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "resource", url.QueryEscape(req.GetResource()))} - - hds = append(c.xGoogHeaders, hds...) - hds = append(hds, "Content-Type", "application/json") - headers := gax.BuildHeaders(ctx, hds...) - if gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "resource_name", fmt.Sprintf("//cloudresourcemanager.googleapis.com/%v", req.GetResource())) - } - if gax.IsFeatureEnabled("METRICS") || gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "rpc_method", "google.cloud.resourcemanager.v3.TagValues/TestIamPermissions") - ctx = callctx.WithTelemetryContext(ctx, "url_template", "/v3/{resource=tagValues/*}:testIamPermissions") - } - opts = append((*c.CallOptions).TestIamPermissions[0:len((*c.CallOptions).TestIamPermissions):len((*c.CallOptions).TestIamPermissions)], opts...) - unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} - resp := &iampb.TestIamPermissionsResponse{} - e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - if settings.Path != "" { - baseUrl.Path = settings.Path - } - httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) - if err != nil { - return err - } - httpReq = httpReq.WithContext(ctx) - httpReq.Header = headers - - buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "TestIamPermissions") - if err != nil { - return err - } - - if err := unm.Unmarshal(buf, resp); err != nil { - return err - } - - return nil - }, opts...) - if e != nil { - return nil, e - } - return resp, nil -} - -// GetOperation is a utility method from google.longrunning.Operations. -func (c *tagValuesRESTClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { - baseUrl, err := url.Parse(c.endpoint) - if err != nil { - return nil, err - } - baseUrl.Path += fmt.Sprintf("/v3/%v", req.GetName()) - - params := url.Values{} - params.Add("$alt", "json;enum-encoding=int") - - baseUrl.RawQuery = params.Encode() - - // Build HTTP headers from client and context metadata. - hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))} - - hds = append(c.xGoogHeaders, hds...) - hds = append(hds, "Content-Type", "application/json") - headers := gax.BuildHeaders(ctx, hds...) - if gax.IsFeatureEnabled("METRICS") || gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "rpc_method", "google.longrunning.Operations/GetOperation") - ctx = callctx.WithTelemetryContext(ctx, "url_template", "/v3/{name=operations/**}") - } - opts = append((*c.CallOptions).GetOperation[0:len((*c.CallOptions).GetOperation):len((*c.CallOptions).GetOperation)], opts...) - unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} - resp := &longrunningpb.Operation{} - e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - if settings.Path != "" { - baseUrl.Path = settings.Path - } - httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) - if err != nil { - return err - } - httpReq = httpReq.WithContext(ctx) - httpReq.Header = headers - - buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") - if err != nil { - return err - } - - if err := unm.Unmarshal(buf, resp); err != nil { - return err - } - - return nil - }, opts...) - if e != nil { - return nil, e - } - return resp, nil -} - -// CreateTagValueOperation returns a new CreateTagValueOperation from a given name. -// The name must be that of a previously created CreateTagValueOperation, possibly from a different process. -func (c *tagValuesGRPCClient) CreateTagValueOperation(name string) *CreateTagValueOperation { - return &CreateTagValueOperation{ - lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), - } -} - -// CreateTagValueOperation returns a new CreateTagValueOperation from a given name. -// The name must be that of a previously created CreateTagValueOperation, possibly from a different process. -func (c *tagValuesRESTClient) CreateTagValueOperation(name string) *CreateTagValueOperation { - override := fmt.Sprintf("/v3/%s", name) - return &CreateTagValueOperation{ - lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), - pollPath: override, - } -} - -// DeleteTagValueOperation returns a new DeleteTagValueOperation from a given name. -// The name must be that of a previously created DeleteTagValueOperation, possibly from a different process. -func (c *tagValuesGRPCClient) DeleteTagValueOperation(name string) *DeleteTagValueOperation { - return &DeleteTagValueOperation{ - lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), - } -} - -// DeleteTagValueOperation returns a new DeleteTagValueOperation from a given name. -// The name must be that of a previously created DeleteTagValueOperation, possibly from a different process. -func (c *tagValuesRESTClient) DeleteTagValueOperation(name string) *DeleteTagValueOperation { - override := fmt.Sprintf("/v3/%s", name) - return &DeleteTagValueOperation{ - lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), - pollPath: override, - } -} - -// UpdateTagValueOperation returns a new UpdateTagValueOperation from a given name. -// The name must be that of a previously created UpdateTagValueOperation, possibly from a different process. -func (c *tagValuesGRPCClient) UpdateTagValueOperation(name string) *UpdateTagValueOperation { - return &UpdateTagValueOperation{ - lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), - } -} - -// UpdateTagValueOperation returns a new UpdateTagValueOperation from a given name. -// The name must be that of a previously created UpdateTagValueOperation, possibly from a different process. -func (c *tagValuesRESTClient) UpdateTagValueOperation(name string) *UpdateTagValueOperation { - override := fmt.Sprintf("/v3/%s", name) - return &UpdateTagValueOperation{ - lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), - pollPath: override, - } -} diff --git a/vendor/cloud.google.com/go/resourcemanager/apiv3/version.go b/vendor/cloud.google.com/go/resourcemanager/apiv3/version.go deleted file mode 100644 index f52cbc1c38..0000000000 --- a/vendor/cloud.google.com/go/resourcemanager/apiv3/version.go +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Code generated by gapicgen. DO NOT EDIT. - -package resourcemanager - -import "cloud.google.com/go/resourcemanager/internal" - -func init() { - versionClient = internal.Version -} diff --git a/vendor/cloud.google.com/go/resourcemanager/internal/version.go b/vendor/cloud.google.com/go/resourcemanager/internal/version.go deleted file mode 100644 index 477552e79c..0000000000 --- a/vendor/cloud.google.com/go/resourcemanager/internal/version.go +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Code generated by gapicgen. DO NOT EDIT. - -package internal - -// Version is the current tagged release of the library. -const Version = "1.13.0" diff --git a/vendor/cloud.google.com/go/serviceusage/LICENSE b/vendor/cloud.google.com/go/serviceusage/LICENSE deleted file mode 100644 index d645695673..0000000000 --- a/vendor/cloud.google.com/go/serviceusage/LICENSE +++ /dev/null @@ -1,202 +0,0 @@ - - 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/vendor/cloud.google.com/go/serviceusage/apiv1/.repo-metadata.json b/vendor/cloud.google.com/go/serviceusage/apiv1/.repo-metadata.json deleted file mode 100644 index 88f6b4314a..0000000000 --- a/vendor/cloud.google.com/go/serviceusage/apiv1/.repo-metadata.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "api_shortname": "serviceusage", - "client_documentation": "https://cloud.google.com/go/docs/reference/cloud.google.com/go/serviceusage/latest/apiv1", - "client_library_type": "generated", - "description": "Service Usage API", - "distribution_name": "cloud.google.com/go/serviceusage/apiv1", - "language": "go", - "library_type": "GAPIC_AUTO", - "release_level": "stable" -} \ No newline at end of file diff --git a/vendor/cloud.google.com/go/serviceusage/apiv1/auxiliary.go b/vendor/cloud.google.com/go/serviceusage/apiv1/auxiliary.go deleted file mode 100644 index 059af3a068..0000000000 --- a/vendor/cloud.google.com/go/serviceusage/apiv1/auxiliary.go +++ /dev/null @@ -1,314 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Code generated by protoc-gen-go_gapic. DO NOT EDIT. - -package serviceusage - -import ( - "context" - "time" - - "cloud.google.com/go/longrunning" - longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" - serviceusagepb "cloud.google.com/go/serviceusage/apiv1/serviceusagepb" - gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/iterator" -) - -// BatchEnableServicesOperation manages a long-running operation from BatchEnableServices. -type BatchEnableServicesOperation struct { - lro *longrunning.Operation - pollPath string -} - -// Wait blocks until the long-running operation is completed, returning the response and any errors encountered. -// -// See documentation of Poll for error-handling information. -func (op *BatchEnableServicesOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*serviceusagepb.BatchEnableServicesResponse, error) { - opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) - var resp serviceusagepb.BatchEnableServicesResponse - if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil { - return nil, err - } - return &resp, nil -} - -// Poll fetches the latest state of the long-running operation. -// -// Poll also fetches the latest metadata, which can be retrieved by Metadata. -// -// If Poll fails, the error is returned and op is unmodified. If Poll succeeds and -// the operation has completed with failure, the error is returned and op.Done will return true. -// If Poll succeeds and the operation has completed successfully, -// op.Done will return true, and the response of the operation is returned. -// If Poll succeeds and the operation has not completed, the returned response and error are both nil. -func (op *BatchEnableServicesOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*serviceusagepb.BatchEnableServicesResponse, error) { - opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) - var resp serviceusagepb.BatchEnableServicesResponse - if err := op.lro.Poll(ctx, &resp, opts...); err != nil { - return nil, err - } - if !op.Done() { - return nil, nil - } - return &resp, nil -} - -// Metadata returns metadata associated with the long-running operation. -// Metadata itself does not contact the server, but Poll does. -// To get the latest metadata, call this method after a successful call to Poll. -// If the metadata is not available, the returned metadata and error are both nil. -func (op *BatchEnableServicesOperation) Metadata() (*serviceusagepb.OperationMetadata, error) { - var meta serviceusagepb.OperationMetadata - if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata { - return nil, nil - } else if err != nil { - return nil, err - } - return &meta, nil -} - -// Done reports whether the long-running operation has completed. -func (op *BatchEnableServicesOperation) Done() bool { - return op.lro.Done() -} - -// Name returns the name of the long-running operation. -// The name is assigned by the server and is unique within the service from which the operation is created. -func (op *BatchEnableServicesOperation) Name() string { - return op.lro.Name() -} - -// DisableServiceOperation manages a long-running operation from DisableService. -type DisableServiceOperation struct { - lro *longrunning.Operation - pollPath string -} - -// Wait blocks until the long-running operation is completed, returning the response and any errors encountered. -// -// See documentation of Poll for error-handling information. -func (op *DisableServiceOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*serviceusagepb.DisableServiceResponse, error) { - opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) - var resp serviceusagepb.DisableServiceResponse - if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil { - return nil, err - } - return &resp, nil -} - -// Poll fetches the latest state of the long-running operation. -// -// Poll also fetches the latest metadata, which can be retrieved by Metadata. -// -// If Poll fails, the error is returned and op is unmodified. If Poll succeeds and -// the operation has completed with failure, the error is returned and op.Done will return true. -// If Poll succeeds and the operation has completed successfully, -// op.Done will return true, and the response of the operation is returned. -// If Poll succeeds and the operation has not completed, the returned response and error are both nil. -func (op *DisableServiceOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*serviceusagepb.DisableServiceResponse, error) { - opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) - var resp serviceusagepb.DisableServiceResponse - if err := op.lro.Poll(ctx, &resp, opts...); err != nil { - return nil, err - } - if !op.Done() { - return nil, nil - } - return &resp, nil -} - -// Metadata returns metadata associated with the long-running operation. -// Metadata itself does not contact the server, but Poll does. -// To get the latest metadata, call this method after a successful call to Poll. -// If the metadata is not available, the returned metadata and error are both nil. -func (op *DisableServiceOperation) Metadata() (*serviceusagepb.OperationMetadata, error) { - var meta serviceusagepb.OperationMetadata - if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata { - return nil, nil - } else if err != nil { - return nil, err - } - return &meta, nil -} - -// Done reports whether the long-running operation has completed. -func (op *DisableServiceOperation) Done() bool { - return op.lro.Done() -} - -// Name returns the name of the long-running operation. -// The name is assigned by the server and is unique within the service from which the operation is created. -func (op *DisableServiceOperation) Name() string { - return op.lro.Name() -} - -// EnableServiceOperation manages a long-running operation from EnableService. -type EnableServiceOperation struct { - lro *longrunning.Operation - pollPath string -} - -// Wait blocks until the long-running operation is completed, returning the response and any errors encountered. -// -// See documentation of Poll for error-handling information. -func (op *EnableServiceOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*serviceusagepb.EnableServiceResponse, error) { - opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) - var resp serviceusagepb.EnableServiceResponse - if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil { - return nil, err - } - return &resp, nil -} - -// Poll fetches the latest state of the long-running operation. -// -// Poll also fetches the latest metadata, which can be retrieved by Metadata. -// -// If Poll fails, the error is returned and op is unmodified. If Poll succeeds and -// the operation has completed with failure, the error is returned and op.Done will return true. -// If Poll succeeds and the operation has completed successfully, -// op.Done will return true, and the response of the operation is returned. -// If Poll succeeds and the operation has not completed, the returned response and error are both nil. -func (op *EnableServiceOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*serviceusagepb.EnableServiceResponse, error) { - opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) - var resp serviceusagepb.EnableServiceResponse - if err := op.lro.Poll(ctx, &resp, opts...); err != nil { - return nil, err - } - if !op.Done() { - return nil, nil - } - return &resp, nil -} - -// Metadata returns metadata associated with the long-running operation. -// Metadata itself does not contact the server, but Poll does. -// To get the latest metadata, call this method after a successful call to Poll. -// If the metadata is not available, the returned metadata and error are both nil. -func (op *EnableServiceOperation) Metadata() (*serviceusagepb.OperationMetadata, error) { - var meta serviceusagepb.OperationMetadata - if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata { - return nil, nil - } else if err != nil { - return nil, err - } - return &meta, nil -} - -// Done reports whether the long-running operation has completed. -func (op *EnableServiceOperation) Done() bool { - return op.lro.Done() -} - -// Name returns the name of the long-running operation. -// The name is assigned by the server and is unique within the service from which the operation is created. -func (op *EnableServiceOperation) Name() string { - return op.lro.Name() -} - -// OperationIterator manages a stream of *longrunningpb.Operation. -type OperationIterator struct { - items []*longrunningpb.Operation - pageInfo *iterator.PageInfo - nextFunc func() error - - // Response is the raw response for the current page. - // It must be cast to the RPC response type. - // Calling Next() or InternalFetch() updates this value. - Response interface{} - - // InternalFetch is for use by the Google Cloud Libraries only. - // It is not part of the stable interface of this package. - // - // InternalFetch returns results from a single call to the underlying RPC. - // The number of results is no greater than pageSize. - // If there are no more results, nextPageToken is empty and err is nil. - InternalFetch func(pageSize int, pageToken string) (results []*longrunningpb.Operation, nextPageToken string, err error) -} - -// PageInfo supports pagination. See the [google.golang.org/api/iterator] package for details. -func (it *OperationIterator) PageInfo() *iterator.PageInfo { - return it.pageInfo -} - -// Next returns the next result. Its second return value is iterator.Done if there are no more -// results. Once Next returns Done, all subsequent calls will return Done. -func (it *OperationIterator) Next() (*longrunningpb.Operation, error) { - var item *longrunningpb.Operation - if err := it.nextFunc(); err != nil { - return item, err - } - item = it.items[0] - it.items = it.items[1:] - return item, nil -} - -func (it *OperationIterator) bufLen() int { - return len(it.items) -} - -func (it *OperationIterator) takeBuf() interface{} { - b := it.items - it.items = nil - return b -} - -// ServiceIterator manages a stream of *serviceusagepb.Service. -type ServiceIterator struct { - items []*serviceusagepb.Service - pageInfo *iterator.PageInfo - nextFunc func() error - - // Response is the raw response for the current page. - // It must be cast to the RPC response type. - // Calling Next() or InternalFetch() updates this value. - Response interface{} - - // InternalFetch is for use by the Google Cloud Libraries only. - // It is not part of the stable interface of this package. - // - // InternalFetch returns results from a single call to the underlying RPC. - // The number of results is no greater than pageSize. - // If there are no more results, nextPageToken is empty and err is nil. - InternalFetch func(pageSize int, pageToken string) (results []*serviceusagepb.Service, nextPageToken string, err error) -} - -// PageInfo supports pagination. See the [google.golang.org/api/iterator] package for details. -func (it *ServiceIterator) PageInfo() *iterator.PageInfo { - return it.pageInfo -} - -// Next returns the next result. Its second return value is iterator.Done if there are no more -// results. Once Next returns Done, all subsequent calls will return Done. -func (it *ServiceIterator) Next() (*serviceusagepb.Service, error) { - var item *serviceusagepb.Service - if err := it.nextFunc(); err != nil { - return item, err - } - item = it.items[0] - it.items = it.items[1:] - return item, nil -} - -func (it *ServiceIterator) bufLen() int { - return len(it.items) -} - -func (it *ServiceIterator) takeBuf() interface{} { - b := it.items - it.items = nil - return b -} diff --git a/vendor/cloud.google.com/go/serviceusage/apiv1/auxiliary_go123.go b/vendor/cloud.google.com/go/serviceusage/apiv1/auxiliary_go123.go deleted file mode 100644 index 812894a12b..0000000000 --- a/vendor/cloud.google.com/go/serviceusage/apiv1/auxiliary_go123.go +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Code generated by protoc-gen-go_gapic. DO NOT EDIT. - -//go:build go1.23 - -package serviceusage - -import ( - "iter" - - longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" - serviceusagepb "cloud.google.com/go/serviceusage/apiv1/serviceusagepb" - "github.com/googleapis/gax-go/v2/iterator" -) - -// All returns an iterator. If an error is returned by the iterator, the -// iterator will stop after that iteration. -func (it *OperationIterator) All() iter.Seq2[*longrunningpb.Operation, error] { - return iterator.RangeAdapter(it.Next) -} - -// All returns an iterator. If an error is returned by the iterator, the -// iterator will stop after that iteration. -func (it *ServiceIterator) All() iter.Seq2[*serviceusagepb.Service, error] { - return iterator.RangeAdapter(it.Next) -} diff --git a/vendor/cloud.google.com/go/serviceusage/apiv1/doc.go b/vendor/cloud.google.com/go/serviceusage/apiv1/doc.go deleted file mode 100644 index 966793f0ed..0000000000 --- a/vendor/cloud.google.com/go/serviceusage/apiv1/doc.go +++ /dev/null @@ -1,90 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Code generated by protoc-gen-go_gapic. DO NOT EDIT. - -// Package serviceusage is an auto-generated package for the -// Service Usage API. -// -// Enables services that service consumers want to use on Google Cloud -// Platform, lists the available or enabled services, or disables services -// that service consumers no longer use. -// -// # General documentation -// -// For information that is relevant for all client libraries please reference -// https://pkg.go.dev/cloud.google.com/go#pkg-overview. Some information on this -// page includes: -// -// - [Authentication and Authorization] -// - [Timeouts and Cancellation] -// - [Testing against Client Libraries] -// - [Debugging Client Libraries] -// - [Inspecting errors] -// -// # Example usage -// -// To get started with this package, create a client. -// -// // go get cloud.google.com/go/serviceusage/apiv1@latest -// ctx := context.Background() -// // This snippet has been automatically generated and should be regarded as a code template only. -// // It will require modifications to work: -// // - It may require correct/in-range values for request initialization. -// // - It may require specifying regional endpoints when creating the service client as shown in: -// // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options -// c, err := serviceusage.NewClient(ctx) -// if err != nil { -// // TODO: Handle error. -// } -// defer c.Close() -// -// The client will use your default application credentials. Clients should be reused instead of created as needed. -// The methods of Client are safe for concurrent use by multiple goroutines. -// The returned client must be Closed when it is done being used. -// -// # Using the Client -// -// The following is an example of making an API call with the newly created client, mentioned above. -// -// req := &serviceusagepb.BatchEnableServicesRequest{ -// // TODO: Fill request struct fields. -// // See https://pkg.go.dev/cloud.google.com/go/serviceusage/apiv1/serviceusagepb#BatchEnableServicesRequest. -// } -// op, err := c.BatchEnableServices(ctx, req) -// if err != nil { -// // TODO: Handle error. -// } -// -// resp, err := op.Wait(ctx) -// if err != nil { -// // TODO: Handle error. -// } -// // TODO: Use resp. -// _ = resp -// -// # Use of Context -// -// The ctx passed to NewClient is used for authentication requests and -// for creating the underlying connection, but is not used for subsequent calls. -// Individual methods on the client use the ctx given to them. -// -// To close the open connection, use the Close() method. -// -// [Authentication and Authorization]: https://pkg.go.dev/cloud.google.com/go#hdr-Authentication_and_Authorization -// [Timeouts and Cancellation]: https://pkg.go.dev/cloud.google.com/go#hdr-Timeouts_and_Cancellation -// [Testing against Client Libraries]: https://pkg.go.dev/cloud.google.com/go#hdr-Testing -// [Debugging Client Libraries]: https://pkg.go.dev/cloud.google.com/go#hdr-Debugging -// [Inspecting errors]: https://pkg.go.dev/cloud.google.com/go#hdr-Inspecting_errors -package serviceusage // import "cloud.google.com/go/serviceusage/apiv1" diff --git a/vendor/cloud.google.com/go/serviceusage/apiv1/gapic_metadata.json b/vendor/cloud.google.com/go/serviceusage/apiv1/gapic_metadata.json deleted file mode 100644 index f8ca6440e3..0000000000 --- a/vendor/cloud.google.com/go/serviceusage/apiv1/gapic_metadata.json +++ /dev/null @@ -1,103 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods.", - "language": "go", - "protoPackage": "google.api.serviceusage.v1", - "libraryPackage": "cloud.google.com/go/serviceusage/apiv1", - "services": { - "ServiceUsage": { - "clients": { - "grpc": { - "libraryClient": "Client", - "rpcs": { - "BatchEnableServices": { - "methods": [ - "BatchEnableServices" - ] - }, - "BatchGetServices": { - "methods": [ - "BatchGetServices" - ] - }, - "DisableService": { - "methods": [ - "DisableService" - ] - }, - "EnableService": { - "methods": [ - "EnableService" - ] - }, - "GetOperation": { - "methods": [ - "GetOperation" - ] - }, - "GetService": { - "methods": [ - "GetService" - ] - }, - "ListOperations": { - "methods": [ - "ListOperations" - ] - }, - "ListServices": { - "methods": [ - "ListServices" - ] - } - } - }, - "rest": { - "libraryClient": "Client", - "rpcs": { - "BatchEnableServices": { - "methods": [ - "BatchEnableServices" - ] - }, - "BatchGetServices": { - "methods": [ - "BatchGetServices" - ] - }, - "DisableService": { - "methods": [ - "DisableService" - ] - }, - "EnableService": { - "methods": [ - "EnableService" - ] - }, - "GetOperation": { - "methods": [ - "GetOperation" - ] - }, - "GetService": { - "methods": [ - "GetService" - ] - }, - "ListOperations": { - "methods": [ - "ListOperations" - ] - }, - "ListServices": { - "methods": [ - "ListServices" - ] - } - } - } - } - } - } -} diff --git a/vendor/cloud.google.com/go/serviceusage/apiv1/helpers.go b/vendor/cloud.google.com/go/serviceusage/apiv1/helpers.go deleted file mode 100644 index d1a1fb18c5..0000000000 --- a/vendor/cloud.google.com/go/serviceusage/apiv1/helpers.go +++ /dev/null @@ -1,107 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Code generated by protoc-gen-go_gapic. DO NOT EDIT. - -package serviceusage - -import ( - "context" - "fmt" - "io" - "log/slog" - "net/http" - - "github.com/googleapis/gax-go/v2/internallog" - "github.com/googleapis/gax-go/v2/internallog/grpclog" - "google.golang.org/api/googleapi" - "google.golang.org/api/option" - "google.golang.org/grpc" - "google.golang.org/protobuf/proto" - "google.golang.org/protobuf/runtime/protoimpl" -) - -const serviceName = "serviceusage.googleapis.com" - -var protoVersion = fmt.Sprintf("1.%d", protoimpl.MaxVersion) - -// For more information on implementing a client constructor hook, see -// https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. -type clientHookParams struct{} -type clientHook func(context.Context, clientHookParams) ([]option.ClientOption, error) - -var versionClient string - -func getVersionClient() string { - if versionClient == "" { - return "UNKNOWN" - } - return versionClient -} - -// DefaultAuthScopes reports the default set of authentication scopes to use with this package. -func DefaultAuthScopes() []string { - return []string{ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only", - "https://www.googleapis.com/auth/service.management", - } -} - -func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { - logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) - resp, err := client.Do(req) - if err != nil { - return nil, nil, err - } - defer resp.Body.Close() - buf, err := io.ReadAll(resp.Body) - if err != nil { - return nil, nil, err - } - logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, buf)) - if err = googleapi.CheckResponseWithBody(resp, buf); err != nil { - return nil, nil, err - } - return buf, resp, nil -} - -func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { - buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) - return buf, err -} - -func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { - logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) - resp, err := client.Do(req) - if err != nil { - return nil, err - } - logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) - if err = googleapi.CheckResponse(resp); err != nil { - return nil, err - } - return resp, nil -} - -func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { - var zero O - logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) - resp, err := fn(ctx, req, opts...) - if err != nil { - return zero, err - } - logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) - return resp, err -} diff --git a/vendor/cloud.google.com/go/serviceusage/apiv1/service_usage_client.go b/vendor/cloud.google.com/go/serviceusage/apiv1/service_usage_client.go deleted file mode 100644 index 654db771f5..0000000000 --- a/vendor/cloud.google.com/go/serviceusage/apiv1/service_usage_client.go +++ /dev/null @@ -1,1319 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Code generated by protoc-gen-go_gapic. DO NOT EDIT. - -package serviceusage - -import ( - "bytes" - "context" - "fmt" - "log/slog" - "math" - "net/http" - "net/url" - "time" - - "cloud.google.com/go/longrunning" - lroauto "cloud.google.com/go/longrunning/autogen" - longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" - serviceusagepb "cloud.google.com/go/serviceusage/apiv1/serviceusagepb" - gax "github.com/googleapis/gax-go/v2" - "github.com/googleapis/gax-go/v2/callctx" - "google.golang.org/api/iterator" - "google.golang.org/api/option" - "google.golang.org/api/option/internaloption" - gtransport "google.golang.org/api/transport/grpc" - httptransport "google.golang.org/api/transport/http" - "google.golang.org/grpc" - "google.golang.org/protobuf/encoding/protojson" - "google.golang.org/protobuf/proto" -) - -var newClientHook clientHook - -// CallOptions contains the retry settings for each method of Client. -type CallOptions struct { - EnableService []gax.CallOption - DisableService []gax.CallOption - GetService []gax.CallOption - ListServices []gax.CallOption - BatchEnableServices []gax.CallOption - BatchGetServices []gax.CallOption - GetOperation []gax.CallOption - ListOperations []gax.CallOption -} - -func defaultGRPCClientOptions() []option.ClientOption { - return []option.ClientOption{ - internaloption.WithDefaultEndpoint("serviceusage.googleapis.com:443"), - internaloption.WithDefaultEndpointTemplate("serviceusage.UNIVERSE_DOMAIN:443"), - internaloption.WithDefaultMTLSEndpoint("serviceusage.mtls.googleapis.com:443"), - internaloption.WithDefaultUniverseDomain("googleapis.com"), - internaloption.WithDefaultAudience("https://serviceusage.googleapis.com/"), - internaloption.WithDefaultScopes(DefaultAuthScopes()...), - internaloption.EnableJwtWithScope(), - internaloption.EnableNewAuthLibrary(), - option.WithGRPCDialOption(grpc.WithDefaultCallOptions( - grpc.MaxCallRecvMsgSize(math.MaxInt32))), - } -} - -func defaultCallOptions() *CallOptions { - return &CallOptions{ - EnableService: []gax.CallOption{ - gax.WithTimeout(60000 * time.Millisecond), - }, - DisableService: []gax.CallOption{ - gax.WithTimeout(60000 * time.Millisecond), - }, - GetService: []gax.CallOption{ - gax.WithTimeout(60000 * time.Millisecond), - }, - ListServices: []gax.CallOption{ - gax.WithTimeout(60000 * time.Millisecond), - }, - BatchEnableServices: []gax.CallOption{ - gax.WithTimeout(60000 * time.Millisecond), - }, - BatchGetServices: []gax.CallOption{ - gax.WithTimeout(60000 * time.Millisecond), - }, - GetOperation: []gax.CallOption{}, - ListOperations: []gax.CallOption{}, - } -} - -func defaultRESTCallOptions() *CallOptions { - return &CallOptions{ - EnableService: []gax.CallOption{ - gax.WithTimeout(60000 * time.Millisecond), - }, - DisableService: []gax.CallOption{ - gax.WithTimeout(60000 * time.Millisecond), - }, - GetService: []gax.CallOption{ - gax.WithTimeout(60000 * time.Millisecond), - }, - ListServices: []gax.CallOption{ - gax.WithTimeout(60000 * time.Millisecond), - }, - BatchEnableServices: []gax.CallOption{ - gax.WithTimeout(60000 * time.Millisecond), - }, - BatchGetServices: []gax.CallOption{ - gax.WithTimeout(60000 * time.Millisecond), - }, - GetOperation: []gax.CallOption{}, - ListOperations: []gax.CallOption{}, - } -} - -// internalClient is an interface that defines the methods available from Service Usage API. -type internalClient interface { - Close() error - setGoogleClientInfo(...string) - Connection() *grpc.ClientConn - EnableService(context.Context, *serviceusagepb.EnableServiceRequest, ...gax.CallOption) (*EnableServiceOperation, error) - EnableServiceOperation(name string) *EnableServiceOperation - DisableService(context.Context, *serviceusagepb.DisableServiceRequest, ...gax.CallOption) (*DisableServiceOperation, error) - DisableServiceOperation(name string) *DisableServiceOperation - GetService(context.Context, *serviceusagepb.GetServiceRequest, ...gax.CallOption) (*serviceusagepb.Service, error) - ListServices(context.Context, *serviceusagepb.ListServicesRequest, ...gax.CallOption) *ServiceIterator - BatchEnableServices(context.Context, *serviceusagepb.BatchEnableServicesRequest, ...gax.CallOption) (*BatchEnableServicesOperation, error) - BatchEnableServicesOperation(name string) *BatchEnableServicesOperation - BatchGetServices(context.Context, *serviceusagepb.BatchGetServicesRequest, ...gax.CallOption) (*serviceusagepb.BatchGetServicesResponse, error) - GetOperation(context.Context, *longrunningpb.GetOperationRequest, ...gax.CallOption) (*longrunningpb.Operation, error) - ListOperations(context.Context, *longrunningpb.ListOperationsRequest, ...gax.CallOption) *OperationIterator -} - -// Client is a client for interacting with Service Usage API. -// Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. -// -// Enables services that service consumers want to use on Google Cloud Platform, -// lists the available or enabled services, or disables services that service -// consumers no longer use. -// -// See Service Usage API (at https://cloud.google.com/service-usage/docs/overview) -type Client struct { - // The internal transport-dependent client. - internalClient internalClient - - // The call options for this service. - CallOptions *CallOptions - - // LROClient is used internally to handle long-running operations. - // It is exposed so that its CallOptions can be modified if required. - // Users should not Close this client. - LROClient *lroauto.OperationsClient -} - -// Wrapper methods routed to the internal client. - -// Close closes the connection to the API service. The user should invoke this when -// the client is no longer required. -func (c *Client) Close() error { - return c.internalClient.Close() -} - -// setGoogleClientInfo sets the name and version of the application in -// the `x-goog-api-client` header passed on each request. Intended for -// use by Google-written clients. -func (c *Client) setGoogleClientInfo(keyval ...string) { - c.internalClient.setGoogleClientInfo(keyval...) -} - -// Connection returns a connection to the API service. -// -// Deprecated: Connections are now pooled so this method does not always -// return the same resource. -func (c *Client) Connection() *grpc.ClientConn { - return c.internalClient.Connection() -} - -// EnableService enable a service so that it can be used with a project. -func (c *Client) EnableService(ctx context.Context, req *serviceusagepb.EnableServiceRequest, opts ...gax.CallOption) (*EnableServiceOperation, error) { - return c.internalClient.EnableService(ctx, req, opts...) -} - -// EnableServiceOperation returns a new EnableServiceOperation from a given name. -// The name must be that of a previously created EnableServiceOperation, possibly from a different process. -func (c *Client) EnableServiceOperation(name string) *EnableServiceOperation { - return c.internalClient.EnableServiceOperation(name) -} - -// DisableService disable a service so that it can no longer be used with a project. -// This prevents unintended usage that may cause unexpected billing -// charges or security leaks. -// -// It is not valid to call the disable method on a service that is not -// currently enabled. Callers will receive a FAILED_PRECONDITION status if -// the target service is not currently enabled. -func (c *Client) DisableService(ctx context.Context, req *serviceusagepb.DisableServiceRequest, opts ...gax.CallOption) (*DisableServiceOperation, error) { - return c.internalClient.DisableService(ctx, req, opts...) -} - -// DisableServiceOperation returns a new DisableServiceOperation from a given name. -// The name must be that of a previously created DisableServiceOperation, possibly from a different process. -func (c *Client) DisableServiceOperation(name string) *DisableServiceOperation { - return c.internalClient.DisableServiceOperation(name) -} - -// GetService returns the service configuration and enabled state for a given service. -func (c *Client) GetService(ctx context.Context, req *serviceusagepb.GetServiceRequest, opts ...gax.CallOption) (*serviceusagepb.Service, error) { - return c.internalClient.GetService(ctx, req, opts...) -} - -// ListServices list all services available to the specified project, and the current -// state of those services with respect to the project. The list includes -// all public services, all services for which the calling user has the -// servicemanagement.services.bind permission, and all services that have -// already been enabled on the project. The list can be filtered to -// only include services in a specific state, for example to only include -// services enabled on the project. -// -// WARNING: If you need to query enabled services frequently or across -// an organization, you should use -// Cloud Asset Inventory -// API (at https://cloud.google.com/asset-inventory/docs/apis), which provides -// higher throughput and richer filtering capability. -func (c *Client) ListServices(ctx context.Context, req *serviceusagepb.ListServicesRequest, opts ...gax.CallOption) *ServiceIterator { - return c.internalClient.ListServices(ctx, req, opts...) -} - -// BatchEnableServices enable multiple services on a project. The operation is atomic: if enabling -// any service fails, then the entire batch fails, and no state changes occur. -// To enable a single service, use the EnableService method instead. -func (c *Client) BatchEnableServices(ctx context.Context, req *serviceusagepb.BatchEnableServicesRequest, opts ...gax.CallOption) (*BatchEnableServicesOperation, error) { - return c.internalClient.BatchEnableServices(ctx, req, opts...) -} - -// BatchEnableServicesOperation returns a new BatchEnableServicesOperation from a given name. -// The name must be that of a previously created BatchEnableServicesOperation, possibly from a different process. -func (c *Client) BatchEnableServicesOperation(name string) *BatchEnableServicesOperation { - return c.internalClient.BatchEnableServicesOperation(name) -} - -// BatchGetServices returns the service configurations and enabled states for a given list of -// services. -func (c *Client) BatchGetServices(ctx context.Context, req *serviceusagepb.BatchGetServicesRequest, opts ...gax.CallOption) (*serviceusagepb.BatchGetServicesResponse, error) { - return c.internalClient.BatchGetServices(ctx, req, opts...) -} - -// GetOperation is a utility method from google.longrunning.Operations. -func (c *Client) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { - return c.internalClient.GetOperation(ctx, req, opts...) -} - -// ListOperations is a utility method from google.longrunning.Operations. -func (c *Client) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator { - return c.internalClient.ListOperations(ctx, req, opts...) -} - -// gRPCClient is a client for interacting with Service Usage API over gRPC transport. -// -// Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. -type gRPCClient struct { - // Connection pool of gRPC connections to the service. - connPool gtransport.ConnPool - - // Points back to the CallOptions field of the containing Client - CallOptions **CallOptions - - // The gRPC API client. - client serviceusagepb.ServiceUsageClient - - // LROClient is used internally to handle long-running operations. - // It is exposed so that its CallOptions can be modified if required. - // Users should not Close this client. - LROClient **lroauto.OperationsClient - - operationsClient longrunningpb.OperationsClient - - // The x-goog-* metadata to be sent with each request. - xGoogHeaders []string - - logger *slog.Logger -} - -// NewClient creates a new service usage client based on gRPC. -// The returned client must be Closed when it is done being used to clean up its underlying connections. -// -// Enables services that service consumers want to use on Google Cloud Platform, -// lists the available or enabled services, or disables services that service -// consumers no longer use. -// -// See Service Usage API (at https://cloud.google.com/service-usage/docs/overview) -func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error) { - clientOpts := defaultGRPCClientOptions() - if gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - clientOpts = append(clientOpts, internaloption.WithTelemetryAttributes(map[string]string{ - "gcp.client.service": "serviceusage", - "gcp.client.version": getVersionClient(), - "gcp.client.repo": "googleapis/google-cloud-go", - "gcp.client.artifact": "cloud.google.com/go/serviceusage/apiv1", - "gcp.client.language": "go", - "url.domain": "serviceusage.googleapis.com", - })) - } - if newClientHook != nil { - hookOpts, err := newClientHook(ctx, clientHookParams{}) - if err != nil { - return nil, err - } - clientOpts = append(clientOpts, hookOpts...) - } - - connPool, err := gtransport.DialPool(ctx, append(clientOpts, opts...)...) - if err != nil { - return nil, err - } - client := Client{CallOptions: defaultCallOptions()} - - c := &gRPCClient{ - connPool: connPool, - client: serviceusagepb.NewServiceUsageClient(connPool), - CallOptions: &client.CallOptions, - logger: internaloption.GetLogger(opts), - operationsClient: longrunningpb.NewOperationsClient(connPool), - } - c.setGoogleClientInfo() - if gax.IsFeatureEnabled("METRICS") { - metrics := gax.NewClientMetrics( - gax.WithTelemetryLogger(c.logger), - gax.WithTelemetryAttributes(map[string]string{ - gax.ClientService: "serviceusage", - gax.ClientVersion: getVersionClient(), - gax.ClientArtifact: "cloud.google.com/go/serviceusage/apiv1", - gax.RPCSystem: "grpc", - gax.URLDomain: "serviceusage.googleapis.com", - }), - ) - - client.CallOptions.EnableService = append(client.CallOptions.EnableService, gax.WithClientMetrics(metrics)) - client.CallOptions.DisableService = append(client.CallOptions.DisableService, gax.WithClientMetrics(metrics)) - client.CallOptions.GetService = append(client.CallOptions.GetService, gax.WithClientMetrics(metrics)) - client.CallOptions.ListServices = append(client.CallOptions.ListServices, gax.WithClientMetrics(metrics)) - client.CallOptions.BatchEnableServices = append(client.CallOptions.BatchEnableServices, gax.WithClientMetrics(metrics)) - client.CallOptions.BatchGetServices = append(client.CallOptions.BatchGetServices, gax.WithClientMetrics(metrics)) - client.CallOptions.GetOperation = append(client.CallOptions.GetOperation, gax.WithClientMetrics(metrics)) - client.CallOptions.ListOperations = append(client.CallOptions.ListOperations, gax.WithClientMetrics(metrics)) - } - - client.internalClient = c - - client.LROClient, err = lroauto.NewOperationsClient(ctx, gtransport.WithConnPool(connPool)) - if err != nil { - // This error "should not happen", since we are just reusing old connection pool - // and never actually need to dial. - // If this does happen, we could leak connp. However, we cannot close conn: - // If the user invoked the constructor with option.WithGRPCConn, - // we would close a connection that's still in use. - // TODO: investigate error conditions. - return nil, err - } - c.LROClient = &client.LROClient - return &client, nil -} - -// Connection returns a connection to the API service. -// -// Deprecated: Connections are now pooled so this method does not always -// return the same resource. -func (c *gRPCClient) Connection() *grpc.ClientConn { - return c.connPool.Conn() -} - -// setGoogleClientInfo sets the name and version of the application in -// the `x-goog-api-client` header passed on each request. Intended for -// use by Google-written clients. -func (c *gRPCClient) setGoogleClientInfo(keyval ...string) { - kv := append([]string{"gl-go", gax.GoVersion}, keyval...) - kv = append(kv, "gapic", getVersionClient(), "gax", gax.Version, "grpc", grpc.Version, "pb", protoVersion) - c.xGoogHeaders = []string{ - "x-goog-api-client", gax.XGoogHeader(kv...), - } -} - -// Close closes the connection to the API service. The user should invoke this when -// the client is no longer required. -func (c *gRPCClient) Close() error { - return c.connPool.Close() -} - -// Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. -type restClient struct { - // The http endpoint to connect to. - endpoint string - - // The http client. - httpClient *http.Client - - // LROClient is used internally to handle long-running operations. - // It is exposed so that its CallOptions can be modified if required. - // Users should not Close this client. - LROClient **lroauto.OperationsClient - - // The x-goog-* headers to be sent with each request. - xGoogHeaders []string - - // Points back to the CallOptions field of the containing Client - CallOptions **CallOptions - - logger *slog.Logger -} - -// NewRESTClient creates a new service usage rest client. -// -// Enables services that service consumers want to use on Google Cloud Platform, -// lists the available or enabled services, or disables services that service -// consumers no longer use. -// -// See Service Usage API (at https://cloud.google.com/service-usage/docs/overview) -func NewRESTClient(ctx context.Context, opts ...option.ClientOption) (*Client, error) { - clientOpts := append(defaultRESTClientOptions(), opts...) - if gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - clientOpts = append(clientOpts, internaloption.WithTelemetryAttributes(map[string]string{ - "gcp.client.service": "serviceusage", - "gcp.client.version": getVersionClient(), - "gcp.client.repo": "googleapis/google-cloud-go", - "gcp.client.artifact": "cloud.google.com/go/serviceusage/apiv1", - "gcp.client.language": "go", - "url.domain": "serviceusage.googleapis.com", - })) - } - httpClient, endpoint, err := httptransport.NewClient(ctx, clientOpts...) - if err != nil { - return nil, err - } - - callOpts := defaultRESTCallOptions() - c := &restClient{ - endpoint: endpoint, - httpClient: httpClient, - CallOptions: &callOpts, - logger: internaloption.GetLogger(opts), - } - c.setGoogleClientInfo() - - if gax.IsFeatureEnabled("METRICS") { - metrics := gax.NewClientMetrics( - gax.WithTelemetryLogger(c.logger), - gax.WithTelemetryAttributes(map[string]string{ - gax.ClientService: "serviceusage", - gax.ClientVersion: getVersionClient(), - gax.ClientArtifact: "cloud.google.com/go/serviceusage/apiv1", - gax.RPCSystem: "http", - gax.URLDomain: "serviceusage.googleapis.com", - }), - ) - - callOpts.EnableService = append(callOpts.EnableService, gax.WithClientMetrics(metrics)) - callOpts.DisableService = append(callOpts.DisableService, gax.WithClientMetrics(metrics)) - callOpts.GetService = append(callOpts.GetService, gax.WithClientMetrics(metrics)) - callOpts.ListServices = append(callOpts.ListServices, gax.WithClientMetrics(metrics)) - callOpts.BatchEnableServices = append(callOpts.BatchEnableServices, gax.WithClientMetrics(metrics)) - callOpts.BatchGetServices = append(callOpts.BatchGetServices, gax.WithClientMetrics(metrics)) - callOpts.GetOperation = append(callOpts.GetOperation, gax.WithClientMetrics(metrics)) - callOpts.ListOperations = append(callOpts.ListOperations, gax.WithClientMetrics(metrics)) - } - - lroOpts := []option.ClientOption{ - option.WithHTTPClient(httpClient), - option.WithEndpoint(endpoint), - } - opClient, err := lroauto.NewOperationsRESTClient(ctx, lroOpts...) - if err != nil { - return nil, err - } - c.LROClient = &opClient - - return &Client{internalClient: c, CallOptions: callOpts}, nil -} - -func defaultRESTClientOptions() []option.ClientOption { - return []option.ClientOption{ - internaloption.WithDefaultEndpoint("https://serviceusage.googleapis.com"), - internaloption.WithDefaultEndpointTemplate("https://serviceusage.UNIVERSE_DOMAIN"), - internaloption.WithDefaultMTLSEndpoint("https://serviceusage.mtls.googleapis.com"), - internaloption.WithDefaultUniverseDomain("googleapis.com"), - internaloption.WithDefaultAudience("https://serviceusage.googleapis.com/"), - internaloption.WithDefaultScopes(DefaultAuthScopes()...), - internaloption.EnableNewAuthLibrary(), - } -} - -// setGoogleClientInfo sets the name and version of the application in -// the `x-goog-api-client` header passed on each request. Intended for -// use by Google-written clients. -func (c *restClient) setGoogleClientInfo(keyval ...string) { - kv := append([]string{"gl-go", gax.GoVersion}, keyval...) - kv = append(kv, "gapic", getVersionClient(), "gax", gax.Version, "rest", "UNKNOWN", "pb", protoVersion) - c.xGoogHeaders = []string{ - "x-goog-api-client", gax.XGoogHeader(kv...), - } -} - -// Close closes the connection to the API service. The user should invoke this when -// the client is no longer required. -func (c *restClient) Close() error { - // Replace httpClient with nil to force cleanup. - c.httpClient = nil - return nil -} - -// Connection returns a connection to the API service. -// -// Deprecated: This method always returns nil. -func (c *restClient) Connection() *grpc.ClientConn { - return nil -} -func (c *gRPCClient) EnableService(ctx context.Context, req *serviceusagepb.EnableServiceRequest, opts ...gax.CallOption) (*EnableServiceOperation, error) { - hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))} - - hds = append(c.xGoogHeaders, hds...) - ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) - if gax.IsFeatureEnabled("METRICS") || gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "rpc_method", "google.api.serviceusage.v1.ServiceUsage/EnableService") - } - opts = append((*c.CallOptions).EnableService[0:len((*c.CallOptions).EnableService):len((*c.CallOptions).EnableService)], opts...) - var resp *longrunningpb.Operation - err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - var err error - resp, err = executeRPC(ctx, c.client.EnableService, req, settings.GRPC, c.logger, "EnableService") - return err - }, opts...) - if err != nil { - return nil, err - } - return &EnableServiceOperation{ - lro: longrunning.InternalNewOperation(*c.LROClient, resp), - }, nil -} - -func (c *gRPCClient) DisableService(ctx context.Context, req *serviceusagepb.DisableServiceRequest, opts ...gax.CallOption) (*DisableServiceOperation, error) { - hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))} - - hds = append(c.xGoogHeaders, hds...) - ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) - if gax.IsFeatureEnabled("METRICS") || gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "rpc_method", "google.api.serviceusage.v1.ServiceUsage/DisableService") - } - opts = append((*c.CallOptions).DisableService[0:len((*c.CallOptions).DisableService):len((*c.CallOptions).DisableService)], opts...) - var resp *longrunningpb.Operation - err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - var err error - resp, err = executeRPC(ctx, c.client.DisableService, req, settings.GRPC, c.logger, "DisableService") - return err - }, opts...) - if err != nil { - return nil, err - } - return &DisableServiceOperation{ - lro: longrunning.InternalNewOperation(*c.LROClient, resp), - }, nil -} - -func (c *gRPCClient) GetService(ctx context.Context, req *serviceusagepb.GetServiceRequest, opts ...gax.CallOption) (*serviceusagepb.Service, error) { - hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))} - - hds = append(c.xGoogHeaders, hds...) - ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) - if gax.IsFeatureEnabled("METRICS") || gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "rpc_method", "google.api.serviceusage.v1.ServiceUsage/GetService") - } - opts = append((*c.CallOptions).GetService[0:len((*c.CallOptions).GetService):len((*c.CallOptions).GetService)], opts...) - var resp *serviceusagepb.Service - err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - var err error - resp, err = executeRPC(ctx, c.client.GetService, req, settings.GRPC, c.logger, "GetService") - return err - }, opts...) - if err != nil { - return nil, err - } - return resp, nil -} - -func (c *gRPCClient) ListServices(ctx context.Context, req *serviceusagepb.ListServicesRequest, opts ...gax.CallOption) *ServiceIterator { - hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))} - - hds = append(c.xGoogHeaders, hds...) - ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) - if gax.IsFeatureEnabled("METRICS") || gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "rpc_method", "google.api.serviceusage.v1.ServiceUsage/ListServices") - } - opts = append((*c.CallOptions).ListServices[0:len((*c.CallOptions).ListServices):len((*c.CallOptions).ListServices)], opts...) - it := &ServiceIterator{} - req = proto.CloneOf(req) - it.InternalFetch = func(pageSize int, pageToken string) ([]*serviceusagepb.Service, string, error) { - resp := &serviceusagepb.ListServicesResponse{} - if pageToken != "" { - req.PageToken = pageToken - } - if pageSize > math.MaxInt32 { - req.PageSize = math.MaxInt32 - } else if pageSize != 0 { - req.PageSize = int32(pageSize) - } - err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - var err error - resp, err = executeRPC(ctx, c.client.ListServices, req, settings.GRPC, c.logger, "ListServices") - return err - }, opts...) - if err != nil { - return nil, "", err - } - - it.Response = resp - return resp.GetServices(), resp.GetNextPageToken(), nil - } - fetch := func(pageSize int, pageToken string) (string, error) { - items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) - if err != nil { - return "", err - } - it.items = append(it.items, items...) - return nextPageToken, nil - } - - it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) - it.pageInfo.MaxSize = int(req.GetPageSize()) - it.pageInfo.Token = req.GetPageToken() - - return it -} - -func (c *gRPCClient) BatchEnableServices(ctx context.Context, req *serviceusagepb.BatchEnableServicesRequest, opts ...gax.CallOption) (*BatchEnableServicesOperation, error) { - hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))} - - hds = append(c.xGoogHeaders, hds...) - ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) - if gax.IsFeatureEnabled("METRICS") || gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "rpc_method", "google.api.serviceusage.v1.ServiceUsage/BatchEnableServices") - } - opts = append((*c.CallOptions).BatchEnableServices[0:len((*c.CallOptions).BatchEnableServices):len((*c.CallOptions).BatchEnableServices)], opts...) - var resp *longrunningpb.Operation - err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - var err error - resp, err = executeRPC(ctx, c.client.BatchEnableServices, req, settings.GRPC, c.logger, "BatchEnableServices") - return err - }, opts...) - if err != nil { - return nil, err - } - return &BatchEnableServicesOperation{ - lro: longrunning.InternalNewOperation(*c.LROClient, resp), - }, nil -} - -func (c *gRPCClient) BatchGetServices(ctx context.Context, req *serviceusagepb.BatchGetServicesRequest, opts ...gax.CallOption) (*serviceusagepb.BatchGetServicesResponse, error) { - hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))} - - hds = append(c.xGoogHeaders, hds...) - ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) - if gax.IsFeatureEnabled("METRICS") || gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "rpc_method", "google.api.serviceusage.v1.ServiceUsage/BatchGetServices") - } - opts = append((*c.CallOptions).BatchGetServices[0:len((*c.CallOptions).BatchGetServices):len((*c.CallOptions).BatchGetServices)], opts...) - var resp *serviceusagepb.BatchGetServicesResponse - err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - var err error - resp, err = executeRPC(ctx, c.client.BatchGetServices, req, settings.GRPC, c.logger, "BatchGetServices") - return err - }, opts...) - if err != nil { - return nil, err - } - return resp, nil -} - -func (c *gRPCClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { - hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))} - - hds = append(c.xGoogHeaders, hds...) - ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) - if gax.IsFeatureEnabled("METRICS") || gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "rpc_method", "google.longrunning.Operations/GetOperation") - } - opts = append((*c.CallOptions).GetOperation[0:len((*c.CallOptions).GetOperation):len((*c.CallOptions).GetOperation)], opts...) - var resp *longrunningpb.Operation - err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - var err error - resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") - return err - }, opts...) - if err != nil { - return nil, err - } - return resp, nil -} - -func (c *gRPCClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator { - ctx = gax.InsertMetadataIntoOutgoingContext(ctx, c.xGoogHeaders...) - if gax.IsFeatureEnabled("METRICS") || gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "rpc_method", "google.longrunning.Operations/ListOperations") - } - opts = append((*c.CallOptions).ListOperations[0:len((*c.CallOptions).ListOperations):len((*c.CallOptions).ListOperations)], opts...) - it := &OperationIterator{} - req = proto.CloneOf(req) - it.InternalFetch = func(pageSize int, pageToken string) ([]*longrunningpb.Operation, string, error) { - resp := &longrunningpb.ListOperationsResponse{} - if pageToken != "" { - req.PageToken = pageToken - } - if pageSize > math.MaxInt32 { - req.PageSize = math.MaxInt32 - } else if pageSize != 0 { - req.PageSize = int32(pageSize) - } - err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - var err error - resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") - return err - }, opts...) - if err != nil { - return nil, "", err - } - - it.Response = resp - return resp.GetOperations(), resp.GetNextPageToken(), nil - } - fetch := func(pageSize int, pageToken string) (string, error) { - items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) - if err != nil { - return "", err - } - it.items = append(it.items, items...) - return nextPageToken, nil - } - - it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) - it.pageInfo.MaxSize = int(req.GetPageSize()) - it.pageInfo.Token = req.GetPageToken() - - return it -} - -// EnableService enable a service so that it can be used with a project. -func (c *restClient) EnableService(ctx context.Context, req *serviceusagepb.EnableServiceRequest, opts ...gax.CallOption) (*EnableServiceOperation, error) { - m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} - jsonReq, err := m.Marshal(req) - if err != nil { - return nil, err - } - - baseUrl, err := url.Parse(c.endpoint) - if err != nil { - return nil, err - } - baseUrl.Path += fmt.Sprintf("/v1/%v:enable", req.GetName()) - - // Build HTTP headers from client and context metadata. - hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))} - - hds = append(c.xGoogHeaders, hds...) - hds = append(hds, "Content-Type", "application/json") - headers := gax.BuildHeaders(ctx, hds...) - if gax.IsFeatureEnabled("METRICS") || gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "rpc_method", "google.api.serviceusage.v1.ServiceUsage/EnableService") - ctx = callctx.WithTelemetryContext(ctx, "url_template", "/v1/{name=*/*/services/*}:enable") - } - unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} - resp := &longrunningpb.Operation{} - e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - if settings.Path != "" { - baseUrl.Path = settings.Path - } - httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) - if err != nil { - return err - } - httpReq = httpReq.WithContext(ctx) - httpReq.Header = headers - - buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "EnableService") - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { - return err - } - - return nil - }, opts...) - if e != nil { - return nil, e - } - - override := fmt.Sprintf("/v1/%s", resp.GetName()) - return &EnableServiceOperation{ - lro: longrunning.InternalNewOperation(*c.LROClient, resp), - pollPath: override, - }, nil -} - -// DisableService disable a service so that it can no longer be used with a project. -// This prevents unintended usage that may cause unexpected billing -// charges or security leaks. -// -// It is not valid to call the disable method on a service that is not -// currently enabled. Callers will receive a FAILED_PRECONDITION status if -// the target service is not currently enabled. -func (c *restClient) DisableService(ctx context.Context, req *serviceusagepb.DisableServiceRequest, opts ...gax.CallOption) (*DisableServiceOperation, error) { - m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} - jsonReq, err := m.Marshal(req) - if err != nil { - return nil, err - } - - baseUrl, err := url.Parse(c.endpoint) - if err != nil { - return nil, err - } - baseUrl.Path += fmt.Sprintf("/v1/%v:disable", req.GetName()) - - // Build HTTP headers from client and context metadata. - hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))} - - hds = append(c.xGoogHeaders, hds...) - hds = append(hds, "Content-Type", "application/json") - headers := gax.BuildHeaders(ctx, hds...) - if gax.IsFeatureEnabled("METRICS") || gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "rpc_method", "google.api.serviceusage.v1.ServiceUsage/DisableService") - ctx = callctx.WithTelemetryContext(ctx, "url_template", "/v1/{name=*/*/services/*}:disable") - } - unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} - resp := &longrunningpb.Operation{} - e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - if settings.Path != "" { - baseUrl.Path = settings.Path - } - httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) - if err != nil { - return err - } - httpReq = httpReq.WithContext(ctx) - httpReq.Header = headers - - buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "DisableService") - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { - return err - } - - return nil - }, opts...) - if e != nil { - return nil, e - } - - override := fmt.Sprintf("/v1/%s", resp.GetName()) - return &DisableServiceOperation{ - lro: longrunning.InternalNewOperation(*c.LROClient, resp), - pollPath: override, - }, nil -} - -// GetService returns the service configuration and enabled state for a given service. -func (c *restClient) GetService(ctx context.Context, req *serviceusagepb.GetServiceRequest, opts ...gax.CallOption) (*serviceusagepb.Service, error) { - baseUrl, err := url.Parse(c.endpoint) - if err != nil { - return nil, err - } - baseUrl.Path += fmt.Sprintf("/v1/%v", req.GetName()) - - // Build HTTP headers from client and context metadata. - hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))} - - hds = append(c.xGoogHeaders, hds...) - hds = append(hds, "Content-Type", "application/json") - headers := gax.BuildHeaders(ctx, hds...) - if gax.IsFeatureEnabled("METRICS") || gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "rpc_method", "google.api.serviceusage.v1.ServiceUsage/GetService") - ctx = callctx.WithTelemetryContext(ctx, "url_template", "/v1/{name=*/*/services/*}") - } - opts = append((*c.CallOptions).GetService[0:len((*c.CallOptions).GetService):len((*c.CallOptions).GetService)], opts...) - unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} - resp := &serviceusagepb.Service{} - e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - if settings.Path != "" { - baseUrl.Path = settings.Path - } - httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) - if err != nil { - return err - } - httpReq = httpReq.WithContext(ctx) - httpReq.Header = headers - - buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetService") - if err != nil { - return err - } - - if err := unm.Unmarshal(buf, resp); err != nil { - return err - } - - return nil - }, opts...) - if e != nil { - return nil, e - } - return resp, nil -} - -// ListServices list all services available to the specified project, and the current -// state of those services with respect to the project. The list includes -// all public services, all services for which the calling user has the -// servicemanagement.services.bind permission, and all services that have -// already been enabled on the project. The list can be filtered to -// only include services in a specific state, for example to only include -// services enabled on the project. -// -// WARNING: If you need to query enabled services frequently or across -// an organization, you should use -// Cloud Asset Inventory -// API (at https://cloud.google.com/asset-inventory/docs/apis), which provides -// higher throughput and richer filtering capability. -func (c *restClient) ListServices(ctx context.Context, req *serviceusagepb.ListServicesRequest, opts ...gax.CallOption) *ServiceIterator { - it := &ServiceIterator{} - req = proto.CloneOf(req) - unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} - it.InternalFetch = func(pageSize int, pageToken string) ([]*serviceusagepb.Service, string, error) { - resp := &serviceusagepb.ListServicesResponse{} - if pageToken != "" { - req.PageToken = pageToken - } - if pageSize > math.MaxInt32 { - req.PageSize = math.MaxInt32 - } else if pageSize != 0 { - req.PageSize = int32(pageSize) - } - baseUrl, err := url.Parse(c.endpoint) - if err != nil { - return nil, "", err - } - baseUrl.Path += fmt.Sprintf("/v1/%v/services", req.GetParent()) - - params := url.Values{} - if req.GetFilter() != "" { - params.Add("filter", fmt.Sprintf("%v", req.GetFilter())) - } - if req.GetPageSize() != 0 { - params.Add("pageSize", fmt.Sprintf("%v", req.GetPageSize())) - } - if req.GetPageToken() != "" { - params.Add("pageToken", fmt.Sprintf("%v", req.GetPageToken())) - } - - baseUrl.RawQuery = params.Encode() - - // Build HTTP headers from client and context metadata. - hds := append(c.xGoogHeaders, "Content-Type", "application/json") - headers := gax.BuildHeaders(ctx, hds...) - e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - if settings.Path != "" { - baseUrl.Path = settings.Path - } - httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) - if err != nil { - return err - } - httpReq.Header = headers - - buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListServices") - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { - return err - } - - return nil - }, opts...) - if e != nil { - return nil, "", e - } - it.Response = resp - return resp.GetServices(), resp.GetNextPageToken(), nil - } - - fetch := func(pageSize int, pageToken string) (string, error) { - items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) - if err != nil { - return "", err - } - it.items = append(it.items, items...) - return nextPageToken, nil - } - - it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) - it.pageInfo.MaxSize = int(req.GetPageSize()) - it.pageInfo.Token = req.GetPageToken() - - return it -} - -// BatchEnableServices enable multiple services on a project. The operation is atomic: if enabling -// any service fails, then the entire batch fails, and no state changes occur. -// To enable a single service, use the EnableService method instead. -func (c *restClient) BatchEnableServices(ctx context.Context, req *serviceusagepb.BatchEnableServicesRequest, opts ...gax.CallOption) (*BatchEnableServicesOperation, error) { - m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} - jsonReq, err := m.Marshal(req) - if err != nil { - return nil, err - } - - baseUrl, err := url.Parse(c.endpoint) - if err != nil { - return nil, err - } - baseUrl.Path += fmt.Sprintf("/v1/%v/services:batchEnable", req.GetParent()) - - // Build HTTP headers from client and context metadata. - hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))} - - hds = append(c.xGoogHeaders, hds...) - hds = append(hds, "Content-Type", "application/json") - headers := gax.BuildHeaders(ctx, hds...) - if gax.IsFeatureEnabled("METRICS") || gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "rpc_method", "google.api.serviceusage.v1.ServiceUsage/BatchEnableServices") - ctx = callctx.WithTelemetryContext(ctx, "url_template", "/v1/{parent=*/*}/services:batchEnable") - } - unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} - resp := &longrunningpb.Operation{} - e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - if settings.Path != "" { - baseUrl.Path = settings.Path - } - httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) - if err != nil { - return err - } - httpReq = httpReq.WithContext(ctx) - httpReq.Header = headers - - buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "BatchEnableServices") - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { - return err - } - - return nil - }, opts...) - if e != nil { - return nil, e - } - - override := fmt.Sprintf("/v1/%s", resp.GetName()) - return &BatchEnableServicesOperation{ - lro: longrunning.InternalNewOperation(*c.LROClient, resp), - pollPath: override, - }, nil -} - -// BatchGetServices returns the service configurations and enabled states for a given list of -// services. -func (c *restClient) BatchGetServices(ctx context.Context, req *serviceusagepb.BatchGetServicesRequest, opts ...gax.CallOption) (*serviceusagepb.BatchGetServicesResponse, error) { - baseUrl, err := url.Parse(c.endpoint) - if err != nil { - return nil, err - } - baseUrl.Path += fmt.Sprintf("/v1/%v/services:batchGet", req.GetParent()) - - params := url.Values{} - if items := req.GetNames(); len(items) > 0 { - for _, item := range items { - params.Add("names", fmt.Sprintf("%v", item)) - } - } - - baseUrl.RawQuery = params.Encode() - - // Build HTTP headers from client and context metadata. - hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))} - - hds = append(c.xGoogHeaders, hds...) - hds = append(hds, "Content-Type", "application/json") - headers := gax.BuildHeaders(ctx, hds...) - if gax.IsFeatureEnabled("METRICS") || gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "rpc_method", "google.api.serviceusage.v1.ServiceUsage/BatchGetServices") - ctx = callctx.WithTelemetryContext(ctx, "url_template", "/v1/{parent=*/*}/services:batchGet") - } - opts = append((*c.CallOptions).BatchGetServices[0:len((*c.CallOptions).BatchGetServices):len((*c.CallOptions).BatchGetServices)], opts...) - unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} - resp := &serviceusagepb.BatchGetServicesResponse{} - e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - if settings.Path != "" { - baseUrl.Path = settings.Path - } - httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) - if err != nil { - return err - } - httpReq = httpReq.WithContext(ctx) - httpReq.Header = headers - - buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "BatchGetServices") - if err != nil { - return err - } - - if err := unm.Unmarshal(buf, resp); err != nil { - return err - } - - return nil - }, opts...) - if e != nil { - return nil, e - } - return resp, nil -} - -// GetOperation is a utility method from google.longrunning.Operations. -func (c *restClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { - baseUrl, err := url.Parse(c.endpoint) - if err != nil { - return nil, err - } - baseUrl.Path += fmt.Sprintf("/v1/%v", req.GetName()) - - // Build HTTP headers from client and context metadata. - hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))} - - hds = append(c.xGoogHeaders, hds...) - hds = append(hds, "Content-Type", "application/json") - headers := gax.BuildHeaders(ctx, hds...) - if gax.IsFeatureEnabled("METRICS") || gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { - ctx = callctx.WithTelemetryContext(ctx, "rpc_method", "google.longrunning.Operations/GetOperation") - ctx = callctx.WithTelemetryContext(ctx, "url_template", "/v1/{name=operations/*}") - } - opts = append((*c.CallOptions).GetOperation[0:len((*c.CallOptions).GetOperation):len((*c.CallOptions).GetOperation)], opts...) - unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} - resp := &longrunningpb.Operation{} - e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - if settings.Path != "" { - baseUrl.Path = settings.Path - } - httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) - if err != nil { - return err - } - httpReq = httpReq.WithContext(ctx) - httpReq.Header = headers - - buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") - if err != nil { - return err - } - - if err := unm.Unmarshal(buf, resp); err != nil { - return err - } - - return nil - }, opts...) - if e != nil { - return nil, e - } - return resp, nil -} - -// ListOperations is a utility method from google.longrunning.Operations. -func (c *restClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator { - it := &OperationIterator{} - req = proto.CloneOf(req) - unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} - it.InternalFetch = func(pageSize int, pageToken string) ([]*longrunningpb.Operation, string, error) { - resp := &longrunningpb.ListOperationsResponse{} - if pageToken != "" { - req.PageToken = pageToken - } - if pageSize > math.MaxInt32 { - req.PageSize = math.MaxInt32 - } else if pageSize != 0 { - req.PageSize = int32(pageSize) - } - baseUrl, err := url.Parse(c.endpoint) - if err != nil { - return nil, "", err - } - baseUrl.Path += fmt.Sprintf("/v1/operations") - - params := url.Values{} - if req.GetFilter() != "" { - params.Add("filter", fmt.Sprintf("%v", req.GetFilter())) - } - if req.GetName() != "" { - params.Add("name", fmt.Sprintf("%v", req.GetName())) - } - if req.GetPageSize() != 0 { - params.Add("pageSize", fmt.Sprintf("%v", req.GetPageSize())) - } - if req.GetPageToken() != "" { - params.Add("pageToken", fmt.Sprintf("%v", req.GetPageToken())) - } - if req.GetReturnPartialSuccess() { - params.Add("returnPartialSuccess", fmt.Sprintf("%v", req.GetReturnPartialSuccess())) - } - - baseUrl.RawQuery = params.Encode() - - // Build HTTP headers from client and context metadata. - hds := append(c.xGoogHeaders, "Content-Type", "application/json") - headers := gax.BuildHeaders(ctx, hds...) - e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - if settings.Path != "" { - baseUrl.Path = settings.Path - } - httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) - if err != nil { - return err - } - httpReq.Header = headers - - buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { - return err - } - - return nil - }, opts...) - if e != nil { - return nil, "", e - } - it.Response = resp - return resp.GetOperations(), resp.GetNextPageToken(), nil - } - - fetch := func(pageSize int, pageToken string) (string, error) { - items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) - if err != nil { - return "", err - } - it.items = append(it.items, items...) - return nextPageToken, nil - } - - it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) - it.pageInfo.MaxSize = int(req.GetPageSize()) - it.pageInfo.Token = req.GetPageToken() - - return it -} - -// BatchEnableServicesOperation returns a new BatchEnableServicesOperation from a given name. -// The name must be that of a previously created BatchEnableServicesOperation, possibly from a different process. -func (c *gRPCClient) BatchEnableServicesOperation(name string) *BatchEnableServicesOperation { - return &BatchEnableServicesOperation{ - lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), - } -} - -// BatchEnableServicesOperation returns a new BatchEnableServicesOperation from a given name. -// The name must be that of a previously created BatchEnableServicesOperation, possibly from a different process. -func (c *restClient) BatchEnableServicesOperation(name string) *BatchEnableServicesOperation { - override := fmt.Sprintf("/v1/%s", name) - return &BatchEnableServicesOperation{ - lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), - pollPath: override, - } -} - -// DisableServiceOperation returns a new DisableServiceOperation from a given name. -// The name must be that of a previously created DisableServiceOperation, possibly from a different process. -func (c *gRPCClient) DisableServiceOperation(name string) *DisableServiceOperation { - return &DisableServiceOperation{ - lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), - } -} - -// DisableServiceOperation returns a new DisableServiceOperation from a given name. -// The name must be that of a previously created DisableServiceOperation, possibly from a different process. -func (c *restClient) DisableServiceOperation(name string) *DisableServiceOperation { - override := fmt.Sprintf("/v1/%s", name) - return &DisableServiceOperation{ - lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), - pollPath: override, - } -} - -// EnableServiceOperation returns a new EnableServiceOperation from a given name. -// The name must be that of a previously created EnableServiceOperation, possibly from a different process. -func (c *gRPCClient) EnableServiceOperation(name string) *EnableServiceOperation { - return &EnableServiceOperation{ - lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), - } -} - -// EnableServiceOperation returns a new EnableServiceOperation from a given name. -// The name must be that of a previously created EnableServiceOperation, possibly from a different process. -func (c *restClient) EnableServiceOperation(name string) *EnableServiceOperation { - override := fmt.Sprintf("/v1/%s", name) - return &EnableServiceOperation{ - lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), - pollPath: override, - } -} diff --git a/vendor/cloud.google.com/go/serviceusage/apiv1/serviceusagepb/resources.pb.go b/vendor/cloud.google.com/go/serviceusage/apiv1/serviceusagepb/resources.pb.go deleted file mode 100644 index 35bd890a7d..0000000000 --- a/vendor/cloud.google.com/go/serviceusage/apiv1/serviceusagepb/resources.pb.go +++ /dev/null @@ -1,466 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.36.11 -// protoc v6.33.2 -// source: google/api/serviceusage/v1/resources.proto - -package serviceusagepb - -import ( - reflect "reflect" - sync "sync" - unsafe "unsafe" - - _ "google.golang.org/genproto/googleapis/api/annotations" - monitoredres "google.golang.org/genproto/googleapis/api/monitoredres" - serviceconfig "google.golang.org/genproto/googleapis/api/serviceconfig" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - apipb "google.golang.org/protobuf/types/known/apipb" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// Whether or not a service has been enabled for use by a consumer. -type State int32 - -const ( - // The default value, which indicates that the enabled state of the service - // is unspecified or not meaningful. Currently, all consumers other than - // projects (such as folders and organizations) are always in this state. - State_STATE_UNSPECIFIED State = 0 - // The service cannot be used by this consumer. It has either been explicitly - // disabled, or has never been enabled. - State_DISABLED State = 1 - // The service has been explicitly enabled for use by this consumer. - State_ENABLED State = 2 -) - -// Enum value maps for State. -var ( - State_name = map[int32]string{ - 0: "STATE_UNSPECIFIED", - 1: "DISABLED", - 2: "ENABLED", - } - State_value = map[string]int32{ - "STATE_UNSPECIFIED": 0, - "DISABLED": 1, - "ENABLED": 2, - } -) - -func (x State) Enum() *State { - p := new(State) - *p = x - return p -} - -func (x State) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (State) Descriptor() protoreflect.EnumDescriptor { - return file_google_api_serviceusage_v1_resources_proto_enumTypes[0].Descriptor() -} - -func (State) Type() protoreflect.EnumType { - return &file_google_api_serviceusage_v1_resources_proto_enumTypes[0] -} - -func (x State) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use State.Descriptor instead. -func (State) EnumDescriptor() ([]byte, []int) { - return file_google_api_serviceusage_v1_resources_proto_rawDescGZIP(), []int{0} -} - -// A service that is available for use by the consumer. -type Service struct { - state protoimpl.MessageState `protogen:"open.v1"` - // The resource name of the consumer and service. - // - // A valid name would be: - // - projects/123/services/serviceusage.googleapis.com - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // The resource name of the consumer. - // - // A valid name would be: - // - projects/123 - Parent string `protobuf:"bytes,5,opt,name=parent,proto3" json:"parent,omitempty"` - // The service configuration of the available service. - // Some fields may be filtered out of the configuration in responses to - // the `ListServices` method. These fields are present only in responses to - // the `GetService` method. - Config *ServiceConfig `protobuf:"bytes,2,opt,name=config,proto3" json:"config,omitempty"` - // Whether or not the service has been enabled for use by the consumer. - State State `protobuf:"varint,4,opt,name=state,proto3,enum=google.api.serviceusage.v1.State" json:"state,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *Service) Reset() { - *x = Service{} - mi := &file_google_api_serviceusage_v1_resources_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *Service) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Service) ProtoMessage() {} - -func (x *Service) ProtoReflect() protoreflect.Message { - mi := &file_google_api_serviceusage_v1_resources_proto_msgTypes[0] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Service.ProtoReflect.Descriptor instead. -func (*Service) Descriptor() ([]byte, []int) { - return file_google_api_serviceusage_v1_resources_proto_rawDescGZIP(), []int{0} -} - -func (x *Service) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *Service) GetParent() string { - if x != nil { - return x.Parent - } - return "" -} - -func (x *Service) GetConfig() *ServiceConfig { - if x != nil { - return x.Config - } - return nil -} - -func (x *Service) GetState() State { - if x != nil { - return x.State - } - return State_STATE_UNSPECIFIED -} - -// The configuration of the service. -type ServiceConfig struct { - state protoimpl.MessageState `protogen:"open.v1"` - // The DNS address at which this service is available. - // - // An example DNS address would be: - // `calendar.googleapis.com`. - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // The product title for this service. - Title string `protobuf:"bytes,2,opt,name=title,proto3" json:"title,omitempty"` - // A list of API interfaces exported by this service. Contains only the names, - // versions, and method names of the interfaces. - Apis []*apipb.Api `protobuf:"bytes,3,rep,name=apis,proto3" json:"apis,omitempty"` - // Additional API documentation. Contains only the summary and the - // documentation URL. - Documentation *serviceconfig.Documentation `protobuf:"bytes,6,opt,name=documentation,proto3" json:"documentation,omitempty"` - // Quota configuration. - Quota *serviceconfig.Quota `protobuf:"bytes,10,opt,name=quota,proto3" json:"quota,omitempty"` - // Auth configuration. Contains only the OAuth rules. - Authentication *serviceconfig.Authentication `protobuf:"bytes,11,opt,name=authentication,proto3" json:"authentication,omitempty"` - // Configuration controlling usage of this service. - Usage *serviceconfig.Usage `protobuf:"bytes,15,opt,name=usage,proto3" json:"usage,omitempty"` - // Configuration for network endpoints. Contains only the names and aliases - // of the endpoints. - Endpoints []*serviceconfig.Endpoint `protobuf:"bytes,18,rep,name=endpoints,proto3" json:"endpoints,omitempty"` - // Defines the monitored resources used by this service. This is required - // by the [Service.monitoring][google.api.Service.monitoring] and - // [Service.logging][google.api.Service.logging] configurations. - MonitoredResources []*monitoredres.MonitoredResourceDescriptor `protobuf:"bytes,25,rep,name=monitored_resources,json=monitoredResources,proto3" json:"monitored_resources,omitempty"` - // Monitoring configuration. - // This should not include the 'producer_destinations' field. - Monitoring *serviceconfig.Monitoring `protobuf:"bytes,28,opt,name=monitoring,proto3" json:"monitoring,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ServiceConfig) Reset() { - *x = ServiceConfig{} - mi := &file_google_api_serviceusage_v1_resources_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ServiceConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ServiceConfig) ProtoMessage() {} - -func (x *ServiceConfig) ProtoReflect() protoreflect.Message { - mi := &file_google_api_serviceusage_v1_resources_proto_msgTypes[1] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ServiceConfig.ProtoReflect.Descriptor instead. -func (*ServiceConfig) Descriptor() ([]byte, []int) { - return file_google_api_serviceusage_v1_resources_proto_rawDescGZIP(), []int{1} -} - -func (x *ServiceConfig) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *ServiceConfig) GetTitle() string { - if x != nil { - return x.Title - } - return "" -} - -func (x *ServiceConfig) GetApis() []*apipb.Api { - if x != nil { - return x.Apis - } - return nil -} - -func (x *ServiceConfig) GetDocumentation() *serviceconfig.Documentation { - if x != nil { - return x.Documentation - } - return nil -} - -func (x *ServiceConfig) GetQuota() *serviceconfig.Quota { - if x != nil { - return x.Quota - } - return nil -} - -func (x *ServiceConfig) GetAuthentication() *serviceconfig.Authentication { - if x != nil { - return x.Authentication - } - return nil -} - -func (x *ServiceConfig) GetUsage() *serviceconfig.Usage { - if x != nil { - return x.Usage - } - return nil -} - -func (x *ServiceConfig) GetEndpoints() []*serviceconfig.Endpoint { - if x != nil { - return x.Endpoints - } - return nil -} - -func (x *ServiceConfig) GetMonitoredResources() []*monitoredres.MonitoredResourceDescriptor { - if x != nil { - return x.MonitoredResources - } - return nil -} - -func (x *ServiceConfig) GetMonitoring() *serviceconfig.Monitoring { - if x != nil { - return x.Monitoring - } - return nil -} - -// The operation metadata returned for the batchend services operation. -type OperationMetadata struct { - state protoimpl.MessageState `protogen:"open.v1"` - // The full name of the resources that this operation is directly - // associated with. - ResourceNames []string `protobuf:"bytes,2,rep,name=resource_names,json=resourceNames,proto3" json:"resource_names,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *OperationMetadata) Reset() { - *x = OperationMetadata{} - mi := &file_google_api_serviceusage_v1_resources_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *OperationMetadata) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*OperationMetadata) ProtoMessage() {} - -func (x *OperationMetadata) ProtoReflect() protoreflect.Message { - mi := &file_google_api_serviceusage_v1_resources_proto_msgTypes[2] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use OperationMetadata.ProtoReflect.Descriptor instead. -func (*OperationMetadata) Descriptor() ([]byte, []int) { - return file_google_api_serviceusage_v1_resources_proto_rawDescGZIP(), []int{2} -} - -func (x *OperationMetadata) GetResourceNames() []string { - if x != nil { - return x.ResourceNames - } - return nil -} - -var File_google_api_serviceusage_v1_resources_proto protoreflect.FileDescriptor - -const file_google_api_serviceusage_v1_resources_proto_rawDesc = "" + - "\n" + - "*google/api/serviceusage/v1/resources.proto\x12\x1agoogle.api.serviceusage.v1\x1a\x15google/api/auth.proto\x1a\x1egoogle/api/documentation.proto\x1a\x19google/api/endpoint.proto\x1a#google/api/monitored_resource.proto\x1a\x1bgoogle/api/monitoring.proto\x1a\x16google/api/quota.proto\x1a\x19google/api/resource.proto\x1a\x16google/api/usage.proto\x1a\x19google/protobuf/api.proto\"\xda\x02\n" + - "\aService\x12\x12\n" + - "\x04name\x18\x01 \x01(\tR\x04name\x12\x16\n" + - "\x06parent\x18\x05 \x01(\tR\x06parent\x12A\n" + - "\x06config\x18\x02 \x01(\v2).google.api.serviceusage.v1.ServiceConfigR\x06config\x127\n" + - "\x05state\x18\x04 \x01(\x0e2!.google.api.serviceusage.v1.StateR\x05state:\xa6\x01\xeaA\xa2\x01\n" + - "#serviceusage.googleapis.com/Service\x12%projects/{project}/services/{service}\x12#folders/{folder}/services/{service}\x12/organizations/{organization}/services/{service}\"\x80\x04\n" + - "\rServiceConfig\x12\x12\n" + - "\x04name\x18\x01 \x01(\tR\x04name\x12\x14\n" + - "\x05title\x18\x02 \x01(\tR\x05title\x12(\n" + - "\x04apis\x18\x03 \x03(\v2\x14.google.protobuf.ApiR\x04apis\x12?\n" + - "\rdocumentation\x18\x06 \x01(\v2\x19.google.api.DocumentationR\rdocumentation\x12'\n" + - "\x05quota\x18\n" + - " \x01(\v2\x11.google.api.QuotaR\x05quota\x12B\n" + - "\x0eauthentication\x18\v \x01(\v2\x1a.google.api.AuthenticationR\x0eauthentication\x12'\n" + - "\x05usage\x18\x0f \x01(\v2\x11.google.api.UsageR\x05usage\x122\n" + - "\tendpoints\x18\x12 \x03(\v2\x14.google.api.EndpointR\tendpoints\x12X\n" + - "\x13monitored_resources\x18\x19 \x03(\v2'.google.api.MonitoredResourceDescriptorR\x12monitoredResources\x126\n" + - "\n" + - "monitoring\x18\x1c \x01(\v2\x16.google.api.MonitoringR\n" + - "monitoring\":\n" + - "\x11OperationMetadata\x12%\n" + - "\x0eresource_names\x18\x02 \x03(\tR\rresourceNames*9\n" + - "\x05State\x12\x15\n" + - "\x11STATE_UNSPECIFIED\x10\x00\x12\f\n" + - "\bDISABLED\x10\x01\x12\v\n" + - "\aENABLED\x10\x02B\xd8\x01\n" + - "\x1ecom.google.api.serviceusage.v1B\x0eResourcesProtoP\x01ZDcloud.google.com/go/serviceusage/apiv1/serviceusagepb;serviceusagepb\xaa\x02\x1cGoogle.Cloud.ServiceUsage.V1\xca\x02\x1cGoogle\\Cloud\\ServiceUsage\\V1\xea\x02\x1fGoogle::Cloud::ServiceUsage::V1b\x06proto3" - -var ( - file_google_api_serviceusage_v1_resources_proto_rawDescOnce sync.Once - file_google_api_serviceusage_v1_resources_proto_rawDescData []byte -) - -func file_google_api_serviceusage_v1_resources_proto_rawDescGZIP() []byte { - file_google_api_serviceusage_v1_resources_proto_rawDescOnce.Do(func() { - file_google_api_serviceusage_v1_resources_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_google_api_serviceusage_v1_resources_proto_rawDesc), len(file_google_api_serviceusage_v1_resources_proto_rawDesc))) - }) - return file_google_api_serviceusage_v1_resources_proto_rawDescData -} - -var file_google_api_serviceusage_v1_resources_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_google_api_serviceusage_v1_resources_proto_msgTypes = make([]protoimpl.MessageInfo, 3) -var file_google_api_serviceusage_v1_resources_proto_goTypes = []any{ - (State)(0), // 0: google.api.serviceusage.v1.State - (*Service)(nil), // 1: google.api.serviceusage.v1.Service - (*ServiceConfig)(nil), // 2: google.api.serviceusage.v1.ServiceConfig - (*OperationMetadata)(nil), // 3: google.api.serviceusage.v1.OperationMetadata - (*apipb.Api)(nil), // 4: google.protobuf.Api - (*serviceconfig.Documentation)(nil), // 5: google.api.Documentation - (*serviceconfig.Quota)(nil), // 6: google.api.Quota - (*serviceconfig.Authentication)(nil), // 7: google.api.Authentication - (*serviceconfig.Usage)(nil), // 8: google.api.Usage - (*serviceconfig.Endpoint)(nil), // 9: google.api.Endpoint - (*monitoredres.MonitoredResourceDescriptor)(nil), // 10: google.api.MonitoredResourceDescriptor - (*serviceconfig.Monitoring)(nil), // 11: google.api.Monitoring -} -var file_google_api_serviceusage_v1_resources_proto_depIdxs = []int32{ - 2, // 0: google.api.serviceusage.v1.Service.config:type_name -> google.api.serviceusage.v1.ServiceConfig - 0, // 1: google.api.serviceusage.v1.Service.state:type_name -> google.api.serviceusage.v1.State - 4, // 2: google.api.serviceusage.v1.ServiceConfig.apis:type_name -> google.protobuf.Api - 5, // 3: google.api.serviceusage.v1.ServiceConfig.documentation:type_name -> google.api.Documentation - 6, // 4: google.api.serviceusage.v1.ServiceConfig.quota:type_name -> google.api.Quota - 7, // 5: google.api.serviceusage.v1.ServiceConfig.authentication:type_name -> google.api.Authentication - 8, // 6: google.api.serviceusage.v1.ServiceConfig.usage:type_name -> google.api.Usage - 9, // 7: google.api.serviceusage.v1.ServiceConfig.endpoints:type_name -> google.api.Endpoint - 10, // 8: google.api.serviceusage.v1.ServiceConfig.monitored_resources:type_name -> google.api.MonitoredResourceDescriptor - 11, // 9: google.api.serviceusage.v1.ServiceConfig.monitoring:type_name -> google.api.Monitoring - 10, // [10:10] is the sub-list for method output_type - 10, // [10:10] is the sub-list for method input_type - 10, // [10:10] is the sub-list for extension type_name - 10, // [10:10] is the sub-list for extension extendee - 0, // [0:10] is the sub-list for field type_name -} - -func init() { file_google_api_serviceusage_v1_resources_proto_init() } -func file_google_api_serviceusage_v1_resources_proto_init() { - if File_google_api_serviceusage_v1_resources_proto != nil { - return - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: unsafe.Slice(unsafe.StringData(file_google_api_serviceusage_v1_resources_proto_rawDesc), len(file_google_api_serviceusage_v1_resources_proto_rawDesc)), - NumEnums: 1, - NumMessages: 3, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_google_api_serviceusage_v1_resources_proto_goTypes, - DependencyIndexes: file_google_api_serviceusage_v1_resources_proto_depIdxs, - EnumInfos: file_google_api_serviceusage_v1_resources_proto_enumTypes, - MessageInfos: file_google_api_serviceusage_v1_resources_proto_msgTypes, - }.Build() - File_google_api_serviceusage_v1_resources_proto = out.File - file_google_api_serviceusage_v1_resources_proto_goTypes = nil - file_google_api_serviceusage_v1_resources_proto_depIdxs = nil -} diff --git a/vendor/cloud.google.com/go/serviceusage/apiv1/serviceusagepb/serviceusage.pb.go b/vendor/cloud.google.com/go/serviceusage/apiv1/serviceusagepb/serviceusage.pb.go deleted file mode 100644 index 97eb4855db..0000000000 --- a/vendor/cloud.google.com/go/serviceusage/apiv1/serviceusagepb/serviceusage.pb.go +++ /dev/null @@ -1,943 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.36.11 -// protoc v6.33.2 -// source: google/api/serviceusage/v1/serviceusage.proto - -package serviceusagepb - -import ( - reflect "reflect" - sync "sync" - unsafe "unsafe" - - longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" - _ "google.golang.org/genproto/googleapis/api/annotations" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// Enum to determine if service usage should be checked when disabling a -// service. -type DisableServiceRequest_CheckIfServiceHasUsage int32 - -const ( - // When unset, the default behavior is used, which is SKIP. - DisableServiceRequest_CHECK_IF_SERVICE_HAS_USAGE_UNSPECIFIED DisableServiceRequest_CheckIfServiceHasUsage = 0 - // If set, skip checking service usage when disabling a service. - DisableServiceRequest_SKIP DisableServiceRequest_CheckIfServiceHasUsage = 1 - // If set, service usage is checked when disabling the service. If a - // service, or its dependents, has usage in the last 30 days, the request - // returns a FAILED_PRECONDITION error. - DisableServiceRequest_CHECK DisableServiceRequest_CheckIfServiceHasUsage = 2 -) - -// Enum value maps for DisableServiceRequest_CheckIfServiceHasUsage. -var ( - DisableServiceRequest_CheckIfServiceHasUsage_name = map[int32]string{ - 0: "CHECK_IF_SERVICE_HAS_USAGE_UNSPECIFIED", - 1: "SKIP", - 2: "CHECK", - } - DisableServiceRequest_CheckIfServiceHasUsage_value = map[string]int32{ - "CHECK_IF_SERVICE_HAS_USAGE_UNSPECIFIED": 0, - "SKIP": 1, - "CHECK": 2, - } -) - -func (x DisableServiceRequest_CheckIfServiceHasUsage) Enum() *DisableServiceRequest_CheckIfServiceHasUsage { - p := new(DisableServiceRequest_CheckIfServiceHasUsage) - *p = x - return p -} - -func (x DisableServiceRequest_CheckIfServiceHasUsage) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (DisableServiceRequest_CheckIfServiceHasUsage) Descriptor() protoreflect.EnumDescriptor { - return file_google_api_serviceusage_v1_serviceusage_proto_enumTypes[0].Descriptor() -} - -func (DisableServiceRequest_CheckIfServiceHasUsage) Type() protoreflect.EnumType { - return &file_google_api_serviceusage_v1_serviceusage_proto_enumTypes[0] -} - -func (x DisableServiceRequest_CheckIfServiceHasUsage) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use DisableServiceRequest_CheckIfServiceHasUsage.Descriptor instead. -func (DisableServiceRequest_CheckIfServiceHasUsage) EnumDescriptor() ([]byte, []int) { - return file_google_api_serviceusage_v1_serviceusage_proto_rawDescGZIP(), []int{2, 0} -} - -// Request message for the `EnableService` method. -type EnableServiceRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Name of the consumer and service to enable the service on. - // - // The `EnableService` and `DisableService` methods currently only support - // projects. - // - // Enabling a service requires that the service is public or is shared with - // the user enabling the service. - // - // An example name would be: - // `projects/123/services/serviceusage.googleapis.com` where `123` is the - // project number. - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *EnableServiceRequest) Reset() { - *x = EnableServiceRequest{} - mi := &file_google_api_serviceusage_v1_serviceusage_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *EnableServiceRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*EnableServiceRequest) ProtoMessage() {} - -func (x *EnableServiceRequest) ProtoReflect() protoreflect.Message { - mi := &file_google_api_serviceusage_v1_serviceusage_proto_msgTypes[0] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use EnableServiceRequest.ProtoReflect.Descriptor instead. -func (*EnableServiceRequest) Descriptor() ([]byte, []int) { - return file_google_api_serviceusage_v1_serviceusage_proto_rawDescGZIP(), []int{0} -} - -func (x *EnableServiceRequest) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -// Response message for the `EnableService` method. -// This response message is assigned to the `response` field of the returned -// Operation when that operation is done. -type EnableServiceResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - // The new state of the service after enabling. - Service *Service `protobuf:"bytes,1,opt,name=service,proto3" json:"service,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *EnableServiceResponse) Reset() { - *x = EnableServiceResponse{} - mi := &file_google_api_serviceusage_v1_serviceusage_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *EnableServiceResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*EnableServiceResponse) ProtoMessage() {} - -func (x *EnableServiceResponse) ProtoReflect() protoreflect.Message { - mi := &file_google_api_serviceusage_v1_serviceusage_proto_msgTypes[1] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use EnableServiceResponse.ProtoReflect.Descriptor instead. -func (*EnableServiceResponse) Descriptor() ([]byte, []int) { - return file_google_api_serviceusage_v1_serviceusage_proto_rawDescGZIP(), []int{1} -} - -func (x *EnableServiceResponse) GetService() *Service { - if x != nil { - return x.Service - } - return nil -} - -// Request message for the `DisableService` method. -type DisableServiceRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Name of the consumer and service to disable the service on. - // - // The enable and disable methods currently only support projects. - // - // An example name would be: - // `projects/123/services/serviceusage.googleapis.com` where `123` is the - // project number. - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // Indicates if services that are enabled and which depend on this service - // should also be disabled. If not set, an error will be generated if any - // enabled services depend on the service to be disabled. When set, the - // service, and any enabled services that depend on it, will be disabled - // together. - DisableDependentServices bool `protobuf:"varint,2,opt,name=disable_dependent_services,json=disableDependentServices,proto3" json:"disable_dependent_services,omitempty"` - // Defines the behavior for checking service usage when disabling a service. - CheckIfServiceHasUsage DisableServiceRequest_CheckIfServiceHasUsage `protobuf:"varint,3,opt,name=check_if_service_has_usage,json=checkIfServiceHasUsage,proto3,enum=google.api.serviceusage.v1.DisableServiceRequest_CheckIfServiceHasUsage" json:"check_if_service_has_usage,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *DisableServiceRequest) Reset() { - *x = DisableServiceRequest{} - mi := &file_google_api_serviceusage_v1_serviceusage_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *DisableServiceRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DisableServiceRequest) ProtoMessage() {} - -func (x *DisableServiceRequest) ProtoReflect() protoreflect.Message { - mi := &file_google_api_serviceusage_v1_serviceusage_proto_msgTypes[2] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DisableServiceRequest.ProtoReflect.Descriptor instead. -func (*DisableServiceRequest) Descriptor() ([]byte, []int) { - return file_google_api_serviceusage_v1_serviceusage_proto_rawDescGZIP(), []int{2} -} - -func (x *DisableServiceRequest) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *DisableServiceRequest) GetDisableDependentServices() bool { - if x != nil { - return x.DisableDependentServices - } - return false -} - -func (x *DisableServiceRequest) GetCheckIfServiceHasUsage() DisableServiceRequest_CheckIfServiceHasUsage { - if x != nil { - return x.CheckIfServiceHasUsage - } - return DisableServiceRequest_CHECK_IF_SERVICE_HAS_USAGE_UNSPECIFIED -} - -// Response message for the `DisableService` method. -// This response message is assigned to the `response` field of the returned -// Operation when that operation is done. -type DisableServiceResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - // The new state of the service after disabling. - Service *Service `protobuf:"bytes,1,opt,name=service,proto3" json:"service,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *DisableServiceResponse) Reset() { - *x = DisableServiceResponse{} - mi := &file_google_api_serviceusage_v1_serviceusage_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *DisableServiceResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DisableServiceResponse) ProtoMessage() {} - -func (x *DisableServiceResponse) ProtoReflect() protoreflect.Message { - mi := &file_google_api_serviceusage_v1_serviceusage_proto_msgTypes[3] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DisableServiceResponse.ProtoReflect.Descriptor instead. -func (*DisableServiceResponse) Descriptor() ([]byte, []int) { - return file_google_api_serviceusage_v1_serviceusage_proto_rawDescGZIP(), []int{3} -} - -func (x *DisableServiceResponse) GetService() *Service { - if x != nil { - return x.Service - } - return nil -} - -// Request message for the `GetService` method. -type GetServiceRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Name of the consumer and service to get the `ConsumerState` for. - // - // An example name would be: - // `projects/123/services/serviceusage.googleapis.com` where `123` is the - // project number. - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *GetServiceRequest) Reset() { - *x = GetServiceRequest{} - mi := &file_google_api_serviceusage_v1_serviceusage_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *GetServiceRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetServiceRequest) ProtoMessage() {} - -func (x *GetServiceRequest) ProtoReflect() protoreflect.Message { - mi := &file_google_api_serviceusage_v1_serviceusage_proto_msgTypes[4] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetServiceRequest.ProtoReflect.Descriptor instead. -func (*GetServiceRequest) Descriptor() ([]byte, []int) { - return file_google_api_serviceusage_v1_serviceusage_proto_rawDescGZIP(), []int{4} -} - -func (x *GetServiceRequest) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -// Request message for the `ListServices` method. -type ListServicesRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Parent to search for services on. - // - // An example name would be: - // `projects/123` where `123` is the project number. - Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` - // Requested size of the next page of data. - // Requested page size cannot exceed 200. - // If not set, the default page size is 50. - PageSize int32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` - // Token identifying which result to start with, which is returned by a - // previous list call. - PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` - // Only list services that conform to the given filter. - // The allowed filter strings are `state:ENABLED` and `state:DISABLED`. - Filter string `protobuf:"bytes,4,opt,name=filter,proto3" json:"filter,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ListServicesRequest) Reset() { - *x = ListServicesRequest{} - mi := &file_google_api_serviceusage_v1_serviceusage_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ListServicesRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListServicesRequest) ProtoMessage() {} - -func (x *ListServicesRequest) ProtoReflect() protoreflect.Message { - mi := &file_google_api_serviceusage_v1_serviceusage_proto_msgTypes[5] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ListServicesRequest.ProtoReflect.Descriptor instead. -func (*ListServicesRequest) Descriptor() ([]byte, []int) { - return file_google_api_serviceusage_v1_serviceusage_proto_rawDescGZIP(), []int{5} -} - -func (x *ListServicesRequest) GetParent() string { - if x != nil { - return x.Parent - } - return "" -} - -func (x *ListServicesRequest) GetPageSize() int32 { - if x != nil { - return x.PageSize - } - return 0 -} - -func (x *ListServicesRequest) GetPageToken() string { - if x != nil { - return x.PageToken - } - return "" -} - -func (x *ListServicesRequest) GetFilter() string { - if x != nil { - return x.Filter - } - return "" -} - -// Response message for the `ListServices` method. -type ListServicesResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - // The available services for the requested project. - Services []*Service `protobuf:"bytes,1,rep,name=services,proto3" json:"services,omitempty"` - // Token that can be passed to `ListServices` to resume a paginated - // query. - NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ListServicesResponse) Reset() { - *x = ListServicesResponse{} - mi := &file_google_api_serviceusage_v1_serviceusage_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ListServicesResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListServicesResponse) ProtoMessage() {} - -func (x *ListServicesResponse) ProtoReflect() protoreflect.Message { - mi := &file_google_api_serviceusage_v1_serviceusage_proto_msgTypes[6] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ListServicesResponse.ProtoReflect.Descriptor instead. -func (*ListServicesResponse) Descriptor() ([]byte, []int) { - return file_google_api_serviceusage_v1_serviceusage_proto_rawDescGZIP(), []int{6} -} - -func (x *ListServicesResponse) GetServices() []*Service { - if x != nil { - return x.Services - } - return nil -} - -func (x *ListServicesResponse) GetNextPageToken() string { - if x != nil { - return x.NextPageToken - } - return "" -} - -// Request message for the `BatchEnableServices` method. -type BatchEnableServicesRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Parent to enable services on. - // - // An example name would be: - // `projects/123` where `123` is the project number. - // - // The `BatchEnableServices` method currently only supports projects. - Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` - // The identifiers of the services to enable on the project. - // - // A valid identifier would be: - // serviceusage.googleapis.com - // - // Enabling services requires that each service is public or is shared with - // the user enabling the service. - // - // A single request can enable a maximum of 20 services at a time. If more - // than 20 services are specified, the request will fail, and no state changes - // will occur. - ServiceIds []string `protobuf:"bytes,2,rep,name=service_ids,json=serviceIds,proto3" json:"service_ids,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *BatchEnableServicesRequest) Reset() { - *x = BatchEnableServicesRequest{} - mi := &file_google_api_serviceusage_v1_serviceusage_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *BatchEnableServicesRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*BatchEnableServicesRequest) ProtoMessage() {} - -func (x *BatchEnableServicesRequest) ProtoReflect() protoreflect.Message { - mi := &file_google_api_serviceusage_v1_serviceusage_proto_msgTypes[7] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use BatchEnableServicesRequest.ProtoReflect.Descriptor instead. -func (*BatchEnableServicesRequest) Descriptor() ([]byte, []int) { - return file_google_api_serviceusage_v1_serviceusage_proto_rawDescGZIP(), []int{7} -} - -func (x *BatchEnableServicesRequest) GetParent() string { - if x != nil { - return x.Parent - } - return "" -} - -func (x *BatchEnableServicesRequest) GetServiceIds() []string { - if x != nil { - return x.ServiceIds - } - return nil -} - -// Response message for the `BatchEnableServices` method. -// This response message is assigned to the `response` field of the returned -// Operation when that operation is done. -type BatchEnableServicesResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - // The new state of the services after enabling. - Services []*Service `protobuf:"bytes,1,rep,name=services,proto3" json:"services,omitempty"` - // If allow_partial_success is true, and one or more services could not be - // enabled, this field contains the details about each failure. - Failures []*BatchEnableServicesResponse_EnableFailure `protobuf:"bytes,2,rep,name=failures,proto3" json:"failures,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *BatchEnableServicesResponse) Reset() { - *x = BatchEnableServicesResponse{} - mi := &file_google_api_serviceusage_v1_serviceusage_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *BatchEnableServicesResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*BatchEnableServicesResponse) ProtoMessage() {} - -func (x *BatchEnableServicesResponse) ProtoReflect() protoreflect.Message { - mi := &file_google_api_serviceusage_v1_serviceusage_proto_msgTypes[8] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use BatchEnableServicesResponse.ProtoReflect.Descriptor instead. -func (*BatchEnableServicesResponse) Descriptor() ([]byte, []int) { - return file_google_api_serviceusage_v1_serviceusage_proto_rawDescGZIP(), []int{8} -} - -func (x *BatchEnableServicesResponse) GetServices() []*Service { - if x != nil { - return x.Services - } - return nil -} - -func (x *BatchEnableServicesResponse) GetFailures() []*BatchEnableServicesResponse_EnableFailure { - if x != nil { - return x.Failures - } - return nil -} - -// Request message for the `BatchGetServices` method. -type BatchGetServicesRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Parent to retrieve services from. - // If this is set, the parent of all of the services specified in `names` must - // match this field. An example name would be: `projects/123` where `123` is - // the project number. The `BatchGetServices` method currently only supports - // projects. - Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` - // Names of the services to retrieve. - // - // An example name would be: - // `projects/123/services/serviceusage.googleapis.com` where `123` is the - // project number. - // A single request can get a maximum of 30 services at a time. - Names []string `protobuf:"bytes,2,rep,name=names,proto3" json:"names,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *BatchGetServicesRequest) Reset() { - *x = BatchGetServicesRequest{} - mi := &file_google_api_serviceusage_v1_serviceusage_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *BatchGetServicesRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*BatchGetServicesRequest) ProtoMessage() {} - -func (x *BatchGetServicesRequest) ProtoReflect() protoreflect.Message { - mi := &file_google_api_serviceusage_v1_serviceusage_proto_msgTypes[9] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use BatchGetServicesRequest.ProtoReflect.Descriptor instead. -func (*BatchGetServicesRequest) Descriptor() ([]byte, []int) { - return file_google_api_serviceusage_v1_serviceusage_proto_rawDescGZIP(), []int{9} -} - -func (x *BatchGetServicesRequest) GetParent() string { - if x != nil { - return x.Parent - } - return "" -} - -func (x *BatchGetServicesRequest) GetNames() []string { - if x != nil { - return x.Names - } - return nil -} - -// Response message for the `BatchGetServices` method. -type BatchGetServicesResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - // The requested Service states. - Services []*Service `protobuf:"bytes,1,rep,name=services,proto3" json:"services,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *BatchGetServicesResponse) Reset() { - *x = BatchGetServicesResponse{} - mi := &file_google_api_serviceusage_v1_serviceusage_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *BatchGetServicesResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*BatchGetServicesResponse) ProtoMessage() {} - -func (x *BatchGetServicesResponse) ProtoReflect() protoreflect.Message { - mi := &file_google_api_serviceusage_v1_serviceusage_proto_msgTypes[10] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use BatchGetServicesResponse.ProtoReflect.Descriptor instead. -func (*BatchGetServicesResponse) Descriptor() ([]byte, []int) { - return file_google_api_serviceusage_v1_serviceusage_proto_rawDescGZIP(), []int{10} -} - -func (x *BatchGetServicesResponse) GetServices() []*Service { - if x != nil { - return x.Services - } - return nil -} - -// Provides error messages for the failing services. -type BatchEnableServicesResponse_EnableFailure struct { - state protoimpl.MessageState `protogen:"open.v1"` - // The service id of a service that could not be enabled. - ServiceId string `protobuf:"bytes,1,opt,name=service_id,json=serviceId,proto3" json:"service_id,omitempty"` - // An error message describing why the service could not be enabled. - ErrorMessage string `protobuf:"bytes,2,opt,name=error_message,json=errorMessage,proto3" json:"error_message,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *BatchEnableServicesResponse_EnableFailure) Reset() { - *x = BatchEnableServicesResponse_EnableFailure{} - mi := &file_google_api_serviceusage_v1_serviceusage_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *BatchEnableServicesResponse_EnableFailure) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*BatchEnableServicesResponse_EnableFailure) ProtoMessage() {} - -func (x *BatchEnableServicesResponse_EnableFailure) ProtoReflect() protoreflect.Message { - mi := &file_google_api_serviceusage_v1_serviceusage_proto_msgTypes[11] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use BatchEnableServicesResponse_EnableFailure.ProtoReflect.Descriptor instead. -func (*BatchEnableServicesResponse_EnableFailure) Descriptor() ([]byte, []int) { - return file_google_api_serviceusage_v1_serviceusage_proto_rawDescGZIP(), []int{8, 0} -} - -func (x *BatchEnableServicesResponse_EnableFailure) GetServiceId() string { - if x != nil { - return x.ServiceId - } - return "" -} - -func (x *BatchEnableServicesResponse_EnableFailure) GetErrorMessage() string { - if x != nil { - return x.ErrorMessage - } - return "" -} - -var File_google_api_serviceusage_v1_serviceusage_proto protoreflect.FileDescriptor - -const file_google_api_serviceusage_v1_serviceusage_proto_rawDesc = "" + - "\n" + - "-google/api/serviceusage/v1/serviceusage.proto\x12\x1agoogle.api.serviceusage.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a*google/api/serviceusage/v1/resources.proto\x1a#google/longrunning/operations.proto\"*\n" + - "\x14EnableServiceRequest\x12\x12\n" + - "\x04name\x18\x01 \x01(\tR\x04name\"V\n" + - "\x15EnableServiceResponse\x12=\n" + - "\aservice\x18\x01 \x01(\v2#.google.api.serviceusage.v1.ServiceR\aservice\"\xcb\x02\n" + - "\x15DisableServiceRequest\x12\x12\n" + - "\x04name\x18\x01 \x01(\tR\x04name\x12<\n" + - "\x1adisable_dependent_services\x18\x02 \x01(\bR\x18disableDependentServices\x12\x84\x01\n" + - "\x1acheck_if_service_has_usage\x18\x03 \x01(\x0e2H.google.api.serviceusage.v1.DisableServiceRequest.CheckIfServiceHasUsageR\x16checkIfServiceHasUsage\"Y\n" + - "\x16CheckIfServiceHasUsage\x12*\n" + - "&CHECK_IF_SERVICE_HAS_USAGE_UNSPECIFIED\x10\x00\x12\b\n" + - "\x04SKIP\x10\x01\x12\t\n" + - "\x05CHECK\x10\x02\"W\n" + - "\x16DisableServiceResponse\x12=\n" + - "\aservice\x18\x01 \x01(\v2#.google.api.serviceusage.v1.ServiceR\aservice\"'\n" + - "\x11GetServiceRequest\x12\x12\n" + - "\x04name\x18\x01 \x01(\tR\x04name\"\x81\x01\n" + - "\x13ListServicesRequest\x12\x16\n" + - "\x06parent\x18\x01 \x01(\tR\x06parent\x12\x1b\n" + - "\tpage_size\x18\x02 \x01(\x05R\bpageSize\x12\x1d\n" + - "\n" + - "page_token\x18\x03 \x01(\tR\tpageToken\x12\x16\n" + - "\x06filter\x18\x04 \x01(\tR\x06filter\"\x7f\n" + - "\x14ListServicesResponse\x12?\n" + - "\bservices\x18\x01 \x03(\v2#.google.api.serviceusage.v1.ServiceR\bservices\x12&\n" + - "\x0fnext_page_token\x18\x02 \x01(\tR\rnextPageToken\"U\n" + - "\x1aBatchEnableServicesRequest\x12\x16\n" + - "\x06parent\x18\x01 \x01(\tR\x06parent\x12\x1f\n" + - "\vservice_ids\x18\x02 \x03(\tR\n" + - "serviceIds\"\x96\x02\n" + - "\x1bBatchEnableServicesResponse\x12?\n" + - "\bservices\x18\x01 \x03(\v2#.google.api.serviceusage.v1.ServiceR\bservices\x12a\n" + - "\bfailures\x18\x02 \x03(\v2E.google.api.serviceusage.v1.BatchEnableServicesResponse.EnableFailureR\bfailures\x1aS\n" + - "\rEnableFailure\x12\x1d\n" + - "\n" + - "service_id\x18\x01 \x01(\tR\tserviceId\x12#\n" + - "\rerror_message\x18\x02 \x01(\tR\ferrorMessage\"G\n" + - "\x17BatchGetServicesRequest\x12\x16\n" + - "\x06parent\x18\x01 \x01(\tR\x06parent\x12\x14\n" + - "\x05names\x18\x02 \x03(\tR\x05names\"[\n" + - "\x18BatchGetServicesResponse\x12?\n" + - "\bservices\x18\x01 \x03(\v2#.google.api.serviceusage.v1.ServiceR\bservices2\xe8\t\n" + - "\fServiceUsage\x12\xba\x01\n" + - "\rEnableService\x120.google.api.serviceusage.v1.EnableServiceRequest\x1a\x1d.google.longrunning.Operation\"X\xcaA*\n" + - "\x15EnableServiceResponse\x12\x11OperationMetadata\x82\xd3\xe4\x93\x02%:\x01*\" /v1/{name=*/*/services/*}:enable\x12\xbe\x01\n" + - "\x0eDisableService\x121.google.api.serviceusage.v1.DisableServiceRequest\x1a\x1d.google.longrunning.Operation\"Z\xcaA+\n" + - "\x16DisableServiceResponse\x12\x11OperationMetadata\x82\xd3\xe4\x93\x02&:\x01*\"!/v1/{name=*/*/services/*}:disable\x12\x83\x01\n" + - "\n" + - "GetService\x12-.google.api.serviceusage.v1.GetServiceRequest\x1a#.google.api.serviceusage.v1.Service\"!\x82\xd3\xe4\x93\x02\x1b\x12\x19/v1/{name=*/*/services/*}\x12\x94\x01\n" + - "\fListServices\x12/.google.api.serviceusage.v1.ListServicesRequest\x1a0.google.api.serviceusage.v1.ListServicesResponse\"!\x82\xd3\xe4\x93\x02\x1b\x12\x19/v1/{parent=*/*}/services\x12\xd1\x01\n" + - "\x13BatchEnableServices\x126.google.api.serviceusage.v1.BatchEnableServicesRequest\x1a\x1d.google.longrunning.Operation\"c\xcaA0\n" + - "\x1bBatchEnableServicesResponse\x12\x11OperationMetadata\x82\xd3\xe4\x93\x02*:\x01*\"%/v1/{parent=*/*}/services:batchEnable\x12\xa9\x01\n" + - "\x10BatchGetServices\x123.google.api.serviceusage.v1.BatchGetServicesRequest\x1a4.google.api.serviceusage.v1.BatchGetServicesResponse\"*\x82\xd3\xe4\x93\x02$\x12\"/v1/{parent=*/*}/services:batchGet\x1a\xbc\x01\xcaA\x1bserviceusage.googleapis.com\xd2A\x9a\x01https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-platform.read-only,https://www.googleapis.com/auth/service.managementB\xdb\x01\n" + - "\x1ecom.google.api.serviceusage.v1B\x11ServiceUsageProtoP\x01ZDcloud.google.com/go/serviceusage/apiv1/serviceusagepb;serviceusagepb\xaa\x02\x1cGoogle.Cloud.ServiceUsage.V1\xca\x02\x1cGoogle\\Cloud\\ServiceUsage\\V1\xea\x02\x1fGoogle::Cloud::ServiceUsage::V1b\x06proto3" - -var ( - file_google_api_serviceusage_v1_serviceusage_proto_rawDescOnce sync.Once - file_google_api_serviceusage_v1_serviceusage_proto_rawDescData []byte -) - -func file_google_api_serviceusage_v1_serviceusage_proto_rawDescGZIP() []byte { - file_google_api_serviceusage_v1_serviceusage_proto_rawDescOnce.Do(func() { - file_google_api_serviceusage_v1_serviceusage_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_google_api_serviceusage_v1_serviceusage_proto_rawDesc), len(file_google_api_serviceusage_v1_serviceusage_proto_rawDesc))) - }) - return file_google_api_serviceusage_v1_serviceusage_proto_rawDescData -} - -var file_google_api_serviceusage_v1_serviceusage_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_google_api_serviceusage_v1_serviceusage_proto_msgTypes = make([]protoimpl.MessageInfo, 12) -var file_google_api_serviceusage_v1_serviceusage_proto_goTypes = []any{ - (DisableServiceRequest_CheckIfServiceHasUsage)(0), // 0: google.api.serviceusage.v1.DisableServiceRequest.CheckIfServiceHasUsage - (*EnableServiceRequest)(nil), // 1: google.api.serviceusage.v1.EnableServiceRequest - (*EnableServiceResponse)(nil), // 2: google.api.serviceusage.v1.EnableServiceResponse - (*DisableServiceRequest)(nil), // 3: google.api.serviceusage.v1.DisableServiceRequest - (*DisableServiceResponse)(nil), // 4: google.api.serviceusage.v1.DisableServiceResponse - (*GetServiceRequest)(nil), // 5: google.api.serviceusage.v1.GetServiceRequest - (*ListServicesRequest)(nil), // 6: google.api.serviceusage.v1.ListServicesRequest - (*ListServicesResponse)(nil), // 7: google.api.serviceusage.v1.ListServicesResponse - (*BatchEnableServicesRequest)(nil), // 8: google.api.serviceusage.v1.BatchEnableServicesRequest - (*BatchEnableServicesResponse)(nil), // 9: google.api.serviceusage.v1.BatchEnableServicesResponse - (*BatchGetServicesRequest)(nil), // 10: google.api.serviceusage.v1.BatchGetServicesRequest - (*BatchGetServicesResponse)(nil), // 11: google.api.serviceusage.v1.BatchGetServicesResponse - (*BatchEnableServicesResponse_EnableFailure)(nil), // 12: google.api.serviceusage.v1.BatchEnableServicesResponse.EnableFailure - (*Service)(nil), // 13: google.api.serviceusage.v1.Service - (*longrunningpb.Operation)(nil), // 14: google.longrunning.Operation -} -var file_google_api_serviceusage_v1_serviceusage_proto_depIdxs = []int32{ - 13, // 0: google.api.serviceusage.v1.EnableServiceResponse.service:type_name -> google.api.serviceusage.v1.Service - 0, // 1: google.api.serviceusage.v1.DisableServiceRequest.check_if_service_has_usage:type_name -> google.api.serviceusage.v1.DisableServiceRequest.CheckIfServiceHasUsage - 13, // 2: google.api.serviceusage.v1.DisableServiceResponse.service:type_name -> google.api.serviceusage.v1.Service - 13, // 3: google.api.serviceusage.v1.ListServicesResponse.services:type_name -> google.api.serviceusage.v1.Service - 13, // 4: google.api.serviceusage.v1.BatchEnableServicesResponse.services:type_name -> google.api.serviceusage.v1.Service - 12, // 5: google.api.serviceusage.v1.BatchEnableServicesResponse.failures:type_name -> google.api.serviceusage.v1.BatchEnableServicesResponse.EnableFailure - 13, // 6: google.api.serviceusage.v1.BatchGetServicesResponse.services:type_name -> google.api.serviceusage.v1.Service - 1, // 7: google.api.serviceusage.v1.ServiceUsage.EnableService:input_type -> google.api.serviceusage.v1.EnableServiceRequest - 3, // 8: google.api.serviceusage.v1.ServiceUsage.DisableService:input_type -> google.api.serviceusage.v1.DisableServiceRequest - 5, // 9: google.api.serviceusage.v1.ServiceUsage.GetService:input_type -> google.api.serviceusage.v1.GetServiceRequest - 6, // 10: google.api.serviceusage.v1.ServiceUsage.ListServices:input_type -> google.api.serviceusage.v1.ListServicesRequest - 8, // 11: google.api.serviceusage.v1.ServiceUsage.BatchEnableServices:input_type -> google.api.serviceusage.v1.BatchEnableServicesRequest - 10, // 12: google.api.serviceusage.v1.ServiceUsage.BatchGetServices:input_type -> google.api.serviceusage.v1.BatchGetServicesRequest - 14, // 13: google.api.serviceusage.v1.ServiceUsage.EnableService:output_type -> google.longrunning.Operation - 14, // 14: google.api.serviceusage.v1.ServiceUsage.DisableService:output_type -> google.longrunning.Operation - 13, // 15: google.api.serviceusage.v1.ServiceUsage.GetService:output_type -> google.api.serviceusage.v1.Service - 7, // 16: google.api.serviceusage.v1.ServiceUsage.ListServices:output_type -> google.api.serviceusage.v1.ListServicesResponse - 14, // 17: google.api.serviceusage.v1.ServiceUsage.BatchEnableServices:output_type -> google.longrunning.Operation - 11, // 18: google.api.serviceusage.v1.ServiceUsage.BatchGetServices:output_type -> google.api.serviceusage.v1.BatchGetServicesResponse - 13, // [13:19] is the sub-list for method output_type - 7, // [7:13] is the sub-list for method input_type - 7, // [7:7] is the sub-list for extension type_name - 7, // [7:7] is the sub-list for extension extendee - 0, // [0:7] is the sub-list for field type_name -} - -func init() { file_google_api_serviceusage_v1_serviceusage_proto_init() } -func file_google_api_serviceusage_v1_serviceusage_proto_init() { - if File_google_api_serviceusage_v1_serviceusage_proto != nil { - return - } - file_google_api_serviceusage_v1_resources_proto_init() - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: unsafe.Slice(unsafe.StringData(file_google_api_serviceusage_v1_serviceusage_proto_rawDesc), len(file_google_api_serviceusage_v1_serviceusage_proto_rawDesc)), - NumEnums: 1, - NumMessages: 12, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_google_api_serviceusage_v1_serviceusage_proto_goTypes, - DependencyIndexes: file_google_api_serviceusage_v1_serviceusage_proto_depIdxs, - EnumInfos: file_google_api_serviceusage_v1_serviceusage_proto_enumTypes, - MessageInfos: file_google_api_serviceusage_v1_serviceusage_proto_msgTypes, - }.Build() - File_google_api_serviceusage_v1_serviceusage_proto = out.File - file_google_api_serviceusage_v1_serviceusage_proto_goTypes = nil - file_google_api_serviceusage_v1_serviceusage_proto_depIdxs = nil -} diff --git a/vendor/cloud.google.com/go/serviceusage/apiv1/serviceusagepb/serviceusage_grpc.pb.go b/vendor/cloud.google.com/go/serviceusage/apiv1/serviceusagepb/serviceusage_grpc.pb.go deleted file mode 100644 index 86596893e7..0000000000 --- a/vendor/cloud.google.com/go/serviceusage/apiv1/serviceusagepb/serviceusage_grpc.pb.go +++ /dev/null @@ -1,362 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Code generated by protoc-gen-go-grpc. DO NOT EDIT. -// versions: -// - protoc-gen-go-grpc v1.3.0 -// - protoc v6.33.2 -// source: google/api/serviceusage/v1/serviceusage.proto - -package serviceusagepb - -import ( - context "context" - - longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" -) - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 - -const ( - ServiceUsage_EnableService_FullMethodName = "/google.api.serviceusage.v1.ServiceUsage/EnableService" - ServiceUsage_DisableService_FullMethodName = "/google.api.serviceusage.v1.ServiceUsage/DisableService" - ServiceUsage_GetService_FullMethodName = "/google.api.serviceusage.v1.ServiceUsage/GetService" - ServiceUsage_ListServices_FullMethodName = "/google.api.serviceusage.v1.ServiceUsage/ListServices" - ServiceUsage_BatchEnableServices_FullMethodName = "/google.api.serviceusage.v1.ServiceUsage/BatchEnableServices" - ServiceUsage_BatchGetServices_FullMethodName = "/google.api.serviceusage.v1.ServiceUsage/BatchGetServices" -) - -// ServiceUsageClient is the client API for ServiceUsage service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. -type ServiceUsageClient interface { - // Enable a service so that it can be used with a project. - EnableService(ctx context.Context, in *EnableServiceRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) - // Disable a service so that it can no longer be used with a project. - // This prevents unintended usage that may cause unexpected billing - // charges or security leaks. - // - // It is not valid to call the disable method on a service that is not - // currently enabled. Callers will receive a `FAILED_PRECONDITION` status if - // the target service is not currently enabled. - DisableService(ctx context.Context, in *DisableServiceRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) - // Returns the service configuration and enabled state for a given service. - GetService(ctx context.Context, in *GetServiceRequest, opts ...grpc.CallOption) (*Service, error) - // List all services available to the specified project, and the current - // state of those services with respect to the project. The list includes - // all public services, all services for which the calling user has the - // `servicemanagement.services.bind` permission, and all services that have - // already been enabled on the project. The list can be filtered to - // only include services in a specific state, for example to only include - // services enabled on the project. - // - // WARNING: If you need to query enabled services frequently or across - // an organization, you should use - // [Cloud Asset Inventory - // API](https://cloud.google.com/asset-inventory/docs/apis), which provides - // higher throughput and richer filtering capability. - ListServices(ctx context.Context, in *ListServicesRequest, opts ...grpc.CallOption) (*ListServicesResponse, error) - // Enable multiple services on a project. The operation is atomic: if enabling - // any service fails, then the entire batch fails, and no state changes occur. - // To enable a single service, use the `EnableService` method instead. - BatchEnableServices(ctx context.Context, in *BatchEnableServicesRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) - // Returns the service configurations and enabled states for a given list of - // services. - BatchGetServices(ctx context.Context, in *BatchGetServicesRequest, opts ...grpc.CallOption) (*BatchGetServicesResponse, error) -} - -type serviceUsageClient struct { - cc grpc.ClientConnInterface -} - -func NewServiceUsageClient(cc grpc.ClientConnInterface) ServiceUsageClient { - return &serviceUsageClient{cc} -} - -func (c *serviceUsageClient) EnableService(ctx context.Context, in *EnableServiceRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) { - out := new(longrunningpb.Operation) - err := c.cc.Invoke(ctx, ServiceUsage_EnableService_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *serviceUsageClient) DisableService(ctx context.Context, in *DisableServiceRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) { - out := new(longrunningpb.Operation) - err := c.cc.Invoke(ctx, ServiceUsage_DisableService_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *serviceUsageClient) GetService(ctx context.Context, in *GetServiceRequest, opts ...grpc.CallOption) (*Service, error) { - out := new(Service) - err := c.cc.Invoke(ctx, ServiceUsage_GetService_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *serviceUsageClient) ListServices(ctx context.Context, in *ListServicesRequest, opts ...grpc.CallOption) (*ListServicesResponse, error) { - out := new(ListServicesResponse) - err := c.cc.Invoke(ctx, ServiceUsage_ListServices_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *serviceUsageClient) BatchEnableServices(ctx context.Context, in *BatchEnableServicesRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) { - out := new(longrunningpb.Operation) - err := c.cc.Invoke(ctx, ServiceUsage_BatchEnableServices_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *serviceUsageClient) BatchGetServices(ctx context.Context, in *BatchGetServicesRequest, opts ...grpc.CallOption) (*BatchGetServicesResponse, error) { - out := new(BatchGetServicesResponse) - err := c.cc.Invoke(ctx, ServiceUsage_BatchGetServices_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// ServiceUsageServer is the server API for ServiceUsage service. -// All implementations should embed UnimplementedServiceUsageServer -// for forward compatibility -type ServiceUsageServer interface { - // Enable a service so that it can be used with a project. - EnableService(context.Context, *EnableServiceRequest) (*longrunningpb.Operation, error) - // Disable a service so that it can no longer be used with a project. - // This prevents unintended usage that may cause unexpected billing - // charges or security leaks. - // - // It is not valid to call the disable method on a service that is not - // currently enabled. Callers will receive a `FAILED_PRECONDITION` status if - // the target service is not currently enabled. - DisableService(context.Context, *DisableServiceRequest) (*longrunningpb.Operation, error) - // Returns the service configuration and enabled state for a given service. - GetService(context.Context, *GetServiceRequest) (*Service, error) - // List all services available to the specified project, and the current - // state of those services with respect to the project. The list includes - // all public services, all services for which the calling user has the - // `servicemanagement.services.bind` permission, and all services that have - // already been enabled on the project. The list can be filtered to - // only include services in a specific state, for example to only include - // services enabled on the project. - // - // WARNING: If you need to query enabled services frequently or across - // an organization, you should use - // [Cloud Asset Inventory - // API](https://cloud.google.com/asset-inventory/docs/apis), which provides - // higher throughput and richer filtering capability. - ListServices(context.Context, *ListServicesRequest) (*ListServicesResponse, error) - // Enable multiple services on a project. The operation is atomic: if enabling - // any service fails, then the entire batch fails, and no state changes occur. - // To enable a single service, use the `EnableService` method instead. - BatchEnableServices(context.Context, *BatchEnableServicesRequest) (*longrunningpb.Operation, error) - // Returns the service configurations and enabled states for a given list of - // services. - BatchGetServices(context.Context, *BatchGetServicesRequest) (*BatchGetServicesResponse, error) -} - -// UnimplementedServiceUsageServer should be embedded to have forward compatible implementations. -type UnimplementedServiceUsageServer struct { -} - -func (UnimplementedServiceUsageServer) EnableService(context.Context, *EnableServiceRequest) (*longrunningpb.Operation, error) { - return nil, status.Errorf(codes.Unimplemented, "method EnableService not implemented") -} -func (UnimplementedServiceUsageServer) DisableService(context.Context, *DisableServiceRequest) (*longrunningpb.Operation, error) { - return nil, status.Errorf(codes.Unimplemented, "method DisableService not implemented") -} -func (UnimplementedServiceUsageServer) GetService(context.Context, *GetServiceRequest) (*Service, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetService not implemented") -} -func (UnimplementedServiceUsageServer) ListServices(context.Context, *ListServicesRequest) (*ListServicesResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ListServices not implemented") -} -func (UnimplementedServiceUsageServer) BatchEnableServices(context.Context, *BatchEnableServicesRequest) (*longrunningpb.Operation, error) { - return nil, status.Errorf(codes.Unimplemented, "method BatchEnableServices not implemented") -} -func (UnimplementedServiceUsageServer) BatchGetServices(context.Context, *BatchGetServicesRequest) (*BatchGetServicesResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method BatchGetServices not implemented") -} - -// UnsafeServiceUsageServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to ServiceUsageServer will -// result in compilation errors. -type UnsafeServiceUsageServer interface { - mustEmbedUnimplementedServiceUsageServer() -} - -func RegisterServiceUsageServer(s grpc.ServiceRegistrar, srv ServiceUsageServer) { - s.RegisterService(&ServiceUsage_ServiceDesc, srv) -} - -func _ServiceUsage_EnableService_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(EnableServiceRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ServiceUsageServer).EnableService(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: ServiceUsage_EnableService_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ServiceUsageServer).EnableService(ctx, req.(*EnableServiceRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ServiceUsage_DisableService_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DisableServiceRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ServiceUsageServer).DisableService(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: ServiceUsage_DisableService_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ServiceUsageServer).DisableService(ctx, req.(*DisableServiceRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ServiceUsage_GetService_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetServiceRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ServiceUsageServer).GetService(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: ServiceUsage_GetService_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ServiceUsageServer).GetService(ctx, req.(*GetServiceRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ServiceUsage_ListServices_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ListServicesRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ServiceUsageServer).ListServices(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: ServiceUsage_ListServices_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ServiceUsageServer).ListServices(ctx, req.(*ListServicesRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ServiceUsage_BatchEnableServices_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(BatchEnableServicesRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ServiceUsageServer).BatchEnableServices(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: ServiceUsage_BatchEnableServices_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ServiceUsageServer).BatchEnableServices(ctx, req.(*BatchEnableServicesRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ServiceUsage_BatchGetServices_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(BatchGetServicesRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ServiceUsageServer).BatchGetServices(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: ServiceUsage_BatchGetServices_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ServiceUsageServer).BatchGetServices(ctx, req.(*BatchGetServicesRequest)) - } - return interceptor(ctx, in, info, handler) -} - -// ServiceUsage_ServiceDesc is the grpc.ServiceDesc for ServiceUsage service. -// It's only intended for direct use with grpc.RegisterService, -// and not to be introspected or modified (even as a copy) -var ServiceUsage_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "google.api.serviceusage.v1.ServiceUsage", - HandlerType: (*ServiceUsageServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "EnableService", - Handler: _ServiceUsage_EnableService_Handler, - }, - { - MethodName: "DisableService", - Handler: _ServiceUsage_DisableService_Handler, - }, - { - MethodName: "GetService", - Handler: _ServiceUsage_GetService_Handler, - }, - { - MethodName: "ListServices", - Handler: _ServiceUsage_ListServices_Handler, - }, - { - MethodName: "BatchEnableServices", - Handler: _ServiceUsage_BatchEnableServices_Handler, - }, - { - MethodName: "BatchGetServices", - Handler: _ServiceUsage_BatchGetServices_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "google/api/serviceusage/v1/serviceusage.proto", -} diff --git a/vendor/cloud.google.com/go/serviceusage/apiv1/version.go b/vendor/cloud.google.com/go/serviceusage/apiv1/version.go deleted file mode 100644 index 4e636d3928..0000000000 --- a/vendor/cloud.google.com/go/serviceusage/apiv1/version.go +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Code generated by gapicgen. DO NOT EDIT. - -package serviceusage - -import "cloud.google.com/go/serviceusage/internal" - -func init() { - versionClient = internal.Version -} diff --git a/vendor/cloud.google.com/go/serviceusage/internal/version.go b/vendor/cloud.google.com/go/serviceusage/internal/version.go deleted file mode 100644 index 7f7d07d0b9..0000000000 --- a/vendor/cloud.google.com/go/serviceusage/internal/version.go +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Code generated by gapicgen. DO NOT EDIT. - -package internal - -// Version is the current tagged release of the library. -const Version = "1.14.0" diff --git a/vendor/cloud.google.com/go/testing.md b/vendor/cloud.google.com/go/testing.md deleted file mode 100644 index 78bb35b3b6..0000000000 --- a/vendor/cloud.google.com/go/testing.md +++ /dev/null @@ -1,237 +0,0 @@ -# Testing Code that depends on Go Client Libraries - -The Go client libraries generated as a part of `cloud.google.com/go` all take -the approach of returning concrete types instead of interfaces. That way, new -fields and methods can be added to the libraries without breaking users. This -document will go over some patterns that can be used to test code that depends -on the Go client libraries. - -## Testing gRPC services using fakes - -*Note*: You can see the full -[example code using a fake here](https://github.com/googleapis/google-cloud-go/tree/main/internal/examples/fake). - -The clients found in `cloud.google.com/go` are gRPC based, with a couple of -notable exceptions being the [`storage`](https://pkg.go.dev/cloud.google.com/go/storage) -and [`bigquery`](https://pkg.go.dev/cloud.google.com/go/bigquery) clients. -Interactions with gRPC services can be faked by serving up your own in-memory -server within your test. One benefit of using this approach is that you don’t -need to define an interface in your runtime code; you can keep using -concrete struct types. You instead define a fake server in your test code. For -example, take a look at the following function: - -```go -import ( - "context" - "fmt" - "log" - "os" - - translate "cloud.google.com/go/translate/apiv3" - "github.com/googleapis/gax-go/v2" - translatepb "google.golang.org/genproto/googleapis/cloud/translate/v3" -) - -func TranslateTextWithConcreteClient(client *translate.TranslationClient, text string, targetLang string) (string, error) { - ctx := context.Background() - log.Printf("Translating %q to %q", text, targetLang) - req := &translatepb.TranslateTextRequest{ - Parent: fmt.Sprintf("projects/%s/locations/global", os.Getenv("GOOGLE_CLOUD_PROJECT")), - TargetLanguageCode: "en-US", - Contents: []string{text}, - } - resp, err := client.TranslateText(ctx, req) - if err != nil { - return "", fmt.Errorf("unable to translate text: %v", err) - } - translations := resp.GetTranslations() - if len(translations) != 1 { - return "", fmt.Errorf("expected only one result, got %d", len(translations)) - } - return translations[0].TranslatedText, nil -} -``` - -Here is an example of what a fake server implementation would look like for -faking the interactions above: - -```go -import ( - "context" - - translatepb "google.golang.org/genproto/googleapis/cloud/translate/v3" -) - -type fakeTranslationServer struct { - translatepb.UnimplementedTranslationServiceServer -} - -func (f *fakeTranslationServer) TranslateText(ctx context.Context, req *translatepb.TranslateTextRequest) (*translatepb.TranslateTextResponse, error) { - resp := &translatepb.TranslateTextResponse{ - Translations: []*translatepb.Translation{ - &translatepb.Translation{ - TranslatedText: "Hello World", - }, - }, - } - return resp, nil -} -``` - -All of the generated protobuf code found in [google.golang.org/genproto](https://pkg.go.dev/google.golang.org/genproto) -contains a similar `package.UnimplementedFooServer` type that is useful for -creating fakes. By embedding the unimplemented server in the -`fakeTranslationServer`, the fake will “inherit” all of the RPCs the server -exposes. Then, by providing our own `fakeTranslationServer.TranslateText` -method you can “override” the default unimplemented behavior of the one RPC that -you would like to be faked. - -The test itself does require a little bit of setup: start up a `net.Listener`, -register the server, and tell the client library to call the server: - -```go -import ( - "context" - "net" - "testing" - - translate "cloud.google.com/go/translate/apiv3" - "google.golang.org/api/option" - translatepb "google.golang.org/genproto/googleapis/cloud/translate/v3" - "google.golang.org/grpc" - "google.golang.org/grpc/credentials/insecure" -) - -func TestTranslateTextWithConcreteClient(t *testing.T) { - ctx := context.Background() - - // Setup the fake server. - fakeTranslationServer := &fakeTranslationServer{} - l, err := net.Listen("tcp", "localhost:0") - if err != nil { - t.Fatal(err) - } - gsrv := grpc.NewServer() - translatepb.RegisterTranslationServiceServer(gsrv, fakeTranslationServer) - fakeServerAddr := l.Addr().String() - go func() { - if err := gsrv.Serve(l); err != nil { - panic(err) - } - }() - - // Create a client. - client, err := translate.NewTranslationClient(ctx, - option.WithEndpoint(fakeServerAddr), - option.WithoutAuthentication(), - option.WithGRPCDialOption(grpc.WithTransportCredentials(insecure.NewCredentials())), - ) - if err != nil { - t.Fatal(err) - } - - // Run the test. - text, err := TranslateTextWithConcreteClient(client, "Hola Mundo", "en-US") - if err != nil { - t.Fatal(err) - } - if text != "Hello World" { - t.Fatalf("got %q, want Hello World", text) - } -} -``` - -## Testing using mocks - -*Note*: You can see the full -[example code using a mock here](https://github.com/googleapis/google-cloud-go/tree/main/internal/examples/mock). - -When mocking code you need to work with interfaces. Let’s create an interface -for the `cloud.google.com/go/translate/apiv3` client used in the -`TranslateTextWithConcreteClient` function mentioned in the previous section. -The `translate.Client` has over a dozen methods but this code only uses one of -them. Here is an interface that satisfies the interactions of the -`translate.Client` in this function. - -```go -type TranslationClient interface { - TranslateText(ctx context.Context, req *translatepb.TranslateTextRequest, opts ...gax.CallOption) (*translatepb.TranslateTextResponse, error) -} -``` - -Now that we have an interface that satisfies the method being used we can -rewrite the function signature to take the interface instead of the concrete -type. - -```go -func TranslateTextWithInterfaceClient(client TranslationClient, text string, targetLang string) (string, error) { -// ... -} -``` - -This allows a real `translate.Client` to be passed to the method in production -and for a mock implementation to be passed in during testing. This pattern can -be applied to any Go code, not just `cloud.google.com/go`. This is because -interfaces in Go are implicitly satisfied. Structs in the client libraries can -implicitly implement interfaces defined in your codebase. Let’s take a look at -what it might look like to define a lightweight mock for the `TranslationClient` -interface. - -```go -import ( - "context" - "testing" - - "github.com/googleapis/gax-go/v2" - translatepb "google.golang.org/genproto/googleapis/cloud/translate/v3" -) - -type mockClient struct{} - -func (*mockClient) TranslateText(_ context.Context, req *translatepb.TranslateTextRequest, opts ...gax.CallOption) (*translatepb.TranslateTextResponse, error) { - resp := &translatepb.TranslateTextResponse{ - Translations: []*translatepb.Translation{ - &translatepb.Translation{ - TranslatedText: "Hello World", - }, - }, - } - return resp, nil -} - -func TestTranslateTextWithAbstractClient(t *testing.T) { - client := &mockClient{} - text, err := TranslateTextWithInterfaceClient(client, "Hola Mundo", "en-US") - if err != nil { - t.Fatal(err) - } - if text != "Hello World" { - t.Fatalf("got %q, want Hello World", text) - } -} -``` - -If you prefer to not write your own mocks there are mocking frameworks such as -[golang/mock](https://github.com/golang/mock) which can generate mocks for you -from an interface. As a word of caution though, try to not -[overuse mocks](https://testing.googleblog.com/2013/05/testing-on-toilet-dont-overuse-mocks.html). - -## Testing using emulators - -Some of the client libraries provided in `cloud.google.com/go` support running -against a service emulator. The concept is similar to that of using fakes, -mentioned above, but the server is managed for you. You just need to start it up -and instruct the client library to talk to the emulator by setting a service -specific emulator environment variable. Current services/environment-variables -are: - -- bigtable: `BIGTABLE_EMULATOR_HOST` -- datastore: `DATASTORE_EMULATOR_HOST` -- firestore: `FIRESTORE_EMULATOR_HOST` -- pubsub: `PUBSUB_EMULATOR_HOST` -- spanner: `SPANNER_EMULATOR_HOST` -- storage: `STORAGE_EMULATOR_HOST` - - Although the storage client supports an emulator environment variable there is no official emulator provided by gcloud. - -For more information on emulators please refer to the -[gcloud documentation](https://cloud.google.com/sdk/gcloud/reference/beta/emulators). diff --git a/vendor/google.golang.org/api/iam/v1/iam-api.json b/vendor/google.golang.org/api/iam/v1/iam-api.json deleted file mode 100644 index a3dfbedf70..0000000000 --- a/vendor/google.golang.org/api/iam/v1/iam-api.json +++ /dev/null @@ -1,6920 +0,0 @@ -{ - "auth": { - "oauth2": { - "scopes": { - "https://www.googleapis.com/auth/cloud-platform": { - "description": "See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account." - } - } - } - }, - "basePath": "", - "baseUrl": "https://iam.googleapis.com/", - "batchPath": "batch", - "canonicalName": "Iam", - "description": "Manages identity and access control for Google Cloud resources, including the creation of service accounts, which you can use to authenticate to Google and make API calls. Enabling this API also enables the IAM Service Account Credentials API (iamcredentials.googleapis.com). However, disabling this API doesn't disable the IAM Service Account Credentials API. ", - "discoveryVersion": "v1", - "documentationLink": "https://cloud.google.com/iam/", - "fullyEncodeReservedExpansion": true, - "icons": { - "x16": "http://www.google.com/images/icons/product/search-16.gif", - "x32": "http://www.google.com/images/icons/product/search-32.gif" - }, - "id": "iam:v1", - "kind": "discovery#restDescription", - "mtlsRootUrl": "https://iam.mtls.googleapis.com/", - "name": "iam", - "ownerDomain": "google.com", - "ownerName": "Google", - "parameters": { - "$.xgafv": { - "description": "V1 error format.", - "enum": [ - "1", - "2" - ], - "enumDescriptions": [ - "v1 error format", - "v2 error format" - ], - "location": "query", - "type": "string" - }, - "access_token": { - "description": "OAuth access token.", - "location": "query", - "type": "string" - }, - "alt": { - "default": "json", - "description": "Data format for response.", - "enum": [ - "json", - "media", - "proto" - ], - "enumDescriptions": [ - "Responses with Content-Type of application/json", - "Media download with context-dependent Content-Type", - "Responses with Content-Type of application/x-protobuf" - ], - "location": "query", - "type": "string" - }, - "callback": { - "description": "JSONP", - "location": "query", - "type": "string" - }, - "fields": { - "description": "Selector specifying which fields to include in a partial response.", - "location": "query", - "type": "string" - }, - "key": { - "description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", - "location": "query", - "type": "string" - }, - "oauth_token": { - "description": "OAuth 2.0 token for the current user.", - "location": "query", - "type": "string" - }, - "prettyPrint": { - "default": "true", - "description": "Returns response with indentations and line breaks.", - "location": "query", - "type": "boolean" - }, - "quotaUser": { - "description": "Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.", - "location": "query", - "type": "string" - }, - "uploadType": { - "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", - "location": "query", - "type": "string" - }, - "upload_protocol": { - "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", - "location": "query", - "type": "string" - } - }, - "protocol": "rest", - "resources": { - "iamPolicies": { - "methods": { - "lintPolicy": { - "description": "Lints, or validates, an IAM policy. Currently checks the google.iam.v1.Binding.condition field, which contains a condition expression for a role binding. Successful calls to this method always return an HTTP `200 OK` status code, even if the linter detects an issue in the IAM policy.", - "flatPath": "v1/iamPolicies:lintPolicy", - "httpMethod": "POST", - "id": "iam.iamPolicies.lintPolicy", - "parameterOrder": [], - "parameters": {}, - "path": "v1/iamPolicies:lintPolicy", - "request": { - "$ref": "LintPolicyRequest" - }, - "response": { - "$ref": "LintPolicyResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "queryAuditableServices": { - "description": "Returns a list of services that allow you to opt into audit logs that are not generated by default. To learn more about audit logs, see the [Logging documentation](https://cloud.google.com/logging/docs/audit).", - "flatPath": "v1/iamPolicies:queryAuditableServices", - "httpMethod": "POST", - "id": "iam.iamPolicies.queryAuditableServices", - "parameterOrder": [], - "parameters": {}, - "path": "v1/iamPolicies:queryAuditableServices", - "request": { - "$ref": "QueryAuditableServicesRequest" - }, - "response": { - "$ref": "QueryAuditableServicesResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - } - } - }, - "locations": { - "resources": { - "workforcePools": { - "methods": { - "create": { - "description": "Creates a new WorkforcePool. You cannot reuse the name of a deleted pool until 30 days after deletion.", - "flatPath": "v1/locations/{locationsId}/workforcePools", - "httpMethod": "POST", - "id": "iam.locations.workforcePools.create", - "parameterOrder": [ - "location" - ], - "parameters": { - "location": { - "description": "Optional. The location of the pool to create. Format: `locations/{location}`.", - "location": "path", - "pattern": "^locations/[^/]+$", - "required": true, - "type": "string" - }, - "workforcePoolId": { - "description": "Optional. The ID to use for the pool, which becomes the final component of the resource name. The IDs must be a globally unique string of 6 to 63 lowercase letters, digits, or hyphens. It must start with a letter, and cannot have a trailing hyphen. The prefix `gcp-` is reserved for use by Google, and may not be specified.", - "location": "query", - "type": "string" - } - }, - "path": "v1/{+location}/workforcePools", - "request": { - "$ref": "WorkforcePool" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "delete": { - "description": "Deletes a WorkforcePool. You cannot use a deleted WorkforcePool to exchange external credentials for Google Cloud credentials. However, deletion does not revoke credentials that have already been issued. Credentials issued for a deleted pool do not grant access to resources. If the pool is undeleted, and the credentials are not expired, they grant access again. You can undelete a pool for 30 days. After 30 days, deletion is permanent. You cannot update deleted pools. However, you can view and list them.", - "flatPath": "v1/locations/{locationsId}/workforcePools/{workforcePoolsId}", - "httpMethod": "DELETE", - "id": "iam.locations.workforcePools.delete", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Required. The name of the pool to delete. Format: `locations/{location}/workforcePools/{workforce_pool_id}`", - "location": "path", - "pattern": "^locations/[^/]+/workforcePools/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+name}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "get": { - "description": "Gets an individual WorkforcePool.", - "flatPath": "v1/locations/{locationsId}/workforcePools/{workforcePoolsId}", - "httpMethod": "GET", - "id": "iam.locations.workforcePools.get", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Required. The name of the pool to retrieve. Format: `locations/{location}/workforcePools/{workforce_pool_id}`", - "location": "path", - "pattern": "^locations/[^/]+/workforcePools/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+name}", - "response": { - "$ref": "WorkforcePool" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "getIamPolicy": { - "description": "Gets IAM policies on a WorkforcePool.", - "flatPath": "v1/locations/{locationsId}/workforcePools/{workforcePoolsId}:getIamPolicy", - "httpMethod": "POST", - "id": "iam.locations.workforcePools.getIamPolicy", - "parameterOrder": [ - "resource" - ], - "parameters": { - "resource": { - "description": "REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", - "location": "path", - "pattern": "^locations/[^/]+/workforcePools/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+resource}:getIamPolicy", - "request": { - "$ref": "GetIamPolicyRequest" - }, - "response": { - "$ref": "Policy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "list": { - "description": "Lists all non-deleted WorkforcePools under the specified parent. If `show_deleted` is set to `true`, then deleted pools are also listed.", - "flatPath": "v1/locations/{locationsId}/workforcePools", - "httpMethod": "GET", - "id": "iam.locations.workforcePools.list", - "parameterOrder": [ - "location" - ], - "parameters": { - "location": { - "description": "The location of the pool. Format: `locations/{location}`.", - "location": "path", - "pattern": "^locations/[^/]+$", - "required": true, - "type": "string" - }, - "pageSize": { - "description": "The maximum number of pools to return. The default value is 50. The maximum value is 100.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "pageToken": { - "description": "A page token, received from a previous `ListWorkforcePools` call. Provide this to retrieve the subsequent page.", - "location": "query", - "type": "string" - }, - "parent": { - "description": "Required. The parent resource to list pools for. Format: `organizations/{org-id}`.", - "location": "query", - "type": "string" - }, - "showDeleted": { - "description": "Whether to return soft-deleted pools.", - "location": "query", - "type": "boolean" - } - }, - "path": "v1/{+location}/workforcePools", - "response": { - "$ref": "ListWorkforcePoolsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "patch": { - "description": "Updates an existing WorkforcePool.", - "flatPath": "v1/locations/{locationsId}/workforcePools/{workforcePoolsId}", - "httpMethod": "PATCH", - "id": "iam.locations.workforcePools.patch", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Identifier. The resource name of the pool. Format: `locations/{location}/workforcePools/{workforce_pool_id}`", - "location": "path", - "pattern": "^locations/[^/]+/workforcePools/[^/]+$", - "required": true, - "type": "string" - }, - "updateMask": { - "description": "Required. The list of fields to update.", - "format": "google-fieldmask", - "location": "query", - "type": "string" - } - }, - "path": "v1/{+name}", - "request": { - "$ref": "WorkforcePool" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "setIamPolicy": { - "description": "Sets IAM policies on a WorkforcePool.", - "flatPath": "v1/locations/{locationsId}/workforcePools/{workforcePoolsId}:setIamPolicy", - "httpMethod": "POST", - "id": "iam.locations.workforcePools.setIamPolicy", - "parameterOrder": [ - "resource" - ], - "parameters": { - "resource": { - "description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", - "location": "path", - "pattern": "^locations/[^/]+/workforcePools/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+resource}:setIamPolicy", - "request": { - "$ref": "SetIamPolicyRequest" - }, - "response": { - "$ref": "Policy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "testIamPermissions": { - "description": "Returns the caller's permissions on the WorkforcePool. If the pool doesn't exist, this call returns an empty set of permissions. It doesn't return a `NOT_FOUND` error.", - "flatPath": "v1/locations/{locationsId}/workforcePools/{workforcePoolsId}:testIamPermissions", - "httpMethod": "POST", - "id": "iam.locations.workforcePools.testIamPermissions", - "parameterOrder": [ - "resource" - ], - "parameters": { - "resource": { - "description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", - "location": "path", - "pattern": "^locations/[^/]+/workforcePools/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+resource}:testIamPermissions", - "request": { - "$ref": "TestIamPermissionsRequest" - }, - "response": { - "$ref": "TestIamPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "undelete": { - "description": "Undeletes a WorkforcePool, as long as it was deleted fewer than 30 days ago.", - "flatPath": "v1/locations/{locationsId}/workforcePools/{workforcePoolsId}:undelete", - "httpMethod": "POST", - "id": "iam.locations.workforcePools.undelete", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Required. The name of the pool to undelete. Format: `locations/{location}/workforcePools/{workforce_pool_id}`", - "location": "path", - "pattern": "^locations/[^/]+/workforcePools/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+name}:undelete", - "request": { - "$ref": "UndeleteWorkforcePoolRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - } - }, - "resources": { - "operations": { - "methods": { - "get": { - "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", - "flatPath": "v1/locations/{locationsId}/workforcePools/{workforcePoolsId}/operations/{operationsId}", - "httpMethod": "GET", - "id": "iam.locations.workforcePools.operations.get", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "The name of the operation resource.", - "location": "path", - "pattern": "^locations/[^/]+/workforcePools/[^/]+/operations/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+name}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - } - } - }, - "providers": { - "methods": { - "create": { - "description": "Creates a new WorkforcePoolProvider in a WorkforcePool. You cannot reuse the name of a deleted provider until 30 days after deletion.", - "flatPath": "v1/locations/{locationsId}/workforcePools/{workforcePoolsId}/providers", - "httpMethod": "POST", - "id": "iam.locations.workforcePools.providers.create", - "parameterOrder": [ - "parent" - ], - "parameters": { - "parent": { - "description": "Required. The pool to create this provider in. Format: `locations/{location}/workforcePools/{workforce_pool_id}`", - "location": "path", - "pattern": "^locations/[^/]+/workforcePools/[^/]+$", - "required": true, - "type": "string" - }, - "workforcePoolProviderId": { - "description": "Required. The ID for the provider, which becomes the final component of the resource name. This value must be 4-32 characters, and may contain the characters `[a-z0-9-]`. The prefix `gcp-` is reserved for use by Google, and may not be specified.", - "location": "query", - "type": "string" - } - }, - "path": "v1/{+parent}/providers", - "request": { - "$ref": "WorkforcePoolProvider" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "delete": { - "description": "Deletes a WorkforcePoolProvider. Deleting a provider does not revoke credentials that have already been issued; they continue to grant access. You can undelete a provider for 30 days. After 30 days, deletion is permanent. You cannot update deleted providers. However, you can view and list them.", - "flatPath": "v1/locations/{locationsId}/workforcePools/{workforcePoolsId}/providers/{providersId}", - "httpMethod": "DELETE", - "id": "iam.locations.workforcePools.providers.delete", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Required. The name of the provider to delete. Format: `locations/{location}/workforcePools/{workforce_pool_id}/providers/{provider_id}`", - "location": "path", - "pattern": "^locations/[^/]+/workforcePools/[^/]+/providers/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+name}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "get": { - "description": "Gets an individual WorkforcePoolProvider.", - "flatPath": "v1/locations/{locationsId}/workforcePools/{workforcePoolsId}/providers/{providersId}", - "httpMethod": "GET", - "id": "iam.locations.workforcePools.providers.get", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Required. The name of the provider to retrieve. Format: `locations/{location}/workforcePools/{workforce_pool_id}/providers/{provider_id}`", - "location": "path", - "pattern": "^locations/[^/]+/workforcePools/[^/]+/providers/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+name}", - "response": { - "$ref": "WorkforcePoolProvider" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "list": { - "description": "Lists all non-deleted WorkforcePoolProviders in a WorkforcePool. If `show_deleted` is set to `true`, then deleted providers are also listed.", - "flatPath": "v1/locations/{locationsId}/workforcePools/{workforcePoolsId}/providers", - "httpMethod": "GET", - "id": "iam.locations.workforcePools.providers.list", - "parameterOrder": [ - "parent" - ], - "parameters": { - "pageSize": { - "description": "The maximum number of providers to return. If unspecified, at most 50 providers are returned. The maximum value is 100; values above 100 are truncated to 100.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "pageToken": { - "description": "A page token, received from a previous `ListWorkforcePoolProviders` call. Provide this to retrieve the subsequent page.", - "location": "query", - "type": "string" - }, - "parent": { - "description": "Required. The pool to list providers for. Format: `locations/{location}/workforcePools/{workforce_pool_id}`", - "location": "path", - "pattern": "^locations/[^/]+/workforcePools/[^/]+$", - "required": true, - "type": "string" - }, - "showDeleted": { - "description": "Whether to return soft-deleted providers.", - "location": "query", - "type": "boolean" - } - }, - "path": "v1/{+parent}/providers", - "response": { - "$ref": "ListWorkforcePoolProvidersResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "patch": { - "description": "Updates an existing WorkforcePoolProvider.", - "flatPath": "v1/locations/{locationsId}/workforcePools/{workforcePoolsId}/providers/{providersId}", - "httpMethod": "PATCH", - "id": "iam.locations.workforcePools.providers.patch", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Identifier. The resource name of the provider. Format: `locations/{location}/workforcePools/{workforce_pool_id}/providers/{provider_id}`", - "location": "path", - "pattern": "^locations/[^/]+/workforcePools/[^/]+/providers/[^/]+$", - "required": true, - "type": "string" - }, - "updateMask": { - "description": "Required. The list of fields to update.", - "format": "google-fieldmask", - "location": "query", - "type": "string" - } - }, - "path": "v1/{+name}", - "request": { - "$ref": "WorkforcePoolProvider" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "undelete": { - "description": "Undeletes a WorkforcePoolProvider, as long as it was deleted fewer than 30 days ago.", - "flatPath": "v1/locations/{locationsId}/workforcePools/{workforcePoolsId}/providers/{providersId}:undelete", - "httpMethod": "POST", - "id": "iam.locations.workforcePools.providers.undelete", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Required. The name of the provider to undelete. Format: `locations/{location}/workforcePools/{workforce_pool_id}/providers/{provider_id}`", - "location": "path", - "pattern": "^locations/[^/]+/workforcePools/[^/]+/providers/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+name}:undelete", - "request": { - "$ref": "UndeleteWorkforcePoolProviderRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - } - }, - "resources": { - "keys": { - "methods": { - "create": { - "description": "Creates a new WorkforcePoolProviderKey in a WorkforcePoolProvider.", - "flatPath": "v1/locations/{locationsId}/workforcePools/{workforcePoolsId}/providers/{providersId}/keys", - "httpMethod": "POST", - "id": "iam.locations.workforcePools.providers.keys.create", - "parameterOrder": [ - "parent" - ], - "parameters": { - "parent": { - "description": "Required. The provider to create this key in.", - "location": "path", - "pattern": "^locations/[^/]+/workforcePools/[^/]+/providers/[^/]+$", - "required": true, - "type": "string" - }, - "workforcePoolProviderKeyId": { - "description": "Required. The ID to use for the key, which becomes the final component of the resource name. This value must be 4-32 characters, and may contain the characters `[a-z0-9-]`.", - "location": "query", - "type": "string" - } - }, - "path": "v1/{+parent}/keys", - "request": { - "$ref": "WorkforcePoolProviderKey" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "delete": { - "description": "Deletes a WorkforcePoolProviderKey. You can undelete a key for 30 days. After 30 days, deletion is permanent.", - "flatPath": "v1/locations/{locationsId}/workforcePools/{workforcePoolsId}/providers/{providersId}/keys/{keysId}", - "httpMethod": "DELETE", - "id": "iam.locations.workforcePools.providers.keys.delete", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Required. The name of the key to delete.", - "location": "path", - "pattern": "^locations/[^/]+/workforcePools/[^/]+/providers/[^/]+/keys/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+name}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "get": { - "description": "Gets a WorkforcePoolProviderKey.", - "flatPath": "v1/locations/{locationsId}/workforcePools/{workforcePoolsId}/providers/{providersId}/keys/{keysId}", - "httpMethod": "GET", - "id": "iam.locations.workforcePools.providers.keys.get", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Required. The name of the key to retrieve.", - "location": "path", - "pattern": "^locations/[^/]+/workforcePools/[^/]+/providers/[^/]+/keys/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+name}", - "response": { - "$ref": "WorkforcePoolProviderKey" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "list": { - "description": "Lists all non-deleted WorkforcePoolProviderKeys in a WorkforcePoolProvider. If `show_deleted` is set to `true`, then deleted keys are also listed.", - "flatPath": "v1/locations/{locationsId}/workforcePools/{workforcePoolsId}/providers/{providersId}/keys", - "httpMethod": "GET", - "id": "iam.locations.workforcePools.providers.keys.list", - "parameterOrder": [ - "parent" - ], - "parameters": { - "pageSize": { - "description": "The maximum number of keys to return. If unspecified, all keys are returned. The maximum value is 10; values above 10 are truncated to 10.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "pageToken": { - "description": "A page token, received from a previous `ListWorkforcePoolProviderKeys` call. Provide this to retrieve the subsequent page.", - "location": "query", - "type": "string" - }, - "parent": { - "description": "Required. The provider resource to list encryption keys for. Format: `locations/{location}/workforcePools/{workforce_pool_id}/providers/{provider_id}`", - "location": "path", - "pattern": "^locations/[^/]+/workforcePools/[^/]+/providers/[^/]+$", - "required": true, - "type": "string" - }, - "showDeleted": { - "description": "Whether to return soft-deleted keys.", - "location": "query", - "type": "boolean" - } - }, - "path": "v1/{+parent}/keys", - "response": { - "$ref": "ListWorkforcePoolProviderKeysResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "undelete": { - "description": "Undeletes a WorkforcePoolProviderKey, as long as it was deleted fewer than 30 days ago.", - "flatPath": "v1/locations/{locationsId}/workforcePools/{workforcePoolsId}/providers/{providersId}/keys/{keysId}:undelete", - "httpMethod": "POST", - "id": "iam.locations.workforcePools.providers.keys.undelete", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Required. The name of the key to undelete.", - "location": "path", - "pattern": "^locations/[^/]+/workforcePools/[^/]+/providers/[^/]+/keys/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+name}:undelete", - "request": { - "$ref": "UndeleteWorkforcePoolProviderKeyRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - } - }, - "resources": { - "operations": { - "methods": { - "get": { - "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", - "flatPath": "v1/locations/{locationsId}/workforcePools/{workforcePoolsId}/providers/{providersId}/keys/{keysId}/operations/{operationsId}", - "httpMethod": "GET", - "id": "iam.locations.workforcePools.providers.keys.operations.get", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "The name of the operation resource.", - "location": "path", - "pattern": "^locations/[^/]+/workforcePools/[^/]+/providers/[^/]+/keys/[^/]+/operations/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+name}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - } - } - } - } - }, - "operations": { - "methods": { - "get": { - "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", - "flatPath": "v1/locations/{locationsId}/workforcePools/{workforcePoolsId}/providers/{providersId}/operations/{operationsId}", - "httpMethod": "GET", - "id": "iam.locations.workforcePools.providers.operations.get", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "The name of the operation resource.", - "location": "path", - "pattern": "^locations/[^/]+/workforcePools/[^/]+/providers/[^/]+/operations/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+name}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - } - } - }, - "scimTenants": { - "methods": { - "create": { - "description": "Gemini Enterprise only. Creates a new WorkforcePoolProviderScimTenant in a WorkforcePoolProvider. You cannot reuse the name of a deleted SCIM tenant until 30 days after deletion.", - "flatPath": "v1/locations/{locationsId}/workforcePools/{workforcePoolsId}/providers/{providersId}/scimTenants", - "httpMethod": "POST", - "id": "iam.locations.workforcePools.providers.scimTenants.create", - "parameterOrder": [ - "parent" - ], - "parameters": { - "parent": { - "description": "Required. Gemini Enterprise only. The parent to create SCIM tenant. Format: 'locations/{location}/workforcePools/{workforce_pool}/providers/{provider}'", - "location": "path", - "pattern": "^locations/[^/]+/workforcePools/[^/]+/providers/[^/]+$", - "required": true, - "type": "string" - }, - "workforcePoolProviderScimTenantId": { - "description": "Required. Gemini Enterprise only. The ID to use for the SCIM tenant, which becomes the final component of the resource name. This value should be 4-32 characters, containing the characters `[a-z0-9-]`.", - "location": "query", - "type": "string" - } - }, - "path": "v1/{+parent}/scimTenants", - "request": { - "$ref": "WorkforcePoolProviderScimTenant" - }, - "response": { - "$ref": "WorkforcePoolProviderScimTenant" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "delete": { - "description": "Gemini Enterprise only. Deletes a WorkforcePoolProviderScimTenant. You can undelete a SCIM tenant for 30 days. After 30 days, deletion is permanent. You cannot update deleted SCIM tenants. However, you can view and list them.", - "flatPath": "v1/locations/{locationsId}/workforcePools/{workforcePoolsId}/providers/{providersId}/scimTenants/{scimTenantsId}", - "httpMethod": "DELETE", - "id": "iam.locations.workforcePools.providers.scimTenants.delete", - "parameterOrder": [ - "name" - ], - "parameters": { - "hardDelete": { - "description": "Optional. Deletes the SCIM tenant immediately. This operation cannot be undone.", - "location": "query", - "type": "boolean" - }, - "name": { - "description": "Required. Gemini Enterprise only. The name of the SCIM tenant to delete. Format: `locations/{location}/workforcePools/{workforce_pool}/providers/{provider}/scimTenants/{scim_tenant}`", - "location": "path", - "pattern": "^locations/[^/]+/workforcePools/[^/]+/providers/[^/]+/scimTenants/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+name}", - "response": { - "$ref": "WorkforcePoolProviderScimTenant" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "get": { - "description": "Gemini Enterprise only. Gets an individual WorkforcePoolProviderScimTenant.", - "flatPath": "v1/locations/{locationsId}/workforcePools/{workforcePoolsId}/providers/{providersId}/scimTenants/{scimTenantsId}", - "httpMethod": "GET", - "id": "iam.locations.workforcePools.providers.scimTenants.get", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Required. Gemini Enterprise only. The name of the SCIM tenant to retrieve. Format: `locations/{location}/workforcePools/{workforce_pool}/providers/{provider}/scimTenants/{scim_tenant}`", - "location": "path", - "pattern": "^locations/[^/]+/workforcePools/[^/]+/providers/[^/]+/scimTenants/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+name}", - "response": { - "$ref": "WorkforcePoolProviderScimTenant" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "list": { - "description": "Gemini Enterprise only. Lists all non-deleted WorkforcePoolProviderScimTenants in a WorkforcePoolProvider. If `show_deleted` is set to `true`, then deleted SCIM tenants are also listed.", - "flatPath": "v1/locations/{locationsId}/workforcePools/{workforcePoolsId}/providers/{providersId}/scimTenants", - "httpMethod": "GET", - "id": "iam.locations.workforcePools.providers.scimTenants.list", - "parameterOrder": [ - "parent" - ], - "parameters": { - "pageSize": { - "description": "Optional. Gemini Enterprise only. The maximum number of SCIM tenants to return. If unspecified, at most 50 SCIM tenants will be returned. The maximum value is 100; values above 100 are truncated to 100.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "pageToken": { - "description": "Optional. Gemini Enterprise only. A page token, received from a previous `ListScimTenants` call. Provide this to retrieve the subsequent page.", - "location": "query", - "type": "string" - }, - "parent": { - "description": "Required. Gemini Enterprise only. The parent to list SCIM tenants. Format: 'locations/{location}/workforcePools/{workforce_pool}/providers/{provider}'", - "location": "path", - "pattern": "^locations/[^/]+/workforcePools/[^/]+/providers/[^/]+$", - "required": true, - "type": "string" - }, - "showDeleted": { - "description": "Optional. Gemini Enterprise only. Whether to return soft-deleted SCIM tenants.", - "location": "query", - "type": "boolean" - } - }, - "path": "v1/{+parent}/scimTenants", - "response": { - "$ref": "ListWorkforcePoolProviderScimTenantsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "patch": { - "description": "Gemini Enterprise only. Updates an existing WorkforcePoolProviderScimTenant.", - "flatPath": "v1/locations/{locationsId}/workforcePools/{workforcePoolsId}/providers/{providersId}/scimTenants/{scimTenantsId}", - "httpMethod": "PATCH", - "id": "iam.locations.workforcePools.providers.scimTenants.patch", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Identifier. Gemini Enterprise only. The resource name of the SCIM Tenant. Format: `locations/{location}/workforcePools/{workforce_pool}/providers/ {workforce_pool_provider}/scimTenants/{scim_tenant}`", - "location": "path", - "pattern": "^locations/[^/]+/workforcePools/[^/]+/providers/[^/]+/scimTenants/[^/]+$", - "required": true, - "type": "string" - }, - "updateMask": { - "description": "Optional. Gemini Enterprise only. The list of fields to update.", - "format": "google-fieldmask", - "location": "query", - "type": "string" - } - }, - "path": "v1/{+name}", - "request": { - "$ref": "WorkforcePoolProviderScimTenant" - }, - "response": { - "$ref": "WorkforcePoolProviderScimTenant" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "undelete": { - "description": "Gemini Enterprise only. Undeletes a WorkforcePoolProviderScimTenant, that was deleted fewer than 30 days ago.", - "flatPath": "v1/locations/{locationsId}/workforcePools/{workforcePoolsId}/providers/{providersId}/scimTenants/{scimTenantsId}:undelete", - "httpMethod": "POST", - "id": "iam.locations.workforcePools.providers.scimTenants.undelete", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Required. Gemini Enterprise only. The name of the SCIM tenant to undelete. Format: `locations/{location}/workforcePools/{workforce_pool}/providers/{provider}/scimTenants/{scim_tenant}`", - "location": "path", - "pattern": "^locations/[^/]+/workforcePools/[^/]+/providers/[^/]+/scimTenants/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+name}:undelete", - "request": { - "$ref": "UndeleteWorkforcePoolProviderScimTenantRequest" - }, - "response": { - "$ref": "WorkforcePoolProviderScimTenant" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - } - }, - "resources": { - "tokens": { - "methods": { - "create": { - "description": "Gemini Enterprise only. Creates a new WorkforcePoolProviderScimToken in a WorkforcePoolProviderScimTenant. You cannot reuse the name of a deleted SCIM token until 30 days after deletion.", - "flatPath": "v1/locations/{locationsId}/workforcePools/{workforcePoolsId}/providers/{providersId}/scimTenants/{scimTenantsId}/tokens", - "httpMethod": "POST", - "id": "iam.locations.workforcePools.providers.scimTenants.tokens.create", - "parameterOrder": [ - "parent" - ], - "parameters": { - "parent": { - "description": "Required. Gemini Enterprise only. The parent tenant to create SCIM token. Format: 'locations/{location}/workforcePools/{workforce_pool}/providers/{provider}/scimTenants/{scim_tenant}'", - "location": "path", - "pattern": "^locations/[^/]+/workforcePools/[^/]+/providers/[^/]+/scimTenants/[^/]+$", - "required": true, - "type": "string" - }, - "workforcePoolProviderScimTokenId": { - "description": "Required. Gemini Enterprise only. The ID to use for the SCIM token, which becomes the final component of the resource name. This value should be 4-32 characters and follow the pattern: `([a-z]([a-z0-9\\\\-]{2,30}[a-z0-9]))`", - "location": "query", - "type": "string" - } - }, - "path": "v1/{+parent}/tokens", - "request": { - "$ref": "WorkforcePoolProviderScimToken" - }, - "response": { - "$ref": "WorkforcePoolProviderScimToken" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "delete": { - "description": "Gemini Enterprise only. Deletes a WorkforcePoolProviderScimToken. You can undelete a SCIM token for 30 days. After 30 days, the SCIM token is permanently deleted. You cannot update deleted SCIM tokens, however, you can view and list them.", - "flatPath": "v1/locations/{locationsId}/workforcePools/{workforcePoolsId}/providers/{providersId}/scimTenants/{scimTenantsId}/tokens/{tokensId}", - "httpMethod": "DELETE", - "id": "iam.locations.workforcePools.providers.scimTenants.tokens.delete", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Required. Gemini Enterprise only. The name of the SCIM token to delete. Format: `locations/{location}/workforcePools/{workforce_pool}/providers/{provider}/scimTenants/{scim_tenant}/tokens/{token}`", - "location": "path", - "pattern": "^locations/[^/]+/workforcePools/[^/]+/providers/[^/]+/scimTenants/[^/]+/tokens/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+name}", - "response": { - "$ref": "WorkforcePoolProviderScimToken" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "get": { - "description": "Gemini Enterprise only. Gets an individual WorkforcePoolProviderScimToken.", - "flatPath": "v1/locations/{locationsId}/workforcePools/{workforcePoolsId}/providers/{providersId}/scimTenants/{scimTenantsId}/tokens/{tokensId}", - "httpMethod": "GET", - "id": "iam.locations.workforcePools.providers.scimTenants.tokens.get", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Required. Gemini Enterprise only. The name of the SCIM token to retrieve. Format: `locations/{location}/workforcePools/{workforce_pool}/providers/{provider}/scimTenants/{scim_tenant}/tokens/{token}`", - "location": "path", - "pattern": "^locations/[^/]+/workforcePools/[^/]+/providers/[^/]+/scimTenants/[^/]+/tokens/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+name}", - "response": { - "$ref": "WorkforcePoolProviderScimToken" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "list": { - "description": "Gemini Enterprise only. Lists all non-deleted WorkforcePoolProviderScimTokenss in a WorkforcePoolProviderScimTenant. If `show_deleted` is set to `true`, then deleted SCIM tokens are also listed.", - "flatPath": "v1/locations/{locationsId}/workforcePools/{workforcePoolsId}/providers/{providersId}/scimTenants/{scimTenantsId}/tokens", - "httpMethod": "GET", - "id": "iam.locations.workforcePools.providers.scimTenants.tokens.list", - "parameterOrder": [ - "parent" - ], - "parameters": { - "pageSize": { - "description": "Optional. Gemini Enterprise only. The maximum number of SCIM tokens to return. If unspecified, at most 2 SCIM tokens will be returned.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "pageToken": { - "description": "Optional. Gemini Enterprise only. A page token, received from a previous `ListWorkforcePoolProviderScimTokens` call. Provide this to retrieve the subsequent page.", - "location": "query", - "type": "string" - }, - "parent": { - "description": "Required. Gemini Enterprise only. The parent to list SCIM tokens. Format: 'locations/{location}/workforcePools/{workforce_pool}/providers/{provider}/scimTenants/{scim_tenant}'", - "location": "path", - "pattern": "^locations/[^/]+/workforcePools/[^/]+/providers/[^/]+/scimTenants/[^/]+$", - "required": true, - "type": "string" - }, - "showDeleted": { - "description": "Optional. Gemini Enterprise only. Whether to return soft-deleted SCIM tokens.", - "location": "query", - "type": "boolean" - } - }, - "path": "v1/{+parent}/tokens", - "response": { - "$ref": "ListWorkforcePoolProviderScimTokensResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "patch": { - "description": "Gemini Enterprise only. Updates an existing WorkforcePoolProviderScimToken.", - "flatPath": "v1/locations/{locationsId}/workforcePools/{workforcePoolsId}/providers/{providersId}/scimTenants/{scimTenantsId}/tokens/{tokensId}", - "httpMethod": "PATCH", - "id": "iam.locations.workforcePools.providers.scimTenants.tokens.patch", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Identifier. Gemini Enterprise only. The resource name of the SCIM Token. Format: `locations/{location}/workforcePools/{workforce_pool}/providers/ {workforce_pool_provider}/scimTenants/{scim_tenant}/tokens/{token}`", - "location": "path", - "pattern": "^locations/[^/]+/workforcePools/[^/]+/providers/[^/]+/scimTenants/[^/]+/tokens/[^/]+$", - "required": true, - "type": "string" - }, - "updateMask": { - "description": "Optional. Gemini Enterprise only. The list of fields to update.", - "format": "google-fieldmask", - "location": "query", - "type": "string" - } - }, - "path": "v1/{+name}", - "request": { - "$ref": "WorkforcePoolProviderScimToken" - }, - "response": { - "$ref": "WorkforcePoolProviderScimToken" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - } - } - } - } - } - } - }, - "subjects": { - "methods": { - "delete": { - "description": "Deletes a WorkforcePoolSubject. Subject must not already be in a deleted state. A WorkforcePoolSubject is automatically created the first time an external credential is exchanged for a Google Cloud credential using a mapped `google.subject` attribute. There is no endpoint to manually create a WorkforcePoolSubject. For 30 days after a WorkforcePoolSubject is deleted, using the same `google.subject` attribute in token exchanges with Google Cloud STS fails. Call UndeleteWorkforcePoolSubject to undelete a WorkforcePoolSubject that has been deleted, within within 30 days of deleting it. After 30 days, the WorkforcePoolSubject is permanently deleted. At this point, a token exchange with Google Cloud STS that uses the same mapped `google.subject` attribute automatically creates a new WorkforcePoolSubject that is unrelated to the previously deleted WorkforcePoolSubject but has the same `google.subject` value.", - "flatPath": "v1/locations/{locationsId}/workforcePools/{workforcePoolsId}/subjects/{subjectsId}", - "httpMethod": "DELETE", - "id": "iam.locations.workforcePools.subjects.delete", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Required. The resource name of the WorkforcePoolSubject. Special characters, like `/` and `:`, must be escaped, because all URLs need to conform to the \"When to Escape and Unescape\" section of [RFC3986](https://www.ietf.org/rfc/rfc2396.txt). Format: `locations/{location}/workforcePools/{workforce_pool_id}/subjects/{subject_id}`", - "location": "path", - "pattern": "^locations/[^/]+/workforcePools/[^/]+/subjects/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+name}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "undelete": { - "description": "Undeletes a WorkforcePoolSubject, as long as it was deleted fewer than 30 days ago.", - "flatPath": "v1/locations/{locationsId}/workforcePools/{workforcePoolsId}/subjects/{subjectsId}:undelete", - "httpMethod": "POST", - "id": "iam.locations.workforcePools.subjects.undelete", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Required. The resource name of the WorkforcePoolSubject. Special characters, like `/` and `:`, must be escaped, because all URLs need to conform to the \"When to Escape and Unescape\" section of [RFC3986](https://www.ietf.org/rfc/rfc2396.txt). Format: `locations/{location}/workforcePools/{workforce_pool_id}/subjects/{subject_id}`", - "location": "path", - "pattern": "^locations/[^/]+/workforcePools/[^/]+/subjects/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+name}:undelete", - "request": { - "$ref": "UndeleteWorkforcePoolSubjectRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - } - }, - "resources": { - "operations": { - "methods": { - "get": { - "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", - "flatPath": "v1/locations/{locationsId}/workforcePools/{workforcePoolsId}/subjects/{subjectsId}/operations/{operationsId}", - "httpMethod": "GET", - "id": "iam.locations.workforcePools.subjects.operations.get", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "The name of the operation resource.", - "location": "path", - "pattern": "^locations/[^/]+/workforcePools/[^/]+/subjects/[^/]+/operations/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+name}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - } - } - } - } - } - } - } - } - }, - "organizations": { - "resources": { - "roles": { - "methods": { - "create": { - "description": "Creates a new custom Role.", - "flatPath": "v1/organizations/{organizationsId}/roles", - "httpMethod": "POST", - "id": "iam.organizations.roles.create", - "parameterOrder": [ - "parent" - ], - "parameters": { - "parent": { - "description": "The `parent` parameter's value depends on the target resource for the request, namely [projects](https://cloud.google.com/iam/docs/reference/rest/v1/projects.roles) or [organizations](https://cloud.google.com/iam/docs/reference/rest/v1/organizations.roles). Each resource type's `parent` value format is described below: * [projects.roles.create](https://cloud.google.com/iam/docs/reference/rest/v1/projects.roles/create): `projects/{PROJECT_ID}`. This method creates project-level [custom roles](https://cloud.google.com/iam/docs/understanding-custom-roles). Example request URL: `https://iam.googleapis.com/v1/projects/{PROJECT_ID}/roles` * [organizations.roles.create](https://cloud.google.com/iam/docs/reference/rest/v1/organizations.roles/create): `organizations/{ORGANIZATION_ID}`. This method creates organization-level [custom roles](https://cloud.google.com/iam/docs/understanding-custom-roles). Example request URL: `https://iam.googleapis.com/v1/organizations/{ORGANIZATION_ID}/roles` Note: Wildcard (*) values are invalid; you must specify a complete project ID or organization ID.", - "location": "path", - "pattern": "^organizations/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+parent}/roles", - "request": { - "$ref": "CreateRoleRequest" - }, - "response": { - "$ref": "Role" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "delete": { - "description": "Deletes a custom Role. When you delete a custom role, the following changes occur immediately: * You cannot bind a principal to the custom role in an IAM Policy. * Existing bindings to the custom role are not changed, but they have no effect. * By default, the response from ListRoles does not include the custom role. A deleted custom role still counts toward the [custom role limit](https://cloud.google.com/iam/help/limits) until it is permanently deleted. You have 7 days to undelete the custom role. After 7 days, the following changes occur: * The custom role is permanently deleted and cannot be recovered. * If an IAM policy contains a binding to the custom role, the binding is permanently removed. * The custom role no longer counts toward your custom role limit.", - "flatPath": "v1/organizations/{organizationsId}/roles/{rolesId}", - "httpMethod": "DELETE", - "id": "iam.organizations.roles.delete", - "parameterOrder": [ - "name" - ], - "parameters": { - "etag": { - "description": "Used to perform a consistent read-modify-write.", - "format": "byte", - "location": "query", - "type": "string" - }, - "name": { - "description": "The `name` parameter's value depends on the target resource for the request, namely [projects](https://cloud.google.com/iam/docs/reference/rest/v1/projects.roles) or [organizations](https://cloud.google.com/iam/docs/reference/rest/v1/organizations.roles). Each resource type's `name` value format is described below: * [projects.roles.delete](https://cloud.google.com/iam/docs/reference/rest/v1/projects.roles/delete): `projects/{PROJECT_ID}/roles/{CUSTOM_ROLE_ID}`. This method deletes only [custom roles](https://cloud.google.com/iam/docs/understanding-custom-roles) that have been created at the project level. Example request URL: `https://iam.googleapis.com/v1/projects/{PROJECT_ID}/roles/{CUSTOM_ROLE_ID}` * [organizations.roles.delete](https://cloud.google.com/iam/docs/reference/rest/v1/organizations.roles/delete): `organizations/{ORGANIZATION_ID}/roles/{CUSTOM_ROLE_ID}`. This method deletes only [custom roles](https://cloud.google.com/iam/docs/understanding-custom-roles) that have been created at the organization level. Example request URL: `https://iam.googleapis.com/v1/organizations/{ORGANIZATION_ID}/roles/{CUSTOM_ROLE_ID}` Note: Wildcard (*) values are invalid; you must specify a complete project ID or organization ID.", - "location": "path", - "pattern": "^organizations/[^/]+/roles/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+name}", - "response": { - "$ref": "Role" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "get": { - "description": "Gets the definition of a Role.", - "flatPath": "v1/organizations/{organizationsId}/roles/{rolesId}", - "httpMethod": "GET", - "id": "iam.organizations.roles.get", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "The `name` parameter's value depends on the target resource for the request, namely [roles](https://cloud.google.com/iam/docs/reference/rest/v1/roles), [projects](https://cloud.google.com/iam/docs/reference/rest/v1/projects.roles), or [organizations](https://cloud.google.com/iam/docs/reference/rest/v1/organizations.roles). Each resource type's `name` value format is described below: * [roles.get](https://cloud.google.com/iam/docs/reference/rest/v1/roles/get): `roles/{ROLE_NAME}`. This method returns results from all [predefined roles](https://cloud.google.com/iam/docs/understanding-roles#predefined_roles) in IAM. Example request URL: `https://iam.googleapis.com/v1/roles/{ROLE_NAME}` * [projects.roles.get](https://cloud.google.com/iam/docs/reference/rest/v1/projects.roles/get): `projects/{PROJECT_ID}/roles/{CUSTOM_ROLE_ID}`. This method returns only [custom roles](https://cloud.google.com/iam/docs/understanding-custom-roles) that have been created at the project level. Example request URL: `https://iam.googleapis.com/v1/projects/{PROJECT_ID}/roles/{CUSTOM_ROLE_ID}` * [organizations.roles.get](https://cloud.google.com/iam/docs/reference/rest/v1/organizations.roles/get): `organizations/{ORGANIZATION_ID}/roles/{CUSTOM_ROLE_ID}`. This method returns only [custom roles](https://cloud.google.com/iam/docs/understanding-custom-roles) that have been created at the organization level. Example request URL: `https://iam.googleapis.com/v1/organizations/{ORGANIZATION_ID}/roles/{CUSTOM_ROLE_ID}` Note: Wildcard (*) values are invalid; you must specify a complete project ID or organization ID.", - "location": "path", - "pattern": "^organizations/[^/]+/roles/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+name}", - "response": { - "$ref": "Role" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "list": { - "description": "Lists every predefined Role that IAM supports, or every custom role that is defined for an organization or project.", - "flatPath": "v1/organizations/{organizationsId}/roles", - "httpMethod": "GET", - "id": "iam.organizations.roles.list", - "parameterOrder": [ - "parent" - ], - "parameters": { - "pageSize": { - "description": "Optional limit on the number of roles to include in the response. The default is 300, and the maximum is 1,000.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "pageToken": { - "description": "Optional pagination token returned in an earlier ListRolesResponse.", - "location": "query", - "type": "string" - }, - "parent": { - "description": "The `parent` parameter's value depends on the target resource for the request, namely [roles](https://cloud.google.com/iam/docs/reference/rest/v1/roles), [projects](https://cloud.google.com/iam/docs/reference/rest/v1/projects.roles), or [organizations](https://cloud.google.com/iam/docs/reference/rest/v1/organizations.roles). Each resource type's `parent` value format is described below: * [roles.list](https://cloud.google.com/iam/docs/reference/rest/v1/roles/list): An empty string. This method doesn't require a resource; it simply returns all [predefined roles](https://cloud.google.com/iam/docs/understanding-roles#predefined_roles) in IAM. Example request URL: `https://iam.googleapis.com/v1/roles` * [projects.roles.list](https://cloud.google.com/iam/docs/reference/rest/v1/projects.roles/list): `projects/{PROJECT_ID}`. This method lists all project-level [custom roles](https://cloud.google.com/iam/docs/understanding-custom-roles). Example request URL: `https://iam.googleapis.com/v1/projects/{PROJECT_ID}/roles` * [organizations.roles.list](https://cloud.google.com/iam/docs/reference/rest/v1/organizations.roles/list): `organizations/{ORGANIZATION_ID}`. This method lists all organization-level [custom roles](https://cloud.google.com/iam/docs/understanding-custom-roles). Example request URL: `https://iam.googleapis.com/v1/organizations/{ORGANIZATION_ID}/roles` Note: Wildcard (*) values are invalid; you must specify a complete project ID or organization ID.", - "location": "path", - "pattern": "^organizations/[^/]+$", - "required": true, - "type": "string" - }, - "showDeleted": { - "description": "Include Roles that have been deleted.", - "location": "query", - "type": "boolean" - }, - "view": { - "description": "Optional view for the returned Role objects. When `FULL` is specified, the `includedPermissions` field is returned, which includes a list of all permissions in the role. The default value is `BASIC`, which does not return the `includedPermissions` field.", - "enum": [ - "BASIC", - "FULL" - ], - "enumDescriptions": [ - "Omits the `included_permissions` field. This is the default value.", - "Returns all fields." - ], - "location": "query", - "type": "string" - } - }, - "path": "v1/{+parent}/roles", - "response": { - "$ref": "ListRolesResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "patch": { - "description": "Updates the definition of a custom Role.", - "flatPath": "v1/organizations/{organizationsId}/roles/{rolesId}", - "httpMethod": "PATCH", - "id": "iam.organizations.roles.patch", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "The `name` parameter's value depends on the target resource for the request, namely [projects](https://cloud.google.com/iam/docs/reference/rest/v1/projects.roles) or [organizations](https://cloud.google.com/iam/docs/reference/rest/v1/organizations.roles). Each resource type's `name` value format is described below: * [projects.roles.patch](https://cloud.google.com/iam/docs/reference/rest/v1/projects.roles/patch): `projects/{PROJECT_ID}/roles/{CUSTOM_ROLE_ID}`. This method updates only [custom roles](https://cloud.google.com/iam/docs/understanding-custom-roles) that have been created at the project level. Example request URL: `https://iam.googleapis.com/v1/projects/{PROJECT_ID}/roles/{CUSTOM_ROLE_ID}` * [organizations.roles.patch](https://cloud.google.com/iam/docs/reference/rest/v1/organizations.roles/patch): `organizations/{ORGANIZATION_ID}/roles/{CUSTOM_ROLE_ID}`. This method updates only [custom roles](https://cloud.google.com/iam/docs/understanding-custom-roles) that have been created at the organization level. Example request URL: `https://iam.googleapis.com/v1/organizations/{ORGANIZATION_ID}/roles/{CUSTOM_ROLE_ID}` Note: Wildcard (*) values are invalid; you must specify a complete project ID or organization ID.", - "location": "path", - "pattern": "^organizations/[^/]+/roles/[^/]+$", - "required": true, - "type": "string" - }, - "updateMask": { - "description": "A mask describing which fields in the Role have changed.", - "format": "google-fieldmask", - "location": "query", - "type": "string" - } - }, - "path": "v1/{+name}", - "request": { - "$ref": "Role" - }, - "response": { - "$ref": "Role" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "undelete": { - "description": "Undeletes a custom Role.", - "flatPath": "v1/organizations/{organizationsId}/roles/{rolesId}:undelete", - "httpMethod": "POST", - "id": "iam.organizations.roles.undelete", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "The `name` parameter's value depends on the target resource for the request, namely [projects](https://cloud.google.com/iam/docs/reference/rest/v1/projects.roles) or [organizations](https://cloud.google.com/iam/docs/reference/rest/v1/organizations.roles). Each resource type's `name` value format is described below: * [projects.roles.undelete](https://cloud.google.com/iam/docs/reference/rest/v1/projects.roles/undelete): `projects/{PROJECT_ID}/roles/{CUSTOM_ROLE_ID}`. This method undeletes only [custom roles](https://cloud.google.com/iam/docs/understanding-custom-roles) that have been created at the project level. Example request URL: `https://iam.googleapis.com/v1/projects/{PROJECT_ID}/roles/{CUSTOM_ROLE_ID}` * [organizations.roles.undelete](https://cloud.google.com/iam/docs/reference/rest/v1/organizations.roles/undelete): `organizations/{ORGANIZATION_ID}/roles/{CUSTOM_ROLE_ID}`. This method undeletes only [custom roles](https://cloud.google.com/iam/docs/understanding-custom-roles) that have been created at the organization level. Example request URL: `https://iam.googleapis.com/v1/organizations/{ORGANIZATION_ID}/roles/{CUSTOM_ROLE_ID}` Note: Wildcard (*) values are invalid; you must specify a complete project ID or organization ID.", - "location": "path", - "pattern": "^organizations/[^/]+/roles/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+name}:undelete", - "request": { - "$ref": "UndeleteRoleRequest" - }, - "response": { - "$ref": "Role" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - } - } - } - } - }, - "permissions": { - "methods": { - "queryTestablePermissions": { - "description": "Lists every permission that you can test on a resource. A permission is testable if you can check whether a principal has that permission on the resource.", - "flatPath": "v1/permissions:queryTestablePermissions", - "httpMethod": "POST", - "id": "iam.permissions.queryTestablePermissions", - "parameterOrder": [], - "parameters": {}, - "path": "v1/permissions:queryTestablePermissions", - "request": { - "$ref": "QueryTestablePermissionsRequest" - }, - "response": { - "$ref": "QueryTestablePermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - } - } - }, - "projects": { - "resources": { - "locations": { - "resources": { - "oauthClients": { - "methods": { - "create": { - "description": "Creates a new OauthClient. You cannot reuse the name of a deleted OauthClient until 30 days after deletion.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/oauthClients", - "httpMethod": "POST", - "id": "iam.projects.locations.oauthClients.create", - "parameterOrder": [ - "parent" - ], - "parameters": { - "oauthClientId": { - "description": "Required. The ID to use for the OauthClient, which becomes the final component of the resource name. This value should be a string of 6 to 63 lowercase letters, digits, or hyphens. It must start with a letter, and cannot have a trailing hyphen. The prefix `gcp-` is reserved for use by Google, and may not be specified.", - "location": "query", - "type": "string" - }, - "parent": { - "description": "Required. The parent resource to create the OauthClient in. The only supported location is `global`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+parent}/oauthClients", - "request": { - "$ref": "OauthClient" - }, - "response": { - "$ref": "OauthClient" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "delete": { - "description": "Deletes an OauthClient. You cannot use a deleted OauthClient. However, deletion does not revoke access tokens that have already been issued. They continue to grant access. Deletion does revoke refresh tokens that have already been issued. They cannot be used to renew an access token. If the OauthClient is undeleted, and the refresh tokens are not expired, they are valid for token exchange again. You can undelete an OauthClient for 30 days. After 30 days, deletion is permanent. You cannot update deleted OauthClients. However, you can view and list them.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/oauthClients/{oauthClientsId}", - "httpMethod": "DELETE", - "id": "iam.projects.locations.oauthClients.delete", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Required. The name of the OauthClient to delete. Format: `projects/{project}/locations/{location}/oauthClients/{oauth_client}`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/oauthClients/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+name}", - "response": { - "$ref": "OauthClient" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "get": { - "description": "Gets an individual OauthClient.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/oauthClients/{oauthClientsId}", - "httpMethod": "GET", - "id": "iam.projects.locations.oauthClients.get", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Required. The name of the OauthClient to retrieve. Format: `projects/{project}/locations/{location}/oauthClients/{oauth_client}`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/oauthClients/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+name}", - "response": { - "$ref": "OauthClient" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "list": { - "description": "Lists all non-deleted OauthClients in a project. If `show_deleted` is set to `true`, then deleted OauthClients are also listed.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/oauthClients", - "httpMethod": "GET", - "id": "iam.projects.locations.oauthClients.list", - "parameterOrder": [ - "parent" - ], - "parameters": { - "pageSize": { - "description": "Optional. The maximum number of OauthClients to return. If unspecified, at most 50 OauthClients will be returned. The maximum value is 100; values above 100 are truncated to 100.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "pageToken": { - "description": "Optional. A page token, received from a previous `ListOauthClients` call. Provide this to retrieve the subsequent page.", - "location": "query", - "type": "string" - }, - "parent": { - "description": "Required. The parent to list OauthClients for.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+$", - "required": true, - "type": "string" - }, - "showDeleted": { - "description": "Optional. Whether to return soft-deleted OauthClients.", - "location": "query", - "type": "boolean" - } - }, - "path": "v1/{+parent}/oauthClients", - "response": { - "$ref": "ListOauthClientsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "patch": { - "description": "Updates an existing OauthClient.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/oauthClients/{oauthClientsId}", - "httpMethod": "PATCH", - "id": "iam.projects.locations.oauthClients.patch", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Immutable. Identifier. The resource name of the OauthClient. Format:`projects/{project}/locations/{location}/oauthClients/{oauth_client}`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/oauthClients/[^/]+$", - "required": true, - "type": "string" - }, - "updateMask": { - "description": "Required. The list of fields to update.", - "format": "google-fieldmask", - "location": "query", - "type": "string" - } - }, - "path": "v1/{+name}", - "request": { - "$ref": "OauthClient" - }, - "response": { - "$ref": "OauthClient" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "undelete": { - "description": "Undeletes an OauthClient, as long as it was deleted fewer than 30 days ago.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/oauthClients/{oauthClientsId}:undelete", - "httpMethod": "POST", - "id": "iam.projects.locations.oauthClients.undelete", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Required. The name of the OauthClient to undelete. Format: `projects/{project}/locations/{location}/oauthClients/{oauth_client}`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/oauthClients/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+name}:undelete", - "request": { - "$ref": "UndeleteOauthClientRequest" - }, - "response": { - "$ref": "OauthClient" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - } - }, - "resources": { - "credentials": { - "methods": { - "create": { - "description": "Creates a new OauthClientCredential.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/oauthClients/{oauthClientsId}/credentials", - "httpMethod": "POST", - "id": "iam.projects.locations.oauthClients.credentials.create", - "parameterOrder": [ - "parent" - ], - "parameters": { - "oauthClientCredentialId": { - "description": "Required. The ID to use for the OauthClientCredential, which becomes the final component of the resource name. This value should be 4-32 characters, and may contain the characters [a-z0-9-]. The prefix `gcp-` is reserved for use by Google, and may not be specified.", - "location": "query", - "type": "string" - }, - "parent": { - "description": "Required. The parent resource to create the OauthClientCredential in.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/oauthClients/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+parent}/credentials", - "request": { - "$ref": "OauthClientCredential" - }, - "response": { - "$ref": "OauthClientCredential" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "delete": { - "description": "Deletes an OauthClientCredential. Before deleting an OauthClientCredential, it should first be disabled.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/oauthClients/{oauthClientsId}/credentials/{credentialsId}", - "httpMethod": "DELETE", - "id": "iam.projects.locations.oauthClients.credentials.delete", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Required. The name of the OauthClientCredential to delete. Format: `projects/{project}/locations/{location}/oauthClients/{oauth_client}/credentials/{credential}`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/oauthClients/[^/]+/credentials/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+name}", - "response": { - "$ref": "Empty" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "get": { - "description": "Gets an individual OauthClientCredential.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/oauthClients/{oauthClientsId}/credentials/{credentialsId}", - "httpMethod": "GET", - "id": "iam.projects.locations.oauthClients.credentials.get", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Required. The name of the OauthClientCredential to retrieve. Format: `projects/{project}/locations/{location}/oauthClients/{oauth_client}/credentials/{credential}`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/oauthClients/[^/]+/credentials/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+name}", - "response": { - "$ref": "OauthClientCredential" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "list": { - "description": "Lists all OauthClientCredentials in an OauthClient.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/oauthClients/{oauthClientsId}/credentials", - "httpMethod": "GET", - "id": "iam.projects.locations.oauthClients.credentials.list", - "parameterOrder": [ - "parent" - ], - "parameters": { - "parent": { - "description": "Required. The parent to list OauthClientCredentials for.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/oauthClients/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+parent}/credentials", - "response": { - "$ref": "ListOauthClientCredentialsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "patch": { - "description": "Updates an existing OauthClientCredential.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/oauthClients/{oauthClientsId}/credentials/{credentialsId}", - "httpMethod": "PATCH", - "id": "iam.projects.locations.oauthClients.credentials.patch", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Immutable. Identifier. The resource name of the OauthClientCredential. Format: `projects/{project}/locations/{location}/oauthClients/{oauth_client}/credentials/{credential}`", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/oauthClients/[^/]+/credentials/[^/]+$", - "required": true, - "type": "string" - }, - "updateMask": { - "description": "Required. The list of fields to update.", - "format": "google-fieldmask", - "location": "query", - "type": "string" - } - }, - "path": "v1/{+name}", - "request": { - "$ref": "OauthClientCredential" - }, - "response": { - "$ref": "OauthClientCredential" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - } - } - } - } - }, - "workloadIdentityPools": { - "methods": { - "addAttestationRule": { - "description": "Add an AttestationRule on a WorkloadIdentityPoolManagedIdentity. The total attestation rules after addition must not exceed 50.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/workloadIdentityPools/{workloadIdentityPoolsId}:addAttestationRule", - "httpMethod": "POST", - "id": "iam.projects.locations.workloadIdentityPools.addAttestationRule", - "parameterOrder": [ - "resource" - ], - "parameters": { - "resource": { - "description": "Required. The resource name of the managed identity or namespace resource to add an attestation rule to.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/workloadIdentityPools/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+resource}:addAttestationRule", - "request": { - "$ref": "AddAttestationRuleRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "create": { - "description": "Creates a new WorkloadIdentityPool. You cannot reuse the name of a deleted pool until 30 days after deletion.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/workloadIdentityPools", - "httpMethod": "POST", - "id": "iam.projects.locations.workloadIdentityPools.create", - "parameterOrder": [ - "parent" - ], - "parameters": { - "parent": { - "description": "Required. The parent resource to create the pool in. The only supported location is `global`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+$", - "required": true, - "type": "string" - }, - "workloadIdentityPoolId": { - "description": "Required. The ID to use for the pool, which becomes the final component of the resource name. This value should be 4-32 characters, and may contain the characters [a-z0-9-]. The prefix `gcp-` is reserved for use by Google, and may not be specified.", - "location": "query", - "type": "string" - } - }, - "path": "v1/{+parent}/workloadIdentityPools", - "request": { - "$ref": "WorkloadIdentityPool" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "delete": { - "description": "Deletes a WorkloadIdentityPool. You cannot use a deleted pool to exchange external credentials for Google Cloud credentials. However, deletion does not revoke credentials that have already been issued. Credentials issued for a deleted pool do not grant access to resources. If the pool is undeleted, and the credentials are not expired, they grant access again. You can undelete a pool for 30 days. After 30 days, deletion is permanent. You cannot update deleted pools. However, you can view and list them.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/workloadIdentityPools/{workloadIdentityPoolsId}", - "httpMethod": "DELETE", - "id": "iam.projects.locations.workloadIdentityPools.delete", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Required. The name of the pool to delete.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/workloadIdentityPools/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+name}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "get": { - "description": "Gets an individual WorkloadIdentityPool.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/workloadIdentityPools/{workloadIdentityPoolsId}", - "httpMethod": "GET", - "id": "iam.projects.locations.workloadIdentityPools.get", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Required. The name of the pool to retrieve.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/workloadIdentityPools/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+name}", - "response": { - "$ref": "WorkloadIdentityPool" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "getIamPolicy": { - "description": "Gets the IAM policy of a WorkloadIdentityPool.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/workloadIdentityPools/{workloadIdentityPoolsId}:getIamPolicy", - "httpMethod": "POST", - "id": "iam.projects.locations.workloadIdentityPools.getIamPolicy", - "parameterOrder": [ - "resource" - ], - "parameters": { - "resource": { - "description": "REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/workloadIdentityPools/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+resource}:getIamPolicy", - "request": { - "$ref": "GetIamPolicyRequest" - }, - "response": { - "$ref": "Policy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "list": { - "description": "Lists all non-deleted WorkloadIdentityPools in a project. If `show_deleted` is set to `true`, then deleted pools are also listed.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/workloadIdentityPools", - "httpMethod": "GET", - "id": "iam.projects.locations.workloadIdentityPools.list", - "parameterOrder": [ - "parent" - ], - "parameters": { - "pageSize": { - "description": "The maximum number of pools to return. If unspecified, at most 50 pools are returned. The maximum value is 1000; values above are 1000 truncated to 1000.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "pageToken": { - "description": "A page token, received from a previous `ListWorkloadIdentityPools` call. Provide this to retrieve the subsequent page.", - "location": "query", - "type": "string" - }, - "parent": { - "description": "Required. The parent resource to list pools for.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+$", - "required": true, - "type": "string" - }, - "showDeleted": { - "description": "Whether to return soft-deleted pools.", - "location": "query", - "type": "boolean" - } - }, - "path": "v1/{+parent}/workloadIdentityPools", - "response": { - "$ref": "ListWorkloadIdentityPoolsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "listAttestationRules": { - "description": "List all AttestationRule on a WorkloadIdentityPoolManagedIdentity.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/workloadIdentityPools/{workloadIdentityPoolsId}:listAttestationRules", - "httpMethod": "GET", - "id": "iam.projects.locations.workloadIdentityPools.listAttestationRules", - "parameterOrder": [ - "resource" - ], - "parameters": { - "filter": { - "description": "Optional. A query filter. Supports the following function: * `container_ids()`: Returns only the AttestationRules under the specific container ids. The function expects a comma-delimited list with only project numbers and must use the format `projects/`. For example: `container_ids(projects/, projects/,...)`.", - "location": "query", - "type": "string" - }, - "pageSize": { - "description": "Optional. The maximum number of AttestationRules to return. If unspecified, at most 50 AttestationRules are returned. The maximum value is 100; values above 100 are truncated to 100.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "pageToken": { - "description": "Optional. A page token, received from a previous `ListWorkloadIdentityPoolProviderKeys` call. Provide this to retrieve the subsequent page.", - "location": "query", - "type": "string" - }, - "resource": { - "description": "Required. The resource name of the managed identity or namespace resource to list attestation rules of.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/workloadIdentityPools/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+resource}:listAttestationRules", - "response": { - "$ref": "ListAttestationRulesResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "patch": { - "description": "Updates an existing WorkloadIdentityPool.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/workloadIdentityPools/{workloadIdentityPoolsId}", - "httpMethod": "PATCH", - "id": "iam.projects.locations.workloadIdentityPools.patch", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Identifier. The resource name of the pool.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/workloadIdentityPools/[^/]+$", - "required": true, - "type": "string" - }, - "updateMask": { - "description": "Required. The list of fields to update.", - "format": "google-fieldmask", - "location": "query", - "type": "string" - } - }, - "path": "v1/{+name}", - "request": { - "$ref": "WorkloadIdentityPool" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "removeAttestationRule": { - "description": "Remove an AttestationRule on a WorkloadIdentityPoolManagedIdentity.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/workloadIdentityPools/{workloadIdentityPoolsId}:removeAttestationRule", - "httpMethod": "POST", - "id": "iam.projects.locations.workloadIdentityPools.removeAttestationRule", - "parameterOrder": [ - "resource" - ], - "parameters": { - "resource": { - "description": "Required. The resource name of the managed identity or namespace resource to remove an attestation rule from.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/workloadIdentityPools/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+resource}:removeAttestationRule", - "request": { - "$ref": "RemoveAttestationRuleRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "setAttestationRules": { - "description": "Set all AttestationRule on a WorkloadIdentityPoolManagedIdentity. A maximum of 50 AttestationRules can be set.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/workloadIdentityPools/{workloadIdentityPoolsId}:setAttestationRules", - "httpMethod": "POST", - "id": "iam.projects.locations.workloadIdentityPools.setAttestationRules", - "parameterOrder": [ - "resource" - ], - "parameters": { - "resource": { - "description": "Required. The resource name of the managed identity or namespace resource to add an attestation rule to.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/workloadIdentityPools/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+resource}:setAttestationRules", - "request": { - "$ref": "SetAttestationRulesRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "setIamPolicy": { - "description": "Sets the IAM policies on a WorkloadIdentityPool", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/workloadIdentityPools/{workloadIdentityPoolsId}:setIamPolicy", - "httpMethod": "POST", - "id": "iam.projects.locations.workloadIdentityPools.setIamPolicy", - "parameterOrder": [ - "resource" - ], - "parameters": { - "resource": { - "description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/workloadIdentityPools/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+resource}:setIamPolicy", - "request": { - "$ref": "SetIamPolicyRequest" - }, - "response": { - "$ref": "Policy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "testIamPermissions": { - "description": "Returns the caller's permissions on a WorkloadIdentityPool", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/workloadIdentityPools/{workloadIdentityPoolsId}:testIamPermissions", - "httpMethod": "POST", - "id": "iam.projects.locations.workloadIdentityPools.testIamPermissions", - "parameterOrder": [ - "resource" - ], - "parameters": { - "resource": { - "description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/workloadIdentityPools/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+resource}:testIamPermissions", - "request": { - "$ref": "TestIamPermissionsRequest" - }, - "response": { - "$ref": "TestIamPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "undelete": { - "description": "Undeletes a WorkloadIdentityPool, as long as it was deleted fewer than 30 days ago.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/workloadIdentityPools/{workloadIdentityPoolsId}:undelete", - "httpMethod": "POST", - "id": "iam.projects.locations.workloadIdentityPools.undelete", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Required. The name of the pool to undelete.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/workloadIdentityPools/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+name}:undelete", - "request": { - "$ref": "UndeleteWorkloadIdentityPoolRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - } - }, - "resources": { - "namespaces": { - "methods": { - "create": { - "description": "Creates a new WorkloadIdentityPoolNamespace in a WorkloadIdentityPool.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/workloadIdentityPools/{workloadIdentityPoolsId}/namespaces", - "httpMethod": "POST", - "id": "iam.projects.locations.workloadIdentityPools.namespaces.create", - "parameterOrder": [ - "parent" - ], - "parameters": { - "parent": { - "description": "Required. The parent resource to create the namespace in. The only supported location is `global`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/workloadIdentityPools/[^/]+$", - "required": true, - "type": "string" - }, - "workloadIdentityPoolNamespaceId": { - "description": "Required. The ID to use for the namespace. This value must: * contain at most 63 characters * contain only lowercase alphanumeric characters or `-` * start with an alphanumeric character * end with an alphanumeric character The prefix \"gcp-\" will be reserved for future uses.", - "location": "query", - "type": "string" - } - }, - "path": "v1/{+parent}/namespaces", - "request": { - "$ref": "WorkloadIdentityPoolNamespace" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "delete": { - "description": "Deletes a WorkloadIdentityPoolNamespace. You can undelete a namespace for 30 days. After 30 days, deletion is permanent.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/workloadIdentityPools/{workloadIdentityPoolsId}/namespaces/{namespacesId}", - "httpMethod": "DELETE", - "id": "iam.projects.locations.workloadIdentityPools.namespaces.delete", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Required. The name of the namespace to delete.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/workloadIdentityPools/[^/]+/namespaces/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+name}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "get": { - "description": "Gets an individual WorkloadIdentityPoolNamespace.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/workloadIdentityPools/{workloadIdentityPoolsId}/namespaces/{namespacesId}", - "httpMethod": "GET", - "id": "iam.projects.locations.workloadIdentityPools.namespaces.get", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Required. The name of the namespace to retrieve.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/workloadIdentityPools/[^/]+/namespaces/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+name}", - "response": { - "$ref": "WorkloadIdentityPoolNamespace" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "list": { - "description": "Lists all non-deleted WorkloadIdentityPoolNamespaces in a workload identity pool. If `show_deleted` is set to `true`, then deleted namespaces are also listed.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/workloadIdentityPools/{workloadIdentityPoolsId}/namespaces", - "httpMethod": "GET", - "id": "iam.projects.locations.workloadIdentityPools.namespaces.list", - "parameterOrder": [ - "parent" - ], - "parameters": { - "pageSize": { - "description": "The maximum number of namespaces to return. If unspecified, at most 50 namespaces are returned. The maximum value is 1000; values above are 1000 truncated to 1000.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "pageToken": { - "description": "A page token, received from a previous `ListWorkloadIdentityPoolNamespaces` call. Provide this to retrieve the subsequent page.", - "location": "query", - "type": "string" - }, - "parent": { - "description": "Required. The parent resource to list namespaces for.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/workloadIdentityPools/[^/]+$", - "required": true, - "type": "string" - }, - "showDeleted": { - "description": "Whether to return soft-deleted namespaces.", - "location": "query", - "type": "boolean" - } - }, - "path": "v1/{+parent}/namespaces", - "response": { - "$ref": "ListWorkloadIdentityPoolNamespacesResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "patch": { - "description": "Updates an existing WorkloadIdentityPoolNamespace in a WorkloadIdentityPool.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/workloadIdentityPools/{workloadIdentityPoolsId}/namespaces/{namespacesId}", - "httpMethod": "PATCH", - "id": "iam.projects.locations.workloadIdentityPools.namespaces.patch", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Identifier. The resource name of the namespace.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/workloadIdentityPools/[^/]+/namespaces/[^/]+$", - "required": true, - "type": "string" - }, - "updateMask": { - "description": "Required. The list of fields to update.", - "format": "google-fieldmask", - "location": "query", - "type": "string" - } - }, - "path": "v1/{+name}", - "request": { - "$ref": "WorkloadIdentityPoolNamespace" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "undelete": { - "description": "Undeletes a WorkloadIdentityPoolNamespace, as long as it was deleted fewer than 30 days ago.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/workloadIdentityPools/{workloadIdentityPoolsId}/namespaces/{namespacesId}:undelete", - "httpMethod": "POST", - "id": "iam.projects.locations.workloadIdentityPools.namespaces.undelete", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Required. The name of the namespace to undelete.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/workloadIdentityPools/[^/]+/namespaces/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+name}:undelete", - "request": { - "$ref": "UndeleteWorkloadIdentityPoolNamespaceRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - } - }, - "resources": { - "managedIdentities": { - "methods": { - "addAttestationRule": { - "description": "Add an AttestationRule on a WorkloadIdentityPoolManagedIdentity. The total attestation rules after addition must not exceed 50.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/workloadIdentityPools/{workloadIdentityPoolsId}/namespaces/{namespacesId}/managedIdentities/{managedIdentitiesId}:addAttestationRule", - "httpMethod": "POST", - "id": "iam.projects.locations.workloadIdentityPools.namespaces.managedIdentities.addAttestationRule", - "parameterOrder": [ - "resource" - ], - "parameters": { - "resource": { - "description": "Required. The resource name of the managed identity or namespace resource to add an attestation rule to.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/workloadIdentityPools/[^/]+/namespaces/[^/]+/managedIdentities/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+resource}:addAttestationRule", - "request": { - "$ref": "AddAttestationRuleRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "create": { - "description": "Creates a new WorkloadIdentityPoolManagedIdentity in a WorkloadIdentityPoolNamespace.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/workloadIdentityPools/{workloadIdentityPoolsId}/namespaces/{namespacesId}/managedIdentities", - "httpMethod": "POST", - "id": "iam.projects.locations.workloadIdentityPools.namespaces.managedIdentities.create", - "parameterOrder": [ - "parent" - ], - "parameters": { - "parent": { - "description": "Required. The parent resource to create the manage identity in. The only supported location is `global`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/workloadIdentityPools/[^/]+/namespaces/[^/]+$", - "required": true, - "type": "string" - }, - "workloadIdentityPoolManagedIdentityId": { - "description": "Required. The ID to use for the managed identity. This value must: * contain at most 63 characters * contain only lowercase alphanumeric characters or `-` * start with an alphanumeric character * end with an alphanumeric character The prefix \"gcp-\" will be reserved for future uses.", - "location": "query", - "type": "string" - } - }, - "path": "v1/{+parent}/managedIdentities", - "request": { - "$ref": "WorkloadIdentityPoolManagedIdentity" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "delete": { - "description": "Deletes a WorkloadIdentityPoolManagedIdentity. You can undelete a managed identity for 30 days. After 30 days, deletion is permanent.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/workloadIdentityPools/{workloadIdentityPoolsId}/namespaces/{namespacesId}/managedIdentities/{managedIdentitiesId}", - "httpMethod": "DELETE", - "id": "iam.projects.locations.workloadIdentityPools.namespaces.managedIdentities.delete", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Required. The name of the managed identity to delete.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/workloadIdentityPools/[^/]+/namespaces/[^/]+/managedIdentities/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+name}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "get": { - "description": "Gets an individual WorkloadIdentityPoolManagedIdentity.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/workloadIdentityPools/{workloadIdentityPoolsId}/namespaces/{namespacesId}/managedIdentities/{managedIdentitiesId}", - "httpMethod": "GET", - "id": "iam.projects.locations.workloadIdentityPools.namespaces.managedIdentities.get", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Required. The name of the managed identity to retrieve.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/workloadIdentityPools/[^/]+/namespaces/[^/]+/managedIdentities/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+name}", - "response": { - "$ref": "WorkloadIdentityPoolManagedIdentity" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "list": { - "description": "Lists all non-deleted WorkloadIdentityPoolManagedIdentitys in a namespace. If `show_deleted` is set to `true`, then deleted managed identities are also listed.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/workloadIdentityPools/{workloadIdentityPoolsId}/namespaces/{namespacesId}/managedIdentities", - "httpMethod": "GET", - "id": "iam.projects.locations.workloadIdentityPools.namespaces.managedIdentities.list", - "parameterOrder": [ - "parent" - ], - "parameters": { - "pageSize": { - "description": "The maximum number of managed identities to return. If unspecified, at most 50 managed identities are returned. The maximum value is 1000; values above are 1000 truncated to 1000.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "pageToken": { - "description": "A page token, received from a previous `ListWorkloadIdentityPoolManagedIdentities` call. Provide this to retrieve the subsequent page.", - "location": "query", - "type": "string" - }, - "parent": { - "description": "Required. The parent resource to list managed identities for.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/workloadIdentityPools/[^/]+/namespaces/[^/]+$", - "required": true, - "type": "string" - }, - "showDeleted": { - "description": "Whether to return soft-deleted managed identities.", - "location": "query", - "type": "boolean" - } - }, - "path": "v1/{+parent}/managedIdentities", - "response": { - "$ref": "ListWorkloadIdentityPoolManagedIdentitiesResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "listAttestationRules": { - "description": "List all AttestationRule on a WorkloadIdentityPoolManagedIdentity.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/workloadIdentityPools/{workloadIdentityPoolsId}/namespaces/{namespacesId}/managedIdentities/{managedIdentitiesId}:listAttestationRules", - "httpMethod": "GET", - "id": "iam.projects.locations.workloadIdentityPools.namespaces.managedIdentities.listAttestationRules", - "parameterOrder": [ - "resource" - ], - "parameters": { - "filter": { - "description": "Optional. A query filter. Supports the following function: * `container_ids()`: Returns only the AttestationRules under the specific container ids. The function expects a comma-delimited list with only project numbers and must use the format `projects/`. For example: `container_ids(projects/, projects/,...)`.", - "location": "query", - "type": "string" - }, - "pageSize": { - "description": "Optional. The maximum number of AttestationRules to return. If unspecified, at most 50 AttestationRules are returned. The maximum value is 100; values above 100 are truncated to 100.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "pageToken": { - "description": "Optional. A page token, received from a previous `ListWorkloadIdentityPoolProviderKeys` call. Provide this to retrieve the subsequent page.", - "location": "query", - "type": "string" - }, - "resource": { - "description": "Required. The resource name of the managed identity or namespace resource to list attestation rules of.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/workloadIdentityPools/[^/]+/namespaces/[^/]+/managedIdentities/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+resource}:listAttestationRules", - "response": { - "$ref": "ListAttestationRulesResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "patch": { - "description": "Updates an existing WorkloadIdentityPoolManagedIdentity in a WorkloadIdentityPoolNamespace.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/workloadIdentityPools/{workloadIdentityPoolsId}/namespaces/{namespacesId}/managedIdentities/{managedIdentitiesId}", - "httpMethod": "PATCH", - "id": "iam.projects.locations.workloadIdentityPools.namespaces.managedIdentities.patch", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Identifier. The resource name of the managed identity.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/workloadIdentityPools/[^/]+/namespaces/[^/]+/managedIdentities/[^/]+$", - "required": true, - "type": "string" - }, - "updateMask": { - "description": "Required. The list of fields to update.", - "format": "google-fieldmask", - "location": "query", - "type": "string" - } - }, - "path": "v1/{+name}", - "request": { - "$ref": "WorkloadIdentityPoolManagedIdentity" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "removeAttestationRule": { - "description": "Remove an AttestationRule on a WorkloadIdentityPoolManagedIdentity.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/workloadIdentityPools/{workloadIdentityPoolsId}/namespaces/{namespacesId}/managedIdentities/{managedIdentitiesId}:removeAttestationRule", - "httpMethod": "POST", - "id": "iam.projects.locations.workloadIdentityPools.namespaces.managedIdentities.removeAttestationRule", - "parameterOrder": [ - "resource" - ], - "parameters": { - "resource": { - "description": "Required. The resource name of the managed identity or namespace resource to remove an attestation rule from.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/workloadIdentityPools/[^/]+/namespaces/[^/]+/managedIdentities/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+resource}:removeAttestationRule", - "request": { - "$ref": "RemoveAttestationRuleRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "setAttestationRules": { - "description": "Set all AttestationRule on a WorkloadIdentityPoolManagedIdentity. A maximum of 50 AttestationRules can be set.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/workloadIdentityPools/{workloadIdentityPoolsId}/namespaces/{namespacesId}/managedIdentities/{managedIdentitiesId}:setAttestationRules", - "httpMethod": "POST", - "id": "iam.projects.locations.workloadIdentityPools.namespaces.managedIdentities.setAttestationRules", - "parameterOrder": [ - "resource" - ], - "parameters": { - "resource": { - "description": "Required. The resource name of the managed identity or namespace resource to add an attestation rule to.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/workloadIdentityPools/[^/]+/namespaces/[^/]+/managedIdentities/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+resource}:setAttestationRules", - "request": { - "$ref": "SetAttestationRulesRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "undelete": { - "description": "Undeletes a WorkloadIdentityPoolManagedIdentity, as long as it was deleted fewer than 30 days ago.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/workloadIdentityPools/{workloadIdentityPoolsId}/namespaces/{namespacesId}/managedIdentities/{managedIdentitiesId}:undelete", - "httpMethod": "POST", - "id": "iam.projects.locations.workloadIdentityPools.namespaces.managedIdentities.undelete", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Required. The name of the managed identity to undelete.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/workloadIdentityPools/[^/]+/namespaces/[^/]+/managedIdentities/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+name}:undelete", - "request": { - "$ref": "UndeleteWorkloadIdentityPoolManagedIdentityRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - } - }, - "resources": { - "operations": { - "methods": { - "get": { - "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/workloadIdentityPools/{workloadIdentityPoolsId}/namespaces/{namespacesId}/managedIdentities/{managedIdentitiesId}/operations/{operationsId}", - "httpMethod": "GET", - "id": "iam.projects.locations.workloadIdentityPools.namespaces.managedIdentities.operations.get", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "The name of the operation resource.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/workloadIdentityPools/[^/]+/namespaces/[^/]+/managedIdentities/[^/]+/operations/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+name}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - } - } - }, - "workloadSources": { - "resources": { - "operations": { - "methods": { - "get": { - "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/workloadIdentityPools/{workloadIdentityPoolsId}/namespaces/{namespacesId}/managedIdentities/{managedIdentitiesId}/workloadSources/{workloadSourcesId}/operations/{operationsId}", - "httpMethod": "GET", - "id": "iam.projects.locations.workloadIdentityPools.namespaces.managedIdentities.workloadSources.operations.get", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "The name of the operation resource.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/workloadIdentityPools/[^/]+/namespaces/[^/]+/managedIdentities/[^/]+/workloadSources/[^/]+/operations/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+name}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - } - } - } - } - } - } - }, - "operations": { - "methods": { - "get": { - "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/workloadIdentityPools/{workloadIdentityPoolsId}/namespaces/{namespacesId}/operations/{operationsId}", - "httpMethod": "GET", - "id": "iam.projects.locations.workloadIdentityPools.namespaces.operations.get", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "The name of the operation resource.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/workloadIdentityPools/[^/]+/namespaces/[^/]+/operations/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+name}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - } - } - } - } - }, - "operations": { - "methods": { - "get": { - "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/workloadIdentityPools/{workloadIdentityPoolsId}/operations/{operationsId}", - "httpMethod": "GET", - "id": "iam.projects.locations.workloadIdentityPools.operations.get", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "The name of the operation resource.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/workloadIdentityPools/[^/]+/operations/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+name}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - } - } - }, - "providers": { - "methods": { - "create": { - "description": "Creates a new WorkloadIdentityPoolProvider in a WorkloadIdentityPool. You cannot reuse the name of a deleted provider until 30 days after deletion.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/workloadIdentityPools/{workloadIdentityPoolsId}/providers", - "httpMethod": "POST", - "id": "iam.projects.locations.workloadIdentityPools.providers.create", - "parameterOrder": [ - "parent" - ], - "parameters": { - "parent": { - "description": "Required. The pool to create this provider in.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/workloadIdentityPools/[^/]+$", - "required": true, - "type": "string" - }, - "workloadIdentityPoolProviderId": { - "description": "Required. The ID for the provider, which becomes the final component of the resource name. This value must be 4-32 characters, and may contain the characters [a-z0-9-]. The prefix `gcp-` is reserved for use by Google, and may not be specified.", - "location": "query", - "type": "string" - } - }, - "path": "v1/{+parent}/providers", - "request": { - "$ref": "WorkloadIdentityPoolProvider" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "delete": { - "description": "Deletes a WorkloadIdentityPoolProvider. Deleting a provider does not revoke credentials that have already been issued; they continue to grant access. You can undelete a provider for 30 days. After 30 days, deletion is permanent. You cannot update deleted providers. However, you can view and list them.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/workloadIdentityPools/{workloadIdentityPoolsId}/providers/{providersId}", - "httpMethod": "DELETE", - "id": "iam.projects.locations.workloadIdentityPools.providers.delete", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Required. The name of the provider to delete.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/workloadIdentityPools/[^/]+/providers/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+name}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "get": { - "description": "Gets an individual WorkloadIdentityPoolProvider.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/workloadIdentityPools/{workloadIdentityPoolsId}/providers/{providersId}", - "httpMethod": "GET", - "id": "iam.projects.locations.workloadIdentityPools.providers.get", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Required. The name of the provider to retrieve.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/workloadIdentityPools/[^/]+/providers/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+name}", - "response": { - "$ref": "WorkloadIdentityPoolProvider" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "list": { - "description": "Lists all non-deleted WorkloadIdentityPoolProviders in a WorkloadIdentityPool. If `show_deleted` is set to `true`, then deleted providers are also listed.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/workloadIdentityPools/{workloadIdentityPoolsId}/providers", - "httpMethod": "GET", - "id": "iam.projects.locations.workloadIdentityPools.providers.list", - "parameterOrder": [ - "parent" - ], - "parameters": { - "pageSize": { - "description": "The maximum number of providers to return. If unspecified, at most 50 providers are returned. The maximum value is 100; values above 100 are truncated to 100.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "pageToken": { - "description": "A page token, received from a previous `ListWorkloadIdentityPoolProviders` call. Provide this to retrieve the subsequent page.", - "location": "query", - "type": "string" - }, - "parent": { - "description": "Required. The pool to list providers for.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/workloadIdentityPools/[^/]+$", - "required": true, - "type": "string" - }, - "showDeleted": { - "description": "Whether to return soft-deleted providers.", - "location": "query", - "type": "boolean" - } - }, - "path": "v1/{+parent}/providers", - "response": { - "$ref": "ListWorkloadIdentityPoolProvidersResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "patch": { - "description": "Updates an existing WorkloadIdentityPoolProvider.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/workloadIdentityPools/{workloadIdentityPoolsId}/providers/{providersId}", - "httpMethod": "PATCH", - "id": "iam.projects.locations.workloadIdentityPools.providers.patch", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Identifier. The resource name of the provider.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/workloadIdentityPools/[^/]+/providers/[^/]+$", - "required": true, - "type": "string" - }, - "updateMask": { - "description": "Required. The list of fields to update.", - "format": "google-fieldmask", - "location": "query", - "type": "string" - } - }, - "path": "v1/{+name}", - "request": { - "$ref": "WorkloadIdentityPoolProvider" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "undelete": { - "description": "Undeletes a WorkloadIdentityPoolProvider, as long as it was deleted fewer than 30 days ago.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/workloadIdentityPools/{workloadIdentityPoolsId}/providers/{providersId}:undelete", - "httpMethod": "POST", - "id": "iam.projects.locations.workloadIdentityPools.providers.undelete", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Required. The name of the provider to undelete.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/workloadIdentityPools/[^/]+/providers/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+name}:undelete", - "request": { - "$ref": "UndeleteWorkloadIdentityPoolProviderRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - } - }, - "resources": { - "keys": { - "methods": { - "create": { - "description": "Create a new WorkloadIdentityPoolProviderKey in a WorkloadIdentityPoolProvider.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/workloadIdentityPools/{workloadIdentityPoolsId}/providers/{providersId}/keys", - "httpMethod": "POST", - "id": "iam.projects.locations.workloadIdentityPools.providers.keys.create", - "parameterOrder": [ - "parent" - ], - "parameters": { - "parent": { - "description": "Required. The parent provider resource to create the key in.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/workloadIdentityPools/[^/]+/providers/[^/]+$", - "required": true, - "type": "string" - }, - "workloadIdentityPoolProviderKeyId": { - "description": "Required. The ID to use for the key, which becomes the final component of the resource name. This value should be 4-32 characters, and may contain the characters [a-z0-9-].", - "location": "query", - "type": "string" - } - }, - "path": "v1/{+parent}/keys", - "request": { - "$ref": "WorkloadIdentityPoolProviderKey" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "delete": { - "description": "Deletes an WorkloadIdentityPoolProviderKey. You can undelete a key for 30 days. After 30 days, deletion is permanent.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/workloadIdentityPools/{workloadIdentityPoolsId}/providers/{providersId}/keys/{keysId}", - "httpMethod": "DELETE", - "id": "iam.projects.locations.workloadIdentityPools.providers.keys.delete", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Required. The name of the encryption key to delete.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/workloadIdentityPools/[^/]+/providers/[^/]+/keys/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+name}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "get": { - "description": "Gets an individual WorkloadIdentityPoolProviderKey.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/workloadIdentityPools/{workloadIdentityPoolsId}/providers/{providersId}/keys/{keysId}", - "httpMethod": "GET", - "id": "iam.projects.locations.workloadIdentityPools.providers.keys.get", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Required. The name of the key to retrieve.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/workloadIdentityPools/[^/]+/providers/[^/]+/keys/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+name}", - "response": { - "$ref": "WorkloadIdentityPoolProviderKey" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "list": { - "description": "Lists all non-deleted WorkloadIdentityPoolProviderKeys in a project. If show_deleted is set to `true`, then deleted pools are also listed.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/workloadIdentityPools/{workloadIdentityPoolsId}/providers/{providersId}/keys", - "httpMethod": "GET", - "id": "iam.projects.locations.workloadIdentityPools.providers.keys.list", - "parameterOrder": [ - "parent" - ], - "parameters": { - "pageSize": { - "description": "The maximum number of keys to return. If unspecified, all keys are returned. The maximum value is 10; values above 10 are truncated to 10.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "pageToken": { - "description": "A page token, received from a previous `ListWorkloadIdentityPoolProviderKeys` call. Provide this to retrieve the subsequent page.", - "location": "query", - "type": "string" - }, - "parent": { - "description": "Required. The parent provider resource to list encryption keys for.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/workloadIdentityPools/[^/]+/providers/[^/]+$", - "required": true, - "type": "string" - }, - "showDeleted": { - "description": "Whether to return soft deleted resources as well.", - "location": "query", - "type": "boolean" - } - }, - "path": "v1/{+parent}/keys", - "response": { - "$ref": "ListWorkloadIdentityPoolProviderKeysResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "undelete": { - "description": "Undeletes an WorkloadIdentityPoolProviderKey, as long as it was deleted fewer than 30 days ago.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/workloadIdentityPools/{workloadIdentityPoolsId}/providers/{providersId}/keys/{keysId}:undelete", - "httpMethod": "POST", - "id": "iam.projects.locations.workloadIdentityPools.providers.keys.undelete", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Required. The name of the encryption key to undelete.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/workloadIdentityPools/[^/]+/providers/[^/]+/keys/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+name}:undelete", - "request": { - "$ref": "UndeleteWorkloadIdentityPoolProviderKeyRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - } - }, - "resources": { - "operations": { - "methods": { - "get": { - "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/workloadIdentityPools/{workloadIdentityPoolsId}/providers/{providersId}/keys/{keysId}/operations/{operationsId}", - "httpMethod": "GET", - "id": "iam.projects.locations.workloadIdentityPools.providers.keys.operations.get", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "The name of the operation resource.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/workloadIdentityPools/[^/]+/providers/[^/]+/keys/[^/]+/operations/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+name}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - } - } - } - } - }, - "operations": { - "methods": { - "get": { - "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/workloadIdentityPools/{workloadIdentityPoolsId}/providers/{providersId}/operations/{operationsId}", - "httpMethod": "GET", - "id": "iam.projects.locations.workloadIdentityPools.providers.operations.get", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "The name of the operation resource.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/workloadIdentityPools/[^/]+/providers/[^/]+/operations/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+name}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - } - } - } - } - } - } - } - } - }, - "roles": { - "methods": { - "create": { - "description": "Creates a new custom Role.", - "flatPath": "v1/projects/{projectsId}/roles", - "httpMethod": "POST", - "id": "iam.projects.roles.create", - "parameterOrder": [ - "parent" - ], - "parameters": { - "parent": { - "description": "The `parent` parameter's value depends on the target resource for the request, namely [projects](https://cloud.google.com/iam/docs/reference/rest/v1/projects.roles) or [organizations](https://cloud.google.com/iam/docs/reference/rest/v1/organizations.roles). Each resource type's `parent` value format is described below: * [projects.roles.create](https://cloud.google.com/iam/docs/reference/rest/v1/projects.roles/create): `projects/{PROJECT_ID}`. This method creates project-level [custom roles](https://cloud.google.com/iam/docs/understanding-custom-roles). Example request URL: `https://iam.googleapis.com/v1/projects/{PROJECT_ID}/roles` * [organizations.roles.create](https://cloud.google.com/iam/docs/reference/rest/v1/organizations.roles/create): `organizations/{ORGANIZATION_ID}`. This method creates organization-level [custom roles](https://cloud.google.com/iam/docs/understanding-custom-roles). Example request URL: `https://iam.googleapis.com/v1/organizations/{ORGANIZATION_ID}/roles` Note: Wildcard (*) values are invalid; you must specify a complete project ID or organization ID.", - "location": "path", - "pattern": "^projects/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+parent}/roles", - "request": { - "$ref": "CreateRoleRequest" - }, - "response": { - "$ref": "Role" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "delete": { - "description": "Deletes a custom Role. When you delete a custom role, the following changes occur immediately: * You cannot bind a principal to the custom role in an IAM Policy. * Existing bindings to the custom role are not changed, but they have no effect. * By default, the response from ListRoles does not include the custom role. A deleted custom role still counts toward the [custom role limit](https://cloud.google.com/iam/help/limits) until it is permanently deleted. You have 7 days to undelete the custom role. After 7 days, the following changes occur: * The custom role is permanently deleted and cannot be recovered. * If an IAM policy contains a binding to the custom role, the binding is permanently removed. * The custom role no longer counts toward your custom role limit.", - "flatPath": "v1/projects/{projectsId}/roles/{rolesId}", - "httpMethod": "DELETE", - "id": "iam.projects.roles.delete", - "parameterOrder": [ - "name" - ], - "parameters": { - "etag": { - "description": "Used to perform a consistent read-modify-write.", - "format": "byte", - "location": "query", - "type": "string" - }, - "name": { - "description": "The `name` parameter's value depends on the target resource for the request, namely [projects](https://cloud.google.com/iam/docs/reference/rest/v1/projects.roles) or [organizations](https://cloud.google.com/iam/docs/reference/rest/v1/organizations.roles). Each resource type's `name` value format is described below: * [projects.roles.delete](https://cloud.google.com/iam/docs/reference/rest/v1/projects.roles/delete): `projects/{PROJECT_ID}/roles/{CUSTOM_ROLE_ID}`. This method deletes only [custom roles](https://cloud.google.com/iam/docs/understanding-custom-roles) that have been created at the project level. Example request URL: `https://iam.googleapis.com/v1/projects/{PROJECT_ID}/roles/{CUSTOM_ROLE_ID}` * [organizations.roles.delete](https://cloud.google.com/iam/docs/reference/rest/v1/organizations.roles/delete): `organizations/{ORGANIZATION_ID}/roles/{CUSTOM_ROLE_ID}`. This method deletes only [custom roles](https://cloud.google.com/iam/docs/understanding-custom-roles) that have been created at the organization level. Example request URL: `https://iam.googleapis.com/v1/organizations/{ORGANIZATION_ID}/roles/{CUSTOM_ROLE_ID}` Note: Wildcard (*) values are invalid; you must specify a complete project ID or organization ID.", - "location": "path", - "pattern": "^projects/[^/]+/roles/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+name}", - "response": { - "$ref": "Role" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "get": { - "description": "Gets the definition of a Role.", - "flatPath": "v1/projects/{projectsId}/roles/{rolesId}", - "httpMethod": "GET", - "id": "iam.projects.roles.get", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "The `name` parameter's value depends on the target resource for the request, namely [roles](https://cloud.google.com/iam/docs/reference/rest/v1/roles), [projects](https://cloud.google.com/iam/docs/reference/rest/v1/projects.roles), or [organizations](https://cloud.google.com/iam/docs/reference/rest/v1/organizations.roles). Each resource type's `name` value format is described below: * [roles.get](https://cloud.google.com/iam/docs/reference/rest/v1/roles/get): `roles/{ROLE_NAME}`. This method returns results from all [predefined roles](https://cloud.google.com/iam/docs/understanding-roles#predefined_roles) in IAM. Example request URL: `https://iam.googleapis.com/v1/roles/{ROLE_NAME}` * [projects.roles.get](https://cloud.google.com/iam/docs/reference/rest/v1/projects.roles/get): `projects/{PROJECT_ID}/roles/{CUSTOM_ROLE_ID}`. This method returns only [custom roles](https://cloud.google.com/iam/docs/understanding-custom-roles) that have been created at the project level. Example request URL: `https://iam.googleapis.com/v1/projects/{PROJECT_ID}/roles/{CUSTOM_ROLE_ID}` * [organizations.roles.get](https://cloud.google.com/iam/docs/reference/rest/v1/organizations.roles/get): `organizations/{ORGANIZATION_ID}/roles/{CUSTOM_ROLE_ID}`. This method returns only [custom roles](https://cloud.google.com/iam/docs/understanding-custom-roles) that have been created at the organization level. Example request URL: `https://iam.googleapis.com/v1/organizations/{ORGANIZATION_ID}/roles/{CUSTOM_ROLE_ID}` Note: Wildcard (*) values are invalid; you must specify a complete project ID or organization ID.", - "location": "path", - "pattern": "^projects/[^/]+/roles/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+name}", - "response": { - "$ref": "Role" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "list": { - "description": "Lists every predefined Role that IAM supports, or every custom role that is defined for an organization or project.", - "flatPath": "v1/projects/{projectsId}/roles", - "httpMethod": "GET", - "id": "iam.projects.roles.list", - "parameterOrder": [ - "parent" - ], - "parameters": { - "pageSize": { - "description": "Optional limit on the number of roles to include in the response. The default is 300, and the maximum is 1,000.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "pageToken": { - "description": "Optional pagination token returned in an earlier ListRolesResponse.", - "location": "query", - "type": "string" - }, - "parent": { - "description": "The `parent` parameter's value depends on the target resource for the request, namely [roles](https://cloud.google.com/iam/docs/reference/rest/v1/roles), [projects](https://cloud.google.com/iam/docs/reference/rest/v1/projects.roles), or [organizations](https://cloud.google.com/iam/docs/reference/rest/v1/organizations.roles). Each resource type's `parent` value format is described below: * [roles.list](https://cloud.google.com/iam/docs/reference/rest/v1/roles/list): An empty string. This method doesn't require a resource; it simply returns all [predefined roles](https://cloud.google.com/iam/docs/understanding-roles#predefined_roles) in IAM. Example request URL: `https://iam.googleapis.com/v1/roles` * [projects.roles.list](https://cloud.google.com/iam/docs/reference/rest/v1/projects.roles/list): `projects/{PROJECT_ID}`. This method lists all project-level [custom roles](https://cloud.google.com/iam/docs/understanding-custom-roles). Example request URL: `https://iam.googleapis.com/v1/projects/{PROJECT_ID}/roles` * [organizations.roles.list](https://cloud.google.com/iam/docs/reference/rest/v1/organizations.roles/list): `organizations/{ORGANIZATION_ID}`. This method lists all organization-level [custom roles](https://cloud.google.com/iam/docs/understanding-custom-roles). Example request URL: `https://iam.googleapis.com/v1/organizations/{ORGANIZATION_ID}/roles` Note: Wildcard (*) values are invalid; you must specify a complete project ID or organization ID.", - "location": "path", - "pattern": "^projects/[^/]+$", - "required": true, - "type": "string" - }, - "showDeleted": { - "description": "Include Roles that have been deleted.", - "location": "query", - "type": "boolean" - }, - "view": { - "description": "Optional view for the returned Role objects. When `FULL` is specified, the `includedPermissions` field is returned, which includes a list of all permissions in the role. The default value is `BASIC`, which does not return the `includedPermissions` field.", - "enum": [ - "BASIC", - "FULL" - ], - "enumDescriptions": [ - "Omits the `included_permissions` field. This is the default value.", - "Returns all fields." - ], - "location": "query", - "type": "string" - } - }, - "path": "v1/{+parent}/roles", - "response": { - "$ref": "ListRolesResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "patch": { - "description": "Updates the definition of a custom Role.", - "flatPath": "v1/projects/{projectsId}/roles/{rolesId}", - "httpMethod": "PATCH", - "id": "iam.projects.roles.patch", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "The `name` parameter's value depends on the target resource for the request, namely [projects](https://cloud.google.com/iam/docs/reference/rest/v1/projects.roles) or [organizations](https://cloud.google.com/iam/docs/reference/rest/v1/organizations.roles). Each resource type's `name` value format is described below: * [projects.roles.patch](https://cloud.google.com/iam/docs/reference/rest/v1/projects.roles/patch): `projects/{PROJECT_ID}/roles/{CUSTOM_ROLE_ID}`. This method updates only [custom roles](https://cloud.google.com/iam/docs/understanding-custom-roles) that have been created at the project level. Example request URL: `https://iam.googleapis.com/v1/projects/{PROJECT_ID}/roles/{CUSTOM_ROLE_ID}` * [organizations.roles.patch](https://cloud.google.com/iam/docs/reference/rest/v1/organizations.roles/patch): `organizations/{ORGANIZATION_ID}/roles/{CUSTOM_ROLE_ID}`. This method updates only [custom roles](https://cloud.google.com/iam/docs/understanding-custom-roles) that have been created at the organization level. Example request URL: `https://iam.googleapis.com/v1/organizations/{ORGANIZATION_ID}/roles/{CUSTOM_ROLE_ID}` Note: Wildcard (*) values are invalid; you must specify a complete project ID or organization ID.", - "location": "path", - "pattern": "^projects/[^/]+/roles/[^/]+$", - "required": true, - "type": "string" - }, - "updateMask": { - "description": "A mask describing which fields in the Role have changed.", - "format": "google-fieldmask", - "location": "query", - "type": "string" - } - }, - "path": "v1/{+name}", - "request": { - "$ref": "Role" - }, - "response": { - "$ref": "Role" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "undelete": { - "description": "Undeletes a custom Role.", - "flatPath": "v1/projects/{projectsId}/roles/{rolesId}:undelete", - "httpMethod": "POST", - "id": "iam.projects.roles.undelete", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "The `name` parameter's value depends on the target resource for the request, namely [projects](https://cloud.google.com/iam/docs/reference/rest/v1/projects.roles) or [organizations](https://cloud.google.com/iam/docs/reference/rest/v1/organizations.roles). Each resource type's `name` value format is described below: * [projects.roles.undelete](https://cloud.google.com/iam/docs/reference/rest/v1/projects.roles/undelete): `projects/{PROJECT_ID}/roles/{CUSTOM_ROLE_ID}`. This method undeletes only [custom roles](https://cloud.google.com/iam/docs/understanding-custom-roles) that have been created at the project level. Example request URL: `https://iam.googleapis.com/v1/projects/{PROJECT_ID}/roles/{CUSTOM_ROLE_ID}` * [organizations.roles.undelete](https://cloud.google.com/iam/docs/reference/rest/v1/organizations.roles/undelete): `organizations/{ORGANIZATION_ID}/roles/{CUSTOM_ROLE_ID}`. This method undeletes only [custom roles](https://cloud.google.com/iam/docs/understanding-custom-roles) that have been created at the organization level. Example request URL: `https://iam.googleapis.com/v1/organizations/{ORGANIZATION_ID}/roles/{CUSTOM_ROLE_ID}` Note: Wildcard (*) values are invalid; you must specify a complete project ID or organization ID.", - "location": "path", - "pattern": "^projects/[^/]+/roles/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+name}:undelete", - "request": { - "$ref": "UndeleteRoleRequest" - }, - "response": { - "$ref": "Role" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - } - } - }, - "serviceAccounts": { - "methods": { - "create": { - "description": "Creates a ServiceAccount.", - "flatPath": "v1/projects/{projectsId}/serviceAccounts", - "httpMethod": "POST", - "id": "iam.projects.serviceAccounts.create", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Required. The resource name of the project associated with the service accounts, such as `projects/my-project-123`.", - "location": "path", - "pattern": "^projects/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+name}/serviceAccounts", - "request": { - "$ref": "CreateServiceAccountRequest" - }, - "response": { - "$ref": "ServiceAccount" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "delete": { - "description": "Deletes a ServiceAccount. **Warning:** After you delete a service account, you might not be able to undelete it. If you know that you need to re-enable the service account in the future, use DisableServiceAccount instead. If you delete a service account, IAM permanently removes the service account 30 days later. Google Cloud cannot recover the service account after it is permanently removed, even if you file a support request. To help avoid unplanned outages, we recommend that you disable the service account before you delete it. Use DisableServiceAccount to disable the service account, then wait at least 24 hours and watch for unintended consequences. If there are no unintended consequences, you can delete the service account.", - "flatPath": "v1/projects/{projectsId}/serviceAccounts/{serviceAccountsId}", - "httpMethod": "DELETE", - "id": "iam.projects.serviceAccounts.delete", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Required. The resource name of the service account. Use one of the following formats: * `projects/{PROJECT_ID}/serviceAccounts/{EMAIL_ADDRESS}` * `projects/{PROJECT_ID}/serviceAccounts/{UNIQUE_ID}` As an alternative, you can use the `-` wildcard character instead of the project ID: * `projects/-/serviceAccounts/{EMAIL_ADDRESS}` * `projects/-/serviceAccounts/{UNIQUE_ID}` When possible, avoid using the `-` wildcard character, because it can cause response messages to contain misleading error codes. For example, if you try to access the service account `projects/-/serviceAccounts/fake@example.com`, which does not exist, the response contains an HTTP `403 Forbidden` error instead of a `404 Not Found` error.", - "location": "path", - "pattern": "^projects/[^/]+/serviceAccounts/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+name}", - "response": { - "$ref": "Empty" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "disable": { - "description": "Disables a ServiceAccount immediately. If an application uses the service account to authenticate, that application can no longer call Google APIs or access Google Cloud resources. Existing access tokens for the service account are rejected, and requests for new access tokens will fail. To re-enable the service account, use EnableServiceAccount. After you re-enable the service account, its existing access tokens will be accepted, and you can request new access tokens. To help avoid unplanned outages, we recommend that you disable the service account before you delete it. Use this method to disable the service account, then wait at least 24 hours and watch for unintended consequences. If there are no unintended consequences, you can delete the service account with DeleteServiceAccount.", - "flatPath": "v1/projects/{projectsId}/serviceAccounts/{serviceAccountsId}:disable", - "httpMethod": "POST", - "id": "iam.projects.serviceAccounts.disable", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "The resource name of the service account. Use one of the following formats: * `projects/{PROJECT_ID}/serviceAccounts/{EMAIL_ADDRESS}` * `projects/{PROJECT_ID}/serviceAccounts/{UNIQUE_ID}` As an alternative, you can use the `-` wildcard character instead of the project ID: * `projects/-/serviceAccounts/{EMAIL_ADDRESS}` * `projects/-/serviceAccounts/{UNIQUE_ID}` When possible, avoid using the `-` wildcard character, because it can cause response messages to contain misleading error codes. For example, if you try to access the service account `projects/-/serviceAccounts/fake@example.com`, which does not exist, the response contains an HTTP `403 Forbidden` error instead of a `404 Not Found` error.", - "location": "path", - "pattern": "^projects/[^/]+/serviceAccounts/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+name}:disable", - "request": { - "$ref": "DisableServiceAccountRequest" - }, - "response": { - "$ref": "Empty" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "enable": { - "description": "Enables a ServiceAccount that was disabled by DisableServiceAccount. If the service account is already enabled, then this method has no effect. If the service account was disabled by other means—for example, if Google disabled the service account because it was compromised—you cannot use this method to enable the service account.", - "flatPath": "v1/projects/{projectsId}/serviceAccounts/{serviceAccountsId}:enable", - "httpMethod": "POST", - "id": "iam.projects.serviceAccounts.enable", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "The resource name of the service account. Use one of the following formats: * `projects/{PROJECT_ID}/serviceAccounts/{EMAIL_ADDRESS}` * `projects/{PROJECT_ID}/serviceAccounts/{UNIQUE_ID}` As an alternative, you can use the `-` wildcard character instead of the project ID: * `projects/-/serviceAccounts/{EMAIL_ADDRESS}` * `projects/-/serviceAccounts/{UNIQUE_ID}` When possible, avoid using the `-` wildcard character, because it can cause response messages to contain misleading error codes. For example, if you try to access the service account `projects/-/serviceAccounts/fake@example.com`, which does not exist, the response contains an HTTP `403 Forbidden` error instead of a `404 Not Found` error.", - "location": "path", - "pattern": "^projects/[^/]+/serviceAccounts/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+name}:enable", - "request": { - "$ref": "EnableServiceAccountRequest" - }, - "response": { - "$ref": "Empty" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "get": { - "description": "Gets a ServiceAccount.", - "flatPath": "v1/projects/{projectsId}/serviceAccounts/{serviceAccountsId}", - "httpMethod": "GET", - "id": "iam.projects.serviceAccounts.get", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Required. The resource name of the service account. Use one of the following formats: * `projects/{PROJECT_ID}/serviceAccounts/{EMAIL_ADDRESS}` * `projects/{PROJECT_ID}/serviceAccounts/{UNIQUE_ID}` As an alternative, you can use the `-` wildcard character instead of the project ID: * `projects/-/serviceAccounts/{EMAIL_ADDRESS}` * `projects/-/serviceAccounts/{UNIQUE_ID}` When possible, avoid using the `-` wildcard character, because it can cause response messages to contain misleading error codes. For example, if you try to access the service account `projects/-/serviceAccounts/fake@example.com`, which does not exist, the response contains an HTTP `403 Forbidden` error instead of a `404 Not Found` error.", - "location": "path", - "pattern": "^projects/[^/]+/serviceAccounts/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+name}", - "response": { - "$ref": "ServiceAccount" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "getIamPolicy": { - "description": "Gets the IAM policy that is attached to a ServiceAccount. This IAM policy specifies which principals have access to the service account. This method does not tell you whether the service account has been granted any roles on other resources. To check whether a service account has role grants on a resource, use the `getIamPolicy` method for that resource. For example, to view the role grants for a project, call the Resource Manager API's [projects.getIamPolicy](https://cloud.google.com/resource-manager/reference/rest/v1/projects/getIamPolicy) method.", - "flatPath": "v1/projects/{projectsId}/serviceAccounts/{serviceAccountsId}:getIamPolicy", - "httpMethod": "POST", - "id": "iam.projects.serviceAccounts.getIamPolicy", - "parameterOrder": [ - "resource" - ], - "parameters": { - "options.requestedPolicyVersion": { - "description": "Optional. The maximum policy version that will be used to format the policy. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. Requests for policies with any conditional role bindings must specify version 3. Policies with no conditional role bindings may specify any valid value or leave the field unset. The policy in the response might use the policy version that you specified, or it might use a lower policy version. For example, if you specify version 3, but the policy has no conditional role bindings, the response uses version 1. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).", - "format": "int32", - "location": "query", - "type": "integer" - }, - "resource": { - "description": "REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", - "location": "path", - "pattern": "^projects/[^/]+/serviceAccounts/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+resource}:getIamPolicy", - "response": { - "$ref": "Policy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "list": { - "description": "Lists every ServiceAccount that belongs to a specific project.", - "flatPath": "v1/projects/{projectsId}/serviceAccounts", - "httpMethod": "GET", - "id": "iam.projects.serviceAccounts.list", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Required. The resource name of the project associated with the service accounts, such as `projects/my-project-123`.", - "location": "path", - "pattern": "^projects/[^/]+$", - "required": true, - "type": "string" - }, - "pageSize": { - "description": "Optional limit on the number of service accounts to include in the response. Further accounts can subsequently be obtained by including the ListServiceAccountsResponse.next_page_token in a subsequent request. The default is 20, and the maximum is 100.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "pageToken": { - "description": "Optional pagination token returned in an earlier ListServiceAccountsResponse.next_page_token.", - "location": "query", - "type": "string" - } - }, - "path": "v1/{+name}/serviceAccounts", - "response": { - "$ref": "ListServiceAccountsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "patch": { - "description": "Patches a ServiceAccount.", - "flatPath": "v1/projects/{projectsId}/serviceAccounts/{serviceAccountsId}", - "httpMethod": "PATCH", - "id": "iam.projects.serviceAccounts.patch", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "The resource name of the service account. Use one of the following formats: * `projects/{PROJECT_ID}/serviceAccounts/{EMAIL_ADDRESS}` * `projects/{PROJECT_ID}/serviceAccounts/{UNIQUE_ID}` As an alternative, you can use the `-` wildcard character instead of the project ID: * `projects/-/serviceAccounts/{EMAIL_ADDRESS}` * `projects/-/serviceAccounts/{UNIQUE_ID}` When possible, avoid using the `-` wildcard character, because it can cause response messages to contain misleading error codes. For example, if you try to access the service account `projects/-/serviceAccounts/fake@example.com`, which does not exist, the response contains an HTTP `403 Forbidden` error instead of a `404 Not Found` error.", - "location": "path", - "pattern": "^projects/[^/]+/serviceAccounts/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+name}", - "request": { - "$ref": "PatchServiceAccountRequest" - }, - "response": { - "$ref": "ServiceAccount" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "setIamPolicy": { - "description": "Sets the IAM policy that is attached to a ServiceAccount. Use this method to grant or revoke access to the service account. For example, you could grant a principal the ability to impersonate the service account. This method does not enable the service account to access other resources. To grant roles to a service account on a resource, follow these steps: 1. Call the resource's `getIamPolicy` method to get its current IAM policy. 2. Edit the policy so that it binds the service account to an IAM role for the resource. 3. Call the resource's `setIamPolicy` method to update its IAM policy. For detailed instructions, see [Manage access to project, folders, and organizations](https://cloud.google.com/iam/help/service-accounts/granting-access-to-service-accounts) or [Manage access to other resources](https://cloud.google.com/iam/help/access/manage-other-resources).", - "flatPath": "v1/projects/{projectsId}/serviceAccounts/{serviceAccountsId}:setIamPolicy", - "httpMethod": "POST", - "id": "iam.projects.serviceAccounts.setIamPolicy", - "parameterOrder": [ - "resource" - ], - "parameters": { - "resource": { - "description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", - "location": "path", - "pattern": "^projects/[^/]+/serviceAccounts/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+resource}:setIamPolicy", - "request": { - "$ref": "SetIamPolicyRequest" - }, - "response": { - "$ref": "Policy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "signBlob": { - "deprecated": true, - "description": " Signs a blob using the system-managed private key for a ServiceAccount.", - "flatPath": "v1/projects/{projectsId}/serviceAccounts/{serviceAccountsId}:signBlob", - "httpMethod": "POST", - "id": "iam.projects.serviceAccounts.signBlob", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Required. Deprecated. [Migrate to Service Account Credentials API](https://cloud.google.com/iam/help/credentials/migrate-api). The resource name of the service account. Use one of the following formats: * `projects/{PROJECT_ID}/serviceAccounts/{EMAIL_ADDRESS}` * `projects/{PROJECT_ID}/serviceAccounts/{UNIQUE_ID}` As an alternative, you can use the `-` wildcard character instead of the project ID: * `projects/-/serviceAccounts/{EMAIL_ADDRESS}` * `projects/-/serviceAccounts/{UNIQUE_ID}` When possible, avoid using the `-` wildcard character, because it can cause response messages to contain misleading error codes. For example, if you try to access the service account `projects/-/serviceAccounts/fake@example.com`, which does not exist, the response contains an HTTP `403 Forbidden` error instead of a `404 Not Found` error.", - "location": "path", - "pattern": "^projects/[^/]+/serviceAccounts/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+name}:signBlob", - "request": { - "$ref": "SignBlobRequest" - }, - "response": { - "$ref": "SignBlobResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "signJwt": { - "deprecated": true, - "description": " Signs a JSON Web Token (JWT) using the system-managed private key for a ServiceAccount.", - "flatPath": "v1/projects/{projectsId}/serviceAccounts/{serviceAccountsId}:signJwt", - "httpMethod": "POST", - "id": "iam.projects.serviceAccounts.signJwt", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Required. Deprecated. [Migrate to Service Account Credentials API](https://cloud.google.com/iam/help/credentials/migrate-api). The resource name of the service account. Use one of the following formats: * `projects/{PROJECT_ID}/serviceAccounts/{EMAIL_ADDRESS}` * `projects/{PROJECT_ID}/serviceAccounts/{UNIQUE_ID}` As an alternative, you can use the `-` wildcard character instead of the project ID: * `projects/-/serviceAccounts/{EMAIL_ADDRESS}` * `projects/-/serviceAccounts/{UNIQUE_ID}` When possible, avoid using the `-` wildcard character, because it can cause response messages to contain misleading error codes. For example, if you try to access the service account `projects/-/serviceAccounts/fake@example.com`, which does not exist, the response contains an HTTP `403 Forbidden` error instead of a `404 Not Found` error.", - "location": "path", - "pattern": "^projects/[^/]+/serviceAccounts/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+name}:signJwt", - "request": { - "$ref": "SignJwtRequest" - }, - "response": { - "$ref": "SignJwtResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "testIamPermissions": { - "description": "Tests whether the caller has the specified permissions on a ServiceAccount.", - "flatPath": "v1/projects/{projectsId}/serviceAccounts/{serviceAccountsId}:testIamPermissions", - "httpMethod": "POST", - "id": "iam.projects.serviceAccounts.testIamPermissions", - "parameterOrder": [ - "resource" - ], - "parameters": { - "resource": { - "description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", - "location": "path", - "pattern": "^projects/[^/]+/serviceAccounts/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+resource}:testIamPermissions", - "request": { - "$ref": "TestIamPermissionsRequest" - }, - "response": { - "$ref": "TestIamPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "undelete": { - "description": "Restores a deleted ServiceAccount. **Important:** It is not always possible to restore a deleted service account. Use this method only as a last resort. After you delete a service account, IAM permanently removes the service account 30 days later. There is no way to restore a deleted service account that has been permanently removed.", - "flatPath": "v1/projects/{projectsId}/serviceAccounts/{serviceAccountsId}:undelete", - "httpMethod": "POST", - "id": "iam.projects.serviceAccounts.undelete", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "The resource name of the service account. Use one of the following formats: * `projects/{PROJECT_ID}/serviceAccounts/{EMAIL_ADDRESS}` * `projects/{PROJECT_ID}/serviceAccounts/{UNIQUE_ID}` As an alternative, you can use the `-` wildcard character instead of the project ID: * `projects/-/serviceAccounts/{EMAIL_ADDRESS}` * `projects/-/serviceAccounts/{UNIQUE_ID}` When possible, avoid using the `-` wildcard character, because it can cause response messages to contain misleading error codes. For example, if you try to access the service account `projects/-/serviceAccounts/fake@example.com`, which does not exist, the response contains an HTTP `403 Forbidden` error instead of a `404 Not Found` error.", - "location": "path", - "pattern": "^projects/[^/]+/serviceAccounts/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+name}:undelete", - "request": { - "$ref": "UndeleteServiceAccountRequest" - }, - "response": { - "$ref": "UndeleteServiceAccountResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "update": { - "description": "**Note:** We are in the process of deprecating this method. Use PatchServiceAccount instead. Updates a ServiceAccount. You can update only the `display_name` field.", - "flatPath": "v1/projects/{projectsId}/serviceAccounts/{serviceAccountsId}", - "httpMethod": "PUT", - "id": "iam.projects.serviceAccounts.update", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "The resource name of the service account. Use one of the following formats: * `projects/{PROJECT_ID}/serviceAccounts/{EMAIL_ADDRESS}` * `projects/{PROJECT_ID}/serviceAccounts/{UNIQUE_ID}` As an alternative, you can use the `-` wildcard character instead of the project ID: * `projects/-/serviceAccounts/{EMAIL_ADDRESS}` * `projects/-/serviceAccounts/{UNIQUE_ID}` When possible, avoid using the `-` wildcard character, because it can cause response messages to contain misleading error codes. For example, if you try to access the service account `projects/-/serviceAccounts/fake@example.com`, which does not exist, the response contains an HTTP `403 Forbidden` error instead of a `404 Not Found` error.", - "location": "path", - "pattern": "^projects/[^/]+/serviceAccounts/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+name}", - "request": { - "$ref": "ServiceAccount" - }, - "response": { - "$ref": "ServiceAccount" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - } - }, - "resources": { - "keys": { - "methods": { - "create": { - "description": "Creates a ServiceAccountKey.", - "flatPath": "v1/projects/{projectsId}/serviceAccounts/{serviceAccountsId}/keys", - "httpMethod": "POST", - "id": "iam.projects.serviceAccounts.keys.create", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Required. The resource name of the service account. Use one of the following formats: * `projects/{PROJECT_ID}/serviceAccounts/{EMAIL_ADDRESS}` * `projects/{PROJECT_ID}/serviceAccounts/{UNIQUE_ID}` As an alternative, you can use the `-` wildcard character instead of the project ID: * `projects/-/serviceAccounts/{EMAIL_ADDRESS}` * `projects/-/serviceAccounts/{UNIQUE_ID}` When possible, avoid using the `-` wildcard character, because it can cause response messages to contain misleading error codes. For example, if you try to access the service account `projects/-/serviceAccounts/fake@example.com`, which does not exist, the response contains an HTTP `403 Forbidden` error instead of a `404 Not Found` error.", - "location": "path", - "pattern": "^projects/[^/]+/serviceAccounts/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+name}/keys", - "request": { - "$ref": "CreateServiceAccountKeyRequest" - }, - "response": { - "$ref": "ServiceAccountKey" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "delete": { - "description": "Deletes a ServiceAccountKey. Deleting a service account key does not revoke short-lived credentials that have been issued based on the service account key.", - "flatPath": "v1/projects/{projectsId}/serviceAccounts/{serviceAccountsId}/keys/{keysId}", - "httpMethod": "DELETE", - "id": "iam.projects.serviceAccounts.keys.delete", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Required. The resource name of the service account key. Use one of the following formats: * `projects/{PROJECT_ID}/serviceAccounts/{EMAIL_ADDRESS}/keys/{KEY_ID}` * `projects/{PROJECT_ID}/serviceAccounts/{UNIQUE_ID}/keys/{KEY_ID}` As an alternative, you can use the `-` wildcard character instead of the project ID: * `projects/-/serviceAccounts/{EMAIL_ADDRESS}/keys/{KEY_ID}` * `projects/-/serviceAccounts/{UNIQUE_ID}/keys/{KEY_ID}` When possible, avoid using the `-` wildcard character, because it can cause response messages to contain misleading error codes. For example, if you try to access the service account key `projects/-/serviceAccounts/fake@example.com/keys/fake-key`, which does not exist, the response contains an HTTP `403 Forbidden` error instead of a `404 Not Found` error.", - "location": "path", - "pattern": "^projects/[^/]+/serviceAccounts/[^/]+/keys/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+name}", - "response": { - "$ref": "Empty" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "disable": { - "description": "Disable a ServiceAccountKey. A disabled service account key can be re-enabled with EnableServiceAccountKey.", - "flatPath": "v1/projects/{projectsId}/serviceAccounts/{serviceAccountsId}/keys/{keysId}:disable", - "httpMethod": "POST", - "id": "iam.projects.serviceAccounts.keys.disable", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Required. The resource name of the service account key. Use one of the following formats: * `projects/{PROJECT_ID}/serviceAccounts/{EMAIL_ADDRESS}/keys/{KEY_ID}` * `projects/{PROJECT_ID}/serviceAccounts/{UNIQUE_ID}/keys/{KEY_ID}` As an alternative, you can use the `-` wildcard character instead of the project ID: * `projects/-/serviceAccounts/{EMAIL_ADDRESS}/keys/{KEY_ID}` * `projects/-/serviceAccounts/{UNIQUE_ID}/keys/{KEY_ID}` When possible, avoid using the `-` wildcard character, because it can cause response messages to contain misleading error codes. For example, if you try to access the service account key `projects/-/serviceAccounts/fake@example.com/keys/fake-key`, which does not exist, the response contains an HTTP `403 Forbidden` error instead of a `404 Not Found` error.", - "location": "path", - "pattern": "^projects/[^/]+/serviceAccounts/[^/]+/keys/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+name}:disable", - "request": { - "$ref": "DisableServiceAccountKeyRequest" - }, - "response": { - "$ref": "Empty" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "enable": { - "description": "Enable a ServiceAccountKey.", - "flatPath": "v1/projects/{projectsId}/serviceAccounts/{serviceAccountsId}/keys/{keysId}:enable", - "httpMethod": "POST", - "id": "iam.projects.serviceAccounts.keys.enable", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Required. The resource name of the service account key. Use one of the following formats: * `projects/{PROJECT_ID}/serviceAccounts/{EMAIL_ADDRESS}/keys/{KEY_ID}` * `projects/{PROJECT_ID}/serviceAccounts/{UNIQUE_ID}/keys/{KEY_ID}` As an alternative, you can use the `-` wildcard character instead of the project ID: * `projects/-/serviceAccounts/{EMAIL_ADDRESS}/keys/{KEY_ID}` * `projects/-/serviceAccounts/{UNIQUE_ID}/keys/{KEY_ID}` When possible, avoid using the `-` wildcard character, because it can cause response messages to contain misleading error codes. For example, if you try to access the service account key `projects/-/serviceAccounts/fake@example.com/keys/fake-key`, which does not exist, the response contains an HTTP `403 Forbidden` error instead of a `404 Not Found` error.", - "location": "path", - "pattern": "^projects/[^/]+/serviceAccounts/[^/]+/keys/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+name}:enable", - "request": { - "$ref": "EnableServiceAccountKeyRequest" - }, - "response": { - "$ref": "Empty" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "get": { - "description": "Gets a ServiceAccountKey.", - "flatPath": "v1/projects/{projectsId}/serviceAccounts/{serviceAccountsId}/keys/{keysId}", - "httpMethod": "GET", - "id": "iam.projects.serviceAccounts.keys.get", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Required. The resource name of the service account key. Use one of the following formats: * `projects/{PROJECT_ID}/serviceAccounts/{EMAIL_ADDRESS}/keys/{KEY_ID}` * `projects/{PROJECT_ID}/serviceAccounts/{UNIQUE_ID}/keys/{KEY_ID}` As an alternative, you can use the `-` wildcard character instead of the project ID: * `projects/-/serviceAccounts/{EMAIL_ADDRESS}/keys/{KEY_ID}` * `projects/-/serviceAccounts/{UNIQUE_ID}/keys/{KEY_ID}` When possible, avoid using the `-` wildcard character, because it can cause response messages to contain misleading error codes. For example, if you try to access the service account key `projects/-/serviceAccounts/fake@example.com/keys/fake-key`, which does not exist, the response contains an HTTP `403 Forbidden` error instead of a `404 Not Found` error.", - "location": "path", - "pattern": "^projects/[^/]+/serviceAccounts/[^/]+/keys/[^/]+$", - "required": true, - "type": "string" - }, - "publicKeyType": { - "description": "Optional. The output format of the public key. The default is `TYPE_NONE`, which means that the public key is not returned.", - "enum": [ - "TYPE_NONE", - "TYPE_X509_PEM_FILE", - "TYPE_RAW_PUBLIC_KEY" - ], - "enumDescriptions": [ - "Do not return the public key.", - "X509 PEM format.", - "Raw public key." - ], - "location": "query", - "type": "string" - } - }, - "path": "v1/{+name}", - "response": { - "$ref": "ServiceAccountKey" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "list": { - "description": "Lists every ServiceAccountKey for a service account.", - "flatPath": "v1/projects/{projectsId}/serviceAccounts/{serviceAccountsId}/keys", - "httpMethod": "GET", - "id": "iam.projects.serviceAccounts.keys.list", - "parameterOrder": [ - "name" - ], - "parameters": { - "keyTypes": { - "description": "Filters the types of keys the user wants to include in the list response. Duplicate key types are not allowed. If no key type is provided, all keys are returned.", - "enum": [ - "KEY_TYPE_UNSPECIFIED", - "USER_MANAGED", - "SYSTEM_MANAGED" - ], - "enumDescriptions": [ - "Unspecified key type. The presence of this in the message will immediately result in an error.", - "User-managed keys (managed and rotated by the user).", - "System-managed keys (managed and rotated by Google)." - ], - "location": "query", - "repeated": true, - "type": "string" - }, - "name": { - "description": "Required. The resource name of the service account. Use one of the following formats: * `projects/{PROJECT_ID}/serviceAccounts/{EMAIL_ADDRESS}` * `projects/{PROJECT_ID}/serviceAccounts/{UNIQUE_ID}` As an alternative, you can use the `-` wildcard character instead of the project ID: * `projects/-/serviceAccounts/{EMAIL_ADDRESS}` * `projects/-/serviceAccounts/{UNIQUE_ID}` When possible, avoid using the `-` wildcard character, because it can cause response messages to contain misleading error codes. For example, if you try to access the service account `projects/-/serviceAccounts/fake@example.com`, which does not exist, the response contains an HTTP `403 Forbidden` error instead of a `404 Not Found` error.", - "location": "path", - "pattern": "^projects/[^/]+/serviceAccounts/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+name}/keys", - "response": { - "$ref": "ListServiceAccountKeysResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "upload": { - "description": "Uploads the public key portion of a key pair that you manage, and associates the public key with a ServiceAccount. After you upload the public key, you can use the private key from the key pair as a service account key.", - "flatPath": "v1/projects/{projectsId}/serviceAccounts/{serviceAccountsId}/keys:upload", - "httpMethod": "POST", - "id": "iam.projects.serviceAccounts.keys.upload", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "The resource name of the service account key. Use one of the following formats: * `projects/{PROJECT_ID}/serviceAccounts/{EMAIL_ADDRESS}` * `projects/{PROJECT_ID}/serviceAccounts/{UNIQUE_ID}` As an alternative, you can use the `-` wildcard character instead of the project ID: * `projects/-/serviceAccounts/{EMAIL_ADDRESS}` * `projects/-/serviceAccounts/{UNIQUE_ID}` When possible, avoid using the `-` wildcard character, because it can cause response messages to contain misleading error codes. For example, if you try to access the service account `projects/-/serviceAccounts/fake@example.com`, which does not exist, the response contains an HTTP `403 Forbidden` error instead of a `404 Not Found` error.", - "location": "path", - "pattern": "^projects/[^/]+/serviceAccounts/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+name}/keys:upload", - "request": { - "$ref": "UploadServiceAccountKeyRequest" - }, - "response": { - "$ref": "ServiceAccountKey" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - } - } - } - } - } - } - }, - "roles": { - "methods": { - "get": { - "description": "Gets the definition of a Role.", - "flatPath": "v1/roles/{rolesId}", - "httpMethod": "GET", - "id": "iam.roles.get", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "The `name` parameter's value depends on the target resource for the request, namely [roles](https://cloud.google.com/iam/docs/reference/rest/v1/roles), [projects](https://cloud.google.com/iam/docs/reference/rest/v1/projects.roles), or [organizations](https://cloud.google.com/iam/docs/reference/rest/v1/organizations.roles). Each resource type's `name` value format is described below: * [roles.get](https://cloud.google.com/iam/docs/reference/rest/v1/roles/get): `roles/{ROLE_NAME}`. This method returns results from all [predefined roles](https://cloud.google.com/iam/docs/understanding-roles#predefined_roles) in IAM. Example request URL: `https://iam.googleapis.com/v1/roles/{ROLE_NAME}` * [projects.roles.get](https://cloud.google.com/iam/docs/reference/rest/v1/projects.roles/get): `projects/{PROJECT_ID}/roles/{CUSTOM_ROLE_ID}`. This method returns only [custom roles](https://cloud.google.com/iam/docs/understanding-custom-roles) that have been created at the project level. Example request URL: `https://iam.googleapis.com/v1/projects/{PROJECT_ID}/roles/{CUSTOM_ROLE_ID}` * [organizations.roles.get](https://cloud.google.com/iam/docs/reference/rest/v1/organizations.roles/get): `organizations/{ORGANIZATION_ID}/roles/{CUSTOM_ROLE_ID}`. This method returns only [custom roles](https://cloud.google.com/iam/docs/understanding-custom-roles) that have been created at the organization level. Example request URL: `https://iam.googleapis.com/v1/organizations/{ORGANIZATION_ID}/roles/{CUSTOM_ROLE_ID}` Note: Wildcard (*) values are invalid; you must specify a complete project ID or organization ID.", - "location": "path", - "pattern": "^roles/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+name}", - "response": { - "$ref": "Role" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "list": { - "description": "Lists every predefined Role that IAM supports, or every custom role that is defined for an organization or project.", - "flatPath": "v1/roles", - "httpMethod": "GET", - "id": "iam.roles.list", - "parameterOrder": [], - "parameters": { - "pageSize": { - "description": "Optional limit on the number of roles to include in the response. The default is 300, and the maximum is 1,000.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "pageToken": { - "description": "Optional pagination token returned in an earlier ListRolesResponse.", - "location": "query", - "type": "string" - }, - "parent": { - "description": "The `parent` parameter's value depends on the target resource for the request, namely [roles](https://cloud.google.com/iam/docs/reference/rest/v1/roles), [projects](https://cloud.google.com/iam/docs/reference/rest/v1/projects.roles), or [organizations](https://cloud.google.com/iam/docs/reference/rest/v1/organizations.roles). Each resource type's `parent` value format is described below: * [roles.list](https://cloud.google.com/iam/docs/reference/rest/v1/roles/list): An empty string. This method doesn't require a resource; it simply returns all [predefined roles](https://cloud.google.com/iam/docs/understanding-roles#predefined_roles) in IAM. Example request URL: `https://iam.googleapis.com/v1/roles` * [projects.roles.list](https://cloud.google.com/iam/docs/reference/rest/v1/projects.roles/list): `projects/{PROJECT_ID}`. This method lists all project-level [custom roles](https://cloud.google.com/iam/docs/understanding-custom-roles). Example request URL: `https://iam.googleapis.com/v1/projects/{PROJECT_ID}/roles` * [organizations.roles.list](https://cloud.google.com/iam/docs/reference/rest/v1/organizations.roles/list): `organizations/{ORGANIZATION_ID}`. This method lists all organization-level [custom roles](https://cloud.google.com/iam/docs/understanding-custom-roles). Example request URL: `https://iam.googleapis.com/v1/organizations/{ORGANIZATION_ID}/roles` Note: Wildcard (*) values are invalid; you must specify a complete project ID or organization ID.", - "location": "query", - "type": "string" - }, - "showDeleted": { - "description": "Include Roles that have been deleted.", - "location": "query", - "type": "boolean" - }, - "view": { - "description": "Optional view for the returned Role objects. When `FULL` is specified, the `includedPermissions` field is returned, which includes a list of all permissions in the role. The default value is `BASIC`, which does not return the `includedPermissions` field.", - "enum": [ - "BASIC", - "FULL" - ], - "enumDescriptions": [ - "Omits the `included_permissions` field. This is the default value.", - "Returns all fields." - ], - "location": "query", - "type": "string" - } - }, - "path": "v1/roles", - "response": { - "$ref": "ListRolesResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "queryGrantableRoles": { - "description": "Lists roles that can be granted on a Google Cloud resource. A role is grantable if the IAM policy for the resource can contain bindings to the role.", - "flatPath": "v1/roles:queryGrantableRoles", - "httpMethod": "POST", - "id": "iam.roles.queryGrantableRoles", - "parameterOrder": [], - "parameters": {}, - "path": "v1/roles:queryGrantableRoles", - "request": { - "$ref": "QueryGrantableRolesRequest" - }, - "response": { - "$ref": "QueryGrantableRolesResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - } - } - } - }, - "revision": "20260320", - "rootUrl": "https://iam.googleapis.com/", - "schemas": { - "AccessRestrictions": { - "description": "Access related restrictions on the workforce pool.", - "id": "AccessRestrictions", - "properties": { - "allowedServices": { - "description": "Optional. Immutable. Services allowed for web sign-in with the workforce pool. If not set by default there are no restrictions.", - "items": { - "$ref": "ServiceConfig" - }, - "type": "array" - }, - "disableProgrammaticSignin": { - "description": "Optional. Disable programmatic sign-in by disabling token issue via the Security Token API endpoint. See [Security Token Service API] (https://cloud.google.com/iam/docs/reference/sts/rest).", - "type": "boolean" - } - }, - "type": "object" - }, - "AddAttestationRuleRequest": { - "description": "Request message for AddAttestationRule.", - "id": "AddAttestationRuleRequest", - "properties": { - "attestationRule": { - "$ref": "AttestationRule", - "description": "Required. The attestation rule to be added." - } - }, - "type": "object" - }, - "AdminAuditData": { - "description": "Audit log information specific to Cloud IAM admin APIs. This message is serialized as an `Any` type in the `ServiceData` message of an `AuditLog` message.", - "id": "AdminAuditData", - "properties": { - "permissionDelta": { - "$ref": "PermissionDelta", - "description": "The permission_delta when when creating or updating a Role." - } - }, - "type": "object" - }, - "AttestationRule": { - "description": "Defines which workloads can receive an identity within a pool. When an AttestationRule is defined under a managed identity, matching workloads may receive that identity.", - "id": "AttestationRule", - "properties": { - "googleCloudResource": { - "description": "Optional. A single workload operating on Google Cloud. For example: `//compute.googleapis.com/projects/123/uid/zones/us-central1-a/instances/12345`.", - "type": "string" - } - }, - "type": "object" - }, - "AuditConfig": { - "description": "Specifies the audit configuration for a service. The configuration determines which permission types are logged, and what identities, if any, are exempted from logging. An AuditConfig must have one or more AuditLogConfigs. If there are AuditConfigs for both `allServices` and a specific service, the union of the two AuditConfigs is used for that service: the log_types specified in each AuditConfig are enabled, and the exempted_members in each AuditLogConfig are exempted. Example Policy with multiple AuditConfigs: { \"audit_configs\": [ { \"service\": \"allServices\", \"audit_log_configs\": [ { \"log_type\": \"DATA_READ\", \"exempted_members\": [ \"user:jose@example.com\" ] }, { \"log_type\": \"DATA_WRITE\" }, { \"log_type\": \"ADMIN_READ\" } ] }, { \"service\": \"sampleservice.googleapis.com\", \"audit_log_configs\": [ { \"log_type\": \"DATA_READ\" }, { \"log_type\": \"DATA_WRITE\", \"exempted_members\": [ \"user:aliya@example.com\" ] } ] } ] } For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ logging. It also exempts `jose@example.com` from DATA_READ logging, and `aliya@example.com` from DATA_WRITE logging.", - "id": "AuditConfig", - "properties": { - "auditLogConfigs": { - "description": "The configuration for logging of each type of permission.", - "items": { - "$ref": "AuditLogConfig" - }, - "type": "array" - }, - "service": { - "description": "Specifies a service that will be enabled for audit logging. For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. `allServices` is a special value that covers all services.", - "type": "string" - } - }, - "type": "object" - }, - "AuditData": { - "description": "Audit log information specific to Cloud IAM. This message is serialized as an `Any` type in the `ServiceData` message of an `AuditLog` message.", - "id": "AuditData", - "properties": { - "policyDelta": { - "$ref": "PolicyDelta", - "description": "Policy delta between the original policy and the newly set policy." - } - }, - "type": "object" - }, - "AuditLogConfig": { - "description": "Provides the configuration for logging a type of permissions. Example: { \"audit_log_configs\": [ { \"log_type\": \"DATA_READ\", \"exempted_members\": [ \"user:jose@example.com\" ] }, { \"log_type\": \"DATA_WRITE\" } ] } This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting jose@example.com from DATA_READ logging.", - "id": "AuditLogConfig", - "properties": { - "exemptedMembers": { - "description": "Specifies the identities that do not cause logging for this type of permission. Follows the same format of Binding.members.", - "items": { - "type": "string" - }, - "type": "array" - }, - "logType": { - "description": "The log type that this config enables.", - "enum": [ - "LOG_TYPE_UNSPECIFIED", - "ADMIN_READ", - "DATA_WRITE", - "DATA_READ" - ], - "enumDescriptions": [ - "Default case. Should never be this.", - "Admin reads. Example: CloudIAM getIamPolicy", - "Data writes. Example: CloudSQL Users create", - "Data reads. Example: CloudSQL Users list" - ], - "type": "string" - } - }, - "type": "object" - }, - "AuditableService": { - "description": "Contains information about an auditable service.", - "id": "AuditableService", - "properties": { - "name": { - "description": "Public name of the service. For example, the service name for IAM is 'iam.googleapis.com'.", - "type": "string" - } - }, - "type": "object" - }, - "Aws": { - "description": "Represents an Amazon Web Services identity provider.", - "id": "Aws", - "properties": { - "accountId": { - "description": "Required. The AWS account ID.", - "type": "string" - } - }, - "type": "object" - }, - "Binding": { - "description": "Associates `members`, or principals, with a `role`.", - "id": "Binding", - "properties": { - "condition": { - "$ref": "Expr", - "description": "The condition that is associated with this binding. If the condition evaluates to `true`, then this binding applies to the current request. If the condition evaluates to `false`, then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the principals in this binding. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies)." - }, - "members": { - "description": "Specifies the principals requesting access for a Google Cloud resource. `members` can have the following values: * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account. * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account. Does not include identities that come from external identity providers (IdPs) through identity federation. * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` . * `serviceAccount:{emailid}`: An email address that represents a Google service account. For example, `my-other-app@appspot.gserviceaccount.com`. * `serviceAccount:{projectid}.svc.id.goog[{namespace}/{kubernetes-sa}]`: An identifier for a [Kubernetes service account](https://cloud.google.com/kubernetes-engine/docs/how-to/kubernetes-service-accounts). For example, `my-project.svc.id.goog[my-namespace/my-kubernetes-sa]`. * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`. * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`. * `principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/subject/{subject_attribute_value}`: A single identity in a workforce identity pool. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/group/{group_id}`: All workforce identities in a group. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/attribute.{attribute_name}/{attribute_value}`: All workforce identities with a specific attribute value. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/*`: All identities in a workforce identity pool. * `principal://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/subject/{subject_attribute_value}`: A single identity in a workload identity pool. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/group/{group_id}`: A workload identity pool group. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/attribute.{attribute_name}/{attribute_value}`: All identities in a workload identity pool with a certain attribute. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/*`: All identities in a workload identity pool. * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a user that has been recently deleted. For example, `alice@example.com?uid=123456789012345678901`. If the user is recovered, this value reverts to `user:{emailid}` and the recovered user retains the role in the binding. * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a service account that has been recently deleted. For example, `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. If the service account is undeleted, this value reverts to `serviceAccount:{emailid}` and the undeleted service account retains the role in the binding. * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a Google group that has been recently deleted. For example, `admins@example.com?uid=123456789012345678901`. If the group is recovered, this value reverts to `group:{emailid}` and the recovered group retains the role in the binding. * `deleted:principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/subject/{subject_attribute_value}`: Deleted single identity in a workforce identity pool. For example, `deleted:principal://iam.googleapis.com/locations/global/workforcePools/my-pool-id/subject/my-subject-attribute-value`.", - "items": { - "type": "string" - }, - "type": "array" - }, - "role": { - "description": "Role that is assigned to the list of `members`, or principals. For example, `roles/viewer`, `roles/editor`, or `roles/owner`. For an overview of the IAM roles and permissions, see the [IAM documentation](https://cloud.google.com/iam/docs/roles-overview). For a list of the available pre-defined roles, see [here](https://cloud.google.com/iam/docs/understanding-roles).", - "type": "string" - } - }, - "type": "object" - }, - "BindingDelta": { - "description": "One delta entry for Binding. Each individual change (only one member in each entry) to a binding will be a separate entry.", - "id": "BindingDelta", - "properties": { - "action": { - "description": "The action that was performed on a Binding. Required", - "enum": [ - "ACTION_UNSPECIFIED", - "ADD", - "REMOVE" - ], - "enumDescriptions": [ - "Unspecified.", - "Addition of a Binding.", - "Removal of a Binding." - ], - "type": "string" - }, - "condition": { - "$ref": "Expr", - "description": "The condition that is associated with this binding." - }, - "member": { - "description": "A single identity requesting access for a Google Cloud resource. Follows the same format of Binding.members. Required", - "type": "string" - }, - "role": { - "description": "Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`. Required", - "type": "string" - } - }, - "type": "object" - }, - "CreateRoleRequest": { - "description": "The request to create a new role.", - "id": "CreateRoleRequest", - "properties": { - "role": { - "$ref": "Role", - "description": "The Role resource to create." - }, - "roleId": { - "description": "The role ID to use for this role. A role ID may contain alphanumeric characters, underscores (`_`), and periods (`.`). It must contain a minimum of 3 characters and a maximum of 64 characters.", - "type": "string" - } - }, - "type": "object" - }, - "CreateServiceAccountKeyRequest": { - "description": "The service account key create request.", - "id": "CreateServiceAccountKeyRequest", - "properties": { - "keyAlgorithm": { - "description": "Which type of key and algorithm to use for the key. The default is currently a 2K RSA key. However this may change in the future.", - "enum": [ - "KEY_ALG_UNSPECIFIED", - "KEY_ALG_RSA_1024", - "KEY_ALG_RSA_2048" - ], - "enumDescriptions": [ - "An unspecified key algorithm.", - "1k RSA Key.", - "2k RSA Key." - ], - "type": "string" - }, - "privateKeyType": { - "description": "The output format of the private key. The default value is `TYPE_GOOGLE_CREDENTIALS_FILE`, which is the Google Credentials File format.", - "enum": [ - "TYPE_UNSPECIFIED", - "TYPE_PKCS12_FILE", - "TYPE_GOOGLE_CREDENTIALS_FILE" - ], - "enumDescriptions": [ - "Unspecified. Equivalent to `TYPE_GOOGLE_CREDENTIALS_FILE`.", - "PKCS12 format. The password for the PKCS12 file is `notasecret`. For more information, see https://tools.ietf.org/html/rfc7292.", - "Google Credentials File format." - ], - "type": "string" - } - }, - "type": "object" - }, - "CreateServiceAccountRequest": { - "description": "The service account create request.", - "id": "CreateServiceAccountRequest", - "properties": { - "accountId": { - "description": "Required. The account id that is used to generate the service account email address and a stable unique id. It is unique within a project, must be 6-30 characters long, and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])` to comply with RFC1035.", - "type": "string" - }, - "serviceAccount": { - "$ref": "ServiceAccount", - "description": "The ServiceAccount resource to create. Currently, only the following values are user assignable: `display_name` and `description`." - } - }, - "type": "object" - }, - "DisableServiceAccountKeyRequest": { - "description": "The service account key disable request.", - "id": "DisableServiceAccountKeyRequest", - "properties": { - "extendedStatusMessage": { - "description": "Optional. Usable by internal google services only. An extended_status_message can be used to include additional information about the key, such as its private key data being exposed on a public repository like GitHub.", - "type": "string" - }, - "serviceAccountKeyDisableReason": { - "description": "Optional. Describes the reason this key is being disabled. If unspecified, the default value of SERVICE_ACCOUNT_KEY_DISABLE_REASON_USER_INITIATED will be used.", - "enum": [ - "SERVICE_ACCOUNT_KEY_DISABLE_REASON_UNSPECIFIED", - "SERVICE_ACCOUNT_KEY_DISABLE_REASON_USER_INITIATED", - "SERVICE_ACCOUNT_KEY_DISABLE_REASON_EXPOSED", - "SERVICE_ACCOUNT_KEY_DISABLE_REASON_COMPROMISE_DETECTED" - ], - "enumDescriptions": [ - "Unspecified disable reason", - "Disabled by the user", - "Google detected this Service Account external key's private key data as exposed, typically in a public repository on GitHub or similar.", - "This service account external key was detected as compromised and used by an attacker." - ], - "type": "string" - } - }, - "type": "object" - }, - "DisableServiceAccountRequest": { - "description": "The service account disable request.", - "id": "DisableServiceAccountRequest", - "properties": {}, - "type": "object" - }, - "Empty": { - "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }", - "id": "Empty", - "properties": {}, - "type": "object" - }, - "EnableServiceAccountKeyRequest": { - "description": "The service account key enable request.", - "id": "EnableServiceAccountKeyRequest", - "properties": {}, - "type": "object" - }, - "EnableServiceAccountRequest": { - "description": "The service account enable request.", - "id": "EnableServiceAccountRequest", - "properties": {}, - "type": "object" - }, - "Expr": { - "description": "Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. Example (Comparison): title: \"Summary size limit\" description: \"Determines if a summary is less than 100 chars\" expression: \"document.summary.size() \u003c 100\" Example (Equality): title: \"Requestor is owner\" description: \"Determines if requestor is the document owner\" expression: \"document.owner == request.auth.claims.email\" Example (Logic): title: \"Public documents\" description: \"Determine whether the document should be publicly visible\" expression: \"document.type != 'private' \u0026\u0026 document.type != 'internal'\" Example (Data Manipulation): title: \"Notification string\" description: \"Create a notification string with a timestamp.\" expression: \"'New message received at ' + string(document.create_time)\" The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information.", - "id": "Expr", - "properties": { - "description": { - "description": "Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.", - "type": "string" - }, - "expression": { - "description": "Textual representation of an expression in Common Expression Language syntax.", - "type": "string" - }, - "location": { - "description": "Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.", - "type": "string" - }, - "title": { - "description": "Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.", - "type": "string" - } - }, - "type": "object" - }, - "ExtendedStatus": { - "description": "Extended status can store additional metadata. For example, for keys disabled due to their private key data being expoesed we may include a message with more information about the exposure.", - "id": "ExtendedStatus", - "properties": { - "key": { - "description": "The key for this extended status.", - "enum": [ - "SERVICE_ACCOUNT_KEY_EXTENDED_STATUS_KEY_UNSPECIFIED", - "SERVICE_ACCOUNT_KEY_EXTENDED_STATUS_KEY_EXPOSED", - "SERVICE_ACCOUNT_KEY_EXTENDED_STATUS_KEY_COMPROMISE_DETECTED" - ], - "enumDescriptions": [ - "Unspecified extended status, should not be used.", - "This key has been detected as exposed. extended_status_value may contain information about the exposure (public GitHub repo, open internet, etc.)", - "This key was implicated in a compromise or other attack. extended_status_value may contain information about the abuse perpetrated." - ], - "type": "string" - }, - "value": { - "description": "The value for the extended status.", - "type": "string" - } - }, - "type": "object" - }, - "GetIamPolicyRequest": { - "description": "Request message for `GetIamPolicy` method.", - "id": "GetIamPolicyRequest", - "properties": { - "options": { - "$ref": "GetPolicyOptions", - "description": "OPTIONAL: A `GetPolicyOptions` object for specifying options to `GetIamPolicy`." - } - }, - "type": "object" - }, - "GetPolicyOptions": { - "description": "Encapsulates settings provided to GetIamPolicy.", - "id": "GetPolicyOptions", - "properties": { - "requestedPolicyVersion": { - "description": "Optional. The maximum policy version that will be used to format the policy. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. Requests for policies with any conditional role bindings must specify version 3. Policies with no conditional role bindings may specify any valid value or leave the field unset. The policy in the response might use the policy version that you specified, or it might use a lower policy version. For example, if you specify version 3, but the policy has no conditional role bindings, the response uses version 1. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "GoogleIamAdminV1WorkforcePoolProviderExtraAttributesOAuth2Client": { - "description": "Represents the OAuth 2.0 client credential configuration for retrieving additional user attributes that are not present in the initial authentication credentials from the identity provider, for example, groups. See https://datatracker.ietf.org/doc/html/rfc6749#section-4.4 for more details on client credentials grant flow.", - "id": "GoogleIamAdminV1WorkforcePoolProviderExtraAttributesOAuth2Client", - "properties": { - "attributesType": { - "description": "Required. Represents the IdP and type of claims that should be fetched.", - "enum": [ - "ATTRIBUTES_TYPE_UNSPECIFIED", - "AZURE_AD_GROUPS_MAIL", - "AZURE_AD_GROUPS_ID", - "AZURE_AD_GROUPS_DISPLAY_NAME" - ], - "enumDescriptions": [ - "No AttributesType specified.", - "Used to get the user's group claims from the Microsoft Entra ID identity provider using the configuration provided in ExtraAttributesOAuth2Client. The `mail` property of the `microsoft.graph.group` object is used for claim mapping. See https://learn.microsoft.com/en-us/graph/api/resources/group?view=graph-rest-1.0#properties for more details on `microsoft.graph.group` properties. The group mail addresses of the user's groups that are returned from Microsoft Entra ID can be mapped by using the following attributes: * OIDC: `assertion.groups` * SAML: `assertion.attributes.groups`", - "Used to get the user's group claims from the Microsoft Entra ID identity provider using the configuration provided in ExtraAttributesOAuth2Client. The `id` property of the `microsoft.graph.group` object is used for claim mapping. See https://learn.microsoft.com/en-us/graph/api/resources/group?view=graph-rest-1.0#properties for more details on `microsoft.graph.group` properties. The group IDs of the user's groups that are returned from Microsoft Entra ID can be mapped by using the following attributes: * OIDC: `assertion.groups` * SAML: `assertion.attributes.groups`", - "Used to get the user's group claims from the Microsoft Entra ID identity provider using the configuration provided in ExtraAttributesOAuth2Client. The `displayName` property of the `microsoft.graph.group` object is used for claim mapping. See https://learn.microsoft.com/en-us/graph/api/resources/group?view=graph-rest-1.0#properties for more details on `microsoft.graph.group` properties. The display names of the user's groups that are returned from Microsoft Entra ID can be mapped by using the following attributes: * OIDC: `assertion.groups` * SAML: `assertion.attributes.groups`" - ], - "type": "string" - }, - "clientId": { - "description": "Required. The OAuth 2.0 client ID for retrieving extra attributes from the identity provider. Required to get the Access Token using client credentials grant flow.", - "type": "string" - }, - "clientSecret": { - "$ref": "GoogleIamAdminV1WorkforcePoolProviderOidcClientSecret", - "description": "Required. The OAuth 2.0 client secret for retrieving extra attributes from the identity provider. Required to get the Access Token using client credentials grant flow." - }, - "issuerUri": { - "description": "Required. The OIDC identity provider's issuer URI. Must be a valid URI using the `https` scheme. Required to get the OIDC discovery document.", - "type": "string" - }, - "queryParameters": { - "$ref": "GoogleIamAdminV1WorkforcePoolProviderExtraAttributesOAuth2ClientQueryParameters", - "description": "Optional. Represents the parameters to control which claims are fetched from an IdP." - } - }, - "type": "object" - }, - "GoogleIamAdminV1WorkforcePoolProviderExtraAttributesOAuth2ClientQueryParameters": { - "description": "Represents the parameters to control which claims are fetched from an IdP.", - "id": "GoogleIamAdminV1WorkforcePoolProviderExtraAttributesOAuth2ClientQueryParameters", - "properties": { - "filter": { - "description": "Optional. The filter used to request specific records from the IdP. By default, all of the groups that are associated with a user are fetched. For Microsoft Entra ID, you can add `$search` query parameters using [Keyword Query Language] (https://learn.microsoft.com/en-us/sharepoint/dev/general-development/keyword-query-language-kql-syntax-reference). To learn more about `$search` querying in Microsoft Entra ID, see [Use the `$search` query parameter] (https://learn.microsoft.com/en-us/graph/search-query-parameter). Additionally, Workforce Identity Federation automatically adds the following [`$filter` query parameters] (https://learn.microsoft.com/en-us/graph/filter-query-parameter), based on the value of `attributes_type`. Values passed to `filter` are converted to `$search` query parameters. Additional `$filter` query parameters cannot be added using this field. * `AZURE_AD_GROUPS_MAIL`: `mailEnabled` and `securityEnabled` filters are applied. * `AZURE_AD_GROUPS_ID`: `securityEnabled` filter is applied.", - "type": "string" - } - }, - "type": "object" - }, - "GoogleIamAdminV1WorkforcePoolProviderOidc": { - "description": "Represents an OpenID Connect 1.0 identity provider.", - "id": "GoogleIamAdminV1WorkforcePoolProviderOidc", - "properties": { - "clientId": { - "description": "Required. The client ID. Must match the audience claim of the JWT issued by the identity provider.", - "type": "string" - }, - "clientSecret": { - "$ref": "GoogleIamAdminV1WorkforcePoolProviderOidcClientSecret", - "description": "Optional. The optional client secret. Required to enable Authorization Code flow for web sign-in." - }, - "issuerUri": { - "description": "Required. The OIDC issuer URI. Must be a valid URI using the `https` scheme.", - "type": "string" - }, - "jwksJson": { - "description": "Optional. OIDC JWKs in JSON String format. For details on the definition of a JWK, see https://tools.ietf.org/html/rfc7517. If not set, the `jwks_uri` from the discovery document that is fetched from the well-known path of the `issuer_uri`, will be used. RSA and EC asymmetric keys are supported. The JWK must use the following format and include only the following fields: { \"keys\": [ { \"kty\": \"RSA/EC\", \"alg\": \"\", \"use\": \"sig\", \"kid\": \"\", \"n\": \"\", \"e\": \"\", \"x\": \"\", \"y\": \"\", \"crv\": \"\" } ] }", - "type": "string" - }, - "webSsoConfig": { - "$ref": "GoogleIamAdminV1WorkforcePoolProviderOidcWebSsoConfig", - "description": "Required. Configuration for web single sign-on for the OIDC provider. Here, web sign-in refers to console sign-in and gcloud sign-in through the browser." - } - }, - "type": "object" - }, - "GoogleIamAdminV1WorkforcePoolProviderOidcClientSecret": { - "description": "Representation of a client secret configured for the OIDC provider.", - "id": "GoogleIamAdminV1WorkforcePoolProviderOidcClientSecret", - "properties": { - "value": { - "$ref": "GoogleIamAdminV1WorkforcePoolProviderOidcClientSecretValue", - "description": "The value of the client secret." - } - }, - "type": "object" - }, - "GoogleIamAdminV1WorkforcePoolProviderOidcClientSecretValue": { - "description": "Representation of the value of the client secret.", - "id": "GoogleIamAdminV1WorkforcePoolProviderOidcClientSecretValue", - "properties": { - "plainText": { - "description": "Optional. Input only. The plain text of the client secret value. For security reasons, this field is only used for input and will never be populated in any response.", - "type": "string" - }, - "thumbprint": { - "description": "Output only. A thumbprint to represent the current client secret value.", - "readOnly": true, - "type": "string" - } - }, - "type": "object" - }, - "GoogleIamAdminV1WorkforcePoolProviderOidcWebSsoConfig": { - "description": "Configuration for web single sign-on for the OIDC provider.", - "id": "GoogleIamAdminV1WorkforcePoolProviderOidcWebSsoConfig", - "properties": { - "additionalScopes": { - "description": "Optional. Additional scopes to request for in the OIDC authentication request on top of scopes requested by default. By default, the `openid`, `profile` and `email` scopes that are supported by the identity provider are requested. Each additional scope may be at most 256 characters. A maximum of 10 additional scopes may be configured.", - "items": { - "type": "string" - }, - "type": "array" - }, - "assertionClaimsBehavior": { - "description": "Required. The behavior for how OIDC Claims are included in the `assertion` object used for attribute mapping and attribute condition.", - "enum": [ - "ASSERTION_CLAIMS_BEHAVIOR_UNSPECIFIED", - "MERGE_USER_INFO_OVER_ID_TOKEN_CLAIMS", - "ONLY_ID_TOKEN_CLAIMS" - ], - "enumDescriptions": [ - "No assertion claims behavior specified.", - "Merge the UserInfo Endpoint Claims with ID Token Claims, preferring UserInfo Claim Values for the same Claim Name. This option is available only for the Authorization Code Flow.", - "Only include ID Token Claims." - ], - "type": "string" - }, - "responseType": { - "description": "Required. The Response Type to request for in the OIDC Authorization Request for web sign-in. The `CODE` Response Type is recommended to avoid the Implicit Flow, for security reasons.", - "enum": [ - "RESPONSE_TYPE_UNSPECIFIED", - "CODE", - "ID_TOKEN" - ], - "enumDescriptions": [ - "No Response Type specified.", - "The `response_type=code` selection uses the Authorization Code Flow for web sign-in. Requires a configured client secret.", - "The `response_type=id_token` selection uses the Implicit Flow for web sign-in." - ], - "type": "string" - } - }, - "type": "object" - }, - "GoogleIamAdminV1WorkforcePoolProviderSaml": { - "description": "Represents a SAML identity provider.", - "id": "GoogleIamAdminV1WorkforcePoolProviderSaml", - "properties": { - "idpMetadataXml": { - "description": "Required. SAML Identity provider configuration metadata xml doc. The xml document should comply with [SAML 2.0 specification](https://docs.oasis-open.org/security/saml/v2.0/saml-metadata-2.0-os.pdf). The max size of the acceptable xml document will be bounded to 128k characters. The metadata xml document should satisfy the following constraints: 1) Must contain an Identity Provider Entity ID. 2) Must contain at least one non-expired signing key certificate. 3) For each signing key: a) Valid from should be no more than 7 days from now. b) Valid to should be no more than 25 years in the future. 4) Up to 3 IdP signing keys are allowed in the metadata xml. When updating the provider's metadata xml, at least one non-expired signing key must overlap with the existing metadata. This requirement is skipped if there are no non-expired signing keys present in the existing metadata.", - "type": "string" - } - }, - "type": "object" - }, - "InlineCertificateIssuanceConfig": { - "description": "Represents configuration for generating mutual TLS (mTLS) certificates for the identities within this pool.", - "id": "InlineCertificateIssuanceConfig", - "properties": { - "caPools": { - "additionalProperties": { - "type": "string" - }, - "description": "Optional. A required mapping of a Google Cloud region to the CA pool resource located in that region. The CA pool is used for certificate issuance, adhering to the following constraints: * Key format: A supported cloud region name equivalent to the location identifier in the corresponding map entry's value. * Value format: A valid CA pool resource path format like: \"projects/{project}/locations/{location}/caPools/{ca_pool}\" * Region Matching: Workloads are ONLY issued certificates from CA pools within the same region. Also the CA pool region (in value) must match the workload's region (key).", - "type": "object" - }, - "keyAlgorithm": { - "description": "Optional. Key algorithm to use when generating the key pair. This key pair will be used to create the certificate. If not specified, this will default to ECDSA_P256.", - "enum": [ - "KEY_ALGORITHM_UNSPECIFIED", - "RSA_2048", - "RSA_3072", - "RSA_4096", - "ECDSA_P256", - "ECDSA_P384" - ], - "enumDescriptions": [ - "Unspecified key algorithm. Defaults to ECDSA_P256.", - "Specifies RSA with a 2048-bit modulus.", - "Specifies RSA with a 3072-bit modulus.", - "Specifies RSA with a 4096-bit modulus.", - "Specifies ECDSA with curve P256.", - "Specifies ECDSA with curve P384." - ], - "type": "string" - }, - "lifetime": { - "description": "Optional. Lifetime of the workload certificates issued by the CA pool. Must be between 24 hours and 30 days. If not specified, this will be defaulted to 24 hours.", - "format": "google-duration", - "type": "string" - }, - "rotationWindowPercentage": { - "description": "Optional. Rotation window percentage, the percentage of remaining lifetime after which certificate rotation is initiated. Must be between 50 and 80. If no value is specified, rotation window percentage is defaulted to 50.", - "format": "int32", - "type": "integer" - }, - "useDefaultSharedCa": { - "description": "Optional. If set to true, the trust domain will utilize the GCP-provisioned default CA. A default CA in the same region as the workload will be selected to issue the certificate. Enabling this will clear any existing `ca_pools` configuration to provision the certificates. NOTE: This field is mutually exclusive with `ca_pools`. If this flag is enabled, certificates will be automatically provisioned from the default shared CAs. This flag should not be set if you want to use your own CA pools to provision the certificates.", - "type": "boolean" - } - }, - "type": "object" - }, - "InlineTrustConfig": { - "description": "Defines configuration for extending trust to additional trust domains. By establishing trust with another domain, the current domain will recognize and accept certificates issued by entities within the trusted domains. Note that a trust domain automatically trusts itself, eliminating the need for explicit configuration.", - "id": "InlineTrustConfig", - "properties": { - "additionalTrustBundles": { - "additionalProperties": { - "$ref": "TrustStore" - }, - "description": "Optional. Maps specific trust domains (e.g., \"example.com\") to their corresponding TrustStore, which contain the trusted root certificates for that domain. There can be a maximum of 10 trust domain entries in this map. Note that a trust domain automatically trusts itself and don't need to be specified here. If however, this WorkloadIdentityPool's trust domain contains any trust anchors in the additional_trust_bundles map, those trust anchors will be *appended to* the trust bundle automatically derived from your InlineCertificateIssuanceConfig's ca_pools.", - "type": "object" - } - }, - "type": "object" - }, - "IntermediateCA": { - "description": "Intermediate CA certificates used for building the trust chain to trust anchor", - "id": "IntermediateCA", - "properties": { - "pemCertificate": { - "description": "PEM certificate of the PKI used for validation. Must only contain one ca certificate.", - "type": "string" - } - }, - "type": "object" - }, - "KeyData": { - "description": "Represents a public key data along with its format.", - "id": "KeyData", - "properties": { - "format": { - "description": "Output only. The format of the key.", - "enum": [ - "KEY_FORMAT_UNSPECIFIED", - "RSA_X509_PEM" - ], - "enumDescriptions": [ - "No format has been specified. This is an invalid format and must not be used.", - "A RSA public key wrapped in an X.509v3 certificate ([RFC5280] ( https://www.ietf.org/rfc/rfc5280.txt)), encoded in base64, and wrapped in [public certificate label](https://datatracker.ietf.org/doc/html/rfc7468#section-5.1)." - ], - "readOnly": true, - "type": "string" - }, - "key": { - "description": "Output only. The key data. The format of the key is represented by the format field.", - "readOnly": true, - "type": "string" - }, - "keySpec": { - "description": "Required. The specifications for the key.", - "enum": [ - "KEY_SPEC_UNSPECIFIED", - "RSA_2048", - "RSA_3072", - "RSA_4096" - ], - "enumDescriptions": [ - "No key specification specified.", - "A 2048 bit RSA key.", - "A 3072 bit RSA key.", - "A 4096 bit RSA key." - ], - "type": "string" - }, - "notAfterTime": { - "description": "Output only. Latest timestamp when this key is valid. Attempts to use this key after this time will fail. Only present if the key data represents a X.509 certificate.", - "format": "google-datetime", - "readOnly": true, - "type": "string" - }, - "notBeforeTime": { - "description": "Output only. Earliest timestamp when this key is valid. Attempts to use this key before this time will fail. Only present if the key data represents a X.509 certificate.", - "format": "google-datetime", - "readOnly": true, - "type": "string" - } - }, - "type": "object" - }, - "LintPolicyRequest": { - "description": "The request to lint an IAM policy object.", - "id": "LintPolicyRequest", - "properties": { - "condition": { - "$ref": "Expr", - "description": "google.iam.v1.Binding.condition object to be linted." - }, - "fullResourceName": { - "description": "The full resource name of the policy this lint request is about. The name follows the Google Cloud format for full resource names. For example, a Google Cloud project with ID `my-project` will be named `//cloudresourcemanager.googleapis.com/projects/my-project`. The resource name is not used to read a policy from IAM. Only the data in the request object is linted.", - "type": "string" - } - }, - "type": "object" - }, - "LintPolicyResponse": { - "description": "The response of a lint operation. An empty response indicates the operation was able to fully execute and no lint issue was found.", - "id": "LintPolicyResponse", - "properties": { - "lintResults": { - "description": "List of lint results sorted by `severity` in descending order.", - "items": { - "$ref": "LintResult" - }, - "type": "array" - } - }, - "type": "object" - }, - "LintResult": { - "description": "Structured response of a single validation unit.", - "id": "LintResult", - "properties": { - "debugMessage": { - "description": "Human readable debug message associated with the issue.", - "type": "string" - }, - "fieldName": { - "description": "The name of the field for which this lint result is about. For nested messages `field_name` consists of names of the embedded fields separated by period character. The top-level qualifier is the input object to lint in the request. For example, the `field_name` value `condition.expression` identifies a lint result for the `expression` field of the provided condition.", - "type": "string" - }, - "level": { - "description": "The validation unit level.", - "enum": [ - "LEVEL_UNSPECIFIED", - "CONDITION" - ], - "enumDescriptions": [ - "Level is unspecified.", - "A validation unit which operates on an individual condition within a binding." - ], - "type": "string" - }, - "locationOffset": { - "description": "0-based character position of problematic construct within the object identified by `field_name`. Currently, this is populated only for condition expression.", - "format": "int32", - "type": "integer" - }, - "severity": { - "description": "The validation unit severity.", - "enum": [ - "SEVERITY_UNSPECIFIED", - "ERROR", - "WARNING", - "NOTICE", - "INFO", - "DEPRECATED" - ], - "enumDescriptions": [ - "Severity is unspecified.", - "A validation unit returns an error only for critical issues. If an attempt is made to set the problematic policy without rectifying the critical issue, it causes the `setPolicy` operation to fail.", - "Any issue which is severe enough but does not cause an error. For example, suspicious constructs in the input object will not necessarily fail `setPolicy`, but there is a high likelihood that they won't behave as expected during policy evaluation in `checkPolicy`. This includes the following common scenarios: - Unsatisfiable condition: Expired timestamp in date/time condition. - Ineffective condition: Condition on a pair which is granted unconditionally in another binding of the same policy.", - "Reserved for the issues that are not severe as `ERROR`/`WARNING`, but need special handling. For instance, messages about skipped validation units are issued as `NOTICE`.", - "Any informative statement which is not severe enough to raise `ERROR`/`WARNING`/`NOTICE`, like auto-correction recommendations on the input content. Note that current version of the linter does not utilize `INFO`.", - "Deprecated severity level." - ], - "type": "string" - }, - "validationUnitName": { - "description": "The validation unit name, for instance \"lintValidationUnits/ConditionComplexityCheck\".", - "type": "string" - } - }, - "type": "object" - }, - "ListAttestationRulesResponse": { - "description": "Response message for ListAttestationRules.", - "id": "ListAttestationRulesResponse", - "properties": { - "attestationRules": { - "description": "A list of AttestationRules.", - "items": { - "$ref": "AttestationRule" - }, - "type": "array" - }, - "nextPageToken": { - "description": "Optional. A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.", - "type": "string" - } - }, - "type": "object" - }, - "ListOauthClientCredentialsResponse": { - "description": "Response message for ListOauthClientCredentials.", - "id": "ListOauthClientCredentialsResponse", - "properties": { - "oauthClientCredentials": { - "description": "A list of OauthClientCredentials.", - "items": { - "$ref": "OauthClientCredential" - }, - "type": "array" - } - }, - "type": "object" - }, - "ListOauthClientsResponse": { - "description": "Response message for ListOauthClients.", - "id": "ListOauthClientsResponse", - "properties": { - "nextPageToken": { - "description": "Optional. A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.", - "type": "string" - }, - "oauthClients": { - "description": "A list of OauthClients.", - "items": { - "$ref": "OauthClient" - }, - "type": "array" - } - }, - "type": "object" - }, - "ListRolesResponse": { - "description": "The response containing the roles defined under a resource.", - "id": "ListRolesResponse", - "properties": { - "nextPageToken": { - "description": "To retrieve the next page of results, set `ListRolesRequest.page_token` to this value.", - "type": "string" - }, - "roles": { - "description": "The Roles defined on this resource.", - "items": { - "$ref": "Role" - }, - "type": "array" - } - }, - "type": "object" - }, - "ListServiceAccountKeysResponse": { - "description": "The service account keys list response.", - "id": "ListServiceAccountKeysResponse", - "properties": { - "keys": { - "description": "The public keys for the service account.", - "items": { - "$ref": "ServiceAccountKey" - }, - "type": "array" - } - }, - "type": "object" - }, - "ListServiceAccountsResponse": { - "description": "The service account list response.", - "id": "ListServiceAccountsResponse", - "properties": { - "accounts": { - "description": "The list of matching service accounts.", - "items": { - "$ref": "ServiceAccount" - }, - "type": "array" - }, - "nextPageToken": { - "description": "To retrieve the next page of results, set ListServiceAccountsRequest.page_token to this value.", - "type": "string" - } - }, - "type": "object" - }, - "ListWorkforcePoolProviderKeysResponse": { - "description": "Response message for ListWorkforcePoolProviderKeys.", - "id": "ListWorkforcePoolProviderKeysResponse", - "properties": { - "nextPageToken": { - "description": "A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.", - "type": "string" - }, - "workforcePoolProviderKeys": { - "description": "A list of WorkforcePoolProviderKeys.", - "items": { - "$ref": "WorkforcePoolProviderKey" - }, - "type": "array" - } - }, - "type": "object" - }, - "ListWorkforcePoolProviderScimTenantsResponse": { - "description": "Gemini Enterprise only. Response message for ListWorkforcePoolProviderScimTenants.", - "id": "ListWorkforcePoolProviderScimTenantsResponse", - "properties": { - "nextPageToken": { - "description": "Optional. Gemini Enterprise only. A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.", - "type": "string" - }, - "workforcePoolProviderScimTenants": { - "description": "Output only. Gemini Enterprise only. A list of SCIM tenants.", - "items": { - "$ref": "WorkforcePoolProviderScimTenant" - }, - "readOnly": true, - "type": "array" - } - }, - "type": "object" - }, - "ListWorkforcePoolProviderScimTokensResponse": { - "description": "Gemini Enterprise only. Response message for ListWorkforcePoolProviderScimTokens.", - "id": "ListWorkforcePoolProviderScimTokensResponse", - "properties": { - "nextPageToken": { - "description": "Optional. Gemini Enterprise only. A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.", - "type": "string" - }, - "workforcePoolProviderScimTokens": { - "description": "Output only. Gemini Enterprise only. A list of SCIM tokens.", - "items": { - "$ref": "WorkforcePoolProviderScimToken" - }, - "readOnly": true, - "type": "array" - } - }, - "type": "object" - }, - "ListWorkforcePoolProvidersResponse": { - "description": "Response message for ListWorkforcePoolProviders.", - "id": "ListWorkforcePoolProvidersResponse", - "properties": { - "nextPageToken": { - "description": "A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.", - "type": "string" - }, - "workforcePoolProviders": { - "description": "A list of providers.", - "items": { - "$ref": "WorkforcePoolProvider" - }, - "type": "array" - } - }, - "type": "object" - }, - "ListWorkforcePoolsResponse": { - "description": "Response message for ListWorkforcePools.", - "id": "ListWorkforcePoolsResponse", - "properties": { - "nextPageToken": { - "description": "A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.", - "type": "string" - }, - "workforcePools": { - "description": "A list of pools.", - "items": { - "$ref": "WorkforcePool" - }, - "type": "array" - } - }, - "type": "object" - }, - "ListWorkloadIdentityPoolManagedIdentitiesResponse": { - "description": "Response message for ListWorkloadIdentityPoolManagedIdentities.", - "id": "ListWorkloadIdentityPoolManagedIdentitiesResponse", - "properties": { - "nextPageToken": { - "description": "A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.", - "type": "string" - }, - "workloadIdentityPoolManagedIdentities": { - "description": "A list of managed identities.", - "items": { - "$ref": "WorkloadIdentityPoolManagedIdentity" - }, - "type": "array" - } - }, - "type": "object" - }, - "ListWorkloadIdentityPoolNamespacesResponse": { - "description": "Response message for ListWorkloadIdentityPoolNamespaces.", - "id": "ListWorkloadIdentityPoolNamespacesResponse", - "properties": { - "nextPageToken": { - "description": "A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.", - "type": "string" - }, - "workloadIdentityPoolNamespaces": { - "description": "A list of namespaces.", - "items": { - "$ref": "WorkloadIdentityPoolNamespace" - }, - "type": "array" - } - }, - "type": "object" - }, - "ListWorkloadIdentityPoolProviderKeysResponse": { - "description": "Response message for ListWorkloadIdentityPoolProviderKeys.", - "id": "ListWorkloadIdentityPoolProviderKeysResponse", - "properties": { - "nextPageToken": { - "description": "A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.", - "type": "string" - }, - "workloadIdentityPoolProviderKeys": { - "description": "A list of WorkloadIdentityPoolProviderKey", - "items": { - "$ref": "WorkloadIdentityPoolProviderKey" - }, - "type": "array" - } - }, - "type": "object" - }, - "ListWorkloadIdentityPoolProvidersResponse": { - "description": "Response message for ListWorkloadIdentityPoolProviders.", - "id": "ListWorkloadIdentityPoolProvidersResponse", - "properties": { - "nextPageToken": { - "description": "A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.", - "type": "string" - }, - "workloadIdentityPoolProviders": { - "description": "A list of providers.", - "items": { - "$ref": "WorkloadIdentityPoolProvider" - }, - "type": "array" - } - }, - "type": "object" - }, - "ListWorkloadIdentityPoolsResponse": { - "description": "Response message for ListWorkloadIdentityPools.", - "id": "ListWorkloadIdentityPoolsResponse", - "properties": { - "nextPageToken": { - "description": "A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.", - "type": "string" - }, - "workloadIdentityPools": { - "description": "A list of pools.", - "items": { - "$ref": "WorkloadIdentityPool" - }, - "type": "array" - } - }, - "type": "object" - }, - "OauthClient": { - "description": "Represents an OauthClient. Used to access Google Cloud resources on behalf of a Workforce Identity Federation user by using OAuth 2.0 Protocol to obtain an access token from Google Cloud.", - "id": "OauthClient", - "properties": { - "allowedGrantTypes": { - "description": "Required. The list of OAuth grant types is allowed for the OauthClient.", - "items": { - "enum": [ - "GRANT_TYPE_UNSPECIFIED", - "AUTHORIZATION_CODE_GRANT", - "REFRESH_TOKEN_GRANT" - ], - "enumDescriptions": [ - "Should not be used.", - "Authorization code grant.", - "Refresh token grant." - ], - "type": "string" - }, - "type": "array" - }, - "allowedRedirectUris": { - "description": "Required. The list of redirect uris that is allowed to redirect back when authorization process is completed.", - "items": { - "type": "string" - }, - "type": "array" - }, - "allowedScopes": { - "description": "Required. The list of scopes that the OauthClient is allowed to request during OAuth flows. The following scopes are supported: * `https://www.googleapis.com/auth/cloud-platform`: See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account.", - "items": { - "type": "string" - }, - "type": "array" - }, - "clientId": { - "description": "Output only. The system-generated OauthClient id.", - "readOnly": true, - "type": "string" - }, - "clientType": { - "description": "Immutable. The type of OauthClient. Either public or private. For private clients, the client secret can be managed using the dedicated OauthClientCredential resource.", - "enum": [ - "CLIENT_TYPE_UNSPECIFIED", - "PUBLIC_CLIENT", - "CONFIDENTIAL_CLIENT" - ], - "enumDescriptions": [ - "Should not be used.", - "Public client has no secret.", - "Private client." - ], - "type": "string" - }, - "description": { - "description": "Optional. A user-specified description of the OauthClient. Cannot exceed 256 characters.", - "type": "string" - }, - "disabled": { - "description": "Optional. Whether the OauthClient is disabled. You cannot use a disabled OAuth client.", - "type": "boolean" - }, - "displayName": { - "description": "Optional. A user-specified display name of the OauthClient. Cannot exceed 32 characters.", - "type": "string" - }, - "expireTime": { - "description": "Output only. Time after which the OauthClient will be permanently purged and cannot be recovered.", - "format": "google-datetime", - "readOnly": true, - "type": "string" - }, - "name": { - "description": "Immutable. Identifier. The resource name of the OauthClient. Format:`projects/{project}/locations/{location}/oauthClients/{oauth_client}`.", - "type": "string" - }, - "state": { - "description": "Output only. The state of the OauthClient.", - "enum": [ - "STATE_UNSPECIFIED", - "ACTIVE", - "DELETED" - ], - "enumDescriptions": [ - "Default value. This value is unused.", - "The OauthClient is active.", - "The OauthClient is soft-deleted. Soft-deleted OauthClient is permanently deleted after approximately 30 days unless restored via `UndeleteOauthClient`." - ], - "readOnly": true, - "type": "string" - } - }, - "type": "object" - }, - "OauthClientCredential": { - "description": "Represents an OauthClientCredential. Used to authenticate an OauthClient while accessing Google Cloud resources on behalf of a user by using OAuth 2.0 Protocol.", - "id": "OauthClientCredential", - "properties": { - "clientSecret": { - "description": "Output only. The system-generated OAuth client secret. The client secret must be stored securely. If the client secret is leaked, you must delete and re-create the client credential. To learn more, see [OAuth client and credential security risks and mitigations](https://cloud.google.com/iam/docs/workforce-oauth-app#security)", - "readOnly": true, - "type": "string" - }, - "disabled": { - "description": "Optional. Whether the OauthClientCredential is disabled. You cannot use a disabled OauthClientCredential.", - "type": "boolean" - }, - "displayName": { - "description": "Optional. A user-specified display name of the OauthClientCredential. Cannot exceed 32 characters.", - "type": "string" - }, - "name": { - "description": "Immutable. Identifier. The resource name of the OauthClientCredential. Format: `projects/{project}/locations/{location}/oauthClients/{oauth_client}/credentials/{credential}`", - "type": "string" - } - }, - "type": "object" - }, - "Oidc": { - "description": "Represents an OpenId Connect 1.0 identity provider.", - "id": "Oidc", - "properties": { - "allowedAudiences": { - "description": "Optional. Acceptable values for the `aud` field (audience) in the OIDC token. Token exchange requests are rejected if the token audience does not match one of the configured values. Each audience may be at most 256 characters. A maximum of 10 audiences may be configured. If this list is empty, the OIDC token audience must be equal to the full canonical resource name of the WorkloadIdentityPoolProvider, with or without the HTTPS prefix. For example: ``` //iam.googleapis.com/projects//locations//workloadIdentityPools//providers/ https://iam.googleapis.com/projects//locations//workloadIdentityPools//providers/ ```", - "items": { - "type": "string" - }, - "type": "array" - }, - "issuerUri": { - "description": "Required. The OIDC issuer URL. Must be an HTTPS endpoint. Per OpenID Connect Discovery 1.0 spec, the OIDC issuer URL is used to locate the provider's public keys (via `jwks_uri`) for verifying tokens like the OIDC ID token. These public key types must be 'EC' or 'RSA'.", - "type": "string" - }, - "jwksJson": { - "description": "Optional. OIDC JWKs in JSON String format. For details on the definition of a JWK, see https://tools.ietf.org/html/rfc7517. If not set, the `jwks_uri` from the discovery document(fetched from the .well-known path of the `issuer_uri`) will be used. Currently, RSA and EC asymmetric keys are supported. The JWK must use following format and include only the following fields: { \"keys\": [ { \"kty\": \"RSA/EC\", \"alg\": \"\", \"use\": \"sig\", \"kid\": \"\", \"n\": \"\", \"e\": \"\", \"x\": \"\", \"y\": \"\", \"crv\": \"\" } ] }", - "type": "string" - } - }, - "type": "object" - }, - "Operation": { - "description": "This resource represents a long-running operation that is the result of a network API call.", - "id": "Operation", - "properties": { - "done": { - "description": "If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.", - "type": "boolean" - }, - "error": { - "$ref": "Status", - "description": "The error result of the operation in case of failure or cancellation." - }, - "metadata": { - "additionalProperties": { - "description": "Properties of the object. Contains field @type with type URL.", - "type": "any" - }, - "description": "Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.", - "type": "object" - }, - "name": { - "description": "The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.", - "type": "string" - }, - "response": { - "additionalProperties": { - "description": "Properties of the object. Contains field @type with type URL.", - "type": "any" - }, - "description": "The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.", - "type": "object" - } - }, - "type": "object" - }, - "OperationMetadata": { - "description": "Represents the metadata of the long-running operation.", - "id": "OperationMetadata", - "properties": { - "apiVersion": { - "description": "Output only. API version used to start the operation.", - "readOnly": true, - "type": "string" - }, - "cancelRequested": { - "description": "Output only. Identifies whether the user has requested cancellation of the operation. Operations that have been cancelled successfully have google.longrunning.Operation.error value with a google.rpc.Status.code of `1`, corresponding to `Code.CANCELLED`.", - "readOnly": true, - "type": "boolean" - }, - "createTime": { - "description": "Output only. The time the operation was created.", - "format": "google-datetime", - "readOnly": true, - "type": "string" - }, - "endTime": { - "description": "Output only. The time the operation finished running.", - "format": "google-datetime", - "readOnly": true, - "type": "string" - }, - "statusDetail": { - "description": "Output only. Human-readable status of the operation, if any.", - "readOnly": true, - "type": "string" - }, - "target": { - "description": "Output only. Server-defined resource path for the target of the operation.", - "readOnly": true, - "type": "string" - }, - "verb": { - "description": "Output only. Name of the verb executed by the operation.", - "readOnly": true, - "type": "string" - } - }, - "type": "object" - }, - "OwnerService": { - "description": "The Google Cloud service that owns this namespace.", - "id": "OwnerService", - "properties": { - "principalSubject": { - "description": "Required. The service agent principal subject, e.g. \"serviceAccount:service-1234@gcp-sa-gkehub.iam.gserviceaccount.com\".", - "type": "string" - } - }, - "type": "object" - }, - "PatchServiceAccountRequest": { - "description": "The service account patch request. You can patch only the `display_name` and `description` fields. You must use the `update_mask` field to specify which of these fields you want to patch. Only the fields specified in the request are guaranteed to be returned in the response. Other fields may be empty in the response.", - "id": "PatchServiceAccountRequest", - "properties": { - "serviceAccount": { - "$ref": "ServiceAccount" - }, - "updateMask": { - "format": "google-fieldmask", - "type": "string" - } - }, - "type": "object" - }, - "Permission": { - "description": "A permission which can be included by a role.", - "id": "Permission", - "properties": { - "apiDisabled": { - "description": "The service API associated with the permission is not enabled.", - "type": "boolean" - }, - "customRolesSupportLevel": { - "description": "The current custom role support level.", - "enum": [ - "SUPPORTED", - "TESTING", - "NOT_SUPPORTED" - ], - "enumDescriptions": [ - "Default state. Permission is fully supported for custom role use.", - "Permission is being tested to check custom role compatibility.", - "Permission is not supported for custom role use." - ], - "type": "string" - }, - "description": { - "description": "A brief description of what this Permission is used for.", - "type": "string" - }, - "name": { - "description": "The name of this Permission.", - "type": "string" - }, - "onlyInPredefinedRoles": { - "deprecated": true, - "type": "boolean" - }, - "primaryPermission": { - "description": "The preferred name for this permission. If present, then this permission is an alias of, and equivalent to, the listed primary_permission.", - "type": "string" - }, - "stage": { - "description": "The current launch stage of the permission.", - "enum": [ - "ALPHA", - "BETA", - "GA", - "DEPRECATED" - ], - "enumDescriptions": [ - "The permission is currently in an alpha phase.", - "The permission is currently in a beta phase.", - "The permission is generally available.", - "The permission is being deprecated." - ], - "type": "string" - }, - "title": { - "description": "The title of this Permission.", - "type": "string" - } - }, - "type": "object" - }, - "PermissionDelta": { - "description": "A PermissionDelta message to record the added_permissions and removed_permissions inside a role.", - "id": "PermissionDelta", - "properties": { - "addedPermissions": { - "description": "Added permissions.", - "items": { - "type": "string" - }, - "type": "array" - }, - "removedPermissions": { - "description": "Removed permissions.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "Policy": { - "description": "An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members`, or principals, to a single `role`. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). **JSON example:** ``` { \"bindings\": [ { \"role\": \"roles/resourcemanager.organizationAdmin\", \"members\": [ \"user:mike@example.com\", \"group:admins@example.com\", \"domain:google.com\", \"serviceAccount:my-project-id@appspot.gserviceaccount.com\" ] }, { \"role\": \"roles/resourcemanager.organizationViewer\", \"members\": [ \"user:eve@example.com\" ], \"condition\": { \"title\": \"expirable access\", \"description\": \"Does not grant access after Sep 2020\", \"expression\": \"request.time \u003c timestamp('2020-10-01T00:00:00.000Z')\", } } ], \"etag\": \"BwWWja0YfJA=\", \"version\": 3 } ``` **YAML example:** ``` bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time \u003c timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 ``` For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).", - "id": "Policy", - "properties": { - "auditConfigs": { - "description": "Specifies cloud audit logging configuration for this policy.", - "items": { - "$ref": "AuditConfig" - }, - "type": "array" - }, - "bindings": { - "description": "Associates a list of `members`, or principals, with a `role`. Optionally, may specify a `condition` that determines how and when the `bindings` are applied. Each of the `bindings` must contain at least one principal. The `bindings` in a `Policy` can refer to up to 1,500 principals; up to 250 of these principals can be Google groups. Each occurrence of a principal counts towards these limits. For example, if the `bindings` grant 50 different roles to `user:alice@example.com`, and not to any other principal, then you can add another 1,450 principals to the `bindings` in the `Policy`.", - "items": { - "$ref": "Binding" - }, - "type": "array" - }, - "etag": { - "description": "`etag` is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make use of the `etag` in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An `etag` is returned in the response to `getIamPolicy`, and systems are expected to put that etag in the request to `setIamPolicy` to ensure that their change will be applied to the same version of the policy. **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost.", - "format": "byte", - "type": "string" - }, - "version": { - "description": "Specifies the format of the policy. Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected. Any operation that affects conditional role bindings must specify version `3`. This requirement applies to the following operations: * Getting a policy that includes a conditional role binding * Adding a conditional role binding to a policy * Changing a conditional role binding in a policy * Removing any role binding, with or without a condition, from a policy that includes conditions **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost. If a policy does not include any conditions, operations on that policy may specify any valid version or leave the field unset. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "PolicyDelta": { - "description": "The difference delta between two policies.", - "id": "PolicyDelta", - "properties": { - "bindingDeltas": { - "description": "The delta for Bindings between two policies.", - "items": { - "$ref": "BindingDelta" - }, - "type": "array" - } - }, - "type": "object" - }, - "QueryAuditableServicesRequest": { - "description": "A request to get the list of auditable services for a resource.", - "id": "QueryAuditableServicesRequest", - "properties": { - "fullResourceName": { - "description": "Required. The full resource name to query from the list of auditable services. The name follows the Google Cloud Platform resource format. For example, a Cloud Platform project with id `my-project` will be named `//cloudresourcemanager.googleapis.com/projects/my-project`.", - "type": "string" - } - }, - "type": "object" - }, - "QueryAuditableServicesResponse": { - "description": "A response containing a list of auditable services for a resource.", - "id": "QueryAuditableServicesResponse", - "properties": { - "services": { - "description": "The auditable services for a resource.", - "items": { - "$ref": "AuditableService" - }, - "type": "array" - } - }, - "type": "object" - }, - "QueryGrantableRolesRequest": { - "description": "The grantable role query request.", - "id": "QueryGrantableRolesRequest", - "properties": { - "fullResourceName": { - "description": "Required. Required. The full resource name to query from the list of grantable roles. The name follows the Google Cloud Platform resource format. For example, a Cloud Platform project with id `my-project` will be named `//cloudresourcemanager.googleapis.com/projects/my-project`.", - "type": "string" - }, - "pageSize": { - "description": "Optional limit on the number of roles to include in the response. The default is 300, and the maximum is 2,000.", - "format": "int32", - "type": "integer" - }, - "pageToken": { - "description": "Optional pagination token returned in an earlier QueryGrantableRolesResponse.", - "type": "string" - }, - "view": { - "enum": [ - "BASIC", - "FULL" - ], - "enumDescriptions": [ - "Omits the `included_permissions` field. This is the default value.", - "Returns all fields." - ], - "type": "string" - } - }, - "type": "object" - }, - "QueryGrantableRolesResponse": { - "description": "The grantable role query response.", - "id": "QueryGrantableRolesResponse", - "properties": { - "nextPageToken": { - "description": "To retrieve the next page of results, set `QueryGrantableRolesRequest.page_token` to this value.", - "type": "string" - }, - "roles": { - "description": "The list of matching roles.", - "items": { - "$ref": "Role" - }, - "type": "array" - } - }, - "type": "object" - }, - "QueryTestablePermissionsRequest": { - "description": "A request to get permissions which can be tested on a resource.", - "id": "QueryTestablePermissionsRequest", - "properties": { - "fullResourceName": { - "description": "Required. The full resource name to query from the list of testable permissions. The name follows the Google Cloud Platform resource format. For example, a Cloud Platform project with id `my-project` will be named `//cloudresourcemanager.googleapis.com/projects/my-project`.", - "type": "string" - }, - "pageSize": { - "description": "Optional limit on the number of permissions to include in the response. The default is 100, and the maximum is 1,000.", - "format": "int32", - "type": "integer" - }, - "pageToken": { - "description": "Optional pagination token returned in an earlier QueryTestablePermissionsRequest.", - "type": "string" - } - }, - "type": "object" - }, - "QueryTestablePermissionsResponse": { - "description": "The response containing permissions which can be tested on a resource.", - "id": "QueryTestablePermissionsResponse", - "properties": { - "nextPageToken": { - "description": "To retrieve the next page of results, set `QueryTestableRolesRequest.page_token` to this value.", - "type": "string" - }, - "permissions": { - "description": "The Permissions testable on the requested resource.", - "items": { - "$ref": "Permission" - }, - "type": "array" - } - }, - "type": "object" - }, - "ReconciliationOperationMetadata": { - "description": "Operation metadata returned by the CLH during resource state reconciliation.", - "id": "ReconciliationOperationMetadata", - "properties": { - "deleteResource": { - "deprecated": true, - "description": "DEPRECATED. Use exclusive_action instead.", - "type": "boolean" - }, - "exclusiveAction": { - "description": "Excluisive action returned by the CLH.", - "enum": [ - "UNKNOWN_REPAIR_ACTION", - "DELETE", - "RETRY" - ], - "enumDeprecated": [ - false, - true, - false - ], - "enumDescriptions": [ - "Unknown repair action.", - "The resource has to be deleted. When using this bit, the CLH should fail the operation. DEPRECATED. Instead use DELETE_RESOURCE OperationSignal in SideChannel.", - "This resource could not be repaired but the repair should be tried again at a later time. This can happen if there is a dependency that needs to be resolved first- e.g. if a parent resource must be repaired before a child resource." - ], - "type": "string" - } - }, - "type": "object" - }, - "RemoveAttestationRuleRequest": { - "description": "Request message for RemoveAttestationRule.", - "id": "RemoveAttestationRuleRequest", - "properties": { - "attestationRule": { - "$ref": "AttestationRule", - "description": "Required. The attestation rule to be removed." - } - }, - "type": "object" - }, - "Role": { - "description": "A role in the Identity and Access Management API.", - "id": "Role", - "properties": { - "deleted": { - "description": "The current deleted state of the role. This field is read only. It will be ignored in calls to CreateRole and UpdateRole.", - "type": "boolean" - }, - "description": { - "description": "Optional. A human-readable description for the role.", - "type": "string" - }, - "etag": { - "description": "Used to perform a consistent read-modify-write.", - "format": "byte", - "type": "string" - }, - "includedPermissions": { - "description": "The names of the permissions this role grants when bound in an IAM policy.", - "items": { - "type": "string" - }, - "type": "array" - }, - "name": { - "description": "The name of the role. When `Role` is used in `CreateRole`, the role name must not be set. When `Role` is used in output and other input such as `UpdateRole`, the role name is the complete path. For example, `roles/logging.viewer` for predefined roles, `organizations/{ORGANIZATION_ID}/roles/myRole` for organization-level custom roles, and `projects/{PROJECT_ID}/roles/myRole` for project-level custom roles.", - "type": "string" - }, - "stage": { - "description": "The current launch stage of the role. If the `ALPHA` launch stage has been selected for a role, the `stage` field will not be included in the returned definition for the role.", - "enum": [ - "ALPHA", - "BETA", - "GA", - "DEPRECATED", - "DISABLED", - "EAP" - ], - "enumDescriptions": [ - "The user has indicated this role is currently in an Alpha phase. If this launch stage is selected, the `stage` field will not be included when requesting the definition for a given role.", - "The user has indicated this role is currently in a Beta phase.", - "The user has indicated this role is generally available.", - "The user has indicated this role is being deprecated.", - "This role is disabled and will not contribute permissions to any principals it is granted to in policies.", - "The user has indicated this role is currently in an EAP phase." - ], - "type": "string" - }, - "title": { - "description": "Optional. A human-readable title for the role. Typically this is limited to 100 UTF-8 bytes.", - "type": "string" - } - }, - "type": "object" - }, - "Saml": { - "description": "Represents an SAML 2.0 identity provider.", - "id": "Saml", - "properties": { - "idpMetadataXml": { - "description": "Required. SAML identity provider (IdP) configuration metadata XML doc. The XML document must comply with the [SAML 2.0 specification](https://docs.oasis-open.org/security/saml/v2.0/saml-metadata-2.0-os.pdf). The maximum size of an acceptable XML document is 128K characters. The SAML metadata XML document must satisfy the following constraints: * Must contain an IdP Entity ID. * Must contain at least one non-expired signing certificate. * For each signing certificate, the expiration must be: * From no more than 7 days in the future. * To no more than 25 years in the future. * Up to three IdP signing keys are allowed. When updating the provider's metadata XML, at least one non-expired signing key must overlap with the existing metadata. This requirement is skipped if there are no non-expired signing keys present in the existing metadata.", - "type": "string" - } - }, - "type": "object" - }, - "ServiceAccount": { - "description": "An IAM service account. A service account is an account for an application or a virtual machine (VM) instance, not a person. You can use a service account to call Google APIs. To learn more, read the [overview of service accounts](https://cloud.google.com/iam/help/service-accounts/overview). When you create a service account, you specify the project ID that owns the service account, as well as a name that must be unique within the project. IAM uses these values to create an email address that identifies the service account. //", - "id": "ServiceAccount", - "properties": { - "description": { - "description": "Optional. A user-specified, human-readable description of the service account. The maximum length is 256 UTF-8 bytes.", - "type": "string" - }, - "disabled": { - "description": "Output only. Whether the service account is disabled.", - "readOnly": true, - "type": "boolean" - }, - "displayName": { - "description": "Optional. A user-specified, human-readable name for the service account. The maximum length is 100 UTF-8 bytes.", - "type": "string" - }, - "email": { - "description": "Output only. The email address of the service account.", - "readOnly": true, - "type": "string" - }, - "etag": { - "deprecated": true, - "description": "Deprecated. Do not use.", - "format": "byte", - "type": "string" - }, - "name": { - "description": "The resource name of the service account. Use one of the following formats: * `projects/{PROJECT_ID}/serviceAccounts/{EMAIL_ADDRESS}` * `projects/{PROJECT_ID}/serviceAccounts/{UNIQUE_ID}` As an alternative, you can use the `-` wildcard character instead of the project ID: * `projects/-/serviceAccounts/{EMAIL_ADDRESS}` * `projects/-/serviceAccounts/{UNIQUE_ID}` When possible, avoid using the `-` wildcard character, because it can cause response messages to contain misleading error codes. For example, if you try to access the service account `projects/-/serviceAccounts/fake@example.com`, which does not exist, the response contains an HTTP `403 Forbidden` error instead of a `404 Not Found` error.", - "type": "string" - }, - "oauth2ClientId": { - "description": "Output only. The OAuth 2.0 client ID for the service account.", - "readOnly": true, - "type": "string" - }, - "projectId": { - "description": "Output only. The ID of the project that owns the service account.", - "readOnly": true, - "type": "string" - }, - "uniqueId": { - "description": "Output only. The unique, stable numeric ID for the service account. Each service account retains its unique ID even if you delete the service account. For example, if you delete a service account, then create a new service account with the same name, the new service account has a different unique ID than the deleted service account.", - "readOnly": true, - "type": "string" - } - }, - "type": "object" - }, - "ServiceAccountKey": { - "description": "Represents a service account key. A service account has two sets of key-pairs: user-managed, and system-managed. User-managed key-pairs can be created and deleted by users. Users are responsible for rotating these keys periodically to ensure security of their service accounts. Users retain the private key of these key-pairs, and Google retains ONLY the public key. System-managed keys are automatically rotated by Google, and are used for signing for a maximum of two weeks. The rotation process is probabilistic, and usage of the new key will gradually ramp up and down over the key's lifetime. If you cache the public key set for a service account, we recommend that you update the cache every 15 minutes. User-managed keys can be added and removed at any time, so it is important to update the cache frequently. For Google-managed keys, Google will publish a key at least 6 hours before it is first used for signing and will keep publishing it for at least 6 hours after it was last used for signing. Public keys for all service accounts are also published at the OAuth2 Service Account API.", - "id": "ServiceAccountKey", - "properties": { - "disableReason": { - "description": "Output only. optional. If the key is disabled, it may have a DisableReason describing why it was disabled.", - "enum": [ - "SERVICE_ACCOUNT_KEY_DISABLE_REASON_UNSPECIFIED", - "SERVICE_ACCOUNT_KEY_DISABLE_REASON_USER_INITIATED", - "SERVICE_ACCOUNT_KEY_DISABLE_REASON_EXPOSED", - "SERVICE_ACCOUNT_KEY_DISABLE_REASON_COMPROMISE_DETECTED" - ], - "enumDescriptions": [ - "Unspecified disable reason", - "Disabled by the user", - "Google detected this Service Account external key's private key data as exposed, typically in a public repository on GitHub or similar.", - "This service account external key was detected as compromised and used by an attacker." - ], - "readOnly": true, - "type": "string" - }, - "disabled": { - "description": "The key status.", - "type": "boolean" - }, - "extendedStatus": { - "description": "Output only. Extended Status provides permanent information about a service account key. For example, if this key was detected as exposed or compromised, that information will remain for the lifetime of the key in the extended_status.", - "items": { - "$ref": "ExtendedStatus" - }, - "readOnly": true, - "type": "array" - }, - "keyAlgorithm": { - "description": "Specifies the algorithm (and possibly key size) for the key.", - "enum": [ - "KEY_ALG_UNSPECIFIED", - "KEY_ALG_RSA_1024", - "KEY_ALG_RSA_2048" - ], - "enumDescriptions": [ - "An unspecified key algorithm.", - "1k RSA Key.", - "2k RSA Key." - ], - "type": "string" - }, - "keyOrigin": { - "description": "The key origin.", - "enum": [ - "ORIGIN_UNSPECIFIED", - "USER_PROVIDED", - "GOOGLE_PROVIDED" - ], - "enumDescriptions": [ - "Unspecified key origin.", - "Key is provided by user.", - "Key is provided by Google." - ], - "type": "string" - }, - "keyType": { - "description": "The key type.", - "enum": [ - "KEY_TYPE_UNSPECIFIED", - "USER_MANAGED", - "SYSTEM_MANAGED" - ], - "enumDescriptions": [ - "Unspecified key type. The presence of this in the message will immediately result in an error.", - "User-managed keys (managed and rotated by the user).", - "System-managed keys (managed and rotated by Google)." - ], - "type": "string" - }, - "name": { - "description": "The resource name of the service account key in the following format `projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}/keys/{key}`.", - "type": "string" - }, - "privateKeyData": { - "description": "The private key data. Only provided in `CreateServiceAccountKey` responses. Make sure to keep the private key data secure because it allows for the assertion of the service account identity. When base64 decoded, the private key data can be used to authenticate with Google API client libraries and with gcloud auth activate-service-account.", - "format": "byte", - "type": "string" - }, - "privateKeyType": { - "description": "The output format for the private key. Only provided in `CreateServiceAccountKey` responses, not in `GetServiceAccountKey` or `ListServiceAccountKey` responses. Google never exposes system-managed private keys, and never retains user-managed private keys.", - "enum": [ - "TYPE_UNSPECIFIED", - "TYPE_PKCS12_FILE", - "TYPE_GOOGLE_CREDENTIALS_FILE" - ], - "enumDescriptions": [ - "Unspecified. Equivalent to `TYPE_GOOGLE_CREDENTIALS_FILE`.", - "PKCS12 format. The password for the PKCS12 file is `notasecret`. For more information, see https://tools.ietf.org/html/rfc7292.", - "Google Credentials File format." - ], - "type": "string" - }, - "publicKeyData": { - "description": "The public key data. Only provided in `GetServiceAccountKey` responses.", - "format": "byte", - "type": "string" - }, - "validAfterTime": { - "description": "The key can be used after this timestamp.", - "format": "google-datetime", - "type": "string" - }, - "validBeforeTime": { - "description": "The key can be used before this timestamp. For system-managed key pairs, this timestamp is the end time for the private key signing operation. The public key could still be used for verification for a few hours after this time.", - "format": "google-datetime", - "type": "string" - } - }, - "type": "object" - }, - "ServiceConfig": { - "description": "Configuration for a service.", - "id": "ServiceConfig", - "properties": { - "domain": { - "description": "Optional. Domain name of the service. Example: console.cloud.google", - "type": "string" - } - }, - "type": "object" - }, - "SetAttestationRulesRequest": { - "description": "Request message for SetAttestationRules.", - "id": "SetAttestationRulesRequest", - "properties": { - "attestationRules": { - "description": "Required. The attestation rules to be set. At most 50 attestation rules can be set.", - "items": { - "$ref": "AttestationRule" - }, - "type": "array" - } - }, - "type": "object" - }, - "SetIamPolicyRequest": { - "description": "Request message for `SetIamPolicy` method.", - "id": "SetIamPolicyRequest", - "properties": { - "policy": { - "$ref": "Policy", - "description": "REQUIRED: The complete policy to be applied to the `resource`. The size of the policy is limited to a few 10s of KB. An empty policy is a valid policy but certain Google Cloud services (such as Projects) might reject them." - }, - "updateMask": { - "description": "OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only the fields in the mask will be modified. If no mask is provided, the following default mask is used: `paths: \"bindings, etag\"`", - "format": "google-fieldmask", - "type": "string" - } - }, - "type": "object" - }, - "SignBlobRequest": { - "description": "Deprecated. [Migrate to Service Account Credentials API](https://cloud.google.com/iam/help/credentials/migrate-api). The service account sign blob request.", - "id": "SignBlobRequest", - "properties": { - "bytesToSign": { - "deprecated": true, - "description": "Required. Deprecated. [Migrate to Service Account Credentials API](https://cloud.google.com/iam/help/credentials/migrate-api). The bytes to sign.", - "format": "byte", - "type": "string" - } - }, - "type": "object" - }, - "SignBlobResponse": { - "description": "Deprecated. [Migrate to Service Account Credentials API](https://cloud.google.com/iam/help/credentials/migrate-api). The service account sign blob response.", - "id": "SignBlobResponse", - "properties": { - "keyId": { - "deprecated": true, - "description": "Deprecated. [Migrate to Service Account Credentials API](https://cloud.google.com/iam/help/credentials/migrate-api). The id of the key used to sign the blob.", - "type": "string" - }, - "signature": { - "deprecated": true, - "description": "Deprecated. [Migrate to Service Account Credentials API](https://cloud.google.com/iam/help/credentials/migrate-api). The signed blob.", - "format": "byte", - "type": "string" - } - }, - "type": "object" - }, - "SignJwtRequest": { - "description": "Deprecated. [Migrate to Service Account Credentials API](https://cloud.google.com/iam/help/credentials/migrate-api). The service account sign JWT request.", - "id": "SignJwtRequest", - "properties": { - "payload": { - "deprecated": true, - "description": "Required. Deprecated. [Migrate to Service Account Credentials API](https://cloud.google.com/iam/help/credentials/migrate-api). The JWT payload to sign. Must be a serialized JSON object that contains a JWT Claims Set. For example: `{\"sub\": \"user@example.com\", \"iat\": 313435}` If the JWT Claims Set contains an expiration time (`exp`) claim, it must be an integer timestamp that is not in the past and no more than 12 hours in the future. If the JWT Claims Set does not contain an expiration time (`exp`) claim, this claim is added automatically, with a timestamp that is 1 hour in the future.", - "type": "string" - } - }, - "type": "object" - }, - "SignJwtResponse": { - "description": "Deprecated. [Migrate to Service Account Credentials API](https://cloud.google.com/iam/help/credentials/migrate-api). The service account sign JWT response.", - "id": "SignJwtResponse", - "properties": { - "keyId": { - "deprecated": true, - "description": "Deprecated. [Migrate to Service Account Credentials API](https://cloud.google.com/iam/help/credentials/migrate-api). The id of the key used to sign the JWT.", - "type": "string" - }, - "signedJwt": { - "deprecated": true, - "description": "Deprecated. [Migrate to Service Account Credentials API](https://cloud.google.com/iam/help/credentials/migrate-api). The signed JWT.", - "type": "string" - } - }, - "type": "object" - }, - "Status": { - "description": "The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).", - "id": "Status", - "properties": { - "code": { - "description": "The status code, which should be an enum value of google.rpc.Code.", - "format": "int32", - "type": "integer" - }, - "details": { - "description": "A list of messages that carry the error details. There is a common set of message types for APIs to use.", - "items": { - "additionalProperties": { - "description": "Properties of the object. Contains field @type with type URL.", - "type": "any" - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.", - "type": "string" - } - }, - "type": "object" - }, - "TestIamPermissionsRequest": { - "description": "Request message for `TestIamPermissions` method.", - "id": "TestIamPermissionsRequest", - "properties": { - "permissions": { - "description": "The set of permissions to check for the `resource`. Permissions with wildcards (such as `*` or `storage.*`) are not allowed. For more information see [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions).", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "TestIamPermissionsResponse": { - "description": "Response message for `TestIamPermissions` method.", - "id": "TestIamPermissionsResponse", - "properties": { - "permissions": { - "description": "A subset of `TestPermissionsRequest.permissions` that the caller is allowed.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "TrustAnchor": { - "description": "Represents a root of trust.", - "id": "TrustAnchor", - "properties": { - "pemCertificate": { - "description": "PEM certificate of the PKI used for validation. Must only contain one ca certificate (either root or intermediate cert).", - "type": "string" - } - }, - "type": "object" - }, - "TrustStore": { - "description": "Trust store that contains trust anchors and optional intermediate CAs used in PKI to build a trust chain(trust hierarchy) and verify a client's identity.", - "id": "TrustStore", - "properties": { - "intermediateCas": { - "description": "Optional. Set of intermediate CA certificates used for building the trust chain to the trust anchor. Important: Intermediate CAs are only supported for X.509 federation.", - "items": { - "$ref": "IntermediateCA" - }, - "type": "array" - }, - "trustAnchors": { - "description": "Required. List of trust anchors to be used while performing validation against a given TrustStore. The incoming end entity's certificate must be in the trust chain of one of the trust anchors here.", - "items": { - "$ref": "TrustAnchor" - }, - "type": "array" - }, - "trustDefaultSharedCa": { - "description": "Optional. If set to True, the trust bundle will include the private ca managed identity regional root public certificates. Important: `trust_default_shared_ca` is only supported for managed identity trust domain resource.", - "type": "boolean" - } - }, - "type": "object" - }, - "UndeleteOauthClientRequest": { - "description": "Request message for UndeleteOauthClient.", - "id": "UndeleteOauthClientRequest", - "properties": {}, - "type": "object" - }, - "UndeleteRoleRequest": { - "description": "The request to undelete an existing role.", - "id": "UndeleteRoleRequest", - "properties": { - "etag": { - "description": "Used to perform a consistent read-modify-write.", - "format": "byte", - "type": "string" - } - }, - "type": "object" - }, - "UndeleteServiceAccountRequest": { - "description": "The service account undelete request.", - "id": "UndeleteServiceAccountRequest", - "properties": {}, - "type": "object" - }, - "UndeleteServiceAccountResponse": { - "id": "UndeleteServiceAccountResponse", - "properties": { - "restoredAccount": { - "$ref": "ServiceAccount", - "description": "Metadata for the restored service account." - } - }, - "type": "object" - }, - "UndeleteWorkforcePoolProviderKeyRequest": { - "description": "Request message for UndeleteWorkforcePoolProviderKey.", - "id": "UndeleteWorkforcePoolProviderKeyRequest", - "properties": {}, - "type": "object" - }, - "UndeleteWorkforcePoolProviderRequest": { - "description": "Request message for UndeleteWorkforcePoolProvider.", - "id": "UndeleteWorkforcePoolProviderRequest", - "properties": {}, - "type": "object" - }, - "UndeleteWorkforcePoolProviderScimTenantRequest": { - "description": "Gemini Enterprise only. Request message for UndeleteWorkforcePoolProviderScimTenant.", - "id": "UndeleteWorkforcePoolProviderScimTenantRequest", - "properties": {}, - "type": "object" - }, - "UndeleteWorkforcePoolRequest": { - "description": "Request message for UndeleteWorkforcePool.", - "id": "UndeleteWorkforcePoolRequest", - "properties": {}, - "type": "object" - }, - "UndeleteWorkforcePoolSubjectRequest": { - "description": "Request message for UndeleteWorkforcePoolSubject.", - "id": "UndeleteWorkforcePoolSubjectRequest", - "properties": {}, - "type": "object" - }, - "UndeleteWorkloadIdentityPoolManagedIdentityRequest": { - "description": "Request message for UndeleteWorkloadIdentityPoolManagedIdentity.", - "id": "UndeleteWorkloadIdentityPoolManagedIdentityRequest", - "properties": {}, - "type": "object" - }, - "UndeleteWorkloadIdentityPoolNamespaceRequest": { - "description": "Request message for UndeleteWorkloadIdentityPoolNamespace.", - "id": "UndeleteWorkloadIdentityPoolNamespaceRequest", - "properties": {}, - "type": "object" - }, - "UndeleteWorkloadIdentityPoolProviderKeyRequest": { - "description": "Request message for UndeleteWorkloadIdentityPoolProviderKey.", - "id": "UndeleteWorkloadIdentityPoolProviderKeyRequest", - "properties": {}, - "type": "object" - }, - "UndeleteWorkloadIdentityPoolProviderRequest": { - "description": "Request message for UndeleteWorkloadIdentityPoolProvider.", - "id": "UndeleteWorkloadIdentityPoolProviderRequest", - "properties": {}, - "type": "object" - }, - "UndeleteWorkloadIdentityPoolRequest": { - "description": "Request message for UndeleteWorkloadIdentityPool.", - "id": "UndeleteWorkloadIdentityPoolRequest", - "properties": {}, - "type": "object" - }, - "UploadServiceAccountKeyRequest": { - "description": "The service account key upload request.", - "id": "UploadServiceAccountKeyRequest", - "properties": { - "publicKeyData": { - "description": "The public key to associate with the service account. Must be an RSA public key that is wrapped in an X.509 v3 certificate. Include the first line, `-----BEGIN CERTIFICATE-----`, and the last line, `-----END CERTIFICATE-----`.", - "format": "byte", - "type": "string" - } - }, - "type": "object" - }, - "WorkforcePool": { - "description": "Represents a collection of external workforces. Provides namespaces for federated users that can be referenced in IAM policies.", - "id": "WorkforcePool", - "properties": { - "accessRestrictions": { - "$ref": "AccessRestrictions", - "description": "Optional. Configure access restrictions on the workforce pool users. This is an optional field. If specified web sign-in can be restricted to given set of services or programmatic sign-in can be disabled for pool users." - }, - "description": { - "description": "Optional. A description of the pool. Cannot exceed 256 characters.", - "type": "string" - }, - "disabled": { - "description": "Optional. Disables the workforce pool. You cannot use a disabled pool to exchange tokens, or use existing tokens to access resources. If the pool is re-enabled, existing tokens grant access again.", - "type": "boolean" - }, - "displayName": { - "description": "Optional. A display name for the pool. Cannot exceed 32 characters.", - "type": "string" - }, - "expireTime": { - "description": "Output only. Time after which the workforce pool will be permanently purged and cannot be recovered.", - "format": "google-datetime", - "readOnly": true, - "type": "string" - }, - "name": { - "description": "Identifier. The resource name of the pool. Format: `locations/{location}/workforcePools/{workforce_pool_id}`", - "type": "string" - }, - "parent": { - "description": "Immutable. The resource name of the parent. Format: `organizations/{org-id}`.", - "type": "string" - }, - "sessionDuration": { - "description": "Optional. Duration that the Google Cloud access tokens, console sign-in sessions, and `gcloud` sign-in sessions from this pool are valid. Must be greater than 15 minutes (900s) and less than 12 hours (43200s). If `session_duration` is not configured, minted credentials have a default duration of one hour (3600s). For SAML providers, the lifetime of the token is the minimum of the `session_duration` and the `SessionNotOnOrAfter` claim in the SAML assertion.", - "format": "google-duration", - "type": "string" - }, - "state": { - "description": "Output only. The state of the pool.", - "enum": [ - "STATE_UNSPECIFIED", - "ACTIVE", - "DELETED" - ], - "enumDescriptions": [ - "State unspecified.", - "The pool is active and may be used in Google Cloud policies.", - "The pool is soft-deleted. Soft-deleted pools are permanently deleted after approximately 30 days. You can restore a soft-deleted pool using UndeleteWorkforcePool. You cannot reuse the ID of a soft-deleted pool until it is permanently deleted. While a pool is deleted, you cannot use it to exchange tokens, or use existing tokens to access resources. If the pool is undeleted, existing tokens grant access again." - ], - "readOnly": true, - "type": "string" - } - }, - "type": "object" - }, - "WorkforcePoolProvider": { - "description": "A configuration for an external identity provider.", - "id": "WorkforcePoolProvider", - "properties": { - "attributeCondition": { - "description": "Optional. A [Common Expression Language](https://opensource.google/projects/cel) expression, in plain text, to restrict what otherwise valid authentication credentials issued by the provider should not be accepted. The expression must output a boolean representing whether to allow the federation. The following keywords may be referenced in the expressions: * `assertion`: JSON representing the authentication credential issued by the provider. * `google`: The Google attributes mapped from the assertion in the `attribute_mappings`. `google.profile_photo`, `google.display_name` and `google.posix_username` are not supported. * `attribute`: The custom attributes mapped from the assertion in the `attribute_mappings`. The maximum length of the attribute condition expression is 4096 characters. If unspecified, all valid authentication credentials will be accepted. The following example shows how to only allow credentials with a mapped `google.groups` value of `admins`: ``` \"'admins' in google.groups\" ```", - "type": "string" - }, - "attributeMapping": { - "additionalProperties": { - "type": "string" - }, - "description": "Required. Maps attributes from the authentication credentials issued by an external identity provider to Google Cloud attributes, such as `subject` and `segment`. Each key must be a string specifying the Google Cloud IAM attribute to map to. The following keys are supported: * `google.subject`: The principal IAM is authenticating. You can reference this value in IAM bindings. This is also the subject that appears in Cloud Logging logs. This is a required field and the mapped subject cannot exceed 127 bytes. * `google.groups`: Groups the authenticating user belongs to. You can grant groups access to resources using an IAM `principalSet` binding; access applies to all members of the group. * `google.display_name`: The name of the authenticated user. This is an optional field and the mapped display name cannot exceed 100 bytes. If not set, `google.subject` will be displayed instead. This attribute cannot be referenced in IAM bindings. * `google.profile_photo`: The URL that specifies the authenticated user's thumbnail photo. This is an optional field. When set, the image will be visible as the user's profile picture. If not set, a generic user icon will be displayed instead. This attribute cannot be referenced in IAM bindings. * `google.posix_username`: The Linux username used by OS Login. This is an optional field and the mapped POSIX username cannot exceed 32 characters. The key must match the regex `^a-zA-Z0-9._{0,31}$`. This attribute cannot be referenced in IAM bindings. You can also provide custom attributes by specifying `attribute.{custom_attribute}`, where {custom_attribute} is the name of the custom attribute to be mapped. You can define a maximum of 50 custom attributes. The maximum length of a mapped attribute key is 100 characters, and the key may only contain the characters `[a-z0-9_]`. You can reference these attributes in IAM policies to define fine-grained access for a workforce pool to Google Cloud resources. For example: * `google.subject`: `principal://iam.googleapis.com/locations/global/workforcePools/{pool}/subject/{value}` * `google.groups`: `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool}/group/{value}` * `attribute.{custom_attribute}`: `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool}/attribute.{custom_attribute}/{value}` Each value must be a [Common Expression Language] (https://opensource.google/projects/cel) function that maps an identity provider credential to the normalized attribute specified by the corresponding map key. You can use the `assertion` keyword in the expression to access a JSON representation of the authentication credential issued by the provider. The maximum length of an attribute mapping expression is 2048 characters. When evaluated, the total size of all mapped attributes must not exceed 16 KB. For OIDC providers, you must supply a custom mapping that includes the `google.subject` attribute. For example, the following maps the `sub` claim of the incoming credential to the `subject` attribute on a Google token: ``` {\"google.subject\": \"assertion.sub\"} ```", - "type": "object" - }, - "description": { - "description": "Optional. A description of the provider. Cannot exceed 256 characters.", - "type": "string" - }, - "detailedAuditLogging": { - "description": "Optional. If true, populates additional debug information in Cloud Audit Logs for this provider. Logged attribute mappings and values can be found in `sts.googleapis.com` data access logs. Default value is false.", - "type": "boolean" - }, - "disabled": { - "description": "Optional. Disables the workforce pool provider. You cannot use a disabled provider to exchange tokens. However, existing tokens still grant access.", - "type": "boolean" - }, - "displayName": { - "description": "Optional. A display name for the provider. Cannot exceed 32 characters.", - "type": "string" - }, - "expireTime": { - "description": "Output only. Time after which the workforce identity pool provider will be permanently purged and cannot be recovered.", - "format": "google-datetime", - "readOnly": true, - "type": "string" - }, - "extendedAttributesOauth2Client": { - "$ref": "GoogleIamAdminV1WorkforcePoolProviderExtraAttributesOAuth2Client", - "description": "Optional. The configuration for OAuth 2.0 client used to get the extended group memberships for user identities. Only the `AZURE_AD_GROUPS_ID` attribute type is supported. Extended groups supports a subset of Google Cloud services. When the user accesses these services, extended group memberships override the mapped `google.groups` attribute. Extended group memberships cannot be used in attribute mapping or attribute condition expressions. To keep extended group memberships up to date, extended groups are retrieved when the user signs in and at regular intervals during the user's active session. Each user identity in the workforce identity pool must map to a unique Microsoft Entra ID user." - }, - "extraAttributesOauth2Client": { - "$ref": "GoogleIamAdminV1WorkforcePoolProviderExtraAttributesOAuth2Client", - "description": "Optional. Defines the configuration for the OAuth 2.0 client that is used to get the additional user attributes in a separate backchannel call to the identity provider. This should be used when users can't get the required claims in authentication credentials. Currently, the OAuth 2.0 protocol is the only supported authorization method for this backchannel call." - }, - "name": { - "description": "Identifier. The resource name of the provider. Format: `locations/{location}/workforcePools/{workforce_pool_id}/providers/{provider_id}`", - "type": "string" - }, - "oidc": { - "$ref": "GoogleIamAdminV1WorkforcePoolProviderOidc", - "description": "An OpenID Connect 1.0 identity provider configuration." - }, - "saml": { - "$ref": "GoogleIamAdminV1WorkforcePoolProviderSaml", - "description": "A SAML identity provider configuration." - }, - "scimUsage": { - "description": "Optional. Gemini Enterprise only. Specifies whether the workforce identity pool provider uses SCIM-managed groups instead of the `google.groups` attribute mapping for authorization checks. The `scim_usage` and `extended_attributes_oauth2_client` fields are mutually exclusive. A request that enables both fields on the same workforce identity pool provider will produce an error.", - "enum": [ - "SCIM_USAGE_UNSPECIFIED", - "ENABLED_FOR_GROUPS" - ], - "enumDescriptions": [ - "Gemini Enterprise only. Do not use SCIM data.", - "Gemini Enterprise only. SCIM sync is enabled and SCIM-managed groups are used for authorization checks." - ], - "type": "string" - }, - "state": { - "description": "Output only. The state of the provider.", - "enum": [ - "STATE_UNSPECIFIED", - "ACTIVE", - "DELETED" - ], - "enumDescriptions": [ - "State unspecified.", - "The provider is active and may be used to validate authentication credentials.", - "The provider is soft-deleted. Soft-deleted providers are permanently deleted after approximately 30 days. You can restore a soft-deleted provider using UndeleteWorkforcePoolProvider." - ], - "readOnly": true, - "type": "string" - } - }, - "type": "object" - }, - "WorkforcePoolProviderKey": { - "description": "Represents a public key configuration for a Workforce Pool Provider. The key can be configured in your identity provider to encrypt SAML assertions. Google holds the corresponding private key, which it uses to decrypt encrypted tokens.", - "id": "WorkforcePoolProviderKey", - "properties": { - "expireTime": { - "description": "Output only. The time after which the key will be permanently deleted and cannot be recovered. Note that the key may get purged before this time if the total limit of keys per provider is exceeded.", - "format": "google-datetime", - "readOnly": true, - "type": "string" - }, - "keyData": { - "$ref": "KeyData", - "description": "Immutable. Public half of the asymmetric key." - }, - "name": { - "description": "Identifier. The resource name of the key. Format: `locations/{location}/workforcePools/{workforce_pool_id}/providers/{provider_id}/keys/{key_id}`", - "type": "string" - }, - "state": { - "description": "Output only. The state of the key.", - "enum": [ - "STATE_UNSPECIFIED", - "ACTIVE", - "DELETED" - ], - "enumDescriptions": [ - "State unspecified.", - "The key is active.", - "The key is soft-deleted. Soft-deleted keys are permanently deleted after approximately 30 days. You can restore a soft-deleted key using UndeleteWorkforcePoolProviderKey." - ], - "readOnly": true, - "type": "string" - }, - "use": { - "description": "Required. The purpose of the key.", - "enum": [ - "KEY_USE_UNSPECIFIED", - "ENCRYPTION" - ], - "enumDescriptions": [ - "KeyUse unspecified. Do not use. The purpose of the key must be specified.", - "The key is used for encryption." - ], - "type": "string" - } - }, - "type": "object" - }, - "WorkforcePoolProviderScimTenant": { - "description": "Gemini Enterprise only. Represents a SCIM tenant. Used for provisioning and managing identity data (such as Users and Groups) in cross-domain environments.", - "id": "WorkforcePoolProviderScimTenant", - "properties": { - "baseUri": { - "description": "Output only. Gemini Enterprise only. Represents the base URI as defined in [RFC 7644, Section 1.3](https://datatracker.ietf.org/doc/html/rfc7644#section-1.3). Clients must use this as the root address for managing resources under the tenant. Format: https://iamscim.googleapis.com/{version}/{tenant_id}/", - "readOnly": true, - "type": "string" - }, - "claimMapping": { - "additionalProperties": { - "type": "string" - }, - "description": "Required. Immutable. Gemini Enterprise only. Maps SCIM attributes to Google attributes. This mapping is used to associate the attributes synced via SCIM with the Google Cloud attributes used in IAM policies for Workforce Identity Federation. SCIM-managed user and group attributes are mapped to `google.subject` and `google.group` respectively. Each key must be a string specifying the Google Cloud IAM attribute to map to. The supported keys are as follows: * `google.subject`: The principal IAM is authenticating. You can reference this value in IAM bindings. This is also the subject that appears in Cloud Logging logs. This is a required field and the mapped subject cannot exceed 127 bytes. * `google.group`: Group the authenticating user belongs to. You can grant group access to resources using an IAM `principalSet` binding; access applies to all members of the group. Each value must be a [Common Expression Language] (https://opensource.google/projects/cel) expression that maps SCIM user or group attribute to the normalized attribute specified by the corresponding map key. Example: To map the SCIM user's `externalId` to `google.subject` and the SCIM group's `externalId` to `google.group`: ``` { \"google.subject\": \"user.externalId\", \"google.group\": \"group.externalId\" } ```", - "type": "object" - }, - "description": { - "description": "Optional. Gemini Enterprise only. The description of the SCIM tenant. Cannot exceed 256 characters.", - "type": "string" - }, - "displayName": { - "description": "Optional. Gemini Enterprise only. The display name of the SCIM tenant. Cannot exceed 32 characters.", - "type": "string" - }, - "name": { - "description": "Identifier. Gemini Enterprise only. The resource name of the SCIM Tenant. Format: `locations/{location}/workforcePools/{workforce_pool}/providers/ {workforce_pool_provider}/scimTenants/{scim_tenant}`", - "type": "string" - }, - "purgeTime": { - "description": "Output only. Gemini Enterprise only. The timestamp that represents the time when the SCIM tenant is purged.", - "format": "google-datetime", - "readOnly": true, - "type": "string" - }, - "serviceAgent": { - "description": "Output only. Service Agent created by SCIM Tenant API. SCIM tokens created under this tenant will be attached to this service agent.", - "readOnly": true, - "type": "string" - }, - "state": { - "description": "Output only. Gemini Enterprise only. The state of the tenant.", - "enum": [ - "STATE_UNSPECIFIED", - "ACTIVE", - "DELETED" - ], - "enumDescriptions": [ - "Gemini Enterprise only. State unspecified.", - "Gemini Enterprise only. The tenant is active and may be used to provision users and groups.", - "Gemini Enterprise only. The tenant is soft-deleted. Soft-deleted tenants are permanently deleted after approximately 30 days." - ], - "readOnly": true, - "type": "string" - } - }, - "type": "object" - }, - "WorkforcePoolProviderScimToken": { - "description": "Gemini Enterprise only. Represents a token for the WorkforcePoolProviderScimTenant. Used for authenticating SCIM provisioning requests.", - "id": "WorkforcePoolProviderScimToken", - "properties": { - "displayName": { - "description": "Optional. Gemini Enterprise only. The display name of the SCIM token. Cannot exceed 32 characters.", - "type": "string" - }, - "name": { - "description": "Identifier. Gemini Enterprise only. The resource name of the SCIM Token. Format: `locations/{location}/workforcePools/{workforce_pool}/providers/ {workforce_pool_provider}/scimTenants/{scim_tenant}/tokens/{token}`", - "type": "string" - }, - "securityToken": { - "description": "Output only. Gemini Enterprise only. The token string. Provide this to the IdP for authentication. Will be set only during creation.", - "readOnly": true, - "type": "string" - }, - "state": { - "description": "Output only. Gemini Enterprise only. The state of the token.", - "enum": [ - "STATE_UNSPECIFIED", - "ACTIVE", - "DELETED" - ], - "enumDescriptions": [ - "Gemini Enterprise only. State unspecified.", - "Gemini Enterprise only. The token is active and may be used to provision users and groups.", - "Gemini Enterprise only. The token is soft-deleted. Soft-deleted tokens are permanently deleted after approximately 30 days." - ], - "readOnly": true, - "type": "string" - } - }, - "type": "object" - }, - "WorkloadIdentityPool": { - "description": "Represents a collection of workload identities. You can define IAM policies to grant these identities access to Google Cloud resources.", - "id": "WorkloadIdentityPool", - "properties": { - "description": { - "description": "Optional. A description of the pool. Cannot exceed 256 characters.", - "type": "string" - }, - "disabled": { - "description": "Optional. Whether the pool is disabled. You cannot use a disabled pool to exchange tokens, or use existing tokens to access resources. If the pool is re-enabled, existing tokens grant access again.", - "type": "boolean" - }, - "displayName": { - "description": "Optional. A display name for the pool. Cannot exceed 32 characters.", - "type": "string" - }, - "expireTime": { - "description": "Output only. Time after which the workload identity pool will be permanently purged and cannot be recovered.", - "format": "google-datetime", - "readOnly": true, - "type": "string" - }, - "inlineCertificateIssuanceConfig": { - "$ref": "InlineCertificateIssuanceConfig", - "description": "Optional. Defines the Certificate Authority (CA) pool resources and configurations required for issuance and rotation of mTLS workload certificates." - }, - "inlineTrustConfig": { - "$ref": "InlineTrustConfig", - "description": "Optional. Represents config to add additional trusted trust domains." - }, - "mode": { - "description": "Immutable. The mode the pool is operating in.", - "enum": [ - "MODE_UNSPECIFIED", - "FEDERATION_ONLY", - "TRUST_DOMAIN", - "SYSTEM_TRUST_DOMAIN" - ], - "enumDescriptions": [ - "State unspecified. New pools should not use this mode. Pools with an unspecified mode will operate as if they are in federation-only mode.", - "Federation-only mode. FEDERATION_ONLY mode pools can only be used for federating external workload identities into Google Cloud. Unless otherwise noted, no structure or format constraints are applied to workload identities in a FEDERATION_ONLY mode pool, and you cannot create any resources within the pool besides providers.", - "Trust-domain mode. TRUST_DOMAIN mode pools can be used to assign identities to Google Cloud workloads. Identities within a TRUST_DOMAIN mode pool share the same root of trust. WorkloadIdentityPoolProviders cannot be created within trust-domain pools.", - "SYSTEM_TRUST_DOMAIN mode pools are managed by Google Cloud services. Neither WorkloadIdentityPoolNamespaces nor WorkloadIdentityPoolProviders can be created within SYSTEM_TRUST_DOMAIN mode pools. All identities within a SYSTEM_TRUST_DOMAIN mode pool are in one of the following formats: * `spiffe:///ns//sa/` * `spiffe:///resources//`" - ], - "type": "string" - }, - "name": { - "description": "Identifier. The resource name of the pool.", - "type": "string" - }, - "state": { - "description": "Output only. The state of the pool.", - "enum": [ - "STATE_UNSPECIFIED", - "ACTIVE", - "DELETED" - ], - "enumDescriptions": [ - "State unspecified.", - "The pool is active, and may be used in Google Cloud policies.", - "The pool is soft-deleted. Soft-deleted pools are permanently deleted after approximately 30 days. You can restore a soft-deleted pool using UndeleteWorkloadIdentityPool. You cannot reuse the ID of a soft-deleted pool until it is permanently deleted. While a pool is deleted, you cannot use it to exchange tokens, or use existing tokens to access resources. If the pool is undeleted, existing tokens grant access again." - ], - "readOnly": true, - "type": "string" - } - }, - "type": "object" - }, - "WorkloadIdentityPoolManagedIdentity": { - "description": "Represents a managed identity for a workload identity pool namespace.", - "id": "WorkloadIdentityPoolManagedIdentity", - "properties": { - "description": { - "description": "Optional. A description of the managed identity. Cannot exceed 256 characters.", - "type": "string" - }, - "disabled": { - "description": "Optional. Whether the managed identity is disabled. If disabled, credentials may no longer be issued for the identity, however existing credentials will still be accepted until they expire.", - "type": "boolean" - }, - "expireTime": { - "description": "Output only. Time after which the managed identity will be permanently purged and cannot be recovered.", - "format": "google-datetime", - "readOnly": true, - "type": "string" - }, - "name": { - "description": "Identifier. The resource name of the managed identity.", - "type": "string" - }, - "state": { - "description": "Output only. The state of the managed identity.", - "enum": [ - "STATE_UNSPECIFIED", - "ACTIVE", - "DELETED" - ], - "enumDescriptions": [ - "State unspecified.", - "The managed identity is active.", - "The managed identity is soft-deleted. Soft-deleted managed identities are permanently deleted after approximately 30 days. You can restore a soft-deleted managed identity using UndeleteWorkloadIdentityPoolManagedIdentity. You cannot reuse the ID of a soft-deleted managed identity until it is permanently deleted." - ], - "readOnly": true, - "type": "string" - } - }, - "type": "object" - }, - "WorkloadIdentityPoolNamespace": { - "description": "Represents a namespace for a workload identity pool. Namespaces are used to segment identities within the pool.", - "id": "WorkloadIdentityPoolNamespace", - "properties": { - "description": { - "description": "Optional. A description of the namespace. Cannot exceed 256 characters.", - "type": "string" - }, - "disabled": { - "description": "Optional. Whether the namespace is disabled. If disabled, credentials may no longer be issued for identities within this namespace, however existing credentials will still be accepted until they expire.", - "type": "boolean" - }, - "expireTime": { - "description": "Output only. Time after which the namespace will be permanently purged and cannot be recovered.", - "format": "google-datetime", - "readOnly": true, - "type": "string" - }, - "name": { - "description": "Identifier. The resource name of the namespace.", - "type": "string" - }, - "ownerService": { - "$ref": "OwnerService", - "description": "Output only. The Google Cloud service that owns this namespace.", - "readOnly": true - }, - "state": { - "description": "Output only. The state of the namespace.", - "enum": [ - "STATE_UNSPECIFIED", - "ACTIVE", - "DELETED" - ], - "enumDescriptions": [ - "State unspecified.", - "The namespace is active.", - "The namespace is soft-deleted. Soft-deleted namespaces are permanently deleted after approximately 30 days. You can restore a soft-deleted namespace using UndeleteWorkloadIdentityPoolNamespace. You cannot reuse the ID of a soft-deleted namespace until it is permanently deleted." - ], - "readOnly": true, - "type": "string" - } - }, - "type": "object" - }, - "WorkloadIdentityPoolOperationMetadata": { - "description": "Metadata for long-running WorkloadIdentityPool operations.", - "id": "WorkloadIdentityPoolOperationMetadata", - "properties": {}, - "type": "object" - }, - "WorkloadIdentityPoolProvider": { - "description": "A configuration for an external identity provider.", - "id": "WorkloadIdentityPoolProvider", - "properties": { - "attributeCondition": { - "description": "Optional. [A Common Expression Language](https://opensource.google/projects/cel) expression, in plain text, to restrict what otherwise valid authentication credentials issued by the provider should not be accepted. The expression must output a boolean representing whether to allow the federation. The following keywords may be referenced in the expressions: * `assertion`: JSON representing the authentication credential issued by the provider. * `google`: The Google attributes mapped from the assertion in the `attribute_mappings`. * `attribute`: The custom attributes mapped from the assertion in the `attribute_mappings`. The maximum length of the attribute condition expression is 4096 characters. If unspecified, all valid authentication credential are accepted. The following example shows how to only allow credentials with a mapped `google.groups` value of `admins`: ``` \"'admins' in google.groups\" ```", - "type": "string" - }, - "attributeMapping": { - "additionalProperties": { - "type": "string" - }, - "description": "Optional. Maps attributes from authentication credentials issued by an external identity provider to Google Cloud attributes, such as `subject` and `segment`. Each key must be a string specifying the Google Cloud IAM attribute to map to. The following keys are supported: * `google.subject`: The principal IAM is authenticating. You can reference this value in IAM bindings. This is also the subject that appears in Cloud Logging logs. Cannot exceed 127 bytes. * `google.groups`: Groups the external identity belongs to. You can grant groups access to resources using an IAM `principalSet` binding; access applies to all members of the group. You can also provide custom attributes by specifying `attribute.{custom_attribute}`, where `{custom_attribute}` is the name of the custom attribute to be mapped. You can define a maximum of 50 custom attributes. The maximum length of a mapped attribute key is 100 characters, and the key may only contain the characters [a-z0-9_]. You can reference these attributes in IAM policies to define fine-grained access for a workload to Google Cloud resources. For example: * `google.subject`: `principal://iam.googleapis.com/projects/{project}/locations/{location}/workloadIdentityPools/{pool}/subject/{value}` * `google.groups`: `principalSet://iam.googleapis.com/projects/{project}/locations/{location}/workloadIdentityPools/{pool}/group/{value}` * `attribute.{custom_attribute}`: `principalSet://iam.googleapis.com/projects/{project}/locations/{location}/workloadIdentityPools/{pool}/attribute.{custom_attribute}/{value}` Each value must be a [Common Expression Language] (https://opensource.google/projects/cel) function that maps an identity provider credential to the normalized attribute specified by the corresponding map key. You can use the `assertion` keyword in the expression to access a JSON representation of the authentication credential issued by the provider. The maximum length of an attribute mapping expression is 2048 characters. When evaluated, the total size of all mapped attributes must not exceed 8KB. For AWS providers, if no attribute mapping is defined, the following default mapping applies: ``` { \"google.subject\":\"assertion.arn\", \"attribute.aws_role\": \"assertion.arn.contains('assumed-role')\" \" ? assertion.arn.extract('{account_arn}assumed-role/')\" \" + 'assumed-role/'\" \" + assertion.arn.extract('assumed-role/{role_name}/')\" \" : assertion.arn\", } ``` If any custom attribute mappings are defined, they must include a mapping to the `google.subject` attribute. For OIDC providers, you must supply a custom mapping, which must include the `google.subject` attribute. For example, the following maps the `sub` claim of the incoming credential to the `subject` attribute on a Google token: ``` {\"google.subject\": \"assertion.sub\"} ```", - "type": "object" - }, - "aws": { - "$ref": "Aws", - "description": "An Amazon Web Services identity provider." - }, - "description": { - "description": "Optional. A description for the provider. Cannot exceed 256 characters.", - "type": "string" - }, - "disabled": { - "description": "Optional. Whether the provider is disabled. You cannot use a disabled provider to exchange tokens. However, existing tokens still grant access.", - "type": "boolean" - }, - "displayName": { - "description": "Optional. A display name for the provider. Cannot exceed 32 characters.", - "type": "string" - }, - "expireTime": { - "description": "Output only. Time after which the workload identity pool provider will be permanently purged and cannot be recovered.", - "format": "google-datetime", - "readOnly": true, - "type": "string" - }, - "name": { - "description": "Identifier. The resource name of the provider.", - "type": "string" - }, - "oidc": { - "$ref": "Oidc", - "description": "An OpenId Connect 1.0 identity provider." - }, - "saml": { - "$ref": "Saml", - "description": "An SAML 2.0 identity provider." - }, - "state": { - "description": "Output only. The state of the provider.", - "enum": [ - "STATE_UNSPECIFIED", - "ACTIVE", - "DELETED" - ], - "enumDescriptions": [ - "State unspecified.", - "The provider is active, and may be used to validate authentication credentials.", - "The provider is soft-deleted. Soft-deleted providers are permanently deleted after approximately 30 days. You can restore a soft-deleted provider using UndeleteWorkloadIdentityPoolProvider. You cannot reuse the ID of a soft-deleted provider until it is permanently deleted." - ], - "readOnly": true, - "type": "string" - }, - "x509": { - "$ref": "X509", - "description": "An X.509-type identity provider." - } - }, - "type": "object" - }, - "WorkloadIdentityPoolProviderKey": { - "description": "Represents a public key configuration for your workload identity pool provider. The key can be configured in your identity provider to encrypt the SAML assertions. Google holds the corresponding private key which it uses to decrypt encrypted tokens.", - "id": "WorkloadIdentityPoolProviderKey", - "properties": { - "expireTime": { - "description": "Output only. Time after which the key will be permanently purged and cannot be recovered. Note that the key may get purged before this timestamp if the total limit of keys per provider is crossed.", - "format": "google-datetime", - "readOnly": true, - "type": "string" - }, - "keyData": { - "$ref": "KeyData", - "description": "Immutable. Public half of the asymmetric key." - }, - "name": { - "description": "Identifier. The resource name of the key.", - "type": "string" - }, - "state": { - "description": "Output only. The state of the key.", - "enum": [ - "STATE_UNSPECIFIED", - "ACTIVE", - "DELETED" - ], - "enumDescriptions": [ - "State unspecified.", - "The key is active.", - "The key is soft-deleted. Soft-deleted keys are permanently deleted after approximately 30 days. You can restore a soft-deleted key using UndeleteWorkloadIdentityPoolProviderKey. While a key is deleted, you cannot use it during the federation." - ], - "readOnly": true, - "type": "string" - }, - "use": { - "description": "Required. The purpose of the key.", - "enum": [ - "KEY_USE_UNSPECIFIED", - "ENCRYPTION" - ], - "enumDescriptions": [ - "The key use is not known.", - "The public key is used for encryption purposes." - ], - "type": "string" - } - }, - "type": "object" - }, - "X509": { - "description": "An X.509-type identity provider represents a CA. It is trusted to assert a client identity if the client has a certificate that chains up to this CA.", - "id": "X509", - "properties": { - "trustStore": { - "$ref": "TrustStore", - "description": "Required. A TrustStore. Use this trust store as a wrapper to config the trust anchor and optional intermediate cas to help build the trust chain for the incoming end entity certificate. Follow the X.509 guidelines to define those PEM encoded certs. Only one trust store is currently supported." - } - }, - "type": "object" - } - }, - "servicePath": "", - "title": "Identity and Access Management (IAM) API", - "version": "v1", - "version_module": true -} \ No newline at end of file diff --git a/vendor/google.golang.org/api/iam/v1/iam-gen.go b/vendor/google.golang.org/api/iam/v1/iam-gen.go deleted file mode 100644 index 99846305e3..0000000000 --- a/vendor/google.golang.org/api/iam/v1/iam-gen.go +++ /dev/null @@ -1,20335 +0,0 @@ -// Copyright 2026 Google LLC. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// Code generated file. DO NOT EDIT. - -// Package iam provides access to the Identity and Access Management (IAM) API. -// -// For product documentation, see: https://cloud.google.com/iam/ -// -// # Library status -// -// These client libraries are officially supported by Google. However, this -// library is considered complete and is in maintenance mode. This means -// that we will address critical bugs and security issues but will not add -// any new features. -// -// When possible, we recommend using our newer -// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) -// that are still actively being worked and iterated on. -// -// # Creating a client -// -// Usage example: -// -// import "google.golang.org/api/iam/v1" -// ... -// ctx := context.Background() -// iamService, err := iam.NewService(ctx) -// -// In this example, Google Application Default Credentials are used for -// authentication. For information on how to create and obtain Application -// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. -// -// # Other authentication options -// -// To use an API key for authentication (note: some APIs do not support API -// keys), use [google.golang.org/api/option.WithAPIKey]: -// -// iamService, err := iam.NewService(ctx, option.WithAPIKey("AIza...")) -// -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth -// flow, use [google.golang.org/api/option.WithTokenSource]: -// -// config := &oauth2.Config{...} -// // ... -// token, err := config.Exchange(ctx, ...) -// iamService, err := iam.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) -// -// See [google.golang.org/api/option.ClientOption] for details on options. -package iam // import "google.golang.org/api/iam/v1" - -import ( - "bytes" - "context" - "encoding/json" - "errors" - "fmt" - "io" - "log/slog" - "net/http" - "net/url" - "strconv" - "strings" - - "github.com/googleapis/gax-go/v2/internallog" - googleapi "google.golang.org/api/googleapi" - internal "google.golang.org/api/internal" - gensupport "google.golang.org/api/internal/gensupport" - option "google.golang.org/api/option" - internaloption "google.golang.org/api/option/internaloption" - htransport "google.golang.org/api/transport/http" -) - -// Always reference these packages, just in case the auto-generated code -// below doesn't. -var _ = bytes.NewBuffer -var _ = strconv.Itoa -var _ = fmt.Sprintf -var _ = json.NewDecoder -var _ = io.Copy -var _ = url.Parse -var _ = gensupport.MarshalJSON -var _ = googleapi.Version -var _ = errors.New -var _ = strings.Replace -var _ = context.Canceled -var _ = internaloption.WithDefaultEndpoint -var _ = internal.Version -var _ = internallog.New - -const apiId = "iam:v1" -const apiName = "iam" -const apiVersion = "v1" -const basePath = "https://iam.googleapis.com/" -const basePathTemplate = "https://iam.UNIVERSE_DOMAIN/" -const mtlsBasePath = "https://iam.mtls.googleapis.com/" - -// OAuth2 scopes used by this API. -const ( - // See, edit, configure, and delete your Google Cloud data and see the email - // address for your Google Account. - CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform" -) - -// NewService creates a new Service. -func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) { - scopesOption := internaloption.WithDefaultScopes( - "https://www.googleapis.com/auth/cloud-platform", - ) - // NOTE: prepend, so we don't override user-specified scopes. - opts = append([]option.ClientOption{scopesOption}, opts...) - opts = append(opts, internaloption.WithDefaultEndpoint(basePath)) - opts = append(opts, internaloption.WithDefaultEndpointTemplate(basePathTemplate)) - opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath)) - opts = append(opts, internaloption.EnableNewAuthLibrary()) - client, endpoint, err := htransport.NewClient(ctx, opts...) - if err != nil { - return nil, err - } - s := &Service{client: client, BasePath: basePath, logger: internaloption.GetLogger(opts)} - s.IamPolicies = NewIamPoliciesService(s) - s.Locations = NewLocationsService(s) - s.Organizations = NewOrganizationsService(s) - s.Permissions = NewPermissionsService(s) - s.Projects = NewProjectsService(s) - s.Roles = NewRolesService(s) - if endpoint != "" { - s.BasePath = endpoint - } - return s, nil -} - -// New creates a new Service. It uses the provided http.Client for requests. -// -// Deprecated: please use NewService instead. -// To provide a custom HTTP client, use option.WithHTTPClient. -// If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead. -func New(client *http.Client) (*Service, error) { - if client == nil { - return nil, errors.New("client is nil") - } - return NewService(context.TODO(), option.WithHTTPClient(client)) -} - -type Service struct { - client *http.Client - logger *slog.Logger - BasePath string // API endpoint base URL - UserAgent string // optional additional User-Agent fragment - - IamPolicies *IamPoliciesService - - Locations *LocationsService - - Organizations *OrganizationsService - - Permissions *PermissionsService - - Projects *ProjectsService - - Roles *RolesService -} - -func (s *Service) userAgent() string { - if s.UserAgent == "" { - return googleapi.UserAgent - } - return googleapi.UserAgent + " " + s.UserAgent -} - -func NewIamPoliciesService(s *Service) *IamPoliciesService { - rs := &IamPoliciesService{s: s} - return rs -} - -type IamPoliciesService struct { - s *Service -} - -func NewLocationsService(s *Service) *LocationsService { - rs := &LocationsService{s: s} - rs.WorkforcePools = NewLocationsWorkforcePoolsService(s) - return rs -} - -type LocationsService struct { - s *Service - - WorkforcePools *LocationsWorkforcePoolsService -} - -func NewLocationsWorkforcePoolsService(s *Service) *LocationsWorkforcePoolsService { - rs := &LocationsWorkforcePoolsService{s: s} - rs.Operations = NewLocationsWorkforcePoolsOperationsService(s) - rs.Providers = NewLocationsWorkforcePoolsProvidersService(s) - rs.Subjects = NewLocationsWorkforcePoolsSubjectsService(s) - return rs -} - -type LocationsWorkforcePoolsService struct { - s *Service - - Operations *LocationsWorkforcePoolsOperationsService - - Providers *LocationsWorkforcePoolsProvidersService - - Subjects *LocationsWorkforcePoolsSubjectsService -} - -func NewLocationsWorkforcePoolsOperationsService(s *Service) *LocationsWorkforcePoolsOperationsService { - rs := &LocationsWorkforcePoolsOperationsService{s: s} - return rs -} - -type LocationsWorkforcePoolsOperationsService struct { - s *Service -} - -func NewLocationsWorkforcePoolsProvidersService(s *Service) *LocationsWorkforcePoolsProvidersService { - rs := &LocationsWorkforcePoolsProvidersService{s: s} - rs.Keys = NewLocationsWorkforcePoolsProvidersKeysService(s) - rs.Operations = NewLocationsWorkforcePoolsProvidersOperationsService(s) - rs.ScimTenants = NewLocationsWorkforcePoolsProvidersScimTenantsService(s) - return rs -} - -type LocationsWorkforcePoolsProvidersService struct { - s *Service - - Keys *LocationsWorkforcePoolsProvidersKeysService - - Operations *LocationsWorkforcePoolsProvidersOperationsService - - ScimTenants *LocationsWorkforcePoolsProvidersScimTenantsService -} - -func NewLocationsWorkforcePoolsProvidersKeysService(s *Service) *LocationsWorkforcePoolsProvidersKeysService { - rs := &LocationsWorkforcePoolsProvidersKeysService{s: s} - rs.Operations = NewLocationsWorkforcePoolsProvidersKeysOperationsService(s) - return rs -} - -type LocationsWorkforcePoolsProvidersKeysService struct { - s *Service - - Operations *LocationsWorkforcePoolsProvidersKeysOperationsService -} - -func NewLocationsWorkforcePoolsProvidersKeysOperationsService(s *Service) *LocationsWorkforcePoolsProvidersKeysOperationsService { - rs := &LocationsWorkforcePoolsProvidersKeysOperationsService{s: s} - return rs -} - -type LocationsWorkforcePoolsProvidersKeysOperationsService struct { - s *Service -} - -func NewLocationsWorkforcePoolsProvidersOperationsService(s *Service) *LocationsWorkforcePoolsProvidersOperationsService { - rs := &LocationsWorkforcePoolsProvidersOperationsService{s: s} - return rs -} - -type LocationsWorkforcePoolsProvidersOperationsService struct { - s *Service -} - -func NewLocationsWorkforcePoolsProvidersScimTenantsService(s *Service) *LocationsWorkforcePoolsProvidersScimTenantsService { - rs := &LocationsWorkforcePoolsProvidersScimTenantsService{s: s} - rs.Tokens = NewLocationsWorkforcePoolsProvidersScimTenantsTokensService(s) - return rs -} - -type LocationsWorkforcePoolsProvidersScimTenantsService struct { - s *Service - - Tokens *LocationsWorkforcePoolsProvidersScimTenantsTokensService -} - -func NewLocationsWorkforcePoolsProvidersScimTenantsTokensService(s *Service) *LocationsWorkforcePoolsProvidersScimTenantsTokensService { - rs := &LocationsWorkforcePoolsProvidersScimTenantsTokensService{s: s} - return rs -} - -type LocationsWorkforcePoolsProvidersScimTenantsTokensService struct { - s *Service -} - -func NewLocationsWorkforcePoolsSubjectsService(s *Service) *LocationsWorkforcePoolsSubjectsService { - rs := &LocationsWorkforcePoolsSubjectsService{s: s} - rs.Operations = NewLocationsWorkforcePoolsSubjectsOperationsService(s) - return rs -} - -type LocationsWorkforcePoolsSubjectsService struct { - s *Service - - Operations *LocationsWorkforcePoolsSubjectsOperationsService -} - -func NewLocationsWorkforcePoolsSubjectsOperationsService(s *Service) *LocationsWorkforcePoolsSubjectsOperationsService { - rs := &LocationsWorkforcePoolsSubjectsOperationsService{s: s} - return rs -} - -type LocationsWorkforcePoolsSubjectsOperationsService struct { - s *Service -} - -func NewOrganizationsService(s *Service) *OrganizationsService { - rs := &OrganizationsService{s: s} - rs.Roles = NewOrganizationsRolesService(s) - return rs -} - -type OrganizationsService struct { - s *Service - - Roles *OrganizationsRolesService -} - -func NewOrganizationsRolesService(s *Service) *OrganizationsRolesService { - rs := &OrganizationsRolesService{s: s} - return rs -} - -type OrganizationsRolesService struct { - s *Service -} - -func NewPermissionsService(s *Service) *PermissionsService { - rs := &PermissionsService{s: s} - return rs -} - -type PermissionsService struct { - s *Service -} - -func NewProjectsService(s *Service) *ProjectsService { - rs := &ProjectsService{s: s} - rs.Locations = NewProjectsLocationsService(s) - rs.Roles = NewProjectsRolesService(s) - rs.ServiceAccounts = NewProjectsServiceAccountsService(s) - return rs -} - -type ProjectsService struct { - s *Service - - Locations *ProjectsLocationsService - - Roles *ProjectsRolesService - - ServiceAccounts *ProjectsServiceAccountsService -} - -func NewProjectsLocationsService(s *Service) *ProjectsLocationsService { - rs := &ProjectsLocationsService{s: s} - rs.OauthClients = NewProjectsLocationsOauthClientsService(s) - rs.WorkloadIdentityPools = NewProjectsLocationsWorkloadIdentityPoolsService(s) - return rs -} - -type ProjectsLocationsService struct { - s *Service - - OauthClients *ProjectsLocationsOauthClientsService - - WorkloadIdentityPools *ProjectsLocationsWorkloadIdentityPoolsService -} - -func NewProjectsLocationsOauthClientsService(s *Service) *ProjectsLocationsOauthClientsService { - rs := &ProjectsLocationsOauthClientsService{s: s} - rs.Credentials = NewProjectsLocationsOauthClientsCredentialsService(s) - return rs -} - -type ProjectsLocationsOauthClientsService struct { - s *Service - - Credentials *ProjectsLocationsOauthClientsCredentialsService -} - -func NewProjectsLocationsOauthClientsCredentialsService(s *Service) *ProjectsLocationsOauthClientsCredentialsService { - rs := &ProjectsLocationsOauthClientsCredentialsService{s: s} - return rs -} - -type ProjectsLocationsOauthClientsCredentialsService struct { - s *Service -} - -func NewProjectsLocationsWorkloadIdentityPoolsService(s *Service) *ProjectsLocationsWorkloadIdentityPoolsService { - rs := &ProjectsLocationsWorkloadIdentityPoolsService{s: s} - rs.Namespaces = NewProjectsLocationsWorkloadIdentityPoolsNamespacesService(s) - rs.Operations = NewProjectsLocationsWorkloadIdentityPoolsOperationsService(s) - rs.Providers = NewProjectsLocationsWorkloadIdentityPoolsProvidersService(s) - return rs -} - -type ProjectsLocationsWorkloadIdentityPoolsService struct { - s *Service - - Namespaces *ProjectsLocationsWorkloadIdentityPoolsNamespacesService - - Operations *ProjectsLocationsWorkloadIdentityPoolsOperationsService - - Providers *ProjectsLocationsWorkloadIdentityPoolsProvidersService -} - -func NewProjectsLocationsWorkloadIdentityPoolsNamespacesService(s *Service) *ProjectsLocationsWorkloadIdentityPoolsNamespacesService { - rs := &ProjectsLocationsWorkloadIdentityPoolsNamespacesService{s: s} - rs.ManagedIdentities = NewProjectsLocationsWorkloadIdentityPoolsNamespacesManagedIdentitiesService(s) - rs.Operations = NewProjectsLocationsWorkloadIdentityPoolsNamespacesOperationsService(s) - return rs -} - -type ProjectsLocationsWorkloadIdentityPoolsNamespacesService struct { - s *Service - - ManagedIdentities *ProjectsLocationsWorkloadIdentityPoolsNamespacesManagedIdentitiesService - - Operations *ProjectsLocationsWorkloadIdentityPoolsNamespacesOperationsService -} - -func NewProjectsLocationsWorkloadIdentityPoolsNamespacesManagedIdentitiesService(s *Service) *ProjectsLocationsWorkloadIdentityPoolsNamespacesManagedIdentitiesService { - rs := &ProjectsLocationsWorkloadIdentityPoolsNamespacesManagedIdentitiesService{s: s} - rs.Operations = NewProjectsLocationsWorkloadIdentityPoolsNamespacesManagedIdentitiesOperationsService(s) - rs.WorkloadSources = NewProjectsLocationsWorkloadIdentityPoolsNamespacesManagedIdentitiesWorkloadSourcesService(s) - return rs -} - -type ProjectsLocationsWorkloadIdentityPoolsNamespacesManagedIdentitiesService struct { - s *Service - - Operations *ProjectsLocationsWorkloadIdentityPoolsNamespacesManagedIdentitiesOperationsService - - WorkloadSources *ProjectsLocationsWorkloadIdentityPoolsNamespacesManagedIdentitiesWorkloadSourcesService -} - -func NewProjectsLocationsWorkloadIdentityPoolsNamespacesManagedIdentitiesOperationsService(s *Service) *ProjectsLocationsWorkloadIdentityPoolsNamespacesManagedIdentitiesOperationsService { - rs := &ProjectsLocationsWorkloadIdentityPoolsNamespacesManagedIdentitiesOperationsService{s: s} - return rs -} - -type ProjectsLocationsWorkloadIdentityPoolsNamespacesManagedIdentitiesOperationsService struct { - s *Service -} - -func NewProjectsLocationsWorkloadIdentityPoolsNamespacesManagedIdentitiesWorkloadSourcesService(s *Service) *ProjectsLocationsWorkloadIdentityPoolsNamespacesManagedIdentitiesWorkloadSourcesService { - rs := &ProjectsLocationsWorkloadIdentityPoolsNamespacesManagedIdentitiesWorkloadSourcesService{s: s} - rs.Operations = NewProjectsLocationsWorkloadIdentityPoolsNamespacesManagedIdentitiesWorkloadSourcesOperationsService(s) - return rs -} - -type ProjectsLocationsWorkloadIdentityPoolsNamespacesManagedIdentitiesWorkloadSourcesService struct { - s *Service - - Operations *ProjectsLocationsWorkloadIdentityPoolsNamespacesManagedIdentitiesWorkloadSourcesOperationsService -} - -func NewProjectsLocationsWorkloadIdentityPoolsNamespacesManagedIdentitiesWorkloadSourcesOperationsService(s *Service) *ProjectsLocationsWorkloadIdentityPoolsNamespacesManagedIdentitiesWorkloadSourcesOperationsService { - rs := &ProjectsLocationsWorkloadIdentityPoolsNamespacesManagedIdentitiesWorkloadSourcesOperationsService{s: s} - return rs -} - -type ProjectsLocationsWorkloadIdentityPoolsNamespacesManagedIdentitiesWorkloadSourcesOperationsService struct { - s *Service -} - -func NewProjectsLocationsWorkloadIdentityPoolsNamespacesOperationsService(s *Service) *ProjectsLocationsWorkloadIdentityPoolsNamespacesOperationsService { - rs := &ProjectsLocationsWorkloadIdentityPoolsNamespacesOperationsService{s: s} - return rs -} - -type ProjectsLocationsWorkloadIdentityPoolsNamespacesOperationsService struct { - s *Service -} - -func NewProjectsLocationsWorkloadIdentityPoolsOperationsService(s *Service) *ProjectsLocationsWorkloadIdentityPoolsOperationsService { - rs := &ProjectsLocationsWorkloadIdentityPoolsOperationsService{s: s} - return rs -} - -type ProjectsLocationsWorkloadIdentityPoolsOperationsService struct { - s *Service -} - -func NewProjectsLocationsWorkloadIdentityPoolsProvidersService(s *Service) *ProjectsLocationsWorkloadIdentityPoolsProvidersService { - rs := &ProjectsLocationsWorkloadIdentityPoolsProvidersService{s: s} - rs.Keys = NewProjectsLocationsWorkloadIdentityPoolsProvidersKeysService(s) - rs.Operations = NewProjectsLocationsWorkloadIdentityPoolsProvidersOperationsService(s) - return rs -} - -type ProjectsLocationsWorkloadIdentityPoolsProvidersService struct { - s *Service - - Keys *ProjectsLocationsWorkloadIdentityPoolsProvidersKeysService - - Operations *ProjectsLocationsWorkloadIdentityPoolsProvidersOperationsService -} - -func NewProjectsLocationsWorkloadIdentityPoolsProvidersKeysService(s *Service) *ProjectsLocationsWorkloadIdentityPoolsProvidersKeysService { - rs := &ProjectsLocationsWorkloadIdentityPoolsProvidersKeysService{s: s} - rs.Operations = NewProjectsLocationsWorkloadIdentityPoolsProvidersKeysOperationsService(s) - return rs -} - -type ProjectsLocationsWorkloadIdentityPoolsProvidersKeysService struct { - s *Service - - Operations *ProjectsLocationsWorkloadIdentityPoolsProvidersKeysOperationsService -} - -func NewProjectsLocationsWorkloadIdentityPoolsProvidersKeysOperationsService(s *Service) *ProjectsLocationsWorkloadIdentityPoolsProvidersKeysOperationsService { - rs := &ProjectsLocationsWorkloadIdentityPoolsProvidersKeysOperationsService{s: s} - return rs -} - -type ProjectsLocationsWorkloadIdentityPoolsProvidersKeysOperationsService struct { - s *Service -} - -func NewProjectsLocationsWorkloadIdentityPoolsProvidersOperationsService(s *Service) *ProjectsLocationsWorkloadIdentityPoolsProvidersOperationsService { - rs := &ProjectsLocationsWorkloadIdentityPoolsProvidersOperationsService{s: s} - return rs -} - -type ProjectsLocationsWorkloadIdentityPoolsProvidersOperationsService struct { - s *Service -} - -func NewProjectsRolesService(s *Service) *ProjectsRolesService { - rs := &ProjectsRolesService{s: s} - return rs -} - -type ProjectsRolesService struct { - s *Service -} - -func NewProjectsServiceAccountsService(s *Service) *ProjectsServiceAccountsService { - rs := &ProjectsServiceAccountsService{s: s} - rs.Keys = NewProjectsServiceAccountsKeysService(s) - return rs -} - -type ProjectsServiceAccountsService struct { - s *Service - - Keys *ProjectsServiceAccountsKeysService -} - -func NewProjectsServiceAccountsKeysService(s *Service) *ProjectsServiceAccountsKeysService { - rs := &ProjectsServiceAccountsKeysService{s: s} - return rs -} - -type ProjectsServiceAccountsKeysService struct { - s *Service -} - -func NewRolesService(s *Service) *RolesService { - rs := &RolesService{s: s} - return rs -} - -type RolesService struct { - s *Service -} - -// AccessRestrictions: Access related restrictions on the workforce pool. -type AccessRestrictions struct { - // AllowedServices: Optional. Immutable. Services allowed for web sign-in with - // the workforce pool. If not set by default there are no restrictions. - AllowedServices []*ServiceConfig `json:"allowedServices,omitempty"` - // DisableProgrammaticSignin: Optional. Disable programmatic sign-in by - // disabling token issue via the Security Token API endpoint. See [Security - // Token Service API] (https://cloud.google.com/iam/docs/reference/sts/rest). - DisableProgrammaticSignin bool `json:"disableProgrammaticSignin,omitempty"` - // ForceSendFields is a list of field names (e.g. "AllowedServices") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AllowedServices") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s AccessRestrictions) MarshalJSON() ([]byte, error) { - type NoMethod AccessRestrictions - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// AddAttestationRuleRequest: Request message for AddAttestationRule. -type AddAttestationRuleRequest struct { - // AttestationRule: Required. The attestation rule to be added. - AttestationRule *AttestationRule `json:"attestationRule,omitempty"` - // ForceSendFields is a list of field names (e.g. "AttestationRule") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AttestationRule") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s AddAttestationRuleRequest) MarshalJSON() ([]byte, error) { - type NoMethod AddAttestationRuleRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// AdminAuditData: Audit log information specific to Cloud IAM admin APIs. This -// message is serialized as an `Any` type in the `ServiceData` message of an -// `AuditLog` message. -type AdminAuditData struct { - // PermissionDelta: The permission_delta when when creating or updating a Role. - PermissionDelta *PermissionDelta `json:"permissionDelta,omitempty"` - // ForceSendFields is a list of field names (e.g. "PermissionDelta") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "PermissionDelta") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s AdminAuditData) MarshalJSON() ([]byte, error) { - type NoMethod AdminAuditData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// AttestationRule: Defines which workloads can receive an identity within a -// pool. When an AttestationRule is defined under a managed identity, matching -// workloads may receive that identity. -type AttestationRule struct { - // GoogleCloudResource: Optional. A single workload operating on Google Cloud. - // For example: - // `//compute.googleapis.com/projects/123/uid/zones/us-central1-a/instances/1234 - // 5`. - GoogleCloudResource string `json:"googleCloudResource,omitempty"` - // ForceSendFields is a list of field names (e.g. "GoogleCloudResource") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "GoogleCloudResource") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s AttestationRule) MarshalJSON() ([]byte, error) { - type NoMethod AttestationRule - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// AuditConfig: Specifies the audit configuration for a service. The -// configuration determines which permission types are logged, and what -// identities, if any, are exempted from logging. An AuditConfig must have one -// or more AuditLogConfigs. If there are AuditConfigs for both `allServices` -// and a specific service, the union of the two AuditConfigs is used for that -// service: the log_types specified in each AuditConfig are enabled, and the -// exempted_members in each AuditLogConfig are exempted. Example Policy with -// multiple AuditConfigs: { "audit_configs": [ { "service": "allServices", -// "audit_log_configs": [ { "log_type": "DATA_READ", "exempted_members": [ -// "user:jose@example.com" ] }, { "log_type": "DATA_WRITE" }, { "log_type": -// "ADMIN_READ" } ] }, { "service": "sampleservice.googleapis.com", -// "audit_log_configs": [ { "log_type": "DATA_READ" }, { "log_type": -// "DATA_WRITE", "exempted_members": [ "user:aliya@example.com" ] } ] } ] } For -// sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ -// logging. It also exempts `jose@example.com` from DATA_READ logging, and -// `aliya@example.com` from DATA_WRITE logging. -type AuditConfig struct { - // AuditLogConfigs: The configuration for logging of each type of permission. - AuditLogConfigs []*AuditLogConfig `json:"auditLogConfigs,omitempty"` - // Service: Specifies a service that will be enabled for audit logging. For - // example, `storage.googleapis.com`, `cloudsql.googleapis.com`. `allServices` - // is a special value that covers all services. - Service string `json:"service,omitempty"` - // ForceSendFields is a list of field names (e.g. "AuditLogConfigs") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AuditLogConfigs") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s AuditConfig) MarshalJSON() ([]byte, error) { - type NoMethod AuditConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// AuditData: Audit log information specific to Cloud IAM. This message is -// serialized as an `Any` type in the `ServiceData` message of an `AuditLog` -// message. -type AuditData struct { - // PolicyDelta: Policy delta between the original policy and the newly set - // policy. - PolicyDelta *PolicyDelta `json:"policyDelta,omitempty"` - // ForceSendFields is a list of field names (e.g. "PolicyDelta") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "PolicyDelta") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s AuditData) MarshalJSON() ([]byte, error) { - type NoMethod AuditData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// AuditLogConfig: Provides the configuration for logging a type of -// permissions. Example: { "audit_log_configs": [ { "log_type": "DATA_READ", -// "exempted_members": [ "user:jose@example.com" ] }, { "log_type": -// "DATA_WRITE" } ] } This enables 'DATA_READ' and 'DATA_WRITE' logging, while -// exempting jose@example.com from DATA_READ logging. -type AuditLogConfig struct { - // ExemptedMembers: Specifies the identities that do not cause logging for this - // type of permission. Follows the same format of Binding.members. - ExemptedMembers []string `json:"exemptedMembers,omitempty"` - // LogType: The log type that this config enables. - // - // Possible values: - // "LOG_TYPE_UNSPECIFIED" - Default case. Should never be this. - // "ADMIN_READ" - Admin reads. Example: CloudIAM getIamPolicy - // "DATA_WRITE" - Data writes. Example: CloudSQL Users create - // "DATA_READ" - Data reads. Example: CloudSQL Users list - LogType string `json:"logType,omitempty"` - // ForceSendFields is a list of field names (e.g. "ExemptedMembers") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ExemptedMembers") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s AuditLogConfig) MarshalJSON() ([]byte, error) { - type NoMethod AuditLogConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// AuditableService: Contains information about an auditable service. -type AuditableService struct { - // Name: Public name of the service. For example, the service name for IAM is - // 'iam.googleapis.com'. - Name string `json:"name,omitempty"` - // ForceSendFields is a list of field names (e.g. "Name") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Name") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s AuditableService) MarshalJSON() ([]byte, error) { - type NoMethod AuditableService - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// Aws: Represents an Amazon Web Services identity provider. -type Aws struct { - // AccountId: Required. The AWS account ID. - AccountId string `json:"accountId,omitempty"` - // ForceSendFields is a list of field names (e.g. "AccountId") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AccountId") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s Aws) MarshalJSON() ([]byte, error) { - type NoMethod Aws - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// Binding: Associates `members`, or principals, with a `role`. -type Binding struct { - // Condition: The condition that is associated with this binding. If the - // condition evaluates to `true`, then this binding applies to the current - // request. If the condition evaluates to `false`, then this binding does not - // apply to the current request. However, a different role binding might grant - // the same role to one or more of the principals in this binding. To learn - // which resources support conditions in their IAM policies, see the IAM - // documentation - // (https://cloud.google.com/iam/help/conditions/resource-policies). - Condition *Expr `json:"condition,omitempty"` - // Members: Specifies the principals requesting access for a Google Cloud - // resource. `members` can have the following values: * `allUsers`: A special - // identifier that represents anyone who is on the internet; with or without a - // Google account. * `allAuthenticatedUsers`: A special identifier that - // represents anyone who is authenticated with a Google account or a service - // account. Does not include identities that come from external identity - // providers (IdPs) through identity federation. * `user:{emailid}`: An email - // address that represents a specific Google account. For example, - // `alice@example.com` . * `serviceAccount:{emailid}`: An email address that - // represents a Google service account. For example, - // `my-other-app@appspot.gserviceaccount.com`. * - // `serviceAccount:{projectid}.svc.id.goog[{namespace}/{kubernetes-sa}]`: An - // identifier for a Kubernetes service account - // (https://cloud.google.com/kubernetes-engine/docs/how-to/kubernetes-service-accounts). - // For example, `my-project.svc.id.goog[my-namespace/my-kubernetes-sa]`. * - // `group:{emailid}`: An email address that represents a Google group. For - // example, `admins@example.com`. * `domain:{domain}`: The G Suite domain - // (primary) that represents all the users of that domain. For example, - // `google.com` or `example.com`. * - // `principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/sub - // ject/{subject_attribute_value}`: A single identity in a workforce identity - // pool. * - // `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/ - // group/{group_id}`: All workforce identities in a group. * - // `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/ - // attribute.{attribute_name}/{attribute_value}`: All workforce identities with - // a specific attribute value. * - // `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/ - // *`: All identities in a workforce identity pool. * - // `principal://iam.googleapis.com/projects/{project_number}/locations/global/wo - // rkloadIdentityPools/{pool_id}/subject/{subject_attribute_value}`: A single - // identity in a workload identity pool. * - // `principalSet://iam.googleapis.com/projects/{project_number}/locations/global - // /workloadIdentityPools/{pool_id}/group/{group_id}`: A workload identity pool - // group. * - // `principalSet://iam.googleapis.com/projects/{project_number}/locations/global - // /workloadIdentityPools/{pool_id}/attribute.{attribute_name}/{attribute_value} - // `: All identities in a workload identity pool with a certain attribute. * - // `principalSet://iam.googleapis.com/projects/{project_number}/locations/global - // /workloadIdentityPools/{pool_id}/*`: All identities in a workload identity - // pool. * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus - // unique identifier) representing a user that has been recently deleted. For - // example, `alice@example.com?uid=123456789012345678901`. If the user is - // recovered, this value reverts to `user:{emailid}` and the recovered user - // retains the role in the binding. * - // `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus - // unique identifier) representing a service account that has been recently - // deleted. For example, - // `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. If the - // service account is undeleted, this value reverts to - // `serviceAccount:{emailid}` and the undeleted service account retains the - // role in the binding. * `deleted:group:{emailid}?uid={uniqueid}`: An email - // address (plus unique identifier) representing a Google group that has been - // recently deleted. For example, - // `admins@example.com?uid=123456789012345678901`. If the group is recovered, - // this value reverts to `group:{emailid}` and the recovered group retains the - // role in the binding. * - // `deleted:principal://iam.googleapis.com/locations/global/workforcePools/{pool - // _id}/subject/{subject_attribute_value}`: Deleted single identity in a - // workforce identity pool. For example, - // `deleted:principal://iam.googleapis.com/locations/global/workforcePools/my-po - // ol-id/subject/my-subject-attribute-value`. - Members []string `json:"members,omitempty"` - // Role: Role that is assigned to the list of `members`, or principals. For - // example, `roles/viewer`, `roles/editor`, or `roles/owner`. For an overview - // of the IAM roles and permissions, see the IAM documentation - // (https://cloud.google.com/iam/docs/roles-overview). For a list of the - // available pre-defined roles, see here - // (https://cloud.google.com/iam/docs/understanding-roles). - Role string `json:"role,omitempty"` - // ForceSendFields is a list of field names (e.g. "Condition") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Condition") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s Binding) MarshalJSON() ([]byte, error) { - type NoMethod Binding - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// BindingDelta: One delta entry for Binding. Each individual change (only one -// member in each entry) to a binding will be a separate entry. -type BindingDelta struct { - // Action: The action that was performed on a Binding. Required - // - // Possible values: - // "ACTION_UNSPECIFIED" - Unspecified. - // "ADD" - Addition of a Binding. - // "REMOVE" - Removal of a Binding. - Action string `json:"action,omitempty"` - // Condition: The condition that is associated with this binding. - Condition *Expr `json:"condition,omitempty"` - // Member: A single identity requesting access for a Google Cloud resource. - // Follows the same format of Binding.members. Required - Member string `json:"member,omitempty"` - // Role: Role that is assigned to `members`. For example, `roles/viewer`, - // `roles/editor`, or `roles/owner`. Required - Role string `json:"role,omitempty"` - // ForceSendFields is a list of field names (e.g. "Action") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Action") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s BindingDelta) MarshalJSON() ([]byte, error) { - type NoMethod BindingDelta - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// CreateRoleRequest: The request to create a new role. -type CreateRoleRequest struct { - // Role: The Role resource to create. - Role *Role `json:"role,omitempty"` - // RoleId: The role ID to use for this role. A role ID may contain alphanumeric - // characters, underscores (`_`), and periods (`.`). It must contain a minimum - // of 3 characters and a maximum of 64 characters. - RoleId string `json:"roleId,omitempty"` - // ForceSendFields is a list of field names (e.g. "Role") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Role") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s CreateRoleRequest) MarshalJSON() ([]byte, error) { - type NoMethod CreateRoleRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// CreateServiceAccountKeyRequest: The service account key create request. -type CreateServiceAccountKeyRequest struct { - // KeyAlgorithm: Which type of key and algorithm to use for the key. The - // default is currently a 2K RSA key. However this may change in the future. - // - // Possible values: - // "KEY_ALG_UNSPECIFIED" - An unspecified key algorithm. - // "KEY_ALG_RSA_1024" - 1k RSA Key. - // "KEY_ALG_RSA_2048" - 2k RSA Key. - KeyAlgorithm string `json:"keyAlgorithm,omitempty"` - // PrivateKeyType: The output format of the private key. The default value is - // `TYPE_GOOGLE_CREDENTIALS_FILE`, which is the Google Credentials File format. - // - // Possible values: - // "TYPE_UNSPECIFIED" - Unspecified. Equivalent to - // `TYPE_GOOGLE_CREDENTIALS_FILE`. - // "TYPE_PKCS12_FILE" - PKCS12 format. The password for the PKCS12 file is - // `notasecret`. For more information, see https://tools.ietf.org/html/rfc7292. - // "TYPE_GOOGLE_CREDENTIALS_FILE" - Google Credentials File format. - PrivateKeyType string `json:"privateKeyType,omitempty"` - // ForceSendFields is a list of field names (e.g. "KeyAlgorithm") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "KeyAlgorithm") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s CreateServiceAccountKeyRequest) MarshalJSON() ([]byte, error) { - type NoMethod CreateServiceAccountKeyRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// CreateServiceAccountRequest: The service account create request. -type CreateServiceAccountRequest struct { - // AccountId: Required. The account id that is used to generate the service - // account email address and a stable unique id. It is unique within a project, - // must be 6-30 characters long, and match the regular expression - // `[a-z]([-a-z0-9]*[a-z0-9])` to comply with RFC1035. - AccountId string `json:"accountId,omitempty"` - // ServiceAccount: The ServiceAccount resource to create. Currently, only the - // following values are user assignable: `display_name` and `description`. - ServiceAccount *ServiceAccount `json:"serviceAccount,omitempty"` - // ForceSendFields is a list of field names (e.g. "AccountId") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AccountId") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s CreateServiceAccountRequest) MarshalJSON() ([]byte, error) { - type NoMethod CreateServiceAccountRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// DisableServiceAccountKeyRequest: The service account key disable request. -type DisableServiceAccountKeyRequest struct { - // ExtendedStatusMessage: Optional. Usable by internal google services only. An - // extended_status_message can be used to include additional information about - // the key, such as its private key data being exposed on a public repository - // like GitHub. - ExtendedStatusMessage string `json:"extendedStatusMessage,omitempty"` - // ServiceAccountKeyDisableReason: Optional. Describes the reason this key is - // being disabled. If unspecified, the default value of - // SERVICE_ACCOUNT_KEY_DISABLE_REASON_USER_INITIATED will be used. - // - // Possible values: - // "SERVICE_ACCOUNT_KEY_DISABLE_REASON_UNSPECIFIED" - Unspecified disable - // reason - // "SERVICE_ACCOUNT_KEY_DISABLE_REASON_USER_INITIATED" - Disabled by the user - // "SERVICE_ACCOUNT_KEY_DISABLE_REASON_EXPOSED" - Google detected this - // Service Account external key's private key data as exposed, typically in a - // public repository on GitHub or similar. - // "SERVICE_ACCOUNT_KEY_DISABLE_REASON_COMPROMISE_DETECTED" - This service - // account external key was detected as compromised and used by an attacker. - ServiceAccountKeyDisableReason string `json:"serviceAccountKeyDisableReason,omitempty"` - // ForceSendFields is a list of field names (e.g. "ExtendedStatusMessage") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ExtendedStatusMessage") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s DisableServiceAccountKeyRequest) MarshalJSON() ([]byte, error) { - type NoMethod DisableServiceAccountKeyRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// DisableServiceAccountRequest: The service account disable request. -type DisableServiceAccountRequest struct { -} - -// Empty: A generic empty message that you can re-use to avoid defining -// duplicated empty messages in your APIs. A typical example is to use it as -// the request or the response type of an API method. For instance: service Foo -// { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } -type Empty struct { - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` -} - -// EnableServiceAccountKeyRequest: The service account key enable request. -type EnableServiceAccountKeyRequest struct { -} - -// EnableServiceAccountRequest: The service account enable request. -type EnableServiceAccountRequest struct { -} - -// Expr: Represents a textual expression in the Common Expression Language -// (CEL) syntax. CEL is a C-like expression language. The syntax and semantics -// of CEL are documented at https://github.com/google/cel-spec. Example -// (Comparison): title: "Summary size limit" description: "Determines if a -// summary is less than 100 chars" expression: "document.summary.size() < 100" -// Example (Equality): title: "Requestor is owner" description: "Determines if -// requestor is the document owner" expression: "document.owner == -// request.auth.claims.email" Example (Logic): title: "Public documents" -// description: "Determine whether the document should be publicly visible" -// expression: "document.type != 'private' && document.type != 'internal'" -// Example (Data Manipulation): title: "Notification string" description: -// "Create a notification string with a timestamp." expression: "'New message -// received at ' + string(document.create_time)" The exact variables and -// functions that may be referenced within an expression are determined by the -// service that evaluates it. See the service documentation for additional -// information. -type Expr struct { - // Description: Optional. Description of the expression. This is a longer text - // which describes the expression, e.g. when hovered over it in a UI. - Description string `json:"description,omitempty"` - // Expression: Textual representation of an expression in Common Expression - // Language syntax. - Expression string `json:"expression,omitempty"` - // Location: Optional. String indicating the location of the expression for - // error reporting, e.g. a file name and a position in the file. - Location string `json:"location,omitempty"` - // Title: Optional. Title for the expression, i.e. a short string describing - // its purpose. This can be used e.g. in UIs which allow to enter the - // expression. - Title string `json:"title,omitempty"` - // ForceSendFields is a list of field names (e.g. "Description") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Description") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s Expr) MarshalJSON() ([]byte, error) { - type NoMethod Expr - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ExtendedStatus: Extended status can store additional metadata. For example, -// for keys disabled due to their private key data being expoesed we may -// include a message with more information about the exposure. -type ExtendedStatus struct { - // Key: The key for this extended status. - // - // Possible values: - // "SERVICE_ACCOUNT_KEY_EXTENDED_STATUS_KEY_UNSPECIFIED" - Unspecified - // extended status, should not be used. - // "SERVICE_ACCOUNT_KEY_EXTENDED_STATUS_KEY_EXPOSED" - This key has been - // detected as exposed. extended_status_value may contain information about the - // exposure (public GitHub repo, open internet, etc.) - // "SERVICE_ACCOUNT_KEY_EXTENDED_STATUS_KEY_COMPROMISE_DETECTED" - This key - // was implicated in a compromise or other attack. extended_status_value may - // contain information about the abuse perpetrated. - Key string `json:"key,omitempty"` - // Value: The value for the extended status. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ExtendedStatus) MarshalJSON() ([]byte, error) { - type NoMethod ExtendedStatus - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GetIamPolicyRequest: Request message for `GetIamPolicy` method. -type GetIamPolicyRequest struct { - // Options: OPTIONAL: A `GetPolicyOptions` object for specifying options to - // `GetIamPolicy`. - Options *GetPolicyOptions `json:"options,omitempty"` - // ForceSendFields is a list of field names (e.g. "Options") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Options") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GetIamPolicyRequest) MarshalJSON() ([]byte, error) { - type NoMethod GetIamPolicyRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GetPolicyOptions: Encapsulates settings provided to GetIamPolicy. -type GetPolicyOptions struct { - // RequestedPolicyVersion: Optional. The maximum policy version that will be - // used to format the policy. Valid values are 0, 1, and 3. Requests specifying - // an invalid value will be rejected. Requests for policies with any - // conditional role bindings must specify version 3. Policies with no - // conditional role bindings may specify any valid value or leave the field - // unset. The policy in the response might use the policy version that you - // specified, or it might use a lower policy version. For example, if you - // specify version 3, but the policy has no conditional role bindings, the - // response uses version 1. To learn which resources support conditions in - // their IAM policies, see the IAM documentation - // (https://cloud.google.com/iam/help/conditions/resource-policies). - RequestedPolicyVersion int64 `json:"requestedPolicyVersion,omitempty"` - // ForceSendFields is a list of field names (e.g. "RequestedPolicyVersion") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "RequestedPolicyVersion") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GetPolicyOptions) MarshalJSON() ([]byte, error) { - type NoMethod GetPolicyOptions - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleIamAdminV1WorkforcePoolProviderExtraAttributesOAuth2Client: Represents -// the OAuth 2.0 client credential configuration for retrieving additional user -// attributes that are not present in the initial authentication credentials -// from the identity provider, for example, groups. See -// https://datatracker.ietf.org/doc/html/rfc6749#section-4.4 for more details -// on client credentials grant flow. -type GoogleIamAdminV1WorkforcePoolProviderExtraAttributesOAuth2Client struct { - // AttributesType: Required. Represents the IdP and type of claims that should - // be fetched. - // - // Possible values: - // "ATTRIBUTES_TYPE_UNSPECIFIED" - No AttributesType specified. - // "AZURE_AD_GROUPS_MAIL" - Used to get the user's group claims from the - // Microsoft Entra ID identity provider using the configuration provided in - // ExtraAttributesOAuth2Client. The `mail` property of the - // `microsoft.graph.group` object is used for claim mapping. See - // https://learn.microsoft.com/en-us/graph/api/resources/group?view=graph-rest-1.0#properties - // for more details on `microsoft.graph.group` properties. The group mail - // addresses of the user's groups that are returned from Microsoft Entra ID can - // be mapped by using the following attributes: * OIDC: `assertion.groups` * - // SAML: `assertion.attributes.groups` - // "AZURE_AD_GROUPS_ID" - Used to get the user's group claims from the - // Microsoft Entra ID identity provider using the configuration provided in - // ExtraAttributesOAuth2Client. The `id` property of the - // `microsoft.graph.group` object is used for claim mapping. See - // https://learn.microsoft.com/en-us/graph/api/resources/group?view=graph-rest-1.0#properties - // for more details on `microsoft.graph.group` properties. The group IDs of the - // user's groups that are returned from Microsoft Entra ID can be mapped by - // using the following attributes: * OIDC: `assertion.groups` * SAML: - // `assertion.attributes.groups` - // "AZURE_AD_GROUPS_DISPLAY_NAME" - Used to get the user's group claims from - // the Microsoft Entra ID identity provider using the configuration provided in - // ExtraAttributesOAuth2Client. The `displayName` property of the - // `microsoft.graph.group` object is used for claim mapping. See - // https://learn.microsoft.com/en-us/graph/api/resources/group?view=graph-rest-1.0#properties - // for more details on `microsoft.graph.group` properties. The display names of - // the user's groups that are returned from Microsoft Entra ID can be mapped by - // using the following attributes: * OIDC: `assertion.groups` * SAML: - // `assertion.attributes.groups` - AttributesType string `json:"attributesType,omitempty"` - // ClientId: Required. The OAuth 2.0 client ID for retrieving extra attributes - // from the identity provider. Required to get the Access Token using client - // credentials grant flow. - ClientId string `json:"clientId,omitempty"` - // ClientSecret: Required. The OAuth 2.0 client secret for retrieving extra - // attributes from the identity provider. Required to get the Access Token - // using client credentials grant flow. - ClientSecret *GoogleIamAdminV1WorkforcePoolProviderOidcClientSecret `json:"clientSecret,omitempty"` - // IssuerUri: Required. The OIDC identity provider's issuer URI. Must be a - // valid URI using the `https` scheme. Required to get the OIDC discovery - // document. - IssuerUri string `json:"issuerUri,omitempty"` - // QueryParameters: Optional. Represents the parameters to control which claims - // are fetched from an IdP. - QueryParameters *GoogleIamAdminV1WorkforcePoolProviderExtraAttributesOAuth2ClientQueryParameters `json:"queryParameters,omitempty"` - // ForceSendFields is a list of field names (e.g. "AttributesType") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AttributesType") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleIamAdminV1WorkforcePoolProviderExtraAttributesOAuth2Client) MarshalJSON() ([]byte, error) { - type NoMethod GoogleIamAdminV1WorkforcePoolProviderExtraAttributesOAuth2Client - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleIamAdminV1WorkforcePoolProviderExtraAttributesOAuth2ClientQueryParamete -// rs: Represents the parameters to control which claims are fetched from an -// IdP. -type GoogleIamAdminV1WorkforcePoolProviderExtraAttributesOAuth2ClientQueryParameters struct { - // Filter: Optional. The filter used to request specific records from the IdP. - // By default, all of the groups that are associated with a user are fetched. - // For Microsoft Entra ID, you can add `$search` query parameters using - // [Keyword Query Language] - // (https://learn.microsoft.com/en-us/sharepoint/dev/general-development/keyword-query-language-kql-syntax-reference). - // To learn more about `$search` querying in Microsoft Entra ID, see [Use the - // `$search` query parameter] - // (https://learn.microsoft.com/en-us/graph/search-query-parameter). - // Additionally, Workforce Identity Federation automatically adds the following - // [`$filter` query parameters] - // (https://learn.microsoft.com/en-us/graph/filter-query-parameter), based on - // the value of `attributes_type`. Values passed to `filter` are converted to - // `$search` query parameters. Additional `$filter` query parameters cannot be - // added using this field. * `AZURE_AD_GROUPS_MAIL`: `mailEnabled` and - // `securityEnabled` filters are applied. * `AZURE_AD_GROUPS_ID`: - // `securityEnabled` filter is applied. - Filter string `json:"filter,omitempty"` - // ForceSendFields is a list of field names (e.g. "Filter") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Filter") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleIamAdminV1WorkforcePoolProviderExtraAttributesOAuth2ClientQueryParameters) MarshalJSON() ([]byte, error) { - type NoMethod GoogleIamAdminV1WorkforcePoolProviderExtraAttributesOAuth2ClientQueryParameters - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleIamAdminV1WorkforcePoolProviderOidc: Represents an OpenID Connect 1.0 -// identity provider. -type GoogleIamAdminV1WorkforcePoolProviderOidc struct { - // ClientId: Required. The client ID. Must match the audience claim of the JWT - // issued by the identity provider. - ClientId string `json:"clientId,omitempty"` - // ClientSecret: Optional. The optional client secret. Required to enable - // Authorization Code flow for web sign-in. - ClientSecret *GoogleIamAdminV1WorkforcePoolProviderOidcClientSecret `json:"clientSecret,omitempty"` - // IssuerUri: Required. The OIDC issuer URI. Must be a valid URI using the - // `https` scheme. - IssuerUri string `json:"issuerUri,omitempty"` - // JwksJson: Optional. OIDC JWKs in JSON String format. For details on the - // definition of a JWK, see https://tools.ietf.org/html/rfc7517. If not set, - // the `jwks_uri` from the discovery document that is fetched from the - // well-known path of the `issuer_uri`, will be used. RSA and EC asymmetric - // keys are supported. The JWK must use the following format and include only - // the following fields: { "keys": [ { "kty": "RSA/EC", "alg": "", "use": - // "sig", "kid": "", "n": "", "e": "", "x": "", "y": "", "crv": "" } ] } - JwksJson string `json:"jwksJson,omitempty"` - // WebSsoConfig: Required. Configuration for web single sign-on for the OIDC - // provider. Here, web sign-in refers to console sign-in and gcloud sign-in - // through the browser. - WebSsoConfig *GoogleIamAdminV1WorkforcePoolProviderOidcWebSsoConfig `json:"webSsoConfig,omitempty"` - // ForceSendFields is a list of field names (e.g. "ClientId") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ClientId") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleIamAdminV1WorkforcePoolProviderOidc) MarshalJSON() ([]byte, error) { - type NoMethod GoogleIamAdminV1WorkforcePoolProviderOidc - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleIamAdminV1WorkforcePoolProviderOidcClientSecret: Representation of a -// client secret configured for the OIDC provider. -type GoogleIamAdminV1WorkforcePoolProviderOidcClientSecret struct { - // Value: The value of the client secret. - Value *GoogleIamAdminV1WorkforcePoolProviderOidcClientSecretValue `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Value") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Value") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleIamAdminV1WorkforcePoolProviderOidcClientSecret) MarshalJSON() ([]byte, error) { - type NoMethod GoogleIamAdminV1WorkforcePoolProviderOidcClientSecret - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleIamAdminV1WorkforcePoolProviderOidcClientSecretValue: Representation -// of the value of the client secret. -type GoogleIamAdminV1WorkforcePoolProviderOidcClientSecretValue struct { - // PlainText: Optional. Input only. The plain text of the client secret value. - // For security reasons, this field is only used for input and will never be - // populated in any response. - PlainText string `json:"plainText,omitempty"` - // Thumbprint: Output only. A thumbprint to represent the current client secret - // value. - Thumbprint string `json:"thumbprint,omitempty"` - // ForceSendFields is a list of field names (e.g. "PlainText") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "PlainText") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleIamAdminV1WorkforcePoolProviderOidcClientSecretValue) MarshalJSON() ([]byte, error) { - type NoMethod GoogleIamAdminV1WorkforcePoolProviderOidcClientSecretValue - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleIamAdminV1WorkforcePoolProviderOidcWebSsoConfig: Configuration for web -// single sign-on for the OIDC provider. -type GoogleIamAdminV1WorkforcePoolProviderOidcWebSsoConfig struct { - // AdditionalScopes: Optional. Additional scopes to request for in the OIDC - // authentication request on top of scopes requested by default. By default, - // the `openid`, `profile` and `email` scopes that are supported by the - // identity provider are requested. Each additional scope may be at most 256 - // characters. A maximum of 10 additional scopes may be configured. - AdditionalScopes []string `json:"additionalScopes,omitempty"` - // AssertionClaimsBehavior: Required. The behavior for how OIDC Claims are - // included in the `assertion` object used for attribute mapping and attribute - // condition. - // - // Possible values: - // "ASSERTION_CLAIMS_BEHAVIOR_UNSPECIFIED" - No assertion claims behavior - // specified. - // "MERGE_USER_INFO_OVER_ID_TOKEN_CLAIMS" - Merge the UserInfo Endpoint - // Claims with ID Token Claims, preferring UserInfo Claim Values for the same - // Claim Name. This option is available only for the Authorization Code Flow. - // "ONLY_ID_TOKEN_CLAIMS" - Only include ID Token Claims. - AssertionClaimsBehavior string `json:"assertionClaimsBehavior,omitempty"` - // ResponseType: Required. The Response Type to request for in the OIDC - // Authorization Request for web sign-in. The `CODE` Response Type is - // recommended to avoid the Implicit Flow, for security reasons. - // - // Possible values: - // "RESPONSE_TYPE_UNSPECIFIED" - No Response Type specified. - // "CODE" - The `response_type=code` selection uses the Authorization Code - // Flow for web sign-in. Requires a configured client secret. - // "ID_TOKEN" - The `response_type=id_token` selection uses the Implicit Flow - // for web sign-in. - ResponseType string `json:"responseType,omitempty"` - // ForceSendFields is a list of field names (e.g. "AdditionalScopes") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AdditionalScopes") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleIamAdminV1WorkforcePoolProviderOidcWebSsoConfig) MarshalJSON() ([]byte, error) { - type NoMethod GoogleIamAdminV1WorkforcePoolProviderOidcWebSsoConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleIamAdminV1WorkforcePoolProviderSaml: Represents a SAML identity -// provider. -type GoogleIamAdminV1WorkforcePoolProviderSaml struct { - // IdpMetadataXml: Required. SAML Identity provider configuration metadata xml - // doc. The xml document should comply with SAML 2.0 specification - // (https://docs.oasis-open.org/security/saml/v2.0/saml-metadata-2.0-os.pdf). - // The max size of the acceptable xml document will be bounded to 128k - // characters. The metadata xml document should satisfy the following - // constraints: 1) Must contain an Identity Provider Entity ID. 2) Must contain - // at least one non-expired signing key certificate. 3) For each signing key: - // a) Valid from should be no more than 7 days from now. b) Valid to should be - // no more than 25 years in the future. 4) Up to 3 IdP signing keys are allowed - // in the metadata xml. When updating the provider's metadata xml, at least one - // non-expired signing key must overlap with the existing metadata. This - // requirement is skipped if there are no non-expired signing keys present in - // the existing metadata. - IdpMetadataXml string `json:"idpMetadataXml,omitempty"` - // ForceSendFields is a list of field names (e.g. "IdpMetadataXml") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "IdpMetadataXml") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleIamAdminV1WorkforcePoolProviderSaml) MarshalJSON() ([]byte, error) { - type NoMethod GoogleIamAdminV1WorkforcePoolProviderSaml - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InlineCertificateIssuanceConfig: Represents configuration for generating -// mutual TLS (mTLS) certificates for the identities within this pool. -type InlineCertificateIssuanceConfig struct { - // CaPools: Optional. A required mapping of a Google Cloud region to the CA - // pool resource located in that region. The CA pool is used for certificate - // issuance, adhering to the following constraints: * Key format: A supported - // cloud region name equivalent to the location identifier in the corresponding - // map entry's value. * Value format: A valid CA pool resource path format - // like: "projects/{project}/locations/{location}/caPools/{ca_pool}" * Region - // Matching: Workloads are ONLY issued certificates from CA pools within the - // same region. Also the CA pool region (in value) must match the workload's - // region (key). - CaPools map[string]string `json:"caPools,omitempty"` - // KeyAlgorithm: Optional. Key algorithm to use when generating the key pair. - // This key pair will be used to create the certificate. If not specified, this - // will default to ECDSA_P256. - // - // Possible values: - // "KEY_ALGORITHM_UNSPECIFIED" - Unspecified key algorithm. Defaults to - // ECDSA_P256. - // "RSA_2048" - Specifies RSA with a 2048-bit modulus. - // "RSA_3072" - Specifies RSA with a 3072-bit modulus. - // "RSA_4096" - Specifies RSA with a 4096-bit modulus. - // "ECDSA_P256" - Specifies ECDSA with curve P256. - // "ECDSA_P384" - Specifies ECDSA with curve P384. - KeyAlgorithm string `json:"keyAlgorithm,omitempty"` - // Lifetime: Optional. Lifetime of the workload certificates issued by the CA - // pool. Must be between 24 hours and 30 days. If not specified, this will be - // defaulted to 24 hours. - Lifetime string `json:"lifetime,omitempty"` - // RotationWindowPercentage: Optional. Rotation window percentage, the - // percentage of remaining lifetime after which certificate rotation is - // initiated. Must be between 50 and 80. If no value is specified, rotation - // window percentage is defaulted to 50. - RotationWindowPercentage int64 `json:"rotationWindowPercentage,omitempty"` - // UseDefaultSharedCa: Optional. If set to true, the trust domain will utilize - // the GCP-provisioned default CA. A default CA in the same region as the - // workload will be selected to issue the certificate. Enabling this will clear - // any existing `ca_pools` configuration to provision the certificates. NOTE: - // This field is mutually exclusive with `ca_pools`. If this flag is enabled, - // certificates will be automatically provisioned from the default shared CAs. - // This flag should not be set if you want to use your own CA pools to - // provision the certificates. - UseDefaultSharedCa bool `json:"useDefaultSharedCa,omitempty"` - // ForceSendFields is a list of field names (e.g. "CaPools") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CaPools") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InlineCertificateIssuanceConfig) MarshalJSON() ([]byte, error) { - type NoMethod InlineCertificateIssuanceConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InlineTrustConfig: Defines configuration for extending trust to additional -// trust domains. By establishing trust with another domain, the current domain -// will recognize and accept certificates issued by entities within the trusted -// domains. Note that a trust domain automatically trusts itself, eliminating -// the need for explicit configuration. -type InlineTrustConfig struct { - // AdditionalTrustBundles: Optional. Maps specific trust domains (e.g., - // "example.com") to their corresponding TrustStore, which contain the trusted - // root certificates for that domain. There can be a maximum of 10 trust domain - // entries in this map. Note that a trust domain automatically trusts itself - // and don't need to be specified here. If however, this WorkloadIdentityPool's - // trust domain contains any trust anchors in the additional_trust_bundles map, - // those trust anchors will be *appended to* the trust bundle automatically - // derived from your InlineCertificateIssuanceConfig's ca_pools. - AdditionalTrustBundles map[string]TrustStore `json:"additionalTrustBundles,omitempty"` - // ForceSendFields is a list of field names (e.g. "AdditionalTrustBundles") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AdditionalTrustBundles") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InlineTrustConfig) MarshalJSON() ([]byte, error) { - type NoMethod InlineTrustConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// IntermediateCA: Intermediate CA certificates used for building the trust -// chain to trust anchor -type IntermediateCA struct { - // PemCertificate: PEM certificate of the PKI used for validation. Must only - // contain one ca certificate. - PemCertificate string `json:"pemCertificate,omitempty"` - // ForceSendFields is a list of field names (e.g. "PemCertificate") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "PemCertificate") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s IntermediateCA) MarshalJSON() ([]byte, error) { - type NoMethod IntermediateCA - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// KeyData: Represents a public key data along with its format. -type KeyData struct { - // Format: Output only. The format of the key. - // - // Possible values: - // "KEY_FORMAT_UNSPECIFIED" - No format has been specified. This is an - // invalid format and must not be used. - // "RSA_X509_PEM" - A RSA public key wrapped in an X.509v3 certificate - // ([RFC5280] ( https://www.ietf.org/rfc/rfc5280.txt)), encoded in base64, and - // wrapped in [public certificate - // label](https://datatracker.ietf.org/doc/html/rfc7468#section-5.1). - Format string `json:"format,omitempty"` - // Key: Output only. The key data. The format of the key is represented by the - // format field. - Key string `json:"key,omitempty"` - // KeySpec: Required. The specifications for the key. - // - // Possible values: - // "KEY_SPEC_UNSPECIFIED" - No key specification specified. - // "RSA_2048" - A 2048 bit RSA key. - // "RSA_3072" - A 3072 bit RSA key. - // "RSA_4096" - A 4096 bit RSA key. - KeySpec string `json:"keySpec,omitempty"` - // NotAfterTime: Output only. Latest timestamp when this key is valid. Attempts - // to use this key after this time will fail. Only present if the key data - // represents a X.509 certificate. - NotAfterTime string `json:"notAfterTime,omitempty"` - // NotBeforeTime: Output only. Earliest timestamp when this key is valid. - // Attempts to use this key before this time will fail. Only present if the key - // data represents a X.509 certificate. - NotBeforeTime string `json:"notBeforeTime,omitempty"` - // ForceSendFields is a list of field names (e.g. "Format") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Format") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s KeyData) MarshalJSON() ([]byte, error) { - type NoMethod KeyData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// LintPolicyRequest: The request to lint an IAM policy object. -type LintPolicyRequest struct { - // Condition: google.iam.v1.Binding.condition object to be linted. - Condition *Expr `json:"condition,omitempty"` - // FullResourceName: The full resource name of the policy this lint request is - // about. The name follows the Google Cloud format for full resource names. For - // example, a Google Cloud project with ID `my-project` will be named - // `//cloudresourcemanager.googleapis.com/projects/my-project`. The resource - // name is not used to read a policy from IAM. Only the data in the request - // object is linted. - FullResourceName string `json:"fullResourceName,omitempty"` - // ForceSendFields is a list of field names (e.g. "Condition") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Condition") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s LintPolicyRequest) MarshalJSON() ([]byte, error) { - type NoMethod LintPolicyRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// LintPolicyResponse: The response of a lint operation. An empty response -// indicates the operation was able to fully execute and no lint issue was -// found. -type LintPolicyResponse struct { - // LintResults: List of lint results sorted by `severity` in descending order. - LintResults []*LintResult `json:"lintResults,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "LintResults") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "LintResults") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s LintPolicyResponse) MarshalJSON() ([]byte, error) { - type NoMethod LintPolicyResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// LintResult: Structured response of a single validation unit. -type LintResult struct { - // DebugMessage: Human readable debug message associated with the issue. - DebugMessage string `json:"debugMessage,omitempty"` - // FieldName: The name of the field for which this lint result is about. For - // nested messages `field_name` consists of names of the embedded fields - // separated by period character. The top-level qualifier is the input object - // to lint in the request. For example, the `field_name` value - // `condition.expression` identifies a lint result for the `expression` field - // of the provided condition. - FieldName string `json:"fieldName,omitempty"` - // Level: The validation unit level. - // - // Possible values: - // "LEVEL_UNSPECIFIED" - Level is unspecified. - // "CONDITION" - A validation unit which operates on an individual condition - // within a binding. - Level string `json:"level,omitempty"` - // LocationOffset: 0-based character position of problematic construct within - // the object identified by `field_name`. Currently, this is populated only for - // condition expression. - LocationOffset int64 `json:"locationOffset,omitempty"` - // Severity: The validation unit severity. - // - // Possible values: - // "SEVERITY_UNSPECIFIED" - Severity is unspecified. - // "ERROR" - A validation unit returns an error only for critical issues. If - // an attempt is made to set the problematic policy without rectifying the - // critical issue, it causes the `setPolicy` operation to fail. - // "WARNING" - Any issue which is severe enough but does not cause an error. - // For example, suspicious constructs in the input object will not necessarily - // fail `setPolicy`, but there is a high likelihood that they won't behave as - // expected during policy evaluation in `checkPolicy`. This includes the - // following common scenarios: - Unsatisfiable condition: Expired timestamp in - // date/time condition. - Ineffective condition: Condition on a pair which is - // granted unconditionally in another binding of the same policy. - // "NOTICE" - Reserved for the issues that are not severe as - // `ERROR`/`WARNING`, but need special handling. For instance, messages about - // skipped validation units are issued as `NOTICE`. - // "INFO" - Any informative statement which is not severe enough to raise - // `ERROR`/`WARNING`/`NOTICE`, like auto-correction recommendations on the - // input content. Note that current version of the linter does not utilize - // `INFO`. - // "DEPRECATED" - Deprecated severity level. - Severity string `json:"severity,omitempty"` - // ValidationUnitName: The validation unit name, for instance - // "lintValidationUnits/ConditionComplexityCheck". - ValidationUnitName string `json:"validationUnitName,omitempty"` - // ForceSendFields is a list of field names (e.g. "DebugMessage") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DebugMessage") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s LintResult) MarshalJSON() ([]byte, error) { - type NoMethod LintResult - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ListAttestationRulesResponse: Response message for ListAttestationRules. -type ListAttestationRulesResponse struct { - // AttestationRules: A list of AttestationRules. - AttestationRules []*AttestationRule `json:"attestationRules,omitempty"` - // NextPageToken: Optional. A token, which can be sent as `page_token` to - // retrieve the next page. If this field is omitted, there are no subsequent - // pages. - NextPageToken string `json:"nextPageToken,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "AttestationRules") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AttestationRules") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ListAttestationRulesResponse) MarshalJSON() ([]byte, error) { - type NoMethod ListAttestationRulesResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ListOauthClientCredentialsResponse: Response message for -// ListOauthClientCredentials. -type ListOauthClientCredentialsResponse struct { - // OauthClientCredentials: A list of OauthClientCredentials. - OauthClientCredentials []*OauthClientCredential `json:"oauthClientCredentials,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "OauthClientCredentials") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "OauthClientCredentials") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ListOauthClientCredentialsResponse) MarshalJSON() ([]byte, error) { - type NoMethod ListOauthClientCredentialsResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ListOauthClientsResponse: Response message for ListOauthClients. -type ListOauthClientsResponse struct { - // NextPageToken: Optional. A token, which can be sent as `page_token` to - // retrieve the next page. If this field is omitted, there are no subsequent - // pages. - NextPageToken string `json:"nextPageToken,omitempty"` - // OauthClients: A list of OauthClients. - OauthClients []*OauthClient `json:"oauthClients,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "NextPageToken") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "NextPageToken") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ListOauthClientsResponse) MarshalJSON() ([]byte, error) { - type NoMethod ListOauthClientsResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ListRolesResponse: The response containing the roles defined under a -// resource. -type ListRolesResponse struct { - // NextPageToken: To retrieve the next page of results, set - // `ListRolesRequest.page_token` to this value. - NextPageToken string `json:"nextPageToken,omitempty"` - // Roles: The Roles defined on this resource. - Roles []*Role `json:"roles,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "NextPageToken") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "NextPageToken") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ListRolesResponse) MarshalJSON() ([]byte, error) { - type NoMethod ListRolesResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ListServiceAccountKeysResponse: The service account keys list response. -type ListServiceAccountKeysResponse struct { - // Keys: The public keys for the service account. - Keys []*ServiceAccountKey `json:"keys,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Keys") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Keys") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ListServiceAccountKeysResponse) MarshalJSON() ([]byte, error) { - type NoMethod ListServiceAccountKeysResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ListServiceAccountsResponse: The service account list response. -type ListServiceAccountsResponse struct { - // Accounts: The list of matching service accounts. - Accounts []*ServiceAccount `json:"accounts,omitempty"` - // NextPageToken: To retrieve the next page of results, set - // ListServiceAccountsRequest.page_token to this value. - NextPageToken string `json:"nextPageToken,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Accounts") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Accounts") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ListServiceAccountsResponse) MarshalJSON() ([]byte, error) { - type NoMethod ListServiceAccountsResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ListWorkforcePoolProviderKeysResponse: Response message for -// ListWorkforcePoolProviderKeys. -type ListWorkforcePoolProviderKeysResponse struct { - // NextPageToken: A token, which can be sent as `page_token` to retrieve the - // next page. If this field is omitted, there are no subsequent pages. - NextPageToken string `json:"nextPageToken,omitempty"` - // WorkforcePoolProviderKeys: A list of WorkforcePoolProviderKeys. - WorkforcePoolProviderKeys []*WorkforcePoolProviderKey `json:"workforcePoolProviderKeys,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "NextPageToken") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "NextPageToken") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ListWorkforcePoolProviderKeysResponse) MarshalJSON() ([]byte, error) { - type NoMethod ListWorkforcePoolProviderKeysResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ListWorkforcePoolProviderScimTenantsResponse: Gemini Enterprise only. -// Response message for ListWorkforcePoolProviderScimTenants. -type ListWorkforcePoolProviderScimTenantsResponse struct { - // NextPageToken: Optional. Gemini Enterprise only. A token, which can be sent - // as `page_token` to retrieve the next page. If this field is omitted, there - // are no subsequent pages. - NextPageToken string `json:"nextPageToken,omitempty"` - // WorkforcePoolProviderScimTenants: Output only. Gemini Enterprise only. A - // list of SCIM tenants. - WorkforcePoolProviderScimTenants []*WorkforcePoolProviderScimTenant `json:"workforcePoolProviderScimTenants,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "NextPageToken") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "NextPageToken") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ListWorkforcePoolProviderScimTenantsResponse) MarshalJSON() ([]byte, error) { - type NoMethod ListWorkforcePoolProviderScimTenantsResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ListWorkforcePoolProviderScimTokensResponse: Gemini Enterprise only. -// Response message for ListWorkforcePoolProviderScimTokens. -type ListWorkforcePoolProviderScimTokensResponse struct { - // NextPageToken: Optional. Gemini Enterprise only. A token, which can be sent - // as `page_token` to retrieve the next page. If this field is omitted, there - // are no subsequent pages. - NextPageToken string `json:"nextPageToken,omitempty"` - // WorkforcePoolProviderScimTokens: Output only. Gemini Enterprise only. A list - // of SCIM tokens. - WorkforcePoolProviderScimTokens []*WorkforcePoolProviderScimToken `json:"workforcePoolProviderScimTokens,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "NextPageToken") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "NextPageToken") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ListWorkforcePoolProviderScimTokensResponse) MarshalJSON() ([]byte, error) { - type NoMethod ListWorkforcePoolProviderScimTokensResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ListWorkforcePoolProvidersResponse: Response message for -// ListWorkforcePoolProviders. -type ListWorkforcePoolProvidersResponse struct { - // NextPageToken: A token, which can be sent as `page_token` to retrieve the - // next page. If this field is omitted, there are no subsequent pages. - NextPageToken string `json:"nextPageToken,omitempty"` - // WorkforcePoolProviders: A list of providers. - WorkforcePoolProviders []*WorkforcePoolProvider `json:"workforcePoolProviders,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "NextPageToken") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "NextPageToken") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ListWorkforcePoolProvidersResponse) MarshalJSON() ([]byte, error) { - type NoMethod ListWorkforcePoolProvidersResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ListWorkforcePoolsResponse: Response message for ListWorkforcePools. -type ListWorkforcePoolsResponse struct { - // NextPageToken: A token, which can be sent as `page_token` to retrieve the - // next page. If this field is omitted, there are no subsequent pages. - NextPageToken string `json:"nextPageToken,omitempty"` - // WorkforcePools: A list of pools. - WorkforcePools []*WorkforcePool `json:"workforcePools,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "NextPageToken") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "NextPageToken") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ListWorkforcePoolsResponse) MarshalJSON() ([]byte, error) { - type NoMethod ListWorkforcePoolsResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ListWorkloadIdentityPoolManagedIdentitiesResponse: Response message for -// ListWorkloadIdentityPoolManagedIdentities. -type ListWorkloadIdentityPoolManagedIdentitiesResponse struct { - // NextPageToken: A token, which can be sent as `page_token` to retrieve the - // next page. If this field is omitted, there are no subsequent pages. - NextPageToken string `json:"nextPageToken,omitempty"` - // WorkloadIdentityPoolManagedIdentities: A list of managed identities. - WorkloadIdentityPoolManagedIdentities []*WorkloadIdentityPoolManagedIdentity `json:"workloadIdentityPoolManagedIdentities,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "NextPageToken") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "NextPageToken") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ListWorkloadIdentityPoolManagedIdentitiesResponse) MarshalJSON() ([]byte, error) { - type NoMethod ListWorkloadIdentityPoolManagedIdentitiesResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ListWorkloadIdentityPoolNamespacesResponse: Response message for -// ListWorkloadIdentityPoolNamespaces. -type ListWorkloadIdentityPoolNamespacesResponse struct { - // NextPageToken: A token, which can be sent as `page_token` to retrieve the - // next page. If this field is omitted, there are no subsequent pages. - NextPageToken string `json:"nextPageToken,omitempty"` - // WorkloadIdentityPoolNamespaces: A list of namespaces. - WorkloadIdentityPoolNamespaces []*WorkloadIdentityPoolNamespace `json:"workloadIdentityPoolNamespaces,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "NextPageToken") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "NextPageToken") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ListWorkloadIdentityPoolNamespacesResponse) MarshalJSON() ([]byte, error) { - type NoMethod ListWorkloadIdentityPoolNamespacesResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ListWorkloadIdentityPoolProviderKeysResponse: Response message for -// ListWorkloadIdentityPoolProviderKeys. -type ListWorkloadIdentityPoolProviderKeysResponse struct { - // NextPageToken: A token, which can be sent as `page_token` to retrieve the - // next page. If this field is omitted, there are no subsequent pages. - NextPageToken string `json:"nextPageToken,omitempty"` - // WorkloadIdentityPoolProviderKeys: A list of WorkloadIdentityPoolProviderKey - WorkloadIdentityPoolProviderKeys []*WorkloadIdentityPoolProviderKey `json:"workloadIdentityPoolProviderKeys,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "NextPageToken") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "NextPageToken") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ListWorkloadIdentityPoolProviderKeysResponse) MarshalJSON() ([]byte, error) { - type NoMethod ListWorkloadIdentityPoolProviderKeysResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ListWorkloadIdentityPoolProvidersResponse: Response message for -// ListWorkloadIdentityPoolProviders. -type ListWorkloadIdentityPoolProvidersResponse struct { - // NextPageToken: A token, which can be sent as `page_token` to retrieve the - // next page. If this field is omitted, there are no subsequent pages. - NextPageToken string `json:"nextPageToken,omitempty"` - // WorkloadIdentityPoolProviders: A list of providers. - WorkloadIdentityPoolProviders []*WorkloadIdentityPoolProvider `json:"workloadIdentityPoolProviders,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "NextPageToken") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "NextPageToken") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ListWorkloadIdentityPoolProvidersResponse) MarshalJSON() ([]byte, error) { - type NoMethod ListWorkloadIdentityPoolProvidersResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ListWorkloadIdentityPoolsResponse: Response message for -// ListWorkloadIdentityPools. -type ListWorkloadIdentityPoolsResponse struct { - // NextPageToken: A token, which can be sent as `page_token` to retrieve the - // next page. If this field is omitted, there are no subsequent pages. - NextPageToken string `json:"nextPageToken,omitempty"` - // WorkloadIdentityPools: A list of pools. - WorkloadIdentityPools []*WorkloadIdentityPool `json:"workloadIdentityPools,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "NextPageToken") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "NextPageToken") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ListWorkloadIdentityPoolsResponse) MarshalJSON() ([]byte, error) { - type NoMethod ListWorkloadIdentityPoolsResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// OauthClient: Represents an OauthClient. Used to access Google Cloud -// resources on behalf of a Workforce Identity Federation user by using OAuth -// 2.0 Protocol to obtain an access token from Google Cloud. -type OauthClient struct { - // AllowedGrantTypes: Required. The list of OAuth grant types is allowed for - // the OauthClient. - // - // Possible values: - // "GRANT_TYPE_UNSPECIFIED" - Should not be used. - // "AUTHORIZATION_CODE_GRANT" - Authorization code grant. - // "REFRESH_TOKEN_GRANT" - Refresh token grant. - AllowedGrantTypes []string `json:"allowedGrantTypes,omitempty"` - // AllowedRedirectUris: Required. The list of redirect uris that is allowed to - // redirect back when authorization process is completed. - AllowedRedirectUris []string `json:"allowedRedirectUris,omitempty"` - // AllowedScopes: Required. The list of scopes that the OauthClient is allowed - // to request during OAuth flows. The following scopes are supported: * - // `https://www.googleapis.com/auth/cloud-platform`: See, edit, configure, and - // delete your Google Cloud data and see the email address for your Google - // Account. - AllowedScopes []string `json:"allowedScopes,omitempty"` - // ClientId: Output only. The system-generated OauthClient id. - ClientId string `json:"clientId,omitempty"` - // ClientType: Immutable. The type of OauthClient. Either public or private. - // For private clients, the client secret can be managed using the dedicated - // OauthClientCredential resource. - // - // Possible values: - // "CLIENT_TYPE_UNSPECIFIED" - Should not be used. - // "PUBLIC_CLIENT" - Public client has no secret. - // "CONFIDENTIAL_CLIENT" - Private client. - ClientType string `json:"clientType,omitempty"` - // Description: Optional. A user-specified description of the OauthClient. - // Cannot exceed 256 characters. - Description string `json:"description,omitempty"` - // Disabled: Optional. Whether the OauthClient is disabled. You cannot use a - // disabled OAuth client. - Disabled bool `json:"disabled,omitempty"` - // DisplayName: Optional. A user-specified display name of the OauthClient. - // Cannot exceed 32 characters. - DisplayName string `json:"displayName,omitempty"` - // ExpireTime: Output only. Time after which the OauthClient will be - // permanently purged and cannot be recovered. - ExpireTime string `json:"expireTime,omitempty"` - // Name: Immutable. Identifier. The resource name of the OauthClient. - // Format:`projects/{project}/locations/{location}/oauthClients/{oauth_client}`. - Name string `json:"name,omitempty"` - // State: Output only. The state of the OauthClient. - // - // Possible values: - // "STATE_UNSPECIFIED" - Default value. This value is unused. - // "ACTIVE" - The OauthClient is active. - // "DELETED" - The OauthClient is soft-deleted. Soft-deleted OauthClient is - // permanently deleted after approximately 30 days unless restored via - // `UndeleteOauthClient`. - State string `json:"state,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "AllowedGrantTypes") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AllowedGrantTypes") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s OauthClient) MarshalJSON() ([]byte, error) { - type NoMethod OauthClient - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// OauthClientCredential: Represents an OauthClientCredential. Used to -// authenticate an OauthClient while accessing Google Cloud resources on behalf -// of a user by using OAuth 2.0 Protocol. -type OauthClientCredential struct { - // ClientSecret: Output only. The system-generated OAuth client secret. The - // client secret must be stored securely. If the client secret is leaked, you - // must delete and re-create the client credential. To learn more, see OAuth - // client and credential security risks and mitigations - // (https://cloud.google.com/iam/docs/workforce-oauth-app#security) - ClientSecret string `json:"clientSecret,omitempty"` - // Disabled: Optional. Whether the OauthClientCredential is disabled. You - // cannot use a disabled OauthClientCredential. - Disabled bool `json:"disabled,omitempty"` - // DisplayName: Optional. A user-specified display name of the - // OauthClientCredential. Cannot exceed 32 characters. - DisplayName string `json:"displayName,omitempty"` - // Name: Immutable. Identifier. The resource name of the OauthClientCredential. - // Format: - // `projects/{project}/locations/{location}/oauthClients/{oauth_client}/credenti - // als/{credential}` - Name string `json:"name,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "ClientSecret") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ClientSecret") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s OauthClientCredential) MarshalJSON() ([]byte, error) { - type NoMethod OauthClientCredential - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// Oidc: Represents an OpenId Connect 1.0 identity provider. -type Oidc struct { - // AllowedAudiences: Optional. Acceptable values for the `aud` field (audience) - // in the OIDC token. Token exchange requests are rejected if the token - // audience does not match one of the configured values. Each audience may be - // at most 256 characters. A maximum of 10 audiences may be configured. If this - // list is empty, the OIDC token audience must be equal to the full canonical - // resource name of the WorkloadIdentityPoolProvider, with or without the HTTPS - // prefix. For example: ``` - // //iam.googleapis.com/projects//locations//workloadIdentityPools//providers/ - // https://iam.googleapis.com/projects//locations//workloadIdentityPools//providers/ - // ``` - AllowedAudiences []string `json:"allowedAudiences,omitempty"` - // IssuerUri: Required. The OIDC issuer URL. Must be an HTTPS endpoint. Per - // OpenID Connect Discovery 1.0 spec, the OIDC issuer URL is used to locate the - // provider's public keys (via `jwks_uri`) for verifying tokens like the OIDC - // ID token. These public key types must be 'EC' or 'RSA'. - IssuerUri string `json:"issuerUri,omitempty"` - // JwksJson: Optional. OIDC JWKs in JSON String format. For details on the - // definition of a JWK, see https://tools.ietf.org/html/rfc7517. If not set, - // the `jwks_uri` from the discovery document(fetched from the .well-known path - // of the `issuer_uri`) will be used. Currently, RSA and EC asymmetric keys are - // supported. The JWK must use following format and include only the following - // fields: { "keys": [ { "kty": "RSA/EC", "alg": "", "use": "sig", "kid": "", - // "n": "", "e": "", "x": "", "y": "", "crv": "" } ] } - JwksJson string `json:"jwksJson,omitempty"` - // ForceSendFields is a list of field names (e.g. "AllowedAudiences") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AllowedAudiences") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s Oidc) MarshalJSON() ([]byte, error) { - type NoMethod Oidc - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// Operation: This resource represents a long-running operation that is the -// result of a network API call. -type Operation struct { - // Done: If the value is `false`, it means the operation is still in progress. - // If `true`, the operation is completed, and either `error` or `response` is - // available. - Done bool `json:"done,omitempty"` - // Error: The error result of the operation in case of failure or cancellation. - Error *Status `json:"error,omitempty"` - // Metadata: Service-specific metadata associated with the operation. It - // typically contains progress information and common metadata such as create - // time. Some services might not provide such metadata. Any method that returns - // a long-running operation should document the metadata type, if any. - Metadata googleapi.RawMessage `json:"metadata,omitempty"` - // Name: The server-assigned name, which is only unique within the same service - // that originally returns it. If you use the default HTTP mapping, the `name` - // should be a resource name ending with `operations/{unique_id}`. - Name string `json:"name,omitempty"` - // Response: The normal, successful response of the operation. If the original - // method returns no data on success, such as `Delete`, the response is - // `google.protobuf.Empty`. If the original method is standard - // `Get`/`Create`/`Update`, the response should be the resource. For other - // methods, the response should have the type `XxxResponse`, where `Xxx` is the - // original method name. For example, if the original method name is - // `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. - Response googleapi.RawMessage `json:"response,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Done") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Done") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s Operation) MarshalJSON() ([]byte, error) { - type NoMethod Operation - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// OperationMetadata: Represents the metadata of the long-running operation. -type OperationMetadata struct { - // ApiVersion: Output only. API version used to start the operation. - ApiVersion string `json:"apiVersion,omitempty"` - // CancelRequested: Output only. Identifies whether the user has requested - // cancellation of the operation. Operations that have been cancelled - // successfully have google.longrunning.Operation.error value with a - // google.rpc.Status.code of `1`, corresponding to `Code.CANCELLED`. - CancelRequested bool `json:"cancelRequested,omitempty"` - // CreateTime: Output only. The time the operation was created. - CreateTime string `json:"createTime,omitempty"` - // EndTime: Output only. The time the operation finished running. - EndTime string `json:"endTime,omitempty"` - // StatusDetail: Output only. Human-readable status of the operation, if any. - StatusDetail string `json:"statusDetail,omitempty"` - // Target: Output only. Server-defined resource path for the target of the - // operation. - Target string `json:"target,omitempty"` - // Verb: Output only. Name of the verb executed by the operation. - Verb string `json:"verb,omitempty"` - // ForceSendFields is a list of field names (e.g. "ApiVersion") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ApiVersion") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s OperationMetadata) MarshalJSON() ([]byte, error) { - type NoMethod OperationMetadata - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// OwnerService: The Google Cloud service that owns this namespace. -type OwnerService struct { - // PrincipalSubject: Required. The service agent principal subject, e.g. - // "serviceAccount:service-1234@gcp-sa-gkehub.iam.gserviceaccount.com". - PrincipalSubject string `json:"principalSubject,omitempty"` - // ForceSendFields is a list of field names (e.g. "PrincipalSubject") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "PrincipalSubject") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s OwnerService) MarshalJSON() ([]byte, error) { - type NoMethod OwnerService - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// PatchServiceAccountRequest: The service account patch request. You can patch -// only the `display_name` and `description` fields. You must use the -// `update_mask` field to specify which of these fields you want to patch. Only -// the fields specified in the request are guaranteed to be returned in the -// response. Other fields may be empty in the response. -type PatchServiceAccountRequest struct { - ServiceAccount *ServiceAccount `json:"serviceAccount,omitempty"` - UpdateMask string `json:"updateMask,omitempty"` - // ForceSendFields is a list of field names (e.g. "ServiceAccount") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ServiceAccount") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s PatchServiceAccountRequest) MarshalJSON() ([]byte, error) { - type NoMethod PatchServiceAccountRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// Permission: A permission which can be included by a role. -type Permission struct { - // ApiDisabled: The service API associated with the permission is not enabled. - ApiDisabled bool `json:"apiDisabled,omitempty"` - // CustomRolesSupportLevel: The current custom role support level. - // - // Possible values: - // "SUPPORTED" - Default state. Permission is fully supported for custom role - // use. - // "TESTING" - Permission is being tested to check custom role compatibility. - // "NOT_SUPPORTED" - Permission is not supported for custom role use. - CustomRolesSupportLevel string `json:"customRolesSupportLevel,omitempty"` - // Description: A brief description of what this Permission is used for. - Description string `json:"description,omitempty"` - // Name: The name of this Permission. - Name string `json:"name,omitempty"` - OnlyInPredefinedRoles bool `json:"onlyInPredefinedRoles,omitempty"` - // PrimaryPermission: The preferred name for this permission. If present, then - // this permission is an alias of, and equivalent to, the listed - // primary_permission. - PrimaryPermission string `json:"primaryPermission,omitempty"` - // Stage: The current launch stage of the permission. - // - // Possible values: - // "ALPHA" - The permission is currently in an alpha phase. - // "BETA" - The permission is currently in a beta phase. - // "GA" - The permission is generally available. - // "DEPRECATED" - The permission is being deprecated. - Stage string `json:"stage,omitempty"` - // Title: The title of this Permission. - Title string `json:"title,omitempty"` - // ForceSendFields is a list of field names (e.g. "ApiDisabled") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ApiDisabled") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s Permission) MarshalJSON() ([]byte, error) { - type NoMethod Permission - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// PermissionDelta: A PermissionDelta message to record the added_permissions -// and removed_permissions inside a role. -type PermissionDelta struct { - // AddedPermissions: Added permissions. - AddedPermissions []string `json:"addedPermissions,omitempty"` - // RemovedPermissions: Removed permissions. - RemovedPermissions []string `json:"removedPermissions,omitempty"` - // ForceSendFields is a list of field names (e.g. "AddedPermissions") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AddedPermissions") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s PermissionDelta) MarshalJSON() ([]byte, error) { - type NoMethod PermissionDelta - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// Policy: An Identity and Access Management (IAM) policy, which specifies -// access controls for Google Cloud resources. A `Policy` is a collection of -// `bindings`. A `binding` binds one or more `members`, or principals, to a -// single `role`. Principals can be user accounts, service accounts, Google -// groups, and domains (such as G Suite). A `role` is a named list of -// permissions; each `role` can be an IAM predefined role or a user-created -// custom role. For some types of Google Cloud resources, a `binding` can also -// specify a `condition`, which is a logical expression that allows access to a -// resource only if the expression evaluates to `true`. A condition can add -// constraints based on attributes of the request, the resource, or both. To -// learn which resources support conditions in their IAM policies, see the IAM -// documentation -// (https://cloud.google.com/iam/help/conditions/resource-policies). **JSON -// example:** ``` { "bindings": [ { "role": -// "roles/resourcemanager.organizationAdmin", "members": [ -// "user:mike@example.com", "group:admins@example.com", "domain:google.com", -// "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": -// "roles/resourcemanager.organizationViewer", "members": [ -// "user:eve@example.com" ], "condition": { "title": "expirable access", -// "description": "Does not grant access after Sep 2020", "expression": -// "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": -// "BwWWja0YfJA=", "version": 3 } ``` **YAML example:** ``` bindings: - -// members: - user:mike@example.com - group:admins@example.com - -// domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com -// role: roles/resourcemanager.organizationAdmin - members: - -// user:eve@example.com role: roles/resourcemanager.organizationViewer -// condition: title: expirable access description: Does not grant access after -// Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') -// etag: BwWWja0YfJA= version: 3 ``` For a description of IAM and its features, -// see the IAM documentation (https://cloud.google.com/iam/docs/). -type Policy struct { - // AuditConfigs: Specifies cloud audit logging configuration for this policy. - AuditConfigs []*AuditConfig `json:"auditConfigs,omitempty"` - // Bindings: Associates a list of `members`, or principals, with a `role`. - // Optionally, may specify a `condition` that determines how and when the - // `bindings` are applied. Each of the `bindings` must contain at least one - // principal. The `bindings` in a `Policy` can refer to up to 1,500 principals; - // up to 250 of these principals can be Google groups. Each occurrence of a - // principal counts towards these limits. For example, if the `bindings` grant - // 50 different roles to `user:alice@example.com`, and not to any other - // principal, then you can add another 1,450 principals to the `bindings` in - // the `Policy`. - Bindings []*Binding `json:"bindings,omitempty"` - // Etag: `etag` is used for optimistic concurrency control as a way to help - // prevent simultaneous updates of a policy from overwriting each other. It is - // strongly suggested that systems make use of the `etag` in the - // read-modify-write cycle to perform policy updates in order to avoid race - // conditions: An `etag` is returned in the response to `getIamPolicy`, and - // systems are expected to put that etag in the request to `setIamPolicy` to - // ensure that their change will be applied to the same version of the policy. - // **Important:** If you use IAM Conditions, you must include the `etag` field - // whenever you call `setIamPolicy`. If you omit this field, then IAM allows - // you to overwrite a version `3` policy with a version `1` policy, and all of - // the conditions in the version `3` policy are lost. - Etag string `json:"etag,omitempty"` - // Version: Specifies the format of the policy. Valid values are `0`, `1`, and - // `3`. Requests that specify an invalid value are rejected. Any operation that - // affects conditional role bindings must specify version `3`. This requirement - // applies to the following operations: * Getting a policy that includes a - // conditional role binding * Adding a conditional role binding to a policy * - // Changing a conditional role binding in a policy * Removing any role binding, - // with or without a condition, from a policy that includes conditions - // **Important:** If you use IAM Conditions, you must include the `etag` field - // whenever you call `setIamPolicy`. If you omit this field, then IAM allows - // you to overwrite a version `3` policy with a version `1` policy, and all of - // the conditions in the version `3` policy are lost. If a policy does not - // include any conditions, operations on that policy may specify any valid - // version or leave the field unset. To learn which resources support - // conditions in their IAM policies, see the IAM documentation - // (https://cloud.google.com/iam/help/conditions/resource-policies). - Version int64 `json:"version,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "AuditConfigs") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AuditConfigs") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s Policy) MarshalJSON() ([]byte, error) { - type NoMethod Policy - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// PolicyDelta: The difference delta between two policies. -type PolicyDelta struct { - // BindingDeltas: The delta for Bindings between two policies. - BindingDeltas []*BindingDelta `json:"bindingDeltas,omitempty"` - // ForceSendFields is a list of field names (e.g. "BindingDeltas") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "BindingDeltas") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s PolicyDelta) MarshalJSON() ([]byte, error) { - type NoMethod PolicyDelta - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// QueryAuditableServicesRequest: A request to get the list of auditable -// services for a resource. -type QueryAuditableServicesRequest struct { - // FullResourceName: Required. The full resource name to query from the list of - // auditable services. The name follows the Google Cloud Platform resource - // format. For example, a Cloud Platform project with id `my-project` will be - // named `//cloudresourcemanager.googleapis.com/projects/my-project`. - FullResourceName string `json:"fullResourceName,omitempty"` - // ForceSendFields is a list of field names (e.g. "FullResourceName") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "FullResourceName") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s QueryAuditableServicesRequest) MarshalJSON() ([]byte, error) { - type NoMethod QueryAuditableServicesRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// QueryAuditableServicesResponse: A response containing a list of auditable -// services for a resource. -type QueryAuditableServicesResponse struct { - // Services: The auditable services for a resource. - Services []*AuditableService `json:"services,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Services") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Services") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s QueryAuditableServicesResponse) MarshalJSON() ([]byte, error) { - type NoMethod QueryAuditableServicesResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// QueryGrantableRolesRequest: The grantable role query request. -type QueryGrantableRolesRequest struct { - // FullResourceName: Required. Required. The full resource name to query from - // the list of grantable roles. The name follows the Google Cloud Platform - // resource format. For example, a Cloud Platform project with id `my-project` - // will be named `//cloudresourcemanager.googleapis.com/projects/my-project`. - FullResourceName string `json:"fullResourceName,omitempty"` - // PageSize: Optional limit on the number of roles to include in the response. - // The default is 300, and the maximum is 2,000. - PageSize int64 `json:"pageSize,omitempty"` - // PageToken: Optional pagination token returned in an earlier - // QueryGrantableRolesResponse. - PageToken string `json:"pageToken,omitempty"` - // Possible values: - // "BASIC" - Omits the `included_permissions` field. This is the default - // value. - // "FULL" - Returns all fields. - View string `json:"view,omitempty"` - // ForceSendFields is a list of field names (e.g. "FullResourceName") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "FullResourceName") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s QueryGrantableRolesRequest) MarshalJSON() ([]byte, error) { - type NoMethod QueryGrantableRolesRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// QueryGrantableRolesResponse: The grantable role query response. -type QueryGrantableRolesResponse struct { - // NextPageToken: To retrieve the next page of results, set - // `QueryGrantableRolesRequest.page_token` to this value. - NextPageToken string `json:"nextPageToken,omitempty"` - // Roles: The list of matching roles. - Roles []*Role `json:"roles,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "NextPageToken") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "NextPageToken") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s QueryGrantableRolesResponse) MarshalJSON() ([]byte, error) { - type NoMethod QueryGrantableRolesResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// QueryTestablePermissionsRequest: A request to get permissions which can be -// tested on a resource. -type QueryTestablePermissionsRequest struct { - // FullResourceName: Required. The full resource name to query from the list of - // testable permissions. The name follows the Google Cloud Platform resource - // format. For example, a Cloud Platform project with id `my-project` will be - // named `//cloudresourcemanager.googleapis.com/projects/my-project`. - FullResourceName string `json:"fullResourceName,omitempty"` - // PageSize: Optional limit on the number of permissions to include in the - // response. The default is 100, and the maximum is 1,000. - PageSize int64 `json:"pageSize,omitempty"` - // PageToken: Optional pagination token returned in an earlier - // QueryTestablePermissionsRequest. - PageToken string `json:"pageToken,omitempty"` - // ForceSendFields is a list of field names (e.g. "FullResourceName") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "FullResourceName") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s QueryTestablePermissionsRequest) MarshalJSON() ([]byte, error) { - type NoMethod QueryTestablePermissionsRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// QueryTestablePermissionsResponse: The response containing permissions which -// can be tested on a resource. -type QueryTestablePermissionsResponse struct { - // NextPageToken: To retrieve the next page of results, set - // `QueryTestableRolesRequest.page_token` to this value. - NextPageToken string `json:"nextPageToken,omitempty"` - // Permissions: The Permissions testable on the requested resource. - Permissions []*Permission `json:"permissions,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "NextPageToken") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "NextPageToken") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s QueryTestablePermissionsResponse) MarshalJSON() ([]byte, error) { - type NoMethod QueryTestablePermissionsResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ReconciliationOperationMetadata: Operation metadata returned by the CLH -// during resource state reconciliation. -type ReconciliationOperationMetadata struct { - // DeleteResource: DEPRECATED. Use exclusive_action instead. - DeleteResource bool `json:"deleteResource,omitempty"` - // ExclusiveAction: Excluisive action returned by the CLH. - // - // Possible values: - // "UNKNOWN_REPAIR_ACTION" - Unknown repair action. - // "DELETE" - The resource has to be deleted. When using this bit, the CLH - // should fail the operation. DEPRECATED. Instead use DELETE_RESOURCE - // OperationSignal in SideChannel. - // "RETRY" - This resource could not be repaired but the repair should be - // tried again at a later time. This can happen if there is a dependency that - // needs to be resolved first- e.g. if a parent resource must be repaired - // before a child resource. - ExclusiveAction string `json:"exclusiveAction,omitempty"` - // ForceSendFields is a list of field names (e.g. "DeleteResource") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DeleteResource") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ReconciliationOperationMetadata) MarshalJSON() ([]byte, error) { - type NoMethod ReconciliationOperationMetadata - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// RemoveAttestationRuleRequest: Request message for RemoveAttestationRule. -type RemoveAttestationRuleRequest struct { - // AttestationRule: Required. The attestation rule to be removed. - AttestationRule *AttestationRule `json:"attestationRule,omitempty"` - // ForceSendFields is a list of field names (e.g. "AttestationRule") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AttestationRule") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RemoveAttestationRuleRequest) MarshalJSON() ([]byte, error) { - type NoMethod RemoveAttestationRuleRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// Role: A role in the Identity and Access Management API. -type Role struct { - // Deleted: The current deleted state of the role. This field is read only. It - // will be ignored in calls to CreateRole and UpdateRole. - Deleted bool `json:"deleted,omitempty"` - // Description: Optional. A human-readable description for the role. - Description string `json:"description,omitempty"` - // Etag: Used to perform a consistent read-modify-write. - Etag string `json:"etag,omitempty"` - // IncludedPermissions: The names of the permissions this role grants when - // bound in an IAM policy. - IncludedPermissions []string `json:"includedPermissions,omitempty"` - // Name: The name of the role. When `Role` is used in `CreateRole`, the role - // name must not be set. When `Role` is used in output and other input such as - // `UpdateRole`, the role name is the complete path. For example, - // `roles/logging.viewer` for predefined roles, - // `organizations/{ORGANIZATION_ID}/roles/myRole` for organization-level custom - // roles, and `projects/{PROJECT_ID}/roles/myRole` for project-level custom - // roles. - Name string `json:"name,omitempty"` - // Stage: The current launch stage of the role. If the `ALPHA` launch stage has - // been selected for a role, the `stage` field will not be included in the - // returned definition for the role. - // - // Possible values: - // "ALPHA" - The user has indicated this role is currently in an Alpha phase. - // If this launch stage is selected, the `stage` field will not be included - // when requesting the definition for a given role. - // "BETA" - The user has indicated this role is currently in a Beta phase. - // "GA" - The user has indicated this role is generally available. - // "DEPRECATED" - The user has indicated this role is being deprecated. - // "DISABLED" - This role is disabled and will not contribute permissions to - // any principals it is granted to in policies. - // "EAP" - The user has indicated this role is currently in an EAP phase. - Stage string `json:"stage,omitempty"` - // Title: Optional. A human-readable title for the role. Typically this is - // limited to 100 UTF-8 bytes. - Title string `json:"title,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Deleted") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Deleted") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s Role) MarshalJSON() ([]byte, error) { - type NoMethod Role - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// Saml: Represents an SAML 2.0 identity provider. -type Saml struct { - // IdpMetadataXml: Required. SAML identity provider (IdP) configuration - // metadata XML doc. The XML document must comply with the SAML 2.0 - // specification - // (https://docs.oasis-open.org/security/saml/v2.0/saml-metadata-2.0-os.pdf). - // The maximum size of an acceptable XML document is 128K characters. The SAML - // metadata XML document must satisfy the following constraints: * Must contain - // an IdP Entity ID. * Must contain at least one non-expired signing - // certificate. * For each signing certificate, the expiration must be: * From - // no more than 7 days in the future. * To no more than 25 years in the future. - // * Up to three IdP signing keys are allowed. When updating the provider's - // metadata XML, at least one non-expired signing key must overlap with the - // existing metadata. This requirement is skipped if there are no non-expired - // signing keys present in the existing metadata. - IdpMetadataXml string `json:"idpMetadataXml,omitempty"` - // ForceSendFields is a list of field names (e.g. "IdpMetadataXml") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "IdpMetadataXml") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s Saml) MarshalJSON() ([]byte, error) { - type NoMethod Saml - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ServiceAccount: An IAM service account. A service account is an account for -// an application or a virtual machine (VM) instance, not a person. You can use -// a service account to call Google APIs. To learn more, read the overview of -// service accounts -// (https://cloud.google.com/iam/help/service-accounts/overview). When you -// create a service account, you specify the project ID that owns the service -// account, as well as a name that must be unique within the project. IAM uses -// these values to create an email address that identifies the service account. -// // -type ServiceAccount struct { - // Description: Optional. A user-specified, human-readable description of the - // service account. The maximum length is 256 UTF-8 bytes. - Description string `json:"description,omitempty"` - // Disabled: Output only. Whether the service account is disabled. - Disabled bool `json:"disabled,omitempty"` - // DisplayName: Optional. A user-specified, human-readable name for the service - // account. The maximum length is 100 UTF-8 bytes. - DisplayName string `json:"displayName,omitempty"` - // Email: Output only. The email address of the service account. - Email string `json:"email,omitempty"` - // Etag: Deprecated. Do not use. - Etag string `json:"etag,omitempty"` - // Name: The resource name of the service account. Use one of the following - // formats: * `projects/{PROJECT_ID}/serviceAccounts/{EMAIL_ADDRESS}` * - // `projects/{PROJECT_ID}/serviceAccounts/{UNIQUE_ID}` As an alternative, you - // can use the `-` wildcard character instead of the project ID: * - // `projects/-/serviceAccounts/{EMAIL_ADDRESS}` * - // `projects/-/serviceAccounts/{UNIQUE_ID}` When possible, avoid using the `-` - // wildcard character, because it can cause response messages to contain - // misleading error codes. For example, if you try to access the service - // account `projects/-/serviceAccounts/fake@example.com`, which does not exist, - // the response contains an HTTP `403 Forbidden` error instead of a `404 Not - // Found` error. - Name string `json:"name,omitempty"` - // Oauth2ClientId: Output only. The OAuth 2.0 client ID for the service - // account. - Oauth2ClientId string `json:"oauth2ClientId,omitempty"` - // ProjectId: Output only. The ID of the project that owns the service account. - ProjectId string `json:"projectId,omitempty"` - // UniqueId: Output only. The unique, stable numeric ID for the service - // account. Each service account retains its unique ID even if you delete the - // service account. For example, if you delete a service account, then create a - // new service account with the same name, the new service account has a - // different unique ID than the deleted service account. - UniqueId string `json:"uniqueId,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Description") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Description") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ServiceAccount) MarshalJSON() ([]byte, error) { - type NoMethod ServiceAccount - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ServiceAccountKey: Represents a service account key. A service account has -// two sets of key-pairs: user-managed, and system-managed. User-managed -// key-pairs can be created and deleted by users. Users are responsible for -// rotating these keys periodically to ensure security of their service -// accounts. Users retain the private key of these key-pairs, and Google -// retains ONLY the public key. System-managed keys are automatically rotated -// by Google, and are used for signing for a maximum of two weeks. The rotation -// process is probabilistic, and usage of the new key will gradually ramp up -// and down over the key's lifetime. If you cache the public key set for a -// service account, we recommend that you update the cache every 15 minutes. -// User-managed keys can be added and removed at any time, so it is important -// to update the cache frequently. For Google-managed keys, Google will publish -// a key at least 6 hours before it is first used for signing and will keep -// publishing it for at least 6 hours after it was last used for signing. -// Public keys for all service accounts are also published at the OAuth2 -// Service Account API. -type ServiceAccountKey struct { - // DisableReason: Output only. optional. If the key is disabled, it may have a - // DisableReason describing why it was disabled. - // - // Possible values: - // "SERVICE_ACCOUNT_KEY_DISABLE_REASON_UNSPECIFIED" - Unspecified disable - // reason - // "SERVICE_ACCOUNT_KEY_DISABLE_REASON_USER_INITIATED" - Disabled by the user - // "SERVICE_ACCOUNT_KEY_DISABLE_REASON_EXPOSED" - Google detected this - // Service Account external key's private key data as exposed, typically in a - // public repository on GitHub or similar. - // "SERVICE_ACCOUNT_KEY_DISABLE_REASON_COMPROMISE_DETECTED" - This service - // account external key was detected as compromised and used by an attacker. - DisableReason string `json:"disableReason,omitempty"` - // Disabled: The key status. - Disabled bool `json:"disabled,omitempty"` - // ExtendedStatus: Output only. Extended Status provides permanent information - // about a service account key. For example, if this key was detected as - // exposed or compromised, that information will remain for the lifetime of the - // key in the extended_status. - ExtendedStatus []*ExtendedStatus `json:"extendedStatus,omitempty"` - // KeyAlgorithm: Specifies the algorithm (and possibly key size) for the key. - // - // Possible values: - // "KEY_ALG_UNSPECIFIED" - An unspecified key algorithm. - // "KEY_ALG_RSA_1024" - 1k RSA Key. - // "KEY_ALG_RSA_2048" - 2k RSA Key. - KeyAlgorithm string `json:"keyAlgorithm,omitempty"` - // KeyOrigin: The key origin. - // - // Possible values: - // "ORIGIN_UNSPECIFIED" - Unspecified key origin. - // "USER_PROVIDED" - Key is provided by user. - // "GOOGLE_PROVIDED" - Key is provided by Google. - KeyOrigin string `json:"keyOrigin,omitempty"` - // KeyType: The key type. - // - // Possible values: - // "KEY_TYPE_UNSPECIFIED" - Unspecified key type. The presence of this in the - // message will immediately result in an error. - // "USER_MANAGED" - User-managed keys (managed and rotated by the user). - // "SYSTEM_MANAGED" - System-managed keys (managed and rotated by Google). - KeyType string `json:"keyType,omitempty"` - // Name: The resource name of the service account key in the following format - // `projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}/keys/{key}`. - Name string `json:"name,omitempty"` - // PrivateKeyData: The private key data. Only provided in - // `CreateServiceAccountKey` responses. Make sure to keep the private key data - // secure because it allows for the assertion of the service account identity. - // When base64 decoded, the private key data can be used to authenticate with - // Google API client libraries and with gcloud auth activate-service-account. - PrivateKeyData string `json:"privateKeyData,omitempty"` - // PrivateKeyType: The output format for the private key. Only provided in - // `CreateServiceAccountKey` responses, not in `GetServiceAccountKey` or - // `ListServiceAccountKey` responses. Google never exposes system-managed - // private keys, and never retains user-managed private keys. - // - // Possible values: - // "TYPE_UNSPECIFIED" - Unspecified. Equivalent to - // `TYPE_GOOGLE_CREDENTIALS_FILE`. - // "TYPE_PKCS12_FILE" - PKCS12 format. The password for the PKCS12 file is - // `notasecret`. For more information, see https://tools.ietf.org/html/rfc7292. - // "TYPE_GOOGLE_CREDENTIALS_FILE" - Google Credentials File format. - PrivateKeyType string `json:"privateKeyType,omitempty"` - // PublicKeyData: The public key data. Only provided in `GetServiceAccountKey` - // responses. - PublicKeyData string `json:"publicKeyData,omitempty"` - // ValidAfterTime: The key can be used after this timestamp. - ValidAfterTime string `json:"validAfterTime,omitempty"` - // ValidBeforeTime: The key can be used before this timestamp. For - // system-managed key pairs, this timestamp is the end time for the private key - // signing operation. The public key could still be used for verification for a - // few hours after this time. - ValidBeforeTime string `json:"validBeforeTime,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "DisableReason") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DisableReason") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ServiceAccountKey) MarshalJSON() ([]byte, error) { - type NoMethod ServiceAccountKey - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ServiceConfig: Configuration for a service. -type ServiceConfig struct { - // Domain: Optional. Domain name of the service. Example: console.cloud.google - Domain string `json:"domain,omitempty"` - // ForceSendFields is a list of field names (e.g. "Domain") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Domain") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ServiceConfig) MarshalJSON() ([]byte, error) { - type NoMethod ServiceConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// SetAttestationRulesRequest: Request message for SetAttestationRules. -type SetAttestationRulesRequest struct { - // AttestationRules: Required. The attestation rules to be set. At most 50 - // attestation rules can be set. - AttestationRules []*AttestationRule `json:"attestationRules,omitempty"` - // ForceSendFields is a list of field names (e.g. "AttestationRules") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AttestationRules") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SetAttestationRulesRequest) MarshalJSON() ([]byte, error) { - type NoMethod SetAttestationRulesRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// SetIamPolicyRequest: Request message for `SetIamPolicy` method. -type SetIamPolicyRequest struct { - // Policy: REQUIRED: The complete policy to be applied to the `resource`. The - // size of the policy is limited to a few 10s of KB. An empty policy is a valid - // policy but certain Google Cloud services (such as Projects) might reject - // them. - Policy *Policy `json:"policy,omitempty"` - // UpdateMask: OPTIONAL: A FieldMask specifying which fields of the policy to - // modify. Only the fields in the mask will be modified. If no mask is - // provided, the following default mask is used: `paths: "bindings, etag" - UpdateMask string `json:"updateMask,omitempty"` - // ForceSendFields is a list of field names (e.g. "Policy") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Policy") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SetIamPolicyRequest) MarshalJSON() ([]byte, error) { - type NoMethod SetIamPolicyRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// SignBlobRequest: Deprecated. Migrate to Service Account Credentials API -// (https://cloud.google.com/iam/help/credentials/migrate-api). The service -// account sign blob request. -type SignBlobRequest struct { - // BytesToSign: Required. Deprecated. Migrate to Service Account Credentials - // API (https://cloud.google.com/iam/help/credentials/migrate-api). The bytes - // to sign. - BytesToSign string `json:"bytesToSign,omitempty"` - // ForceSendFields is a list of field names (e.g. "BytesToSign") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "BytesToSign") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SignBlobRequest) MarshalJSON() ([]byte, error) { - type NoMethod SignBlobRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// SignBlobResponse: Deprecated. Migrate to Service Account Credentials API -// (https://cloud.google.com/iam/help/credentials/migrate-api). The service -// account sign blob response. -type SignBlobResponse struct { - // KeyId: Deprecated. Migrate to Service Account Credentials API - // (https://cloud.google.com/iam/help/credentials/migrate-api). The id of the - // key used to sign the blob. - KeyId string `json:"keyId,omitempty"` - // Signature: Deprecated. Migrate to Service Account Credentials API - // (https://cloud.google.com/iam/help/credentials/migrate-api). The signed - // blob. - Signature string `json:"signature,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "KeyId") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "KeyId") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SignBlobResponse) MarshalJSON() ([]byte, error) { - type NoMethod SignBlobResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// SignJwtRequest: Deprecated. Migrate to Service Account Credentials API -// (https://cloud.google.com/iam/help/credentials/migrate-api). The service -// account sign JWT request. -type SignJwtRequest struct { - // Payload: Required. Deprecated. Migrate to Service Account Credentials API - // (https://cloud.google.com/iam/help/credentials/migrate-api). The JWT payload - // to sign. Must be a serialized JSON object that contains a JWT Claims Set. - // For example: `{"sub": "user@example.com", "iat": 313435}` If the JWT Claims - // Set contains an expiration time (`exp`) claim, it must be an integer - // timestamp that is not in the past and no more than 12 hours in the future. - // If the JWT Claims Set does not contain an expiration time (`exp`) claim, - // this claim is added automatically, with a timestamp that is 1 hour in the - // future. - Payload string `json:"payload,omitempty"` - // ForceSendFields is a list of field names (e.g. "Payload") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Payload") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SignJwtRequest) MarshalJSON() ([]byte, error) { - type NoMethod SignJwtRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// SignJwtResponse: Deprecated. Migrate to Service Account Credentials API -// (https://cloud.google.com/iam/help/credentials/migrate-api). The service -// account sign JWT response. -type SignJwtResponse struct { - // KeyId: Deprecated. Migrate to Service Account Credentials API - // (https://cloud.google.com/iam/help/credentials/migrate-api). The id of the - // key used to sign the JWT. - KeyId string `json:"keyId,omitempty"` - // SignedJwt: Deprecated. Migrate to Service Account Credentials API - // (https://cloud.google.com/iam/help/credentials/migrate-api). The signed JWT. - SignedJwt string `json:"signedJwt,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "KeyId") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "KeyId") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SignJwtResponse) MarshalJSON() ([]byte, error) { - type NoMethod SignJwtResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// Status: The `Status` type defines a logical error model that is suitable for -// different programming environments, including REST APIs and RPC APIs. It is -// used by gRPC (https://github.com/grpc). Each `Status` message contains three -// pieces of data: error code, error message, and error details. You can find -// out more about this error model and how to work with it in the API Design -// Guide (https://cloud.google.com/apis/design/errors). -type Status struct { - // Code: The status code, which should be an enum value of google.rpc.Code. - Code int64 `json:"code,omitempty"` - // Details: A list of messages that carry the error details. There is a common - // set of message types for APIs to use. - Details []googleapi.RawMessage `json:"details,omitempty"` - // Message: A developer-facing error message, which should be in English. Any - // user-facing error message should be localized and sent in the - // google.rpc.Status.details field, or localized by the client. - Message string `json:"message,omitempty"` - // ForceSendFields is a list of field names (e.g. "Code") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s Status) MarshalJSON() ([]byte, error) { - type NoMethod Status - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// TestIamPermissionsRequest: Request message for `TestIamPermissions` method. -type TestIamPermissionsRequest struct { - // Permissions: The set of permissions to check for the `resource`. Permissions - // with wildcards (such as `*` or `storage.*`) are not allowed. For more - // information see IAM Overview - // (https://cloud.google.com/iam/docs/overview#permissions). - Permissions []string `json:"permissions,omitempty"` - // ForceSendFields is a list of field names (e.g. "Permissions") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Permissions") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TestIamPermissionsRequest) MarshalJSON() ([]byte, error) { - type NoMethod TestIamPermissionsRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// TestIamPermissionsResponse: Response message for `TestIamPermissions` -// method. -type TestIamPermissionsResponse struct { - // Permissions: A subset of `TestPermissionsRequest.permissions` that the - // caller is allowed. - Permissions []string `json:"permissions,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Permissions") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Permissions") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TestIamPermissionsResponse) MarshalJSON() ([]byte, error) { - type NoMethod TestIamPermissionsResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// TrustAnchor: Represents a root of trust. -type TrustAnchor struct { - // PemCertificate: PEM certificate of the PKI used for validation. Must only - // contain one ca certificate (either root or intermediate cert). - PemCertificate string `json:"pemCertificate,omitempty"` - // ForceSendFields is a list of field names (e.g. "PemCertificate") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "PemCertificate") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TrustAnchor) MarshalJSON() ([]byte, error) { - type NoMethod TrustAnchor - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// TrustStore: Trust store that contains trust anchors and optional -// intermediate CAs used in PKI to build a trust chain(trust hierarchy) and -// verify a client's identity. -type TrustStore struct { - // IntermediateCas: Optional. Set of intermediate CA certificates used for - // building the trust chain to the trust anchor. Important: Intermediate CAs - // are only supported for X.509 federation. - IntermediateCas []*IntermediateCA `json:"intermediateCas,omitempty"` - // TrustAnchors: Required. List of trust anchors to be used while performing - // validation against a given TrustStore. The incoming end entity's certificate - // must be in the trust chain of one of the trust anchors here. - TrustAnchors []*TrustAnchor `json:"trustAnchors,omitempty"` - // TrustDefaultSharedCa: Optional. If set to True, the trust bundle will - // include the private ca managed identity regional root public certificates. - // Important: `trust_default_shared_ca` is only supported for managed identity - // trust domain resource. - TrustDefaultSharedCa bool `json:"trustDefaultSharedCa,omitempty"` - // ForceSendFields is a list of field names (e.g. "IntermediateCas") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "IntermediateCas") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TrustStore) MarshalJSON() ([]byte, error) { - type NoMethod TrustStore - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// UndeleteOauthClientRequest: Request message for UndeleteOauthClient. -type UndeleteOauthClientRequest struct { -} - -// UndeleteRoleRequest: The request to undelete an existing role. -type UndeleteRoleRequest struct { - // Etag: Used to perform a consistent read-modify-write. - Etag string `json:"etag,omitempty"` - // ForceSendFields is a list of field names (e.g. "Etag") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Etag") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s UndeleteRoleRequest) MarshalJSON() ([]byte, error) { - type NoMethod UndeleteRoleRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// UndeleteServiceAccountRequest: The service account undelete request. -type UndeleteServiceAccountRequest struct { -} - -type UndeleteServiceAccountResponse struct { - // RestoredAccount: Metadata for the restored service account. - RestoredAccount *ServiceAccount `json:"restoredAccount,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "RestoredAccount") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "RestoredAccount") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s UndeleteServiceAccountResponse) MarshalJSON() ([]byte, error) { - type NoMethod UndeleteServiceAccountResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// UndeleteWorkforcePoolProviderKeyRequest: Request message for -// UndeleteWorkforcePoolProviderKey. -type UndeleteWorkforcePoolProviderKeyRequest struct { -} - -// UndeleteWorkforcePoolProviderRequest: Request message for -// UndeleteWorkforcePoolProvider. -type UndeleteWorkforcePoolProviderRequest struct { -} - -// UndeleteWorkforcePoolProviderScimTenantRequest: Gemini Enterprise only. -// Request message for UndeleteWorkforcePoolProviderScimTenant. -type UndeleteWorkforcePoolProviderScimTenantRequest struct { -} - -// UndeleteWorkforcePoolRequest: Request message for UndeleteWorkforcePool. -type UndeleteWorkforcePoolRequest struct { -} - -// UndeleteWorkforcePoolSubjectRequest: Request message for -// UndeleteWorkforcePoolSubject. -type UndeleteWorkforcePoolSubjectRequest struct { -} - -// UndeleteWorkloadIdentityPoolManagedIdentityRequest: Request message for -// UndeleteWorkloadIdentityPoolManagedIdentity. -type UndeleteWorkloadIdentityPoolManagedIdentityRequest struct { -} - -// UndeleteWorkloadIdentityPoolNamespaceRequest: Request message for -// UndeleteWorkloadIdentityPoolNamespace. -type UndeleteWorkloadIdentityPoolNamespaceRequest struct { -} - -// UndeleteWorkloadIdentityPoolProviderKeyRequest: Request message for -// UndeleteWorkloadIdentityPoolProviderKey. -type UndeleteWorkloadIdentityPoolProviderKeyRequest struct { -} - -// UndeleteWorkloadIdentityPoolProviderRequest: Request message for -// UndeleteWorkloadIdentityPoolProvider. -type UndeleteWorkloadIdentityPoolProviderRequest struct { -} - -// UndeleteWorkloadIdentityPoolRequest: Request message for -// UndeleteWorkloadIdentityPool. -type UndeleteWorkloadIdentityPoolRequest struct { -} - -// UploadServiceAccountKeyRequest: The service account key upload request. -type UploadServiceAccountKeyRequest struct { - // PublicKeyData: The public key to associate with the service account. Must be - // an RSA public key that is wrapped in an X.509 v3 certificate. Include the - // first line, `-----BEGIN CERTIFICATE-----`, and the last line, `-----END - // CERTIFICATE-----`. - PublicKeyData string `json:"publicKeyData,omitempty"` - // ForceSendFields is a list of field names (e.g. "PublicKeyData") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "PublicKeyData") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s UploadServiceAccountKeyRequest) MarshalJSON() ([]byte, error) { - type NoMethod UploadServiceAccountKeyRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// WorkforcePool: Represents a collection of external workforces. Provides -// namespaces for federated users that can be referenced in IAM policies. -type WorkforcePool struct { - // AccessRestrictions: Optional. Configure access restrictions on the workforce - // pool users. This is an optional field. If specified web sign-in can be - // restricted to given set of services or programmatic sign-in can be disabled - // for pool users. - AccessRestrictions *AccessRestrictions `json:"accessRestrictions,omitempty"` - // Description: Optional. A description of the pool. Cannot exceed 256 - // characters. - Description string `json:"description,omitempty"` - // Disabled: Optional. Disables the workforce pool. You cannot use a disabled - // pool to exchange tokens, or use existing tokens to access resources. If the - // pool is re-enabled, existing tokens grant access again. - Disabled bool `json:"disabled,omitempty"` - // DisplayName: Optional. A display name for the pool. Cannot exceed 32 - // characters. - DisplayName string `json:"displayName,omitempty"` - // ExpireTime: Output only. Time after which the workforce pool will be - // permanently purged and cannot be recovered. - ExpireTime string `json:"expireTime,omitempty"` - // Name: Identifier. The resource name of the pool. Format: - // `locations/{location}/workforcePools/{workforce_pool_id}` - Name string `json:"name,omitempty"` - // Parent: Immutable. The resource name of the parent. Format: - // `organizations/{org-id}`. - Parent string `json:"parent,omitempty"` - // SessionDuration: Optional. Duration that the Google Cloud access tokens, - // console sign-in sessions, and `gcloud` sign-in sessions from this pool are - // valid. Must be greater than 15 minutes (900s) and less than 12 hours - // (43200s). If `session_duration` is not configured, minted credentials have a - // default duration of one hour (3600s). For SAML providers, the lifetime of - // the token is the minimum of the `session_duration` and the - // `SessionNotOnOrAfter` claim in the SAML assertion. - SessionDuration string `json:"sessionDuration,omitempty"` - // State: Output only. The state of the pool. - // - // Possible values: - // "STATE_UNSPECIFIED" - State unspecified. - // "ACTIVE" - The pool is active and may be used in Google Cloud policies. - // "DELETED" - The pool is soft-deleted. Soft-deleted pools are permanently - // deleted after approximately 30 days. You can restore a soft-deleted pool - // using UndeleteWorkforcePool. You cannot reuse the ID of a soft-deleted pool - // until it is permanently deleted. While a pool is deleted, you cannot use it - // to exchange tokens, or use existing tokens to access resources. If the pool - // is undeleted, existing tokens grant access again. - State string `json:"state,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "AccessRestrictions") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AccessRestrictions") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s WorkforcePool) MarshalJSON() ([]byte, error) { - type NoMethod WorkforcePool - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// WorkforcePoolProvider: A configuration for an external identity provider. -type WorkforcePoolProvider struct { - // AttributeCondition: Optional. A Common Expression Language - // (https://opensource.google/projects/cel) expression, in plain text, to - // restrict what otherwise valid authentication credentials issued by the - // provider should not be accepted. The expression must output a boolean - // representing whether to allow the federation. The following keywords may be - // referenced in the expressions: * `assertion`: JSON representing the - // authentication credential issued by the provider. * `google`: The Google - // attributes mapped from the assertion in the `attribute_mappings`. - // `google.profile_photo`, `google.display_name` and `google.posix_username` - // are not supported. * `attribute`: The custom attributes mapped from the - // assertion in the `attribute_mappings`. The maximum length of the attribute - // condition expression is 4096 characters. If unspecified, all valid - // authentication credentials will be accepted. The following example shows how - // to only allow credentials with a mapped `google.groups` value of `admins`: - // ``` "'admins' in google.groups" ``` - AttributeCondition string `json:"attributeCondition,omitempty"` - // AttributeMapping: Required. Maps attributes from the authentication - // credentials issued by an external identity provider to Google Cloud - // attributes, such as `subject` and `segment`. Each key must be a string - // specifying the Google Cloud IAM attribute to map to. The following keys are - // supported: * `google.subject`: The principal IAM is authenticating. You can - // reference this value in IAM bindings. This is also the subject that appears - // in Cloud Logging logs. This is a required field and the mapped subject - // cannot exceed 127 bytes. * `google.groups`: Groups the authenticating user - // belongs to. You can grant groups access to resources using an IAM - // `principalSet` binding; access applies to all members of the group. * - // `google.display_name`: The name of the authenticated user. This is an - // optional field and the mapped display name cannot exceed 100 bytes. If not - // set, `google.subject` will be displayed instead. This attribute cannot be - // referenced in IAM bindings. * `google.profile_photo`: The URL that specifies - // the authenticated user's thumbnail photo. This is an optional field. When - // set, the image will be visible as the user's profile picture. If not set, a - // generic user icon will be displayed instead. This attribute cannot be - // referenced in IAM bindings. * `google.posix_username`: The Linux username - // used by OS Login. This is an optional field and the mapped POSIX username - // cannot exceed 32 characters. The key must match the regex - // `^a-zA-Z0-9._{0,31}$`. This attribute cannot be referenced in IAM bindings. - // You can also provide custom attributes by specifying - // `attribute.{custom_attribute}`, where {custom_attribute} is the name of the - // custom attribute to be mapped. You can define a maximum of 50 custom - // attributes. The maximum length of a mapped attribute key is 100 characters, - // and the key may only contain the characters `[a-z0-9_]`. You can reference - // these attributes in IAM policies to define fine-grained access for a - // workforce pool to Google Cloud resources. For example: * `google.subject`: - // `principal://iam.googleapis.com/locations/global/workforcePools/{pool}/subjec - // t/{value}` * `google.groups`: - // `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool}/gro - // up/{value}` * `attribute.{custom_attribute}`: - // `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool}/att - // ribute.{custom_attribute}/{value}` Each value must be a [Common Expression - // Language] (https://opensource.google/projects/cel) function that maps an - // identity provider credential to the normalized attribute specified by the - // corresponding map key. You can use the `assertion` keyword in the expression - // to access a JSON representation of the authentication credential issued by - // the provider. The maximum length of an attribute mapping expression is 2048 - // characters. When evaluated, the total size of all mapped attributes must not - // exceed 16 KB. For OIDC providers, you must supply a custom mapping that - // includes the `google.subject` attribute. For example, the following maps the - // `sub` claim of the incoming credential to the `subject` attribute on a - // Google token: ``` {"google.subject": "assertion.sub"} ``` - AttributeMapping map[string]string `json:"attributeMapping,omitempty"` - // Description: Optional. A description of the provider. Cannot exceed 256 - // characters. - Description string `json:"description,omitempty"` - // DetailedAuditLogging: Optional. If true, populates additional debug - // information in Cloud Audit Logs for this provider. Logged attribute mappings - // and values can be found in `sts.googleapis.com` data access logs. Default - // value is false. - DetailedAuditLogging bool `json:"detailedAuditLogging,omitempty"` - // Disabled: Optional. Disables the workforce pool provider. You cannot use a - // disabled provider to exchange tokens. However, existing tokens still grant - // access. - Disabled bool `json:"disabled,omitempty"` - // DisplayName: Optional. A display name for the provider. Cannot exceed 32 - // characters. - DisplayName string `json:"displayName,omitempty"` - // ExpireTime: Output only. Time after which the workforce identity pool - // provider will be permanently purged and cannot be recovered. - ExpireTime string `json:"expireTime,omitempty"` - // ExtendedAttributesOauth2Client: Optional. The configuration for OAuth 2.0 - // client used to get the extended group memberships for user identities. Only - // the `AZURE_AD_GROUPS_ID` attribute type is supported. Extended groups - // supports a subset of Google Cloud services. When the user accesses these - // services, extended group memberships override the mapped `google.groups` - // attribute. Extended group memberships cannot be used in attribute mapping or - // attribute condition expressions. To keep extended group memberships up to - // date, extended groups are retrieved when the user signs in and at regular - // intervals during the user's active session. Each user identity in the - // workforce identity pool must map to a unique Microsoft Entra ID user. - ExtendedAttributesOauth2Client *GoogleIamAdminV1WorkforcePoolProviderExtraAttributesOAuth2Client `json:"extendedAttributesOauth2Client,omitempty"` - // ExtraAttributesOauth2Client: Optional. Defines the configuration for the - // OAuth 2.0 client that is used to get the additional user attributes in a - // separate backchannel call to the identity provider. This should be used when - // users can't get the required claims in authentication credentials. - // Currently, the OAuth 2.0 protocol is the only supported authorization method - // for this backchannel call. - ExtraAttributesOauth2Client *GoogleIamAdminV1WorkforcePoolProviderExtraAttributesOAuth2Client `json:"extraAttributesOauth2Client,omitempty"` - // Name: Identifier. The resource name of the provider. Format: - // `locations/{location}/workforcePools/{workforce_pool_id}/providers/{provider_ - // id}` - Name string `json:"name,omitempty"` - // Oidc: An OpenID Connect 1.0 identity provider configuration. - Oidc *GoogleIamAdminV1WorkforcePoolProviderOidc `json:"oidc,omitempty"` - // Saml: A SAML identity provider configuration. - Saml *GoogleIamAdminV1WorkforcePoolProviderSaml `json:"saml,omitempty"` - // ScimUsage: Optional. Gemini Enterprise only. Specifies whether the workforce - // identity pool provider uses SCIM-managed groups instead of the - // `google.groups` attribute mapping for authorization checks. The `scim_usage` - // and `extended_attributes_oauth2_client` fields are mutually exclusive. A - // request that enables both fields on the same workforce identity pool - // provider will produce an error. - // - // Possible values: - // "SCIM_USAGE_UNSPECIFIED" - Gemini Enterprise only. Do not use SCIM data. - // "ENABLED_FOR_GROUPS" - Gemini Enterprise only. SCIM sync is enabled and - // SCIM-managed groups are used for authorization checks. - ScimUsage string `json:"scimUsage,omitempty"` - // State: Output only. The state of the provider. - // - // Possible values: - // "STATE_UNSPECIFIED" - State unspecified. - // "ACTIVE" - The provider is active and may be used to validate - // authentication credentials. - // "DELETED" - The provider is soft-deleted. Soft-deleted providers are - // permanently deleted after approximately 30 days. You can restore a - // soft-deleted provider using UndeleteWorkforcePoolProvider. - State string `json:"state,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "AttributeCondition") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AttributeCondition") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s WorkforcePoolProvider) MarshalJSON() ([]byte, error) { - type NoMethod WorkforcePoolProvider - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// WorkforcePoolProviderKey: Represents a public key configuration for a -// Workforce Pool Provider. The key can be configured in your identity provider -// to encrypt SAML assertions. Google holds the corresponding private key, -// which it uses to decrypt encrypted tokens. -type WorkforcePoolProviderKey struct { - // ExpireTime: Output only. The time after which the key will be permanently - // deleted and cannot be recovered. Note that the key may get purged before - // this time if the total limit of keys per provider is exceeded. - ExpireTime string `json:"expireTime,omitempty"` - // KeyData: Immutable. Public half of the asymmetric key. - KeyData *KeyData `json:"keyData,omitempty"` - // Name: Identifier. The resource name of the key. Format: - // `locations/{location}/workforcePools/{workforce_pool_id}/providers/{provider_ - // id}/keys/{key_id}` - Name string `json:"name,omitempty"` - // State: Output only. The state of the key. - // - // Possible values: - // "STATE_UNSPECIFIED" - State unspecified. - // "ACTIVE" - The key is active. - // "DELETED" - The key is soft-deleted. Soft-deleted keys are permanently - // deleted after approximately 30 days. You can restore a soft-deleted key - // using UndeleteWorkforcePoolProviderKey. - State string `json:"state,omitempty"` - // Use: Required. The purpose of the key. - // - // Possible values: - // "KEY_USE_UNSPECIFIED" - KeyUse unspecified. Do not use. The purpose of the - // key must be specified. - // "ENCRYPTION" - The key is used for encryption. - Use string `json:"use,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "ExpireTime") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ExpireTime") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s WorkforcePoolProviderKey) MarshalJSON() ([]byte, error) { - type NoMethod WorkforcePoolProviderKey - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// WorkforcePoolProviderScimTenant: Gemini Enterprise only. Represents a SCIM -// tenant. Used for provisioning and managing identity data (such as Users and -// Groups) in cross-domain environments. -type WorkforcePoolProviderScimTenant struct { - // BaseUri: Output only. Gemini Enterprise only. Represents the base URI as - // defined in RFC 7644, Section 1.3 - // (https://datatracker.ietf.org/doc/html/rfc7644#section-1.3). Clients must - // use this as the root address for managing resources under the tenant. - // Format: https://iamscim.googleapis.com/{version}/{tenant_id}/ - BaseUri string `json:"baseUri,omitempty"` - // ClaimMapping: Required. Immutable. Gemini Enterprise only. Maps SCIM - // attributes to Google attributes. This mapping is used to associate the - // attributes synced via SCIM with the Google Cloud attributes used in IAM - // policies for Workforce Identity Federation. SCIM-managed user and group - // attributes are mapped to `google.subject` and `google.group` respectively. - // Each key must be a string specifying the Google Cloud IAM attribute to map - // to. The supported keys are as follows: * `google.subject`: The principal IAM - // is authenticating. You can reference this value in IAM bindings. This is - // also the subject that appears in Cloud Logging logs. This is a required - // field and the mapped subject cannot exceed 127 bytes. * `google.group`: - // Group the authenticating user belongs to. You can grant group access to - // resources using an IAM `principalSet` binding; access applies to all members - // of the group. Each value must be a [Common Expression Language] - // (https://opensource.google/projects/cel) expression that maps SCIM user or - // group attribute to the normalized attribute specified by the corresponding - // map key. Example: To map the SCIM user's `externalId` to `google.subject` - // and the SCIM group's `externalId` to `google.group`: ``` { "google.subject": - // "user.externalId", "google.group": "group.externalId" } ``` - ClaimMapping map[string]string `json:"claimMapping,omitempty"` - // Description: Optional. Gemini Enterprise only. The description of the SCIM - // tenant. Cannot exceed 256 characters. - Description string `json:"description,omitempty"` - // DisplayName: Optional. Gemini Enterprise only. The display name of the SCIM - // tenant. Cannot exceed 32 characters. - DisplayName string `json:"displayName,omitempty"` - // Name: Identifier. Gemini Enterprise only. The resource name of the SCIM - // Tenant. Format: - // `locations/{location}/workforcePools/{workforce_pool}/providers/ - // {workforce_pool_provider}/scimTenants/{scim_tenant}` - Name string `json:"name,omitempty"` - // PurgeTime: Output only. Gemini Enterprise only. The timestamp that - // represents the time when the SCIM tenant is purged. - PurgeTime string `json:"purgeTime,omitempty"` - // ServiceAgent: Output only. Service Agent created by SCIM Tenant API. SCIM - // tokens created under this tenant will be attached to this service agent. - ServiceAgent string `json:"serviceAgent,omitempty"` - // State: Output only. Gemini Enterprise only. The state of the tenant. - // - // Possible values: - // "STATE_UNSPECIFIED" - Gemini Enterprise only. State unspecified. - // "ACTIVE" - Gemini Enterprise only. The tenant is active and may be used to - // provision users and groups. - // "DELETED" - Gemini Enterprise only. The tenant is soft-deleted. - // Soft-deleted tenants are permanently deleted after approximately 30 days. - State string `json:"state,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "BaseUri") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "BaseUri") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s WorkforcePoolProviderScimTenant) MarshalJSON() ([]byte, error) { - type NoMethod WorkforcePoolProviderScimTenant - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// WorkforcePoolProviderScimToken: Gemini Enterprise only. Represents a token -// for the WorkforcePoolProviderScimTenant. Used for authenticating SCIM -// provisioning requests. -type WorkforcePoolProviderScimToken struct { - // DisplayName: Optional. Gemini Enterprise only. The display name of the SCIM - // token. Cannot exceed 32 characters. - DisplayName string `json:"displayName,omitempty"` - // Name: Identifier. Gemini Enterprise only. The resource name of the SCIM - // Token. Format: - // `locations/{location}/workforcePools/{workforce_pool}/providers/ - // {workforce_pool_provider}/scimTenants/{scim_tenant}/tokens/{token}` - Name string `json:"name,omitempty"` - // SecurityToken: Output only. Gemini Enterprise only. The token string. - // Provide this to the IdP for authentication. Will be set only during - // creation. - SecurityToken string `json:"securityToken,omitempty"` - // State: Output only. Gemini Enterprise only. The state of the token. - // - // Possible values: - // "STATE_UNSPECIFIED" - Gemini Enterprise only. State unspecified. - // "ACTIVE" - Gemini Enterprise only. The token is active and may be used to - // provision users and groups. - // "DELETED" - Gemini Enterprise only. The token is soft-deleted. - // Soft-deleted tokens are permanently deleted after approximately 30 days. - State string `json:"state,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "DisplayName") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DisplayName") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s WorkforcePoolProviderScimToken) MarshalJSON() ([]byte, error) { - type NoMethod WorkforcePoolProviderScimToken - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// WorkloadIdentityPool: Represents a collection of workload identities. You -// can define IAM policies to grant these identities access to Google Cloud -// resources. -type WorkloadIdentityPool struct { - // Description: Optional. A description of the pool. Cannot exceed 256 - // characters. - Description string `json:"description,omitempty"` - // Disabled: Optional. Whether the pool is disabled. You cannot use a disabled - // pool to exchange tokens, or use existing tokens to access resources. If the - // pool is re-enabled, existing tokens grant access again. - Disabled bool `json:"disabled,omitempty"` - // DisplayName: Optional. A display name for the pool. Cannot exceed 32 - // characters. - DisplayName string `json:"displayName,omitempty"` - // ExpireTime: Output only. Time after which the workload identity pool will be - // permanently purged and cannot be recovered. - ExpireTime string `json:"expireTime,omitempty"` - // InlineCertificateIssuanceConfig: Optional. Defines the Certificate Authority - // (CA) pool resources and configurations required for issuance and rotation of - // mTLS workload certificates. - InlineCertificateIssuanceConfig *InlineCertificateIssuanceConfig `json:"inlineCertificateIssuanceConfig,omitempty"` - // InlineTrustConfig: Optional. Represents config to add additional trusted - // trust domains. - InlineTrustConfig *InlineTrustConfig `json:"inlineTrustConfig,omitempty"` - // Mode: Immutable. The mode the pool is operating in. - // - // Possible values: - // "MODE_UNSPECIFIED" - State unspecified. New pools should not use this - // mode. Pools with an unspecified mode will operate as if they are in - // federation-only mode. - // "FEDERATION_ONLY" - Federation-only mode. FEDERATION_ONLY mode pools can - // only be used for federating external workload identities into Google Cloud. - // Unless otherwise noted, no structure or format constraints are applied to - // workload identities in a FEDERATION_ONLY mode pool, and you cannot create - // any resources within the pool besides providers. - // "TRUST_DOMAIN" - Trust-domain mode. TRUST_DOMAIN mode pools can be used to - // assign identities to Google Cloud workloads. Identities within a - // TRUST_DOMAIN mode pool share the same root of trust. - // WorkloadIdentityPoolProviders cannot be created within trust-domain pools. - // "SYSTEM_TRUST_DOMAIN" - SYSTEM_TRUST_DOMAIN mode pools are managed by - // Google Cloud services. Neither WorkloadIdentityPoolNamespaces nor - // WorkloadIdentityPoolProviders can be created within SYSTEM_TRUST_DOMAIN mode - // pools. All identities within a SYSTEM_TRUST_DOMAIN mode pool are in one of - // the following formats: * `spiffe:///ns//sa/` * `spiffe:///resources//` - Mode string `json:"mode,omitempty"` - // Name: Identifier. The resource name of the pool. - Name string `json:"name,omitempty"` - // State: Output only. The state of the pool. - // - // Possible values: - // "STATE_UNSPECIFIED" - State unspecified. - // "ACTIVE" - The pool is active, and may be used in Google Cloud policies. - // "DELETED" - The pool is soft-deleted. Soft-deleted pools are permanently - // deleted after approximately 30 days. You can restore a soft-deleted pool - // using UndeleteWorkloadIdentityPool. You cannot reuse the ID of a - // soft-deleted pool until it is permanently deleted. While a pool is deleted, - // you cannot use it to exchange tokens, or use existing tokens to access - // resources. If the pool is undeleted, existing tokens grant access again. - State string `json:"state,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Description") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Description") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s WorkloadIdentityPool) MarshalJSON() ([]byte, error) { - type NoMethod WorkloadIdentityPool - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// WorkloadIdentityPoolManagedIdentity: Represents a managed identity for a -// workload identity pool namespace. -type WorkloadIdentityPoolManagedIdentity struct { - // Description: Optional. A description of the managed identity. Cannot exceed - // 256 characters. - Description string `json:"description,omitempty"` - // Disabled: Optional. Whether the managed identity is disabled. If disabled, - // credentials may no longer be issued for the identity, however existing - // credentials will still be accepted until they expire. - Disabled bool `json:"disabled,omitempty"` - // ExpireTime: Output only. Time after which the managed identity will be - // permanently purged and cannot be recovered. - ExpireTime string `json:"expireTime,omitempty"` - // Name: Identifier. The resource name of the managed identity. - Name string `json:"name,omitempty"` - // State: Output only. The state of the managed identity. - // - // Possible values: - // "STATE_UNSPECIFIED" - State unspecified. - // "ACTIVE" - The managed identity is active. - // "DELETED" - The managed identity is soft-deleted. Soft-deleted managed - // identities are permanently deleted after approximately 30 days. You can - // restore a soft-deleted managed identity using - // UndeleteWorkloadIdentityPoolManagedIdentity. You cannot reuse the ID of a - // soft-deleted managed identity until it is permanently deleted. - State string `json:"state,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Description") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Description") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s WorkloadIdentityPoolManagedIdentity) MarshalJSON() ([]byte, error) { - type NoMethod WorkloadIdentityPoolManagedIdentity - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// WorkloadIdentityPoolNamespace: Represents a namespace for a workload -// identity pool. Namespaces are used to segment identities within the pool. -type WorkloadIdentityPoolNamespace struct { - // Description: Optional. A description of the namespace. Cannot exceed 256 - // characters. - Description string `json:"description,omitempty"` - // Disabled: Optional. Whether the namespace is disabled. If disabled, - // credentials may no longer be issued for identities within this namespace, - // however existing credentials will still be accepted until they expire. - Disabled bool `json:"disabled,omitempty"` - // ExpireTime: Output only. Time after which the namespace will be permanently - // purged and cannot be recovered. - ExpireTime string `json:"expireTime,omitempty"` - // Name: Identifier. The resource name of the namespace. - Name string `json:"name,omitempty"` - // OwnerService: Output only. The Google Cloud service that owns this - // namespace. - OwnerService *OwnerService `json:"ownerService,omitempty"` - // State: Output only. The state of the namespace. - // - // Possible values: - // "STATE_UNSPECIFIED" - State unspecified. - // "ACTIVE" - The namespace is active. - // "DELETED" - The namespace is soft-deleted. Soft-deleted namespaces are - // permanently deleted after approximately 30 days. You can restore a - // soft-deleted namespace using UndeleteWorkloadIdentityPoolNamespace. You - // cannot reuse the ID of a soft-deleted namespace until it is permanently - // deleted. - State string `json:"state,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Description") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Description") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s WorkloadIdentityPoolNamespace) MarshalJSON() ([]byte, error) { - type NoMethod WorkloadIdentityPoolNamespace - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// WorkloadIdentityPoolOperationMetadata: Metadata for long-running -// WorkloadIdentityPool operations. -type WorkloadIdentityPoolOperationMetadata struct { -} - -// WorkloadIdentityPoolProvider: A configuration for an external identity -// provider. -type WorkloadIdentityPoolProvider struct { - // AttributeCondition: Optional. A Common Expression Language - // (https://opensource.google/projects/cel) expression, in plain text, to - // restrict what otherwise valid authentication credentials issued by the - // provider should not be accepted. The expression must output a boolean - // representing whether to allow the federation. The following keywords may be - // referenced in the expressions: * `assertion`: JSON representing the - // authentication credential issued by the provider. * `google`: The Google - // attributes mapped from the assertion in the `attribute_mappings`. * - // `attribute`: The custom attributes mapped from the assertion in the - // `attribute_mappings`. The maximum length of the attribute condition - // expression is 4096 characters. If unspecified, all valid authentication - // credential are accepted. The following example shows how to only allow - // credentials with a mapped `google.groups` value of `admins`: ``` "'admins' - // in google.groups" ``` - AttributeCondition string `json:"attributeCondition,omitempty"` - // AttributeMapping: Optional. Maps attributes from authentication credentials - // issued by an external identity provider to Google Cloud attributes, such as - // `subject` and `segment`. Each key must be a string specifying the Google - // Cloud IAM attribute to map to. The following keys are supported: * - // `google.subject`: The principal IAM is authenticating. You can reference - // this value in IAM bindings. This is also the subject that appears in Cloud - // Logging logs. Cannot exceed 127 bytes. * `google.groups`: Groups the - // external identity belongs to. You can grant groups access to resources using - // an IAM `principalSet` binding; access applies to all members of the group. - // You can also provide custom attributes by specifying - // `attribute.{custom_attribute}`, where `{custom_attribute}` is the name of - // the custom attribute to be mapped. You can define a maximum of 50 custom - // attributes. The maximum length of a mapped attribute key is 100 characters, - // and the key may only contain the characters [a-z0-9_]. You can reference - // these attributes in IAM policies to define fine-grained access for a - // workload to Google Cloud resources. For example: * `google.subject`: - // `principal://iam.googleapis.com/projects/{project}/locations/{location}/workl - // oadIdentityPools/{pool}/subject/{value}` * `google.groups`: - // `principalSet://iam.googleapis.com/projects/{project}/locations/{location}/wo - // rkloadIdentityPools/{pool}/group/{value}` * `attribute.{custom_attribute}`: - // `principalSet://iam.googleapis.com/projects/{project}/locations/{location}/wo - // rkloadIdentityPools/{pool}/attribute.{custom_attribute}/{value}` Each value - // must be a [Common Expression Language] - // (https://opensource.google/projects/cel) function that maps an identity - // provider credential to the normalized attribute specified by the - // corresponding map key. You can use the `assertion` keyword in the expression - // to access a JSON representation of the authentication credential issued by - // the provider. The maximum length of an attribute mapping expression is 2048 - // characters. When evaluated, the total size of all mapped attributes must not - // exceed 8KB. For AWS providers, if no attribute mapping is defined, the - // following default mapping applies: ``` { "google.subject":"assertion.arn", - // "attribute.aws_role": "assertion.arn.contains('assumed-role')" " ? - // assertion.arn.extract('{account_arn}assumed-role/')" " + 'assumed-role/'" " - // + assertion.arn.extract('assumed-role/{role_name}/')" " : assertion.arn", } - // ``` If any custom attribute mappings are defined, they must include a - // mapping to the `google.subject` attribute. For OIDC providers, you must - // supply a custom mapping, which must include the `google.subject` attribute. - // For example, the following maps the `sub` claim of the incoming credential - // to the `subject` attribute on a Google token: ``` {"google.subject": - // "assertion.sub"} ``` - AttributeMapping map[string]string `json:"attributeMapping,omitempty"` - // Aws: An Amazon Web Services identity provider. - Aws *Aws `json:"aws,omitempty"` - // Description: Optional. A description for the provider. Cannot exceed 256 - // characters. - Description string `json:"description,omitempty"` - // Disabled: Optional. Whether the provider is disabled. You cannot use a - // disabled provider to exchange tokens. However, existing tokens still grant - // access. - Disabled bool `json:"disabled,omitempty"` - // DisplayName: Optional. A display name for the provider. Cannot exceed 32 - // characters. - DisplayName string `json:"displayName,omitempty"` - // ExpireTime: Output only. Time after which the workload identity pool - // provider will be permanently purged and cannot be recovered. - ExpireTime string `json:"expireTime,omitempty"` - // Name: Identifier. The resource name of the provider. - Name string `json:"name,omitempty"` - // Oidc: An OpenId Connect 1.0 identity provider. - Oidc *Oidc `json:"oidc,omitempty"` - // Saml: An SAML 2.0 identity provider. - Saml *Saml `json:"saml,omitempty"` - // State: Output only. The state of the provider. - // - // Possible values: - // "STATE_UNSPECIFIED" - State unspecified. - // "ACTIVE" - The provider is active, and may be used to validate - // authentication credentials. - // "DELETED" - The provider is soft-deleted. Soft-deleted providers are - // permanently deleted after approximately 30 days. You can restore a - // soft-deleted provider using UndeleteWorkloadIdentityPoolProvider. You cannot - // reuse the ID of a soft-deleted provider until it is permanently deleted. - State string `json:"state,omitempty"` - // X509: An X.509-type identity provider. - X509 *X509 `json:"x509,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "AttributeCondition") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AttributeCondition") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s WorkloadIdentityPoolProvider) MarshalJSON() ([]byte, error) { - type NoMethod WorkloadIdentityPoolProvider - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// WorkloadIdentityPoolProviderKey: Represents a public key configuration for -// your workload identity pool provider. The key can be configured in your -// identity provider to encrypt the SAML assertions. Google holds the -// corresponding private key which it uses to decrypt encrypted tokens. -type WorkloadIdentityPoolProviderKey struct { - // ExpireTime: Output only. Time after which the key will be permanently purged - // and cannot be recovered. Note that the key may get purged before this - // timestamp if the total limit of keys per provider is crossed. - ExpireTime string `json:"expireTime,omitempty"` - // KeyData: Immutable. Public half of the asymmetric key. - KeyData *KeyData `json:"keyData,omitempty"` - // Name: Identifier. The resource name of the key. - Name string `json:"name,omitempty"` - // State: Output only. The state of the key. - // - // Possible values: - // "STATE_UNSPECIFIED" - State unspecified. - // "ACTIVE" - The key is active. - // "DELETED" - The key is soft-deleted. Soft-deleted keys are permanently - // deleted after approximately 30 days. You can restore a soft-deleted key - // using UndeleteWorkloadIdentityPoolProviderKey. While a key is deleted, you - // cannot use it during the federation. - State string `json:"state,omitempty"` - // Use: Required. The purpose of the key. - // - // Possible values: - // "KEY_USE_UNSPECIFIED" - The key use is not known. - // "ENCRYPTION" - The public key is used for encryption purposes. - Use string `json:"use,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "ExpireTime") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ExpireTime") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s WorkloadIdentityPoolProviderKey) MarshalJSON() ([]byte, error) { - type NoMethod WorkloadIdentityPoolProviderKey - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// X509: An X.509-type identity provider represents a CA. It is trusted to -// assert a client identity if the client has a certificate that chains up to -// this CA. -type X509 struct { - // TrustStore: Required. A TrustStore. Use this trust store as a wrapper to - // config the trust anchor and optional intermediate cas to help build the - // trust chain for the incoming end entity certificate. Follow the X.509 - // guidelines to define those PEM encoded certs. Only one trust store is - // currently supported. - TrustStore *TrustStore `json:"trustStore,omitempty"` - // ForceSendFields is a list of field names (e.g. "TrustStore") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "TrustStore") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s X509) MarshalJSON() ([]byte, error) { - type NoMethod X509 - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type IamPoliciesLintPolicyCall struct { - s *Service - lintpolicyrequest *LintPolicyRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// LintPolicy: Lints, or validates, an IAM policy. Currently checks the -// google.iam.v1.Binding.condition field, which contains a condition expression -// for a role binding. Successful calls to this method always return an HTTP -// `200 OK` status code, even if the linter detects an issue in the IAM policy. -func (r *IamPoliciesService) LintPolicy(lintpolicyrequest *LintPolicyRequest) *IamPoliciesLintPolicyCall { - c := &IamPoliciesLintPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.lintpolicyrequest = lintpolicyrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *IamPoliciesLintPolicyCall) Fields(s ...googleapi.Field) *IamPoliciesLintPolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *IamPoliciesLintPolicyCall) Context(ctx context.Context) *IamPoliciesLintPolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *IamPoliciesLintPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *IamPoliciesLintPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.lintpolicyrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/iamPolicies:lintPolicy") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "iam.iamPolicies.lintPolicy", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "iam.iamPolicies.lintPolicy" call. -// Any non-2xx status code is an error. Response headers are in either -// *LintPolicyResponse.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified was -// returned. -func (c *IamPoliciesLintPolicyCall) Do(opts ...googleapi.CallOption) (*LintPolicyResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &LintPolicyResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "iam.iamPolicies.lintPolicy", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type IamPoliciesQueryAuditableServicesCall struct { - s *Service - queryauditableservicesrequest *QueryAuditableServicesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// QueryAuditableServices: Returns a list of services that allow you to opt -// into audit logs that are not generated by default. To learn more about audit -// logs, see the Logging documentation -// (https://cloud.google.com/logging/docs/audit). -func (r *IamPoliciesService) QueryAuditableServices(queryauditableservicesrequest *QueryAuditableServicesRequest) *IamPoliciesQueryAuditableServicesCall { - c := &IamPoliciesQueryAuditableServicesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.queryauditableservicesrequest = queryauditableservicesrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *IamPoliciesQueryAuditableServicesCall) Fields(s ...googleapi.Field) *IamPoliciesQueryAuditableServicesCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *IamPoliciesQueryAuditableServicesCall) Context(ctx context.Context) *IamPoliciesQueryAuditableServicesCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *IamPoliciesQueryAuditableServicesCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *IamPoliciesQueryAuditableServicesCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.queryauditableservicesrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/iamPolicies:queryAuditableServices") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "iam.iamPolicies.queryAuditableServices", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "iam.iamPolicies.queryAuditableServices" call. -// Any non-2xx status code is an error. Response headers are in either -// *QueryAuditableServicesResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *IamPoliciesQueryAuditableServicesCall) Do(opts ...googleapi.CallOption) (*QueryAuditableServicesResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &QueryAuditableServicesResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "iam.iamPolicies.queryAuditableServices", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type LocationsWorkforcePoolsCreateCall struct { - s *Service - location string - workforcepool *WorkforcePool - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Create: Creates a new WorkforcePool. You cannot reuse the name of a deleted -// pool until 30 days after deletion. -// -// - location: Optional. The location of the pool to create. Format: -// `locations/{location}`. -func (r *LocationsWorkforcePoolsService) Create(location string, workforcepool *WorkforcePool) *LocationsWorkforcePoolsCreateCall { - c := &LocationsWorkforcePoolsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.location = location - c.workforcepool = workforcepool - return c -} - -// WorkforcePoolId sets the optional parameter "workforcePoolId": The ID to use -// for the pool, which becomes the final component of the resource name. The -// IDs must be a globally unique string of 6 to 63 lowercase letters, digits, -// or hyphens. It must start with a letter, and cannot have a trailing hyphen. -// The prefix `gcp-` is reserved for use by Google, and may not be specified. -func (c *LocationsWorkforcePoolsCreateCall) WorkforcePoolId(workforcePoolId string) *LocationsWorkforcePoolsCreateCall { - c.urlParams_.Set("workforcePoolId", workforcePoolId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *LocationsWorkforcePoolsCreateCall) Fields(s ...googleapi.Field) *LocationsWorkforcePoolsCreateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *LocationsWorkforcePoolsCreateCall) Context(ctx context.Context) *LocationsWorkforcePoolsCreateCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *LocationsWorkforcePoolsCreateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *LocationsWorkforcePoolsCreateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.workforcepool) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+location}/workforcePools") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "location": c.location, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "iam.locations.workforcePools.create", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "iam.locations.workforcePools.create" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *LocationsWorkforcePoolsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "iam.locations.workforcePools.create", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type LocationsWorkforcePoolsDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes a WorkforcePool. You cannot use a deleted WorkforcePool to -// exchange external credentials for Google Cloud credentials. However, -// deletion does not revoke credentials that have already been issued. -// Credentials issued for a deleted pool do not grant access to resources. If -// the pool is undeleted, and the credentials are not expired, they grant -// access again. You can undelete a pool for 30 days. After 30 days, deletion -// is permanent. You cannot update deleted pools. However, you can view and -// list them. -// -// - name: The name of the pool to delete. Format: -// `locations/{location}/workforcePools/{workforce_pool_id}`. -func (r *LocationsWorkforcePoolsService) Delete(name string) *LocationsWorkforcePoolsDeleteCall { - c := &LocationsWorkforcePoolsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *LocationsWorkforcePoolsDeleteCall) Fields(s ...googleapi.Field) *LocationsWorkforcePoolsDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *LocationsWorkforcePoolsDeleteCall) Context(ctx context.Context) *LocationsWorkforcePoolsDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *LocationsWorkforcePoolsDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *LocationsWorkforcePoolsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "iam.locations.workforcePools.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "iam.locations.workforcePools.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *LocationsWorkforcePoolsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "iam.locations.workforcePools.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type LocationsWorkforcePoolsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Gets an individual WorkforcePool. -// -// - name: The name of the pool to retrieve. Format: -// `locations/{location}/workforcePools/{workforce_pool_id}`. -func (r *LocationsWorkforcePoolsService) Get(name string) *LocationsWorkforcePoolsGetCall { - c := &LocationsWorkforcePoolsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *LocationsWorkforcePoolsGetCall) Fields(s ...googleapi.Field) *LocationsWorkforcePoolsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *LocationsWorkforcePoolsGetCall) IfNoneMatch(entityTag string) *LocationsWorkforcePoolsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *LocationsWorkforcePoolsGetCall) Context(ctx context.Context) *LocationsWorkforcePoolsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *LocationsWorkforcePoolsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *LocationsWorkforcePoolsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "iam.locations.workforcePools.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "iam.locations.workforcePools.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *WorkforcePool.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *LocationsWorkforcePoolsGetCall) Do(opts ...googleapi.CallOption) (*WorkforcePool, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &WorkforcePool{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "iam.locations.workforcePools.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type LocationsWorkforcePoolsGetIamPolicyCall struct { - s *Service - resource string - getiampolicyrequest *GetIamPolicyRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// GetIamPolicy: Gets IAM policies on a WorkforcePool. -// -// - resource: REQUIRED: The resource for which the policy is being requested. -// See Resource names (https://cloud.google.com/apis/design/resource_names) -// for the appropriate value for this field. -func (r *LocationsWorkforcePoolsService) GetIamPolicy(resource string, getiampolicyrequest *GetIamPolicyRequest) *LocationsWorkforcePoolsGetIamPolicyCall { - c := &LocationsWorkforcePoolsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource - c.getiampolicyrequest = getiampolicyrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *LocationsWorkforcePoolsGetIamPolicyCall) Fields(s ...googleapi.Field) *LocationsWorkforcePoolsGetIamPolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *LocationsWorkforcePoolsGetIamPolicyCall) Context(ctx context.Context) *LocationsWorkforcePoolsGetIamPolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *LocationsWorkforcePoolsGetIamPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *LocationsWorkforcePoolsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.getiampolicyrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "iam.locations.workforcePools.getIamPolicy", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "iam.locations.workforcePools.getIamPolicy" call. -// Any non-2xx status code is an error. Response headers are in either -// *Policy.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *LocationsWorkforcePoolsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &Policy{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "iam.locations.workforcePools.getIamPolicy", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type LocationsWorkforcePoolsListCall struct { - s *Service - location string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Lists all non-deleted WorkforcePools under the specified parent. If -// `show_deleted` is set to `true`, then deleted pools are also listed. -// -// - location: The location of the pool. Format: `locations/{location}`. -func (r *LocationsWorkforcePoolsService) List(location string) *LocationsWorkforcePoolsListCall { - c := &LocationsWorkforcePoolsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.location = location - return c -} - -// PageSize sets the optional parameter "pageSize": The maximum number of pools -// to return. The default value is 50. The maximum value is 100. -func (c *LocationsWorkforcePoolsListCall) PageSize(pageSize int64) *LocationsWorkforcePoolsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": A page token, received -// from a previous `ListWorkforcePools` call. Provide this to retrieve the -// subsequent page. -func (c *LocationsWorkforcePoolsListCall) PageToken(pageToken string) *LocationsWorkforcePoolsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Parent sets the optional parameter "parent": Required. The parent resource -// to list pools for. Format: `organizations/{org-id}`. -func (c *LocationsWorkforcePoolsListCall) Parent(parent string) *LocationsWorkforcePoolsListCall { - c.urlParams_.Set("parent", parent) - return c -} - -// ShowDeleted sets the optional parameter "showDeleted": Whether to return -// soft-deleted pools. -func (c *LocationsWorkforcePoolsListCall) ShowDeleted(showDeleted bool) *LocationsWorkforcePoolsListCall { - c.urlParams_.Set("showDeleted", fmt.Sprint(showDeleted)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *LocationsWorkforcePoolsListCall) Fields(s ...googleapi.Field) *LocationsWorkforcePoolsListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *LocationsWorkforcePoolsListCall) IfNoneMatch(entityTag string) *LocationsWorkforcePoolsListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *LocationsWorkforcePoolsListCall) Context(ctx context.Context) *LocationsWorkforcePoolsListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *LocationsWorkforcePoolsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *LocationsWorkforcePoolsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+location}/workforcePools") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "location": c.location, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "iam.locations.workforcePools.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "iam.locations.workforcePools.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *ListWorkforcePoolsResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *LocationsWorkforcePoolsListCall) Do(opts ...googleapi.CallOption) (*ListWorkforcePoolsResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &ListWorkforcePoolsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "iam.locations.workforcePools.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *LocationsWorkforcePoolsListCall) Pages(ctx context.Context, f func(*ListWorkforcePoolsResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -type LocationsWorkforcePoolsPatchCall struct { - s *Service - name string - workforcepool *WorkforcePool - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Updates an existing WorkforcePool. -// -// - name: Identifier. The resource name of the pool. Format: -// `locations/{location}/workforcePools/{workforce_pool_id}`. -func (r *LocationsWorkforcePoolsService) Patch(name string, workforcepool *WorkforcePool) *LocationsWorkforcePoolsPatchCall { - c := &LocationsWorkforcePoolsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.workforcepool = workforcepool - return c -} - -// UpdateMask sets the optional parameter "updateMask": Required. The list of -// fields to update. -func (c *LocationsWorkforcePoolsPatchCall) UpdateMask(updateMask string) *LocationsWorkforcePoolsPatchCall { - c.urlParams_.Set("updateMask", updateMask) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *LocationsWorkforcePoolsPatchCall) Fields(s ...googleapi.Field) *LocationsWorkforcePoolsPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *LocationsWorkforcePoolsPatchCall) Context(ctx context.Context) *LocationsWorkforcePoolsPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *LocationsWorkforcePoolsPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *LocationsWorkforcePoolsPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.workforcepool) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "iam.locations.workforcePools.patch", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "iam.locations.workforcePools.patch" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *LocationsWorkforcePoolsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "iam.locations.workforcePools.patch", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type LocationsWorkforcePoolsSetIamPolicyCall struct { - s *Service - resource string - setiampolicyrequest *SetIamPolicyRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetIamPolicy: Sets IAM policies on a WorkforcePool. -// -// - resource: REQUIRED: The resource for which the policy is being specified. -// See Resource names (https://cloud.google.com/apis/design/resource_names) -// for the appropriate value for this field. -func (r *LocationsWorkforcePoolsService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *LocationsWorkforcePoolsSetIamPolicyCall { - c := &LocationsWorkforcePoolsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource - c.setiampolicyrequest = setiampolicyrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *LocationsWorkforcePoolsSetIamPolicyCall) Fields(s ...googleapi.Field) *LocationsWorkforcePoolsSetIamPolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *LocationsWorkforcePoolsSetIamPolicyCall) Context(ctx context.Context) *LocationsWorkforcePoolsSetIamPolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *LocationsWorkforcePoolsSetIamPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *LocationsWorkforcePoolsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.setiampolicyrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "iam.locations.workforcePools.setIamPolicy", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "iam.locations.workforcePools.setIamPolicy" call. -// Any non-2xx status code is an error. Response headers are in either -// *Policy.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *LocationsWorkforcePoolsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &Policy{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "iam.locations.workforcePools.setIamPolicy", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type LocationsWorkforcePoolsTestIamPermissionsCall struct { - s *Service - resource string - testiampermissionsrequest *TestIamPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns the caller's permissions on the WorkforcePool. -// If the pool doesn't exist, this call returns an empty set of permissions. It -// doesn't return a `NOT_FOUND` error. -// -// - resource: REQUIRED: The resource for which the policy detail is being -// requested. See Resource names -// (https://cloud.google.com/apis/design/resource_names) for the appropriate -// value for this field. -func (r *LocationsWorkforcePoolsService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *LocationsWorkforcePoolsTestIamPermissionsCall { - c := &LocationsWorkforcePoolsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource - c.testiampermissionsrequest = testiampermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *LocationsWorkforcePoolsTestIamPermissionsCall) Fields(s ...googleapi.Field) *LocationsWorkforcePoolsTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *LocationsWorkforcePoolsTestIamPermissionsCall) Context(ctx context.Context) *LocationsWorkforcePoolsTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *LocationsWorkforcePoolsTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *LocationsWorkforcePoolsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testiampermissionsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "iam.locations.workforcePools.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "iam.locations.workforcePools.testIamPermissions" call. -// Any non-2xx status code is an error. Response headers are in either -// *TestIamPermissionsResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *LocationsWorkforcePoolsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &TestIamPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "iam.locations.workforcePools.testIamPermissions", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type LocationsWorkforcePoolsUndeleteCall struct { - s *Service - name string - undeleteworkforcepoolrequest *UndeleteWorkforcePoolRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Undelete: Undeletes a WorkforcePool, as long as it was deleted fewer than 30 -// days ago. -// -// - name: The name of the pool to undelete. Format: -// `locations/{location}/workforcePools/{workforce_pool_id}`. -func (r *LocationsWorkforcePoolsService) Undelete(name string, undeleteworkforcepoolrequest *UndeleteWorkforcePoolRequest) *LocationsWorkforcePoolsUndeleteCall { - c := &LocationsWorkforcePoolsUndeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.undeleteworkforcepoolrequest = undeleteworkforcepoolrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *LocationsWorkforcePoolsUndeleteCall) Fields(s ...googleapi.Field) *LocationsWorkforcePoolsUndeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *LocationsWorkforcePoolsUndeleteCall) Context(ctx context.Context) *LocationsWorkforcePoolsUndeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *LocationsWorkforcePoolsUndeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *LocationsWorkforcePoolsUndeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.undeleteworkforcepoolrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:undelete") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "iam.locations.workforcePools.undelete", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "iam.locations.workforcePools.undelete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *LocationsWorkforcePoolsUndeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "iam.locations.workforcePools.undelete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type LocationsWorkforcePoolsOperationsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Gets the latest state of a long-running operation. Clients can use this -// method to poll the operation result at intervals as recommended by the API -// service. -// -// - name: The name of the operation resource. -func (r *LocationsWorkforcePoolsOperationsService) Get(name string) *LocationsWorkforcePoolsOperationsGetCall { - c := &LocationsWorkforcePoolsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *LocationsWorkforcePoolsOperationsGetCall) Fields(s ...googleapi.Field) *LocationsWorkforcePoolsOperationsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *LocationsWorkforcePoolsOperationsGetCall) IfNoneMatch(entityTag string) *LocationsWorkforcePoolsOperationsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *LocationsWorkforcePoolsOperationsGetCall) Context(ctx context.Context) *LocationsWorkforcePoolsOperationsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *LocationsWorkforcePoolsOperationsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *LocationsWorkforcePoolsOperationsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "iam.locations.workforcePools.operations.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "iam.locations.workforcePools.operations.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *LocationsWorkforcePoolsOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "iam.locations.workforcePools.operations.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type LocationsWorkforcePoolsProvidersCreateCall struct { - s *Service - parent string - workforcepoolprovider *WorkforcePoolProvider - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Create: Creates a new WorkforcePoolProvider in a WorkforcePool. You cannot -// reuse the name of a deleted provider until 30 days after deletion. -// -// - parent: The pool to create this provider in. Format: -// `locations/{location}/workforcePools/{workforce_pool_id}`. -func (r *LocationsWorkforcePoolsProvidersService) Create(parent string, workforcepoolprovider *WorkforcePoolProvider) *LocationsWorkforcePoolsProvidersCreateCall { - c := &LocationsWorkforcePoolsProvidersCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.workforcepoolprovider = workforcepoolprovider - return c -} - -// WorkforcePoolProviderId sets the optional parameter -// "workforcePoolProviderId": Required. The ID for the provider, which becomes -// the final component of the resource name. This value must be 4-32 -// characters, and may contain the characters `[a-z0-9-]`. The prefix `gcp-` is -// reserved for use by Google, and may not be specified. -func (c *LocationsWorkforcePoolsProvidersCreateCall) WorkforcePoolProviderId(workforcePoolProviderId string) *LocationsWorkforcePoolsProvidersCreateCall { - c.urlParams_.Set("workforcePoolProviderId", workforcePoolProviderId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *LocationsWorkforcePoolsProvidersCreateCall) Fields(s ...googleapi.Field) *LocationsWorkforcePoolsProvidersCreateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *LocationsWorkforcePoolsProvidersCreateCall) Context(ctx context.Context) *LocationsWorkforcePoolsProvidersCreateCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *LocationsWorkforcePoolsProvidersCreateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *LocationsWorkforcePoolsProvidersCreateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.workforcepoolprovider) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/providers") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "iam.locations.workforcePools.providers.create", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "iam.locations.workforcePools.providers.create" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *LocationsWorkforcePoolsProvidersCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "iam.locations.workforcePools.providers.create", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type LocationsWorkforcePoolsProvidersDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes a WorkforcePoolProvider. Deleting a provider does not revoke -// credentials that have already been issued; they continue to grant access. -// You can undelete a provider for 30 days. After 30 days, deletion is -// permanent. You cannot update deleted providers. However, you can view and -// list them. -// -// - name: The name of the provider to delete. Format: -// `locations/{location}/workforcePools/{workforce_pool_id}/providers/{provide -// r_id}`. -func (r *LocationsWorkforcePoolsProvidersService) Delete(name string) *LocationsWorkforcePoolsProvidersDeleteCall { - c := &LocationsWorkforcePoolsProvidersDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *LocationsWorkforcePoolsProvidersDeleteCall) Fields(s ...googleapi.Field) *LocationsWorkforcePoolsProvidersDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *LocationsWorkforcePoolsProvidersDeleteCall) Context(ctx context.Context) *LocationsWorkforcePoolsProvidersDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *LocationsWorkforcePoolsProvidersDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *LocationsWorkforcePoolsProvidersDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "iam.locations.workforcePools.providers.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "iam.locations.workforcePools.providers.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *LocationsWorkforcePoolsProvidersDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "iam.locations.workforcePools.providers.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type LocationsWorkforcePoolsProvidersGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Gets an individual WorkforcePoolProvider. -// -// - name: The name of the provider to retrieve. Format: -// `locations/{location}/workforcePools/{workforce_pool_id}/providers/{provide -// r_id}`. -func (r *LocationsWorkforcePoolsProvidersService) Get(name string) *LocationsWorkforcePoolsProvidersGetCall { - c := &LocationsWorkforcePoolsProvidersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *LocationsWorkforcePoolsProvidersGetCall) Fields(s ...googleapi.Field) *LocationsWorkforcePoolsProvidersGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *LocationsWorkforcePoolsProvidersGetCall) IfNoneMatch(entityTag string) *LocationsWorkforcePoolsProvidersGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *LocationsWorkforcePoolsProvidersGetCall) Context(ctx context.Context) *LocationsWorkforcePoolsProvidersGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *LocationsWorkforcePoolsProvidersGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *LocationsWorkforcePoolsProvidersGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "iam.locations.workforcePools.providers.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "iam.locations.workforcePools.providers.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *WorkforcePoolProvider.ServerResponse.Header or (if a response was returned -// at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified was -// returned. -func (c *LocationsWorkforcePoolsProvidersGetCall) Do(opts ...googleapi.CallOption) (*WorkforcePoolProvider, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &WorkforcePoolProvider{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "iam.locations.workforcePools.providers.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type LocationsWorkforcePoolsProvidersListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Lists all non-deleted WorkforcePoolProviders in a WorkforcePool. If -// `show_deleted` is set to `true`, then deleted providers are also listed. -// -// - parent: The pool to list providers for. Format: -// `locations/{location}/workforcePools/{workforce_pool_id}`. -func (r *LocationsWorkforcePoolsProvidersService) List(parent string) *LocationsWorkforcePoolsProvidersListCall { - c := &LocationsWorkforcePoolsProvidersListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// PageSize sets the optional parameter "pageSize": The maximum number of -// providers to return. If unspecified, at most 50 providers are returned. The -// maximum value is 100; values above 100 are truncated to 100. -func (c *LocationsWorkforcePoolsProvidersListCall) PageSize(pageSize int64) *LocationsWorkforcePoolsProvidersListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": A page token, received -// from a previous `ListWorkforcePoolProviders` call. Provide this to retrieve -// the subsequent page. -func (c *LocationsWorkforcePoolsProvidersListCall) PageToken(pageToken string) *LocationsWorkforcePoolsProvidersListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ShowDeleted sets the optional parameter "showDeleted": Whether to return -// soft-deleted providers. -func (c *LocationsWorkforcePoolsProvidersListCall) ShowDeleted(showDeleted bool) *LocationsWorkforcePoolsProvidersListCall { - c.urlParams_.Set("showDeleted", fmt.Sprint(showDeleted)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *LocationsWorkforcePoolsProvidersListCall) Fields(s ...googleapi.Field) *LocationsWorkforcePoolsProvidersListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *LocationsWorkforcePoolsProvidersListCall) IfNoneMatch(entityTag string) *LocationsWorkforcePoolsProvidersListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *LocationsWorkforcePoolsProvidersListCall) Context(ctx context.Context) *LocationsWorkforcePoolsProvidersListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *LocationsWorkforcePoolsProvidersListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *LocationsWorkforcePoolsProvidersListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/providers") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "iam.locations.workforcePools.providers.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "iam.locations.workforcePools.providers.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *ListWorkforcePoolProvidersResponse.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *LocationsWorkforcePoolsProvidersListCall) Do(opts ...googleapi.CallOption) (*ListWorkforcePoolProvidersResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &ListWorkforcePoolProvidersResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "iam.locations.workforcePools.providers.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *LocationsWorkforcePoolsProvidersListCall) Pages(ctx context.Context, f func(*ListWorkforcePoolProvidersResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -type LocationsWorkforcePoolsProvidersPatchCall struct { - s *Service - name string - workforcepoolprovider *WorkforcePoolProvider - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Updates an existing WorkforcePoolProvider. -// -// - name: Identifier. The resource name of the provider. Format: -// `locations/{location}/workforcePools/{workforce_pool_id}/providers/{provide -// r_id}`. -func (r *LocationsWorkforcePoolsProvidersService) Patch(name string, workforcepoolprovider *WorkforcePoolProvider) *LocationsWorkforcePoolsProvidersPatchCall { - c := &LocationsWorkforcePoolsProvidersPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.workforcepoolprovider = workforcepoolprovider - return c -} - -// UpdateMask sets the optional parameter "updateMask": Required. The list of -// fields to update. -func (c *LocationsWorkforcePoolsProvidersPatchCall) UpdateMask(updateMask string) *LocationsWorkforcePoolsProvidersPatchCall { - c.urlParams_.Set("updateMask", updateMask) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *LocationsWorkforcePoolsProvidersPatchCall) Fields(s ...googleapi.Field) *LocationsWorkforcePoolsProvidersPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *LocationsWorkforcePoolsProvidersPatchCall) Context(ctx context.Context) *LocationsWorkforcePoolsProvidersPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *LocationsWorkforcePoolsProvidersPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *LocationsWorkforcePoolsProvidersPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.workforcepoolprovider) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "iam.locations.workforcePools.providers.patch", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "iam.locations.workforcePools.providers.patch" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *LocationsWorkforcePoolsProvidersPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "iam.locations.workforcePools.providers.patch", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type LocationsWorkforcePoolsProvidersUndeleteCall struct { - s *Service - name string - undeleteworkforcepoolproviderrequest *UndeleteWorkforcePoolProviderRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Undelete: Undeletes a WorkforcePoolProvider, as long as it was deleted fewer -// than 30 days ago. -// -// - name: The name of the provider to undelete. Format: -// `locations/{location}/workforcePools/{workforce_pool_id}/providers/{provide -// r_id}`. -func (r *LocationsWorkforcePoolsProvidersService) Undelete(name string, undeleteworkforcepoolproviderrequest *UndeleteWorkforcePoolProviderRequest) *LocationsWorkforcePoolsProvidersUndeleteCall { - c := &LocationsWorkforcePoolsProvidersUndeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.undeleteworkforcepoolproviderrequest = undeleteworkforcepoolproviderrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *LocationsWorkforcePoolsProvidersUndeleteCall) Fields(s ...googleapi.Field) *LocationsWorkforcePoolsProvidersUndeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *LocationsWorkforcePoolsProvidersUndeleteCall) Context(ctx context.Context) *LocationsWorkforcePoolsProvidersUndeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *LocationsWorkforcePoolsProvidersUndeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *LocationsWorkforcePoolsProvidersUndeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.undeleteworkforcepoolproviderrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:undelete") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "iam.locations.workforcePools.providers.undelete", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "iam.locations.workforcePools.providers.undelete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *LocationsWorkforcePoolsProvidersUndeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "iam.locations.workforcePools.providers.undelete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type LocationsWorkforcePoolsProvidersKeysCreateCall struct { - s *Service - parent string - workforcepoolproviderkey *WorkforcePoolProviderKey - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Create: Creates a new WorkforcePoolProviderKey in a WorkforcePoolProvider. -// -// - parent: The provider to create this key in. -func (r *LocationsWorkforcePoolsProvidersKeysService) Create(parent string, workforcepoolproviderkey *WorkforcePoolProviderKey) *LocationsWorkforcePoolsProvidersKeysCreateCall { - c := &LocationsWorkforcePoolsProvidersKeysCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.workforcepoolproviderkey = workforcepoolproviderkey - return c -} - -// WorkforcePoolProviderKeyId sets the optional parameter -// "workforcePoolProviderKeyId": Required. The ID to use for the key, which -// becomes the final component of the resource name. This value must be 4-32 -// characters, and may contain the characters `[a-z0-9-]`. -func (c *LocationsWorkforcePoolsProvidersKeysCreateCall) WorkforcePoolProviderKeyId(workforcePoolProviderKeyId string) *LocationsWorkforcePoolsProvidersKeysCreateCall { - c.urlParams_.Set("workforcePoolProviderKeyId", workforcePoolProviderKeyId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *LocationsWorkforcePoolsProvidersKeysCreateCall) Fields(s ...googleapi.Field) *LocationsWorkforcePoolsProvidersKeysCreateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *LocationsWorkforcePoolsProvidersKeysCreateCall) Context(ctx context.Context) *LocationsWorkforcePoolsProvidersKeysCreateCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *LocationsWorkforcePoolsProvidersKeysCreateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *LocationsWorkforcePoolsProvidersKeysCreateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.workforcepoolproviderkey) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/keys") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "iam.locations.workforcePools.providers.keys.create", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "iam.locations.workforcePools.providers.keys.create" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *LocationsWorkforcePoolsProvidersKeysCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "iam.locations.workforcePools.providers.keys.create", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type LocationsWorkforcePoolsProvidersKeysDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes a WorkforcePoolProviderKey. You can undelete a key for 30 -// days. After 30 days, deletion is permanent. -// -// - name: The name of the key to delete. -func (r *LocationsWorkforcePoolsProvidersKeysService) Delete(name string) *LocationsWorkforcePoolsProvidersKeysDeleteCall { - c := &LocationsWorkforcePoolsProvidersKeysDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *LocationsWorkforcePoolsProvidersKeysDeleteCall) Fields(s ...googleapi.Field) *LocationsWorkforcePoolsProvidersKeysDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *LocationsWorkforcePoolsProvidersKeysDeleteCall) Context(ctx context.Context) *LocationsWorkforcePoolsProvidersKeysDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *LocationsWorkforcePoolsProvidersKeysDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *LocationsWorkforcePoolsProvidersKeysDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "iam.locations.workforcePools.providers.keys.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "iam.locations.workforcePools.providers.keys.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *LocationsWorkforcePoolsProvidersKeysDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "iam.locations.workforcePools.providers.keys.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type LocationsWorkforcePoolsProvidersKeysGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Gets a WorkforcePoolProviderKey. -// -// - name: The name of the key to retrieve. -func (r *LocationsWorkforcePoolsProvidersKeysService) Get(name string) *LocationsWorkforcePoolsProvidersKeysGetCall { - c := &LocationsWorkforcePoolsProvidersKeysGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *LocationsWorkforcePoolsProvidersKeysGetCall) Fields(s ...googleapi.Field) *LocationsWorkforcePoolsProvidersKeysGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *LocationsWorkforcePoolsProvidersKeysGetCall) IfNoneMatch(entityTag string) *LocationsWorkforcePoolsProvidersKeysGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *LocationsWorkforcePoolsProvidersKeysGetCall) Context(ctx context.Context) *LocationsWorkforcePoolsProvidersKeysGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *LocationsWorkforcePoolsProvidersKeysGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *LocationsWorkforcePoolsProvidersKeysGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "iam.locations.workforcePools.providers.keys.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "iam.locations.workforcePools.providers.keys.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *WorkforcePoolProviderKey.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *LocationsWorkforcePoolsProvidersKeysGetCall) Do(opts ...googleapi.CallOption) (*WorkforcePoolProviderKey, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &WorkforcePoolProviderKey{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "iam.locations.workforcePools.providers.keys.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type LocationsWorkforcePoolsProvidersKeysListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Lists all non-deleted WorkforcePoolProviderKeys in a -// WorkforcePoolProvider. If `show_deleted` is set to `true`, then deleted keys -// are also listed. -// -// - parent: The provider resource to list encryption keys for. Format: -// `locations/{location}/workforcePools/{workforce_pool_id}/providers/{provide -// r_id}`. -func (r *LocationsWorkforcePoolsProvidersKeysService) List(parent string) *LocationsWorkforcePoolsProvidersKeysListCall { - c := &LocationsWorkforcePoolsProvidersKeysListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// PageSize sets the optional parameter "pageSize": The maximum number of keys -// to return. If unspecified, all keys are returned. The maximum value is 10; -// values above 10 are truncated to 10. -func (c *LocationsWorkforcePoolsProvidersKeysListCall) PageSize(pageSize int64) *LocationsWorkforcePoolsProvidersKeysListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": A page token, received -// from a previous `ListWorkforcePoolProviderKeys` call. Provide this to -// retrieve the subsequent page. -func (c *LocationsWorkforcePoolsProvidersKeysListCall) PageToken(pageToken string) *LocationsWorkforcePoolsProvidersKeysListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ShowDeleted sets the optional parameter "showDeleted": Whether to return -// soft-deleted keys. -func (c *LocationsWorkforcePoolsProvidersKeysListCall) ShowDeleted(showDeleted bool) *LocationsWorkforcePoolsProvidersKeysListCall { - c.urlParams_.Set("showDeleted", fmt.Sprint(showDeleted)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *LocationsWorkforcePoolsProvidersKeysListCall) Fields(s ...googleapi.Field) *LocationsWorkforcePoolsProvidersKeysListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *LocationsWorkforcePoolsProvidersKeysListCall) IfNoneMatch(entityTag string) *LocationsWorkforcePoolsProvidersKeysListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *LocationsWorkforcePoolsProvidersKeysListCall) Context(ctx context.Context) *LocationsWorkforcePoolsProvidersKeysListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *LocationsWorkforcePoolsProvidersKeysListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *LocationsWorkforcePoolsProvidersKeysListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/keys") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "iam.locations.workforcePools.providers.keys.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "iam.locations.workforcePools.providers.keys.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *ListWorkforcePoolProviderKeysResponse.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *LocationsWorkforcePoolsProvidersKeysListCall) Do(opts ...googleapi.CallOption) (*ListWorkforcePoolProviderKeysResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &ListWorkforcePoolProviderKeysResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "iam.locations.workforcePools.providers.keys.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *LocationsWorkforcePoolsProvidersKeysListCall) Pages(ctx context.Context, f func(*ListWorkforcePoolProviderKeysResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -type LocationsWorkforcePoolsProvidersKeysUndeleteCall struct { - s *Service - name string - undeleteworkforcepoolproviderkeyrequest *UndeleteWorkforcePoolProviderKeyRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Undelete: Undeletes a WorkforcePoolProviderKey, as long as it was deleted -// fewer than 30 days ago. -// -// - name: The name of the key to undelete. -func (r *LocationsWorkforcePoolsProvidersKeysService) Undelete(name string, undeleteworkforcepoolproviderkeyrequest *UndeleteWorkforcePoolProviderKeyRequest) *LocationsWorkforcePoolsProvidersKeysUndeleteCall { - c := &LocationsWorkforcePoolsProvidersKeysUndeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.undeleteworkforcepoolproviderkeyrequest = undeleteworkforcepoolproviderkeyrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *LocationsWorkforcePoolsProvidersKeysUndeleteCall) Fields(s ...googleapi.Field) *LocationsWorkforcePoolsProvidersKeysUndeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *LocationsWorkforcePoolsProvidersKeysUndeleteCall) Context(ctx context.Context) *LocationsWorkforcePoolsProvidersKeysUndeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *LocationsWorkforcePoolsProvidersKeysUndeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *LocationsWorkforcePoolsProvidersKeysUndeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.undeleteworkforcepoolproviderkeyrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:undelete") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "iam.locations.workforcePools.providers.keys.undelete", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "iam.locations.workforcePools.providers.keys.undelete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *LocationsWorkforcePoolsProvidersKeysUndeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "iam.locations.workforcePools.providers.keys.undelete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type LocationsWorkforcePoolsProvidersKeysOperationsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Gets the latest state of a long-running operation. Clients can use this -// method to poll the operation result at intervals as recommended by the API -// service. -// -// - name: The name of the operation resource. -func (r *LocationsWorkforcePoolsProvidersKeysOperationsService) Get(name string) *LocationsWorkforcePoolsProvidersKeysOperationsGetCall { - c := &LocationsWorkforcePoolsProvidersKeysOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *LocationsWorkforcePoolsProvidersKeysOperationsGetCall) Fields(s ...googleapi.Field) *LocationsWorkforcePoolsProvidersKeysOperationsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *LocationsWorkforcePoolsProvidersKeysOperationsGetCall) IfNoneMatch(entityTag string) *LocationsWorkforcePoolsProvidersKeysOperationsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *LocationsWorkforcePoolsProvidersKeysOperationsGetCall) Context(ctx context.Context) *LocationsWorkforcePoolsProvidersKeysOperationsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *LocationsWorkforcePoolsProvidersKeysOperationsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *LocationsWorkforcePoolsProvidersKeysOperationsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "iam.locations.workforcePools.providers.keys.operations.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "iam.locations.workforcePools.providers.keys.operations.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *LocationsWorkforcePoolsProvidersKeysOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "iam.locations.workforcePools.providers.keys.operations.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type LocationsWorkforcePoolsProvidersOperationsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Gets the latest state of a long-running operation. Clients can use this -// method to poll the operation result at intervals as recommended by the API -// service. -// -// - name: The name of the operation resource. -func (r *LocationsWorkforcePoolsProvidersOperationsService) Get(name string) *LocationsWorkforcePoolsProvidersOperationsGetCall { - c := &LocationsWorkforcePoolsProvidersOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *LocationsWorkforcePoolsProvidersOperationsGetCall) Fields(s ...googleapi.Field) *LocationsWorkforcePoolsProvidersOperationsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *LocationsWorkforcePoolsProvidersOperationsGetCall) IfNoneMatch(entityTag string) *LocationsWorkforcePoolsProvidersOperationsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *LocationsWorkforcePoolsProvidersOperationsGetCall) Context(ctx context.Context) *LocationsWorkforcePoolsProvidersOperationsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *LocationsWorkforcePoolsProvidersOperationsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *LocationsWorkforcePoolsProvidersOperationsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "iam.locations.workforcePools.providers.operations.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "iam.locations.workforcePools.providers.operations.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *LocationsWorkforcePoolsProvidersOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "iam.locations.workforcePools.providers.operations.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type LocationsWorkforcePoolsProvidersScimTenantsCreateCall struct { - s *Service - parent string - workforcepoolproviderscimtenant *WorkforcePoolProviderScimTenant - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Create: Gemini Enterprise only. Creates a new -// WorkforcePoolProviderScimTenant in a WorkforcePoolProvider. You cannot reuse -// the name of a deleted SCIM tenant until 30 days after deletion. -// -// - parent: Gemini Enterprise only. The parent to create SCIM tenant. Format: -// 'locations/{location}/workforcePools/{workforce_pool}/providers/{provider}'. -func (r *LocationsWorkforcePoolsProvidersScimTenantsService) Create(parent string, workforcepoolproviderscimtenant *WorkforcePoolProviderScimTenant) *LocationsWorkforcePoolsProvidersScimTenantsCreateCall { - c := &LocationsWorkforcePoolsProvidersScimTenantsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.workforcepoolproviderscimtenant = workforcepoolproviderscimtenant - return c -} - -// WorkforcePoolProviderScimTenantId sets the optional parameter -// "workforcePoolProviderScimTenantId": Required. Gemini Enterprise only. The -// ID to use for the SCIM tenant, which becomes the final component of the -// resource name. This value should be 4-32 characters, containing the -// characters `[a-z0-9-]`. -func (c *LocationsWorkforcePoolsProvidersScimTenantsCreateCall) WorkforcePoolProviderScimTenantId(workforcePoolProviderScimTenantId string) *LocationsWorkforcePoolsProvidersScimTenantsCreateCall { - c.urlParams_.Set("workforcePoolProviderScimTenantId", workforcePoolProviderScimTenantId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *LocationsWorkforcePoolsProvidersScimTenantsCreateCall) Fields(s ...googleapi.Field) *LocationsWorkforcePoolsProvidersScimTenantsCreateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *LocationsWorkforcePoolsProvidersScimTenantsCreateCall) Context(ctx context.Context) *LocationsWorkforcePoolsProvidersScimTenantsCreateCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *LocationsWorkforcePoolsProvidersScimTenantsCreateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *LocationsWorkforcePoolsProvidersScimTenantsCreateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.workforcepoolproviderscimtenant) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/scimTenants") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "iam.locations.workforcePools.providers.scimTenants.create", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "iam.locations.workforcePools.providers.scimTenants.create" call. -// Any non-2xx status code is an error. Response headers are in either -// *WorkforcePoolProviderScimTenant.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *LocationsWorkforcePoolsProvidersScimTenantsCreateCall) Do(opts ...googleapi.CallOption) (*WorkforcePoolProviderScimTenant, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &WorkforcePoolProviderScimTenant{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "iam.locations.workforcePools.providers.scimTenants.create", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type LocationsWorkforcePoolsProvidersScimTenantsDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Gemini Enterprise only. Deletes a WorkforcePoolProviderScimTenant. -// You can undelete a SCIM tenant for 30 days. After 30 days, deletion is -// permanent. You cannot update deleted SCIM tenants. However, you can view and -// list them. -// -// - name: Gemini Enterprise only. The name of the SCIM tenant to delete. -// Format: -// `locations/{location}/workforcePools/{workforce_pool}/providers/{provider}/ -// scimTenants/{scim_tenant}`. -func (r *LocationsWorkforcePoolsProvidersScimTenantsService) Delete(name string) *LocationsWorkforcePoolsProvidersScimTenantsDeleteCall { - c := &LocationsWorkforcePoolsProvidersScimTenantsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// HardDelete sets the optional parameter "hardDelete": Deletes the SCIM tenant -// immediately. This operation cannot be undone. -func (c *LocationsWorkforcePoolsProvidersScimTenantsDeleteCall) HardDelete(hardDelete bool) *LocationsWorkforcePoolsProvidersScimTenantsDeleteCall { - c.urlParams_.Set("hardDelete", fmt.Sprint(hardDelete)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *LocationsWorkforcePoolsProvidersScimTenantsDeleteCall) Fields(s ...googleapi.Field) *LocationsWorkforcePoolsProvidersScimTenantsDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *LocationsWorkforcePoolsProvidersScimTenantsDeleteCall) Context(ctx context.Context) *LocationsWorkforcePoolsProvidersScimTenantsDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *LocationsWorkforcePoolsProvidersScimTenantsDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *LocationsWorkforcePoolsProvidersScimTenantsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "iam.locations.workforcePools.providers.scimTenants.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "iam.locations.workforcePools.providers.scimTenants.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *WorkforcePoolProviderScimTenant.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *LocationsWorkforcePoolsProvidersScimTenantsDeleteCall) Do(opts ...googleapi.CallOption) (*WorkforcePoolProviderScimTenant, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &WorkforcePoolProviderScimTenant{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "iam.locations.workforcePools.providers.scimTenants.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type LocationsWorkforcePoolsProvidersScimTenantsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Gemini Enterprise only. Gets an individual -// WorkforcePoolProviderScimTenant. -// -// - name: Gemini Enterprise only. The name of the SCIM tenant to retrieve. -// Format: -// `locations/{location}/workforcePools/{workforce_pool}/providers/{provider}/ -// scimTenants/{scim_tenant}`. -func (r *LocationsWorkforcePoolsProvidersScimTenantsService) Get(name string) *LocationsWorkforcePoolsProvidersScimTenantsGetCall { - c := &LocationsWorkforcePoolsProvidersScimTenantsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *LocationsWorkforcePoolsProvidersScimTenantsGetCall) Fields(s ...googleapi.Field) *LocationsWorkforcePoolsProvidersScimTenantsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *LocationsWorkforcePoolsProvidersScimTenantsGetCall) IfNoneMatch(entityTag string) *LocationsWorkforcePoolsProvidersScimTenantsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *LocationsWorkforcePoolsProvidersScimTenantsGetCall) Context(ctx context.Context) *LocationsWorkforcePoolsProvidersScimTenantsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *LocationsWorkforcePoolsProvidersScimTenantsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *LocationsWorkforcePoolsProvidersScimTenantsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "iam.locations.workforcePools.providers.scimTenants.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "iam.locations.workforcePools.providers.scimTenants.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *WorkforcePoolProviderScimTenant.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *LocationsWorkforcePoolsProvidersScimTenantsGetCall) Do(opts ...googleapi.CallOption) (*WorkforcePoolProviderScimTenant, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &WorkforcePoolProviderScimTenant{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "iam.locations.workforcePools.providers.scimTenants.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type LocationsWorkforcePoolsProvidersScimTenantsListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Gemini Enterprise only. Lists all non-deleted -// WorkforcePoolProviderScimTenants in a WorkforcePoolProvider. If -// `show_deleted` is set to `true`, then deleted SCIM tenants are also listed. -// -// - parent: Gemini Enterprise only. The parent to list SCIM tenants. Format: -// 'locations/{location}/workforcePools/{workforce_pool}/providers/{provider}'. -func (r *LocationsWorkforcePoolsProvidersScimTenantsService) List(parent string) *LocationsWorkforcePoolsProvidersScimTenantsListCall { - c := &LocationsWorkforcePoolsProvidersScimTenantsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// PageSize sets the optional parameter "pageSize": Gemini Enterprise only. The -// maximum number of SCIM tenants to return. If unspecified, at most 50 SCIM -// tenants will be returned. The maximum value is 100; values above 100 are -// truncated to 100. -func (c *LocationsWorkforcePoolsProvidersScimTenantsListCall) PageSize(pageSize int64) *LocationsWorkforcePoolsProvidersScimTenantsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": Gemini Enterprise only. A -// page token, received from a previous `ListScimTenants` call. Provide this to -// retrieve the subsequent page. -func (c *LocationsWorkforcePoolsProvidersScimTenantsListCall) PageToken(pageToken string) *LocationsWorkforcePoolsProvidersScimTenantsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ShowDeleted sets the optional parameter "showDeleted": Gemini Enterprise -// only. Whether to return soft-deleted SCIM tenants. -func (c *LocationsWorkforcePoolsProvidersScimTenantsListCall) ShowDeleted(showDeleted bool) *LocationsWorkforcePoolsProvidersScimTenantsListCall { - c.urlParams_.Set("showDeleted", fmt.Sprint(showDeleted)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *LocationsWorkforcePoolsProvidersScimTenantsListCall) Fields(s ...googleapi.Field) *LocationsWorkforcePoolsProvidersScimTenantsListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *LocationsWorkforcePoolsProvidersScimTenantsListCall) IfNoneMatch(entityTag string) *LocationsWorkforcePoolsProvidersScimTenantsListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *LocationsWorkforcePoolsProvidersScimTenantsListCall) Context(ctx context.Context) *LocationsWorkforcePoolsProvidersScimTenantsListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *LocationsWorkforcePoolsProvidersScimTenantsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *LocationsWorkforcePoolsProvidersScimTenantsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/scimTenants") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "iam.locations.workforcePools.providers.scimTenants.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "iam.locations.workforcePools.providers.scimTenants.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *ListWorkforcePoolProviderScimTenantsResponse.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *LocationsWorkforcePoolsProvidersScimTenantsListCall) Do(opts ...googleapi.CallOption) (*ListWorkforcePoolProviderScimTenantsResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &ListWorkforcePoolProviderScimTenantsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "iam.locations.workforcePools.providers.scimTenants.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *LocationsWorkforcePoolsProvidersScimTenantsListCall) Pages(ctx context.Context, f func(*ListWorkforcePoolProviderScimTenantsResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -type LocationsWorkforcePoolsProvidersScimTenantsPatchCall struct { - s *Service - name string - workforcepoolproviderscimtenant *WorkforcePoolProviderScimTenant - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Gemini Enterprise only. Updates an existing -// WorkforcePoolProviderScimTenant. -// -// - name: Identifier. Gemini Enterprise only. The resource name of the SCIM -// Tenant. Format: -// `locations/{location}/workforcePools/{workforce_pool}/providers/ -// {workforce_pool_provider}/scimTenants/{scim_tenant}`. -func (r *LocationsWorkforcePoolsProvidersScimTenantsService) Patch(name string, workforcepoolproviderscimtenant *WorkforcePoolProviderScimTenant) *LocationsWorkforcePoolsProvidersScimTenantsPatchCall { - c := &LocationsWorkforcePoolsProvidersScimTenantsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.workforcepoolproviderscimtenant = workforcepoolproviderscimtenant - return c -} - -// UpdateMask sets the optional parameter "updateMask": Gemini Enterprise only. -// The list of fields to update. -func (c *LocationsWorkforcePoolsProvidersScimTenantsPatchCall) UpdateMask(updateMask string) *LocationsWorkforcePoolsProvidersScimTenantsPatchCall { - c.urlParams_.Set("updateMask", updateMask) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *LocationsWorkforcePoolsProvidersScimTenantsPatchCall) Fields(s ...googleapi.Field) *LocationsWorkforcePoolsProvidersScimTenantsPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *LocationsWorkforcePoolsProvidersScimTenantsPatchCall) Context(ctx context.Context) *LocationsWorkforcePoolsProvidersScimTenantsPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *LocationsWorkforcePoolsProvidersScimTenantsPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *LocationsWorkforcePoolsProvidersScimTenantsPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.workforcepoolproviderscimtenant) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "iam.locations.workforcePools.providers.scimTenants.patch", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "iam.locations.workforcePools.providers.scimTenants.patch" call. -// Any non-2xx status code is an error. Response headers are in either -// *WorkforcePoolProviderScimTenant.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *LocationsWorkforcePoolsProvidersScimTenantsPatchCall) Do(opts ...googleapi.CallOption) (*WorkforcePoolProviderScimTenant, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &WorkforcePoolProviderScimTenant{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "iam.locations.workforcePools.providers.scimTenants.patch", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type LocationsWorkforcePoolsProvidersScimTenantsUndeleteCall struct { - s *Service - name string - undeleteworkforcepoolproviderscimtenantrequest *UndeleteWorkforcePoolProviderScimTenantRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Undelete: Gemini Enterprise only. Undeletes a -// WorkforcePoolProviderScimTenant, that was deleted fewer than 30 days ago. -// -// - name: Gemini Enterprise only. The name of the SCIM tenant to undelete. -// Format: -// `locations/{location}/workforcePools/{workforce_pool}/providers/{provider}/ -// scimTenants/{scim_tenant}`. -func (r *LocationsWorkforcePoolsProvidersScimTenantsService) Undelete(name string, undeleteworkforcepoolproviderscimtenantrequest *UndeleteWorkforcePoolProviderScimTenantRequest) *LocationsWorkforcePoolsProvidersScimTenantsUndeleteCall { - c := &LocationsWorkforcePoolsProvidersScimTenantsUndeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.undeleteworkforcepoolproviderscimtenantrequest = undeleteworkforcepoolproviderscimtenantrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *LocationsWorkforcePoolsProvidersScimTenantsUndeleteCall) Fields(s ...googleapi.Field) *LocationsWorkforcePoolsProvidersScimTenantsUndeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *LocationsWorkforcePoolsProvidersScimTenantsUndeleteCall) Context(ctx context.Context) *LocationsWorkforcePoolsProvidersScimTenantsUndeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *LocationsWorkforcePoolsProvidersScimTenantsUndeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *LocationsWorkforcePoolsProvidersScimTenantsUndeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.undeleteworkforcepoolproviderscimtenantrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:undelete") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "iam.locations.workforcePools.providers.scimTenants.undelete", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "iam.locations.workforcePools.providers.scimTenants.undelete" call. -// Any non-2xx status code is an error. Response headers are in either -// *WorkforcePoolProviderScimTenant.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *LocationsWorkforcePoolsProvidersScimTenantsUndeleteCall) Do(opts ...googleapi.CallOption) (*WorkforcePoolProviderScimTenant, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &WorkforcePoolProviderScimTenant{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "iam.locations.workforcePools.providers.scimTenants.undelete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type LocationsWorkforcePoolsProvidersScimTenantsTokensCreateCall struct { - s *Service - parent string - workforcepoolproviderscimtoken *WorkforcePoolProviderScimToken - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Create: Gemini Enterprise only. Creates a new WorkforcePoolProviderScimToken -// in a WorkforcePoolProviderScimTenant. You cannot reuse the name of a deleted -// SCIM token until 30 days after deletion. -// -// - parent: Gemini Enterprise only. The parent tenant to create SCIM token. -// Format: -// 'locations/{location}/workforcePools/{workforce_pool}/providers/{provider}/ -// scimTenants/{scim_tenant}'. -func (r *LocationsWorkforcePoolsProvidersScimTenantsTokensService) Create(parent string, workforcepoolproviderscimtoken *WorkforcePoolProviderScimToken) *LocationsWorkforcePoolsProvidersScimTenantsTokensCreateCall { - c := &LocationsWorkforcePoolsProvidersScimTenantsTokensCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.workforcepoolproviderscimtoken = workforcepoolproviderscimtoken - return c -} - -// WorkforcePoolProviderScimTokenId sets the optional parameter -// "workforcePoolProviderScimTokenId": Required. Gemini Enterprise only. The ID -// to use for the SCIM token, which becomes the final component of the resource -// name. This value should be 4-32 characters and follow the pattern: `(a-z -// ([a-z0-9\\-]{2,30}[a-z0-9]))` -func (c *LocationsWorkforcePoolsProvidersScimTenantsTokensCreateCall) WorkforcePoolProviderScimTokenId(workforcePoolProviderScimTokenId string) *LocationsWorkforcePoolsProvidersScimTenantsTokensCreateCall { - c.urlParams_.Set("workforcePoolProviderScimTokenId", workforcePoolProviderScimTokenId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *LocationsWorkforcePoolsProvidersScimTenantsTokensCreateCall) Fields(s ...googleapi.Field) *LocationsWorkforcePoolsProvidersScimTenantsTokensCreateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *LocationsWorkforcePoolsProvidersScimTenantsTokensCreateCall) Context(ctx context.Context) *LocationsWorkforcePoolsProvidersScimTenantsTokensCreateCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *LocationsWorkforcePoolsProvidersScimTenantsTokensCreateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *LocationsWorkforcePoolsProvidersScimTenantsTokensCreateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.workforcepoolproviderscimtoken) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/tokens") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "iam.locations.workforcePools.providers.scimTenants.tokens.create", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "iam.locations.workforcePools.providers.scimTenants.tokens.create" call. -// Any non-2xx status code is an error. Response headers are in either -// *WorkforcePoolProviderScimToken.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *LocationsWorkforcePoolsProvidersScimTenantsTokensCreateCall) Do(opts ...googleapi.CallOption) (*WorkforcePoolProviderScimToken, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &WorkforcePoolProviderScimToken{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "iam.locations.workforcePools.providers.scimTenants.tokens.create", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type LocationsWorkforcePoolsProvidersScimTenantsTokensDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Gemini Enterprise only. Deletes a WorkforcePoolProviderScimToken. -// You can undelete a SCIM token for 30 days. After 30 days, the SCIM token is -// permanently deleted. You cannot update deleted SCIM tokens, however, you can -// view and list them. -// -// - name: Gemini Enterprise only. The name of the SCIM token to delete. -// Format: -// `locations/{location}/workforcePools/{workforce_pool}/providers/{provider}/ -// scimTenants/{scim_tenant}/tokens/{token}`. -func (r *LocationsWorkforcePoolsProvidersScimTenantsTokensService) Delete(name string) *LocationsWorkforcePoolsProvidersScimTenantsTokensDeleteCall { - c := &LocationsWorkforcePoolsProvidersScimTenantsTokensDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *LocationsWorkforcePoolsProvidersScimTenantsTokensDeleteCall) Fields(s ...googleapi.Field) *LocationsWorkforcePoolsProvidersScimTenantsTokensDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *LocationsWorkforcePoolsProvidersScimTenantsTokensDeleteCall) Context(ctx context.Context) *LocationsWorkforcePoolsProvidersScimTenantsTokensDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *LocationsWorkforcePoolsProvidersScimTenantsTokensDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *LocationsWorkforcePoolsProvidersScimTenantsTokensDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "iam.locations.workforcePools.providers.scimTenants.tokens.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "iam.locations.workforcePools.providers.scimTenants.tokens.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *WorkforcePoolProviderScimToken.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *LocationsWorkforcePoolsProvidersScimTenantsTokensDeleteCall) Do(opts ...googleapi.CallOption) (*WorkforcePoolProviderScimToken, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &WorkforcePoolProviderScimToken{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "iam.locations.workforcePools.providers.scimTenants.tokens.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type LocationsWorkforcePoolsProvidersScimTenantsTokensGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Gemini Enterprise only. Gets an individual -// WorkforcePoolProviderScimToken. -// -// - name: Gemini Enterprise only. The name of the SCIM token to retrieve. -// Format: -// `locations/{location}/workforcePools/{workforce_pool}/providers/{provider}/ -// scimTenants/{scim_tenant}/tokens/{token}`. -func (r *LocationsWorkforcePoolsProvidersScimTenantsTokensService) Get(name string) *LocationsWorkforcePoolsProvidersScimTenantsTokensGetCall { - c := &LocationsWorkforcePoolsProvidersScimTenantsTokensGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *LocationsWorkforcePoolsProvidersScimTenantsTokensGetCall) Fields(s ...googleapi.Field) *LocationsWorkforcePoolsProvidersScimTenantsTokensGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *LocationsWorkforcePoolsProvidersScimTenantsTokensGetCall) IfNoneMatch(entityTag string) *LocationsWorkforcePoolsProvidersScimTenantsTokensGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *LocationsWorkforcePoolsProvidersScimTenantsTokensGetCall) Context(ctx context.Context) *LocationsWorkforcePoolsProvidersScimTenantsTokensGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *LocationsWorkforcePoolsProvidersScimTenantsTokensGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *LocationsWorkforcePoolsProvidersScimTenantsTokensGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "iam.locations.workforcePools.providers.scimTenants.tokens.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "iam.locations.workforcePools.providers.scimTenants.tokens.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *WorkforcePoolProviderScimToken.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *LocationsWorkforcePoolsProvidersScimTenantsTokensGetCall) Do(opts ...googleapi.CallOption) (*WorkforcePoolProviderScimToken, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &WorkforcePoolProviderScimToken{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "iam.locations.workforcePools.providers.scimTenants.tokens.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type LocationsWorkforcePoolsProvidersScimTenantsTokensListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Gemini Enterprise only. Lists all non-deleted -// WorkforcePoolProviderScimTokenss in a WorkforcePoolProviderScimTenant. If -// `show_deleted` is set to `true`, then deleted SCIM tokens are also listed. -// -// - parent: Gemini Enterprise only. The parent to list SCIM tokens. Format: -// 'locations/{location}/workforcePools/{workforce_pool}/providers/{provider}/ -// scimTenants/{scim_tenant}'. -func (r *LocationsWorkforcePoolsProvidersScimTenantsTokensService) List(parent string) *LocationsWorkforcePoolsProvidersScimTenantsTokensListCall { - c := &LocationsWorkforcePoolsProvidersScimTenantsTokensListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// PageSize sets the optional parameter "pageSize": Gemini Enterprise only. The -// maximum number of SCIM tokens to return. If unspecified, at most 2 SCIM -// tokens will be returned. -func (c *LocationsWorkforcePoolsProvidersScimTenantsTokensListCall) PageSize(pageSize int64) *LocationsWorkforcePoolsProvidersScimTenantsTokensListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": Gemini Enterprise only. A -// page token, received from a previous `ListWorkforcePoolProviderScimTokens` -// call. Provide this to retrieve the subsequent page. -func (c *LocationsWorkforcePoolsProvidersScimTenantsTokensListCall) PageToken(pageToken string) *LocationsWorkforcePoolsProvidersScimTenantsTokensListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ShowDeleted sets the optional parameter "showDeleted": Gemini Enterprise -// only. Whether to return soft-deleted SCIM tokens. -func (c *LocationsWorkforcePoolsProvidersScimTenantsTokensListCall) ShowDeleted(showDeleted bool) *LocationsWorkforcePoolsProvidersScimTenantsTokensListCall { - c.urlParams_.Set("showDeleted", fmt.Sprint(showDeleted)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *LocationsWorkforcePoolsProvidersScimTenantsTokensListCall) Fields(s ...googleapi.Field) *LocationsWorkforcePoolsProvidersScimTenantsTokensListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *LocationsWorkforcePoolsProvidersScimTenantsTokensListCall) IfNoneMatch(entityTag string) *LocationsWorkforcePoolsProvidersScimTenantsTokensListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *LocationsWorkforcePoolsProvidersScimTenantsTokensListCall) Context(ctx context.Context) *LocationsWorkforcePoolsProvidersScimTenantsTokensListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *LocationsWorkforcePoolsProvidersScimTenantsTokensListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *LocationsWorkforcePoolsProvidersScimTenantsTokensListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/tokens") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "iam.locations.workforcePools.providers.scimTenants.tokens.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "iam.locations.workforcePools.providers.scimTenants.tokens.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *ListWorkforcePoolProviderScimTokensResponse.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *LocationsWorkforcePoolsProvidersScimTenantsTokensListCall) Do(opts ...googleapi.CallOption) (*ListWorkforcePoolProviderScimTokensResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &ListWorkforcePoolProviderScimTokensResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "iam.locations.workforcePools.providers.scimTenants.tokens.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *LocationsWorkforcePoolsProvidersScimTenantsTokensListCall) Pages(ctx context.Context, f func(*ListWorkforcePoolProviderScimTokensResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -type LocationsWorkforcePoolsProvidersScimTenantsTokensPatchCall struct { - s *Service - name string - workforcepoolproviderscimtoken *WorkforcePoolProviderScimToken - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Gemini Enterprise only. Updates an existing -// WorkforcePoolProviderScimToken. -// -// - name: Identifier. Gemini Enterprise only. The resource name of the SCIM -// Token. Format: -// `locations/{location}/workforcePools/{workforce_pool}/providers/ -// {workforce_pool_provider}/scimTenants/{scim_tenant}/tokens/{token}`. -func (r *LocationsWorkforcePoolsProvidersScimTenantsTokensService) Patch(name string, workforcepoolproviderscimtoken *WorkforcePoolProviderScimToken) *LocationsWorkforcePoolsProvidersScimTenantsTokensPatchCall { - c := &LocationsWorkforcePoolsProvidersScimTenantsTokensPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.workforcepoolproviderscimtoken = workforcepoolproviderscimtoken - return c -} - -// UpdateMask sets the optional parameter "updateMask": Gemini Enterprise only. -// The list of fields to update. -func (c *LocationsWorkforcePoolsProvidersScimTenantsTokensPatchCall) UpdateMask(updateMask string) *LocationsWorkforcePoolsProvidersScimTenantsTokensPatchCall { - c.urlParams_.Set("updateMask", updateMask) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *LocationsWorkforcePoolsProvidersScimTenantsTokensPatchCall) Fields(s ...googleapi.Field) *LocationsWorkforcePoolsProvidersScimTenantsTokensPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *LocationsWorkforcePoolsProvidersScimTenantsTokensPatchCall) Context(ctx context.Context) *LocationsWorkforcePoolsProvidersScimTenantsTokensPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *LocationsWorkforcePoolsProvidersScimTenantsTokensPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *LocationsWorkforcePoolsProvidersScimTenantsTokensPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.workforcepoolproviderscimtoken) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "iam.locations.workforcePools.providers.scimTenants.tokens.patch", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "iam.locations.workforcePools.providers.scimTenants.tokens.patch" call. -// Any non-2xx status code is an error. Response headers are in either -// *WorkforcePoolProviderScimToken.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *LocationsWorkforcePoolsProvidersScimTenantsTokensPatchCall) Do(opts ...googleapi.CallOption) (*WorkforcePoolProviderScimToken, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &WorkforcePoolProviderScimToken{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "iam.locations.workforcePools.providers.scimTenants.tokens.patch", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type LocationsWorkforcePoolsSubjectsDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes a WorkforcePoolSubject. Subject must not already be in a -// deleted state. A WorkforcePoolSubject is automatically created the first -// time an external credential is exchanged for a Google Cloud credential using -// a mapped `google.subject` attribute. There is no endpoint to manually create -// a WorkforcePoolSubject. For 30 days after a WorkforcePoolSubject is deleted, -// using the same `google.subject` attribute in token exchanges with Google -// Cloud STS fails. Call UndeleteWorkforcePoolSubject to undelete a -// WorkforcePoolSubject that has been deleted, within within 30 days of -// deleting it. After 30 days, the WorkforcePoolSubject is permanently deleted. -// At this point, a token exchange with Google Cloud STS that uses the same -// mapped `google.subject` attribute automatically creates a new -// WorkforcePoolSubject that is unrelated to the previously deleted -// WorkforcePoolSubject but has the same `google.subject` value. -// -// - name: The resource name of the WorkforcePoolSubject. Special characters, -// like `/` and `:`, must be escaped, because all URLs need to conform to the -// "When to Escape and Unescape" section of RFC3986 -// (https://www.ietf.org/rfc/rfc2396.txt). Format: -// `locations/{location}/workforcePools/{workforce_pool_id}/subjects/{subject_ -// id}`. -func (r *LocationsWorkforcePoolsSubjectsService) Delete(name string) *LocationsWorkforcePoolsSubjectsDeleteCall { - c := &LocationsWorkforcePoolsSubjectsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *LocationsWorkforcePoolsSubjectsDeleteCall) Fields(s ...googleapi.Field) *LocationsWorkforcePoolsSubjectsDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *LocationsWorkforcePoolsSubjectsDeleteCall) Context(ctx context.Context) *LocationsWorkforcePoolsSubjectsDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *LocationsWorkforcePoolsSubjectsDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *LocationsWorkforcePoolsSubjectsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "iam.locations.workforcePools.subjects.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "iam.locations.workforcePools.subjects.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *LocationsWorkforcePoolsSubjectsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "iam.locations.workforcePools.subjects.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type LocationsWorkforcePoolsSubjectsUndeleteCall struct { - s *Service - name string - undeleteworkforcepoolsubjectrequest *UndeleteWorkforcePoolSubjectRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Undelete: Undeletes a WorkforcePoolSubject, as long as it was deleted fewer -// than 30 days ago. -// -// - name: The resource name of the WorkforcePoolSubject. Special characters, -// like `/` and `:`, must be escaped, because all URLs need to conform to the -// "When to Escape and Unescape" section of RFC3986 -// (https://www.ietf.org/rfc/rfc2396.txt). Format: -// `locations/{location}/workforcePools/{workforce_pool_id}/subjects/{subject_ -// id}`. -func (r *LocationsWorkforcePoolsSubjectsService) Undelete(name string, undeleteworkforcepoolsubjectrequest *UndeleteWorkforcePoolSubjectRequest) *LocationsWorkforcePoolsSubjectsUndeleteCall { - c := &LocationsWorkforcePoolsSubjectsUndeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.undeleteworkforcepoolsubjectrequest = undeleteworkforcepoolsubjectrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *LocationsWorkforcePoolsSubjectsUndeleteCall) Fields(s ...googleapi.Field) *LocationsWorkforcePoolsSubjectsUndeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *LocationsWorkforcePoolsSubjectsUndeleteCall) Context(ctx context.Context) *LocationsWorkforcePoolsSubjectsUndeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *LocationsWorkforcePoolsSubjectsUndeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *LocationsWorkforcePoolsSubjectsUndeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.undeleteworkforcepoolsubjectrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:undelete") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "iam.locations.workforcePools.subjects.undelete", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "iam.locations.workforcePools.subjects.undelete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *LocationsWorkforcePoolsSubjectsUndeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "iam.locations.workforcePools.subjects.undelete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type LocationsWorkforcePoolsSubjectsOperationsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Gets the latest state of a long-running operation. Clients can use this -// method to poll the operation result at intervals as recommended by the API -// service. -// -// - name: The name of the operation resource. -func (r *LocationsWorkforcePoolsSubjectsOperationsService) Get(name string) *LocationsWorkforcePoolsSubjectsOperationsGetCall { - c := &LocationsWorkforcePoolsSubjectsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *LocationsWorkforcePoolsSubjectsOperationsGetCall) Fields(s ...googleapi.Field) *LocationsWorkforcePoolsSubjectsOperationsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *LocationsWorkforcePoolsSubjectsOperationsGetCall) IfNoneMatch(entityTag string) *LocationsWorkforcePoolsSubjectsOperationsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *LocationsWorkforcePoolsSubjectsOperationsGetCall) Context(ctx context.Context) *LocationsWorkforcePoolsSubjectsOperationsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *LocationsWorkforcePoolsSubjectsOperationsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *LocationsWorkforcePoolsSubjectsOperationsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "iam.locations.workforcePools.subjects.operations.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "iam.locations.workforcePools.subjects.operations.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *LocationsWorkforcePoolsSubjectsOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "iam.locations.workforcePools.subjects.operations.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type OrganizationsRolesCreateCall struct { - s *Service - parent string - createrolerequest *CreateRoleRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Create: Creates a new custom Role. -// -// - parent: The `parent` parameter's value depends on the target resource for -// the request, namely projects -// (https://cloud.google.com/iam/docs/reference/rest/v1/projects.roles) or -// organizations -// (https://cloud.google.com/iam/docs/reference/rest/v1/organizations.roles). -// Each resource type's `parent` value format is described below: * -// projects.roles.create -// (https://cloud.google.com/iam/docs/reference/rest/v1/projects.roles/create): -// `projects/{PROJECT_ID}`. This method creates project-level custom roles -// (https://cloud.google.com/iam/docs/understanding-custom-roles). Example -// request URL: `https://iam.googleapis.com/v1/projects/{PROJECT_ID}/roles` * -// organizations.roles.create -// (https://cloud.google.com/iam/docs/reference/rest/v1/organizations.roles/create): -// `organizations/{ORGANIZATION_ID}`. This method creates organization-level -// custom roles -// (https://cloud.google.com/iam/docs/understanding-custom-roles). Example -// request URL: -// `https://iam.googleapis.com/v1/organizations/{ORGANIZATION_ID}/roles` -// Note: Wildcard (*) values are invalid; you must specify a complete project -// ID or organization ID. -func (r *OrganizationsRolesService) Create(parent string, createrolerequest *CreateRoleRequest) *OrganizationsRolesCreateCall { - c := &OrganizationsRolesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.createrolerequest = createrolerequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *OrganizationsRolesCreateCall) Fields(s ...googleapi.Field) *OrganizationsRolesCreateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *OrganizationsRolesCreateCall) Context(ctx context.Context) *OrganizationsRolesCreateCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *OrganizationsRolesCreateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *OrganizationsRolesCreateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.createrolerequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/roles") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "iam.organizations.roles.create", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "iam.organizations.roles.create" call. -// Any non-2xx status code is an error. Response headers are in either -// *Role.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *OrganizationsRolesCreateCall) Do(opts ...googleapi.CallOption) (*Role, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &Role{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "iam.organizations.roles.create", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type OrganizationsRolesDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes a custom Role. When you delete a custom role, the following -// changes occur immediately: * You cannot bind a principal to the custom role -// in an IAM Policy. * Existing bindings to the custom role are not changed, -// but they have no effect. * By default, the response from ListRoles does not -// include the custom role. A deleted custom role still counts toward the -// custom role limit (https://cloud.google.com/iam/help/limits) until it is -// permanently deleted. You have 7 days to undelete the custom role. After 7 -// days, the following changes occur: * The custom role is permanently deleted -// and cannot be recovered. * If an IAM policy contains a binding to the custom -// role, the binding is permanently removed. * The custom role no longer counts -// toward your custom role limit. -// -// - name: The `name` parameter's value depends on the target resource for the -// request, namely projects -// (https://cloud.google.com/iam/docs/reference/rest/v1/projects.roles) or -// organizations -// (https://cloud.google.com/iam/docs/reference/rest/v1/organizations.roles). -// Each resource type's `name` value format is described below: * -// projects.roles.delete -// (https://cloud.google.com/iam/docs/reference/rest/v1/projects.roles/delete): -// `projects/{PROJECT_ID}/roles/{CUSTOM_ROLE_ID}`. This method deletes only -// custom roles -// (https://cloud.google.com/iam/docs/understanding-custom-roles) that have -// been created at the project level. Example request URL: -// `https://iam.googleapis.com/v1/projects/{PROJECT_ID}/roles/{CUSTOM_ROLE_ID} -// ` * organizations.roles.delete -// (https://cloud.google.com/iam/docs/reference/rest/v1/organizations.roles/delete): -// `organizations/{ORGANIZATION_ID}/roles/{CUSTOM_ROLE_ID}`. This method -// deletes only custom roles -// (https://cloud.google.com/iam/docs/understanding-custom-roles) that have -// been created at the organization level. Example request URL: -// `https://iam.googleapis.com/v1/organizations/{ORGANIZATION_ID}/roles/{CUSTO -// M_ROLE_ID}` Note: Wildcard (*) values are invalid; you must specify a -// complete project ID or organization ID. -func (r *OrganizationsRolesService) Delete(name string) *OrganizationsRolesDeleteCall { - c := &OrganizationsRolesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// Etag sets the optional parameter "etag": Used to perform a consistent -// read-modify-write. -func (c *OrganizationsRolesDeleteCall) Etag(etag string) *OrganizationsRolesDeleteCall { - c.urlParams_.Set("etag", etag) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *OrganizationsRolesDeleteCall) Fields(s ...googleapi.Field) *OrganizationsRolesDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *OrganizationsRolesDeleteCall) Context(ctx context.Context) *OrganizationsRolesDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *OrganizationsRolesDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *OrganizationsRolesDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "iam.organizations.roles.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "iam.organizations.roles.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Role.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *OrganizationsRolesDeleteCall) Do(opts ...googleapi.CallOption) (*Role, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &Role{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "iam.organizations.roles.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type OrganizationsRolesGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Gets the definition of a Role. -// -// - name: The `name` parameter's value depends on the target resource for the -// request, namely roles -// (https://cloud.google.com/iam/docs/reference/rest/v1/roles), projects -// (https://cloud.google.com/iam/docs/reference/rest/v1/projects.roles), or -// organizations -// (https://cloud.google.com/iam/docs/reference/rest/v1/organizations.roles). -// Each resource type's `name` value format is described below: * roles.get -// (https://cloud.google.com/iam/docs/reference/rest/v1/roles/get): -// `roles/{ROLE_NAME}`. This method returns results from all predefined roles -// (https://cloud.google.com/iam/docs/understanding-roles#predefined_roles) -// in IAM. Example request URL: -// `https://iam.googleapis.com/v1/roles/{ROLE_NAME}` * projects.roles.get -// (https://cloud.google.com/iam/docs/reference/rest/v1/projects.roles/get): -// `projects/{PROJECT_ID}/roles/{CUSTOM_ROLE_ID}`. This method returns only -// custom roles -// (https://cloud.google.com/iam/docs/understanding-custom-roles) that have -// been created at the project level. Example request URL: -// `https://iam.googleapis.com/v1/projects/{PROJECT_ID}/roles/{CUSTOM_ROLE_ID} -// ` * organizations.roles.get -// (https://cloud.google.com/iam/docs/reference/rest/v1/organizations.roles/get): -// `organizations/{ORGANIZATION_ID}/roles/{CUSTOM_ROLE_ID}`. This method -// returns only custom roles -// (https://cloud.google.com/iam/docs/understanding-custom-roles) that have -// been created at the organization level. Example request URL: -// `https://iam.googleapis.com/v1/organizations/{ORGANIZATION_ID}/roles/{CUSTO -// M_ROLE_ID}` Note: Wildcard (*) values are invalid; you must specify a -// complete project ID or organization ID. -func (r *OrganizationsRolesService) Get(name string) *OrganizationsRolesGetCall { - c := &OrganizationsRolesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *OrganizationsRolesGetCall) Fields(s ...googleapi.Field) *OrganizationsRolesGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *OrganizationsRolesGetCall) IfNoneMatch(entityTag string) *OrganizationsRolesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *OrganizationsRolesGetCall) Context(ctx context.Context) *OrganizationsRolesGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *OrganizationsRolesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *OrganizationsRolesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "iam.organizations.roles.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "iam.organizations.roles.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *Role.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *OrganizationsRolesGetCall) Do(opts ...googleapi.CallOption) (*Role, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &Role{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "iam.organizations.roles.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type OrganizationsRolesListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Lists every predefined Role that IAM supports, or every custom role -// that is defined for an organization or project. -// -// - parent: The `parent` parameter's value depends on the target resource for -// the request, namely roles -// (https://cloud.google.com/iam/docs/reference/rest/v1/roles), projects -// (https://cloud.google.com/iam/docs/reference/rest/v1/projects.roles), or -// organizations -// (https://cloud.google.com/iam/docs/reference/rest/v1/organizations.roles). -// Each resource type's `parent` value format is described below: * -// roles.list -// (https://cloud.google.com/iam/docs/reference/rest/v1/roles/list): An empty -// string. This method doesn't require a resource; it simply returns all -// predefined roles -// (https://cloud.google.com/iam/docs/understanding-roles#predefined_roles) -// in IAM. Example request URL: `https://iam.googleapis.com/v1/roles` * -// projects.roles.list -// (https://cloud.google.com/iam/docs/reference/rest/v1/projects.roles/list): -// `projects/{PROJECT_ID}`. This method lists all project-level custom roles -// (https://cloud.google.com/iam/docs/understanding-custom-roles). Example -// request URL: `https://iam.googleapis.com/v1/projects/{PROJECT_ID}/roles` * -// organizations.roles.list -// (https://cloud.google.com/iam/docs/reference/rest/v1/organizations.roles/list): -// `organizations/{ORGANIZATION_ID}`. This method lists all -// organization-level custom roles -// (https://cloud.google.com/iam/docs/understanding-custom-roles). Example -// request URL: -// `https://iam.googleapis.com/v1/organizations/{ORGANIZATION_ID}/roles` -// Note: Wildcard (*) values are invalid; you must specify a complete project -// ID or organization ID. -func (r *OrganizationsRolesService) List(parent string) *OrganizationsRolesListCall { - c := &OrganizationsRolesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// PageSize sets the optional parameter "pageSize": Optional limit on the -// number of roles to include in the response. The default is 300, and the -// maximum is 1,000. -func (c *OrganizationsRolesListCall) PageSize(pageSize int64) *OrganizationsRolesListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": Optional pagination token -// returned in an earlier ListRolesResponse. -func (c *OrganizationsRolesListCall) PageToken(pageToken string) *OrganizationsRolesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ShowDeleted sets the optional parameter "showDeleted": Include Roles that -// have been deleted. -func (c *OrganizationsRolesListCall) ShowDeleted(showDeleted bool) *OrganizationsRolesListCall { - c.urlParams_.Set("showDeleted", fmt.Sprint(showDeleted)) - return c -} - -// View sets the optional parameter "view": Optional view for the returned Role -// objects. When `FULL` is specified, the `includedPermissions` field is -// returned, which includes a list of all permissions in the role. The default -// value is `BASIC`, which does not return the `includedPermissions` field. -// -// Possible values: -// -// "BASIC" - Omits the `included_permissions` field. This is the default -// -// value. -// -// "FULL" - Returns all fields. -func (c *OrganizationsRolesListCall) View(view string) *OrganizationsRolesListCall { - c.urlParams_.Set("view", view) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *OrganizationsRolesListCall) Fields(s ...googleapi.Field) *OrganizationsRolesListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *OrganizationsRolesListCall) IfNoneMatch(entityTag string) *OrganizationsRolesListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *OrganizationsRolesListCall) Context(ctx context.Context) *OrganizationsRolesListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *OrganizationsRolesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *OrganizationsRolesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/roles") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "iam.organizations.roles.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "iam.organizations.roles.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *ListRolesResponse.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified was -// returned. -func (c *OrganizationsRolesListCall) Do(opts ...googleapi.CallOption) (*ListRolesResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &ListRolesResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "iam.organizations.roles.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *OrganizationsRolesListCall) Pages(ctx context.Context, f func(*ListRolesResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -type OrganizationsRolesPatchCall struct { - s *Service - name string - role *Role - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Updates the definition of a custom Role. -// -// - name: The `name` parameter's value depends on the target resource for the -// request, namely projects -// (https://cloud.google.com/iam/docs/reference/rest/v1/projects.roles) or -// organizations -// (https://cloud.google.com/iam/docs/reference/rest/v1/organizations.roles). -// Each resource type's `name` value format is described below: * -// projects.roles.patch -// (https://cloud.google.com/iam/docs/reference/rest/v1/projects.roles/patch): -// `projects/{PROJECT_ID}/roles/{CUSTOM_ROLE_ID}`. This method updates only -// custom roles -// (https://cloud.google.com/iam/docs/understanding-custom-roles) that have -// been created at the project level. Example request URL: -// `https://iam.googleapis.com/v1/projects/{PROJECT_ID}/roles/{CUSTOM_ROLE_ID} -// ` * organizations.roles.patch -// (https://cloud.google.com/iam/docs/reference/rest/v1/organizations.roles/patch): -// `organizations/{ORGANIZATION_ID}/roles/{CUSTOM_ROLE_ID}`. This method -// updates only custom roles -// (https://cloud.google.com/iam/docs/understanding-custom-roles) that have -// been created at the organization level. Example request URL: -// `https://iam.googleapis.com/v1/organizations/{ORGANIZATION_ID}/roles/{CUSTO -// M_ROLE_ID}` Note: Wildcard (*) values are invalid; you must specify a -// complete project ID or organization ID. -func (r *OrganizationsRolesService) Patch(name string, role *Role) *OrganizationsRolesPatchCall { - c := &OrganizationsRolesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.role = role - return c -} - -// UpdateMask sets the optional parameter "updateMask": A mask describing which -// fields in the Role have changed. -func (c *OrganizationsRolesPatchCall) UpdateMask(updateMask string) *OrganizationsRolesPatchCall { - c.urlParams_.Set("updateMask", updateMask) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *OrganizationsRolesPatchCall) Fields(s ...googleapi.Field) *OrganizationsRolesPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *OrganizationsRolesPatchCall) Context(ctx context.Context) *OrganizationsRolesPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *OrganizationsRolesPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *OrganizationsRolesPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.role) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "iam.organizations.roles.patch", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "iam.organizations.roles.patch" call. -// Any non-2xx status code is an error. Response headers are in either -// *Role.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *OrganizationsRolesPatchCall) Do(opts ...googleapi.CallOption) (*Role, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &Role{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "iam.organizations.roles.patch", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type OrganizationsRolesUndeleteCall struct { - s *Service - name string - undeleterolerequest *UndeleteRoleRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Undelete: Undeletes a custom Role. -// -// - name: The `name` parameter's value depends on the target resource for the -// request, namely projects -// (https://cloud.google.com/iam/docs/reference/rest/v1/projects.roles) or -// organizations -// (https://cloud.google.com/iam/docs/reference/rest/v1/organizations.roles). -// Each resource type's `name` value format is described below: * -// projects.roles.undelete -// (https://cloud.google.com/iam/docs/reference/rest/v1/projects.roles/undelete): -// `projects/{PROJECT_ID}/roles/{CUSTOM_ROLE_ID}`. This method undeletes only -// custom roles -// (https://cloud.google.com/iam/docs/understanding-custom-roles) that have -// been created at the project level. Example request URL: -// `https://iam.googleapis.com/v1/projects/{PROJECT_ID}/roles/{CUSTOM_ROLE_ID} -// ` * organizations.roles.undelete -// (https://cloud.google.com/iam/docs/reference/rest/v1/organizations.roles/undelete): -// `organizations/{ORGANIZATION_ID}/roles/{CUSTOM_ROLE_ID}`. This method -// undeletes only custom roles -// (https://cloud.google.com/iam/docs/understanding-custom-roles) that have -// been created at the organization level. Example request URL: -// `https://iam.googleapis.com/v1/organizations/{ORGANIZATION_ID}/roles/{CUSTO -// M_ROLE_ID}` Note: Wildcard (*) values are invalid; you must specify a -// complete project ID or organization ID. -func (r *OrganizationsRolesService) Undelete(name string, undeleterolerequest *UndeleteRoleRequest) *OrganizationsRolesUndeleteCall { - c := &OrganizationsRolesUndeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.undeleterolerequest = undeleterolerequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *OrganizationsRolesUndeleteCall) Fields(s ...googleapi.Field) *OrganizationsRolesUndeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *OrganizationsRolesUndeleteCall) Context(ctx context.Context) *OrganizationsRolesUndeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *OrganizationsRolesUndeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *OrganizationsRolesUndeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.undeleterolerequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:undelete") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "iam.organizations.roles.undelete", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "iam.organizations.roles.undelete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Role.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *OrganizationsRolesUndeleteCall) Do(opts ...googleapi.CallOption) (*Role, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &Role{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "iam.organizations.roles.undelete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type PermissionsQueryTestablePermissionsCall struct { - s *Service - querytestablepermissionsrequest *QueryTestablePermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// QueryTestablePermissions: Lists every permission that you can test on a -// resource. A permission is testable if you can check whether a principal has -// that permission on the resource. -func (r *PermissionsService) QueryTestablePermissions(querytestablepermissionsrequest *QueryTestablePermissionsRequest) *PermissionsQueryTestablePermissionsCall { - c := &PermissionsQueryTestablePermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.querytestablepermissionsrequest = querytestablepermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *PermissionsQueryTestablePermissionsCall) Fields(s ...googleapi.Field) *PermissionsQueryTestablePermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *PermissionsQueryTestablePermissionsCall) Context(ctx context.Context) *PermissionsQueryTestablePermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *PermissionsQueryTestablePermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *PermissionsQueryTestablePermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.querytestablepermissionsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/permissions:queryTestablePermissions") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "iam.permissions.queryTestablePermissions", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "iam.permissions.queryTestablePermissions" call. -// Any non-2xx status code is an error. Response headers are in either -// *QueryTestablePermissionsResponse.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *PermissionsQueryTestablePermissionsCall) Do(opts ...googleapi.CallOption) (*QueryTestablePermissionsResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &QueryTestablePermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "iam.permissions.queryTestablePermissions", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *PermissionsQueryTestablePermissionsCall) Pages(ctx context.Context, f func(*QueryTestablePermissionsResponse) error) error { - c.ctx_ = ctx - defer func(pt string) { c.querytestablepermissionsrequest.PageToken = pt }(c.querytestablepermissionsrequest.PageToken) - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.querytestablepermissionsrequest.PageToken = x.NextPageToken - } -} - -type ProjectsLocationsOauthClientsCreateCall struct { - s *Service - parent string - oauthclient *OauthClient - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Create: Creates a new OauthClient. You cannot reuse the name of a deleted -// OauthClient until 30 days after deletion. -// -// - parent: The parent resource to create the OauthClient in. The only -// supported location is `global`. -func (r *ProjectsLocationsOauthClientsService) Create(parent string, oauthclient *OauthClient) *ProjectsLocationsOauthClientsCreateCall { - c := &ProjectsLocationsOauthClientsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.oauthclient = oauthclient - return c -} - -// OauthClientId sets the optional parameter "oauthClientId": Required. The ID -// to use for the OauthClient, which becomes the final component of the -// resource name. This value should be a string of 6 to 63 lowercase letters, -// digits, or hyphens. It must start with a letter, and cannot have a trailing -// hyphen. The prefix `gcp-` is reserved for use by Google, and may not be -// specified. -func (c *ProjectsLocationsOauthClientsCreateCall) OauthClientId(oauthClientId string) *ProjectsLocationsOauthClientsCreateCall { - c.urlParams_.Set("oauthClientId", oauthClientId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsLocationsOauthClientsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsOauthClientsCreateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsOauthClientsCreateCall) Context(ctx context.Context) *ProjectsLocationsOauthClientsCreateCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsOauthClientsCreateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsOauthClientsCreateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.oauthclient) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/oauthClients") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "iam.projects.locations.oauthClients.create", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "iam.projects.locations.oauthClients.create" call. -// Any non-2xx status code is an error. Response headers are in either -// *OauthClient.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsLocationsOauthClientsCreateCall) Do(opts ...googleapi.CallOption) (*OauthClient, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &OauthClient{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "iam.projects.locations.oauthClients.create", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsLocationsOauthClientsDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes an OauthClient. You cannot use a deleted OauthClient. -// However, deletion does not revoke access tokens that have already been -// issued. They continue to grant access. Deletion does revoke refresh tokens -// that have already been issued. They cannot be used to renew an access token. -// If the OauthClient is undeleted, and the refresh tokens are not expired, -// they are valid for token exchange again. You can undelete an OauthClient for -// 30 days. After 30 days, deletion is permanent. You cannot update deleted -// OauthClients. However, you can view and list them. -// -// - name: The name of the OauthClient to delete. Format: -// `projects/{project}/locations/{location}/oauthClients/{oauth_client}`. -func (r *ProjectsLocationsOauthClientsService) Delete(name string) *ProjectsLocationsOauthClientsDeleteCall { - c := &ProjectsLocationsOauthClientsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsLocationsOauthClientsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsOauthClientsDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsOauthClientsDeleteCall) Context(ctx context.Context) *ProjectsLocationsOauthClientsDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsOauthClientsDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsOauthClientsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "iam.projects.locations.oauthClients.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "iam.projects.locations.oauthClients.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *OauthClient.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsLocationsOauthClientsDeleteCall) Do(opts ...googleapi.CallOption) (*OauthClient, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &OauthClient{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "iam.projects.locations.oauthClients.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsLocationsOauthClientsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Gets an individual OauthClient. -// -// - name: The name of the OauthClient to retrieve. Format: -// `projects/{project}/locations/{location}/oauthClients/{oauth_client}`. -func (r *ProjectsLocationsOauthClientsService) Get(name string) *ProjectsLocationsOauthClientsGetCall { - c := &ProjectsLocationsOauthClientsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsLocationsOauthClientsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsOauthClientsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *ProjectsLocationsOauthClientsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsOauthClientsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsOauthClientsGetCall) Context(ctx context.Context) *ProjectsLocationsOauthClientsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsOauthClientsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsOauthClientsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "iam.projects.locations.oauthClients.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "iam.projects.locations.oauthClients.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *OauthClient.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsLocationsOauthClientsGetCall) Do(opts ...googleapi.CallOption) (*OauthClient, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &OauthClient{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "iam.projects.locations.oauthClients.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsLocationsOauthClientsListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Lists all non-deleted OauthClients in a project. If `show_deleted` is -// set to `true`, then deleted OauthClients are also listed. -// -// - parent: The parent to list OauthClients for. -func (r *ProjectsLocationsOauthClientsService) List(parent string) *ProjectsLocationsOauthClientsListCall { - c := &ProjectsLocationsOauthClientsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// PageSize sets the optional parameter "pageSize": The maximum number of -// OauthClients to return. If unspecified, at most 50 OauthClients will be -// returned. The maximum value is 100; values above 100 are truncated to 100. -func (c *ProjectsLocationsOauthClientsListCall) PageSize(pageSize int64) *ProjectsLocationsOauthClientsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": A page token, received -// from a previous `ListOauthClients` call. Provide this to retrieve the -// subsequent page. -func (c *ProjectsLocationsOauthClientsListCall) PageToken(pageToken string) *ProjectsLocationsOauthClientsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ShowDeleted sets the optional parameter "showDeleted": Whether to return -// soft-deleted OauthClients. -func (c *ProjectsLocationsOauthClientsListCall) ShowDeleted(showDeleted bool) *ProjectsLocationsOauthClientsListCall { - c.urlParams_.Set("showDeleted", fmt.Sprint(showDeleted)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsLocationsOauthClientsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsOauthClientsListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *ProjectsLocationsOauthClientsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsOauthClientsListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsOauthClientsListCall) Context(ctx context.Context) *ProjectsLocationsOauthClientsListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsOauthClientsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsOauthClientsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/oauthClients") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "iam.projects.locations.oauthClients.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "iam.projects.locations.oauthClients.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *ListOauthClientsResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsLocationsOauthClientsListCall) Do(opts ...googleapi.CallOption) (*ListOauthClientsResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &ListOauthClientsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "iam.projects.locations.oauthClients.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsOauthClientsListCall) Pages(ctx context.Context, f func(*ListOauthClientsResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -type ProjectsLocationsOauthClientsPatchCall struct { - s *Service - name string - oauthclient *OauthClient - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Updates an existing OauthClient. -// -// - name: Immutable. Identifier. The resource name of the OauthClient. -// Format:`projects/{project}/locations/{location}/oauthClients/{oauth_client} -// `. -func (r *ProjectsLocationsOauthClientsService) Patch(name string, oauthclient *OauthClient) *ProjectsLocationsOauthClientsPatchCall { - c := &ProjectsLocationsOauthClientsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.oauthclient = oauthclient - return c -} - -// UpdateMask sets the optional parameter "updateMask": Required. The list of -// fields to update. -func (c *ProjectsLocationsOauthClientsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsOauthClientsPatchCall { - c.urlParams_.Set("updateMask", updateMask) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsLocationsOauthClientsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsOauthClientsPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsOauthClientsPatchCall) Context(ctx context.Context) *ProjectsLocationsOauthClientsPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsOauthClientsPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsOauthClientsPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.oauthclient) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "iam.projects.locations.oauthClients.patch", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "iam.projects.locations.oauthClients.patch" call. -// Any non-2xx status code is an error. Response headers are in either -// *OauthClient.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsLocationsOauthClientsPatchCall) Do(opts ...googleapi.CallOption) (*OauthClient, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &OauthClient{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "iam.projects.locations.oauthClients.patch", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsLocationsOauthClientsUndeleteCall struct { - s *Service - name string - undeleteoauthclientrequest *UndeleteOauthClientRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Undelete: Undeletes an OauthClient, as long as it was deleted fewer than 30 -// days ago. -// -// - name: The name of the OauthClient to undelete. Format: -// `projects/{project}/locations/{location}/oauthClients/{oauth_client}`. -func (r *ProjectsLocationsOauthClientsService) Undelete(name string, undeleteoauthclientrequest *UndeleteOauthClientRequest) *ProjectsLocationsOauthClientsUndeleteCall { - c := &ProjectsLocationsOauthClientsUndeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.undeleteoauthclientrequest = undeleteoauthclientrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsLocationsOauthClientsUndeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsOauthClientsUndeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsOauthClientsUndeleteCall) Context(ctx context.Context) *ProjectsLocationsOauthClientsUndeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsOauthClientsUndeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsOauthClientsUndeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.undeleteoauthclientrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:undelete") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "iam.projects.locations.oauthClients.undelete", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "iam.projects.locations.oauthClients.undelete" call. -// Any non-2xx status code is an error. Response headers are in either -// *OauthClient.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsLocationsOauthClientsUndeleteCall) Do(opts ...googleapi.CallOption) (*OauthClient, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &OauthClient{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "iam.projects.locations.oauthClients.undelete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsLocationsOauthClientsCredentialsCreateCall struct { - s *Service - parent string - oauthclientcredential *OauthClientCredential - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Create: Creates a new OauthClientCredential. -// -// - parent: The parent resource to create the OauthClientCredential in. -func (r *ProjectsLocationsOauthClientsCredentialsService) Create(parent string, oauthclientcredential *OauthClientCredential) *ProjectsLocationsOauthClientsCredentialsCreateCall { - c := &ProjectsLocationsOauthClientsCredentialsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.oauthclientcredential = oauthclientcredential - return c -} - -// OauthClientCredentialId sets the optional parameter -// "oauthClientCredentialId": Required. The ID to use for the -// OauthClientCredential, which becomes the final component of the resource -// name. This value should be 4-32 characters, and may contain the characters -// [a-z0-9-]. The prefix `gcp-` is reserved for use by Google, and may not be -// specified. -func (c *ProjectsLocationsOauthClientsCredentialsCreateCall) OauthClientCredentialId(oauthClientCredentialId string) *ProjectsLocationsOauthClientsCredentialsCreateCall { - c.urlParams_.Set("oauthClientCredentialId", oauthClientCredentialId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsLocationsOauthClientsCredentialsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsOauthClientsCredentialsCreateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsOauthClientsCredentialsCreateCall) Context(ctx context.Context) *ProjectsLocationsOauthClientsCredentialsCreateCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsOauthClientsCredentialsCreateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsOauthClientsCredentialsCreateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.oauthclientcredential) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/credentials") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "iam.projects.locations.oauthClients.credentials.create", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "iam.projects.locations.oauthClients.credentials.create" call. -// Any non-2xx status code is an error. Response headers are in either -// *OauthClientCredential.ServerResponse.Header or (if a response was returned -// at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified was -// returned. -func (c *ProjectsLocationsOauthClientsCredentialsCreateCall) Do(opts ...googleapi.CallOption) (*OauthClientCredential, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &OauthClientCredential{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "iam.projects.locations.oauthClients.credentials.create", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsLocationsOauthClientsCredentialsDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes an OauthClientCredential. Before deleting an -// OauthClientCredential, it should first be disabled. -// -// - name: The name of the OauthClientCredential to delete. Format: -// `projects/{project}/locations/{location}/oauthClients/{oauth_client}/creden -// tials/{credential}`. -func (r *ProjectsLocationsOauthClientsCredentialsService) Delete(name string) *ProjectsLocationsOauthClientsCredentialsDeleteCall { - c := &ProjectsLocationsOauthClientsCredentialsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsLocationsOauthClientsCredentialsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsOauthClientsCredentialsDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsOauthClientsCredentialsDeleteCall) Context(ctx context.Context) *ProjectsLocationsOauthClientsCredentialsDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsOauthClientsCredentialsDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsOauthClientsCredentialsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "iam.projects.locations.oauthClients.credentials.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "iam.projects.locations.oauthClients.credentials.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Empty.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsLocationsOauthClientsCredentialsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &Empty{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "iam.projects.locations.oauthClients.credentials.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsLocationsOauthClientsCredentialsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Gets an individual OauthClientCredential. -// -// - name: The name of the OauthClientCredential to retrieve. Format: -// `projects/{project}/locations/{location}/oauthClients/{oauth_client}/creden -// tials/{credential}`. -func (r *ProjectsLocationsOauthClientsCredentialsService) Get(name string) *ProjectsLocationsOauthClientsCredentialsGetCall { - c := &ProjectsLocationsOauthClientsCredentialsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsLocationsOauthClientsCredentialsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsOauthClientsCredentialsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *ProjectsLocationsOauthClientsCredentialsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsOauthClientsCredentialsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsOauthClientsCredentialsGetCall) Context(ctx context.Context) *ProjectsLocationsOauthClientsCredentialsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsOauthClientsCredentialsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsOauthClientsCredentialsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "iam.projects.locations.oauthClients.credentials.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "iam.projects.locations.oauthClients.credentials.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *OauthClientCredential.ServerResponse.Header or (if a response was returned -// at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified was -// returned. -func (c *ProjectsLocationsOauthClientsCredentialsGetCall) Do(opts ...googleapi.CallOption) (*OauthClientCredential, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &OauthClientCredential{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "iam.projects.locations.oauthClients.credentials.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsLocationsOauthClientsCredentialsListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Lists all OauthClientCredentials in an OauthClient. -// -// - parent: The parent to list OauthClientCredentials for. -func (r *ProjectsLocationsOauthClientsCredentialsService) List(parent string) *ProjectsLocationsOauthClientsCredentialsListCall { - c := &ProjectsLocationsOauthClientsCredentialsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsLocationsOauthClientsCredentialsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsOauthClientsCredentialsListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *ProjectsLocationsOauthClientsCredentialsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsOauthClientsCredentialsListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsOauthClientsCredentialsListCall) Context(ctx context.Context) *ProjectsLocationsOauthClientsCredentialsListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsOauthClientsCredentialsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsOauthClientsCredentialsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/credentials") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "iam.projects.locations.oauthClients.credentials.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "iam.projects.locations.oauthClients.credentials.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *ListOauthClientCredentialsResponse.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsLocationsOauthClientsCredentialsListCall) Do(opts ...googleapi.CallOption) (*ListOauthClientCredentialsResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &ListOauthClientCredentialsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "iam.projects.locations.oauthClients.credentials.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsLocationsOauthClientsCredentialsPatchCall struct { - s *Service - name string - oauthclientcredential *OauthClientCredential - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Updates an existing OauthClientCredential. -// -// - name: Immutable. Identifier. The resource name of the -// OauthClientCredential. Format: -// `projects/{project}/locations/{location}/oauthClients/{oauth_client}/creden -// tials/{credential}`. -func (r *ProjectsLocationsOauthClientsCredentialsService) Patch(name string, oauthclientcredential *OauthClientCredential) *ProjectsLocationsOauthClientsCredentialsPatchCall { - c := &ProjectsLocationsOauthClientsCredentialsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.oauthclientcredential = oauthclientcredential - return c -} - -// UpdateMask sets the optional parameter "updateMask": Required. The list of -// fields to update. -func (c *ProjectsLocationsOauthClientsCredentialsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsOauthClientsCredentialsPatchCall { - c.urlParams_.Set("updateMask", updateMask) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsLocationsOauthClientsCredentialsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsOauthClientsCredentialsPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsOauthClientsCredentialsPatchCall) Context(ctx context.Context) *ProjectsLocationsOauthClientsCredentialsPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsOauthClientsCredentialsPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsOauthClientsCredentialsPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.oauthclientcredential) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "iam.projects.locations.oauthClients.credentials.patch", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "iam.projects.locations.oauthClients.credentials.patch" call. -// Any non-2xx status code is an error. Response headers are in either -// *OauthClientCredential.ServerResponse.Header or (if a response was returned -// at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified was -// returned. -func (c *ProjectsLocationsOauthClientsCredentialsPatchCall) Do(opts ...googleapi.CallOption) (*OauthClientCredential, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &OauthClientCredential{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "iam.projects.locations.oauthClients.credentials.patch", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsLocationsWorkloadIdentityPoolsAddAttestationRuleCall struct { - s *Service - resource string - addattestationrulerequest *AddAttestationRuleRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// AddAttestationRule: Add an AttestationRule on a -// WorkloadIdentityPoolManagedIdentity. The total attestation rules after -// addition must not exceed 50. -// -// - resource: The resource name of the managed identity or namespace resource -// to add an attestation rule to. -func (r *ProjectsLocationsWorkloadIdentityPoolsService) AddAttestationRule(resource string, addattestationrulerequest *AddAttestationRuleRequest) *ProjectsLocationsWorkloadIdentityPoolsAddAttestationRuleCall { - c := &ProjectsLocationsWorkloadIdentityPoolsAddAttestationRuleCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource - c.addattestationrulerequest = addattestationrulerequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsLocationsWorkloadIdentityPoolsAddAttestationRuleCall) Fields(s ...googleapi.Field) *ProjectsLocationsWorkloadIdentityPoolsAddAttestationRuleCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsWorkloadIdentityPoolsAddAttestationRuleCall) Context(ctx context.Context) *ProjectsLocationsWorkloadIdentityPoolsAddAttestationRuleCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsWorkloadIdentityPoolsAddAttestationRuleCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsWorkloadIdentityPoolsAddAttestationRuleCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.addattestationrulerequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:addAttestationRule") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "iam.projects.locations.workloadIdentityPools.addAttestationRule", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "iam.projects.locations.workloadIdentityPools.addAttestationRule" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsLocationsWorkloadIdentityPoolsAddAttestationRuleCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "iam.projects.locations.workloadIdentityPools.addAttestationRule", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsLocationsWorkloadIdentityPoolsCreateCall struct { - s *Service - parent string - workloadidentitypool *WorkloadIdentityPool - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Create: Creates a new WorkloadIdentityPool. You cannot reuse the name of a -// deleted pool until 30 days after deletion. -// -// - parent: The parent resource to create the pool in. The only supported -// location is `global`. -func (r *ProjectsLocationsWorkloadIdentityPoolsService) Create(parent string, workloadidentitypool *WorkloadIdentityPool) *ProjectsLocationsWorkloadIdentityPoolsCreateCall { - c := &ProjectsLocationsWorkloadIdentityPoolsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.workloadidentitypool = workloadidentitypool - return c -} - -// WorkloadIdentityPoolId sets the optional parameter "workloadIdentityPoolId": -// Required. The ID to use for the pool, which becomes the final component of -// the resource name. This value should be 4-32 characters, and may contain the -// characters [a-z0-9-]. The prefix `gcp-` is reserved for use by Google, and -// may not be specified. -func (c *ProjectsLocationsWorkloadIdentityPoolsCreateCall) WorkloadIdentityPoolId(workloadIdentityPoolId string) *ProjectsLocationsWorkloadIdentityPoolsCreateCall { - c.urlParams_.Set("workloadIdentityPoolId", workloadIdentityPoolId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsLocationsWorkloadIdentityPoolsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsWorkloadIdentityPoolsCreateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsWorkloadIdentityPoolsCreateCall) Context(ctx context.Context) *ProjectsLocationsWorkloadIdentityPoolsCreateCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsWorkloadIdentityPoolsCreateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsWorkloadIdentityPoolsCreateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.workloadidentitypool) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/workloadIdentityPools") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "iam.projects.locations.workloadIdentityPools.create", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "iam.projects.locations.workloadIdentityPools.create" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsLocationsWorkloadIdentityPoolsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "iam.projects.locations.workloadIdentityPools.create", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsLocationsWorkloadIdentityPoolsDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes a WorkloadIdentityPool. You cannot use a deleted pool to -// exchange external credentials for Google Cloud credentials. However, -// deletion does not revoke credentials that have already been issued. -// Credentials issued for a deleted pool do not grant access to resources. If -// the pool is undeleted, and the credentials are not expired, they grant -// access again. You can undelete a pool for 30 days. After 30 days, deletion -// is permanent. You cannot update deleted pools. However, you can view and -// list them. -// -// - name: The name of the pool to delete. -func (r *ProjectsLocationsWorkloadIdentityPoolsService) Delete(name string) *ProjectsLocationsWorkloadIdentityPoolsDeleteCall { - c := &ProjectsLocationsWorkloadIdentityPoolsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsLocationsWorkloadIdentityPoolsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsWorkloadIdentityPoolsDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsWorkloadIdentityPoolsDeleteCall) Context(ctx context.Context) *ProjectsLocationsWorkloadIdentityPoolsDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsWorkloadIdentityPoolsDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsWorkloadIdentityPoolsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "iam.projects.locations.workloadIdentityPools.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "iam.projects.locations.workloadIdentityPools.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsLocationsWorkloadIdentityPoolsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "iam.projects.locations.workloadIdentityPools.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsLocationsWorkloadIdentityPoolsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Gets an individual WorkloadIdentityPool. -// -// - name: The name of the pool to retrieve. -func (r *ProjectsLocationsWorkloadIdentityPoolsService) Get(name string) *ProjectsLocationsWorkloadIdentityPoolsGetCall { - c := &ProjectsLocationsWorkloadIdentityPoolsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsLocationsWorkloadIdentityPoolsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsWorkloadIdentityPoolsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *ProjectsLocationsWorkloadIdentityPoolsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsWorkloadIdentityPoolsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsWorkloadIdentityPoolsGetCall) Context(ctx context.Context) *ProjectsLocationsWorkloadIdentityPoolsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsWorkloadIdentityPoolsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsWorkloadIdentityPoolsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "iam.projects.locations.workloadIdentityPools.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "iam.projects.locations.workloadIdentityPools.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *WorkloadIdentityPool.ServerResponse.Header or (if a response was returned -// at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified was -// returned. -func (c *ProjectsLocationsWorkloadIdentityPoolsGetCall) Do(opts ...googleapi.CallOption) (*WorkloadIdentityPool, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &WorkloadIdentityPool{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "iam.projects.locations.workloadIdentityPools.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsLocationsWorkloadIdentityPoolsGetIamPolicyCall struct { - s *Service - resource string - getiampolicyrequest *GetIamPolicyRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// GetIamPolicy: Gets the IAM policy of a WorkloadIdentityPool. -// -// - resource: REQUIRED: The resource for which the policy is being requested. -// See Resource names (https://cloud.google.com/apis/design/resource_names) -// for the appropriate value for this field. -func (r *ProjectsLocationsWorkloadIdentityPoolsService) GetIamPolicy(resource string, getiampolicyrequest *GetIamPolicyRequest) *ProjectsLocationsWorkloadIdentityPoolsGetIamPolicyCall { - c := &ProjectsLocationsWorkloadIdentityPoolsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource - c.getiampolicyrequest = getiampolicyrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsLocationsWorkloadIdentityPoolsGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsWorkloadIdentityPoolsGetIamPolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsWorkloadIdentityPoolsGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsWorkloadIdentityPoolsGetIamPolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsWorkloadIdentityPoolsGetIamPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsWorkloadIdentityPoolsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.getiampolicyrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "iam.projects.locations.workloadIdentityPools.getIamPolicy", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "iam.projects.locations.workloadIdentityPools.getIamPolicy" call. -// Any non-2xx status code is an error. Response headers are in either -// *Policy.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsLocationsWorkloadIdentityPoolsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &Policy{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "iam.projects.locations.workloadIdentityPools.getIamPolicy", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsLocationsWorkloadIdentityPoolsListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Lists all non-deleted WorkloadIdentityPools in a project. If -// `show_deleted` is set to `true`, then deleted pools are also listed. -// -// - parent: The parent resource to list pools for. -func (r *ProjectsLocationsWorkloadIdentityPoolsService) List(parent string) *ProjectsLocationsWorkloadIdentityPoolsListCall { - c := &ProjectsLocationsWorkloadIdentityPoolsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// PageSize sets the optional parameter "pageSize": The maximum number of pools -// to return. If unspecified, at most 50 pools are returned. The maximum value -// is 1000; values above are 1000 truncated to 1000. -func (c *ProjectsLocationsWorkloadIdentityPoolsListCall) PageSize(pageSize int64) *ProjectsLocationsWorkloadIdentityPoolsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": A page token, received -// from a previous `ListWorkloadIdentityPools` call. Provide this to retrieve -// the subsequent page. -func (c *ProjectsLocationsWorkloadIdentityPoolsListCall) PageToken(pageToken string) *ProjectsLocationsWorkloadIdentityPoolsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ShowDeleted sets the optional parameter "showDeleted": Whether to return -// soft-deleted pools. -func (c *ProjectsLocationsWorkloadIdentityPoolsListCall) ShowDeleted(showDeleted bool) *ProjectsLocationsWorkloadIdentityPoolsListCall { - c.urlParams_.Set("showDeleted", fmt.Sprint(showDeleted)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsLocationsWorkloadIdentityPoolsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsWorkloadIdentityPoolsListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *ProjectsLocationsWorkloadIdentityPoolsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsWorkloadIdentityPoolsListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsWorkloadIdentityPoolsListCall) Context(ctx context.Context) *ProjectsLocationsWorkloadIdentityPoolsListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsWorkloadIdentityPoolsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsWorkloadIdentityPoolsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/workloadIdentityPools") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "iam.projects.locations.workloadIdentityPools.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "iam.projects.locations.workloadIdentityPools.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *ListWorkloadIdentityPoolsResponse.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsLocationsWorkloadIdentityPoolsListCall) Do(opts ...googleapi.CallOption) (*ListWorkloadIdentityPoolsResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &ListWorkloadIdentityPoolsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "iam.projects.locations.workloadIdentityPools.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsWorkloadIdentityPoolsListCall) Pages(ctx context.Context, f func(*ListWorkloadIdentityPoolsResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -type ProjectsLocationsWorkloadIdentityPoolsListAttestationRulesCall struct { - s *Service - resource string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// ListAttestationRules: List all AttestationRule on a -// WorkloadIdentityPoolManagedIdentity. -// -// - resource: The resource name of the managed identity or namespace resource -// to list attestation rules of. -func (r *ProjectsLocationsWorkloadIdentityPoolsService) ListAttestationRules(resource string) *ProjectsLocationsWorkloadIdentityPoolsListAttestationRulesCall { - c := &ProjectsLocationsWorkloadIdentityPoolsListAttestationRulesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource - return c -} - -// Filter sets the optional parameter "filter": A query filter. Supports the -// following function: * `container_ids()`: Returns only the AttestationRules -// under the specific container ids. The function expects a comma-delimited -// list with only project numbers and must use the format `projects/`. For -// example: `container_ids(projects/, projects/,...)`. -func (c *ProjectsLocationsWorkloadIdentityPoolsListAttestationRulesCall) Filter(filter string) *ProjectsLocationsWorkloadIdentityPoolsListAttestationRulesCall { - c.urlParams_.Set("filter", filter) - return c -} - -// PageSize sets the optional parameter "pageSize": The maximum number of -// AttestationRules to return. If unspecified, at most 50 AttestationRules are -// returned. The maximum value is 100; values above 100 are truncated to 100. -func (c *ProjectsLocationsWorkloadIdentityPoolsListAttestationRulesCall) PageSize(pageSize int64) *ProjectsLocationsWorkloadIdentityPoolsListAttestationRulesCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": A page token, received -// from a previous `ListWorkloadIdentityPoolProviderKeys` call. Provide this to -// retrieve the subsequent page. -func (c *ProjectsLocationsWorkloadIdentityPoolsListAttestationRulesCall) PageToken(pageToken string) *ProjectsLocationsWorkloadIdentityPoolsListAttestationRulesCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsLocationsWorkloadIdentityPoolsListAttestationRulesCall) Fields(s ...googleapi.Field) *ProjectsLocationsWorkloadIdentityPoolsListAttestationRulesCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *ProjectsLocationsWorkloadIdentityPoolsListAttestationRulesCall) IfNoneMatch(entityTag string) *ProjectsLocationsWorkloadIdentityPoolsListAttestationRulesCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsWorkloadIdentityPoolsListAttestationRulesCall) Context(ctx context.Context) *ProjectsLocationsWorkloadIdentityPoolsListAttestationRulesCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsWorkloadIdentityPoolsListAttestationRulesCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsWorkloadIdentityPoolsListAttestationRulesCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:listAttestationRules") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "iam.projects.locations.workloadIdentityPools.listAttestationRules", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "iam.projects.locations.workloadIdentityPools.listAttestationRules" call. -// Any non-2xx status code is an error. Response headers are in either -// *ListAttestationRulesResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsLocationsWorkloadIdentityPoolsListAttestationRulesCall) Do(opts ...googleapi.CallOption) (*ListAttestationRulesResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &ListAttestationRulesResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "iam.projects.locations.workloadIdentityPools.listAttestationRules", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsWorkloadIdentityPoolsListAttestationRulesCall) Pages(ctx context.Context, f func(*ListAttestationRulesResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -type ProjectsLocationsWorkloadIdentityPoolsPatchCall struct { - s *Service - name string - workloadidentitypool *WorkloadIdentityPool - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Updates an existing WorkloadIdentityPool. -// -// - name: Identifier. The resource name of the pool. -func (r *ProjectsLocationsWorkloadIdentityPoolsService) Patch(name string, workloadidentitypool *WorkloadIdentityPool) *ProjectsLocationsWorkloadIdentityPoolsPatchCall { - c := &ProjectsLocationsWorkloadIdentityPoolsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.workloadidentitypool = workloadidentitypool - return c -} - -// UpdateMask sets the optional parameter "updateMask": Required. The list of -// fields to update. -func (c *ProjectsLocationsWorkloadIdentityPoolsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsWorkloadIdentityPoolsPatchCall { - c.urlParams_.Set("updateMask", updateMask) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsLocationsWorkloadIdentityPoolsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsWorkloadIdentityPoolsPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsWorkloadIdentityPoolsPatchCall) Context(ctx context.Context) *ProjectsLocationsWorkloadIdentityPoolsPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsWorkloadIdentityPoolsPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsWorkloadIdentityPoolsPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.workloadidentitypool) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "iam.projects.locations.workloadIdentityPools.patch", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "iam.projects.locations.workloadIdentityPools.patch" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsLocationsWorkloadIdentityPoolsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "iam.projects.locations.workloadIdentityPools.patch", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsLocationsWorkloadIdentityPoolsRemoveAttestationRuleCall struct { - s *Service - resource string - removeattestationrulerequest *RemoveAttestationRuleRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// RemoveAttestationRule: Remove an AttestationRule on a -// WorkloadIdentityPoolManagedIdentity. -// -// - resource: The resource name of the managed identity or namespace resource -// to remove an attestation rule from. -func (r *ProjectsLocationsWorkloadIdentityPoolsService) RemoveAttestationRule(resource string, removeattestationrulerequest *RemoveAttestationRuleRequest) *ProjectsLocationsWorkloadIdentityPoolsRemoveAttestationRuleCall { - c := &ProjectsLocationsWorkloadIdentityPoolsRemoveAttestationRuleCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource - c.removeattestationrulerequest = removeattestationrulerequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsLocationsWorkloadIdentityPoolsRemoveAttestationRuleCall) Fields(s ...googleapi.Field) *ProjectsLocationsWorkloadIdentityPoolsRemoveAttestationRuleCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsWorkloadIdentityPoolsRemoveAttestationRuleCall) Context(ctx context.Context) *ProjectsLocationsWorkloadIdentityPoolsRemoveAttestationRuleCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsWorkloadIdentityPoolsRemoveAttestationRuleCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsWorkloadIdentityPoolsRemoveAttestationRuleCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.removeattestationrulerequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:removeAttestationRule") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "iam.projects.locations.workloadIdentityPools.removeAttestationRule", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "iam.projects.locations.workloadIdentityPools.removeAttestationRule" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsLocationsWorkloadIdentityPoolsRemoveAttestationRuleCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "iam.projects.locations.workloadIdentityPools.removeAttestationRule", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsLocationsWorkloadIdentityPoolsSetAttestationRulesCall struct { - s *Service - resource string - setattestationrulesrequest *SetAttestationRulesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetAttestationRules: Set all AttestationRule on a -// WorkloadIdentityPoolManagedIdentity. A maximum of 50 AttestationRules can be -// set. -// -// - resource: The resource name of the managed identity or namespace resource -// to add an attestation rule to. -func (r *ProjectsLocationsWorkloadIdentityPoolsService) SetAttestationRules(resource string, setattestationrulesrequest *SetAttestationRulesRequest) *ProjectsLocationsWorkloadIdentityPoolsSetAttestationRulesCall { - c := &ProjectsLocationsWorkloadIdentityPoolsSetAttestationRulesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource - c.setattestationrulesrequest = setattestationrulesrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsLocationsWorkloadIdentityPoolsSetAttestationRulesCall) Fields(s ...googleapi.Field) *ProjectsLocationsWorkloadIdentityPoolsSetAttestationRulesCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsWorkloadIdentityPoolsSetAttestationRulesCall) Context(ctx context.Context) *ProjectsLocationsWorkloadIdentityPoolsSetAttestationRulesCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsWorkloadIdentityPoolsSetAttestationRulesCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsWorkloadIdentityPoolsSetAttestationRulesCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.setattestationrulesrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setAttestationRules") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "iam.projects.locations.workloadIdentityPools.setAttestationRules", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "iam.projects.locations.workloadIdentityPools.setAttestationRules" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsLocationsWorkloadIdentityPoolsSetAttestationRulesCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "iam.projects.locations.workloadIdentityPools.setAttestationRules", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsLocationsWorkloadIdentityPoolsSetIamPolicyCall struct { - s *Service - resource string - setiampolicyrequest *SetIamPolicyRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetIamPolicy: Sets the IAM policies on a WorkloadIdentityPool -// -// - resource: REQUIRED: The resource for which the policy is being specified. -// See Resource names (https://cloud.google.com/apis/design/resource_names) -// for the appropriate value for this field. -func (r *ProjectsLocationsWorkloadIdentityPoolsService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsWorkloadIdentityPoolsSetIamPolicyCall { - c := &ProjectsLocationsWorkloadIdentityPoolsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource - c.setiampolicyrequest = setiampolicyrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsLocationsWorkloadIdentityPoolsSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsWorkloadIdentityPoolsSetIamPolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsWorkloadIdentityPoolsSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsWorkloadIdentityPoolsSetIamPolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsWorkloadIdentityPoolsSetIamPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsWorkloadIdentityPoolsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.setiampolicyrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "iam.projects.locations.workloadIdentityPools.setIamPolicy", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "iam.projects.locations.workloadIdentityPools.setIamPolicy" call. -// Any non-2xx status code is an error. Response headers are in either -// *Policy.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsLocationsWorkloadIdentityPoolsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &Policy{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "iam.projects.locations.workloadIdentityPools.setIamPolicy", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsLocationsWorkloadIdentityPoolsTestIamPermissionsCall struct { - s *Service - resource string - testiampermissionsrequest *TestIamPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns the caller's permissions on a -// WorkloadIdentityPool -// -// - resource: REQUIRED: The resource for which the policy detail is being -// requested. See Resource names -// (https://cloud.google.com/apis/design/resource_names) for the appropriate -// value for this field. -func (r *ProjectsLocationsWorkloadIdentityPoolsService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsWorkloadIdentityPoolsTestIamPermissionsCall { - c := &ProjectsLocationsWorkloadIdentityPoolsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource - c.testiampermissionsrequest = testiampermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsLocationsWorkloadIdentityPoolsTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsWorkloadIdentityPoolsTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsWorkloadIdentityPoolsTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsWorkloadIdentityPoolsTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsWorkloadIdentityPoolsTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsWorkloadIdentityPoolsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testiampermissionsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "iam.projects.locations.workloadIdentityPools.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "iam.projects.locations.workloadIdentityPools.testIamPermissions" call. -// Any non-2xx status code is an error. Response headers are in either -// *TestIamPermissionsResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsLocationsWorkloadIdentityPoolsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &TestIamPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "iam.projects.locations.workloadIdentityPools.testIamPermissions", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsLocationsWorkloadIdentityPoolsUndeleteCall struct { - s *Service - name string - undeleteworkloadidentitypoolrequest *UndeleteWorkloadIdentityPoolRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Undelete: Undeletes a WorkloadIdentityPool, as long as it was deleted fewer -// than 30 days ago. -// -// - name: The name of the pool to undelete. -func (r *ProjectsLocationsWorkloadIdentityPoolsService) Undelete(name string, undeleteworkloadidentitypoolrequest *UndeleteWorkloadIdentityPoolRequest) *ProjectsLocationsWorkloadIdentityPoolsUndeleteCall { - c := &ProjectsLocationsWorkloadIdentityPoolsUndeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.undeleteworkloadidentitypoolrequest = undeleteworkloadidentitypoolrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsLocationsWorkloadIdentityPoolsUndeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsWorkloadIdentityPoolsUndeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsWorkloadIdentityPoolsUndeleteCall) Context(ctx context.Context) *ProjectsLocationsWorkloadIdentityPoolsUndeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsWorkloadIdentityPoolsUndeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsWorkloadIdentityPoolsUndeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.undeleteworkloadidentitypoolrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:undelete") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "iam.projects.locations.workloadIdentityPools.undelete", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "iam.projects.locations.workloadIdentityPools.undelete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsLocationsWorkloadIdentityPoolsUndeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "iam.projects.locations.workloadIdentityPools.undelete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsLocationsWorkloadIdentityPoolsNamespacesCreateCall struct { - s *Service - parent string - workloadidentitypoolnamespace *WorkloadIdentityPoolNamespace - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Create: Creates a new WorkloadIdentityPoolNamespace in a -// WorkloadIdentityPool. -// -// - parent: The parent resource to create the namespace in. The only supported -// location is `global`. -func (r *ProjectsLocationsWorkloadIdentityPoolsNamespacesService) Create(parent string, workloadidentitypoolnamespace *WorkloadIdentityPoolNamespace) *ProjectsLocationsWorkloadIdentityPoolsNamespacesCreateCall { - c := &ProjectsLocationsWorkloadIdentityPoolsNamespacesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.workloadidentitypoolnamespace = workloadidentitypoolnamespace - return c -} - -// WorkloadIdentityPoolNamespaceId sets the optional parameter -// "workloadIdentityPoolNamespaceId": Required. The ID to use for the -// namespace. This value must: * contain at most 63 characters * contain only -// lowercase alphanumeric characters or `-` * start with an alphanumeric -// character * end with an alphanumeric character The prefix "gcp-" will be -// reserved for future uses. -func (c *ProjectsLocationsWorkloadIdentityPoolsNamespacesCreateCall) WorkloadIdentityPoolNamespaceId(workloadIdentityPoolNamespaceId string) *ProjectsLocationsWorkloadIdentityPoolsNamespacesCreateCall { - c.urlParams_.Set("workloadIdentityPoolNamespaceId", workloadIdentityPoolNamespaceId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsLocationsWorkloadIdentityPoolsNamespacesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsWorkloadIdentityPoolsNamespacesCreateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsWorkloadIdentityPoolsNamespacesCreateCall) Context(ctx context.Context) *ProjectsLocationsWorkloadIdentityPoolsNamespacesCreateCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsWorkloadIdentityPoolsNamespacesCreateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsWorkloadIdentityPoolsNamespacesCreateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.workloadidentitypoolnamespace) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/namespaces") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "iam.projects.locations.workloadIdentityPools.namespaces.create", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "iam.projects.locations.workloadIdentityPools.namespaces.create" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsLocationsWorkloadIdentityPoolsNamespacesCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "iam.projects.locations.workloadIdentityPools.namespaces.create", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsLocationsWorkloadIdentityPoolsNamespacesDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes a WorkloadIdentityPoolNamespace. You can undelete a -// namespace for 30 days. After 30 days, deletion is permanent. -// -// - name: The name of the namespace to delete. -func (r *ProjectsLocationsWorkloadIdentityPoolsNamespacesService) Delete(name string) *ProjectsLocationsWorkloadIdentityPoolsNamespacesDeleteCall { - c := &ProjectsLocationsWorkloadIdentityPoolsNamespacesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsLocationsWorkloadIdentityPoolsNamespacesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsWorkloadIdentityPoolsNamespacesDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsWorkloadIdentityPoolsNamespacesDeleteCall) Context(ctx context.Context) *ProjectsLocationsWorkloadIdentityPoolsNamespacesDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsWorkloadIdentityPoolsNamespacesDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsWorkloadIdentityPoolsNamespacesDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "iam.projects.locations.workloadIdentityPools.namespaces.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "iam.projects.locations.workloadIdentityPools.namespaces.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsLocationsWorkloadIdentityPoolsNamespacesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "iam.projects.locations.workloadIdentityPools.namespaces.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsLocationsWorkloadIdentityPoolsNamespacesGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Gets an individual WorkloadIdentityPoolNamespace. -// -// - name: The name of the namespace to retrieve. -func (r *ProjectsLocationsWorkloadIdentityPoolsNamespacesService) Get(name string) *ProjectsLocationsWorkloadIdentityPoolsNamespacesGetCall { - c := &ProjectsLocationsWorkloadIdentityPoolsNamespacesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsLocationsWorkloadIdentityPoolsNamespacesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsWorkloadIdentityPoolsNamespacesGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *ProjectsLocationsWorkloadIdentityPoolsNamespacesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsWorkloadIdentityPoolsNamespacesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsWorkloadIdentityPoolsNamespacesGetCall) Context(ctx context.Context) *ProjectsLocationsWorkloadIdentityPoolsNamespacesGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsWorkloadIdentityPoolsNamespacesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsWorkloadIdentityPoolsNamespacesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "iam.projects.locations.workloadIdentityPools.namespaces.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "iam.projects.locations.workloadIdentityPools.namespaces.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *WorkloadIdentityPoolNamespace.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsLocationsWorkloadIdentityPoolsNamespacesGetCall) Do(opts ...googleapi.CallOption) (*WorkloadIdentityPoolNamespace, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &WorkloadIdentityPoolNamespace{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "iam.projects.locations.workloadIdentityPools.namespaces.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsLocationsWorkloadIdentityPoolsNamespacesListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Lists all non-deleted WorkloadIdentityPoolNamespaces in a workload -// identity pool. If `show_deleted` is set to `true`, then deleted namespaces -// are also listed. -// -// - parent: The parent resource to list namespaces for. -func (r *ProjectsLocationsWorkloadIdentityPoolsNamespacesService) List(parent string) *ProjectsLocationsWorkloadIdentityPoolsNamespacesListCall { - c := &ProjectsLocationsWorkloadIdentityPoolsNamespacesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// PageSize sets the optional parameter "pageSize": The maximum number of -// namespaces to return. If unspecified, at most 50 namespaces are returned. -// The maximum value is 1000; values above are 1000 truncated to 1000. -func (c *ProjectsLocationsWorkloadIdentityPoolsNamespacesListCall) PageSize(pageSize int64) *ProjectsLocationsWorkloadIdentityPoolsNamespacesListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": A page token, received -// from a previous `ListWorkloadIdentityPoolNamespaces` call. Provide this to -// retrieve the subsequent page. -func (c *ProjectsLocationsWorkloadIdentityPoolsNamespacesListCall) PageToken(pageToken string) *ProjectsLocationsWorkloadIdentityPoolsNamespacesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ShowDeleted sets the optional parameter "showDeleted": Whether to return -// soft-deleted namespaces. -func (c *ProjectsLocationsWorkloadIdentityPoolsNamespacesListCall) ShowDeleted(showDeleted bool) *ProjectsLocationsWorkloadIdentityPoolsNamespacesListCall { - c.urlParams_.Set("showDeleted", fmt.Sprint(showDeleted)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsLocationsWorkloadIdentityPoolsNamespacesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsWorkloadIdentityPoolsNamespacesListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *ProjectsLocationsWorkloadIdentityPoolsNamespacesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsWorkloadIdentityPoolsNamespacesListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsWorkloadIdentityPoolsNamespacesListCall) Context(ctx context.Context) *ProjectsLocationsWorkloadIdentityPoolsNamespacesListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsWorkloadIdentityPoolsNamespacesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsWorkloadIdentityPoolsNamespacesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/namespaces") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "iam.projects.locations.workloadIdentityPools.namespaces.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "iam.projects.locations.workloadIdentityPools.namespaces.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *ListWorkloadIdentityPoolNamespacesResponse.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsLocationsWorkloadIdentityPoolsNamespacesListCall) Do(opts ...googleapi.CallOption) (*ListWorkloadIdentityPoolNamespacesResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &ListWorkloadIdentityPoolNamespacesResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "iam.projects.locations.workloadIdentityPools.namespaces.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsWorkloadIdentityPoolsNamespacesListCall) Pages(ctx context.Context, f func(*ListWorkloadIdentityPoolNamespacesResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -type ProjectsLocationsWorkloadIdentityPoolsNamespacesPatchCall struct { - s *Service - name string - workloadidentitypoolnamespace *WorkloadIdentityPoolNamespace - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Updates an existing WorkloadIdentityPoolNamespace in a -// WorkloadIdentityPool. -// -// - name: Identifier. The resource name of the namespace. -func (r *ProjectsLocationsWorkloadIdentityPoolsNamespacesService) Patch(name string, workloadidentitypoolnamespace *WorkloadIdentityPoolNamespace) *ProjectsLocationsWorkloadIdentityPoolsNamespacesPatchCall { - c := &ProjectsLocationsWorkloadIdentityPoolsNamespacesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.workloadidentitypoolnamespace = workloadidentitypoolnamespace - return c -} - -// UpdateMask sets the optional parameter "updateMask": Required. The list of -// fields to update. -func (c *ProjectsLocationsWorkloadIdentityPoolsNamespacesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsWorkloadIdentityPoolsNamespacesPatchCall { - c.urlParams_.Set("updateMask", updateMask) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsLocationsWorkloadIdentityPoolsNamespacesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsWorkloadIdentityPoolsNamespacesPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsWorkloadIdentityPoolsNamespacesPatchCall) Context(ctx context.Context) *ProjectsLocationsWorkloadIdentityPoolsNamespacesPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsWorkloadIdentityPoolsNamespacesPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsWorkloadIdentityPoolsNamespacesPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.workloadidentitypoolnamespace) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "iam.projects.locations.workloadIdentityPools.namespaces.patch", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "iam.projects.locations.workloadIdentityPools.namespaces.patch" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsLocationsWorkloadIdentityPoolsNamespacesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "iam.projects.locations.workloadIdentityPools.namespaces.patch", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsLocationsWorkloadIdentityPoolsNamespacesUndeleteCall struct { - s *Service - name string - undeleteworkloadidentitypoolnamespacerequest *UndeleteWorkloadIdentityPoolNamespaceRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Undelete: Undeletes a WorkloadIdentityPoolNamespace, as long as it was -// deleted fewer than 30 days ago. -// -// - name: The name of the namespace to undelete. -func (r *ProjectsLocationsWorkloadIdentityPoolsNamespacesService) Undelete(name string, undeleteworkloadidentitypoolnamespacerequest *UndeleteWorkloadIdentityPoolNamespaceRequest) *ProjectsLocationsWorkloadIdentityPoolsNamespacesUndeleteCall { - c := &ProjectsLocationsWorkloadIdentityPoolsNamespacesUndeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.undeleteworkloadidentitypoolnamespacerequest = undeleteworkloadidentitypoolnamespacerequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsLocationsWorkloadIdentityPoolsNamespacesUndeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsWorkloadIdentityPoolsNamespacesUndeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsWorkloadIdentityPoolsNamespacesUndeleteCall) Context(ctx context.Context) *ProjectsLocationsWorkloadIdentityPoolsNamespacesUndeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsWorkloadIdentityPoolsNamespacesUndeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsWorkloadIdentityPoolsNamespacesUndeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.undeleteworkloadidentitypoolnamespacerequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:undelete") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "iam.projects.locations.workloadIdentityPools.namespaces.undelete", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "iam.projects.locations.workloadIdentityPools.namespaces.undelete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsLocationsWorkloadIdentityPoolsNamespacesUndeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "iam.projects.locations.workloadIdentityPools.namespaces.undelete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsLocationsWorkloadIdentityPoolsNamespacesManagedIdentitiesAddAttestationRuleCall struct { - s *Service - resource string - addattestationrulerequest *AddAttestationRuleRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// AddAttestationRule: Add an AttestationRule on a -// WorkloadIdentityPoolManagedIdentity. The total attestation rules after -// addition must not exceed 50. -// -// - resource: The resource name of the managed identity or namespace resource -// to add an attestation rule to. -func (r *ProjectsLocationsWorkloadIdentityPoolsNamespacesManagedIdentitiesService) AddAttestationRule(resource string, addattestationrulerequest *AddAttestationRuleRequest) *ProjectsLocationsWorkloadIdentityPoolsNamespacesManagedIdentitiesAddAttestationRuleCall { - c := &ProjectsLocationsWorkloadIdentityPoolsNamespacesManagedIdentitiesAddAttestationRuleCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource - c.addattestationrulerequest = addattestationrulerequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsLocationsWorkloadIdentityPoolsNamespacesManagedIdentitiesAddAttestationRuleCall) Fields(s ...googleapi.Field) *ProjectsLocationsWorkloadIdentityPoolsNamespacesManagedIdentitiesAddAttestationRuleCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsWorkloadIdentityPoolsNamespacesManagedIdentitiesAddAttestationRuleCall) Context(ctx context.Context) *ProjectsLocationsWorkloadIdentityPoolsNamespacesManagedIdentitiesAddAttestationRuleCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsWorkloadIdentityPoolsNamespacesManagedIdentitiesAddAttestationRuleCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsWorkloadIdentityPoolsNamespacesManagedIdentitiesAddAttestationRuleCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.addattestationrulerequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:addAttestationRule") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "iam.projects.locations.workloadIdentityPools.namespaces.managedIdentities.addAttestationRule", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "iam.projects.locations.workloadIdentityPools.namespaces.managedIdentities.addAttestationRule" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsLocationsWorkloadIdentityPoolsNamespacesManagedIdentitiesAddAttestationRuleCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "iam.projects.locations.workloadIdentityPools.namespaces.managedIdentities.addAttestationRule", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsLocationsWorkloadIdentityPoolsNamespacesManagedIdentitiesCreateCall struct { - s *Service - parent string - workloadidentitypoolmanagedidentity *WorkloadIdentityPoolManagedIdentity - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Create: Creates a new WorkloadIdentityPoolManagedIdentity in a -// WorkloadIdentityPoolNamespace. -// -// - parent: The parent resource to create the manage identity in. The only -// supported location is `global`. -func (r *ProjectsLocationsWorkloadIdentityPoolsNamespacesManagedIdentitiesService) Create(parent string, workloadidentitypoolmanagedidentity *WorkloadIdentityPoolManagedIdentity) *ProjectsLocationsWorkloadIdentityPoolsNamespacesManagedIdentitiesCreateCall { - c := &ProjectsLocationsWorkloadIdentityPoolsNamespacesManagedIdentitiesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.workloadidentitypoolmanagedidentity = workloadidentitypoolmanagedidentity - return c -} - -// WorkloadIdentityPoolManagedIdentityId sets the optional parameter -// "workloadIdentityPoolManagedIdentityId": Required. The ID to use for the -// managed identity. This value must: * contain at most 63 characters * contain -// only lowercase alphanumeric characters or `-` * start with an alphanumeric -// character * end with an alphanumeric character The prefix "gcp-" will be -// reserved for future uses. -func (c *ProjectsLocationsWorkloadIdentityPoolsNamespacesManagedIdentitiesCreateCall) WorkloadIdentityPoolManagedIdentityId(workloadIdentityPoolManagedIdentityId string) *ProjectsLocationsWorkloadIdentityPoolsNamespacesManagedIdentitiesCreateCall { - c.urlParams_.Set("workloadIdentityPoolManagedIdentityId", workloadIdentityPoolManagedIdentityId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsLocationsWorkloadIdentityPoolsNamespacesManagedIdentitiesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsWorkloadIdentityPoolsNamespacesManagedIdentitiesCreateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsWorkloadIdentityPoolsNamespacesManagedIdentitiesCreateCall) Context(ctx context.Context) *ProjectsLocationsWorkloadIdentityPoolsNamespacesManagedIdentitiesCreateCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsWorkloadIdentityPoolsNamespacesManagedIdentitiesCreateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsWorkloadIdentityPoolsNamespacesManagedIdentitiesCreateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.workloadidentitypoolmanagedidentity) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/managedIdentities") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "iam.projects.locations.workloadIdentityPools.namespaces.managedIdentities.create", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "iam.projects.locations.workloadIdentityPools.namespaces.managedIdentities.create" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsLocationsWorkloadIdentityPoolsNamespacesManagedIdentitiesCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "iam.projects.locations.workloadIdentityPools.namespaces.managedIdentities.create", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsLocationsWorkloadIdentityPoolsNamespacesManagedIdentitiesDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes a WorkloadIdentityPoolManagedIdentity. You can undelete a -// managed identity for 30 days. After 30 days, deletion is permanent. -// -// - name: The name of the managed identity to delete. -func (r *ProjectsLocationsWorkloadIdentityPoolsNamespacesManagedIdentitiesService) Delete(name string) *ProjectsLocationsWorkloadIdentityPoolsNamespacesManagedIdentitiesDeleteCall { - c := &ProjectsLocationsWorkloadIdentityPoolsNamespacesManagedIdentitiesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsLocationsWorkloadIdentityPoolsNamespacesManagedIdentitiesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsWorkloadIdentityPoolsNamespacesManagedIdentitiesDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsWorkloadIdentityPoolsNamespacesManagedIdentitiesDeleteCall) Context(ctx context.Context) *ProjectsLocationsWorkloadIdentityPoolsNamespacesManagedIdentitiesDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsWorkloadIdentityPoolsNamespacesManagedIdentitiesDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsWorkloadIdentityPoolsNamespacesManagedIdentitiesDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "iam.projects.locations.workloadIdentityPools.namespaces.managedIdentities.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "iam.projects.locations.workloadIdentityPools.namespaces.managedIdentities.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsLocationsWorkloadIdentityPoolsNamespacesManagedIdentitiesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "iam.projects.locations.workloadIdentityPools.namespaces.managedIdentities.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsLocationsWorkloadIdentityPoolsNamespacesManagedIdentitiesGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Gets an individual WorkloadIdentityPoolManagedIdentity. -// -// - name: The name of the managed identity to retrieve. -func (r *ProjectsLocationsWorkloadIdentityPoolsNamespacesManagedIdentitiesService) Get(name string) *ProjectsLocationsWorkloadIdentityPoolsNamespacesManagedIdentitiesGetCall { - c := &ProjectsLocationsWorkloadIdentityPoolsNamespacesManagedIdentitiesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsLocationsWorkloadIdentityPoolsNamespacesManagedIdentitiesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsWorkloadIdentityPoolsNamespacesManagedIdentitiesGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *ProjectsLocationsWorkloadIdentityPoolsNamespacesManagedIdentitiesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsWorkloadIdentityPoolsNamespacesManagedIdentitiesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsWorkloadIdentityPoolsNamespacesManagedIdentitiesGetCall) Context(ctx context.Context) *ProjectsLocationsWorkloadIdentityPoolsNamespacesManagedIdentitiesGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsWorkloadIdentityPoolsNamespacesManagedIdentitiesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsWorkloadIdentityPoolsNamespacesManagedIdentitiesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "iam.projects.locations.workloadIdentityPools.namespaces.managedIdentities.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "iam.projects.locations.workloadIdentityPools.namespaces.managedIdentities.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *WorkloadIdentityPoolManagedIdentity.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsLocationsWorkloadIdentityPoolsNamespacesManagedIdentitiesGetCall) Do(opts ...googleapi.CallOption) (*WorkloadIdentityPoolManagedIdentity, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &WorkloadIdentityPoolManagedIdentity{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "iam.projects.locations.workloadIdentityPools.namespaces.managedIdentities.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsLocationsWorkloadIdentityPoolsNamespacesManagedIdentitiesListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Lists all non-deleted WorkloadIdentityPoolManagedIdentitys in a -// namespace. If `show_deleted` is set to `true`, then deleted managed -// identities are also listed. -// -// - parent: The parent resource to list managed identities for. -func (r *ProjectsLocationsWorkloadIdentityPoolsNamespacesManagedIdentitiesService) List(parent string) *ProjectsLocationsWorkloadIdentityPoolsNamespacesManagedIdentitiesListCall { - c := &ProjectsLocationsWorkloadIdentityPoolsNamespacesManagedIdentitiesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// PageSize sets the optional parameter "pageSize": The maximum number of -// managed identities to return. If unspecified, at most 50 managed identities -// are returned. The maximum value is 1000; values above are 1000 truncated to -// 1000. -func (c *ProjectsLocationsWorkloadIdentityPoolsNamespacesManagedIdentitiesListCall) PageSize(pageSize int64) *ProjectsLocationsWorkloadIdentityPoolsNamespacesManagedIdentitiesListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": A page token, received -// from a previous `ListWorkloadIdentityPoolManagedIdentities` call. Provide -// this to retrieve the subsequent page. -func (c *ProjectsLocationsWorkloadIdentityPoolsNamespacesManagedIdentitiesListCall) PageToken(pageToken string) *ProjectsLocationsWorkloadIdentityPoolsNamespacesManagedIdentitiesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ShowDeleted sets the optional parameter "showDeleted": Whether to return -// soft-deleted managed identities. -func (c *ProjectsLocationsWorkloadIdentityPoolsNamespacesManagedIdentitiesListCall) ShowDeleted(showDeleted bool) *ProjectsLocationsWorkloadIdentityPoolsNamespacesManagedIdentitiesListCall { - c.urlParams_.Set("showDeleted", fmt.Sprint(showDeleted)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsLocationsWorkloadIdentityPoolsNamespacesManagedIdentitiesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsWorkloadIdentityPoolsNamespacesManagedIdentitiesListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *ProjectsLocationsWorkloadIdentityPoolsNamespacesManagedIdentitiesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsWorkloadIdentityPoolsNamespacesManagedIdentitiesListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsWorkloadIdentityPoolsNamespacesManagedIdentitiesListCall) Context(ctx context.Context) *ProjectsLocationsWorkloadIdentityPoolsNamespacesManagedIdentitiesListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsWorkloadIdentityPoolsNamespacesManagedIdentitiesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsWorkloadIdentityPoolsNamespacesManagedIdentitiesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/managedIdentities") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "iam.projects.locations.workloadIdentityPools.namespaces.managedIdentities.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "iam.projects.locations.workloadIdentityPools.namespaces.managedIdentities.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *ListWorkloadIdentityPoolManagedIdentitiesResponse.ServerResponse.Header or -// (if a response was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsLocationsWorkloadIdentityPoolsNamespacesManagedIdentitiesListCall) Do(opts ...googleapi.CallOption) (*ListWorkloadIdentityPoolManagedIdentitiesResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &ListWorkloadIdentityPoolManagedIdentitiesResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "iam.projects.locations.workloadIdentityPools.namespaces.managedIdentities.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsWorkloadIdentityPoolsNamespacesManagedIdentitiesListCall) Pages(ctx context.Context, f func(*ListWorkloadIdentityPoolManagedIdentitiesResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -type ProjectsLocationsWorkloadIdentityPoolsNamespacesManagedIdentitiesListAttestationRulesCall struct { - s *Service - resource string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// ListAttestationRules: List all AttestationRule on a -// WorkloadIdentityPoolManagedIdentity. -// -// - resource: The resource name of the managed identity or namespace resource -// to list attestation rules of. -func (r *ProjectsLocationsWorkloadIdentityPoolsNamespacesManagedIdentitiesService) ListAttestationRules(resource string) *ProjectsLocationsWorkloadIdentityPoolsNamespacesManagedIdentitiesListAttestationRulesCall { - c := &ProjectsLocationsWorkloadIdentityPoolsNamespacesManagedIdentitiesListAttestationRulesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource - return c -} - -// Filter sets the optional parameter "filter": A query filter. Supports the -// following function: * `container_ids()`: Returns only the AttestationRules -// under the specific container ids. The function expects a comma-delimited -// list with only project numbers and must use the format `projects/`. For -// example: `container_ids(projects/, projects/,...)`. -func (c *ProjectsLocationsWorkloadIdentityPoolsNamespacesManagedIdentitiesListAttestationRulesCall) Filter(filter string) *ProjectsLocationsWorkloadIdentityPoolsNamespacesManagedIdentitiesListAttestationRulesCall { - c.urlParams_.Set("filter", filter) - return c -} - -// PageSize sets the optional parameter "pageSize": The maximum number of -// AttestationRules to return. If unspecified, at most 50 AttestationRules are -// returned. The maximum value is 100; values above 100 are truncated to 100. -func (c *ProjectsLocationsWorkloadIdentityPoolsNamespacesManagedIdentitiesListAttestationRulesCall) PageSize(pageSize int64) *ProjectsLocationsWorkloadIdentityPoolsNamespacesManagedIdentitiesListAttestationRulesCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": A page token, received -// from a previous `ListWorkloadIdentityPoolProviderKeys` call. Provide this to -// retrieve the subsequent page. -func (c *ProjectsLocationsWorkloadIdentityPoolsNamespacesManagedIdentitiesListAttestationRulesCall) PageToken(pageToken string) *ProjectsLocationsWorkloadIdentityPoolsNamespacesManagedIdentitiesListAttestationRulesCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsLocationsWorkloadIdentityPoolsNamespacesManagedIdentitiesListAttestationRulesCall) Fields(s ...googleapi.Field) *ProjectsLocationsWorkloadIdentityPoolsNamespacesManagedIdentitiesListAttestationRulesCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *ProjectsLocationsWorkloadIdentityPoolsNamespacesManagedIdentitiesListAttestationRulesCall) IfNoneMatch(entityTag string) *ProjectsLocationsWorkloadIdentityPoolsNamespacesManagedIdentitiesListAttestationRulesCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsWorkloadIdentityPoolsNamespacesManagedIdentitiesListAttestationRulesCall) Context(ctx context.Context) *ProjectsLocationsWorkloadIdentityPoolsNamespacesManagedIdentitiesListAttestationRulesCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsWorkloadIdentityPoolsNamespacesManagedIdentitiesListAttestationRulesCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsWorkloadIdentityPoolsNamespacesManagedIdentitiesListAttestationRulesCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:listAttestationRules") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "iam.projects.locations.workloadIdentityPools.namespaces.managedIdentities.listAttestationRules", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "iam.projects.locations.workloadIdentityPools.namespaces.managedIdentities.listAttestationRules" call. -// Any non-2xx status code is an error. Response headers are in either -// *ListAttestationRulesResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsLocationsWorkloadIdentityPoolsNamespacesManagedIdentitiesListAttestationRulesCall) Do(opts ...googleapi.CallOption) (*ListAttestationRulesResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &ListAttestationRulesResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "iam.projects.locations.workloadIdentityPools.namespaces.managedIdentities.listAttestationRules", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsWorkloadIdentityPoolsNamespacesManagedIdentitiesListAttestationRulesCall) Pages(ctx context.Context, f func(*ListAttestationRulesResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -type ProjectsLocationsWorkloadIdentityPoolsNamespacesManagedIdentitiesPatchCall struct { - s *Service - name string - workloadidentitypoolmanagedidentity *WorkloadIdentityPoolManagedIdentity - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Updates an existing WorkloadIdentityPoolManagedIdentity in a -// WorkloadIdentityPoolNamespace. -// -// - name: Identifier. The resource name of the managed identity. -func (r *ProjectsLocationsWorkloadIdentityPoolsNamespacesManagedIdentitiesService) Patch(name string, workloadidentitypoolmanagedidentity *WorkloadIdentityPoolManagedIdentity) *ProjectsLocationsWorkloadIdentityPoolsNamespacesManagedIdentitiesPatchCall { - c := &ProjectsLocationsWorkloadIdentityPoolsNamespacesManagedIdentitiesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.workloadidentitypoolmanagedidentity = workloadidentitypoolmanagedidentity - return c -} - -// UpdateMask sets the optional parameter "updateMask": Required. The list of -// fields to update. -func (c *ProjectsLocationsWorkloadIdentityPoolsNamespacesManagedIdentitiesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsWorkloadIdentityPoolsNamespacesManagedIdentitiesPatchCall { - c.urlParams_.Set("updateMask", updateMask) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsLocationsWorkloadIdentityPoolsNamespacesManagedIdentitiesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsWorkloadIdentityPoolsNamespacesManagedIdentitiesPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsWorkloadIdentityPoolsNamespacesManagedIdentitiesPatchCall) Context(ctx context.Context) *ProjectsLocationsWorkloadIdentityPoolsNamespacesManagedIdentitiesPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsWorkloadIdentityPoolsNamespacesManagedIdentitiesPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsWorkloadIdentityPoolsNamespacesManagedIdentitiesPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.workloadidentitypoolmanagedidentity) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "iam.projects.locations.workloadIdentityPools.namespaces.managedIdentities.patch", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "iam.projects.locations.workloadIdentityPools.namespaces.managedIdentities.patch" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsLocationsWorkloadIdentityPoolsNamespacesManagedIdentitiesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "iam.projects.locations.workloadIdentityPools.namespaces.managedIdentities.patch", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsLocationsWorkloadIdentityPoolsNamespacesManagedIdentitiesRemoveAttestationRuleCall struct { - s *Service - resource string - removeattestationrulerequest *RemoveAttestationRuleRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// RemoveAttestationRule: Remove an AttestationRule on a -// WorkloadIdentityPoolManagedIdentity. -// -// - resource: The resource name of the managed identity or namespace resource -// to remove an attestation rule from. -func (r *ProjectsLocationsWorkloadIdentityPoolsNamespacesManagedIdentitiesService) RemoveAttestationRule(resource string, removeattestationrulerequest *RemoveAttestationRuleRequest) *ProjectsLocationsWorkloadIdentityPoolsNamespacesManagedIdentitiesRemoveAttestationRuleCall { - c := &ProjectsLocationsWorkloadIdentityPoolsNamespacesManagedIdentitiesRemoveAttestationRuleCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource - c.removeattestationrulerequest = removeattestationrulerequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsLocationsWorkloadIdentityPoolsNamespacesManagedIdentitiesRemoveAttestationRuleCall) Fields(s ...googleapi.Field) *ProjectsLocationsWorkloadIdentityPoolsNamespacesManagedIdentitiesRemoveAttestationRuleCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsWorkloadIdentityPoolsNamespacesManagedIdentitiesRemoveAttestationRuleCall) Context(ctx context.Context) *ProjectsLocationsWorkloadIdentityPoolsNamespacesManagedIdentitiesRemoveAttestationRuleCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsWorkloadIdentityPoolsNamespacesManagedIdentitiesRemoveAttestationRuleCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsWorkloadIdentityPoolsNamespacesManagedIdentitiesRemoveAttestationRuleCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.removeattestationrulerequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:removeAttestationRule") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "iam.projects.locations.workloadIdentityPools.namespaces.managedIdentities.removeAttestationRule", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "iam.projects.locations.workloadIdentityPools.namespaces.managedIdentities.removeAttestationRule" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsLocationsWorkloadIdentityPoolsNamespacesManagedIdentitiesRemoveAttestationRuleCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "iam.projects.locations.workloadIdentityPools.namespaces.managedIdentities.removeAttestationRule", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsLocationsWorkloadIdentityPoolsNamespacesManagedIdentitiesSetAttestationRulesCall struct { - s *Service - resource string - setattestationrulesrequest *SetAttestationRulesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetAttestationRules: Set all AttestationRule on a -// WorkloadIdentityPoolManagedIdentity. A maximum of 50 AttestationRules can be -// set. -// -// - resource: The resource name of the managed identity or namespace resource -// to add an attestation rule to. -func (r *ProjectsLocationsWorkloadIdentityPoolsNamespacesManagedIdentitiesService) SetAttestationRules(resource string, setattestationrulesrequest *SetAttestationRulesRequest) *ProjectsLocationsWorkloadIdentityPoolsNamespacesManagedIdentitiesSetAttestationRulesCall { - c := &ProjectsLocationsWorkloadIdentityPoolsNamespacesManagedIdentitiesSetAttestationRulesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource - c.setattestationrulesrequest = setattestationrulesrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsLocationsWorkloadIdentityPoolsNamespacesManagedIdentitiesSetAttestationRulesCall) Fields(s ...googleapi.Field) *ProjectsLocationsWorkloadIdentityPoolsNamespacesManagedIdentitiesSetAttestationRulesCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsWorkloadIdentityPoolsNamespacesManagedIdentitiesSetAttestationRulesCall) Context(ctx context.Context) *ProjectsLocationsWorkloadIdentityPoolsNamespacesManagedIdentitiesSetAttestationRulesCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsWorkloadIdentityPoolsNamespacesManagedIdentitiesSetAttestationRulesCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsWorkloadIdentityPoolsNamespacesManagedIdentitiesSetAttestationRulesCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.setattestationrulesrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setAttestationRules") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "iam.projects.locations.workloadIdentityPools.namespaces.managedIdentities.setAttestationRules", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "iam.projects.locations.workloadIdentityPools.namespaces.managedIdentities.setAttestationRules" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsLocationsWorkloadIdentityPoolsNamespacesManagedIdentitiesSetAttestationRulesCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "iam.projects.locations.workloadIdentityPools.namespaces.managedIdentities.setAttestationRules", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsLocationsWorkloadIdentityPoolsNamespacesManagedIdentitiesUndeleteCall struct { - s *Service - name string - undeleteworkloadidentitypoolmanagedidentityrequest *UndeleteWorkloadIdentityPoolManagedIdentityRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Undelete: Undeletes a WorkloadIdentityPoolManagedIdentity, as long as it was -// deleted fewer than 30 days ago. -// -// - name: The name of the managed identity to undelete. -func (r *ProjectsLocationsWorkloadIdentityPoolsNamespacesManagedIdentitiesService) Undelete(name string, undeleteworkloadidentitypoolmanagedidentityrequest *UndeleteWorkloadIdentityPoolManagedIdentityRequest) *ProjectsLocationsWorkloadIdentityPoolsNamespacesManagedIdentitiesUndeleteCall { - c := &ProjectsLocationsWorkloadIdentityPoolsNamespacesManagedIdentitiesUndeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.undeleteworkloadidentitypoolmanagedidentityrequest = undeleteworkloadidentitypoolmanagedidentityrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsLocationsWorkloadIdentityPoolsNamespacesManagedIdentitiesUndeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsWorkloadIdentityPoolsNamespacesManagedIdentitiesUndeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsWorkloadIdentityPoolsNamespacesManagedIdentitiesUndeleteCall) Context(ctx context.Context) *ProjectsLocationsWorkloadIdentityPoolsNamespacesManagedIdentitiesUndeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsWorkloadIdentityPoolsNamespacesManagedIdentitiesUndeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsWorkloadIdentityPoolsNamespacesManagedIdentitiesUndeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.undeleteworkloadidentitypoolmanagedidentityrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:undelete") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "iam.projects.locations.workloadIdentityPools.namespaces.managedIdentities.undelete", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "iam.projects.locations.workloadIdentityPools.namespaces.managedIdentities.undelete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsLocationsWorkloadIdentityPoolsNamespacesManagedIdentitiesUndeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "iam.projects.locations.workloadIdentityPools.namespaces.managedIdentities.undelete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsLocationsWorkloadIdentityPoolsNamespacesManagedIdentitiesOperationsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Gets the latest state of a long-running operation. Clients can use this -// method to poll the operation result at intervals as recommended by the API -// service. -// -// - name: The name of the operation resource. -func (r *ProjectsLocationsWorkloadIdentityPoolsNamespacesManagedIdentitiesOperationsService) Get(name string) *ProjectsLocationsWorkloadIdentityPoolsNamespacesManagedIdentitiesOperationsGetCall { - c := &ProjectsLocationsWorkloadIdentityPoolsNamespacesManagedIdentitiesOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsLocationsWorkloadIdentityPoolsNamespacesManagedIdentitiesOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsWorkloadIdentityPoolsNamespacesManagedIdentitiesOperationsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *ProjectsLocationsWorkloadIdentityPoolsNamespacesManagedIdentitiesOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsWorkloadIdentityPoolsNamespacesManagedIdentitiesOperationsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsWorkloadIdentityPoolsNamespacesManagedIdentitiesOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsWorkloadIdentityPoolsNamespacesManagedIdentitiesOperationsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsWorkloadIdentityPoolsNamespacesManagedIdentitiesOperationsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsWorkloadIdentityPoolsNamespacesManagedIdentitiesOperationsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "iam.projects.locations.workloadIdentityPools.namespaces.managedIdentities.operations.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "iam.projects.locations.workloadIdentityPools.namespaces.managedIdentities.operations.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsLocationsWorkloadIdentityPoolsNamespacesManagedIdentitiesOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "iam.projects.locations.workloadIdentityPools.namespaces.managedIdentities.operations.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsLocationsWorkloadIdentityPoolsNamespacesManagedIdentitiesWorkloadSourcesOperationsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Gets the latest state of a long-running operation. Clients can use this -// method to poll the operation result at intervals as recommended by the API -// service. -// -// - name: The name of the operation resource. -func (r *ProjectsLocationsWorkloadIdentityPoolsNamespacesManagedIdentitiesWorkloadSourcesOperationsService) Get(name string) *ProjectsLocationsWorkloadIdentityPoolsNamespacesManagedIdentitiesWorkloadSourcesOperationsGetCall { - c := &ProjectsLocationsWorkloadIdentityPoolsNamespacesManagedIdentitiesWorkloadSourcesOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsLocationsWorkloadIdentityPoolsNamespacesManagedIdentitiesWorkloadSourcesOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsWorkloadIdentityPoolsNamespacesManagedIdentitiesWorkloadSourcesOperationsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *ProjectsLocationsWorkloadIdentityPoolsNamespacesManagedIdentitiesWorkloadSourcesOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsWorkloadIdentityPoolsNamespacesManagedIdentitiesWorkloadSourcesOperationsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsWorkloadIdentityPoolsNamespacesManagedIdentitiesWorkloadSourcesOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsWorkloadIdentityPoolsNamespacesManagedIdentitiesWorkloadSourcesOperationsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsWorkloadIdentityPoolsNamespacesManagedIdentitiesWorkloadSourcesOperationsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsWorkloadIdentityPoolsNamespacesManagedIdentitiesWorkloadSourcesOperationsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "iam.projects.locations.workloadIdentityPools.namespaces.managedIdentities.workloadSources.operations.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "iam.projects.locations.workloadIdentityPools.namespaces.managedIdentities.workloadSources.operations.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsLocationsWorkloadIdentityPoolsNamespacesManagedIdentitiesWorkloadSourcesOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "iam.projects.locations.workloadIdentityPools.namespaces.managedIdentities.workloadSources.operations.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsLocationsWorkloadIdentityPoolsNamespacesOperationsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Gets the latest state of a long-running operation. Clients can use this -// method to poll the operation result at intervals as recommended by the API -// service. -// -// - name: The name of the operation resource. -func (r *ProjectsLocationsWorkloadIdentityPoolsNamespacesOperationsService) Get(name string) *ProjectsLocationsWorkloadIdentityPoolsNamespacesOperationsGetCall { - c := &ProjectsLocationsWorkloadIdentityPoolsNamespacesOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsLocationsWorkloadIdentityPoolsNamespacesOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsWorkloadIdentityPoolsNamespacesOperationsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *ProjectsLocationsWorkloadIdentityPoolsNamespacesOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsWorkloadIdentityPoolsNamespacesOperationsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsWorkloadIdentityPoolsNamespacesOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsWorkloadIdentityPoolsNamespacesOperationsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsWorkloadIdentityPoolsNamespacesOperationsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsWorkloadIdentityPoolsNamespacesOperationsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "iam.projects.locations.workloadIdentityPools.namespaces.operations.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "iam.projects.locations.workloadIdentityPools.namespaces.operations.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsLocationsWorkloadIdentityPoolsNamespacesOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "iam.projects.locations.workloadIdentityPools.namespaces.operations.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsLocationsWorkloadIdentityPoolsOperationsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Gets the latest state of a long-running operation. Clients can use this -// method to poll the operation result at intervals as recommended by the API -// service. -// -// - name: The name of the operation resource. -func (r *ProjectsLocationsWorkloadIdentityPoolsOperationsService) Get(name string) *ProjectsLocationsWorkloadIdentityPoolsOperationsGetCall { - c := &ProjectsLocationsWorkloadIdentityPoolsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsLocationsWorkloadIdentityPoolsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsWorkloadIdentityPoolsOperationsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *ProjectsLocationsWorkloadIdentityPoolsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsWorkloadIdentityPoolsOperationsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsWorkloadIdentityPoolsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsWorkloadIdentityPoolsOperationsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsWorkloadIdentityPoolsOperationsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsWorkloadIdentityPoolsOperationsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "iam.projects.locations.workloadIdentityPools.operations.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "iam.projects.locations.workloadIdentityPools.operations.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsLocationsWorkloadIdentityPoolsOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "iam.projects.locations.workloadIdentityPools.operations.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsLocationsWorkloadIdentityPoolsProvidersCreateCall struct { - s *Service - parent string - workloadidentitypoolprovider *WorkloadIdentityPoolProvider - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Create: Creates a new WorkloadIdentityPoolProvider in a -// WorkloadIdentityPool. You cannot reuse the name of a deleted provider until -// 30 days after deletion. -// -// - parent: The pool to create this provider in. -func (r *ProjectsLocationsWorkloadIdentityPoolsProvidersService) Create(parent string, workloadidentitypoolprovider *WorkloadIdentityPoolProvider) *ProjectsLocationsWorkloadIdentityPoolsProvidersCreateCall { - c := &ProjectsLocationsWorkloadIdentityPoolsProvidersCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.workloadidentitypoolprovider = workloadidentitypoolprovider - return c -} - -// WorkloadIdentityPoolProviderId sets the optional parameter -// "workloadIdentityPoolProviderId": Required. The ID for the provider, which -// becomes the final component of the resource name. This value must be 4-32 -// characters, and may contain the characters [a-z0-9-]. The prefix `gcp-` is -// reserved for use by Google, and may not be specified. -func (c *ProjectsLocationsWorkloadIdentityPoolsProvidersCreateCall) WorkloadIdentityPoolProviderId(workloadIdentityPoolProviderId string) *ProjectsLocationsWorkloadIdentityPoolsProvidersCreateCall { - c.urlParams_.Set("workloadIdentityPoolProviderId", workloadIdentityPoolProviderId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsLocationsWorkloadIdentityPoolsProvidersCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsWorkloadIdentityPoolsProvidersCreateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsWorkloadIdentityPoolsProvidersCreateCall) Context(ctx context.Context) *ProjectsLocationsWorkloadIdentityPoolsProvidersCreateCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsWorkloadIdentityPoolsProvidersCreateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsWorkloadIdentityPoolsProvidersCreateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.workloadidentitypoolprovider) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/providers") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "iam.projects.locations.workloadIdentityPools.providers.create", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "iam.projects.locations.workloadIdentityPools.providers.create" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsLocationsWorkloadIdentityPoolsProvidersCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "iam.projects.locations.workloadIdentityPools.providers.create", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsLocationsWorkloadIdentityPoolsProvidersDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes a WorkloadIdentityPoolProvider. Deleting a provider does not -// revoke credentials that have already been issued; they continue to grant -// access. You can undelete a provider for 30 days. After 30 days, deletion is -// permanent. You cannot update deleted providers. However, you can view and -// list them. -// -// - name: The name of the provider to delete. -func (r *ProjectsLocationsWorkloadIdentityPoolsProvidersService) Delete(name string) *ProjectsLocationsWorkloadIdentityPoolsProvidersDeleteCall { - c := &ProjectsLocationsWorkloadIdentityPoolsProvidersDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsLocationsWorkloadIdentityPoolsProvidersDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsWorkloadIdentityPoolsProvidersDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsWorkloadIdentityPoolsProvidersDeleteCall) Context(ctx context.Context) *ProjectsLocationsWorkloadIdentityPoolsProvidersDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsWorkloadIdentityPoolsProvidersDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsWorkloadIdentityPoolsProvidersDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "iam.projects.locations.workloadIdentityPools.providers.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "iam.projects.locations.workloadIdentityPools.providers.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsLocationsWorkloadIdentityPoolsProvidersDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "iam.projects.locations.workloadIdentityPools.providers.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsLocationsWorkloadIdentityPoolsProvidersGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Gets an individual WorkloadIdentityPoolProvider. -// -// - name: The name of the provider to retrieve. -func (r *ProjectsLocationsWorkloadIdentityPoolsProvidersService) Get(name string) *ProjectsLocationsWorkloadIdentityPoolsProvidersGetCall { - c := &ProjectsLocationsWorkloadIdentityPoolsProvidersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsLocationsWorkloadIdentityPoolsProvidersGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsWorkloadIdentityPoolsProvidersGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *ProjectsLocationsWorkloadIdentityPoolsProvidersGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsWorkloadIdentityPoolsProvidersGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsWorkloadIdentityPoolsProvidersGetCall) Context(ctx context.Context) *ProjectsLocationsWorkloadIdentityPoolsProvidersGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsWorkloadIdentityPoolsProvidersGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsWorkloadIdentityPoolsProvidersGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "iam.projects.locations.workloadIdentityPools.providers.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "iam.projects.locations.workloadIdentityPools.providers.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *WorkloadIdentityPoolProvider.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsLocationsWorkloadIdentityPoolsProvidersGetCall) Do(opts ...googleapi.CallOption) (*WorkloadIdentityPoolProvider, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &WorkloadIdentityPoolProvider{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "iam.projects.locations.workloadIdentityPools.providers.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsLocationsWorkloadIdentityPoolsProvidersListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Lists all non-deleted WorkloadIdentityPoolProviders in a -// WorkloadIdentityPool. If `show_deleted` is set to `true`, then deleted -// providers are also listed. -// -// - parent: The pool to list providers for. -func (r *ProjectsLocationsWorkloadIdentityPoolsProvidersService) List(parent string) *ProjectsLocationsWorkloadIdentityPoolsProvidersListCall { - c := &ProjectsLocationsWorkloadIdentityPoolsProvidersListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// PageSize sets the optional parameter "pageSize": The maximum number of -// providers to return. If unspecified, at most 50 providers are returned. The -// maximum value is 100; values above 100 are truncated to 100. -func (c *ProjectsLocationsWorkloadIdentityPoolsProvidersListCall) PageSize(pageSize int64) *ProjectsLocationsWorkloadIdentityPoolsProvidersListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": A page token, received -// from a previous `ListWorkloadIdentityPoolProviders` call. Provide this to -// retrieve the subsequent page. -func (c *ProjectsLocationsWorkloadIdentityPoolsProvidersListCall) PageToken(pageToken string) *ProjectsLocationsWorkloadIdentityPoolsProvidersListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ShowDeleted sets the optional parameter "showDeleted": Whether to return -// soft-deleted providers. -func (c *ProjectsLocationsWorkloadIdentityPoolsProvidersListCall) ShowDeleted(showDeleted bool) *ProjectsLocationsWorkloadIdentityPoolsProvidersListCall { - c.urlParams_.Set("showDeleted", fmt.Sprint(showDeleted)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsLocationsWorkloadIdentityPoolsProvidersListCall) Fields(s ...googleapi.Field) *ProjectsLocationsWorkloadIdentityPoolsProvidersListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *ProjectsLocationsWorkloadIdentityPoolsProvidersListCall) IfNoneMatch(entityTag string) *ProjectsLocationsWorkloadIdentityPoolsProvidersListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsWorkloadIdentityPoolsProvidersListCall) Context(ctx context.Context) *ProjectsLocationsWorkloadIdentityPoolsProvidersListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsWorkloadIdentityPoolsProvidersListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsWorkloadIdentityPoolsProvidersListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/providers") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "iam.projects.locations.workloadIdentityPools.providers.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "iam.projects.locations.workloadIdentityPools.providers.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *ListWorkloadIdentityPoolProvidersResponse.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsLocationsWorkloadIdentityPoolsProvidersListCall) Do(opts ...googleapi.CallOption) (*ListWorkloadIdentityPoolProvidersResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &ListWorkloadIdentityPoolProvidersResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "iam.projects.locations.workloadIdentityPools.providers.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsWorkloadIdentityPoolsProvidersListCall) Pages(ctx context.Context, f func(*ListWorkloadIdentityPoolProvidersResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -type ProjectsLocationsWorkloadIdentityPoolsProvidersPatchCall struct { - s *Service - name string - workloadidentitypoolprovider *WorkloadIdentityPoolProvider - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Updates an existing WorkloadIdentityPoolProvider. -// -// - name: Identifier. The resource name of the provider. -func (r *ProjectsLocationsWorkloadIdentityPoolsProvidersService) Patch(name string, workloadidentitypoolprovider *WorkloadIdentityPoolProvider) *ProjectsLocationsWorkloadIdentityPoolsProvidersPatchCall { - c := &ProjectsLocationsWorkloadIdentityPoolsProvidersPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.workloadidentitypoolprovider = workloadidentitypoolprovider - return c -} - -// UpdateMask sets the optional parameter "updateMask": Required. The list of -// fields to update. -func (c *ProjectsLocationsWorkloadIdentityPoolsProvidersPatchCall) UpdateMask(updateMask string) *ProjectsLocationsWorkloadIdentityPoolsProvidersPatchCall { - c.urlParams_.Set("updateMask", updateMask) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsLocationsWorkloadIdentityPoolsProvidersPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsWorkloadIdentityPoolsProvidersPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsWorkloadIdentityPoolsProvidersPatchCall) Context(ctx context.Context) *ProjectsLocationsWorkloadIdentityPoolsProvidersPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsWorkloadIdentityPoolsProvidersPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsWorkloadIdentityPoolsProvidersPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.workloadidentitypoolprovider) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "iam.projects.locations.workloadIdentityPools.providers.patch", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "iam.projects.locations.workloadIdentityPools.providers.patch" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsLocationsWorkloadIdentityPoolsProvidersPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "iam.projects.locations.workloadIdentityPools.providers.patch", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsLocationsWorkloadIdentityPoolsProvidersUndeleteCall struct { - s *Service - name string - undeleteworkloadidentitypoolproviderrequest *UndeleteWorkloadIdentityPoolProviderRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Undelete: Undeletes a WorkloadIdentityPoolProvider, as long as it was -// deleted fewer than 30 days ago. -// -// - name: The name of the provider to undelete. -func (r *ProjectsLocationsWorkloadIdentityPoolsProvidersService) Undelete(name string, undeleteworkloadidentitypoolproviderrequest *UndeleteWorkloadIdentityPoolProviderRequest) *ProjectsLocationsWorkloadIdentityPoolsProvidersUndeleteCall { - c := &ProjectsLocationsWorkloadIdentityPoolsProvidersUndeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.undeleteworkloadidentitypoolproviderrequest = undeleteworkloadidentitypoolproviderrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsLocationsWorkloadIdentityPoolsProvidersUndeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsWorkloadIdentityPoolsProvidersUndeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsWorkloadIdentityPoolsProvidersUndeleteCall) Context(ctx context.Context) *ProjectsLocationsWorkloadIdentityPoolsProvidersUndeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsWorkloadIdentityPoolsProvidersUndeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsWorkloadIdentityPoolsProvidersUndeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.undeleteworkloadidentitypoolproviderrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:undelete") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "iam.projects.locations.workloadIdentityPools.providers.undelete", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "iam.projects.locations.workloadIdentityPools.providers.undelete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsLocationsWorkloadIdentityPoolsProvidersUndeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "iam.projects.locations.workloadIdentityPools.providers.undelete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsLocationsWorkloadIdentityPoolsProvidersKeysCreateCall struct { - s *Service - parent string - workloadidentitypoolproviderkey *WorkloadIdentityPoolProviderKey - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Create: Create a new WorkloadIdentityPoolProviderKey in a -// WorkloadIdentityPoolProvider. -// -// - parent: The parent provider resource to create the key in. -func (r *ProjectsLocationsWorkloadIdentityPoolsProvidersKeysService) Create(parent string, workloadidentitypoolproviderkey *WorkloadIdentityPoolProviderKey) *ProjectsLocationsWorkloadIdentityPoolsProvidersKeysCreateCall { - c := &ProjectsLocationsWorkloadIdentityPoolsProvidersKeysCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.workloadidentitypoolproviderkey = workloadidentitypoolproviderkey - return c -} - -// WorkloadIdentityPoolProviderKeyId sets the optional parameter -// "workloadIdentityPoolProviderKeyId": Required. The ID to use for the key, -// which becomes the final component of the resource name. This value should be -// 4-32 characters, and may contain the characters [a-z0-9-]. -func (c *ProjectsLocationsWorkloadIdentityPoolsProvidersKeysCreateCall) WorkloadIdentityPoolProviderKeyId(workloadIdentityPoolProviderKeyId string) *ProjectsLocationsWorkloadIdentityPoolsProvidersKeysCreateCall { - c.urlParams_.Set("workloadIdentityPoolProviderKeyId", workloadIdentityPoolProviderKeyId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsLocationsWorkloadIdentityPoolsProvidersKeysCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsWorkloadIdentityPoolsProvidersKeysCreateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsWorkloadIdentityPoolsProvidersKeysCreateCall) Context(ctx context.Context) *ProjectsLocationsWorkloadIdentityPoolsProvidersKeysCreateCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsWorkloadIdentityPoolsProvidersKeysCreateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsWorkloadIdentityPoolsProvidersKeysCreateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.workloadidentitypoolproviderkey) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/keys") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "iam.projects.locations.workloadIdentityPools.providers.keys.create", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "iam.projects.locations.workloadIdentityPools.providers.keys.create" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsLocationsWorkloadIdentityPoolsProvidersKeysCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "iam.projects.locations.workloadIdentityPools.providers.keys.create", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsLocationsWorkloadIdentityPoolsProvidersKeysDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes an WorkloadIdentityPoolProviderKey. You can undelete a key -// for 30 days. After 30 days, deletion is permanent. -// -// - name: The name of the encryption key to delete. -func (r *ProjectsLocationsWorkloadIdentityPoolsProvidersKeysService) Delete(name string) *ProjectsLocationsWorkloadIdentityPoolsProvidersKeysDeleteCall { - c := &ProjectsLocationsWorkloadIdentityPoolsProvidersKeysDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsLocationsWorkloadIdentityPoolsProvidersKeysDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsWorkloadIdentityPoolsProvidersKeysDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsWorkloadIdentityPoolsProvidersKeysDeleteCall) Context(ctx context.Context) *ProjectsLocationsWorkloadIdentityPoolsProvidersKeysDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsWorkloadIdentityPoolsProvidersKeysDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsWorkloadIdentityPoolsProvidersKeysDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "iam.projects.locations.workloadIdentityPools.providers.keys.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "iam.projects.locations.workloadIdentityPools.providers.keys.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsLocationsWorkloadIdentityPoolsProvidersKeysDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "iam.projects.locations.workloadIdentityPools.providers.keys.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsLocationsWorkloadIdentityPoolsProvidersKeysGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Gets an individual WorkloadIdentityPoolProviderKey. -// -// - name: The name of the key to retrieve. -func (r *ProjectsLocationsWorkloadIdentityPoolsProvidersKeysService) Get(name string) *ProjectsLocationsWorkloadIdentityPoolsProvidersKeysGetCall { - c := &ProjectsLocationsWorkloadIdentityPoolsProvidersKeysGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsLocationsWorkloadIdentityPoolsProvidersKeysGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsWorkloadIdentityPoolsProvidersKeysGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *ProjectsLocationsWorkloadIdentityPoolsProvidersKeysGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsWorkloadIdentityPoolsProvidersKeysGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsWorkloadIdentityPoolsProvidersKeysGetCall) Context(ctx context.Context) *ProjectsLocationsWorkloadIdentityPoolsProvidersKeysGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsWorkloadIdentityPoolsProvidersKeysGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsWorkloadIdentityPoolsProvidersKeysGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "iam.projects.locations.workloadIdentityPools.providers.keys.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "iam.projects.locations.workloadIdentityPools.providers.keys.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *WorkloadIdentityPoolProviderKey.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsLocationsWorkloadIdentityPoolsProvidersKeysGetCall) Do(opts ...googleapi.CallOption) (*WorkloadIdentityPoolProviderKey, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &WorkloadIdentityPoolProviderKey{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "iam.projects.locations.workloadIdentityPools.providers.keys.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsLocationsWorkloadIdentityPoolsProvidersKeysListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Lists all non-deleted WorkloadIdentityPoolProviderKeys in a project. -// If show_deleted is set to `true`, then deleted pools are also listed. -// -// - parent: The parent provider resource to list encryption keys for. -func (r *ProjectsLocationsWorkloadIdentityPoolsProvidersKeysService) List(parent string) *ProjectsLocationsWorkloadIdentityPoolsProvidersKeysListCall { - c := &ProjectsLocationsWorkloadIdentityPoolsProvidersKeysListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// PageSize sets the optional parameter "pageSize": The maximum number of keys -// to return. If unspecified, all keys are returned. The maximum value is 10; -// values above 10 are truncated to 10. -func (c *ProjectsLocationsWorkloadIdentityPoolsProvidersKeysListCall) PageSize(pageSize int64) *ProjectsLocationsWorkloadIdentityPoolsProvidersKeysListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": A page token, received -// from a previous `ListWorkloadIdentityPoolProviderKeys` call. Provide this to -// retrieve the subsequent page. -func (c *ProjectsLocationsWorkloadIdentityPoolsProvidersKeysListCall) PageToken(pageToken string) *ProjectsLocationsWorkloadIdentityPoolsProvidersKeysListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ShowDeleted sets the optional parameter "showDeleted": Whether to return -// soft deleted resources as well. -func (c *ProjectsLocationsWorkloadIdentityPoolsProvidersKeysListCall) ShowDeleted(showDeleted bool) *ProjectsLocationsWorkloadIdentityPoolsProvidersKeysListCall { - c.urlParams_.Set("showDeleted", fmt.Sprint(showDeleted)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsLocationsWorkloadIdentityPoolsProvidersKeysListCall) Fields(s ...googleapi.Field) *ProjectsLocationsWorkloadIdentityPoolsProvidersKeysListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *ProjectsLocationsWorkloadIdentityPoolsProvidersKeysListCall) IfNoneMatch(entityTag string) *ProjectsLocationsWorkloadIdentityPoolsProvidersKeysListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsWorkloadIdentityPoolsProvidersKeysListCall) Context(ctx context.Context) *ProjectsLocationsWorkloadIdentityPoolsProvidersKeysListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsWorkloadIdentityPoolsProvidersKeysListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsWorkloadIdentityPoolsProvidersKeysListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/keys") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "iam.projects.locations.workloadIdentityPools.providers.keys.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "iam.projects.locations.workloadIdentityPools.providers.keys.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *ListWorkloadIdentityPoolProviderKeysResponse.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsLocationsWorkloadIdentityPoolsProvidersKeysListCall) Do(opts ...googleapi.CallOption) (*ListWorkloadIdentityPoolProviderKeysResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &ListWorkloadIdentityPoolProviderKeysResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "iam.projects.locations.workloadIdentityPools.providers.keys.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsWorkloadIdentityPoolsProvidersKeysListCall) Pages(ctx context.Context, f func(*ListWorkloadIdentityPoolProviderKeysResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -type ProjectsLocationsWorkloadIdentityPoolsProvidersKeysUndeleteCall struct { - s *Service - name string - undeleteworkloadidentitypoolproviderkeyrequest *UndeleteWorkloadIdentityPoolProviderKeyRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Undelete: Undeletes an WorkloadIdentityPoolProviderKey, as long as it was -// deleted fewer than 30 days ago. -// -// - name: The name of the encryption key to undelete. -func (r *ProjectsLocationsWorkloadIdentityPoolsProvidersKeysService) Undelete(name string, undeleteworkloadidentitypoolproviderkeyrequest *UndeleteWorkloadIdentityPoolProviderKeyRequest) *ProjectsLocationsWorkloadIdentityPoolsProvidersKeysUndeleteCall { - c := &ProjectsLocationsWorkloadIdentityPoolsProvidersKeysUndeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.undeleteworkloadidentitypoolproviderkeyrequest = undeleteworkloadidentitypoolproviderkeyrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsLocationsWorkloadIdentityPoolsProvidersKeysUndeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsWorkloadIdentityPoolsProvidersKeysUndeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsWorkloadIdentityPoolsProvidersKeysUndeleteCall) Context(ctx context.Context) *ProjectsLocationsWorkloadIdentityPoolsProvidersKeysUndeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsWorkloadIdentityPoolsProvidersKeysUndeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsWorkloadIdentityPoolsProvidersKeysUndeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.undeleteworkloadidentitypoolproviderkeyrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:undelete") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "iam.projects.locations.workloadIdentityPools.providers.keys.undelete", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "iam.projects.locations.workloadIdentityPools.providers.keys.undelete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsLocationsWorkloadIdentityPoolsProvidersKeysUndeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "iam.projects.locations.workloadIdentityPools.providers.keys.undelete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsLocationsWorkloadIdentityPoolsProvidersKeysOperationsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Gets the latest state of a long-running operation. Clients can use this -// method to poll the operation result at intervals as recommended by the API -// service. -// -// - name: The name of the operation resource. -func (r *ProjectsLocationsWorkloadIdentityPoolsProvidersKeysOperationsService) Get(name string) *ProjectsLocationsWorkloadIdentityPoolsProvidersKeysOperationsGetCall { - c := &ProjectsLocationsWorkloadIdentityPoolsProvidersKeysOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsLocationsWorkloadIdentityPoolsProvidersKeysOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsWorkloadIdentityPoolsProvidersKeysOperationsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *ProjectsLocationsWorkloadIdentityPoolsProvidersKeysOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsWorkloadIdentityPoolsProvidersKeysOperationsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsWorkloadIdentityPoolsProvidersKeysOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsWorkloadIdentityPoolsProvidersKeysOperationsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsWorkloadIdentityPoolsProvidersKeysOperationsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsWorkloadIdentityPoolsProvidersKeysOperationsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "iam.projects.locations.workloadIdentityPools.providers.keys.operations.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "iam.projects.locations.workloadIdentityPools.providers.keys.operations.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsLocationsWorkloadIdentityPoolsProvidersKeysOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "iam.projects.locations.workloadIdentityPools.providers.keys.operations.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsLocationsWorkloadIdentityPoolsProvidersOperationsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Gets the latest state of a long-running operation. Clients can use this -// method to poll the operation result at intervals as recommended by the API -// service. -// -// - name: The name of the operation resource. -func (r *ProjectsLocationsWorkloadIdentityPoolsProvidersOperationsService) Get(name string) *ProjectsLocationsWorkloadIdentityPoolsProvidersOperationsGetCall { - c := &ProjectsLocationsWorkloadIdentityPoolsProvidersOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsLocationsWorkloadIdentityPoolsProvidersOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsWorkloadIdentityPoolsProvidersOperationsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *ProjectsLocationsWorkloadIdentityPoolsProvidersOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsWorkloadIdentityPoolsProvidersOperationsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsWorkloadIdentityPoolsProvidersOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsWorkloadIdentityPoolsProvidersOperationsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsWorkloadIdentityPoolsProvidersOperationsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsWorkloadIdentityPoolsProvidersOperationsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "iam.projects.locations.workloadIdentityPools.providers.operations.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "iam.projects.locations.workloadIdentityPools.providers.operations.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsLocationsWorkloadIdentityPoolsProvidersOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "iam.projects.locations.workloadIdentityPools.providers.operations.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsRolesCreateCall struct { - s *Service - parent string - createrolerequest *CreateRoleRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Create: Creates a new custom Role. -// -// - parent: The `parent` parameter's value depends on the target resource for -// the request, namely projects -// (https://cloud.google.com/iam/docs/reference/rest/v1/projects.roles) or -// organizations -// (https://cloud.google.com/iam/docs/reference/rest/v1/organizations.roles). -// Each resource type's `parent` value format is described below: * -// projects.roles.create -// (https://cloud.google.com/iam/docs/reference/rest/v1/projects.roles/create): -// `projects/{PROJECT_ID}`. This method creates project-level custom roles -// (https://cloud.google.com/iam/docs/understanding-custom-roles). Example -// request URL: `https://iam.googleapis.com/v1/projects/{PROJECT_ID}/roles` * -// organizations.roles.create -// (https://cloud.google.com/iam/docs/reference/rest/v1/organizations.roles/create): -// `organizations/{ORGANIZATION_ID}`. This method creates organization-level -// custom roles -// (https://cloud.google.com/iam/docs/understanding-custom-roles). Example -// request URL: -// `https://iam.googleapis.com/v1/organizations/{ORGANIZATION_ID}/roles` -// Note: Wildcard (*) values are invalid; you must specify a complete project -// ID or organization ID. -func (r *ProjectsRolesService) Create(parent string, createrolerequest *CreateRoleRequest) *ProjectsRolesCreateCall { - c := &ProjectsRolesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.createrolerequest = createrolerequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsRolesCreateCall) Fields(s ...googleapi.Field) *ProjectsRolesCreateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsRolesCreateCall) Context(ctx context.Context) *ProjectsRolesCreateCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsRolesCreateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsRolesCreateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.createrolerequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/roles") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "iam.projects.roles.create", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "iam.projects.roles.create" call. -// Any non-2xx status code is an error. Response headers are in either -// *Role.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsRolesCreateCall) Do(opts ...googleapi.CallOption) (*Role, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &Role{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "iam.projects.roles.create", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsRolesDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes a custom Role. When you delete a custom role, the following -// changes occur immediately: * You cannot bind a principal to the custom role -// in an IAM Policy. * Existing bindings to the custom role are not changed, -// but they have no effect. * By default, the response from ListRoles does not -// include the custom role. A deleted custom role still counts toward the -// custom role limit (https://cloud.google.com/iam/help/limits) until it is -// permanently deleted. You have 7 days to undelete the custom role. After 7 -// days, the following changes occur: * The custom role is permanently deleted -// and cannot be recovered. * If an IAM policy contains a binding to the custom -// role, the binding is permanently removed. * The custom role no longer counts -// toward your custom role limit. -// -// - name: The `name` parameter's value depends on the target resource for the -// request, namely projects -// (https://cloud.google.com/iam/docs/reference/rest/v1/projects.roles) or -// organizations -// (https://cloud.google.com/iam/docs/reference/rest/v1/organizations.roles). -// Each resource type's `name` value format is described below: * -// projects.roles.delete -// (https://cloud.google.com/iam/docs/reference/rest/v1/projects.roles/delete): -// `projects/{PROJECT_ID}/roles/{CUSTOM_ROLE_ID}`. This method deletes only -// custom roles -// (https://cloud.google.com/iam/docs/understanding-custom-roles) that have -// been created at the project level. Example request URL: -// `https://iam.googleapis.com/v1/projects/{PROJECT_ID}/roles/{CUSTOM_ROLE_ID} -// ` * organizations.roles.delete -// (https://cloud.google.com/iam/docs/reference/rest/v1/organizations.roles/delete): -// `organizations/{ORGANIZATION_ID}/roles/{CUSTOM_ROLE_ID}`. This method -// deletes only custom roles -// (https://cloud.google.com/iam/docs/understanding-custom-roles) that have -// been created at the organization level. Example request URL: -// `https://iam.googleapis.com/v1/organizations/{ORGANIZATION_ID}/roles/{CUSTO -// M_ROLE_ID}` Note: Wildcard (*) values are invalid; you must specify a -// complete project ID or organization ID. -func (r *ProjectsRolesService) Delete(name string) *ProjectsRolesDeleteCall { - c := &ProjectsRolesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// Etag sets the optional parameter "etag": Used to perform a consistent -// read-modify-write. -func (c *ProjectsRolesDeleteCall) Etag(etag string) *ProjectsRolesDeleteCall { - c.urlParams_.Set("etag", etag) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsRolesDeleteCall) Fields(s ...googleapi.Field) *ProjectsRolesDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsRolesDeleteCall) Context(ctx context.Context) *ProjectsRolesDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsRolesDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsRolesDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "iam.projects.roles.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "iam.projects.roles.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Role.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsRolesDeleteCall) Do(opts ...googleapi.CallOption) (*Role, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &Role{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "iam.projects.roles.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsRolesGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Gets the definition of a Role. -// -// - name: The `name` parameter's value depends on the target resource for the -// request, namely roles -// (https://cloud.google.com/iam/docs/reference/rest/v1/roles), projects -// (https://cloud.google.com/iam/docs/reference/rest/v1/projects.roles), or -// organizations -// (https://cloud.google.com/iam/docs/reference/rest/v1/organizations.roles). -// Each resource type's `name` value format is described below: * roles.get -// (https://cloud.google.com/iam/docs/reference/rest/v1/roles/get): -// `roles/{ROLE_NAME}`. This method returns results from all predefined roles -// (https://cloud.google.com/iam/docs/understanding-roles#predefined_roles) -// in IAM. Example request URL: -// `https://iam.googleapis.com/v1/roles/{ROLE_NAME}` * projects.roles.get -// (https://cloud.google.com/iam/docs/reference/rest/v1/projects.roles/get): -// `projects/{PROJECT_ID}/roles/{CUSTOM_ROLE_ID}`. This method returns only -// custom roles -// (https://cloud.google.com/iam/docs/understanding-custom-roles) that have -// been created at the project level. Example request URL: -// `https://iam.googleapis.com/v1/projects/{PROJECT_ID}/roles/{CUSTOM_ROLE_ID} -// ` * organizations.roles.get -// (https://cloud.google.com/iam/docs/reference/rest/v1/organizations.roles/get): -// `organizations/{ORGANIZATION_ID}/roles/{CUSTOM_ROLE_ID}`. This method -// returns only custom roles -// (https://cloud.google.com/iam/docs/understanding-custom-roles) that have -// been created at the organization level. Example request URL: -// `https://iam.googleapis.com/v1/organizations/{ORGANIZATION_ID}/roles/{CUSTO -// M_ROLE_ID}` Note: Wildcard (*) values are invalid; you must specify a -// complete project ID or organization ID. -func (r *ProjectsRolesService) Get(name string) *ProjectsRolesGetCall { - c := &ProjectsRolesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsRolesGetCall) Fields(s ...googleapi.Field) *ProjectsRolesGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *ProjectsRolesGetCall) IfNoneMatch(entityTag string) *ProjectsRolesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsRolesGetCall) Context(ctx context.Context) *ProjectsRolesGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsRolesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsRolesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "iam.projects.roles.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "iam.projects.roles.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *Role.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsRolesGetCall) Do(opts ...googleapi.CallOption) (*Role, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &Role{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "iam.projects.roles.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsRolesListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Lists every predefined Role that IAM supports, or every custom role -// that is defined for an organization or project. -// -// - parent: The `parent` parameter's value depends on the target resource for -// the request, namely roles -// (https://cloud.google.com/iam/docs/reference/rest/v1/roles), projects -// (https://cloud.google.com/iam/docs/reference/rest/v1/projects.roles), or -// organizations -// (https://cloud.google.com/iam/docs/reference/rest/v1/organizations.roles). -// Each resource type's `parent` value format is described below: * -// roles.list -// (https://cloud.google.com/iam/docs/reference/rest/v1/roles/list): An empty -// string. This method doesn't require a resource; it simply returns all -// predefined roles -// (https://cloud.google.com/iam/docs/understanding-roles#predefined_roles) -// in IAM. Example request URL: `https://iam.googleapis.com/v1/roles` * -// projects.roles.list -// (https://cloud.google.com/iam/docs/reference/rest/v1/projects.roles/list): -// `projects/{PROJECT_ID}`. This method lists all project-level custom roles -// (https://cloud.google.com/iam/docs/understanding-custom-roles). Example -// request URL: `https://iam.googleapis.com/v1/projects/{PROJECT_ID}/roles` * -// organizations.roles.list -// (https://cloud.google.com/iam/docs/reference/rest/v1/organizations.roles/list): -// `organizations/{ORGANIZATION_ID}`. This method lists all -// organization-level custom roles -// (https://cloud.google.com/iam/docs/understanding-custom-roles). Example -// request URL: -// `https://iam.googleapis.com/v1/organizations/{ORGANIZATION_ID}/roles` -// Note: Wildcard (*) values are invalid; you must specify a complete project -// ID or organization ID. -func (r *ProjectsRolesService) List(parent string) *ProjectsRolesListCall { - c := &ProjectsRolesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// PageSize sets the optional parameter "pageSize": Optional limit on the -// number of roles to include in the response. The default is 300, and the -// maximum is 1,000. -func (c *ProjectsRolesListCall) PageSize(pageSize int64) *ProjectsRolesListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": Optional pagination token -// returned in an earlier ListRolesResponse. -func (c *ProjectsRolesListCall) PageToken(pageToken string) *ProjectsRolesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ShowDeleted sets the optional parameter "showDeleted": Include Roles that -// have been deleted. -func (c *ProjectsRolesListCall) ShowDeleted(showDeleted bool) *ProjectsRolesListCall { - c.urlParams_.Set("showDeleted", fmt.Sprint(showDeleted)) - return c -} - -// View sets the optional parameter "view": Optional view for the returned Role -// objects. When `FULL` is specified, the `includedPermissions` field is -// returned, which includes a list of all permissions in the role. The default -// value is `BASIC`, which does not return the `includedPermissions` field. -// -// Possible values: -// -// "BASIC" - Omits the `included_permissions` field. This is the default -// -// value. -// -// "FULL" - Returns all fields. -func (c *ProjectsRolesListCall) View(view string) *ProjectsRolesListCall { - c.urlParams_.Set("view", view) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsRolesListCall) Fields(s ...googleapi.Field) *ProjectsRolesListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *ProjectsRolesListCall) IfNoneMatch(entityTag string) *ProjectsRolesListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsRolesListCall) Context(ctx context.Context) *ProjectsRolesListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsRolesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsRolesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/roles") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "iam.projects.roles.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "iam.projects.roles.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *ListRolesResponse.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified was -// returned. -func (c *ProjectsRolesListCall) Do(opts ...googleapi.CallOption) (*ListRolesResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &ListRolesResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "iam.projects.roles.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *ProjectsRolesListCall) Pages(ctx context.Context, f func(*ListRolesResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -type ProjectsRolesPatchCall struct { - s *Service - name string - role *Role - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Updates the definition of a custom Role. -// -// - name: The `name` parameter's value depends on the target resource for the -// request, namely projects -// (https://cloud.google.com/iam/docs/reference/rest/v1/projects.roles) or -// organizations -// (https://cloud.google.com/iam/docs/reference/rest/v1/organizations.roles). -// Each resource type's `name` value format is described below: * -// projects.roles.patch -// (https://cloud.google.com/iam/docs/reference/rest/v1/projects.roles/patch): -// `projects/{PROJECT_ID}/roles/{CUSTOM_ROLE_ID}`. This method updates only -// custom roles -// (https://cloud.google.com/iam/docs/understanding-custom-roles) that have -// been created at the project level. Example request URL: -// `https://iam.googleapis.com/v1/projects/{PROJECT_ID}/roles/{CUSTOM_ROLE_ID} -// ` * organizations.roles.patch -// (https://cloud.google.com/iam/docs/reference/rest/v1/organizations.roles/patch): -// `organizations/{ORGANIZATION_ID}/roles/{CUSTOM_ROLE_ID}`. This method -// updates only custom roles -// (https://cloud.google.com/iam/docs/understanding-custom-roles) that have -// been created at the organization level. Example request URL: -// `https://iam.googleapis.com/v1/organizations/{ORGANIZATION_ID}/roles/{CUSTO -// M_ROLE_ID}` Note: Wildcard (*) values are invalid; you must specify a -// complete project ID or organization ID. -func (r *ProjectsRolesService) Patch(name string, role *Role) *ProjectsRolesPatchCall { - c := &ProjectsRolesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.role = role - return c -} - -// UpdateMask sets the optional parameter "updateMask": A mask describing which -// fields in the Role have changed. -func (c *ProjectsRolesPatchCall) UpdateMask(updateMask string) *ProjectsRolesPatchCall { - c.urlParams_.Set("updateMask", updateMask) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsRolesPatchCall) Fields(s ...googleapi.Field) *ProjectsRolesPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsRolesPatchCall) Context(ctx context.Context) *ProjectsRolesPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsRolesPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsRolesPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.role) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "iam.projects.roles.patch", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "iam.projects.roles.patch" call. -// Any non-2xx status code is an error. Response headers are in either -// *Role.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsRolesPatchCall) Do(opts ...googleapi.CallOption) (*Role, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &Role{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "iam.projects.roles.patch", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsRolesUndeleteCall struct { - s *Service - name string - undeleterolerequest *UndeleteRoleRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Undelete: Undeletes a custom Role. -// -// - name: The `name` parameter's value depends on the target resource for the -// request, namely projects -// (https://cloud.google.com/iam/docs/reference/rest/v1/projects.roles) or -// organizations -// (https://cloud.google.com/iam/docs/reference/rest/v1/organizations.roles). -// Each resource type's `name` value format is described below: * -// projects.roles.undelete -// (https://cloud.google.com/iam/docs/reference/rest/v1/projects.roles/undelete): -// `projects/{PROJECT_ID}/roles/{CUSTOM_ROLE_ID}`. This method undeletes only -// custom roles -// (https://cloud.google.com/iam/docs/understanding-custom-roles) that have -// been created at the project level. Example request URL: -// `https://iam.googleapis.com/v1/projects/{PROJECT_ID}/roles/{CUSTOM_ROLE_ID} -// ` * organizations.roles.undelete -// (https://cloud.google.com/iam/docs/reference/rest/v1/organizations.roles/undelete): -// `organizations/{ORGANIZATION_ID}/roles/{CUSTOM_ROLE_ID}`. This method -// undeletes only custom roles -// (https://cloud.google.com/iam/docs/understanding-custom-roles) that have -// been created at the organization level. Example request URL: -// `https://iam.googleapis.com/v1/organizations/{ORGANIZATION_ID}/roles/{CUSTO -// M_ROLE_ID}` Note: Wildcard (*) values are invalid; you must specify a -// complete project ID or organization ID. -func (r *ProjectsRolesService) Undelete(name string, undeleterolerequest *UndeleteRoleRequest) *ProjectsRolesUndeleteCall { - c := &ProjectsRolesUndeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.undeleterolerequest = undeleterolerequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsRolesUndeleteCall) Fields(s ...googleapi.Field) *ProjectsRolesUndeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsRolesUndeleteCall) Context(ctx context.Context) *ProjectsRolesUndeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsRolesUndeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsRolesUndeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.undeleterolerequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:undelete") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "iam.projects.roles.undelete", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "iam.projects.roles.undelete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Role.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsRolesUndeleteCall) Do(opts ...googleapi.CallOption) (*Role, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &Role{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "iam.projects.roles.undelete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsServiceAccountsCreateCall struct { - s *Service - name string - createserviceaccountrequest *CreateServiceAccountRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Create: Creates a ServiceAccount. -// -// - name: The resource name of the project associated with the service -// accounts, such as `projects/my-project-123`. -func (r *ProjectsServiceAccountsService) Create(name string, createserviceaccountrequest *CreateServiceAccountRequest) *ProjectsServiceAccountsCreateCall { - c := &ProjectsServiceAccountsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.createserviceaccountrequest = createserviceaccountrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsServiceAccountsCreateCall) Fields(s ...googleapi.Field) *ProjectsServiceAccountsCreateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsServiceAccountsCreateCall) Context(ctx context.Context) *ProjectsServiceAccountsCreateCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsServiceAccountsCreateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsServiceAccountsCreateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.createserviceaccountrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/serviceAccounts") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "iam.projects.serviceAccounts.create", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "iam.projects.serviceAccounts.create" call. -// Any non-2xx status code is an error. Response headers are in either -// *ServiceAccount.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsServiceAccountsCreateCall) Do(opts ...googleapi.CallOption) (*ServiceAccount, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &ServiceAccount{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "iam.projects.serviceAccounts.create", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsServiceAccountsDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes a ServiceAccount. **Warning:** After you delete a service -// account, you might not be able to undelete it. If you know that you need to -// re-enable the service account in the future, use DisableServiceAccount -// instead. If you delete a service account, IAM permanently removes the -// service account 30 days later. Google Cloud cannot recover the service -// account after it is permanently removed, even if you file a support request. -// To help avoid unplanned outages, we recommend that you disable the service -// account before you delete it. Use DisableServiceAccount to disable the -// service account, then wait at least 24 hours and watch for unintended -// consequences. If there are no unintended consequences, you can delete the -// service account. -// -// - name: The resource name of the service account. Use one of the following -// formats: * `projects/{PROJECT_ID}/serviceAccounts/{EMAIL_ADDRESS}` * -// `projects/{PROJECT_ID}/serviceAccounts/{UNIQUE_ID}` As an alternative, you -// can use the `-` wildcard character instead of the project ID: * -// `projects/-/serviceAccounts/{EMAIL_ADDRESS}` * -// `projects/-/serviceAccounts/{UNIQUE_ID}` When possible, avoid using the -// `-` wildcard character, because it can cause response messages to contain -// misleading error codes. For example, if you try to access the service -// account `projects/-/serviceAccounts/fake@example.com`, which does not -// exist, the response contains an HTTP `403 Forbidden` error instead of a -// `404 Not Found` error. -func (r *ProjectsServiceAccountsService) Delete(name string) *ProjectsServiceAccountsDeleteCall { - c := &ProjectsServiceAccountsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsServiceAccountsDeleteCall) Fields(s ...googleapi.Field) *ProjectsServiceAccountsDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsServiceAccountsDeleteCall) Context(ctx context.Context) *ProjectsServiceAccountsDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsServiceAccountsDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsServiceAccountsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "iam.projects.serviceAccounts.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "iam.projects.serviceAccounts.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Empty.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsServiceAccountsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &Empty{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "iam.projects.serviceAccounts.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsServiceAccountsDisableCall struct { - s *Service - name string - disableserviceaccountrequest *DisableServiceAccountRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Disable: Disables a ServiceAccount immediately. If an application uses the -// service account to authenticate, that application can no longer call Google -// APIs or access Google Cloud resources. Existing access tokens for the -// service account are rejected, and requests for new access tokens will fail. -// To re-enable the service account, use EnableServiceAccount. After you -// re-enable the service account, its existing access tokens will be accepted, -// and you can request new access tokens. To help avoid unplanned outages, we -// recommend that you disable the service account before you delete it. Use -// this method to disable the service account, then wait at least 24 hours and -// watch for unintended consequences. If there are no unintended consequences, -// you can delete the service account with DeleteServiceAccount. -// -// - name: The resource name of the service account. Use one of the following -// formats: * `projects/{PROJECT_ID}/serviceAccounts/{EMAIL_ADDRESS}` * -// `projects/{PROJECT_ID}/serviceAccounts/{UNIQUE_ID}` As an alternative, you -// can use the `-` wildcard character instead of the project ID: * -// `projects/-/serviceAccounts/{EMAIL_ADDRESS}` * -// `projects/-/serviceAccounts/{UNIQUE_ID}` When possible, avoid using the -// `-` wildcard character, because it can cause response messages to contain -// misleading error codes. For example, if you try to access the service -// account `projects/-/serviceAccounts/fake@example.com`, which does not -// exist, the response contains an HTTP `403 Forbidden` error instead of a -// `404 Not Found` error. -func (r *ProjectsServiceAccountsService) Disable(name string, disableserviceaccountrequest *DisableServiceAccountRequest) *ProjectsServiceAccountsDisableCall { - c := &ProjectsServiceAccountsDisableCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.disableserviceaccountrequest = disableserviceaccountrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsServiceAccountsDisableCall) Fields(s ...googleapi.Field) *ProjectsServiceAccountsDisableCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsServiceAccountsDisableCall) Context(ctx context.Context) *ProjectsServiceAccountsDisableCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsServiceAccountsDisableCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsServiceAccountsDisableCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.disableserviceaccountrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:disable") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "iam.projects.serviceAccounts.disable", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "iam.projects.serviceAccounts.disable" call. -// Any non-2xx status code is an error. Response headers are in either -// *Empty.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsServiceAccountsDisableCall) Do(opts ...googleapi.CallOption) (*Empty, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &Empty{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "iam.projects.serviceAccounts.disable", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsServiceAccountsEnableCall struct { - s *Service - name string - enableserviceaccountrequest *EnableServiceAccountRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Enable: Enables a ServiceAccount that was disabled by DisableServiceAccount. -// If the service account is already enabled, then this method has no effect. -// If the service account was disabled by other means—for example, if Google -// disabled the service account because it was compromised—you cannot use -// this method to enable the service account. -// -// - name: The resource name of the service account. Use one of the following -// formats: * `projects/{PROJECT_ID}/serviceAccounts/{EMAIL_ADDRESS}` * -// `projects/{PROJECT_ID}/serviceAccounts/{UNIQUE_ID}` As an alternative, you -// can use the `-` wildcard character instead of the project ID: * -// `projects/-/serviceAccounts/{EMAIL_ADDRESS}` * -// `projects/-/serviceAccounts/{UNIQUE_ID}` When possible, avoid using the -// `-` wildcard character, because it can cause response messages to contain -// misleading error codes. For example, if you try to access the service -// account `projects/-/serviceAccounts/fake@example.com`, which does not -// exist, the response contains an HTTP `403 Forbidden` error instead of a -// `404 Not Found` error. -func (r *ProjectsServiceAccountsService) Enable(name string, enableserviceaccountrequest *EnableServiceAccountRequest) *ProjectsServiceAccountsEnableCall { - c := &ProjectsServiceAccountsEnableCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.enableserviceaccountrequest = enableserviceaccountrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsServiceAccountsEnableCall) Fields(s ...googleapi.Field) *ProjectsServiceAccountsEnableCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsServiceAccountsEnableCall) Context(ctx context.Context) *ProjectsServiceAccountsEnableCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsServiceAccountsEnableCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsServiceAccountsEnableCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.enableserviceaccountrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:enable") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "iam.projects.serviceAccounts.enable", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "iam.projects.serviceAccounts.enable" call. -// Any non-2xx status code is an error. Response headers are in either -// *Empty.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsServiceAccountsEnableCall) Do(opts ...googleapi.CallOption) (*Empty, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &Empty{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "iam.projects.serviceAccounts.enable", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsServiceAccountsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Gets a ServiceAccount. -// -// - name: The resource name of the service account. Use one of the following -// formats: * `projects/{PROJECT_ID}/serviceAccounts/{EMAIL_ADDRESS}` * -// `projects/{PROJECT_ID}/serviceAccounts/{UNIQUE_ID}` As an alternative, you -// can use the `-` wildcard character instead of the project ID: * -// `projects/-/serviceAccounts/{EMAIL_ADDRESS}` * -// `projects/-/serviceAccounts/{UNIQUE_ID}` When possible, avoid using the -// `-` wildcard character, because it can cause response messages to contain -// misleading error codes. For example, if you try to access the service -// account `projects/-/serviceAccounts/fake@example.com`, which does not -// exist, the response contains an HTTP `403 Forbidden` error instead of a -// `404 Not Found` error. -func (r *ProjectsServiceAccountsService) Get(name string) *ProjectsServiceAccountsGetCall { - c := &ProjectsServiceAccountsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsServiceAccountsGetCall) Fields(s ...googleapi.Field) *ProjectsServiceAccountsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *ProjectsServiceAccountsGetCall) IfNoneMatch(entityTag string) *ProjectsServiceAccountsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsServiceAccountsGetCall) Context(ctx context.Context) *ProjectsServiceAccountsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsServiceAccountsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsServiceAccountsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "iam.projects.serviceAccounts.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "iam.projects.serviceAccounts.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *ServiceAccount.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsServiceAccountsGetCall) Do(opts ...googleapi.CallOption) (*ServiceAccount, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &ServiceAccount{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "iam.projects.serviceAccounts.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsServiceAccountsGetIamPolicyCall struct { - s *Service - resource string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// GetIamPolicy: Gets the IAM policy that is attached to a ServiceAccount. This -// IAM policy specifies which principals have access to the service account. -// This method does not tell you whether the service account has been granted -// any roles on other resources. To check whether a service account has role -// grants on a resource, use the `getIamPolicy` method for that resource. For -// example, to view the role grants for a project, call the Resource Manager -// API's projects.getIamPolicy -// (https://cloud.google.com/resource-manager/reference/rest/v1/projects/getIamPolicy) -// method. -// -// - resource: REQUIRED: The resource for which the policy is being requested. -// See Resource names (https://cloud.google.com/apis/design/resource_names) -// for the appropriate value for this field. -func (r *ProjectsServiceAccountsService) GetIamPolicy(resource string) *ProjectsServiceAccountsGetIamPolicyCall { - c := &ProjectsServiceAccountsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource - return c -} - -// OptionsRequestedPolicyVersion sets the optional parameter -// "options.requestedPolicyVersion": The maximum policy version that will be -// used to format the policy. Valid values are 0, 1, and 3. Requests specifying -// an invalid value will be rejected. Requests for policies with any -// conditional role bindings must specify version 3. Policies with no -// conditional role bindings may specify any valid value or leave the field -// unset. The policy in the response might use the policy version that you -// specified, or it might use a lower policy version. For example, if you -// specify version 3, but the policy has no conditional role bindings, the -// response uses version 1. To learn which resources support conditions in -// their IAM policies, see the IAM documentation -// (https://cloud.google.com/iam/help/conditions/resource-policies). -func (c *ProjectsServiceAccountsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsServiceAccountsGetIamPolicyCall { - c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsServiceAccountsGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsServiceAccountsGetIamPolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsServiceAccountsGetIamPolicyCall) Context(ctx context.Context) *ProjectsServiceAccountsGetIamPolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsServiceAccountsGetIamPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsServiceAccountsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "iam.projects.serviceAccounts.getIamPolicy", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "iam.projects.serviceAccounts.getIamPolicy" call. -// Any non-2xx status code is an error. Response headers are in either -// *Policy.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsServiceAccountsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &Policy{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "iam.projects.serviceAccounts.getIamPolicy", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsServiceAccountsListCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Lists every ServiceAccount that belongs to a specific project. -// -// - name: The resource name of the project associated with the service -// accounts, such as `projects/my-project-123`. -func (r *ProjectsServiceAccountsService) List(name string) *ProjectsServiceAccountsListCall { - c := &ProjectsServiceAccountsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// PageSize sets the optional parameter "pageSize": Optional limit on the -// number of service accounts to include in the response. Further accounts can -// subsequently be obtained by including the -// ListServiceAccountsResponse.next_page_token in a subsequent request. The -// default is 20, and the maximum is 100. -func (c *ProjectsServiceAccountsListCall) PageSize(pageSize int64) *ProjectsServiceAccountsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": Optional pagination token -// returned in an earlier ListServiceAccountsResponse.next_page_token. -func (c *ProjectsServiceAccountsListCall) PageToken(pageToken string) *ProjectsServiceAccountsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsServiceAccountsListCall) Fields(s ...googleapi.Field) *ProjectsServiceAccountsListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *ProjectsServiceAccountsListCall) IfNoneMatch(entityTag string) *ProjectsServiceAccountsListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsServiceAccountsListCall) Context(ctx context.Context) *ProjectsServiceAccountsListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsServiceAccountsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsServiceAccountsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/serviceAccounts") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "iam.projects.serviceAccounts.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "iam.projects.serviceAccounts.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *ListServiceAccountsResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsServiceAccountsListCall) Do(opts ...googleapi.CallOption) (*ListServiceAccountsResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &ListServiceAccountsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "iam.projects.serviceAccounts.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *ProjectsServiceAccountsListCall) Pages(ctx context.Context, f func(*ListServiceAccountsResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -type ProjectsServiceAccountsPatchCall struct { - s *Service - name string - patchserviceaccountrequest *PatchServiceAccountRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Patches a ServiceAccount. -// -// - name: The resource name of the service account. Use one of the following -// formats: * `projects/{PROJECT_ID}/serviceAccounts/{EMAIL_ADDRESS}` * -// `projects/{PROJECT_ID}/serviceAccounts/{UNIQUE_ID}` As an alternative, you -// can use the `-` wildcard character instead of the project ID: * -// `projects/-/serviceAccounts/{EMAIL_ADDRESS}` * -// `projects/-/serviceAccounts/{UNIQUE_ID}` When possible, avoid using the -// `-` wildcard character, because it can cause response messages to contain -// misleading error codes. For example, if you try to access the service -// account `projects/-/serviceAccounts/fake@example.com`, which does not -// exist, the response contains an HTTP `403 Forbidden` error instead of a -// `404 Not Found` error. -func (r *ProjectsServiceAccountsService) Patch(name string, patchserviceaccountrequest *PatchServiceAccountRequest) *ProjectsServiceAccountsPatchCall { - c := &ProjectsServiceAccountsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.patchserviceaccountrequest = patchserviceaccountrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsServiceAccountsPatchCall) Fields(s ...googleapi.Field) *ProjectsServiceAccountsPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsServiceAccountsPatchCall) Context(ctx context.Context) *ProjectsServiceAccountsPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsServiceAccountsPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsServiceAccountsPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.patchserviceaccountrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "iam.projects.serviceAccounts.patch", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "iam.projects.serviceAccounts.patch" call. -// Any non-2xx status code is an error. Response headers are in either -// *ServiceAccount.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsServiceAccountsPatchCall) Do(opts ...googleapi.CallOption) (*ServiceAccount, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &ServiceAccount{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "iam.projects.serviceAccounts.patch", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsServiceAccountsSetIamPolicyCall struct { - s *Service - resource string - setiampolicyrequest *SetIamPolicyRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetIamPolicy: Sets the IAM policy that is attached to a ServiceAccount. Use -// this method to grant or revoke access to the service account. For example, -// you could grant a principal the ability to impersonate the service account. -// This method does not enable the service account to access other resources. -// To grant roles to a service account on a resource, follow these steps: 1. -// Call the resource's `getIamPolicy` method to get its current IAM policy. 2. -// Edit the policy so that it binds the service account to an IAM role for the -// resource. 3. Call the resource's `setIamPolicy` method to update its IAM -// policy. For detailed instructions, see Manage access to project, folders, -// and organizations -// (https://cloud.google.com/iam/help/service-accounts/granting-access-to-service-accounts) -// or Manage access to other resources -// (https://cloud.google.com/iam/help/access/manage-other-resources). -// -// - resource: REQUIRED: The resource for which the policy is being specified. -// See Resource names (https://cloud.google.com/apis/design/resource_names) -// for the appropriate value for this field. -func (r *ProjectsServiceAccountsService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsServiceAccountsSetIamPolicyCall { - c := &ProjectsServiceAccountsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource - c.setiampolicyrequest = setiampolicyrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsServiceAccountsSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsServiceAccountsSetIamPolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsServiceAccountsSetIamPolicyCall) Context(ctx context.Context) *ProjectsServiceAccountsSetIamPolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsServiceAccountsSetIamPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsServiceAccountsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.setiampolicyrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "iam.projects.serviceAccounts.setIamPolicy", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "iam.projects.serviceAccounts.setIamPolicy" call. -// Any non-2xx status code is an error. Response headers are in either -// *Policy.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsServiceAccountsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &Policy{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "iam.projects.serviceAccounts.setIamPolicy", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsServiceAccountsSignBlobCall struct { - s *Service - name string - signblobrequest *SignBlobRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SignBlob: Signs a blob using the system-managed private key for a -// ServiceAccount. -// -// - name: Deprecated. Migrate to Service Account Credentials API -// (https://cloud.google.com/iam/help/credentials/migrate-api). The resource -// name of the service account. Use one of the following formats: * -// `projects/{PROJECT_ID}/serviceAccounts/{EMAIL_ADDRESS}` * -// `projects/{PROJECT_ID}/serviceAccounts/{UNIQUE_ID}` As an alternative, you -// can use the `-` wildcard character instead of the project ID: * -// `projects/-/serviceAccounts/{EMAIL_ADDRESS}` * -// `projects/-/serviceAccounts/{UNIQUE_ID}` When possible, avoid using the -// `-` wildcard character, because it can cause response messages to contain -// misleading error codes. For example, if you try to access the service -// account `projects/-/serviceAccounts/fake@example.com`, which does not -// exist, the response contains an HTTP `403 Forbidden` error instead of a -// `404 Not Found` error. -func (r *ProjectsServiceAccountsService) SignBlob(name string, signblobrequest *SignBlobRequest) *ProjectsServiceAccountsSignBlobCall { - c := &ProjectsServiceAccountsSignBlobCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.signblobrequest = signblobrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsServiceAccountsSignBlobCall) Fields(s ...googleapi.Field) *ProjectsServiceAccountsSignBlobCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsServiceAccountsSignBlobCall) Context(ctx context.Context) *ProjectsServiceAccountsSignBlobCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsServiceAccountsSignBlobCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsServiceAccountsSignBlobCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.signblobrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:signBlob") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "iam.projects.serviceAccounts.signBlob", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "iam.projects.serviceAccounts.signBlob" call. -// Any non-2xx status code is an error. Response headers are in either -// *SignBlobResponse.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified was -// returned. -func (c *ProjectsServiceAccountsSignBlobCall) Do(opts ...googleapi.CallOption) (*SignBlobResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &SignBlobResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "iam.projects.serviceAccounts.signBlob", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsServiceAccountsSignJwtCall struct { - s *Service - name string - signjwtrequest *SignJwtRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SignJwt: Signs a JSON Web Token (JWT) using the system-managed private key -// for a ServiceAccount. -// -// - name: Deprecated. Migrate to Service Account Credentials API -// (https://cloud.google.com/iam/help/credentials/migrate-api). The resource -// name of the service account. Use one of the following formats: * -// `projects/{PROJECT_ID}/serviceAccounts/{EMAIL_ADDRESS}` * -// `projects/{PROJECT_ID}/serviceAccounts/{UNIQUE_ID}` As an alternative, you -// can use the `-` wildcard character instead of the project ID: * -// `projects/-/serviceAccounts/{EMAIL_ADDRESS}` * -// `projects/-/serviceAccounts/{UNIQUE_ID}` When possible, avoid using the -// `-` wildcard character, because it can cause response messages to contain -// misleading error codes. For example, if you try to access the service -// account `projects/-/serviceAccounts/fake@example.com`, which does not -// exist, the response contains an HTTP `403 Forbidden` error instead of a -// `404 Not Found` error. -func (r *ProjectsServiceAccountsService) SignJwt(name string, signjwtrequest *SignJwtRequest) *ProjectsServiceAccountsSignJwtCall { - c := &ProjectsServiceAccountsSignJwtCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.signjwtrequest = signjwtrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsServiceAccountsSignJwtCall) Fields(s ...googleapi.Field) *ProjectsServiceAccountsSignJwtCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsServiceAccountsSignJwtCall) Context(ctx context.Context) *ProjectsServiceAccountsSignJwtCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsServiceAccountsSignJwtCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsServiceAccountsSignJwtCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.signjwtrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:signJwt") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "iam.projects.serviceAccounts.signJwt", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "iam.projects.serviceAccounts.signJwt" call. -// Any non-2xx status code is an error. Response headers are in either -// *SignJwtResponse.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified was -// returned. -func (c *ProjectsServiceAccountsSignJwtCall) Do(opts ...googleapi.CallOption) (*SignJwtResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &SignJwtResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "iam.projects.serviceAccounts.signJwt", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsServiceAccountsTestIamPermissionsCall struct { - s *Service - resource string - testiampermissionsrequest *TestIamPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Tests whether the caller has the specified permissions -// on a ServiceAccount. -// -// - resource: REQUIRED: The resource for which the policy detail is being -// requested. See Resource names -// (https://cloud.google.com/apis/design/resource_names) for the appropriate -// value for this field. -func (r *ProjectsServiceAccountsService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsServiceAccountsTestIamPermissionsCall { - c := &ProjectsServiceAccountsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource - c.testiampermissionsrequest = testiampermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsServiceAccountsTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsServiceAccountsTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsServiceAccountsTestIamPermissionsCall) Context(ctx context.Context) *ProjectsServiceAccountsTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsServiceAccountsTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsServiceAccountsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testiampermissionsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "iam.projects.serviceAccounts.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "iam.projects.serviceAccounts.testIamPermissions" call. -// Any non-2xx status code is an error. Response headers are in either -// *TestIamPermissionsResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsServiceAccountsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &TestIamPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "iam.projects.serviceAccounts.testIamPermissions", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsServiceAccountsUndeleteCall struct { - s *Service - name string - undeleteserviceaccountrequest *UndeleteServiceAccountRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Undelete: Restores a deleted ServiceAccount. **Important:** It is not always -// possible to restore a deleted service account. Use this method only as a -// last resort. After you delete a service account, IAM permanently removes the -// service account 30 days later. There is no way to restore a deleted service -// account that has been permanently removed. -// -// - name: The resource name of the service account. Use one of the following -// formats: * `projects/{PROJECT_ID}/serviceAccounts/{EMAIL_ADDRESS}` * -// `projects/{PROJECT_ID}/serviceAccounts/{UNIQUE_ID}` As an alternative, you -// can use the `-` wildcard character instead of the project ID: * -// `projects/-/serviceAccounts/{EMAIL_ADDRESS}` * -// `projects/-/serviceAccounts/{UNIQUE_ID}` When possible, avoid using the -// `-` wildcard character, because it can cause response messages to contain -// misleading error codes. For example, if you try to access the service -// account `projects/-/serviceAccounts/fake@example.com`, which does not -// exist, the response contains an HTTP `403 Forbidden` error instead of a -// `404 Not Found` error. -func (r *ProjectsServiceAccountsService) Undelete(name string, undeleteserviceaccountrequest *UndeleteServiceAccountRequest) *ProjectsServiceAccountsUndeleteCall { - c := &ProjectsServiceAccountsUndeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.undeleteserviceaccountrequest = undeleteserviceaccountrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsServiceAccountsUndeleteCall) Fields(s ...googleapi.Field) *ProjectsServiceAccountsUndeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsServiceAccountsUndeleteCall) Context(ctx context.Context) *ProjectsServiceAccountsUndeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsServiceAccountsUndeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsServiceAccountsUndeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.undeleteserviceaccountrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:undelete") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "iam.projects.serviceAccounts.undelete", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "iam.projects.serviceAccounts.undelete" call. -// Any non-2xx status code is an error. Response headers are in either -// *UndeleteServiceAccountResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsServiceAccountsUndeleteCall) Do(opts ...googleapi.CallOption) (*UndeleteServiceAccountResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &UndeleteServiceAccountResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "iam.projects.serviceAccounts.undelete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsServiceAccountsUpdateCall struct { - s *Service - name string - serviceaccount *ServiceAccount - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Update: **Note:** We are in the process of deprecating this method. Use -// PatchServiceAccount instead. Updates a ServiceAccount. You can update only -// the `display_name` field. -// -// - name: The resource name of the service account. Use one of the following -// formats: * `projects/{PROJECT_ID}/serviceAccounts/{EMAIL_ADDRESS}` * -// `projects/{PROJECT_ID}/serviceAccounts/{UNIQUE_ID}` As an alternative, you -// can use the `-` wildcard character instead of the project ID: * -// `projects/-/serviceAccounts/{EMAIL_ADDRESS}` * -// `projects/-/serviceAccounts/{UNIQUE_ID}` When possible, avoid using the -// `-` wildcard character, because it can cause response messages to contain -// misleading error codes. For example, if you try to access the service -// account `projects/-/serviceAccounts/fake@example.com`, which does not -// exist, the response contains an HTTP `403 Forbidden` error instead of a -// `404 Not Found` error. -func (r *ProjectsServiceAccountsService) Update(name string, serviceaccount *ServiceAccount) *ProjectsServiceAccountsUpdateCall { - c := &ProjectsServiceAccountsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.serviceaccount = serviceaccount - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsServiceAccountsUpdateCall) Fields(s ...googleapi.Field) *ProjectsServiceAccountsUpdateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsServiceAccountsUpdateCall) Context(ctx context.Context) *ProjectsServiceAccountsUpdateCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsServiceAccountsUpdateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsServiceAccountsUpdateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.serviceaccount) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PUT", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "iam.projects.serviceAccounts.update", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "iam.projects.serviceAccounts.update" call. -// Any non-2xx status code is an error. Response headers are in either -// *ServiceAccount.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsServiceAccountsUpdateCall) Do(opts ...googleapi.CallOption) (*ServiceAccount, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &ServiceAccount{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "iam.projects.serviceAccounts.update", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsServiceAccountsKeysCreateCall struct { - s *Service - name string - createserviceaccountkeyrequest *CreateServiceAccountKeyRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Create: Creates a ServiceAccountKey. -// -// - name: The resource name of the service account. Use one of the following -// formats: * `projects/{PROJECT_ID}/serviceAccounts/{EMAIL_ADDRESS}` * -// `projects/{PROJECT_ID}/serviceAccounts/{UNIQUE_ID}` As an alternative, you -// can use the `-` wildcard character instead of the project ID: * -// `projects/-/serviceAccounts/{EMAIL_ADDRESS}` * -// `projects/-/serviceAccounts/{UNIQUE_ID}` When possible, avoid using the -// `-` wildcard character, because it can cause response messages to contain -// misleading error codes. For example, if you try to access the service -// account `projects/-/serviceAccounts/fake@example.com`, which does not -// exist, the response contains an HTTP `403 Forbidden` error instead of a -// `404 Not Found` error. -func (r *ProjectsServiceAccountsKeysService) Create(name string, createserviceaccountkeyrequest *CreateServiceAccountKeyRequest) *ProjectsServiceAccountsKeysCreateCall { - c := &ProjectsServiceAccountsKeysCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.createserviceaccountkeyrequest = createserviceaccountkeyrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsServiceAccountsKeysCreateCall) Fields(s ...googleapi.Field) *ProjectsServiceAccountsKeysCreateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsServiceAccountsKeysCreateCall) Context(ctx context.Context) *ProjectsServiceAccountsKeysCreateCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsServiceAccountsKeysCreateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsServiceAccountsKeysCreateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.createserviceaccountkeyrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/keys") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "iam.projects.serviceAccounts.keys.create", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "iam.projects.serviceAccounts.keys.create" call. -// Any non-2xx status code is an error. Response headers are in either -// *ServiceAccountKey.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified was -// returned. -func (c *ProjectsServiceAccountsKeysCreateCall) Do(opts ...googleapi.CallOption) (*ServiceAccountKey, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &ServiceAccountKey{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "iam.projects.serviceAccounts.keys.create", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsServiceAccountsKeysDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes a ServiceAccountKey. Deleting a service account key does not -// revoke short-lived credentials that have been issued based on the service -// account key. -// -// - name: The resource name of the service account key. Use one of the -// following formats: * -// `projects/{PROJECT_ID}/serviceAccounts/{EMAIL_ADDRESS}/keys/{KEY_ID}` * -// `projects/{PROJECT_ID}/serviceAccounts/{UNIQUE_ID}/keys/{KEY_ID}` As an -// alternative, you can use the `-` wildcard character instead of the project -// ID: * `projects/-/serviceAccounts/{EMAIL_ADDRESS}/keys/{KEY_ID}` * -// `projects/-/serviceAccounts/{UNIQUE_ID}/keys/{KEY_ID}` When possible, -// avoid using the `-` wildcard character, because it can cause response -// messages to contain misleading error codes. For example, if you try to -// access the service account key -// `projects/-/serviceAccounts/fake@example.com/keys/fake-key`, which does -// not exist, the response contains an HTTP `403 Forbidden` error instead of -// a `404 Not Found` error. -func (r *ProjectsServiceAccountsKeysService) Delete(name string) *ProjectsServiceAccountsKeysDeleteCall { - c := &ProjectsServiceAccountsKeysDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsServiceAccountsKeysDeleteCall) Fields(s ...googleapi.Field) *ProjectsServiceAccountsKeysDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsServiceAccountsKeysDeleteCall) Context(ctx context.Context) *ProjectsServiceAccountsKeysDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsServiceAccountsKeysDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsServiceAccountsKeysDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "iam.projects.serviceAccounts.keys.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "iam.projects.serviceAccounts.keys.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Empty.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsServiceAccountsKeysDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &Empty{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "iam.projects.serviceAccounts.keys.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsServiceAccountsKeysDisableCall struct { - s *Service - name string - disableserviceaccountkeyrequest *DisableServiceAccountKeyRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Disable: Disable a ServiceAccountKey. A disabled service account key can be -// re-enabled with EnableServiceAccountKey. -// -// - name: The resource name of the service account key. Use one of the -// following formats: * -// `projects/{PROJECT_ID}/serviceAccounts/{EMAIL_ADDRESS}/keys/{KEY_ID}` * -// `projects/{PROJECT_ID}/serviceAccounts/{UNIQUE_ID}/keys/{KEY_ID}` As an -// alternative, you can use the `-` wildcard character instead of the project -// ID: * `projects/-/serviceAccounts/{EMAIL_ADDRESS}/keys/{KEY_ID}` * -// `projects/-/serviceAccounts/{UNIQUE_ID}/keys/{KEY_ID}` When possible, -// avoid using the `-` wildcard character, because it can cause response -// messages to contain misleading error codes. For example, if you try to -// access the service account key -// `projects/-/serviceAccounts/fake@example.com/keys/fake-key`, which does -// not exist, the response contains an HTTP `403 Forbidden` error instead of -// a `404 Not Found` error. -func (r *ProjectsServiceAccountsKeysService) Disable(name string, disableserviceaccountkeyrequest *DisableServiceAccountKeyRequest) *ProjectsServiceAccountsKeysDisableCall { - c := &ProjectsServiceAccountsKeysDisableCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.disableserviceaccountkeyrequest = disableserviceaccountkeyrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsServiceAccountsKeysDisableCall) Fields(s ...googleapi.Field) *ProjectsServiceAccountsKeysDisableCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsServiceAccountsKeysDisableCall) Context(ctx context.Context) *ProjectsServiceAccountsKeysDisableCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsServiceAccountsKeysDisableCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsServiceAccountsKeysDisableCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.disableserviceaccountkeyrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:disable") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "iam.projects.serviceAccounts.keys.disable", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "iam.projects.serviceAccounts.keys.disable" call. -// Any non-2xx status code is an error. Response headers are in either -// *Empty.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsServiceAccountsKeysDisableCall) Do(opts ...googleapi.CallOption) (*Empty, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &Empty{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "iam.projects.serviceAccounts.keys.disable", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsServiceAccountsKeysEnableCall struct { - s *Service - name string - enableserviceaccountkeyrequest *EnableServiceAccountKeyRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Enable: Enable a ServiceAccountKey. -// -// - name: The resource name of the service account key. Use one of the -// following formats: * -// `projects/{PROJECT_ID}/serviceAccounts/{EMAIL_ADDRESS}/keys/{KEY_ID}` * -// `projects/{PROJECT_ID}/serviceAccounts/{UNIQUE_ID}/keys/{KEY_ID}` As an -// alternative, you can use the `-` wildcard character instead of the project -// ID: * `projects/-/serviceAccounts/{EMAIL_ADDRESS}/keys/{KEY_ID}` * -// `projects/-/serviceAccounts/{UNIQUE_ID}/keys/{KEY_ID}` When possible, -// avoid using the `-` wildcard character, because it can cause response -// messages to contain misleading error codes. For example, if you try to -// access the service account key -// `projects/-/serviceAccounts/fake@example.com/keys/fake-key`, which does -// not exist, the response contains an HTTP `403 Forbidden` error instead of -// a `404 Not Found` error. -func (r *ProjectsServiceAccountsKeysService) Enable(name string, enableserviceaccountkeyrequest *EnableServiceAccountKeyRequest) *ProjectsServiceAccountsKeysEnableCall { - c := &ProjectsServiceAccountsKeysEnableCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.enableserviceaccountkeyrequest = enableserviceaccountkeyrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsServiceAccountsKeysEnableCall) Fields(s ...googleapi.Field) *ProjectsServiceAccountsKeysEnableCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsServiceAccountsKeysEnableCall) Context(ctx context.Context) *ProjectsServiceAccountsKeysEnableCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsServiceAccountsKeysEnableCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsServiceAccountsKeysEnableCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.enableserviceaccountkeyrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:enable") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "iam.projects.serviceAccounts.keys.enable", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "iam.projects.serviceAccounts.keys.enable" call. -// Any non-2xx status code is an error. Response headers are in either -// *Empty.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsServiceAccountsKeysEnableCall) Do(opts ...googleapi.CallOption) (*Empty, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &Empty{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "iam.projects.serviceAccounts.keys.enable", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsServiceAccountsKeysGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Gets a ServiceAccountKey. -// -// - name: The resource name of the service account key. Use one of the -// following formats: * -// `projects/{PROJECT_ID}/serviceAccounts/{EMAIL_ADDRESS}/keys/{KEY_ID}` * -// `projects/{PROJECT_ID}/serviceAccounts/{UNIQUE_ID}/keys/{KEY_ID}` As an -// alternative, you can use the `-` wildcard character instead of the project -// ID: * `projects/-/serviceAccounts/{EMAIL_ADDRESS}/keys/{KEY_ID}` * -// `projects/-/serviceAccounts/{UNIQUE_ID}/keys/{KEY_ID}` When possible, -// avoid using the `-` wildcard character, because it can cause response -// messages to contain misleading error codes. For example, if you try to -// access the service account key -// `projects/-/serviceAccounts/fake@example.com/keys/fake-key`, which does -// not exist, the response contains an HTTP `403 Forbidden` error instead of -// a `404 Not Found` error. -func (r *ProjectsServiceAccountsKeysService) Get(name string) *ProjectsServiceAccountsKeysGetCall { - c := &ProjectsServiceAccountsKeysGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// PublicKeyType sets the optional parameter "publicKeyType": The output format -// of the public key. The default is `TYPE_NONE`, which means that the public -// key is not returned. -// -// Possible values: -// -// "TYPE_NONE" - Do not return the public key. -// "TYPE_X509_PEM_FILE" - X509 PEM format. -// "TYPE_RAW_PUBLIC_KEY" - Raw public key. -func (c *ProjectsServiceAccountsKeysGetCall) PublicKeyType(publicKeyType string) *ProjectsServiceAccountsKeysGetCall { - c.urlParams_.Set("publicKeyType", publicKeyType) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsServiceAccountsKeysGetCall) Fields(s ...googleapi.Field) *ProjectsServiceAccountsKeysGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *ProjectsServiceAccountsKeysGetCall) IfNoneMatch(entityTag string) *ProjectsServiceAccountsKeysGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsServiceAccountsKeysGetCall) Context(ctx context.Context) *ProjectsServiceAccountsKeysGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsServiceAccountsKeysGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsServiceAccountsKeysGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "iam.projects.serviceAccounts.keys.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "iam.projects.serviceAccounts.keys.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *ServiceAccountKey.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified was -// returned. -func (c *ProjectsServiceAccountsKeysGetCall) Do(opts ...googleapi.CallOption) (*ServiceAccountKey, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &ServiceAccountKey{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "iam.projects.serviceAccounts.keys.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsServiceAccountsKeysListCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Lists every ServiceAccountKey for a service account. -// -// - name: The resource name of the service account. Use one of the following -// formats: * `projects/{PROJECT_ID}/serviceAccounts/{EMAIL_ADDRESS}` * -// `projects/{PROJECT_ID}/serviceAccounts/{UNIQUE_ID}` As an alternative, you -// can use the `-` wildcard character instead of the project ID: * -// `projects/-/serviceAccounts/{EMAIL_ADDRESS}` * -// `projects/-/serviceAccounts/{UNIQUE_ID}` When possible, avoid using the -// `-` wildcard character, because it can cause response messages to contain -// misleading error codes. For example, if you try to access the service -// account `projects/-/serviceAccounts/fake@example.com`, which does not -// exist, the response contains an HTTP `403 Forbidden` error instead of a -// `404 Not Found` error. -func (r *ProjectsServiceAccountsKeysService) List(name string) *ProjectsServiceAccountsKeysListCall { - c := &ProjectsServiceAccountsKeysListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// KeyTypes sets the optional parameter "keyTypes": Filters the types of keys -// the user wants to include in the list response. Duplicate key types are not -// allowed. If no key type is provided, all keys are returned. -// -// Possible values: -// -// "KEY_TYPE_UNSPECIFIED" - Unspecified key type. The presence of this in the -// -// message will immediately result in an error. -// -// "USER_MANAGED" - User-managed keys (managed and rotated by the user). -// "SYSTEM_MANAGED" - System-managed keys (managed and rotated by Google). -func (c *ProjectsServiceAccountsKeysListCall) KeyTypes(keyTypes ...string) *ProjectsServiceAccountsKeysListCall { - c.urlParams_.SetMulti("keyTypes", append([]string{}, keyTypes...)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsServiceAccountsKeysListCall) Fields(s ...googleapi.Field) *ProjectsServiceAccountsKeysListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *ProjectsServiceAccountsKeysListCall) IfNoneMatch(entityTag string) *ProjectsServiceAccountsKeysListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsServiceAccountsKeysListCall) Context(ctx context.Context) *ProjectsServiceAccountsKeysListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsServiceAccountsKeysListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsServiceAccountsKeysListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/keys") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "iam.projects.serviceAccounts.keys.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "iam.projects.serviceAccounts.keys.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *ListServiceAccountKeysResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsServiceAccountsKeysListCall) Do(opts ...googleapi.CallOption) (*ListServiceAccountKeysResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &ListServiceAccountKeysResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "iam.projects.serviceAccounts.keys.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsServiceAccountsKeysUploadCall struct { - s *Service - name string - uploadserviceaccountkeyrequest *UploadServiceAccountKeyRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Upload: Uploads the public key portion of a key pair that you manage, and -// associates the public key with a ServiceAccount. After you upload the public -// key, you can use the private key from the key pair as a service account key. -// -// - name: The resource name of the service account key. Use one of the -// following formats: * -// `projects/{PROJECT_ID}/serviceAccounts/{EMAIL_ADDRESS}` * -// `projects/{PROJECT_ID}/serviceAccounts/{UNIQUE_ID}` As an alternative, you -// can use the `-` wildcard character instead of the project ID: * -// `projects/-/serviceAccounts/{EMAIL_ADDRESS}` * -// `projects/-/serviceAccounts/{UNIQUE_ID}` When possible, avoid using the -// `-` wildcard character, because it can cause response messages to contain -// misleading error codes. For example, if you try to access the service -// account `projects/-/serviceAccounts/fake@example.com`, which does not -// exist, the response contains an HTTP `403 Forbidden` error instead of a -// `404 Not Found` error. -func (r *ProjectsServiceAccountsKeysService) Upload(name string, uploadserviceaccountkeyrequest *UploadServiceAccountKeyRequest) *ProjectsServiceAccountsKeysUploadCall { - c := &ProjectsServiceAccountsKeysUploadCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.uploadserviceaccountkeyrequest = uploadserviceaccountkeyrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsServiceAccountsKeysUploadCall) Fields(s ...googleapi.Field) *ProjectsServiceAccountsKeysUploadCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsServiceAccountsKeysUploadCall) Context(ctx context.Context) *ProjectsServiceAccountsKeysUploadCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsServiceAccountsKeysUploadCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsServiceAccountsKeysUploadCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.uploadserviceaccountkeyrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/keys:upload") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "iam.projects.serviceAccounts.keys.upload", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "iam.projects.serviceAccounts.keys.upload" call. -// Any non-2xx status code is an error. Response headers are in either -// *ServiceAccountKey.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified was -// returned. -func (c *ProjectsServiceAccountsKeysUploadCall) Do(opts ...googleapi.CallOption) (*ServiceAccountKey, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &ServiceAccountKey{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "iam.projects.serviceAccounts.keys.upload", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RolesGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Gets the definition of a Role. -// -// - name: The `name` parameter's value depends on the target resource for the -// request, namely roles -// (https://cloud.google.com/iam/docs/reference/rest/v1/roles), projects -// (https://cloud.google.com/iam/docs/reference/rest/v1/projects.roles), or -// organizations -// (https://cloud.google.com/iam/docs/reference/rest/v1/organizations.roles). -// Each resource type's `name` value format is described below: * roles.get -// (https://cloud.google.com/iam/docs/reference/rest/v1/roles/get): -// `roles/{ROLE_NAME}`. This method returns results from all predefined roles -// (https://cloud.google.com/iam/docs/understanding-roles#predefined_roles) -// in IAM. Example request URL: -// `https://iam.googleapis.com/v1/roles/{ROLE_NAME}` * projects.roles.get -// (https://cloud.google.com/iam/docs/reference/rest/v1/projects.roles/get): -// `projects/{PROJECT_ID}/roles/{CUSTOM_ROLE_ID}`. This method returns only -// custom roles -// (https://cloud.google.com/iam/docs/understanding-custom-roles) that have -// been created at the project level. Example request URL: -// `https://iam.googleapis.com/v1/projects/{PROJECT_ID}/roles/{CUSTOM_ROLE_ID} -// ` * organizations.roles.get -// (https://cloud.google.com/iam/docs/reference/rest/v1/organizations.roles/get): -// `organizations/{ORGANIZATION_ID}/roles/{CUSTOM_ROLE_ID}`. This method -// returns only custom roles -// (https://cloud.google.com/iam/docs/understanding-custom-roles) that have -// been created at the organization level. Example request URL: -// `https://iam.googleapis.com/v1/organizations/{ORGANIZATION_ID}/roles/{CUSTO -// M_ROLE_ID}` Note: Wildcard (*) values are invalid; you must specify a -// complete project ID or organization ID. -func (r *RolesService) Get(name string) *RolesGetCall { - c := &RolesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RolesGetCall) Fields(s ...googleapi.Field) *RolesGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *RolesGetCall) IfNoneMatch(entityTag string) *RolesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RolesGetCall) Context(ctx context.Context) *RolesGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RolesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RolesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "iam.roles.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "iam.roles.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *Role.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RolesGetCall) Do(opts ...googleapi.CallOption) (*Role, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &Role{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "iam.roles.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RolesListCall struct { - s *Service - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Lists every predefined Role that IAM supports, or every custom role -// that is defined for an organization or project. -func (r *RolesService) List() *RolesListCall { - c := &RolesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - return c -} - -// PageSize sets the optional parameter "pageSize": Optional limit on the -// number of roles to include in the response. The default is 300, and the -// maximum is 1,000. -func (c *RolesListCall) PageSize(pageSize int64) *RolesListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": Optional pagination token -// returned in an earlier ListRolesResponse. -func (c *RolesListCall) PageToken(pageToken string) *RolesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Parent sets the optional parameter "parent": The `parent` parameter's value -// depends on the target resource for the request, namely roles -// (https://cloud.google.com/iam/docs/reference/rest/v1/roles), projects -// (https://cloud.google.com/iam/docs/reference/rest/v1/projects.roles), or -// organizations -// (https://cloud.google.com/iam/docs/reference/rest/v1/organizations.roles). -// Each resource type's `parent` value format is described below: * roles.list -// (https://cloud.google.com/iam/docs/reference/rest/v1/roles/list): An empty -// string. This method doesn't require a resource; it simply returns all -// predefined roles -// (https://cloud.google.com/iam/docs/understanding-roles#predefined_roles) in -// IAM. Example request URL: `https://iam.googleapis.com/v1/roles` * -// projects.roles.list -// (https://cloud.google.com/iam/docs/reference/rest/v1/projects.roles/list): -// `projects/{PROJECT_ID}`. This method lists all project-level custom roles -// (https://cloud.google.com/iam/docs/understanding-custom-roles). Example -// request URL: `https://iam.googleapis.com/v1/projects/{PROJECT_ID}/roles` * -// organizations.roles.list -// (https://cloud.google.com/iam/docs/reference/rest/v1/organizations.roles/list): -// `organizations/{ORGANIZATION_ID}`. This method lists all organization-level -// custom roles (https://cloud.google.com/iam/docs/understanding-custom-roles). -// Example request URL: -// `https://iam.googleapis.com/v1/organizations/{ORGANIZATION_ID}/roles` Note: -// Wildcard (*) values are invalid; you must specify a complete project ID or -// organization ID. -func (c *RolesListCall) Parent(parent string) *RolesListCall { - c.urlParams_.Set("parent", parent) - return c -} - -// ShowDeleted sets the optional parameter "showDeleted": Include Roles that -// have been deleted. -func (c *RolesListCall) ShowDeleted(showDeleted bool) *RolesListCall { - c.urlParams_.Set("showDeleted", fmt.Sprint(showDeleted)) - return c -} - -// View sets the optional parameter "view": Optional view for the returned Role -// objects. When `FULL` is specified, the `includedPermissions` field is -// returned, which includes a list of all permissions in the role. The default -// value is `BASIC`, which does not return the `includedPermissions` field. -// -// Possible values: -// -// "BASIC" - Omits the `included_permissions` field. This is the default -// -// value. -// -// "FULL" - Returns all fields. -func (c *RolesListCall) View(view string) *RolesListCall { - c.urlParams_.Set("view", view) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RolesListCall) Fields(s ...googleapi.Field) *RolesListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *RolesListCall) IfNoneMatch(entityTag string) *RolesListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RolesListCall) Context(ctx context.Context) *RolesListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RolesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RolesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/roles") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "iam.roles.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "iam.roles.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *ListRolesResponse.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified was -// returned. -func (c *RolesListCall) Do(opts ...googleapi.CallOption) (*ListRolesResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &ListRolesResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "iam.roles.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *RolesListCall) Pages(ctx context.Context, f func(*ListRolesResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -type RolesQueryGrantableRolesCall struct { - s *Service - querygrantablerolesrequest *QueryGrantableRolesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// QueryGrantableRoles: Lists roles that can be granted on a Google Cloud -// resource. A role is grantable if the IAM policy for the resource can contain -// bindings to the role. -func (r *RolesService) QueryGrantableRoles(querygrantablerolesrequest *QueryGrantableRolesRequest) *RolesQueryGrantableRolesCall { - c := &RolesQueryGrantableRolesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.querygrantablerolesrequest = querygrantablerolesrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RolesQueryGrantableRolesCall) Fields(s ...googleapi.Field) *RolesQueryGrantableRolesCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RolesQueryGrantableRolesCall) Context(ctx context.Context) *RolesQueryGrantableRolesCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RolesQueryGrantableRolesCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RolesQueryGrantableRolesCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.querygrantablerolesrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/roles:queryGrantableRoles") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "iam.roles.queryGrantableRoles", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "iam.roles.queryGrantableRoles" call. -// Any non-2xx status code is an error. Response headers are in either -// *QueryGrantableRolesResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *RolesQueryGrantableRolesCall) Do(opts ...googleapi.CallOption) (*QueryGrantableRolesResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &QueryGrantableRolesResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "iam.roles.queryGrantableRoles", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *RolesQueryGrantableRolesCall) Pages(ctx context.Context, f func(*QueryGrantableRolesResponse) error) error { - c.ctx_ = ctx - defer func(pt string) { c.querygrantablerolesrequest.PageToken = pt }(c.querygrantablerolesrequest.PageToken) - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.querygrantablerolesrequest.PageToken = x.NextPageToken - } -} diff --git a/vendor/google.golang.org/api/servicenetworking/v1/servicenetworking-api.json b/vendor/google.golang.org/api/servicenetworking/v1/servicenetworking-api.json deleted file mode 100644 index fa7ed39d39..0000000000 --- a/vendor/google.golang.org/api/servicenetworking/v1/servicenetworking-api.json +++ /dev/null @@ -1,4383 +0,0 @@ -{ - "auth": { - "oauth2": { - "scopes": { - "https://www.googleapis.com/auth/cloud-platform": { - "description": "See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account." - }, - "https://www.googleapis.com/auth/service.management": { - "description": "Manage your Google API service configuration" - } - } - } - }, - "basePath": "", - "baseUrl": "https://servicenetworking.googleapis.com/", - "batchPath": "batch", - "canonicalName": "Service Networking", - "description": "Provides automatic management of network configurations necessary for certain services.", - "discoveryVersion": "v1", - "documentationLink": "https://cloud.google.com/service-infrastructure/docs/service-networking/getting-started", - "fullyEncodeReservedExpansion": true, - "icons": { - "x16": "http://www.google.com/images/icons/product/search-16.gif", - "x32": "http://www.google.com/images/icons/product/search-32.gif" - }, - "id": "servicenetworking:v1", - "kind": "discovery#restDescription", - "mtlsRootUrl": "https://servicenetworking.mtls.googleapis.com/", - "name": "servicenetworking", - "ownerDomain": "google.com", - "ownerName": "Google", - "parameters": { - "$.xgafv": { - "description": "V1 error format.", - "enum": [ - "1", - "2" - ], - "enumDescriptions": [ - "v1 error format", - "v2 error format" - ], - "location": "query", - "type": "string" - }, - "access_token": { - "description": "OAuth access token.", - "location": "query", - "type": "string" - }, - "alt": { - "default": "json", - "description": "Data format for response.", - "enum": [ - "json", - "media", - "proto" - ], - "enumDescriptions": [ - "Responses with Content-Type of application/json", - "Media download with context-dependent Content-Type", - "Responses with Content-Type of application/x-protobuf" - ], - "location": "query", - "type": "string" - }, - "callback": { - "description": "JSONP", - "location": "query", - "type": "string" - }, - "fields": { - "description": "Selector specifying which fields to include in a partial response.", - "location": "query", - "type": "string" - }, - "key": { - "description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", - "location": "query", - "type": "string" - }, - "oauth_token": { - "description": "OAuth 2.0 token for the current user.", - "location": "query", - "type": "string" - }, - "prettyPrint": { - "default": "true", - "description": "Returns response with indentations and line breaks.", - "location": "query", - "type": "boolean" - }, - "quotaUser": { - "description": "Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.", - "location": "query", - "type": "string" - }, - "uploadType": { - "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", - "location": "query", - "type": "string" - }, - "upload_protocol": { - "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", - "location": "query", - "type": "string" - } - }, - "protocol": "rest", - "resources": { - "operations": { - "methods": { - "cancel": { - "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of `1`, corresponding to `Code.CANCELLED`.", - "flatPath": "v1/operations/{operationsId}:cancel", - "httpMethod": "POST", - "id": "servicenetworking.operations.cancel", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "The name of the operation resource to be cancelled.", - "location": "path", - "pattern": "^operations/.*$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+name}:cancel", - "request": { - "$ref": "CancelOperationRequest" - }, - "response": { - "$ref": "Empty" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/service.management" - ] - }, - "delete": { - "description": "Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.", - "flatPath": "v1/operations/{operationsId}", - "httpMethod": "DELETE", - "id": "servicenetworking.operations.delete", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "The name of the operation resource to be deleted.", - "location": "path", - "pattern": "^operations/.*$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+name}", - "response": { - "$ref": "Empty" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/service.management" - ] - }, - "get": { - "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", - "flatPath": "v1/operations/{operationsId}", - "httpMethod": "GET", - "id": "servicenetworking.operations.get", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "The name of the operation resource.", - "location": "path", - "pattern": "^operations/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+name}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/service.management" - ] - }, - "list": { - "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", - "flatPath": "v1/operations", - "httpMethod": "GET", - "id": "servicenetworking.operations.list", - "parameterOrder": [ - "name" - ], - "parameters": { - "filter": { - "description": "The standard list filter.", - "location": "query", - "type": "string" - }, - "name": { - "description": "The name of the operation's parent resource.", - "location": "path", - "pattern": "^operations$", - "required": true, - "type": "string" - }, - "pageSize": { - "description": "The standard list page size.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "pageToken": { - "description": "The standard list page token.", - "location": "query", - "type": "string" - }, - "returnPartialSuccess": { - "description": "When set to `true`, operations that are reachable are returned as normal, and those that are unreachable are returned in the ListOperationsResponse.unreachable field. This can only be `true` when reading across collections. For example, when `parent` is set to `\"projects/example/locations/-\"`. This field is not supported by default and will result in an `UNIMPLEMENTED` error if set unless explicitly documented otherwise in service or product specific documentation.", - "location": "query", - "type": "boolean" - } - }, - "path": "v1/{+name}", - "response": { - "$ref": "ListOperationsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/service.management" - ] - } - } - }, - "services": { - "methods": { - "addSubnetwork": { - "description": "For service producers, provisions a new subnet in a peered service's shared VPC network in the requested region and with the requested size that's expressed as a CIDR range (number of leading bits of ipV4 network mask). The method checks against the assigned allocated ranges to find a non-conflicting IP address range. The method will reuse a subnet if subsequent calls contain the same subnet name, region, and prefix length. This method will make producer's tenant project to be a shared VPC service project as needed.", - "flatPath": "v1/services/{servicesId}/{servicesId1}/{servicesId2}:addSubnetwork", - "httpMethod": "POST", - "id": "servicenetworking.services.addSubnetwork", - "parameterOrder": [ - "parent" - ], - "parameters": { - "parent": { - "description": "Required. A tenant project in the service producer organization, in the following format: services/{service}/{collection-id}/{resource-id}. {collection-id} is the cloud resource collection type that represents the tenant project. Only `projects` are supported. {resource-id} is the tenant project numeric id, such as `123456`. {service} the name of the peering service, such as `service-peering.example.com`. This service must already be enabled in the service consumer's project.", - "location": "path", - "pattern": "^services/[^/]+/[^/]+/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+parent}:addSubnetwork", - "request": { - "$ref": "AddSubnetworkRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/service.management" - ] - }, - "disableVpcServiceControls": { - "description": "Disables VPC service controls for a connection.", - "flatPath": "v1/services/{servicesId}:disableVpcServiceControls", - "httpMethod": "PATCH", - "id": "servicenetworking.services.disableVpcServiceControls", - "parameterOrder": [ - "parent" - ], - "parameters": { - "parent": { - "description": "Required. The service that is managing peering connectivity for a service producer's organization. For Google services that support this functionality, this value is `services/servicenetworking.googleapis.com`.", - "location": "path", - "pattern": "^services/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+parent}:disableVpcServiceControls", - "request": { - "$ref": "DisableVpcServiceControlsRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/service.management" - ] - }, - "enableVpcServiceControls": { - "description": "Enables VPC service controls for a connection.", - "flatPath": "v1/services/{servicesId}:enableVpcServiceControls", - "httpMethod": "PATCH", - "id": "servicenetworking.services.enableVpcServiceControls", - "parameterOrder": [ - "parent" - ], - "parameters": { - "parent": { - "description": "Required. The service that is managing peering connectivity for a service producer's organization. For Google services that support this functionality, this value is `services/servicenetworking.googleapis.com`.", - "location": "path", - "pattern": "^services/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+parent}:enableVpcServiceControls", - "request": { - "$ref": "EnableVpcServiceControlsRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/service.management" - ] - }, - "searchRange": { - "description": "Service producers can use this method to find a currently unused range within consumer allocated ranges. This returned range is not reserved, and not guaranteed to remain unused. It will validate previously provided allocated ranges, find non-conflicting sub-range of requested size (expressed in number of leading bits of ipv4 network mask, as in CIDR range notation).", - "flatPath": "v1/services/{servicesId}:searchRange", - "httpMethod": "POST", - "id": "servicenetworking.services.searchRange", - "parameterOrder": [ - "parent" - ], - "parameters": { - "parent": { - "description": "Required. This is in a form services/{service}. {service} the name of the private access management service, for example 'service-peering.example.com'.", - "location": "path", - "pattern": "^services/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+parent}:searchRange", - "request": { - "$ref": "SearchRangeRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/service.management" - ] - }, - "validate": { - "description": "Service producers use this method to validate if the consumer provided network, project and requested range are valid. This allows them to use a fail-fast mechanism for consumer requests, and not have to wait for AddSubnetwork operation completion to determine if user request is invalid.", - "flatPath": "v1/services/{servicesId}:validate", - "httpMethod": "POST", - "id": "servicenetworking.services.validate", - "parameterOrder": [ - "parent" - ], - "parameters": { - "parent": { - "description": "Required. This is in a form services/{service} where {service} is the name of the private access management service. For example 'service-peering.example.com'.", - "location": "path", - "pattern": "^services/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+parent}:validate", - "request": { - "$ref": "ValidateConsumerConfigRequest" - }, - "response": { - "$ref": "ValidateConsumerConfigResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/service.management" - ] - } - }, - "resources": { - "connections": { - "methods": { - "create": { - "description": "Creates a private connection that establishes a VPC Network Peering connection to a VPC network in the service producer's organization. The administrator of the service consumer's VPC network invokes this method. The administrator must assign one or more allocated IP ranges for provisioning subnetworks in the service producer's VPC network. This connection is used for all supported services in the service producer's organization, so it only needs to be invoked once.", - "flatPath": "v1/services/{servicesId}/connections", - "httpMethod": "POST", - "id": "servicenetworking.services.connections.create", - "parameterOrder": [ - "parent" - ], - "parameters": { - "parent": { - "description": "Required. The service that is managing peering connectivity for a service producer's organization. For Google services that support this functionality, this value is `services/servicenetworking.googleapis.com`.", - "location": "path", - "pattern": "^services/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+parent}/connections", - "request": { - "$ref": "Connection" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/service.management" - ] - }, - "deleteConnection": { - "description": "Deletes a private service access connection.", - "flatPath": "v1/services/{servicesId}/connections/{connectionsId}", - "httpMethod": "POST", - "id": "servicenetworking.services.connections.deleteConnection", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Required. The private service connection that connects to a service producer organization. The name includes both the private service name and the VPC network peering name in the format of `services/{peering_service_name}/connections/{vpc_peering_name}`. For Google services that support this functionality, this is `services/servicenetworking.googleapis.com/connections/servicenetworking-googleapis-com`.", - "location": "path", - "pattern": "^services/[^/]+/connections/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+name}", - "request": { - "$ref": "DeleteConnectionRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/service.management" - ] - }, - "list": { - "description": "List the private connections that are configured in a service consumer's VPC network.", - "flatPath": "v1/services/{servicesId}/connections", - "httpMethod": "GET", - "id": "servicenetworking.services.connections.list", - "parameterOrder": [ - "parent" - ], - "parameters": { - "network": { - "description": "Required. The name of service consumer's VPC network that's connected with service producer network through a private connection. The network name must be in the following format: `projects/{project}/global/networks/{network}`. {project} is a project number, such as in `12345` that includes the VPC service consumer's VPC network. {network} is the name of the service consumer's VPC network.", - "location": "query", - "type": "string" - }, - "parent": { - "description": "Required. The service that is managing peering connectivity for a service producer's organization. For Google services that support this functionality, this value is `services/servicenetworking.googleapis.com`. If you specify `services/-` as the parameter value, all configured peering services are listed.", - "location": "path", - "pattern": "^services/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+parent}/connections", - "response": { - "$ref": "ListConnectionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/service.management" - ] - }, - "patch": { - "description": "Updates the allocated ranges that are assigned to a connection.", - "flatPath": "v1/services/{servicesId}/connections/{connectionsId}", - "httpMethod": "PATCH", - "id": "servicenetworking.services.connections.patch", - "parameterOrder": [ - "name" - ], - "parameters": { - "force": { - "description": "If a previously defined allocated range is removed, force flag must be set to true.", - "location": "query", - "type": "boolean" - }, - "name": { - "description": "Required. The private service connection that connects to a service producer organization. The name includes both the private service name and the VPC network peering name in the format of `services/{peering_service_name}/connections/{vpc_peering_name}`. For Google services that support this functionality, this is `services/servicenetworking.googleapis.com/connections/servicenetworking-googleapis-com`.", - "location": "path", - "pattern": "^services/[^/]+/connections/[^/]+$", - "required": true, - "type": "string" - }, - "updateMask": { - "description": "The update mask. If this is omitted, it defaults to \"*\". You can only update the listed peering ranges.", - "format": "google-fieldmask", - "location": "query", - "type": "string" - } - }, - "path": "v1/{+name}", - "request": { - "$ref": "Connection" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/service.management" - ] - } - } - }, - "dnsRecordSets": { - "methods": { - "add": { - "description": "Service producers can use this method to add DNS record sets to private DNS zones in the shared producer host project.", - "flatPath": "v1/services/{servicesId}/dnsRecordSets:add", - "httpMethod": "POST", - "id": "servicenetworking.services.dnsRecordSets.add", - "parameterOrder": [ - "parent" - ], - "parameters": { - "parent": { - "description": "Required. The service that is managing peering connectivity for a service producer's organization. For Google services that support this functionality, this value is `services/servicenetworking.googleapis.com`.", - "location": "path", - "pattern": "^services/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+parent}/dnsRecordSets:add", - "request": { - "$ref": "AddDnsRecordSetRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/service.management" - ] - }, - "get": { - "description": "Producers can use this method to retrieve information about the DNS record set added to the private zone inside the shared tenant host project associated with a consumer network.", - "flatPath": "v1/services/{servicesId}/dnsRecordSets:get", - "httpMethod": "GET", - "id": "servicenetworking.services.dnsRecordSets.get", - "parameterOrder": [ - "parent" - ], - "parameters": { - "consumerNetwork": { - "description": "Required. The consumer network containing the record set. Must be in the form of projects/{project}/global/networks/{network}", - "location": "query", - "type": "string" - }, - "domain": { - "description": "Required. The domain name of the zone containing the recordset.", - "location": "query", - "type": "string" - }, - "parent": { - "description": "Required. Parent resource identifying the connection which owns this collection of DNS zones in the format services/{service}.", - "location": "path", - "pattern": "^services/[^/]+$", - "required": true, - "type": "string" - }, - "type": { - "description": "Required. RecordSet Type eg. type='A'. See the list of [Supported DNS Types](https://cloud.google.com/dns/records/json-record).", - "location": "query", - "type": "string" - }, - "zone": { - "description": "Required. The name of the zone containing the record set.", - "location": "query", - "type": "string" - } - }, - "path": "v1/{+parent}/dnsRecordSets:get", - "response": { - "$ref": "DnsRecordSet" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/service.management" - ] - }, - "list": { - "description": "Producers can use this method to retrieve a list of available DNS RecordSets available inside the private zone on the tenant host project accessible from their network.", - "flatPath": "v1/services/{servicesId}/dnsRecordSets:list", - "httpMethod": "GET", - "id": "servicenetworking.services.dnsRecordSets.list", - "parameterOrder": [ - "parent" - ], - "parameters": { - "consumerNetwork": { - "description": "Required. The network that the consumer is using to connect with services. Must be in the form of projects/{project}/global/networks/{network} {project} is the project number, as in '12345' {network} is the network name.", - "location": "query", - "type": "string" - }, - "parent": { - "description": "Required. The service that is managing peering connectivity for a service producer's organization. For Google services that support this functionality, this value is `services/servicenetworking.googleapis.com`.", - "location": "path", - "pattern": "^services/[^/]+$", - "required": true, - "type": "string" - }, - "zone": { - "description": "Required. The name of the private DNS zone in the shared producer host project from which the record set will be removed.", - "location": "query", - "type": "string" - } - }, - "path": "v1/{+parent}/dnsRecordSets:list", - "response": { - "$ref": "ListDnsRecordSetsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/service.management" - ] - }, - "remove": { - "description": "Service producers can use this method to remove DNS record sets from private DNS zones in the shared producer host project.", - "flatPath": "v1/services/{servicesId}/dnsRecordSets:remove", - "httpMethod": "POST", - "id": "servicenetworking.services.dnsRecordSets.remove", - "parameterOrder": [ - "parent" - ], - "parameters": { - "parent": { - "description": "Required. The service that is managing peering connectivity for a service producer's organization. For Google services that support this functionality, this value is `services/servicenetworking.googleapis.com`.", - "location": "path", - "pattern": "^services/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+parent}/dnsRecordSets:remove", - "request": { - "$ref": "RemoveDnsRecordSetRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/service.management" - ] - }, - "update": { - "description": "Service producers can use this method to update DNS record sets from private DNS zones in the shared producer host project.", - "flatPath": "v1/services/{servicesId}/dnsRecordSets:update", - "httpMethod": "POST", - "id": "servicenetworking.services.dnsRecordSets.update", - "parameterOrder": [ - "parent" - ], - "parameters": { - "parent": { - "description": "Required. The service that is managing peering connectivity for a service producer's organization. For Google services that support this functionality, this value is `services/servicenetworking.googleapis.com`.", - "location": "path", - "pattern": "^services/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+parent}/dnsRecordSets:update", - "request": { - "$ref": "UpdateDnsRecordSetRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/service.management" - ] - } - } - }, - "dnsZones": { - "methods": { - "add": { - "description": "Service producers can use this method to add private DNS zones in the shared producer host project and matching peering zones in the consumer project.", - "flatPath": "v1/services/{servicesId}/dnsZones:add", - "httpMethod": "POST", - "id": "servicenetworking.services.dnsZones.add", - "parameterOrder": [ - "parent" - ], - "parameters": { - "parent": { - "description": "Required. The service that is managing peering connectivity for a service producer's organization. For Google services that support this functionality, this value is `services/servicenetworking.googleapis.com`.", - "location": "path", - "pattern": "^services/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+parent}/dnsZones:add", - "request": { - "$ref": "AddDnsZoneRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/service.management" - ] - }, - "remove": { - "description": "Service producers can use this method to remove private DNS zones in the shared producer host project and matching peering zones in the consumer project.", - "flatPath": "v1/services/{servicesId}/dnsZones:remove", - "httpMethod": "POST", - "id": "servicenetworking.services.dnsZones.remove", - "parameterOrder": [ - "parent" - ], - "parameters": { - "parent": { - "description": "Required. The service that is managing peering connectivity for a service producer's organization. For Google services that support this functionality, this value is `services/servicenetworking.googleapis.com`.", - "location": "path", - "pattern": "^services/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+parent}/dnsZones:remove", - "request": { - "$ref": "RemoveDnsZoneRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/service.management" - ] - } - } - }, - "projects": { - "resources": { - "global": { - "resources": { - "networks": { - "methods": { - "get": { - "description": "Service producers use this method to get the configuration of their connection including the import/export of custom routes and subnetwork routes with public IP.", - "flatPath": "v1/services/{servicesId}/projects/{projectsId}/global/networks/{networksId}", - "httpMethod": "GET", - "id": "servicenetworking.services.projects.global.networks.get", - "parameterOrder": [ - "name" - ], - "parameters": { - "includeUsedIpRanges": { - "description": "Optional. When true, include the used IP ranges as part of the GetConsumerConfig output. This includes routes created inside the service networking network, consumer network, peers of the consumer network, and reserved ranges inside the service networking network. By default, this is false", - "location": "query", - "type": "boolean" - }, - "name": { - "description": "Required. Name of the consumer config to retrieve in the format: `services/{service}/projects/{project}/global/networks/{network}`. {service} is the peering service that is managing connectivity for the service producer's organization. For Google services that support this functionality, this value is `servicenetworking.googleapis.com`. {project} is a project number e.g. `12345` that contains the service consumer's VPC network. {network} is the name of the service consumer's VPC network.", - "location": "path", - "pattern": "^services/[^/]+/projects/[^/]+/global/networks/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+name}", - "response": { - "$ref": "ConsumerConfig" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/service.management" - ] - }, - "getVpcServiceControls": { - "description": "Consumers use this method to find out the state of VPC Service Controls. The controls could be enabled or disabled for a connection.", - "flatPath": "v1/services/{servicesId}/projects/{projectsId}/global/networks/{networksId}/vpcServiceControls", - "httpMethod": "GET", - "id": "servicenetworking.services.projects.global.networks.getVpcServiceControls", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Required. Name of the VPC Service Controls config to retrieve in the format: `services/{service}/projects/{project}/global/networks/{network}`. {service} is the peering service that is managing connectivity for the service producer's organization. For Google services that support this functionality, this value is `servicenetworking.googleapis.com`. {project} is a project number e.g. `12345` that contains the service consumer's VPC network. {network} is the name of the service consumer's VPC network.", - "location": "path", - "pattern": "^services/[^/]+/projects/[^/]+/global/networks/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+name}/vpcServiceControls", - "response": { - "$ref": "VpcServiceControls" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/service.management" - ] - }, - "updateConsumerConfig": { - "description": "Service producers use this method to update the configuration of their connection including the import/export of custom routes and subnetwork routes with public IP.", - "flatPath": "v1/services/{servicesId}/projects/{projectsId}/global/networks/{networksId}:updateConsumerConfig", - "httpMethod": "PATCH", - "id": "servicenetworking.services.projects.global.networks.updateConsumerConfig", - "parameterOrder": [ - "parent" - ], - "parameters": { - "parent": { - "description": "Required. Parent resource identifying the connection for which the consumer config is being updated in the format: `services/{service}/projects/{project}/global/networks/{network}` {service} is the peering service that is managing connectivity for the service producer's organization. For Google services that support this functionality, this value is `servicenetworking.googleapis.com`. {project} is the number of the project that contains the service consumer's VPC network e.g. `12345`. {network} is the name of the service consumer's VPC network.", - "location": "path", - "pattern": "^services/[^/]+/projects/[^/]+/global/networks/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+parent}:updateConsumerConfig", - "request": { - "$ref": "UpdateConsumerConfigRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/service.management" - ] - } - }, - "resources": { - "dnsZones": { - "methods": { - "get": { - "description": "Service producers can use this method to retrieve a DNS zone in the shared producer host project and the matching peering zones in consumer project", - "flatPath": "v1/services/{servicesId}/projects/{projectsId}/global/networks/{networksId}/dnsZones/{dnsZonesId}", - "httpMethod": "GET", - "id": "servicenetworking.services.projects.global.networks.dnsZones.get", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Required. The network that the consumer is using to connect with services. Must be in the form of services/{service}/projects/{project}/global/networks/{network}/dnsZones/{zoneName} Where {service} is the peering service that is managing connectivity for the service producer's organization. For Google services that support this {project} is the project number, as in '12345' {network} is the network name. {zoneName} is the DNS zone name", - "location": "path", - "pattern": "^services/[^/]+/projects/[^/]+/global/networks/[^/]+/dnsZones/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+name}", - "response": { - "$ref": "GetDnsZoneResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/service.management" - ] - }, - "list": { - "description": "* Service producers can use this method to retrieve a list of available DNS zones in the shared producer host project and the matching peering zones in the consumer project. *", - "flatPath": "v1/services/{servicesId}/projects/{projectsId}/global/networks/{networksId}/dnsZones:list", - "httpMethod": "GET", - "id": "servicenetworking.services.projects.global.networks.dnsZones.list", - "parameterOrder": [ - "parent" - ], - "parameters": { - "parent": { - "description": "Required. Parent resource identifying the connection which owns this collection of DNS zones in the format services/{service}/projects/{project}/global/networks/{network} Service: The service that is managing connectivity for the service producer's organization. For Google services that support this functionality, this value is `servicenetworking.googleapis.com`. Projects: the consumer project containing the consumer network. Network: The consumer network accessible from the tenant project.", - "location": "path", - "pattern": "^services/[^/]+/projects/[^/]+/global/networks/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+parent}/dnsZones:list", - "response": { - "$ref": "ListDnsZonesResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/service.management" - ] - } - } - }, - "peeredDnsDomains": { - "methods": { - "create": { - "description": "Creates a peered DNS domain which sends requests for records in given namespace originating in the service producer VPC network to the consumer VPC network to be resolved.", - "flatPath": "v1/services/{servicesId}/projects/{projectsId}/global/networks/{networksId}/peeredDnsDomains", - "httpMethod": "POST", - "id": "servicenetworking.services.projects.global.networks.peeredDnsDomains.create", - "parameterOrder": [ - "parent" - ], - "parameters": { - "parent": { - "description": "Required. Parent resource identifying the connection for which the peered DNS domain will be created in the format: `services/{service}/projects/{project}/global/networks/{network}` {service} is the peering service that is managing connectivity for the service producer's organization. For Google services that support this functionality, this value is `servicenetworking.googleapis.com`. {project} is the number of the project that contains the service consumer's VPC network e.g. `12345`. {network} is the name of the service consumer's VPC network.", - "location": "path", - "pattern": "^services/[^/]+/projects/[^/]+/global/networks/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+parent}/peeredDnsDomains", - "request": { - "$ref": "PeeredDnsDomain" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/service.management" - ] - }, - "delete": { - "description": "Deletes a peered DNS domain.", - "flatPath": "v1/services/{servicesId}/projects/{projectsId}/global/networks/{networksId}/peeredDnsDomains/{peeredDnsDomainsId}", - "httpMethod": "DELETE", - "id": "servicenetworking.services.projects.global.networks.peeredDnsDomains.delete", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Required. The name of the peered DNS domain to delete in the format: `services/{service}/projects/{project}/global/networks/{network}/peeredDnsDomains/{name}`. {service} is the peering service that is managing connectivity for the service producer's organization. For Google services that support this functionality, this value is `servicenetworking.googleapis.com`. {project} is the number of the project that contains the service consumer's VPC network e.g. `12345`. {network} is the name of the service consumer's VPC network. {name} is the name of the peered DNS domain.", - "location": "path", - "pattern": "^services/[^/]+/projects/[^/]+/global/networks/[^/]+/peeredDnsDomains/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+name}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/service.management" - ] - }, - "list": { - "description": "Lists peered DNS domains for a connection.", - "flatPath": "v1/services/{servicesId}/projects/{projectsId}/global/networks/{networksId}/peeredDnsDomains", - "httpMethod": "GET", - "id": "servicenetworking.services.projects.global.networks.peeredDnsDomains.list", - "parameterOrder": [ - "parent" - ], - "parameters": { - "parent": { - "description": "Required. Parent resource identifying the connection which owns this collection of peered DNS domains in the format: `services/{service}/projects/{project}/global/networks/{network}`. {service} is the peering service that is managing connectivity for the service producer's organization. For Google services that support this functionality, this value is `servicenetworking.googleapis.com`. {project} is a project number e.g. `12345` that contains the service consumer's VPC network. {network} is the name of the service consumer's VPC network.", - "location": "path", - "pattern": "^services/[^/]+/projects/[^/]+/global/networks/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+parent}/peeredDnsDomains", - "response": { - "$ref": "ListPeeredDnsDomainsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/service.management" - ] - } - } - } - } - } - } - } - } - }, - "roles": { - "methods": { - "add": { - "description": "Service producers can use this method to add roles in the shared VPC host project. Each role is bound to the provided member. Each role must be selected from within an allowlisted set of roles. Each role is applied at only the granularity specified in the allowlist.", - "flatPath": "v1/services/{servicesId}/roles:add", - "httpMethod": "POST", - "id": "servicenetworking.services.roles.add", - "parameterOrder": [ - "parent" - ], - "parameters": { - "parent": { - "description": "Required. This is in a form services/{service} where {service} is the name of the private access management service. For example 'service-peering.example.com'.", - "location": "path", - "pattern": "^services/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+parent}/roles:add", - "request": { - "$ref": "AddRolesRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/service.management" - ] - } - } - } - } - } - }, - "revision": "20260223", - "rootUrl": "https://servicenetworking.googleapis.com/", - "schemas": { - "AddDnsRecordSetMetadata": { - "description": "Metadata provided through GetOperation request for the LRO generated by AddDnsRecordSet API", - "id": "AddDnsRecordSetMetadata", - "properties": {}, - "type": "object" - }, - "AddDnsRecordSetRequest": { - "description": "Request to add a record set to a private managed DNS zone in the shared producer host project.", - "id": "AddDnsRecordSetRequest", - "properties": { - "consumerNetwork": { - "description": "Required. The network that the consumer is using to connect with services. Must be in the form of projects/{project}/global/networks/{network} {project} is the project number, as in '12345' {network} is the network name.", - "type": "string" - }, - "dnsRecordSet": { - "$ref": "DnsRecordSet", - "description": "Required. The DNS record set to add." - }, - "zone": { - "description": "Required. The name of the private DNS zone in the shared producer host project to which the record set will be added.", - "type": "string" - } - }, - "type": "object" - }, - "AddDnsZoneMetadata": { - "description": "Metadata provided through GetOperation request for the LRO generated by AddDnsZone API", - "id": "AddDnsZoneMetadata", - "properties": {}, - "type": "object" - }, - "AddDnsZoneRequest": { - "description": "Request to add a private managed DNS zone in the shared producer host project and a matching DNS peering zone in the consumer project.", - "id": "AddDnsZoneRequest", - "properties": { - "consumerNetwork": { - "description": "Required. The network that the consumer is using to connect with services. Must be in the form of projects/{project}/global/networks/{network} {project} is the project number, as in '12345' {network} is the network name.", - "type": "string" - }, - "dnsSuffix": { - "description": "Required. The DNS name suffix for the zones e.g. `example.com.`. Cloud DNS requires that a DNS suffix ends with a trailing dot.", - "type": "string" - }, - "name": { - "description": "Required. The name for both the private zone in the shared producer host project and the peering zone in the consumer project. Must be unique within both projects. The name must be 1-63 characters long, must begin with a letter, end with a letter or digit, and only contain lowercase letters, digits or dashes.", - "type": "string" - } - }, - "type": "object" - }, - "AddDnsZoneResponse": { - "description": "Represents managed DNS zones created in the shared producer host and consumer projects.", - "id": "AddDnsZoneResponse", - "properties": { - "consumerPeeringZone": { - "$ref": "DnsZone", - "description": "The DNS peering zone created in the consumer project." - }, - "producerPrivateZone": { - "$ref": "DnsZone", - "description": "The private DNS zone created in the shared producer host project." - } - }, - "type": "object" - }, - "AddRolesMetadata": { - "description": "Metadata provided through GetOperation request for the LRO generated by AddRoles API", - "id": "AddRolesMetadata", - "properties": {}, - "type": "object" - }, - "AddRolesRequest": { - "description": "Request for AddRoles to allow Service Producers to add roles in the shared VPC host project for them to use.", - "id": "AddRolesRequest", - "properties": { - "consumerNetwork": { - "description": "Required. The network that the consumer is using to connect with services. Must be in the form of projects/{project}/global/networks/{network} {project} is a project number, as in '12345' {network} is a network name.", - "type": "string" - }, - "policyBinding": { - "description": "Required. List of policy bindings to add to shared VPC host project.", - "items": { - "$ref": "PolicyBinding" - }, - "type": "array" - } - }, - "type": "object" - }, - "AddRolesResponse": { - "description": "Represents IAM roles added to the shared VPC host project.", - "id": "AddRolesResponse", - "properties": { - "policyBinding": { - "description": "Required. List of policy bindings that were added to the shared VPC host project.", - "items": { - "$ref": "PolicyBinding" - }, - "type": "array" - } - }, - "type": "object" - }, - "AddSubnetworkRequest": { - "description": "Request to create a subnetwork in a previously peered service network.", - "id": "AddSubnetworkRequest", - "properties": { - "allowSubnetCidrRoutesOverlap": { - "description": "Optional. Defines the allowSubnetCidrRoutesOverlap field of the subnet, e.g. Available in alpha and beta according to [Compute API documentation](https://cloud.google.com/compute/docs/reference/rest/beta/subnetworks/insert)", - "type": "boolean" - }, - "checkServiceNetworkingUsePermission": { - "description": "Optional. The IAM permission check determines whether the consumer project has 'servicenetworking.services.use' permission or not.", - "type": "boolean" - }, - "computeIdempotencyWindow": { - "description": "Optional. Specifies a custom time bucket for GCE subnetwork request idempotency. If two equivalent concurrent requests are made, GCE will know to ignore the request if it has already been completed or is in progress. Only requests with matching compute_idempotency_window have guaranteed idempotency. Changing this time window between requests results in undefined behavior. Zero (or empty) value with custom_compute_idempotency_window=true specifies no idempotency (i.e. no request ID is provided to GCE). Maximum value of 14 days (enforced by GCE limit).", - "format": "google-duration", - "type": "string" - }, - "consumer": { - "description": "Required. A resource that represents the service consumer, such as `projects/123456`. The project number can be different from the value in the consumer network parameter. For example, the network might be part of a Shared VPC network. In those cases, Service Networking validates that this resource belongs to that Shared VPC.", - "type": "string" - }, - "consumerNetwork": { - "description": "Required. The name of the service consumer's VPC network. The network must have an existing private connection that was provisioned through the connections.create method. The name must be in the following format: `projects/{project}/global/networks/{network}`, where {project} is a project number, such as `12345`. {network} is the name of a VPC network in the project.", - "type": "string" - }, - "description": { - "description": "Optional. Description of the subnet.", - "type": "string" - }, - "internalRange": { - "description": "Optional. The url of an Internal Range. Eg: `projects//locations/global/internalRanges/`. If specified, it means that the subnetwork cidr will be created using the combination of requested_address/ip_prefix_length. Note that the subnet cidr has to be within the cidr range of this Internal Range.", - "type": "string" - }, - "ipPrefixLength": { - "description": "Required. The prefix length of the subnet's IP address range. Use CIDR range notation, such as `29` to provision a subnet with an `x.x.x.x/29` CIDR range. The IP address range is drawn from a pool of available ranges in the service consumer's allocated range. GCE disallows subnets with prefix_length \u003e 29", - "format": "int32", - "type": "integer" - }, - "outsideAllocationPublicIpRange": { - "description": "Optional. Enable outside allocation using public IP addresses. Any public IP range may be specified. If this field is provided, we will not use customer reserved ranges for this primary IP range.", - "type": "string" - }, - "privateIpv6GoogleAccess": { - "description": "Optional. The private IPv6 google access type for the VMs in this subnet. For information about the access types that can be set using this field, see [subnetwork](https://cloud.google.com/compute/docs/reference/rest/v1/subnetworks) in the Compute API documentation.", - "type": "string" - }, - "purpose": { - "description": "Optional. Defines the purpose field of the subnet, e.g. 'PRIVATE_SERVICE_CONNECT'. For information about the purposes that can be set using this field, see [subnetwork](https://cloud.google.com/compute/docs/reference/rest/v1/subnetworks) in the Compute API documentation.", - "type": "string" - }, - "region": { - "description": "Required. The name of a [region](https://cloud.google.com/compute/docs/regions-zones) for the subnet, such `europe-west1`.", - "type": "string" - }, - "requestedAddress": { - "description": "Optional. The starting address of a range. The address must be a valid IPv4 address in the x.x.x.x format. This value combined with the IP prefix range is the CIDR range for the subnet. The range must be within the allocated range that is assigned to the private connection. If the CIDR range isn't available, the call fails.", - "type": "string" - }, - "requestedRanges": { - "description": "Optional. The name of one or more allocated IP address ranges associated with this private service access connection. If no range names are provided all ranges associated with this connection will be considered. If a CIDR range with the specified IP prefix length is not available within these ranges, the call fails.", - "items": { - "type": "string" - }, - "type": "array" - }, - "role": { - "description": "Optional. Defines the role field of the subnet, e.g. 'ACTIVE'. For information about the roles that can be set using this field, see [subnetwork](https://cloud.google.com/compute/docs/reference/rest/v1/subnetworks) in the Compute API documentation.", - "type": "string" - }, - "secondaryIpRangeSpecs": { - "description": "Optional. A list of secondary IP ranges to be created within the new subnetwork.", - "items": { - "$ref": "SecondaryIpRangeSpec" - }, - "type": "array" - }, - "skipRequestedAddressValidation": { - "description": "Optional. Skips validating if the requested_address is in use by SN VPC’s peering group. Compute Engine will still perform this check and fail the request if the requested_address is in use. Note that Compute Engine does not check for the existence of dynamic routes when performing this check. Caller of this API should make sure that there are no dynamic routes overlapping with the requested_address/prefix_length IP address range otherwise the created subnet could cause misrouting.", - "type": "boolean" - }, - "subnetwork": { - "description": "Required. A name for the new subnet. For information about the naming requirements, see [subnetwork](https://cloud.google.com/compute/docs/reference/rest/v1/subnetworks) in the Compute API documentation.", - "type": "string" - }, - "subnetworkUsers": { - "description": "A list of members that are granted the `roles/servicenetworking.subnetworkAdmin` role on the subnet.", - "items": { - "type": "string" - }, - "type": "array" - }, - "useCustomComputeIdempotencyWindow": { - "description": "Optional. Specifies if Service Networking should use a custom time bucket for GCE idempotency. If false, Service Networking uses a 300 second (5 minute) GCE idempotency window. If true, Service Networking uses a custom idempotency window provided by the user in field compute_idempotency_window.", - "type": "boolean" - } - }, - "type": "object" - }, - "Api": { - "description": "Api is a light-weight descriptor for an API Interface. Interfaces are also described as \"protocol buffer services\" in some contexts, such as by the \"service\" keyword in a .proto file, but they are different from API Services, which represent a concrete implementation of an interface as opposed to simply a description of methods and bindings. They are also sometimes simply referred to as \"APIs\" in other contexts, such as the name of this message itself. See https://cloud.google.com/apis/design/glossary for detailed terminology. New usages of this message as an alternative to ServiceDescriptorProto are strongly discouraged. This message does not reliability preserve all information necessary to model the schema and preserve semantics. Instead make use of FileDescriptorSet which preserves the necessary information.", - "id": "Api", - "properties": { - "edition": { - "description": "The source edition string, only valid when syntax is SYNTAX_EDITIONS.", - "type": "string" - }, - "methods": { - "description": "The methods of this interface, in unspecified order.", - "items": { - "$ref": "Method" - }, - "type": "array" - }, - "mixins": { - "description": "Included interfaces. See Mixin.", - "items": { - "$ref": "Mixin" - }, - "type": "array" - }, - "name": { - "description": "The fully qualified name of this interface, including package name followed by the interface's simple name.", - "type": "string" - }, - "options": { - "description": "Any metadata attached to the interface.", - "items": { - "$ref": "Option" - }, - "type": "array" - }, - "sourceContext": { - "$ref": "SourceContext", - "description": "Source context for the protocol buffer service represented by this message." - }, - "syntax": { - "description": "The source syntax of the service.", - "enum": [ - "SYNTAX_PROTO2", - "SYNTAX_PROTO3", - "SYNTAX_EDITIONS" - ], - "enumDescriptions": [ - "Syntax `proto2`.", - "Syntax `proto3`.", - "Syntax `editions`." - ], - "type": "string" - }, - "version": { - "description": "A version string for this interface. If specified, must have the form `major-version.minor-version`, as in `1.10`. If the minor version is omitted, it defaults to zero. If the entire version field is empty, the major version is derived from the package name, as outlined below. If the field is not empty, the version in the package name will be verified to be consistent with what is provided here. The versioning schema uses [semantic versioning](http://semver.org) where the major version number indicates a breaking change and the minor version an additive, non-breaking change. Both version numbers are signals to users what to expect from different versions, and should be carefully chosen based on the product plan. The major version is also reflected in the package name of the interface, which must end in `v`, as in `google.feature.v1`. For major versions 0 and 1, the suffix can be omitted. Zero major versions must only be used for experimental, non-GA interfaces. ", - "type": "string" - } - }, - "type": "object" - }, - "Aspect": { - "description": "Aspect represents Generic aspect. It is used to configure an aspect without making direct changes to service.proto", - "id": "Aspect", - "properties": { - "kind": { - "description": "The type of this aspect configuration.", - "type": "string" - }, - "rules": { - "description": "Optional. Rules of the Configuration.", - "items": { - "$ref": "AspectRule" - }, - "type": "array" - }, - "spec": { - "additionalProperties": { - "description": "Properties of the object.", - "type": "any" - }, - "description": "Content of the configuration. The underlying schema should be defined by Aspect owners as protobuf message under `google/api/configaspects/proto`.", - "type": "object" - } - }, - "type": "object" - }, - "AspectRule": { - "description": "Rule-based configuration for an aspect.", - "id": "AspectRule", - "properties": { - "config": { - "additionalProperties": { - "description": "Properties of the object.", - "type": "any" - }, - "description": "Required. Rules of the configuration. The underlying schema should be defined by Aspect owners as protobuf message under `google/api/configaspects/proto`.", - "type": "object" - }, - "selector": { - "description": "Required. Selects the RPC methods to which this rule applies. Refer to selector for syntax details.", - "type": "string" - } - }, - "type": "object" - }, - "AuthProvider": { - "description": "Configuration for an authentication provider, including support for [JSON Web Token (JWT)](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32).", - "id": "AuthProvider", - "properties": { - "audiences": { - "description": "The list of JWT [audiences](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.3). that are allowed to access. A JWT containing any of these audiences will be accepted. When this setting is absent, JWTs with audiences: - \"https://[service.name]/[google.protobuf.Api.name]\" - \"https://[service.name]/\" will be accepted. For example, if no audiences are in the setting, LibraryService API will accept JWTs with the following audiences: - https://library-example.googleapis.com/google.example.library.v1.LibraryService - https://library-example.googleapis.com/ Example: audiences: bookstore_android.apps.googleusercontent.com, bookstore_web.apps.googleusercontent.com", - "type": "string" - }, - "authorizationUrl": { - "description": "Redirect URL if JWT token is required but not present or is expired. Implement authorizationUrl of securityDefinitions in OpenAPI spec.", - "type": "string" - }, - "id": { - "description": "The unique identifier of the auth provider. It will be referred to by `AuthRequirement.provider_id`. Example: \"bookstore_auth\".", - "type": "string" - }, - "issuer": { - "description": "Identifies the principal that issued the JWT. See https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.1 Usually a URL or an email address. Example: https://securetoken.google.com Example: 1234567-compute@developer.gserviceaccount.com", - "type": "string" - }, - "jwksUri": { - "description": "URL of the provider's public key set to validate signature of the JWT. See [OpenID Discovery](https://openid.net/specs/openid-connect-discovery-1_0.html#ProviderMetadata). Optional if the key set document: - can be retrieved from [OpenID Discovery](https://openid.net/specs/openid-connect-discovery-1_0.html) of the issuer. - can be inferred from the email domain of the issuer (e.g. a Google service account). Example: https://www.googleapis.com/oauth2/v1/certs", - "type": "string" - }, - "jwtLocations": { - "description": "Defines the locations to extract the JWT. For now it is only used by the Cloud Endpoints to store the OpenAPI extension [x-google-jwt-locations] (https://cloud.google.com/endpoints/docs/openapi/openapi-extensions#x-google-jwt-locations) JWT locations can be one of HTTP headers, URL query parameters or cookies. The rule is that the first match wins. If not specified, default to use following 3 locations: 1) Authorization: Bearer 2) x-goog-iap-jwt-assertion 3) access_token query parameter Default locations can be specified as followings: jwt_locations: - header: Authorization value_prefix: \"Bearer \" - header: x-goog-iap-jwt-assertion - query: access_token", - "items": { - "$ref": "JwtLocation" - }, - "type": "array" - } - }, - "type": "object" - }, - "AuthRequirement": { - "description": "User-defined authentication requirements, including support for [JSON Web Token (JWT)](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32).", - "id": "AuthRequirement", - "properties": { - "audiences": { - "description": "NOTE: This will be deprecated soon, once AuthProvider.audiences is implemented and accepted in all the runtime components. The list of JWT [audiences](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.3). that are allowed to access. A JWT containing any of these audiences will be accepted. When this setting is absent, only JWTs with audience \"https://Service_name/API_name\" will be accepted. For example, if no audiences are in the setting, LibraryService API will only accept JWTs with the following audience \"https://library-example.googleapis.com/google.example.library.v1.LibraryService\". Example: audiences: bookstore_android.apps.googleusercontent.com, bookstore_web.apps.googleusercontent.com", - "type": "string" - }, - "providerId": { - "description": "id from authentication provider. Example: provider_id: bookstore_auth", - "type": "string" - } - }, - "type": "object" - }, - "Authentication": { - "description": "`Authentication` defines the authentication configuration for API methods provided by an API service. Example: name: calendar.googleapis.com authentication: providers: - id: google_calendar_auth jwks_uri: https://www.googleapis.com/oauth2/v1/certs issuer: https://securetoken.google.com rules: - selector: \"*\" requirements: provider_id: google_calendar_auth - selector: google.calendar.Delegate oauth: canonical_scopes: https://www.googleapis.com/auth/calendar.read", - "id": "Authentication", - "properties": { - "providers": { - "description": "Defines a set of authentication providers that a service supports.", - "items": { - "$ref": "AuthProvider" - }, - "type": "array" - }, - "rules": { - "description": "A list of authentication rules that apply to individual API methods. **NOTE:** All service configuration rules follow \"last one wins\" order.", - "items": { - "$ref": "AuthenticationRule" - }, - "type": "array" - } - }, - "type": "object" - }, - "AuthenticationRule": { - "description": "Authentication rules for the service. By default, if a method has any authentication requirements, every request must include a valid credential matching one of the requirements. It's an error to include more than one kind of credential in a single request. If a method doesn't have any auth requirements, request credentials will be ignored.", - "id": "AuthenticationRule", - "properties": { - "allowWithoutCredential": { - "description": "If true, the service accepts API keys without any other credential. This flag only applies to HTTP and gRPC requests.", - "type": "boolean" - }, - "oauth": { - "$ref": "OAuthRequirements", - "description": "The requirements for OAuth credentials." - }, - "requirements": { - "description": "Requirements for additional authentication providers.", - "items": { - "$ref": "AuthRequirement" - }, - "type": "array" - }, - "selector": { - "description": "Selects the methods to which this rule applies. Refer to selector for syntax details.", - "type": "string" - } - }, - "type": "object" - }, - "Backend": { - "description": "`Backend` defines the backend configuration for a service.", - "id": "Backend", - "properties": { - "rules": { - "description": "A list of API backend rules that apply to individual API methods. **NOTE:** All service configuration rules follow \"last one wins\" order.", - "items": { - "$ref": "BackendRule" - }, - "type": "array" - } - }, - "type": "object" - }, - "BackendRule": { - "description": "A backend rule provides configuration for an individual API element.", - "id": "BackendRule", - "properties": { - "address": { - "description": "The address of the API backend. The scheme is used to determine the backend protocol and security. The following schemes are accepted: SCHEME PROTOCOL SECURITY http:// HTTP None https:// HTTP TLS grpc:// gRPC None grpcs:// gRPC TLS It is recommended to explicitly include a scheme. Leaving out the scheme may cause constrasting behaviors across platforms. If the port is unspecified, the default is: - 80 for schemes without TLS - 443 for schemes with TLS For HTTP backends, use protocol to specify the protocol version.", - "type": "string" - }, - "deadline": { - "description": "The number of seconds to wait for a response from a request. The default varies based on the request protocol and deployment environment.", - "format": "double", - "type": "number" - }, - "disableAuth": { - "description": "When disable_auth is true, a JWT ID token won't be generated and the original \"Authorization\" HTTP header will be preserved. If the header is used to carry the original token and is expected by the backend, this field must be set to true to preserve the header.", - "type": "boolean" - }, - "jwtAudience": { - "description": "The JWT audience is used when generating a JWT ID token for the backend. This ID token will be added in the HTTP \"authorization\" header, and sent to the backend.", - "type": "string" - }, - "loadBalancingPolicy": { - "description": "The load balancing policy used for connection to the application backend. Defined as an arbitrary string to accomondate custom load balancing policies supported by the underlying channel, but suggest most users use one of the standard policies, such as the default, \"RoundRobin\".", - "type": "string" - }, - "minDeadline": { - "deprecated": true, - "description": "Deprecated, do not use.", - "format": "double", - "type": "number" - }, - "operationDeadline": { - "description": "The number of seconds to wait for the completion of a long running operation. The default is no deadline.", - "format": "double", - "type": "number" - }, - "overridesByRequestProtocol": { - "additionalProperties": { - "$ref": "BackendRule" - }, - "description": "The map between request protocol and the backend address.", - "type": "object" - }, - "pathTranslation": { - "description": "no-lint", - "enum": [ - "PATH_TRANSLATION_UNSPECIFIED", - "CONSTANT_ADDRESS", - "APPEND_PATH_TO_ADDRESS" - ], - "enumDescriptions": [ - "", - "Use the backend address as-is, with no modification to the path. If the URL pattern contains variables, the variable names and values will be appended to the query string. If a query string parameter and a URL pattern variable have the same name, this may result in duplicate keys in the query string. # Examples Given the following operation config: Method path: /api/company/{cid}/user/{uid} Backend address: https://example.cloudfunctions.net/getUser Requests to the following request paths will call the backend at the translated path: Request path: /api/company/widgetworks/user/johndoe Translated: https://example.cloudfunctions.net/getUser?cid=widgetworks\u0026uid=johndoe Request path: /api/company/widgetworks/user/johndoe?timezone=EST Translated: https://example.cloudfunctions.net/getUser?timezone=EST\u0026cid=widgetworks\u0026uid=johndoe", - "The request path will be appended to the backend address. # Examples Given the following operation config: Method path: /api/company/{cid}/user/{uid} Backend address: https://example.appspot.com Requests to the following request paths will call the backend at the translated path: Request path: /api/company/widgetworks/user/johndoe Translated: https://example.appspot.com/api/company/widgetworks/user/johndoe Request path: /api/company/widgetworks/user/johndoe?timezone=EST Translated: https://example.appspot.com/api/company/widgetworks/user/johndoe?timezone=EST" - ], - "type": "string" - }, - "protocol": { - "description": "The protocol used for sending a request to the backend. The supported values are \"http/1.1\" and \"h2\". The default value is inferred from the scheme in the address field: SCHEME PROTOCOL http:// http/1.1 https:// http/1.1 grpc:// h2 grpcs:// h2 For secure HTTP backends (https://) that support HTTP/2, set this field to \"h2\" for improved performance. Configuring this field to non-default values is only supported for secure HTTP backends. This field will be ignored for all other backends. See https://www.iana.org/assignments/tls-extensiontype-values/tls-extensiontype-values.xhtml#alpn-protocol-ids for more details on the supported values.", - "type": "string" - }, - "selector": { - "description": "Selects the methods to which this rule applies. Refer to selector for syntax details.", - "type": "string" - } - }, - "type": "object" - }, - "BatchingConfigProto": { - "description": "`BatchingConfigProto` defines the batching configuration for an API method.", - "id": "BatchingConfigProto", - "properties": { - "batchDescriptor": { - "$ref": "BatchingDescriptorProto", - "description": "The request and response fields used in batching." - }, - "thresholds": { - "$ref": "BatchingSettingsProto", - "description": "The thresholds which trigger a batched request to be sent." - } - }, - "type": "object" - }, - "BatchingDescriptorProto": { - "description": "`BatchingDescriptorProto` specifies the fields of the request message to be used for batching, and, optionally, the fields of the response message to be used for demultiplexing.", - "id": "BatchingDescriptorProto", - "properties": { - "batchedField": { - "description": "The repeated field in the request message to be aggregated by batching.", - "type": "string" - }, - "discriminatorFields": { - "description": "A list of the fields in the request message. Two requests will be batched together only if the values of every field specified in `request_discriminator_fields` is equal between the two requests.", - "items": { - "type": "string" - }, - "type": "array" - }, - "subresponseField": { - "description": "Optional. When present, indicates the field in the response message to be used to demultiplex the response into multiple response messages, in correspondence with the multiple request messages originally batched together.", - "type": "string" - } - }, - "type": "object" - }, - "BatchingSettingsProto": { - "description": "`BatchingSettingsProto` specifies a set of batching thresholds, each of which acts as a trigger to send a batch of messages as a request. At least one threshold must be positive nonzero.", - "id": "BatchingSettingsProto", - "properties": { - "delayThreshold": { - "description": "The duration after which a batch should be sent, starting from the addition of the first message to that batch.", - "format": "google-duration", - "type": "string" - }, - "elementCountLimit": { - "description": "The maximum number of elements collected in a batch that could be accepted by server.", - "format": "int32", - "type": "integer" - }, - "elementCountThreshold": { - "description": "The number of elements of a field collected into a batch which, if exceeded, causes the batch to be sent.", - "format": "int32", - "type": "integer" - }, - "flowControlByteLimit": { - "description": "The maximum size of data allowed by flow control.", - "format": "int32", - "type": "integer" - }, - "flowControlElementLimit": { - "description": "The maximum number of elements allowed by flow control.", - "format": "int32", - "type": "integer" - }, - "flowControlLimitExceededBehavior": { - "description": "The behavior to take when the flow control limit is exceeded.", - "enum": [ - "UNSET_BEHAVIOR", - "THROW_EXCEPTION", - "BLOCK", - "IGNORE" - ], - "enumDescriptions": [ - "Default behavior, system-defined.", - "Stop operation, raise error.", - "Pause operation until limit clears.", - "Continue operation, disregard limit." - ], - "type": "string" - }, - "requestByteLimit": { - "description": "The maximum size of the request that could be accepted by server.", - "format": "int32", - "type": "integer" - }, - "requestByteThreshold": { - "description": "The aggregated size of the batched field which, if exceeded, causes the batch to be sent. This size is computed by aggregating the sizes of the request field to be batched, not of the entire request message.", - "format": "int64", - "type": "string" - } - }, - "type": "object" - }, - "Billing": { - "description": "Billing related configuration of the service. The following example shows how to configure monitored resources and metrics for billing, `consumer_destinations` is the only supported destination and the monitored resources need at least one label key `cloud.googleapis.com/location` to indicate the location of the billing usage, using different monitored resources between monitoring and billing is recommended so they can be evolved independently: monitored_resources: - type: library.googleapis.com/billing_branch labels: - key: cloud.googleapis.com/location description: | Predefined label to support billing location restriction. - key: city description: | Custom label to define the city where the library branch is located in. - key: name description: Custom label to define the name of the library branch. metrics: - name: library.googleapis.com/book/borrowed_count metric_kind: DELTA value_type: INT64 unit: \"1\" billing: consumer_destinations: - monitored_resource: library.googleapis.com/billing_branch metrics: - library.googleapis.com/book/borrowed_count", - "id": "Billing", - "properties": { - "consumerDestinations": { - "description": "Billing configurations for sending metrics to the consumer project. There can be multiple consumer destinations per service, each one must have a different monitored resource type. A metric can be used in at most one consumer destination.", - "items": { - "$ref": "BillingDestination" - }, - "type": "array" - } - }, - "type": "object" - }, - "BillingDestination": { - "description": "Configuration of a specific billing destination (Currently only support bill against consumer project).", - "id": "BillingDestination", - "properties": { - "metrics": { - "description": "Names of the metrics to report to this billing destination. Each name must be defined in Service.metrics section.", - "items": { - "type": "string" - }, - "type": "array" - }, - "monitoredResource": { - "description": "The monitored resource type. The type must be defined in Service.monitored_resources section.", - "type": "string" - } - }, - "type": "object" - }, - "CancelOperationRequest": { - "description": "The request message for Operations.CancelOperation.", - "id": "CancelOperationRequest", - "properties": {}, - "type": "object" - }, - "CleanupConnectionMetadata": { - "description": "Metadata provided through GetOperation request for the LRO generated by Cleanup Connection API", - "id": "CleanupConnectionMetadata", - "properties": {}, - "type": "object" - }, - "ClientLibrarySettings": { - "description": "Details about how and where to publish client libraries.", - "id": "ClientLibrarySettings", - "properties": { - "cppSettings": { - "$ref": "CppSettings", - "description": "Settings for C++ client libraries." - }, - "dotnetSettings": { - "$ref": "DotnetSettings", - "description": "Settings for .NET client libraries." - }, - "goSettings": { - "$ref": "GoSettings", - "description": "Settings for Go client libraries." - }, - "javaSettings": { - "$ref": "JavaSettings", - "description": "Settings for legacy Java features, supported in the Service YAML." - }, - "launchStage": { - "description": "Launch stage of this version of the API.", - "enum": [ - "LAUNCH_STAGE_UNSPECIFIED", - "UNIMPLEMENTED", - "PRELAUNCH", - "EARLY_ACCESS", - "ALPHA", - "BETA", - "GA", - "DEPRECATED" - ], - "enumDescriptions": [ - "Do not use this default value.", - "The feature is not yet implemented. Users can not use it.", - "Prelaunch features are hidden from users and are only visible internally.", - "Early Access features are limited to a closed group of testers. To use these features, you must sign up in advance and sign a Trusted Tester agreement (which includes confidentiality provisions). These features may be unstable, changed in backward-incompatible ways, and are not guaranteed to be released.", - "Alpha is a limited availability test for releases before they are cleared for widespread use. By Alpha, all significant design issues are resolved and we are in the process of verifying functionality. Alpha customers need to apply for access, agree to applicable terms, and have their projects allowlisted. Alpha releases don't have to be feature complete, no SLAs are provided, and there are no technical support obligations, but they will be far enough along that customers can actually use them in test environments or for limited-use tests -- just like they would in normal production cases.", - "Beta is the point at which we are ready to open a release for any customer to use. There are no SLA or technical support obligations in a Beta release. Products will be complete from a feature perspective, but may have some open outstanding issues. Beta releases are suitable for limited production use cases.", - "GA features are open to all developers and are considered stable and fully qualified for production use.", - "Deprecated features are scheduled to be shut down and removed. For more information, see the \"Deprecation Policy\" section of our [Terms of Service](https://cloud.google.com/terms/) and the [Google Cloud Platform Subject to the Deprecation Policy](https://cloud.google.com/terms/deprecation) documentation." - ], - "type": "string" - }, - "nodeSettings": { - "$ref": "NodeSettings", - "description": "Settings for Node client libraries." - }, - "phpSettings": { - "$ref": "PhpSettings", - "description": "Settings for PHP client libraries." - }, - "pythonSettings": { - "$ref": "PythonSettings", - "description": "Settings for Python client libraries." - }, - "restNumericEnums": { - "description": "When using transport=rest, the client request will encode enums as numbers rather than strings.", - "type": "boolean" - }, - "rubySettings": { - "$ref": "RubySettings", - "description": "Settings for Ruby client libraries." - }, - "version": { - "description": "Version of the API to apply these settings to. This is the full protobuf package for the API, ending in the version element. Examples: \"google.cloud.speech.v1\" and \"google.spanner.admin.database.v1\".", - "type": "string" - } - }, - "type": "object" - }, - "CloudSQLConfig": { - "description": "Cloud SQL configuration.", - "id": "CloudSQLConfig", - "properties": { - "service": { - "description": "Required. Peering service used for peering with the Cloud SQL project.", - "type": "string" - }, - "umbrellaNetwork": { - "description": "Required. The name of the umbrella network in the Cloud SQL umbrella project.", - "type": "string" - }, - "umbrellaProject": { - "description": "Required. The project number of the Cloud SQL umbrella project.", - "format": "int64", - "type": "string" - } - }, - "type": "object" - }, - "CommonLanguageSettings": { - "description": "Required information for every language.", - "id": "CommonLanguageSettings", - "properties": { - "destinations": { - "description": "The destination where API teams want this client library to be published.", - "items": { - "enum": [ - "CLIENT_LIBRARY_DESTINATION_UNSPECIFIED", - "GITHUB", - "PACKAGE_MANAGER" - ], - "enumDescriptions": [ - "Client libraries will neither be generated nor published to package managers.", - "Generate the client library in a repo under github.com/googleapis, but don't publish it to package managers.", - "Publish the library to package managers like nuget.org and npmjs.com." - ], - "type": "string" - }, - "type": "array" - }, - "referenceDocsUri": { - "deprecated": true, - "description": "Link to automatically generated reference documentation. Example: https://cloud.google.com/nodejs/docs/reference/asset/latest", - "type": "string" - }, - "selectiveGapicGeneration": { - "$ref": "SelectiveGapicGeneration", - "description": "Configuration for which RPCs should be generated in the GAPIC client." - } - }, - "type": "object" - }, - "Connection": { - "description": "Represents a private connection resource. A private connection is implemented as a VPC Network Peering connection between a service producer's VPC network and a service consumer's VPC network.", - "id": "Connection", - "properties": { - "network": { - "description": "Required. The name of service consumer's VPC network that's connected with service producer network, in the following format: `projects/{project}/global/networks/{network}`. `{project}` is a project number, such as in `12345` that includes the VPC service consumer's VPC network. `{network}` is the name of the service consumer's VPC network.", - "type": "string" - }, - "peering": { - "description": "Output only. The name of the VPC Network Peering connection that was created by the service producer.", - "readOnly": true, - "type": "string" - }, - "reservedPeeringRanges": { - "description": "The name of one or more allocated IP address ranges for this service producer of type `PEERING`. Note that invoking CreateConnection method with a different range when connection is already established will not modify already provisioned service producer subnetworks. If CreateConnection method is invoked repeatedly to reconnect when peering connection had been disconnected on the consumer side, leaving this field empty will restore previously allocated IP ranges.", - "items": { - "type": "string" - }, - "type": "array" - }, - "service": { - "description": "Output only. The name of the peering service that's associated with this connection, in the following format: `services/{service name}`.", - "readOnly": true, - "type": "string" - } - }, - "type": "object" - }, - "ConsumerConfig": { - "description": "Configuration information for a private service access connection.", - "id": "ConsumerConfig", - "properties": { - "cloudsqlConfigs": { - "description": "Represents one or multiple Cloud SQL configurations.", - "items": { - "$ref": "CloudSQLConfig" - }, - "type": "array" - }, - "consumerExportCustomRoutes": { - "description": "Export custom routes flag value for peering from consumer to producer.", - "type": "boolean" - }, - "consumerExportSubnetRoutesWithPublicIp": { - "description": "Export subnet routes with public ip flag value for peering from consumer to producer.", - "type": "boolean" - }, - "consumerImportCustomRoutes": { - "description": "Import custom routes flag value for peering from consumer to producer.", - "type": "boolean" - }, - "consumerImportSubnetRoutesWithPublicIp": { - "description": "Import subnet routes with public ip flag value for peering from consumer to producer.", - "type": "boolean" - }, - "consumerPeeringActive": { - "description": "Output only. If this is true, consumer peering is active.", - "readOnly": true, - "type": "boolean" - }, - "producerExportCustomRoutes": { - "description": "Export custom routes flag value for peering from producer to consumer.", - "type": "boolean" - }, - "producerExportSubnetRoutesWithPublicIp": { - "description": "Export subnet routes with public ip flag value for peering from producer to consumer.", - "type": "boolean" - }, - "producerImportCustomRoutes": { - "description": "Import custom routes flag value for peering from producer to consumer.", - "type": "boolean" - }, - "producerImportSubnetRoutesWithPublicIp": { - "description": "Import subnet routes with public ip flag value for peering from producer to consumer.", - "type": "boolean" - }, - "producerNetwork": { - "description": "Output only. The VPC host network that is used to host managed service instances. In the format, projects/{project}/global/networks/{network} where {project} is the project number e.g. '12345' and {network} is the network name.", - "readOnly": true, - "type": "string" - }, - "reservedRanges": { - "description": "Output only. The reserved ranges associated with this private service access connection.", - "items": { - "$ref": "GoogleCloudServicenetworkingV1ConsumerConfigReservedRange" - }, - "readOnly": true, - "type": "array" - }, - "usedIpRanges": { - "description": "Output only. The IP ranges already in use by consumer or producer", - "items": { - "type": "string" - }, - "readOnly": true, - "type": "array" - }, - "vpcScReferenceArchitectureEnabled": { - "description": "Output only. Indicates whether the VPC Service Controls reference architecture is configured for the producer VPC host network.", - "readOnly": true, - "type": "boolean" - } - }, - "type": "object" - }, - "ConsumerConfigMetadata": { - "description": "Metadata provided through GetOperation request for the LRO generated by UpdateConsumerConfig API.", - "id": "ConsumerConfigMetadata", - "properties": {}, - "type": "object" - }, - "ConsumerProject": { - "description": "Represents a consumer project.", - "id": "ConsumerProject", - "properties": { - "projectNum": { - "description": "Required. Project number of the consumer that is launching the service instance. It can own the network that is peered with Google or, be a service project in an XPN where the host project has the network.", - "format": "int64", - "type": "string" - } - }, - "type": "object" - }, - "Context": { - "description": "`Context` defines which contexts an API requests. Example: context: rules: - selector: \"*\" requested: - google.rpc.context.ProjectContext - google.rpc.context.OriginContext The above specifies that all methods in the API request `google.rpc.context.ProjectContext` and `google.rpc.context.OriginContext`. Available context types are defined in package `google.rpc.context`. This also provides mechanism to allowlist any protobuf message extension that can be sent in grpc metadata using “x-goog-ext--bin” and “x-goog-ext--jspb” format. For example, list any service specific protobuf types that can appear in grpc metadata as follows in your yaml file: Example: context: rules: - selector: \"google.example.library.v1.LibraryService.CreateBook\" allowed_request_extensions: - google.foo.v1.NewExtension allowed_response_extensions: - google.foo.v1.NewExtension You can also specify extension ID instead of fully qualified extension name here.", - "id": "Context", - "properties": { - "rules": { - "description": "A list of RPC context rules that apply to individual API methods. **NOTE:** All service configuration rules follow \"last one wins\" order.", - "items": { - "$ref": "ContextRule" - }, - "type": "array" - } - }, - "type": "object" - }, - "ContextRule": { - "description": "A context rule provides information about the context for an individual API element.", - "id": "ContextRule", - "properties": { - "allowedRequestExtensions": { - "description": "A list of full type names or extension IDs of extensions allowed in grpc side channel from client to backend.", - "items": { - "type": "string" - }, - "type": "array" - }, - "allowedResponseExtensions": { - "description": "A list of full type names or extension IDs of extensions allowed in grpc side channel from backend to client.", - "items": { - "type": "string" - }, - "type": "array" - }, - "provided": { - "description": "A list of full type names of provided contexts. It is used to support propagating HTTP headers and ETags from the response extension.", - "items": { - "type": "string" - }, - "type": "array" - }, - "requested": { - "description": "A list of full type names of requested contexts, only the requested context will be made available to the backend.", - "items": { - "type": "string" - }, - "type": "array" - }, - "selector": { - "description": "Selects the methods to which this rule applies. Refer to selector for syntax details.", - "type": "string" - } - }, - "type": "object" - }, - "Control": { - "description": "Selects and configures the service controller used by the service. Example: control: environment: servicecontrol.googleapis.com", - "id": "Control", - "properties": { - "environment": { - "description": "The service controller environment to use. If empty, no control plane features (like quota and billing) will be enabled. The recommended value for most services is servicecontrol.googleapis.com.", - "type": "string" - }, - "methodPolicies": { - "description": "Defines policies applying to the API methods of the service.", - "items": { - "$ref": "MethodPolicy" - }, - "type": "array" - } - }, - "type": "object" - }, - "CppSettings": { - "description": "Settings for C++ client libraries.", - "id": "CppSettings", - "properties": { - "common": { - "$ref": "CommonLanguageSettings", - "description": "Some settings." - } - }, - "type": "object" - }, - "CustomError": { - "description": "Customize service error responses. For example, list any service specific protobuf types that can appear in error detail lists of error responses. Example: custom_error: types: - google.foo.v1.CustomError - google.foo.v1.AnotherError", - "id": "CustomError", - "properties": { - "rules": { - "description": "The list of custom error rules that apply to individual API messages. **NOTE:** All service configuration rules follow \"last one wins\" order.", - "items": { - "$ref": "CustomErrorRule" - }, - "type": "array" - }, - "types": { - "description": "The list of custom error detail types, e.g. 'google.foo.v1.CustomError'.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "CustomErrorRule": { - "description": "A custom error rule.", - "id": "CustomErrorRule", - "properties": { - "isErrorType": { - "description": "Mark this message as possible payload in error response. Otherwise, objects of this type will be filtered when they appear in error payload.", - "type": "boolean" - }, - "selector": { - "description": "Selects messages to which this rule applies. Refer to selector for syntax details.", - "type": "string" - } - }, - "type": "object" - }, - "CustomHttpPattern": { - "description": "A custom pattern is used for defining custom HTTP verb.", - "id": "CustomHttpPattern", - "properties": { - "kind": { - "description": "The name of this custom HTTP verb.", - "type": "string" - }, - "path": { - "description": "The path matched by this custom verb.", - "type": "string" - } - }, - "type": "object" - }, - "DeleteConnectionMetadata": { - "description": "Metadata provided through GetOperation request for the LRO generated by Delete Connection API", - "id": "DeleteConnectionMetadata", - "properties": {}, - "type": "object" - }, - "DeleteConnectionRequest": { - "description": "Request to delete a private service access connection. The call will fail if there are any managed service instances using this connection.", - "id": "DeleteConnectionRequest", - "properties": { - "consumerNetwork": { - "description": "Required. The network that the consumer is using to connect with services. Must be in the form of projects/{project}/global/networks/{network} {project} is a project number, as in '12345' {network} is a network name.", - "type": "string" - } - }, - "type": "object" - }, - "DeletePeeredDnsDomainMetadata": { - "description": "Metadata provided through GetOperation request for the LRO generated by DeletePeeredDnsDomain API.", - "id": "DeletePeeredDnsDomainMetadata", - "properties": {}, - "type": "object" - }, - "DisableVpcServiceControlsRequest": { - "description": "Request to disable VPC service controls.", - "id": "DisableVpcServiceControlsRequest", - "properties": { - "consumerNetwork": { - "description": "Required. The network that the consumer is using to connect with services. Must be in the form of projects/{project}/global/networks/{network} {project} is a project number, as in '12345' {network} is network name.", - "type": "string" - } - }, - "type": "object" - }, - "DnsRecordSet": { - "description": "Represents a DNS record set resource.", - "id": "DnsRecordSet", - "properties": { - "data": { - "description": "Required. As defined in RFC 1035 (section 5) and RFC 1034 (section 3.6.1) for examples see https://cloud.google.com/dns/records/json-record.", - "items": { - "type": "string" - }, - "type": "array" - }, - "domain": { - "description": "Required. The DNS or domain name of the record set, e.g. `test.example.com`. Cloud DNS requires that a DNS suffix ends with a trailing dot.", - "type": "string" - }, - "ttl": { - "description": "Required. The period of time for which this RecordSet can be cached by resolvers.", - "format": "google-duration", - "type": "string" - }, - "type": { - "description": "Required. The identifier of a supported record type.", - "type": "string" - } - }, - "type": "object" - }, - "DnsZone": { - "description": "Represents a DNS zone resource.", - "id": "DnsZone", - "properties": { - "dnsSuffix": { - "description": "The DNS name suffix of this zone e.g. `example.com.`. Cloud DNS requires that a DNS suffix ends with a trailing dot.", - "type": "string" - }, - "name": { - "description": "User assigned name for this resource. Must be unique within the project. The name must be 1-63 characters long, must begin with a letter, end with a letter or digit, and only contain lowercase letters, digits or dashes.", - "type": "string" - } - }, - "type": "object" - }, - "DnsZonePair": { - "description": "* Represents a pair of private and peering DNS zone resources. *", - "id": "DnsZonePair", - "properties": { - "consumerPeeringZone": { - "$ref": "DnsZone", - "description": "The DNS peering zone in the consumer project." - }, - "producerPrivateZone": { - "$ref": "DnsZone", - "description": "The private DNS zone in the shared producer host project." - } - }, - "type": "object" - }, - "Documentation": { - "description": "`Documentation` provides the information for describing a service. Example: documentation: summary: \u003e The Google Calendar API gives access to most calendar features. pages: - name: Overview content: (== include google/foo/overview.md ==) - name: Tutorial content: (== include google/foo/tutorial.md ==) subpages: - name: Java content: (== include google/foo/tutorial_java.md ==) rules: - selector: google.calendar.Calendar.Get description: \u003e ... - selector: google.calendar.Calendar.Put description: \u003e ... Documentation is provided in markdown syntax. In addition to standard markdown features, definition lists, tables and fenced code blocks are supported. Section headers can be provided and are interpreted relative to the section nesting of the context where a documentation fragment is embedded. Documentation from the IDL is merged with documentation defined via the config at normalization time, where documentation provided by config rules overrides IDL provided. A number of constructs specific to the API platform are supported in documentation text. In order to reference a proto element, the following notation can be used: [fully.qualified.proto.name][] To override the display text used for the link, this can be used: [display text][fully.qualified.proto.name] Text can be excluded from doc using the following notation: (-- internal comment --) A few directives are available in documentation. Note that directives must appear on a single line to be properly identified. The `include` directive includes a markdown file from an external source: (== include path/to/file ==) The `resource_for` directive marks a message to be the resource of a collection in REST view. If it is not specified, tools attempt to infer the resource from the operations in a collection: (== resource_for v1.shelves.books ==) The directive `suppress_warning` does not directly affect documentation and is documented together with service config validation.", - "id": "Documentation", - "properties": { - "additionalIamInfo": { - "description": "Optional information about the IAM configuration. This is typically used to link to documentation about a product's IAM roles and permissions.", - "type": "string" - }, - "documentationRootUrl": { - "description": "The URL to the root of documentation.", - "type": "string" - }, - "overview": { - "description": "Declares a single overview page. For example: documentation: summary: ... overview: (== include overview.md ==) This is a shortcut for the following declaration (using pages style): documentation: summary: ... pages: - name: Overview content: (== include overview.md ==) Note: you cannot specify both `overview` field and `pages` field.", - "type": "string" - }, - "pages": { - "description": "The top level pages for the documentation set.", - "items": { - "$ref": "Page" - }, - "type": "array" - }, - "rules": { - "description": "A list of documentation rules that apply to individual API elements. **NOTE:** All service configuration rules follow \"last one wins\" order.", - "items": { - "$ref": "DocumentationRule" - }, - "type": "array" - }, - "sectionOverrides": { - "description": "Specifies section and content to override the boilerplate content. Currently overrides following sections: 1. rest.service.client_libraries", - "items": { - "$ref": "Page" - }, - "type": "array" - }, - "serviceRootUrl": { - "description": "Specifies the service root url if the default one (the service name from the yaml file) is not suitable. This can be seen in any fully specified service urls as well as sections that show a base that other urls are relative to.", - "type": "string" - }, - "summary": { - "description": "A short description of what the service does. The summary must be plain text. It becomes the overview of the service displayed in Google Cloud Console. NOTE: This field is equivalent to the standard field `description`.", - "type": "string" - } - }, - "type": "object" - }, - "DocumentationRule": { - "description": "A documentation rule provides information about individual API elements.", - "id": "DocumentationRule", - "properties": { - "deprecationDescription": { - "description": "Deprecation description of the selected element(s). It can be provided if an element is marked as `deprecated`.", - "type": "string" - }, - "description": { - "description": "Description of the selected proto element (e.g. a message, a method, a 'service' definition, or a field). Defaults to leading \u0026 trailing comments taken from the proto source definition of the proto element.", - "type": "string" - }, - "disableReplacementWords": { - "description": "String of comma or space separated case-sensitive words for which method/field name replacement will be disabled.", - "type": "string" - }, - "selector": { - "description": "The selector is a comma-separated list of patterns for any element such as a method, a field, an enum value. Each pattern is a qualified name of the element which may end in \"*\", indicating a wildcard. Wildcards are only allowed at the end and for a whole component of the qualified name, i.e. \"foo.*\" is ok, but not \"foo.b*\" or \"foo.*.bar\". A wildcard will match one or more components. To specify a default for all applicable elements, the whole pattern \"*\" is used.", - "type": "string" - } - }, - "type": "object" - }, - "DotnetSettings": { - "description": "Settings for Dotnet client libraries.", - "id": "DotnetSettings", - "properties": { - "common": { - "$ref": "CommonLanguageSettings", - "description": "Some settings." - }, - "forcedNamespaceAliases": { - "description": "Namespaces which must be aliased in snippets due to a known (but non-generator-predictable) naming collision", - "items": { - "type": "string" - }, - "type": "array" - }, - "handwrittenSignatures": { - "description": "Method signatures (in the form \"service.method(signature)\") which are provided separately, so shouldn't be generated. Snippets *calling* these methods are still generated, however.", - "items": { - "type": "string" - }, - "type": "array" - }, - "ignoredResources": { - "description": "List of full resource types to ignore during generation. This is typically used for API-specific Location resources, which should be handled by the generator as if they were actually the common Location resources. Example entry: \"documentai.googleapis.com/Location\"", - "items": { - "type": "string" - }, - "type": "array" - }, - "renamedResources": { - "additionalProperties": { - "type": "string" - }, - "description": "Map from full resource types to the effective short name for the resource. This is used when otherwise resource named from different services would cause naming collisions. Example entry: \"datalabeling.googleapis.com/Dataset\": \"DataLabelingDataset\"", - "type": "object" - }, - "renamedServices": { - "additionalProperties": { - "type": "string" - }, - "description": "Map from original service names to renamed versions. This is used when the default generated types would cause a naming conflict. (Neither name is fully-qualified.) Example: Subscriber to SubscriberServiceApi.", - "type": "object" - } - }, - "type": "object" - }, - "Empty": { - "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }", - "id": "Empty", - "properties": {}, - "type": "object" - }, - "EnableVpcServiceControlsRequest": { - "description": "Request to enable VPC service controls.", - "id": "EnableVpcServiceControlsRequest", - "properties": { - "consumerNetwork": { - "description": "Required. The network that the consumer is using to connect with services. Must be in the form of projects/{project}/global/networks/{network} {project} is a project number, as in '12345' {network} is network name.", - "type": "string" - } - }, - "type": "object" - }, - "Endpoint": { - "description": "`Endpoint` describes a network address of a service that serves a set of APIs. It is commonly known as a service endpoint. A service may expose any number of service endpoints, and all service endpoints share the same service definition, such as quota limits and monitoring metrics. Example: type: google.api.Service name: library-example.googleapis.com endpoints: # Declares network address `https://library-example.googleapis.com` # for service `library-example.googleapis.com`. The `https` scheme # is implicit for all service endpoints. Other schemes may be # supported in the future. - name: library-example.googleapis.com allow_cors: false - name: content-staging-library-example.googleapis.com # Allows HTTP OPTIONS calls to be passed to the API frontend, for it # to decide whether the subsequent cross-origin request is allowed # to proceed. allow_cors: true", - "id": "Endpoint", - "properties": { - "aliases": { - "description": "Aliases for this endpoint, these will be served by the same UrlMap as the parent endpoint, and will be provisioned in the GCP stack for the Regional Endpoints.", - "items": { - "type": "string" - }, - "type": "array" - }, - "allowCors": { - "description": "Allowing [CORS](https://en.wikipedia.org/wiki/Cross-origin_resource_sharing), aka cross-domain traffic, would allow the backends served from this endpoint to receive and respond to HTTP OPTIONS requests. The response will be used by the browser to determine whether the subsequent cross-origin request is allowed to proceed.", - "type": "boolean" - }, - "name": { - "description": "The canonical name of this endpoint.", - "type": "string" - }, - "target": { - "description": "The specification of an Internet routable address of API frontend that will handle requests to this [API Endpoint](https://cloud.google.com/apis/design/glossary). It should be either a valid IPv4 address or a fully-qualified domain name. For example, \"8.8.8.8\" or \"myservice.appspot.com\".", - "type": "string" - } - }, - "type": "object" - }, - "Enum": { - "description": "Enum type definition. New usages of this message as an alternative to EnumDescriptorProto are strongly discouraged. This message does not reliability preserve all information necessary to model the schema and preserve semantics. Instead make use of FileDescriptorSet which preserves the necessary information.", - "id": "Enum", - "properties": { - "edition": { - "description": "The source edition string, only valid when syntax is SYNTAX_EDITIONS.", - "type": "string" - }, - "enumvalue": { - "description": "Enum value definitions.", - "items": { - "$ref": "EnumValue" - }, - "type": "array" - }, - "name": { - "description": "Enum type name.", - "type": "string" - }, - "options": { - "description": "Protocol buffer options.", - "items": { - "$ref": "Option" - }, - "type": "array" - }, - "sourceContext": { - "$ref": "SourceContext", - "description": "The source context." - }, - "syntax": { - "description": "The source syntax.", - "enum": [ - "SYNTAX_PROTO2", - "SYNTAX_PROTO3", - "SYNTAX_EDITIONS" - ], - "enumDescriptions": [ - "Syntax `proto2`.", - "Syntax `proto3`.", - "Syntax `editions`." - ], - "type": "string" - } - }, - "type": "object" - }, - "EnumValue": { - "description": "Enum value definition. New usages of this message as an alternative to EnumValueDescriptorProto are strongly discouraged. This message does not reliability preserve all information necessary to model the schema and preserve semantics. Instead make use of FileDescriptorSet which preserves the necessary information.", - "id": "EnumValue", - "properties": { - "name": { - "description": "Enum value name.", - "type": "string" - }, - "number": { - "description": "Enum value number.", - "format": "int32", - "type": "integer" - }, - "options": { - "description": "Protocol buffer options.", - "items": { - "$ref": "Option" - }, - "type": "array" - } - }, - "type": "object" - }, - "ExperimentalFeatures": { - "description": "Experimental features to be included during client library generation. These fields will be deprecated once the feature graduates and is enabled by default.", - "id": "ExperimentalFeatures", - "properties": { - "protobufPythonicTypesEnabled": { - "description": "Enables generation of protobuf code using new types that are more Pythonic which are included in `protobuf\u003e=5.29.x`. This feature will be enabled by default 1 month after launching the feature in preview packages.", - "type": "boolean" - }, - "restAsyncIoEnabled": { - "description": "Enables generation of asynchronous REST clients if `rest` transport is enabled. By default, asynchronous REST clients will not be generated. This feature will be enabled by default 1 month after launching the feature in preview packages.", - "type": "boolean" - }, - "unversionedPackageDisabled": { - "description": "Disables generation of an unversioned Python package for this client library. This means that the module names will need to be versioned in import statements. For example `import google.cloud.library_v2` instead of `import google.cloud.library`.", - "type": "boolean" - } - }, - "type": "object" - }, - "Field": { - "description": "A single field of a message type. New usages of this message as an alternative to FieldDescriptorProto are strongly discouraged. This message does not reliability preserve all information necessary to model the schema and preserve semantics. Instead make use of FileDescriptorSet which preserves the necessary information.", - "id": "Field", - "properties": { - "cardinality": { - "description": "The field cardinality.", - "enum": [ - "CARDINALITY_UNKNOWN", - "CARDINALITY_OPTIONAL", - "CARDINALITY_REQUIRED", - "CARDINALITY_REPEATED" - ], - "enumDescriptions": [ - "For fields with unknown cardinality.", - "For optional fields.", - "For required fields. Proto2 syntax only.", - "For repeated fields." - ], - "type": "string" - }, - "defaultValue": { - "description": "The string value of the default value of this field. Proto2 syntax only.", - "type": "string" - }, - "jsonName": { - "description": "The field JSON name.", - "type": "string" - }, - "kind": { - "description": "The field type.", - "enum": [ - "TYPE_UNKNOWN", - "TYPE_DOUBLE", - "TYPE_FLOAT", - "TYPE_INT64", - "TYPE_UINT64", - "TYPE_INT32", - "TYPE_FIXED64", - "TYPE_FIXED32", - "TYPE_BOOL", - "TYPE_STRING", - "TYPE_GROUP", - "TYPE_MESSAGE", - "TYPE_BYTES", - "TYPE_UINT32", - "TYPE_ENUM", - "TYPE_SFIXED32", - "TYPE_SFIXED64", - "TYPE_SINT32", - "TYPE_SINT64" - ], - "enumDescriptions": [ - "Field type unknown.", - "Field type double.", - "Field type float.", - "Field type int64.", - "Field type uint64.", - "Field type int32.", - "Field type fixed64.", - "Field type fixed32.", - "Field type bool.", - "Field type string.", - "Field type group. Proto2 syntax only, and deprecated.", - "Field type message.", - "Field type bytes.", - "Field type uint32.", - "Field type enum.", - "Field type sfixed32.", - "Field type sfixed64.", - "Field type sint32.", - "Field type sint64." - ], - "type": "string" - }, - "name": { - "description": "The field name.", - "type": "string" - }, - "number": { - "description": "The field number.", - "format": "int32", - "type": "integer" - }, - "oneofIndex": { - "description": "The index of the field type in `Type.oneofs`, for message or enumeration types. The first type has index 1; zero means the type is not in the list.", - "format": "int32", - "type": "integer" - }, - "options": { - "description": "The protocol buffer options.", - "items": { - "$ref": "Option" - }, - "type": "array" - }, - "packed": { - "description": "Whether to use alternative packed wire representation.", - "type": "boolean" - }, - "typeUrl": { - "description": "The field type URL, without the scheme, for message or enumeration types. Example: `\"type.googleapis.com/google.protobuf.Timestamp\"`.", - "type": "string" - } - }, - "type": "object" - }, - "FieldPolicy": { - "description": "Google API Policy Annotation This message defines a simple API policy annotation that can be used to annotate API request and response message fields with applicable policies. One field may have multiple applicable policies that must all be satisfied before a request can be processed. This policy annotation is used to generate the overall policy that will be used for automatic runtime policy enforcement and documentation generation.", - "id": "FieldPolicy", - "properties": { - "resourcePermission": { - "description": "Specifies the required permission(s) for the resource referred to by the field. It requires the field contains a valid resource reference, and the request must pass the permission checks to proceed. For example, \"resourcemanager.projects.get\".", - "type": "string" - }, - "resourceType": { - "description": "Specifies the resource type for the resource referred to by the field.", - "type": "string" - }, - "selector": { - "description": "Selects one or more request or response message fields to apply this `FieldPolicy`. When a `FieldPolicy` is used in proto annotation, the selector must be left as empty. The service config generator will automatically fill the correct value. When a `FieldPolicy` is used in service config, the selector must be a comma-separated string with valid request or response field paths, such as \"foo.bar\" or \"foo.bar,foo.baz\".", - "type": "string" - } - }, - "type": "object" - }, - "GetDnsZoneResponse": { - "description": "Represents managed DNS zones created in the shared Producer host and consumer projects.", - "id": "GetDnsZoneResponse", - "properties": { - "consumerPeeringZone": { - "$ref": "DnsZone", - "description": "The DNS peering zone created in the consumer project." - }, - "producerPrivateZone": { - "$ref": "DnsZone", - "description": "The private DNS zone created in the shared producer host project." - } - }, - "type": "object" - }, - "GoSettings": { - "description": "Settings for Go client libraries.", - "id": "GoSettings", - "properties": { - "common": { - "$ref": "CommonLanguageSettings", - "description": "Some settings." - }, - "renamedServices": { - "additionalProperties": { - "type": "string" - }, - "description": "Map of service names to renamed services. Keys are the package relative service names and values are the name to be used for the service client and call options. Example: publishing: go_settings: renamed_services: Publisher: TopicAdmin", - "type": "object" - } - }, - "type": "object" - }, - "GoogleCloudServicenetworkingV1ConsumerConfigReservedRange": { - "description": "Allocated IP address ranges for this private service access connection.", - "id": "GoogleCloudServicenetworkingV1ConsumerConfigReservedRange", - "properties": { - "address": { - "description": "The starting address of the reserved range. The address must be a valid IPv4 address in the x.x.x.x format. This value combined with the IP prefix length is the CIDR range for the reserved range.", - "type": "string" - }, - "ipPrefixLength": { - "description": "The prefix length of the reserved range.", - "format": "int32", - "type": "integer" - }, - "name": { - "description": "The name of the reserved range.", - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudServicenetworkingV1betaConnection": { - "description": "Represents a private connection resource. A private connection is implemented as a VPC Network Peering connection between a service producer's VPC network and a service consumer's VPC network.", - "id": "GoogleCloudServicenetworkingV1betaConnection", - "properties": { - "network": { - "description": "The name of service consumer's VPC network that's connected with service producer network, in the following format: `projects/{project}/global/networks/{network}`. `{project}` is a project number, such as in `12345` that includes the VPC service consumer's VPC network. `{network}` is the name of the service consumer's VPC network.", - "type": "string" - }, - "peering": { - "description": "Output only. The name of the VPC Network Peering connection that was created by the service producer.", - "type": "string" - }, - "reservedPeeringRanges": { - "description": "The name of one or more allocated IP address ranges for this service producer of type `PEERING`. Note that invoking this method with a different range when connection is already established will not modify already provisioned service producer subnetworks.", - "items": { - "type": "string" - }, - "type": "array" - }, - "service": { - "description": "Output only. The name of the peering service that's associated with this connection, in the following format: `services/{service name}`.", - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudServicenetworkingV1betaSubnetwork": { - "description": "Represents a subnet that was created or discovered by a private access management service.", - "id": "GoogleCloudServicenetworkingV1betaSubnetwork", - "properties": { - "ipCidrRange": { - "description": "Subnetwork CIDR range in `10.x.x.x/y` format.", - "type": "string" - }, - "name": { - "description": "Subnetwork name. See https://cloud.google.com/compute/docs/vpc/", - "type": "string" - }, - "network": { - "description": "In the Shared VPC host project, the VPC network that's peered with the consumer network. For example: `projects/1234321/global/networks/host-network`", - "type": "string" - }, - "outsideAllocation": { - "description": "This is a discovered subnet that is not within the current consumer allocated ranges.", - "type": "boolean" - } - }, - "type": "object" - }, - "Http": { - "description": "Defines the HTTP configuration for an API service. It contains a list of HttpRule, each specifying the mapping of an RPC method to one or more HTTP REST API methods.", - "id": "Http", - "properties": { - "fullyDecodeReservedExpansion": { - "description": "When set to true, URL path parameters will be fully URI-decoded except in cases of single segment matches in reserved expansion, where \"%2F\" will be left encoded. The default behavior is to not decode RFC 6570 reserved characters in multi segment matches.", - "type": "boolean" - }, - "rules": { - "description": "A list of HTTP configuration rules that apply to individual API methods. **NOTE:** All service configuration rules follow \"last one wins\" order.", - "items": { - "$ref": "HttpRule" - }, - "type": "array" - } - }, - "type": "object" - }, - "HttpRule": { - "description": "gRPC Transcoding gRPC Transcoding is a feature for mapping between a gRPC method and one or more HTTP REST endpoints. It allows developers to build a single API service that supports both gRPC APIs and REST APIs. Many systems, including [Google APIs](https://github.com/googleapis/googleapis), [Cloud Endpoints](https://cloud.google.com/endpoints), [gRPC Gateway](https://github.com/grpc-ecosystem/grpc-gateway), and [Envoy](https://github.com/envoyproxy/envoy) proxy support this feature and use it for large scale production services. `HttpRule` defines the schema of the gRPC/REST mapping. The mapping specifies how different portions of the gRPC request message are mapped to the URL path, URL query parameters, and HTTP request body. It also controls how the gRPC response message is mapped to the HTTP response body. `HttpRule` is typically specified as an `google.api.http` annotation on the gRPC method. Each mapping specifies a URL path template and an HTTP method. The path template may refer to one or more fields in the gRPC request message, as long as each field is a non-repeated field with a primitive (non-message) type. The path template controls how fields of the request message are mapped to the URL path. Example: service Messaging { rpc GetMessage(GetMessageRequest) returns (Message) { option (google.api.http) = { get: \"/v1/{name=messages/*}\" }; } } message GetMessageRequest { string name = 1; // Mapped to URL path. } message Message { string text = 1; // The resource content. } This enables an HTTP REST to gRPC mapping as below: - HTTP: `GET /v1/messages/123456` - gRPC: `GetMessage(name: \"messages/123456\")` Any fields in the request message which are not bound by the path template automatically become HTTP query parameters if there is no HTTP request body. For example: service Messaging { rpc GetMessage(GetMessageRequest) returns (Message) { option (google.api.http) = { get:\"/v1/messages/{message_id}\" }; } } message GetMessageRequest { message SubMessage { string subfield = 1; } string message_id = 1; // Mapped to URL path. int64 revision = 2; // Mapped to URL query parameter `revision`. SubMessage sub = 3; // Mapped to URL query parameter `sub.subfield`. } This enables a HTTP JSON to RPC mapping as below: - HTTP: `GET /v1/messages/123456?revision=2\u0026sub.subfield=foo` - gRPC: `GetMessage(message_id: \"123456\" revision: 2 sub: SubMessage(subfield: \"foo\"))` Note that fields which are mapped to URL query parameters must have a primitive type or a repeated primitive type or a non-repeated message type. In the case of a repeated type, the parameter can be repeated in the URL as `...?param=A\u0026param=B`. In the case of a message type, each field of the message is mapped to a separate parameter, such as `...?foo.a=A\u0026foo.b=B\u0026foo.c=C`. For HTTP methods that allow a request body, the `body` field specifies the mapping. Consider a REST update method on the message resource collection: service Messaging { rpc UpdateMessage(UpdateMessageRequest) returns (Message) { option (google.api.http) = { patch: \"/v1/messages/{message_id}\" body: \"message\" }; } } message UpdateMessageRequest { string message_id = 1; // mapped to the URL Message message = 2; // mapped to the body } The following HTTP JSON to RPC mapping is enabled, where the representation of the JSON in the request body is determined by protos JSON encoding: - HTTP: `PATCH /v1/messages/123456 { \"text\": \"Hi!\" }` - gRPC: `UpdateMessage(message_id: \"123456\" message { text: \"Hi!\" })` The special name `*` can be used in the body mapping to define that every field not bound by the path template should be mapped to the request body. This enables the following alternative definition of the update method: service Messaging { rpc UpdateMessage(Message) returns (Message) { option (google.api.http) = { patch: \"/v1/messages/{message_id}\" body: \"*\" }; } } message Message { string message_id = 1; string text = 2; } The following HTTP JSON to RPC mapping is enabled: - HTTP: `PATCH /v1/messages/123456 { \"text\": \"Hi!\" }` - gRPC: `UpdateMessage(message_id: \"123456\" text: \"Hi!\")` Note that when using `*` in the body mapping, it is not possible to have HTTP parameters, as all fields not bound by the path end in the body. This makes this option more rarely used in practice when defining REST APIs. The common usage of `*` is in custom methods which don't use the URL at all for transferring data. It is possible to define multiple HTTP methods for one RPC by using the `additional_bindings` option. Example: service Messaging { rpc GetMessage(GetMessageRequest) returns (Message) { option (google.api.http) = { get: \"/v1/messages/{message_id}\" additional_bindings { get: \"/v1/users/{user_id}/messages/{message_id}\" } }; } } message GetMessageRequest { string message_id = 1; string user_id = 2; } This enables the following two alternative HTTP JSON to RPC mappings: - HTTP: `GET /v1/messages/123456` - gRPC: `GetMessage(message_id: \"123456\")` - HTTP: `GET /v1/users/me/messages/123456` - gRPC: `GetMessage(user_id: \"me\" message_id: \"123456\")` Rules for HTTP mapping 1. Leaf request fields (recursive expansion nested messages in the request message) are classified into three categories: - Fields referred by the path template. They are passed via the URL path. - Fields referred by the HttpRule.body. They are passed via the HTTP request body. - All other fields are passed via the URL query parameters, and the parameter name is the field path in the request message. A repeated field can be represented as multiple query parameters under the same name. 2. If HttpRule.body is \"*\", there is no URL query parameter, all fields are passed via URL path and HTTP request body. 3. If HttpRule.body is omitted, there is no HTTP request body, all fields are passed via URL path and URL query parameters. Path template syntax Template = \"/\" Segments [ Verb ] ; Segments = Segment { \"/\" Segment } ; Segment = \"*\" | \"**\" | LITERAL | Variable ; Variable = \"{\" FieldPath [ \"=\" Segments ] \"}\" ; FieldPath = IDENT { \".\" IDENT } ; Verb = \":\" LITERAL ; The syntax `*` matches a single URL path segment. The syntax `**` matches zero or more URL path segments, which must be the last part of the URL path except the `Verb`. The syntax `Variable` matches part of the URL path as specified by its template. A variable template must not contain other variables. If a variable matches a single path segment, its template may be omitted, e.g. `{var}` is equivalent to `{var=*}`. The syntax `LITERAL` matches literal text in the URL path. If the `LITERAL` contains any reserved character, such characters should be percent-encoded before the matching. If a variable contains exactly one path segment, such as `\"{var}\"` or `\"{var=*}\"`, when such a variable is expanded into a URL path on the client side, all characters except `[-_.~0-9a-zA-Z]` are percent-encoded. The server side does the reverse decoding. Such variables show up in the [Discovery Document](https://developers.google.com/discovery/v1/reference/apis) as `{var}`. If a variable contains multiple path segments, such as `\"{var=foo/*}\"` or `\"{var=**}\"`, when such a variable is expanded into a URL path on the client side, all characters except `[-_.~/0-9a-zA-Z]` are percent-encoded. The server side does the reverse decoding, except \"%2F\" and \"%2f\" are left unchanged. Such variables show up in the [Discovery Document](https://developers.google.com/discovery/v1/reference/apis) as `{+var}`. Using gRPC API Service Configuration gRPC API Service Configuration (service config) is a configuration language for configuring a gRPC service to become a user-facing product. The service config is simply the YAML representation of the `google.api.Service` proto message. As an alternative to annotating your proto file, you can configure gRPC transcoding in your service config YAML files. You do this by specifying a `HttpRule` that maps the gRPC method to a REST endpoint, achieving the same effect as the proto annotation. This can be particularly useful if you have a proto that is reused in multiple services. Note that any transcoding specified in the service config will override any matching transcoding configuration in the proto. The following example selects a gRPC method and applies an `HttpRule` to it: http: rules: - selector: example.v1.Messaging.GetMessage get: /v1/messages/{message_id}/{sub.subfield} Special notes When gRPC Transcoding is used to map a gRPC to JSON REST endpoints, the proto to JSON conversion must follow the [proto3 specification](https://developers.google.com/protocol-buffers/docs/proto3#json). While the single segment variable follows the semantics of [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 Simple String Expansion, the multi segment variable **does not** follow RFC 6570 Section 3.2.3 Reserved Expansion. The reason is that the Reserved Expansion does not expand special characters like `?` and `#`, which would lead to invalid URLs. As the result, gRPC Transcoding uses a custom encoding for multi segment variables. The path variables **must not** refer to any repeated or mapped field, because client libraries are not capable of handling such variable expansion. The path variables **must not** capture the leading \"/\" character. The reason is that the most common use case \"{var}\" does not capture the leading \"/\" character. For consistency, all path variables must share the same behavior. Repeated message fields must not be mapped to URL query parameters, because no client library can support such complicated mapping. If an API needs to use a JSON array for request or response body, it can map the request or response body to a repeated field. However, some gRPC Transcoding implementations may not support this feature.", - "id": "HttpRule", - "properties": { - "additionalBindings": { - "description": "Additional HTTP bindings for the selector. Nested bindings must not contain an `additional_bindings` field themselves (that is, the nesting may only be one level deep).", - "items": { - "$ref": "HttpRule" - }, - "type": "array" - }, - "body": { - "description": "The name of the request field whose value is mapped to the HTTP request body, or `*` for mapping all request fields not captured by the path pattern to the HTTP body, or omitted for not having any HTTP request body. NOTE: the referred field must be present at the top-level of the request message type.", - "type": "string" - }, - "custom": { - "$ref": "CustomHttpPattern", - "description": "The custom pattern is used for specifying an HTTP method that is not included in the `pattern` field, such as HEAD, or \"*\" to leave the HTTP method unspecified for this rule. The wild-card rule is useful for services that provide content to Web (HTML) clients." - }, - "delete": { - "description": "Maps to HTTP DELETE. Used for deleting a resource.", - "type": "string" - }, - "get": { - "description": "Maps to HTTP GET. Used for listing and getting information about resources.", - "type": "string" - }, - "patch": { - "description": "Maps to HTTP PATCH. Used for updating a resource.", - "type": "string" - }, - "post": { - "description": "Maps to HTTP POST. Used for creating a resource or performing an action.", - "type": "string" - }, - "put": { - "description": "Maps to HTTP PUT. Used for replacing a resource.", - "type": "string" - }, - "responseBody": { - "description": "Optional. The name of the response field whose value is mapped to the HTTP response body. When omitted, the entire response message will be used as the HTTP response body. NOTE: The referred field must be present at the top-level of the response message type.", - "type": "string" - }, - "selector": { - "description": "Selects a method to which this rule applies. Refer to selector for syntax details.", - "type": "string" - } - }, - "type": "object" - }, - "JavaSettings": { - "description": "Settings for Java client libraries.", - "id": "JavaSettings", - "properties": { - "common": { - "$ref": "CommonLanguageSettings", - "description": "Some settings." - }, - "libraryPackage": { - "description": "The package name to use in Java. Clobbers the java_package option set in the protobuf. This should be used **only** by APIs who have already set the language_settings.java.package_name\" field in gapic.yaml. API teams should use the protobuf java_package option where possible. Example of a YAML configuration:: publishing: library_settings: java_settings: library_package: com.google.cloud.pubsub.v1", - "type": "string" - }, - "serviceClassNames": { - "additionalProperties": { - "type": "string" - }, - "description": "Configure the Java class name to use instead of the service's for its corresponding generated GAPIC client. Keys are fully-qualified service names as they appear in the protobuf (including the full the language_settings.java.interface_names\" field in gapic.yaml. API teams should otherwise use the service name as it appears in the protobuf. Example of a YAML configuration:: publishing: java_settings: service_class_names: - google.pubsub.v1.Publisher: TopicAdmin - google.pubsub.v1.Subscriber: SubscriptionAdmin", - "type": "object" - } - }, - "type": "object" - }, - "JwtLocation": { - "description": "Specifies a location to extract JWT from an API request.", - "id": "JwtLocation", - "properties": { - "cookie": { - "description": "Specifies cookie name to extract JWT token.", - "type": "string" - }, - "header": { - "description": "Specifies HTTP header name to extract JWT token.", - "type": "string" - }, - "query": { - "description": "Specifies URL query parameter name to extract JWT token.", - "type": "string" - }, - "valuePrefix": { - "description": "The value prefix. The value format is \"value_prefix{token}\" Only applies to \"in\" header type. Must be empty for \"in\" query type. If not empty, the header value has to match (case sensitive) this prefix. If not matched, JWT will not be extracted. If matched, JWT will be extracted after the prefix is removed. For example, for \"Authorization: Bearer {JWT}\", value_prefix=\"Bearer \" with a space at the end.", - "type": "string" - } - }, - "type": "object" - }, - "LabelDescriptor": { - "description": "A description of a label.", - "id": "LabelDescriptor", - "properties": { - "description": { - "description": "A human-readable description for the label.", - "type": "string" - }, - "key": { - "description": "The label key.", - "type": "string" - }, - "valueType": { - "description": "The type of data that can be assigned to the label.", - "enum": [ - "STRING", - "BOOL", - "INT64" - ], - "enumDescriptions": [ - "A variable-length string. This is the default.", - "Boolean; true or false.", - "A 64-bit signed integer." - ], - "type": "string" - } - }, - "type": "object" - }, - "ListConnectionsResponse": { - "description": "ListConnectionsResponse is the response to list peering states for the given service and consumer project.", - "id": "ListConnectionsResponse", - "properties": { - "connections": { - "description": "The list of Connections.", - "items": { - "$ref": "Connection" - }, - "type": "array" - } - }, - "type": "object" - }, - "ListDnsRecordSetsResponse": { - "description": "Represents all DNS RecordSets associated with the producer network", - "id": "ListDnsRecordSetsResponse", - "properties": { - "dnsRecordSets": { - "description": "DNS record Set Resource", - "items": { - "$ref": "DnsRecordSet" - }, - "type": "array" - } - }, - "type": "object" - }, - "ListDnsZonesResponse": { - "description": "Represents all DNS zones in the shared producer host project and the matching peering zones in the consumer project.", - "id": "ListDnsZonesResponse", - "properties": { - "dnsZonePairs": { - "description": "All pairs of private DNS zones in the shared producer host project and the matching peering zones in the consumer project..", - "items": { - "$ref": "DnsZonePair" - }, - "type": "array" - } - }, - "type": "object" - }, - "ListOperationsResponse": { - "description": "The response message for Operations.ListOperations.", - "id": "ListOperationsResponse", - "properties": { - "nextPageToken": { - "description": "The standard List next-page token.", - "type": "string" - }, - "operations": { - "description": "A list of operations that matches the specified filter in the request.", - "items": { - "$ref": "Operation" - }, - "type": "array" - }, - "unreachable": { - "description": "Unordered list. Unreachable resources. Populated when the request sets `ListOperationsRequest.return_partial_success` and reads across collections. For example, when attempting to list all resources across all supported locations.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "ListPeeredDnsDomainsResponse": { - "description": "Response to list peered DNS domains for a given connection.", - "id": "ListPeeredDnsDomainsResponse", - "properties": { - "peeredDnsDomains": { - "description": "The list of peered DNS domains.", - "items": { - "$ref": "PeeredDnsDomain" - }, - "type": "array" - } - }, - "type": "object" - }, - "LogDescriptor": { - "description": "A description of a log type. Example in YAML format: - name: library.googleapis.com/activity_history description: The history of borrowing and returning library items. display_name: Activity labels: - key: /customer_id description: Identifier of a library customer", - "id": "LogDescriptor", - "properties": { - "description": { - "description": "A human-readable description of this log. This information appears in the documentation and can contain details.", - "type": "string" - }, - "displayName": { - "description": "The human-readable name for this log. This information appears on the user interface and should be concise.", - "type": "string" - }, - "labels": { - "description": "The set of labels that are available to describe a specific log entry. Runtime requests that contain labels not specified here are considered invalid.", - "items": { - "$ref": "LabelDescriptor" - }, - "type": "array" - }, - "name": { - "description": "The name of the log. It must be less than 512 characters long and can include the following characters: upper- and lower-case alphanumeric characters [A-Za-z0-9], and punctuation characters including slash, underscore, hyphen, period [/_-.].", - "type": "string" - } - }, - "type": "object" - }, - "Logging": { - "description": "Logging configuration of the service. The following example shows how to configure logs to be sent to the producer and consumer projects. In the example, the `activity_history` log is sent to both the producer and consumer projects, whereas the `purchase_history` log is only sent to the producer project. monitored_resources: - type: library.googleapis.com/branch labels: - key: /city description: The city where the library branch is located in. - key: /name description: The name of the branch. logs: - name: activity_history labels: - key: /customer_id - name: purchase_history logging: producer_destinations: - monitored_resource: library.googleapis.com/branch logs: - activity_history - purchase_history consumer_destinations: - monitored_resource: library.googleapis.com/branch logs: - activity_history", - "id": "Logging", - "properties": { - "consumerDestinations": { - "description": "Logging configurations for sending logs to the consumer project. There can be multiple consumer destinations, each one must have a different monitored resource type. A log can be used in at most one consumer destination.", - "items": { - "$ref": "LoggingDestination" - }, - "type": "array" - }, - "producerDestinations": { - "description": "Logging configurations for sending logs to the producer project. There can be multiple producer destinations, each one must have a different monitored resource type. A log can be used in at most one producer destination.", - "items": { - "$ref": "LoggingDestination" - }, - "type": "array" - } - }, - "type": "object" - }, - "LoggingDestination": { - "description": "Configuration of a specific logging destination (the producer project or the consumer project).", - "id": "LoggingDestination", - "properties": { - "logs": { - "description": "Names of the logs to be sent to this destination. Each name must be defined in the Service.logs section. If the log name is not a domain scoped name, it will be automatically prefixed with the service name followed by \"/\".", - "items": { - "type": "string" - }, - "type": "array" - }, - "monitoredResource": { - "description": "The monitored resource type. The type must be defined in the Service.monitored_resources section.", - "type": "string" - } - }, - "type": "object" - }, - "LongRunning": { - "description": "Describes settings to use when generating API methods that use the long-running operation pattern. All default values below are from those used in the client library generators (e.g. [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)).", - "id": "LongRunning", - "properties": { - "initialPollDelay": { - "description": "Initial delay after which the first poll request will be made. Default value: 5 seconds.", - "format": "google-duration", - "type": "string" - }, - "maxPollDelay": { - "description": "Maximum time between two subsequent poll requests. Default value: 45 seconds.", - "format": "google-duration", - "type": "string" - }, - "pollDelayMultiplier": { - "description": "Multiplier to gradually increase delay between subsequent polls until it reaches max_poll_delay. Default value: 1.5.", - "format": "float", - "type": "number" - }, - "totalPollTimeout": { - "description": "Total polling timeout. Default value: 5 minutes.", - "format": "google-duration", - "type": "string" - } - }, - "type": "object" - }, - "Method": { - "description": "Method represents a method of an API interface. New usages of this message as an alternative to MethodDescriptorProto are strongly discouraged. This message does not reliability preserve all information necessary to model the schema and preserve semantics. Instead make use of FileDescriptorSet which preserves the necessary information.", - "id": "Method", - "properties": { - "edition": { - "deprecated": true, - "description": "The source edition string, only valid when syntax is SYNTAX_EDITIONS. This field should be ignored, instead the edition should be inherited from Api. This is similar to Field and EnumValue.", - "type": "string" - }, - "name": { - "description": "The simple name of this method.", - "type": "string" - }, - "options": { - "description": "Any metadata attached to the method.", - "items": { - "$ref": "Option" - }, - "type": "array" - }, - "requestStreaming": { - "description": "If true, the request is streamed.", - "type": "boolean" - }, - "requestTypeUrl": { - "description": "A URL of the input message type.", - "type": "string" - }, - "responseStreaming": { - "description": "If true, the response is streamed.", - "type": "boolean" - }, - "responseTypeUrl": { - "description": "The URL of the output message type.", - "type": "string" - }, - "syntax": { - "deprecated": true, - "description": "The source syntax of this method. This field should be ignored, instead the syntax should be inherited from Api. This is similar to Field and EnumValue.", - "enum": [ - "SYNTAX_PROTO2", - "SYNTAX_PROTO3", - "SYNTAX_EDITIONS" - ], - "enumDescriptions": [ - "Syntax `proto2`.", - "Syntax `proto3`.", - "Syntax `editions`." - ], - "type": "string" - } - }, - "type": "object" - }, - "MethodPolicy": { - "description": "Defines policies applying to an RPC method.", - "id": "MethodPolicy", - "properties": { - "requestPolicies": { - "description": "Policies that are applicable to the request message.", - "items": { - "$ref": "FieldPolicy" - }, - "type": "array" - }, - "selector": { - "description": "Selects a method to which these policies should be enforced, for example, \"google.pubsub.v1.Subscriber.CreateSubscription\". Refer to selector for syntax details. NOTE: This field must not be set in the proto annotation. It will be automatically filled by the service config compiler .", - "type": "string" - } - }, - "type": "object" - }, - "MethodSettings": { - "description": "Describes the generator configuration for a method.", - "id": "MethodSettings", - "properties": { - "autoPopulatedFields": { - "description": "List of top-level fields of the request message, that should be automatically populated by the client libraries based on their (google.api.field_info).format. Currently supported format: UUID4. Example of a YAML configuration: publishing: method_settings: - selector: google.example.v1.ExampleService.CreateExample auto_populated_fields: - request_id", - "items": { - "type": "string" - }, - "type": "array" - }, - "batching": { - "$ref": "BatchingConfigProto", - "description": "Batching configuration for an API method in client libraries. Example of a YAML configuration: publishing: method_settings: - selector: google.example.v1.ExampleService.BatchCreateExample batching: element_count_threshold: 1000 request_byte_threshold: 100000000 delay_threshold_millis: 10" - }, - "longRunning": { - "$ref": "LongRunning", - "description": "Describes settings to use for long-running operations when generating API methods for RPCs. Complements RPCs that use the annotations in google/longrunning/operations.proto. Example of a YAML configuration:: publishing: method_settings: - selector: google.cloud.speech.v2.Speech.BatchRecognize long_running: initial_poll_delay: 60s # 1 minute poll_delay_multiplier: 1.5 max_poll_delay: 360s # 6 minutes total_poll_timeout: 54000s # 90 minutes" - }, - "selector": { - "description": "The fully qualified name of the method, for which the options below apply. This is used to find the method to apply the options. Example: publishing: method_settings: - selector: google.storage.control.v2.StorageControl.CreateFolder # method settings for CreateFolder...", - "type": "string" - } - }, - "type": "object" - }, - "MetricDescriptor": { - "description": "Defines a metric type and its schema. Once a metric descriptor is created, deleting or altering it stops data collection and makes the metric type's existing data unusable. ", - "id": "MetricDescriptor", - "properties": { - "description": { - "description": "A detailed description of the metric, which can be used in documentation.", - "type": "string" - }, - "displayName": { - "description": "A concise name for the metric, which can be displayed in user interfaces. Use sentence case without an ending period, for example \"Request count\". This field is optional but it is recommended to be set for any metrics associated with user-visible concepts, such as Quota.", - "type": "string" - }, - "labels": { - "description": "The set of labels that can be used to describe a specific instance of this metric type. For example, the `appengine.googleapis.com/http/server/response_latencies` metric type has a label for the HTTP response code, `response_code`, so you can look at latencies for successful responses or just for responses that failed.", - "items": { - "$ref": "LabelDescriptor" - }, - "type": "array" - }, - "launchStage": { - "description": "Optional. The launch stage of the metric definition.", - "enum": [ - "LAUNCH_STAGE_UNSPECIFIED", - "UNIMPLEMENTED", - "PRELAUNCH", - "EARLY_ACCESS", - "ALPHA", - "BETA", - "GA", - "DEPRECATED" - ], - "enumDescriptions": [ - "Do not use this default value.", - "The feature is not yet implemented. Users can not use it.", - "Prelaunch features are hidden from users and are only visible internally.", - "Early Access features are limited to a closed group of testers. To use these features, you must sign up in advance and sign a Trusted Tester agreement (which includes confidentiality provisions). These features may be unstable, changed in backward-incompatible ways, and are not guaranteed to be released.", - "Alpha is a limited availability test for releases before they are cleared for widespread use. By Alpha, all significant design issues are resolved and we are in the process of verifying functionality. Alpha customers need to apply for access, agree to applicable terms, and have their projects allowlisted. Alpha releases don't have to be feature complete, no SLAs are provided, and there are no technical support obligations, but they will be far enough along that customers can actually use them in test environments or for limited-use tests -- just like they would in normal production cases.", - "Beta is the point at which we are ready to open a release for any customer to use. There are no SLA or technical support obligations in a Beta release. Products will be complete from a feature perspective, but may have some open outstanding issues. Beta releases are suitable for limited production use cases.", - "GA features are open to all developers and are considered stable and fully qualified for production use.", - "Deprecated features are scheduled to be shut down and removed. For more information, see the \"Deprecation Policy\" section of our [Terms of Service](https://cloud.google.com/terms/) and the [Google Cloud Platform Subject to the Deprecation Policy](https://cloud.google.com/terms/deprecation) documentation." - ], - "type": "string" - }, - "metadata": { - "$ref": "MetricDescriptorMetadata", - "description": "Optional. Metadata which can be used to guide usage of the metric." - }, - "metricKind": { - "description": "Whether the metric records instantaneous values, changes to a value, etc. Some combinations of `metric_kind` and `value_type` might not be supported.", - "enum": [ - "METRIC_KIND_UNSPECIFIED", - "GAUGE", - "DELTA", - "CUMULATIVE" - ], - "enumDescriptions": [ - "Do not use this default value.", - "An instantaneous measurement of a value.", - "The change in a value during a time interval.", - "A value accumulated over a time interval. Cumulative measurements in a time series should have the same start time and increasing end times, until an event resets the cumulative value to zero and sets a new start time for the following points." - ], - "type": "string" - }, - "monitoredResourceTypes": { - "description": "Read-only. If present, then a time series, which is identified partially by a metric type and a MonitoredResourceDescriptor, that is associated with this metric type can only be associated with one of the monitored resource types listed here.", - "items": { - "type": "string" - }, - "type": "array" - }, - "name": { - "description": "The resource name of the metric descriptor.", - "type": "string" - }, - "type": { - "description": "The metric type, including its DNS name prefix. The type is not URL-encoded. All user-defined metric types have the DNS name `custom.googleapis.com` or `external.googleapis.com`. Metric types should use a natural hierarchical grouping. For example: \"custom.googleapis.com/invoice/paid/amount\" \"external.googleapis.com/prometheus/up\" \"appengine.googleapis.com/http/server/response_latencies\"", - "type": "string" - }, - "unit": { - "description": "The units in which the metric value is reported. It is only applicable if the `value_type` is `INT64`, `DOUBLE`, or `DISTRIBUTION`. The `unit` defines the representation of the stored metric values. Different systems might scale the values to be more easily displayed (so a value of `0.02kBy` _might_ be displayed as `20By`, and a value of `3523kBy` _might_ be displayed as `3.5MBy`). However, if the `unit` is `kBy`, then the value of the metric is always in thousands of bytes, no matter how it might be displayed. If you want a custom metric to record the exact number of CPU-seconds used by a job, you can create an `INT64 CUMULATIVE` metric whose `unit` is `s{CPU}` (or equivalently `1s{CPU}` or just `s`). If the job uses 12,005 CPU-seconds, then the value is written as `12005`. Alternatively, if you want a custom metric to record data in a more granular way, you can create a `DOUBLE CUMULATIVE` metric whose `unit` is `ks{CPU}`, and then write the value `12.005` (which is `12005/1000`), or use `Kis{CPU}` and write `11.723` (which is `12005/1024`). The supported units are a subset of [The Unified Code for Units of Measure](https://unitsofmeasure.org/ucum.html) standard: **Basic units (UNIT)** * `bit` bit * `By` byte * `s` second * `min` minute * `h` hour * `d` day * `1` dimensionless **Prefixes (PREFIX)** * `k` kilo (10^3) * `M` mega (10^6) * `G` giga (10^9) * `T` tera (10^12) * `P` peta (10^15) * `E` exa (10^18) * `Z` zetta (10^21) * `Y` yotta (10^24) * `m` milli (10^-3) * `u` micro (10^-6) * `n` nano (10^-9) * `p` pico (10^-12) * `f` femto (10^-15) * `a` atto (10^-18) * `z` zepto (10^-21) * `y` yocto (10^-24) * `Ki` kibi (2^10) * `Mi` mebi (2^20) * `Gi` gibi (2^30) * `Ti` tebi (2^40) * `Pi` pebi (2^50) **Grammar** The grammar also includes these connectors: * `/` division or ratio (as an infix operator). For examples, `kBy/{email}` or `MiBy/10ms` (although you should almost never have `/s` in a metric `unit`; rates should always be computed at query time from the underlying cumulative or delta value). * `.` multiplication or composition (as an infix operator). For examples, `GBy.d` or `k{watt}.h`. The grammar for a unit is as follows: Expression = Component { \".\" Component } { \"/\" Component } ; Component = ( [ PREFIX ] UNIT | \"%\" ) [ Annotation ] | Annotation | \"1\" ; Annotation = \"{\" NAME \"}\" ; Notes: * `Annotation` is just a comment if it follows a `UNIT`. If the annotation is used alone, then the unit is equivalent to `1`. For examples, `{request}/s == 1/s`, `By{transmitted}/s == By/s`. * `NAME` is a sequence of non-blank printable ASCII characters not containing `{` or `}`. * `1` represents a unitary [dimensionless unit](https://en.wikipedia.org/wiki/Dimensionless_quantity) of 1, such as in `1/s`. It is typically used when none of the basic units are appropriate. For example, \"new users per day\" can be represented as `1/d` or `{new-users}/d` (and a metric value `5` would mean \"5 new users). Alternatively, \"thousands of page views per day\" would be represented as `1000/d` or `k1/d` or `k{page_views}/d` (and a metric value of `5.3` would mean \"5300 page views per day\"). * `%` represents dimensionless value of 1/100, and annotates values giving a percentage (so the metric values are typically in the range of 0..100, and a metric value `3` means \"3 percent\"). * `10^2.%` indicates a metric contains a ratio, typically in the range 0..1, that will be multiplied by 100 and displayed as a percentage (so a metric value `0.03` means \"3 percent\").", - "type": "string" - }, - "valueType": { - "description": "Whether the measurement is an integer, a floating-point number, etc. Some combinations of `metric_kind` and `value_type` might not be supported.", - "enum": [ - "VALUE_TYPE_UNSPECIFIED", - "BOOL", - "INT64", - "DOUBLE", - "STRING", - "DISTRIBUTION", - "MONEY" - ], - "enumDescriptions": [ - "Do not use this default value.", - "The value is a boolean. This value type can be used only if the metric kind is `GAUGE`.", - "The value is a signed 64-bit integer.", - "The value is a double precision floating point number.", - "The value is a text string. This value type can be used only if the metric kind is `GAUGE`.", - "The value is a `Distribution`.", - "The value is money." - ], - "type": "string" - } - }, - "type": "object" - }, - "MetricDescriptorMetadata": { - "description": "Additional annotations that can be used to guide the usage of a metric.", - "id": "MetricDescriptorMetadata", - "properties": { - "ingestDelay": { - "description": "The delay of data points caused by ingestion. Data points older than this age are guaranteed to be ingested and available to be read, excluding data loss due to errors.", - "format": "google-duration", - "type": "string" - }, - "launchStage": { - "deprecated": true, - "description": "Deprecated. Must use the MetricDescriptor.launch_stage instead.", - "enum": [ - "LAUNCH_STAGE_UNSPECIFIED", - "UNIMPLEMENTED", - "PRELAUNCH", - "EARLY_ACCESS", - "ALPHA", - "BETA", - "GA", - "DEPRECATED" - ], - "enumDescriptions": [ - "Do not use this default value.", - "The feature is not yet implemented. Users can not use it.", - "Prelaunch features are hidden from users and are only visible internally.", - "Early Access features are limited to a closed group of testers. To use these features, you must sign up in advance and sign a Trusted Tester agreement (which includes confidentiality provisions). These features may be unstable, changed in backward-incompatible ways, and are not guaranteed to be released.", - "Alpha is a limited availability test for releases before they are cleared for widespread use. By Alpha, all significant design issues are resolved and we are in the process of verifying functionality. Alpha customers need to apply for access, agree to applicable terms, and have their projects allowlisted. Alpha releases don't have to be feature complete, no SLAs are provided, and there are no technical support obligations, but they will be far enough along that customers can actually use them in test environments or for limited-use tests -- just like they would in normal production cases.", - "Beta is the point at which we are ready to open a release for any customer to use. There are no SLA or technical support obligations in a Beta release. Products will be complete from a feature perspective, but may have some open outstanding issues. Beta releases are suitable for limited production use cases.", - "GA features are open to all developers and are considered stable and fully qualified for production use.", - "Deprecated features are scheduled to be shut down and removed. For more information, see the \"Deprecation Policy\" section of our [Terms of Service](https://cloud.google.com/terms/) and the [Google Cloud Platform Subject to the Deprecation Policy](https://cloud.google.com/terms/deprecation) documentation." - ], - "type": "string" - }, - "samplePeriod": { - "description": "The sampling period of metric data points. For metrics which are written periodically, consecutive data points are stored at this time interval, excluding data loss due to errors. Metrics with a higher granularity have a smaller sampling period.", - "format": "google-duration", - "type": "string" - }, - "timeSeriesResourceHierarchyLevel": { - "description": "The scope of the timeseries data of the metric.", - "items": { - "enum": [ - "TIME_SERIES_RESOURCE_HIERARCHY_LEVEL_UNSPECIFIED", - "PROJECT", - "ORGANIZATION", - "FOLDER" - ], - "enumDescriptions": [ - "Do not use this default value.", - "Scopes a metric to a project.", - "Scopes a metric to an organization.", - "Scopes a metric to a folder." - ], - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "MetricRule": { - "description": "Bind API methods to metrics. Binding a method to a metric causes that metric's configured quota behaviors to apply to the method call.", - "id": "MetricRule", - "properties": { - "metricCosts": { - "additionalProperties": { - "format": "int64", - "type": "string" - }, - "description": "Metrics to update when the selected methods are called, and the associated cost applied to each metric. The key of the map is the metric name, and the values are the amount increased for the metric against which the quota limits are defined. The value must not be negative.", - "type": "object" - }, - "selector": { - "description": "Selects the methods to which this rule applies. Refer to selector for syntax details.", - "type": "string" - } - }, - "type": "object" - }, - "Mixin": { - "description": "Declares an API Interface to be included in this interface. The including interface must redeclare all the methods from the included interface, but documentation and options are inherited as follows: - If after comment and whitespace stripping, the documentation string of the redeclared method is empty, it will be inherited from the original method. - Each annotation belonging to the service config (http, visibility) which is not set in the redeclared method will be inherited. - If an http annotation is inherited, the path pattern will be modified as follows. Any version prefix will be replaced by the version of the including interface plus the root path if specified. Example of a simple mixin: package google.acl.v1; service AccessControl { // Get the underlying ACL object. rpc GetAcl(GetAclRequest) returns (Acl) { option (google.api.http).get = \"/v1/{resource=**}:getAcl\"; } } package google.storage.v2; service Storage { // rpc GetAcl(GetAclRequest) returns (Acl); // Get a data record. rpc GetData(GetDataRequest) returns (Data) { option (google.api.http).get = \"/v2/{resource=**}\"; } } Example of a mixin configuration: apis: - name: google.storage.v2.Storage mixins: - name: google.acl.v1.AccessControl The mixin construct implies that all methods in `AccessControl` are also declared with same name and request/response types in `Storage`. A documentation generator or annotation processor will see the effective `Storage.GetAcl` method after inheriting documentation and annotations as follows: service Storage { // Get the underlying ACL object. rpc GetAcl(GetAclRequest) returns (Acl) { option (google.api.http).get = \"/v2/{resource=**}:getAcl\"; } ... } Note how the version in the path pattern changed from `v1` to `v2`. If the `root` field in the mixin is specified, it should be a relative path under which inherited HTTP paths are placed. Example: apis: - name: google.storage.v2.Storage mixins: - name: google.acl.v1.AccessControl root: acls This implies the following inherited HTTP annotation: service Storage { // Get the underlying ACL object. rpc GetAcl(GetAclRequest) returns (Acl) { option (google.api.http).get = \"/v2/acls/{resource=**}:getAcl\"; } ... }", - "id": "Mixin", - "properties": { - "name": { - "description": "The fully qualified name of the interface which is included.", - "type": "string" - }, - "root": { - "description": "If non-empty specifies a path under which inherited HTTP paths are rooted.", - "type": "string" - } - }, - "type": "object" - }, - "MonitoredResourceDescriptor": { - "description": "An object that describes the schema of a MonitoredResource object using a type name and a set of labels. For example, the monitored resource descriptor for Google Compute Engine VM instances has a type of `\"gce_instance\"` and specifies the use of the labels `\"instance_id\"` and `\"zone\"` to identify particular VM instances. Different APIs can support different monitored resource types. APIs generally provide a `list` method that returns the monitored resource descriptors used by the API. ", - "id": "MonitoredResourceDescriptor", - "properties": { - "description": { - "description": "Optional. A detailed description of the monitored resource type that might be used in documentation.", - "type": "string" - }, - "displayName": { - "description": "Optional. A concise name for the monitored resource type that might be displayed in user interfaces. It should be a Title Cased Noun Phrase, without any article or other determiners. For example, `\"Google Cloud SQL Database\"`.", - "type": "string" - }, - "labels": { - "description": "Required. A set of labels used to describe instances of this monitored resource type. For example, an individual Google Cloud SQL database is identified by values for the labels `\"database_id\"` and `\"zone\"`.", - "items": { - "$ref": "LabelDescriptor" - }, - "type": "array" - }, - "launchStage": { - "description": "Optional. The launch stage of the monitored resource definition.", - "enum": [ - "LAUNCH_STAGE_UNSPECIFIED", - "UNIMPLEMENTED", - "PRELAUNCH", - "EARLY_ACCESS", - "ALPHA", - "BETA", - "GA", - "DEPRECATED" - ], - "enumDescriptions": [ - "Do not use this default value.", - "The feature is not yet implemented. Users can not use it.", - "Prelaunch features are hidden from users and are only visible internally.", - "Early Access features are limited to a closed group of testers. To use these features, you must sign up in advance and sign a Trusted Tester agreement (which includes confidentiality provisions). These features may be unstable, changed in backward-incompatible ways, and are not guaranteed to be released.", - "Alpha is a limited availability test for releases before they are cleared for widespread use. By Alpha, all significant design issues are resolved and we are in the process of verifying functionality. Alpha customers need to apply for access, agree to applicable terms, and have their projects allowlisted. Alpha releases don't have to be feature complete, no SLAs are provided, and there are no technical support obligations, but they will be far enough along that customers can actually use them in test environments or for limited-use tests -- just like they would in normal production cases.", - "Beta is the point at which we are ready to open a release for any customer to use. There are no SLA or technical support obligations in a Beta release. Products will be complete from a feature perspective, but may have some open outstanding issues. Beta releases are suitable for limited production use cases.", - "GA features are open to all developers and are considered stable and fully qualified for production use.", - "Deprecated features are scheduled to be shut down and removed. For more information, see the \"Deprecation Policy\" section of our [Terms of Service](https://cloud.google.com/terms/) and the [Google Cloud Platform Subject to the Deprecation Policy](https://cloud.google.com/terms/deprecation) documentation." - ], - "type": "string" - }, - "name": { - "description": "Optional. The resource name of the monitored resource descriptor: `\"projects/{project_id}/monitoredResourceDescriptors/{type}\"` where {type} is the value of the `type` field in this object and {project_id} is a project ID that provides API-specific context for accessing the type. APIs that do not use project information can use the resource name format `\"monitoredResourceDescriptors/{type}\"`.", - "type": "string" - }, - "type": { - "description": "Required. The monitored resource type. For example, the type `\"cloudsql_database\"` represents databases in Google Cloud SQL. For a list of types, see [Monitored resource types](https://cloud.google.com/monitoring/api/resources) and [Logging resource types](https://cloud.google.com/logging/docs/api/v2/resource-list).", - "type": "string" - } - }, - "type": "object" - }, - "Monitoring": { - "description": "Monitoring configuration of the service. The example below shows how to configure monitored resources and metrics for monitoring. In the example, a monitored resource and two metrics are defined. The `library.googleapis.com/book/returned_count` metric is sent to both producer and consumer projects, whereas the `library.googleapis.com/book/num_overdue` metric is only sent to the consumer project. monitored_resources: - type: library.googleapis.com/Branch display_name: \"Library Branch\" description: \"A branch of a library.\" launch_stage: GA labels: - key: resource_container description: \"The Cloud container (ie. project id) for the Branch.\" - key: location description: \"The location of the library branch.\" - key: branch_id description: \"The id of the branch.\" metrics: - name: library.googleapis.com/book/returned_count display_name: \"Books Returned\" description: \"The count of books that have been returned.\" launch_stage: GA metric_kind: DELTA value_type: INT64 unit: \"1\" labels: - key: customer_id description: \"The id of the customer.\" - name: library.googleapis.com/book/num_overdue display_name: \"Books Overdue\" description: \"The current number of overdue books.\" launch_stage: GA metric_kind: GAUGE value_type: INT64 unit: \"1\" labels: - key: customer_id description: \"The id of the customer.\" monitoring: producer_destinations: - monitored_resource: library.googleapis.com/Branch metrics: - library.googleapis.com/book/returned_count consumer_destinations: - monitored_resource: library.googleapis.com/Branch metrics: - library.googleapis.com/book/returned_count - library.googleapis.com/book/num_overdue", - "id": "Monitoring", - "properties": { - "consumerDestinations": { - "description": "Monitoring configurations for sending metrics to the consumer project. There can be multiple consumer destinations. A monitored resource type may appear in multiple monitoring destinations if different aggregations are needed for different sets of metrics associated with that monitored resource type. A monitored resource and metric pair may only be used once in the Monitoring configuration.", - "items": { - "$ref": "MonitoringDestination" - }, - "type": "array" - }, - "producerDestinations": { - "description": "Monitoring configurations for sending metrics to the producer project. There can be multiple producer destinations. A monitored resource type may appear in multiple monitoring destinations if different aggregations are needed for different sets of metrics associated with that monitored resource type. A monitored resource and metric pair may only be used once in the Monitoring configuration.", - "items": { - "$ref": "MonitoringDestination" - }, - "type": "array" - } - }, - "type": "object" - }, - "MonitoringDestination": { - "description": "Configuration of a specific monitoring destination (the producer project or the consumer project).", - "id": "MonitoringDestination", - "properties": { - "metrics": { - "description": "Types of the metrics to report to this monitoring destination. Each type must be defined in Service.metrics section.", - "items": { - "type": "string" - }, - "type": "array" - }, - "monitoredResource": { - "description": "The monitored resource type. The type must be defined in Service.monitored_resources section.", - "type": "string" - } - }, - "type": "object" - }, - "NodeSettings": { - "description": "Settings for Node client libraries.", - "id": "NodeSettings", - "properties": { - "common": { - "$ref": "CommonLanguageSettings", - "description": "Some settings." - } - }, - "type": "object" - }, - "OAuthRequirements": { - "description": "OAuth scopes are a way to define data and permissions on data. For example, there are scopes defined for \"Read-only access to Google Calendar\" and \"Access to Cloud Platform\". Users can consent to a scope for an application, giving it permission to access that data on their behalf. OAuth scope specifications should be fairly coarse grained; a user will need to see and understand the text description of what your scope means. In most cases: use one or at most two OAuth scopes for an entire family of products. If your product has multiple APIs, you should probably be sharing the OAuth scope across all of those APIs. When you need finer grained OAuth consent screens: talk with your product management about how developers will use them in practice. Please note that even though each of the canonical scopes is enough for a request to be accepted and passed to the backend, a request can still fail due to the backend requiring additional scopes or permissions.", - "id": "OAuthRequirements", - "properties": { - "canonicalScopes": { - "description": "The list of publicly documented OAuth scopes that are allowed access. An OAuth token containing any of these scopes will be accepted. Example: canonical_scopes: https://www.googleapis.com/auth/calendar, https://www.googleapis.com/auth/calendar.read", - "type": "string" - } - }, - "type": "object" - }, - "Operation": { - "description": "This resource represents a long-running operation that is the result of a network API call.", - "id": "Operation", - "properties": { - "done": { - "description": "If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.", - "type": "boolean" - }, - "error": { - "$ref": "Status", - "description": "The error result of the operation in case of failure or cancellation." - }, - "metadata": { - "additionalProperties": { - "description": "Properties of the object. Contains field @type with type URL.", - "type": "any" - }, - "description": "Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.", - "type": "object" - }, - "name": { - "description": "The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.", - "type": "string" - }, - "response": { - "additionalProperties": { - "description": "Properties of the object. Contains field @type with type URL.", - "type": "any" - }, - "description": "The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.", - "type": "object" - } - }, - "type": "object" - }, - "Option": { - "description": "A protocol buffer option, which can be attached to a message, field, enumeration, etc. New usages of this message as an alternative to FileOptions, MessageOptions, FieldOptions, EnumOptions, EnumValueOptions, ServiceOptions, or MethodOptions are strongly discouraged.", - "id": "Option", - "properties": { - "name": { - "description": "The option's name. For protobuf built-in options (options defined in descriptor.proto), this is the short name. For example, `\"map_entry\"`. For custom options, it should be the fully-qualified name. For example, `\"google.api.http\"`.", - "type": "string" - }, - "value": { - "additionalProperties": { - "description": "Properties of the object. Contains field @type with type URL.", - "type": "any" - }, - "description": "The option's value packed in an Any message. If the value is a primitive, the corresponding wrapper type defined in google/protobuf/wrappers.proto should be used. If the value is an enum, it should be stored as an int32 value using the google.protobuf.Int32Value type.", - "type": "object" - } - }, - "type": "object" - }, - "Page": { - "description": "Represents a documentation page. A page can contain subpages to represent nested documentation set structure.", - "id": "Page", - "properties": { - "content": { - "description": "The Markdown content of the page. You can use ```(== include {path} ==)``` to include content from a Markdown file. The content can be used to produce the documentation page such as HTML format page.", - "type": "string" - }, - "name": { - "description": "The name of the page. It will be used as an identity of the page to generate URI of the page, text of the link to this page in navigation, etc. The full page name (start from the root page name to this page concatenated with `.`) can be used as reference to the page in your documentation. For example: pages: - name: Tutorial content: (== include tutorial.md ==) subpages: - name: Java content: (== include tutorial_java.md ==) You can reference `Java` page using Markdown reference link syntax: `Java`.", - "type": "string" - }, - "subpages": { - "description": "Subpages of this page. The order of subpages specified here will be honored in the generated docset.", - "items": { - "$ref": "Page" - }, - "type": "array" - } - }, - "type": "object" - }, - "PartialDeleteConnectionMetadata": { - "description": "Metadata provided through GetOperation request for the LRO generated by Partial Delete Connection API", - "id": "PartialDeleteConnectionMetadata", - "properties": {}, - "type": "object" - }, - "PeeredDnsDomain": { - "description": "DNS domain suffix for which requests originating in the producer VPC network are resolved in the associated consumer VPC network.", - "id": "PeeredDnsDomain", - "properties": { - "dnsSuffix": { - "description": "The DNS domain name suffix e.g. `example.com.`. Cloud DNS requires that a DNS suffix ends with a trailing dot.", - "type": "string" - }, - "name": { - "description": "Required. User assigned name for this resource. Must be unique within the consumer network. The name must be 1-63 characters long, must begin with a letter, end with a letter or digit, and only contain lowercase letters, digits or dashes.", - "type": "string" - } - }, - "type": "object" - }, - "PeeredDnsDomainMetadata": { - "description": "Metadata provided through GetOperation request for the LRO generated by CreatePeeredDnsDomain API.", - "id": "PeeredDnsDomainMetadata", - "properties": {}, - "type": "object" - }, - "PhpSettings": { - "description": "Settings for Php client libraries.", - "id": "PhpSettings", - "properties": { - "common": { - "$ref": "CommonLanguageSettings", - "description": "Some settings." - }, - "libraryPackage": { - "description": "The package name to use in Php. Clobbers the php_namespace option set in the protobuf. This should be used **only** by APIs who have already set the language_settings.php.package_name\" field in gapic.yaml. API teams should use the protobuf php_namespace option where possible. Example of a YAML configuration:: publishing: library_settings: php_settings: library_package: Google\\Cloud\\PubSub\\V1", - "type": "string" - } - }, - "type": "object" - }, - "PolicyBinding": { - "description": "Grouping of IAM role and IAM member.", - "id": "PolicyBinding", - "properties": { - "member": { - "description": "Required. Member to bind the role with. See /iam/docs/reference/rest/v1/Policy#Binding for how to format each member. Eg. - user:myuser@mydomain.com - serviceAccount:my-service-account@app.gserviceaccount.com", - "type": "string" - }, - "role": { - "description": "Required. Role to apply. Only allowlisted roles can be used at the specified granularity. The role must be one of the following: - 'roles/container.hostServiceAgentUser' applied on the shared VPC host project - 'roles/compute.securityAdmin' applied on the shared VPC host project - 'roles/compute.networkAdmin' applied on the shared VPC host project - 'roles/tpu.xpnAgent' applied on the shared VPC host project - 'roles/dns.admin' applied on the shared VPC host project - 'roles/logging.admin' applied on the shared VPC host project - 'roles/monitoring.viewer' applied on the shared VPC host project - 'roles/servicemanagement.quotaViewer' applied on the shared VPC host project", - "type": "string" - } - }, - "type": "object" - }, - "Publishing": { - "description": "This message configures the settings for publishing [Google Cloud Client libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) generated from the service config.", - "id": "Publishing", - "properties": { - "apiShortName": { - "description": "Used as a tracking tag when collecting data about the APIs developer relations artifacts like docs, packages delivered to package managers, etc. Example: \"speech\".", - "type": "string" - }, - "codeownerGithubTeams": { - "description": "GitHub teams to be added to CODEOWNERS in the directory in GitHub containing source code for the client libraries for this API.", - "items": { - "type": "string" - }, - "type": "array" - }, - "docTagPrefix": { - "description": "A prefix used in sample code when demarking regions to be included in documentation.", - "type": "string" - }, - "documentationUri": { - "description": "Link to product home page. Example: https://cloud.google.com/asset-inventory/docs/overview", - "type": "string" - }, - "githubLabel": { - "description": "GitHub label to apply to issues and pull requests opened for this API.", - "type": "string" - }, - "librarySettings": { - "description": "Client library settings. If the same version string appears multiple times in this list, then the last one wins. Settings from earlier settings with the same version string are discarded.", - "items": { - "$ref": "ClientLibrarySettings" - }, - "type": "array" - }, - "methodSettings": { - "description": "A list of API method settings, e.g. the behavior for methods that use the long-running operation pattern.", - "items": { - "$ref": "MethodSettings" - }, - "type": "array" - }, - "newIssueUri": { - "description": "Link to a *public* URI where users can report issues. Example: https://issuetracker.google.com/issues/new?component=190865\u0026template=1161103", - "type": "string" - }, - "organization": { - "description": "For whom the client library is being published.", - "enum": [ - "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED", - "CLOUD", - "ADS", - "PHOTOS", - "STREET_VIEW", - "SHOPPING", - "GEO", - "GENERATIVE_AI" - ], - "enumDescriptions": [ - "Not useful.", - "Google Cloud Platform Org.", - "Ads (Advertising) Org.", - "Photos Org.", - "Street View Org.", - "Shopping Org.", - "Geo Org.", - "Generative AI - https://developers.generativeai.google" - ], - "type": "string" - }, - "protoReferenceDocumentationUri": { - "description": "Optional link to proto reference documentation. Example: https://cloud.google.com/pubsub/lite/docs/reference/rpc", - "type": "string" - }, - "restReferenceDocumentationUri": { - "description": "Optional link to REST reference documentation. Example: https://cloud.google.com/pubsub/lite/docs/reference/rest", - "type": "string" - } - }, - "type": "object" - }, - "PythonSettings": { - "description": "Settings for Python client libraries.", - "id": "PythonSettings", - "properties": { - "common": { - "$ref": "CommonLanguageSettings", - "description": "Some settings." - }, - "experimentalFeatures": { - "$ref": "ExperimentalFeatures", - "description": "Experimental features to be included during client library generation." - } - }, - "type": "object" - }, - "Quota": { - "description": "Quota configuration helps to achieve fairness and budgeting in service usage. The metric based quota configuration works this way: - The service configuration defines a set of metrics. - For API calls, the quota.metric_rules maps methods to metrics with corresponding costs. - The quota.limits defines limits on the metrics, which will be used for quota checks at runtime. An example quota configuration in yaml format: quota: limits: - name: apiWriteQpsPerProject metric: library.googleapis.com/write_calls unit: \"1/min/{project}\" # rate limit for consumer projects values: STANDARD: 10000 (The metric rules bind all methods to the read_calls metric, except for the UpdateBook and DeleteBook methods. These two methods are mapped to the write_calls metric, with the UpdateBook method consuming at twice rate as the DeleteBook method.) metric_rules: - selector: \"*\" metric_costs: library.googleapis.com/read_calls: 1 - selector: google.example.library.v1.LibraryService.UpdateBook metric_costs: library.googleapis.com/write_calls: 2 - selector: google.example.library.v1.LibraryService.DeleteBook metric_costs: library.googleapis.com/write_calls: 1 Corresponding Metric definition: metrics: - name: library.googleapis.com/read_calls display_name: Read requests metric_kind: DELTA value_type: INT64 - name: library.googleapis.com/write_calls display_name: Write requests metric_kind: DELTA value_type: INT64 ", - "id": "Quota", - "properties": { - "limits": { - "description": "List of QuotaLimit definitions for the service.", - "items": { - "$ref": "QuotaLimit" - }, - "type": "array" - }, - "metricRules": { - "description": "List of MetricRule definitions, each one mapping a selected method to one or more metrics.", - "items": { - "$ref": "MetricRule" - }, - "type": "array" - } - }, - "type": "object" - }, - "QuotaLimit": { - "description": "`QuotaLimit` defines a specific limit that applies over a specified duration for a limit type. There can be at most one limit for a duration and limit type combination defined within a `QuotaGroup`.", - "id": "QuotaLimit", - "properties": { - "defaultLimit": { - "description": "Default number of tokens that can be consumed during the specified duration. This is the number of tokens assigned when a client application developer activates the service for his/her project. Specifying a value of 0 will block all requests. This can be used if you are provisioning quota to selected consumers and blocking others. Similarly, a value of -1 will indicate an unlimited quota. No other negative values are allowed. Used by group-based quotas only.", - "format": "int64", - "type": "string" - }, - "description": { - "description": "Optional. User-visible, extended description for this quota limit. Should be used only when more context is needed to understand this limit than provided by the limit's display name (see: `display_name`).", - "type": "string" - }, - "displayName": { - "description": "User-visible display name for this limit. Optional. If not set, the UI will provide a default display name based on the quota configuration. This field can be used to override the default display name generated from the configuration.", - "type": "string" - }, - "duration": { - "description": "Duration of this limit in textual notation. Must be \"100s\" or \"1d\". Used by group-based quotas only.", - "type": "string" - }, - "freeTier": { - "description": "Free tier value displayed in the Developers Console for this limit. The free tier is the number of tokens that will be subtracted from the billed amount when billing is enabled. This field can only be set on a limit with duration \"1d\", in a billable group; it is invalid on any other limit. If this field is not set, it defaults to 0, indicating that there is no free tier for this service. Used by group-based quotas only.", - "format": "int64", - "type": "string" - }, - "maxLimit": { - "description": "Maximum number of tokens that can be consumed during the specified duration. Client application developers can override the default limit up to this maximum. If specified, this value cannot be set to a value less than the default limit. If not specified, it is set to the default limit. To allow clients to apply overrides with no upper bound, set this to -1, indicating unlimited maximum quota. Used by group-based quotas only.", - "format": "int64", - "type": "string" - }, - "metric": { - "description": "The name of the metric this quota limit applies to. The quota limits with the same metric will be checked together during runtime. The metric must be defined within the service config.", - "type": "string" - }, - "name": { - "description": "Name of the quota limit. The name must be provided, and it must be unique within the service. The name can only include alphanumeric characters as well as '-'. The maximum length of the limit name is 64 characters.", - "type": "string" - }, - "unit": { - "description": "Specify the unit of the quota limit. It uses the same syntax as MetricDescriptor.unit. The supported unit kinds are determined by the quota backend system. Here are some examples: * \"1/min/{project}\" for quota per minute per project. Note: the order of unit components is insignificant. The \"1\" at the beginning is required to follow the metric unit syntax.", - "type": "string" - }, - "values": { - "additionalProperties": { - "format": "int64", - "type": "string" - }, - "description": "Tiered limit values. You must specify this as a key:value pair, with an integer value that is the maximum number of requests allowed for the specified unit. Currently only STANDARD is supported.", - "type": "object" - } - }, - "type": "object" - }, - "Range": { - "description": "Represents a found unused range.", - "id": "Range", - "properties": { - "ipCidrRange": { - "description": "CIDR range in \"10.x.x.x/y\" format that is within the allocated ranges and currently unused.", - "type": "string" - }, - "network": { - "description": "In the Shared VPC host project, the VPC network that's peered with the consumer network. For example: `projects/1234321/global/networks/host-network`", - "type": "string" - } - }, - "type": "object" - }, - "RangeReservation": { - "description": "Represents a range reservation.", - "id": "RangeReservation", - "properties": { - "ipPrefixLength": { - "description": "Required. The size of the desired subnet. Use usual CIDR range notation. For example, '29' to find unused x.x.x.x/29 CIDR range. The goal is to determine if one of the allocated ranges has enough free space for a subnet of the requested size. GCE disallows subnets with prefix_length \u003e 29", - "format": "int32", - "type": "integer" - }, - "requestedRanges": { - "description": "Optional. The name of one or more allocated IP address ranges associated with this private service access connection. If no range names are provided all ranges associated with this connection will be considered. If a CIDR range with the specified IP prefix length is not available within these ranges the validation fails.", - "items": { - "type": "string" - }, - "type": "array" - }, - "secondaryRangeIpPrefixLengths": { - "description": "Optional. The size of the desired secondary ranges for the subnet. Use usual CIDR range notation. For example, '29' to find unused x.x.x.x/29 CIDR range. The goal is to determine that the allocated ranges have enough free space for all the requested secondary ranges. GCE disallows subnets with prefix_length \u003e 29", - "items": { - "format": "int32", - "type": "integer" - }, - "type": "array" - }, - "subnetworkCandidates": { - "description": "Optional. List of subnetwork candidates to validate. The required input fields are `name`, `network`, and `region`. Subnetworks from this list which exist will be returned in the response with the `ip_cidr_range`, `secondary_ip_cider_ranges`, and `outside_allocation` fields set.", - "items": { - "$ref": "Subnetwork" - }, - "type": "array" - } - }, - "type": "object" - }, - "RemoveDnsRecordSetMetadata": { - "description": "Metadata provided through GetOperation request for the LRO generated by RemoveDnsRecordSet API", - "id": "RemoveDnsRecordSetMetadata", - "properties": {}, - "type": "object" - }, - "RemoveDnsRecordSetRequest": { - "description": "Request to remove a record set from a private managed DNS zone in the shared producer host project. The name, type, ttl, and data values must all exactly match an existing record set in the specified zone.", - "id": "RemoveDnsRecordSetRequest", - "properties": { - "consumerNetwork": { - "description": "Required. The network that the consumer is using to connect with services. Must be in the form of projects/{project}/global/networks/{network} {project} is the project number, as in '12345' {network} is the network name.", - "type": "string" - }, - "dnsRecordSet": { - "$ref": "DnsRecordSet", - "description": "Required. The DNS record set to remove." - }, - "zone": { - "description": "Required. The name of the private DNS zone in the shared producer host project from which the record set will be removed.", - "type": "string" - } - }, - "type": "object" - }, - "RemoveDnsRecordSetResponse": { - "description": "Blank message response type for RemoveDnsRecordSet API", - "id": "RemoveDnsRecordSetResponse", - "properties": {}, - "type": "object" - }, - "RemoveDnsZoneMetadata": { - "description": "Metadata provided through GetOperation request for the LRO generated by RemoveDnsZone API", - "id": "RemoveDnsZoneMetadata", - "properties": {}, - "type": "object" - }, - "RemoveDnsZoneRequest": { - "description": "Request to remove a private managed DNS zone in the shared producer host project and a matching DNS peering zone in the consumer project.", - "id": "RemoveDnsZoneRequest", - "properties": { - "consumerNetwork": { - "description": "Required. The network that the consumer is using to connect with services. Must be in the form of projects/{project}/global/networks/{network} {project} is the project number, as in '12345' {network} is the network name.", - "type": "string" - }, - "name": { - "description": "Required. The name for both the private zone in the shared producer host project and the peering zone in the consumer project.", - "type": "string" - } - }, - "type": "object" - }, - "RemoveDnsZoneResponse": { - "description": "Blank message response type for RemoveDnsZone API", - "id": "RemoveDnsZoneResponse", - "properties": {}, - "type": "object" - }, - "Route": { - "description": "Represents a route that was created or discovered by a private access management service.", - "id": "Route", - "properties": { - "destRange": { - "description": "Destination CIDR range that this route applies to.", - "type": "string" - }, - "name": { - "description": "Route name. See https://cloud.google.com/vpc/docs/routes", - "type": "string" - }, - "network": { - "description": "Fully-qualified URL of the VPC network in the producer host tenant project that this route applies to. For example: `projects/123456/global/networks/host-network`", - "type": "string" - }, - "nextHopGateway": { - "description": "Fully-qualified URL of the gateway that should handle matching packets that this route applies to. For example: `projects/123456/global/gateways/default-internet-gateway`", - "type": "string" - } - }, - "type": "object" - }, - "RubySettings": { - "description": "Settings for Ruby client libraries.", - "id": "RubySettings", - "properties": { - "common": { - "$ref": "CommonLanguageSettings", - "description": "Some settings." - } - }, - "type": "object" - }, - "SearchRangeRequest": { - "description": "Request to search for an unused range within allocated ranges.", - "id": "SearchRangeRequest", - "properties": { - "ipPrefixLength": { - "description": "Required. The prefix length of the IP range. Use usual CIDR range notation. For example, '30' to find unused x.x.x.x/30 CIDR range. Actual range will be determined using allocated range for the consumer peered network and returned in the result.", - "format": "int32", - "type": "integer" - }, - "network": { - "description": "Required. Network name in the consumer project. This network must have been already peered with a shared VPC network using CreateConnection method. Must be in a form 'projects/{project}/global/networks/{network}'. {project} is a project number, as in '12345' {network} is network name.", - "type": "string" - } - }, - "type": "object" - }, - "SecondaryIpRange": { - "id": "SecondaryIpRange", - "properties": { - "ipCidrRange": { - "description": "Secondary IP CIDR range in `x.x.x.x/y` format.", - "type": "string" - }, - "rangeName": { - "description": "Name of the secondary IP range.", - "type": "string" - } - }, - "type": "object" - }, - "SecondaryIpRangeSpec": { - "id": "SecondaryIpRangeSpec", - "properties": { - "ipPrefixLength": { - "description": "Required. The prefix length of the secondary IP range. Use CIDR range notation, such as `30` to provision a secondary IP range with an `x.x.x.x/30` CIDR range. The IP address range is drawn from a pool of available ranges in the service consumer's allocated range.", - "format": "int32", - "type": "integer" - }, - "outsideAllocationPublicIpRange": { - "description": "Optional. Enable outside allocation using public IP addresses. Any public IP range may be specified. If this field is provided, we will not use customer reserved ranges for this secondary IP range.", - "type": "string" - }, - "rangeName": { - "description": "Required. A name for the secondary IP range. The name must be 1-63 characters long, and comply with RFC1035. The name must be unique within the subnetwork.", - "type": "string" - }, - "requestedAddress": { - "description": "Optional. The starting address of a range. The address must be a valid IPv4 address in the x.x.x.x format. This value combined with the IP prefix range is the CIDR range for the secondary IP range. The range must be within the allocated range that is assigned to the private connection. If the CIDR range isn't available, the call fails.", - "type": "string" - } - }, - "type": "object" - }, - "SelectiveGapicGeneration": { - "description": "This message is used to configure the generation of a subset of the RPCs in a service for client libraries.", - "id": "SelectiveGapicGeneration", - "properties": { - "generateOmittedAsInternal": { - "description": "Setting this to true indicates to the client generators that methods that would be excluded from the generation should instead be generated in a way that indicates these methods should not be consumed by end users. How this is expressed is up to individual language implementations to decide. Some examples may be: added annotations, obfuscated identifiers, or other language idiomatic patterns.", - "type": "boolean" - }, - "methods": { - "description": "An allowlist of the fully qualified names of RPCs that should be included on public client surfaces.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "Service": { - "description": "`Service` is the root object of Google API service configuration (service config). It describes the basic information about a logical service, such as the service name and the user-facing title, and delegates other aspects to sub-sections. Each sub-section is either a proto message or a repeated proto message that configures a specific aspect, such as auth. For more information, see each proto message definition. Example: type: google.api.Service name: calendar.googleapis.com title: Google Calendar API apis: - name: google.calendar.v3.Calendar visibility: rules: - selector: \"google.calendar.v3.*\" restriction: PREVIEW backend: rules: - selector: \"google.calendar.v3.*\" address: calendar.example.com authentication: providers: - id: google_calendar_auth jwks_uri: https://www.googleapis.com/oauth2/v1/certs issuer: https://securetoken.google.com rules: - selector: \"*\" requirements: provider_id: google_calendar_auth", - "id": "Service", - "properties": { - "apis": { - "description": "A list of API interfaces exported by this service. Only the `name` field of the google.protobuf.Api needs to be provided by the configuration author, as the remaining fields will be derived from the IDL during the normalization process. It is an error to specify an API interface here which cannot be resolved against the associated IDL files.", - "items": { - "$ref": "Api" - }, - "type": "array" - }, - "aspects": { - "description": "Configuration aspects. This is a repeated field to allow multiple aspects to be configured. The kind field in each ConfigAspect specifies the type of aspect. The spec field contains the configuration for that aspect. The schema for the spec field is defined by the backend service owners.", - "items": { - "$ref": "Aspect" - }, - "type": "array" - }, - "authentication": { - "$ref": "Authentication", - "description": "Auth configuration." - }, - "backend": { - "$ref": "Backend", - "description": "API backend configuration." - }, - "billing": { - "$ref": "Billing", - "description": "Billing configuration." - }, - "configVersion": { - "description": "Obsolete. Do not use. This field has no semantic meaning. The service config compiler always sets this field to `3`.", - "format": "uint32", - "type": "integer" - }, - "context": { - "$ref": "Context", - "description": "Context configuration." - }, - "control": { - "$ref": "Control", - "description": "Configuration for the service control plane." - }, - "customError": { - "$ref": "CustomError", - "description": "Custom error configuration." - }, - "documentation": { - "$ref": "Documentation", - "description": "Additional API documentation." - }, - "endpoints": { - "description": "Configuration for network endpoints. If this is empty, then an endpoint with the same name as the service is automatically generated to service all defined APIs. WARNING: Defining any entries in the `endpoints` list disables the automatic generation of default endpoint variations (e.g., `{service}.clients6.google.com`, `content-{service}.googleapis.com`, and mTLS variants like `{service}.mtls.googleapis.com`). To retain these default variations, you are required to explicitly include your main service endpoint (e.g., `myservice.googleapis.com`) in this list alongside any other custom endpoints (like REP, GFE, etc.).", - "items": { - "$ref": "Endpoint" - }, - "type": "array" - }, - "enums": { - "description": "A list of all enum types included in this API service. Enums referenced directly or indirectly by the `apis` are automatically included. Enums which are not referenced but shall be included should be listed here by name by the configuration author. Example: enums: - name: google.someapi.v1.SomeEnum", - "items": { - "$ref": "Enum" - }, - "type": "array" - }, - "http": { - "$ref": "Http", - "description": "HTTP configuration." - }, - "id": { - "description": "A unique ID for a specific instance of this message, typically assigned by the client for tracking purpose. Must be no longer than 63 characters and only lower case letters, digits, '.', '_' and '-' are allowed. If empty, the server may choose to generate one instead.", - "type": "string" - }, - "logging": { - "$ref": "Logging", - "description": "Logging configuration." - }, - "logs": { - "description": "Defines the logs used by this service.", - "items": { - "$ref": "LogDescriptor" - }, - "type": "array" - }, - "metrics": { - "description": "Defines the metrics used by this service.", - "items": { - "$ref": "MetricDescriptor" - }, - "type": "array" - }, - "monitoredResources": { - "description": "Defines the monitored resources used by this service. This is required by the `Service.monitoring` and `Service.logging` configurations.", - "items": { - "$ref": "MonitoredResourceDescriptor" - }, - "type": "array" - }, - "monitoring": { - "$ref": "Monitoring", - "description": "Monitoring configuration." - }, - "name": { - "description": "The service name, which is a DNS-like logical identifier for the service, such as `calendar.googleapis.com`. The service name typically goes through DNS verification to make sure the owner of the service also owns the DNS name.", - "type": "string" - }, - "producerProjectId": { - "description": "The Google project that owns this service.", - "type": "string" - }, - "publishing": { - "$ref": "Publishing", - "description": "Settings for [Google Cloud Client libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) generated from APIs defined as protocol buffers." - }, - "quota": { - "$ref": "Quota", - "description": "Quota configuration." - }, - "sourceInfo": { - "$ref": "SourceInfo", - "description": "Output only. The source information for this configuration if available." - }, - "systemParameters": { - "$ref": "SystemParameters", - "description": "System parameter configuration." - }, - "systemTypes": { - "description": "A list of all proto message types included in this API service. It serves similar purpose as [google.api.Service.types], except that these types are not needed by user-defined APIs. Therefore, they will not show up in the generated discovery doc. This field should only be used to define system APIs in ESF.", - "items": { - "$ref": "Type" - }, - "type": "array" - }, - "title": { - "description": "The product title for this service, it is the name displayed in Google Cloud Console.", - "type": "string" - }, - "types": { - "description": "A list of all proto message types included in this API service. Types referenced directly or indirectly by the `apis` are automatically included. Messages which are not referenced but shall be included, such as types used by the `google.protobuf.Any` type, should be listed here by name by the configuration author. Example: types: - name: google.protobuf.Int32", - "items": { - "$ref": "Type" - }, - "type": "array" - }, - "usage": { - "$ref": "Usage", - "description": "Configuration controlling usage of this service." - } - }, - "type": "object" - }, - "SourceContext": { - "description": "`SourceContext` represents information about the source of a protobuf element, like the file in which it is defined.", - "id": "SourceContext", - "properties": { - "fileName": { - "description": "The path-qualified name of the .proto file that contained the associated protobuf element. For example: `\"google/protobuf/source_context.proto\"`.", - "type": "string" - } - }, - "type": "object" - }, - "SourceInfo": { - "description": "Source information used to create a Service Config", - "id": "SourceInfo", - "properties": { - "sourceFiles": { - "description": "All files used during config generation.", - "items": { - "additionalProperties": { - "description": "Properties of the object. Contains field @type with type URL.", - "type": "any" - }, - "type": "object" - }, - "type": "array" - } - }, - "type": "object" - }, - "Status": { - "description": "The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).", - "id": "Status", - "properties": { - "code": { - "description": "The status code, which should be an enum value of google.rpc.Code.", - "format": "int32", - "type": "integer" - }, - "details": { - "description": "A list of messages that carry the error details. There is a common set of message types for APIs to use.", - "items": { - "additionalProperties": { - "description": "Properties of the object. Contains field @type with type URL.", - "type": "any" - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.", - "type": "string" - } - }, - "type": "object" - }, - "Subnetwork": { - "description": "Represents a subnet that was created or discovered by a private access management service.", - "id": "Subnetwork", - "properties": { - "ipCidrRange": { - "description": "Subnetwork CIDR range in `10.x.x.x/y` format.", - "type": "string" - }, - "name": { - "description": "Subnetwork name. See https://cloud.google.com/compute/docs/vpc/", - "type": "string" - }, - "network": { - "description": "In the Shared VPC host project, the VPC network that's peered with the consumer network. For example: `projects/1234321/global/networks/host-network`", - "type": "string" - }, - "outsideAllocation": { - "description": "This is a discovered subnet that is not within the current consumer allocated ranges.", - "type": "boolean" - }, - "region": { - "description": "GCP region where the subnetwork is located.", - "type": "string" - }, - "secondaryIpRanges": { - "description": "List of secondary IP ranges in this subnetwork.", - "items": { - "$ref": "SecondaryIpRange" - }, - "type": "array" - } - }, - "type": "object" - }, - "SystemParameter": { - "description": "Define a parameter's name and location. The parameter may be passed as either an HTTP header or a URL query parameter, and if both are passed the behavior is implementation-dependent.", - "id": "SystemParameter", - "properties": { - "httpHeader": { - "description": "Define the HTTP header name to use for the parameter. It is case insensitive.", - "type": "string" - }, - "name": { - "description": "Define the name of the parameter, such as \"api_key\" . It is case sensitive.", - "type": "string" - }, - "urlQueryParameter": { - "description": "Define the URL query parameter name to use for the parameter. It is case sensitive.", - "type": "string" - } - }, - "type": "object" - }, - "SystemParameterRule": { - "description": "Define a system parameter rule mapping system parameter definitions to methods.", - "id": "SystemParameterRule", - "properties": { - "parameters": { - "description": "Define parameters. Multiple names may be defined for a parameter. For a given method call, only one of them should be used. If multiple names are used the behavior is implementation-dependent. If none of the specified names are present the behavior is parameter-dependent.", - "items": { - "$ref": "SystemParameter" - }, - "type": "array" - }, - "selector": { - "description": "Selects the methods to which this rule applies. Use '*' to indicate all methods in all APIs. Refer to selector for syntax details.", - "type": "string" - } - }, - "type": "object" - }, - "SystemParameters": { - "description": "### System parameter configuration A system parameter is a special kind of parameter defined by the API system, not by an individual API. It is typically mapped to an HTTP header and/or a URL query parameter. This configuration specifies which methods change the names of the system parameters.", - "id": "SystemParameters", - "properties": { - "rules": { - "description": "Define system parameters. The parameters defined here will override the default parameters implemented by the system. If this field is missing from the service config, default system parameters will be used. Default system parameters and names is implementation-dependent. Example: define api key for all methods system_parameters rules: - selector: \"*\" parameters: - name: api_key url_query_parameter: api_key Example: define 2 api key names for a specific method. system_parameters rules: - selector: \"/ListShelves\" parameters: - name: api_key http_header: Api-Key1 - name: api_key http_header: Api-Key2 **NOTE:** All service configuration rules follow \"last one wins\" order.", - "items": { - "$ref": "SystemParameterRule" - }, - "type": "array" - } - }, - "type": "object" - }, - "Type": { - "description": "A protocol buffer message type. New usages of this message as an alternative to DescriptorProto are strongly discouraged. This message does not reliability preserve all information necessary to model the schema and preserve semantics. Instead make use of FileDescriptorSet which preserves the necessary information.", - "id": "Type", - "properties": { - "edition": { - "description": "The source edition string, only valid when syntax is SYNTAX_EDITIONS.", - "type": "string" - }, - "fields": { - "description": "The list of fields.", - "items": { - "$ref": "Field" - }, - "type": "array" - }, - "name": { - "description": "The fully qualified message name.", - "type": "string" - }, - "oneofs": { - "description": "The list of types appearing in `oneof` definitions in this type.", - "items": { - "type": "string" - }, - "type": "array" - }, - "options": { - "description": "The protocol buffer options.", - "items": { - "$ref": "Option" - }, - "type": "array" - }, - "sourceContext": { - "$ref": "SourceContext", - "description": "The source context." - }, - "syntax": { - "description": "The source syntax.", - "enum": [ - "SYNTAX_PROTO2", - "SYNTAX_PROTO3", - "SYNTAX_EDITIONS" - ], - "enumDescriptions": [ - "Syntax `proto2`.", - "Syntax `proto3`.", - "Syntax `editions`." - ], - "type": "string" - } - }, - "type": "object" - }, - "UpdateConsumerConfigRequest": { - "description": "Request to update the configuration of a service networking connection including the import/export of custom routes and subnetwork routes with public IP.", - "id": "UpdateConsumerConfigRequest", - "properties": { - "consumerConfig": { - "$ref": "ConsumerConfig", - "description": "Required. The updated peering config." - } - }, - "type": "object" - }, - "UpdateDnsRecordSetMetadata": { - "description": "Metadata provided through GetOperation request for the LRO generated by UpdateDnsRecordSet API", - "id": "UpdateDnsRecordSetMetadata", - "properties": {}, - "type": "object" - }, - "UpdateDnsRecordSetRequest": { - "description": "Request to update a record set from a private managed DNS zone in the shared producer host project. The name, type, ttl, and data values of the existing record set must all exactly match an existing record set in the specified zone.", - "id": "UpdateDnsRecordSetRequest", - "properties": { - "consumerNetwork": { - "description": "Required. The network that the consumer is using to connect with services. Must be in the form of projects/{project}/global/networks/{network} {project} is the project number, as in '12345' {network} is the network name.", - "type": "string" - }, - "existingDnsRecordSet": { - "$ref": "DnsRecordSet", - "description": "Required. The existing DNS record set to update." - }, - "newDnsRecordSet": { - "$ref": "DnsRecordSet", - "description": "Required. The new values that the DNS record set should be updated to hold." - }, - "zone": { - "description": "Required. The name of the private DNS zone in the shared producer host project from which the record set will be removed.", - "type": "string" - } - }, - "type": "object" - }, - "Usage": { - "description": "Configuration controlling usage of a service.", - "id": "Usage", - "properties": { - "producerNotificationChannel": { - "description": "The full resource name of a channel used for sending notifications to the service producer. Google Service Management currently only supports [Google Cloud Pub/Sub](https://cloud.google.com/pubsub) as a notification channel. To use Google Cloud Pub/Sub as the channel, this must be the name of a Cloud Pub/Sub topic that uses the Cloud Pub/Sub topic name format documented in https://cloud.google.com/pubsub/docs/overview.", - "type": "string" - }, - "requirements": { - "description": "Requirements that must be satisfied before a consumer project can use the service. Each requirement is of the form /; for example 'serviceusage.googleapis.com/billing-enabled'. For Google APIs, a Terms of Service requirement must be included here. Google Cloud APIs must include \"serviceusage.googleapis.com/tos/cloud\". Other Google APIs should include \"serviceusage.googleapis.com/tos/universal\". Additional ToS can be included based on the business needs.", - "items": { - "type": "string" - }, - "type": "array" - }, - "rules": { - "description": "A list of usage rules that apply to individual API methods. **NOTE:** All service configuration rules follow \"last one wins\" order.", - "items": { - "$ref": "UsageRule" - }, - "type": "array" - } - }, - "type": "object" - }, - "UsageRule": { - "description": "Usage configuration rules for the service.", - "id": "UsageRule", - "properties": { - "allowUnregisteredCalls": { - "description": " Use this rule to configure unregistered calls for the service. Unregistered calls are calls that do not contain consumer project identity. (Example: calls that do not contain an API key). WARNING: By default, API methods do not allow unregistered calls, and each method call must be identified by a consumer project identity.", - "type": "boolean" - }, - "selector": { - "description": "Selects the methods to which this rule applies. Use '*' to indicate all methods in all APIs. Refer to selector for syntax details.", - "type": "string" - }, - "skipServiceControl": { - "description": "If true, the selected method should skip service control and the control plane features, such as quota and billing, will not be available. This flag is used by Google Cloud Endpoints to bypass checks for internal methods, such as service health check methods.", - "type": "boolean" - } - }, - "type": "object" - }, - "ValidateConsumerConfigRequest": { - "id": "ValidateConsumerConfigRequest", - "properties": { - "checkServiceNetworkingUsePermission": { - "description": "Optional. The IAM permission check determines whether the consumer project has 'servicenetworking.services.use' permission or not.", - "type": "boolean" - }, - "consumerNetwork": { - "description": "Required. The network that the consumer is using to connect with services. Must be in the form of projects/{project}/global/networks/{network} {project} is a project number, as in '12345' {network} is network name.", - "type": "string" - }, - "consumerProject": { - "$ref": "ConsumerProject", - "description": "NETWORK_NOT_IN_CONSUMERS_PROJECT, NETWORK_NOT_IN_CONSUMERS_HOST_PROJECT, and HOST_PROJECT_NOT_FOUND are done when consumer_project is provided." - }, - "rangeReservation": { - "$ref": "RangeReservation", - "description": "RANGES_EXHAUSTED, RANGES_NOT_RESERVED, and RANGES_DELETED_LATER are done when range_reservation is provided." - }, - "validateNetwork": { - "description": "The validations will be performed in the order listed in the ValidationError enum. The first failure will return. If a validation is not requested, then the next one will be performed. SERVICE_NETWORKING_NOT_ENABLED and NETWORK_NOT_PEERED checks are performed for all requests where validation is requested. NETWORK_NOT_FOUND and NETWORK_DISCONNECTED checks are done for requests that have validate_network set to true.", - "type": "boolean" - } - }, - "type": "object" - }, - "ValidateConsumerConfigResponse": { - "id": "ValidateConsumerConfigResponse", - "properties": { - "existingSubnetworkCandidates": { - "description": "List of subnetwork candidates from the request which exist with the `ip_cidr_range`, `secondary_ip_cider_ranges`, and `outside_allocation` fields set.", - "items": { - "$ref": "Subnetwork" - }, - "type": "array" - }, - "isValid": { - "description": "Indicates whether all the requested validations passed.", - "type": "boolean" - }, - "validationError": { - "description": "The first validation which failed.", - "enum": [ - "VALIDATION_ERROR_UNSPECIFIED", - "VALIDATION_NOT_REQUESTED", - "SERVICE_NETWORKING_NOT_ENABLED", - "NETWORK_NOT_FOUND", - "NETWORK_NOT_PEERED", - "NETWORK_PEERING_DELETED", - "NETWORK_NOT_IN_CONSUMERS_PROJECT", - "NETWORK_NOT_IN_CONSUMERS_HOST_PROJECT", - "HOST_PROJECT_NOT_FOUND", - "CONSUMER_PROJECT_NOT_SERVICE_PROJECT", - "RANGES_EXHAUSTED", - "RANGES_NOT_RESERVED", - "RANGES_DELETED_LATER", - "COMPUTE_API_NOT_ENABLED", - "USE_PERMISSION_NOT_FOUND", - "SN_SERVICE_AGENT_PERMISSION_DENIED_ON_CONSUMER_PROJECT" - ], - "enumDescriptions": [ - "", - "In case none of the validations are requested.", - "", - "The network provided by the consumer does not exist.", - "The network has not been peered with the producer org.", - "The peering was created and later deleted.", - "The network is a regular VPC but the network is not in the consumer's project.", - "The consumer project is a service project, and network is a shared VPC, but the network is not in the host project of this consumer project.", - "The host project associated with the consumer project was not found.", - "The consumer project is not a service project for the specified host project.", - "The reserved IP ranges do not have enough space to create a subnet of desired size.", - "The IP ranges were not reserved.", - "The IP ranges were reserved but deleted later.", - "The consumer project does not have the compute api enabled.", - "The consumer project does not have the permission from the host project.", - "The SN service agent {service-@service-networking.iam.gserviceaccount.com} does not have the SN service agent role on the consumer project." - ], - "type": "string" - } - }, - "type": "object" - }, - "VpcServiceControls": { - "description": "Response for the get VPC Service Controls request.", - "id": "VpcServiceControls", - "properties": { - "enabled": { - "description": "Output only. Indicates whether the VPC Service Controls are enabled or disabled for the connection. If the consumer called the EnableVpcServiceControls method, then this is true. If the consumer called DisableVpcServiceControls, then this is false. The default is false.", - "readOnly": true, - "type": "boolean" - } - }, - "type": "object" - } - }, - "servicePath": "", - "title": "Service Networking API", - "version": "v1", - "version_module": true -} \ No newline at end of file diff --git a/vendor/google.golang.org/api/servicenetworking/v1/servicenetworking-gen.go b/vendor/google.golang.org/api/servicenetworking/v1/servicenetworking-gen.go deleted file mode 100644 index 9cf31d4a70..0000000000 --- a/vendor/google.golang.org/api/servicenetworking/v1/servicenetworking-gen.go +++ /dev/null @@ -1,8532 +0,0 @@ -// Copyright 2026 Google LLC. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// Code generated file. DO NOT EDIT. - -// Package servicenetworking provides access to the Service Networking API. -// -// For product documentation, see: https://cloud.google.com/service-infrastructure/docs/service-networking/getting-started -// -// # Library status -// -// These client libraries are officially supported by Google. However, this -// library is considered complete and is in maintenance mode. This means -// that we will address critical bugs and security issues but will not add -// any new features. -// -// When possible, we recommend using our newer -// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) -// that are still actively being worked and iterated on. -// -// # Creating a client -// -// Usage example: -// -// import "google.golang.org/api/servicenetworking/v1" -// ... -// ctx := context.Background() -// servicenetworkingService, err := servicenetworking.NewService(ctx) -// -// In this example, Google Application Default Credentials are used for -// authentication. For information on how to create and obtain Application -// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. -// -// # Other authentication options -// -// By default, all available scopes (see "Constants") are used to authenticate. -// To restrict scopes, use [google.golang.org/api/option.WithScopes]: -// -// servicenetworkingService, err := servicenetworking.NewService(ctx, option.WithScopes(servicenetworking.ServiceManagementScope)) -// -// To use an API key for authentication (note: some APIs do not support API -// keys), use [google.golang.org/api/option.WithAPIKey]: -// -// servicenetworkingService, err := servicenetworking.NewService(ctx, option.WithAPIKey("AIza...")) -// -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth -// flow, use [google.golang.org/api/option.WithTokenSource]: -// -// config := &oauth2.Config{...} -// // ... -// token, err := config.Exchange(ctx, ...) -// servicenetworkingService, err := servicenetworking.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) -// -// See [google.golang.org/api/option.ClientOption] for details on options. -package servicenetworking // import "google.golang.org/api/servicenetworking/v1" - -import ( - "bytes" - "context" - "encoding/json" - "errors" - "fmt" - "io" - "log/slog" - "net/http" - "net/url" - "strconv" - "strings" - - "github.com/googleapis/gax-go/v2/internallog" - googleapi "google.golang.org/api/googleapi" - internal "google.golang.org/api/internal" - gensupport "google.golang.org/api/internal/gensupport" - option "google.golang.org/api/option" - internaloption "google.golang.org/api/option/internaloption" - htransport "google.golang.org/api/transport/http" -) - -// Always reference these packages, just in case the auto-generated code -// below doesn't. -var _ = bytes.NewBuffer -var _ = strconv.Itoa -var _ = fmt.Sprintf -var _ = json.NewDecoder -var _ = io.Copy -var _ = url.Parse -var _ = gensupport.MarshalJSON -var _ = googleapi.Version -var _ = errors.New -var _ = strings.Replace -var _ = context.Canceled -var _ = internaloption.WithDefaultEndpoint -var _ = internal.Version -var _ = internallog.New - -const apiId = "servicenetworking:v1" -const apiName = "servicenetworking" -const apiVersion = "v1" -const basePath = "https://servicenetworking.googleapis.com/" -const basePathTemplate = "https://servicenetworking.UNIVERSE_DOMAIN/" -const mtlsBasePath = "https://servicenetworking.mtls.googleapis.com/" - -// OAuth2 scopes used by this API. -const ( - // See, edit, configure, and delete your Google Cloud data and see the email - // address for your Google Account. - CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform" - - // Manage your Google API service configuration - ServiceManagementScope = "https://www.googleapis.com/auth/service.management" -) - -// NewService creates a new APIService. -func NewService(ctx context.Context, opts ...option.ClientOption) (*APIService, error) { - scopesOption := internaloption.WithDefaultScopes( - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/service.management", - ) - // NOTE: prepend, so we don't override user-specified scopes. - opts = append([]option.ClientOption{scopesOption}, opts...) - opts = append(opts, internaloption.WithDefaultEndpoint(basePath)) - opts = append(opts, internaloption.WithDefaultEndpointTemplate(basePathTemplate)) - opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath)) - opts = append(opts, internaloption.EnableNewAuthLibrary()) - client, endpoint, err := htransport.NewClient(ctx, opts...) - if err != nil { - return nil, err - } - s := &APIService{client: client, BasePath: basePath, logger: internaloption.GetLogger(opts)} - s.Operations = NewOperationsService(s) - s.Services = NewServicesService(s) - if endpoint != "" { - s.BasePath = endpoint - } - return s, nil -} - -// New creates a new APIService. It uses the provided http.Client for requests. -// -// Deprecated: please use NewService instead. -// To provide a custom HTTP client, use option.WithHTTPClient. -// If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead. -func New(client *http.Client) (*APIService, error) { - if client == nil { - return nil, errors.New("client is nil") - } - return NewService(context.TODO(), option.WithHTTPClient(client)) -} - -type APIService struct { - client *http.Client - logger *slog.Logger - BasePath string // API endpoint base URL - UserAgent string // optional additional User-Agent fragment - - Operations *OperationsService - - Services *ServicesService -} - -func (s *APIService) userAgent() string { - if s.UserAgent == "" { - return googleapi.UserAgent - } - return googleapi.UserAgent + " " + s.UserAgent -} - -func NewOperationsService(s *APIService) *OperationsService { - rs := &OperationsService{s: s} - return rs -} - -type OperationsService struct { - s *APIService -} - -func NewServicesService(s *APIService) *ServicesService { - rs := &ServicesService{s: s} - rs.Connections = NewServicesConnectionsService(s) - rs.DnsRecordSets = NewServicesDnsRecordSetsService(s) - rs.DnsZones = NewServicesDnsZonesService(s) - rs.Projects = NewServicesProjectsService(s) - rs.Roles = NewServicesRolesService(s) - return rs -} - -type ServicesService struct { - s *APIService - - Connections *ServicesConnectionsService - - DnsRecordSets *ServicesDnsRecordSetsService - - DnsZones *ServicesDnsZonesService - - Projects *ServicesProjectsService - - Roles *ServicesRolesService -} - -func NewServicesConnectionsService(s *APIService) *ServicesConnectionsService { - rs := &ServicesConnectionsService{s: s} - return rs -} - -type ServicesConnectionsService struct { - s *APIService -} - -func NewServicesDnsRecordSetsService(s *APIService) *ServicesDnsRecordSetsService { - rs := &ServicesDnsRecordSetsService{s: s} - return rs -} - -type ServicesDnsRecordSetsService struct { - s *APIService -} - -func NewServicesDnsZonesService(s *APIService) *ServicesDnsZonesService { - rs := &ServicesDnsZonesService{s: s} - return rs -} - -type ServicesDnsZonesService struct { - s *APIService -} - -func NewServicesProjectsService(s *APIService) *ServicesProjectsService { - rs := &ServicesProjectsService{s: s} - rs.Global = NewServicesProjectsGlobalService(s) - return rs -} - -type ServicesProjectsService struct { - s *APIService - - Global *ServicesProjectsGlobalService -} - -func NewServicesProjectsGlobalService(s *APIService) *ServicesProjectsGlobalService { - rs := &ServicesProjectsGlobalService{s: s} - rs.Networks = NewServicesProjectsGlobalNetworksService(s) - return rs -} - -type ServicesProjectsGlobalService struct { - s *APIService - - Networks *ServicesProjectsGlobalNetworksService -} - -func NewServicesProjectsGlobalNetworksService(s *APIService) *ServicesProjectsGlobalNetworksService { - rs := &ServicesProjectsGlobalNetworksService{s: s} - rs.DnsZones = NewServicesProjectsGlobalNetworksDnsZonesService(s) - rs.PeeredDnsDomains = NewServicesProjectsGlobalNetworksPeeredDnsDomainsService(s) - return rs -} - -type ServicesProjectsGlobalNetworksService struct { - s *APIService - - DnsZones *ServicesProjectsGlobalNetworksDnsZonesService - - PeeredDnsDomains *ServicesProjectsGlobalNetworksPeeredDnsDomainsService -} - -func NewServicesProjectsGlobalNetworksDnsZonesService(s *APIService) *ServicesProjectsGlobalNetworksDnsZonesService { - rs := &ServicesProjectsGlobalNetworksDnsZonesService{s: s} - return rs -} - -type ServicesProjectsGlobalNetworksDnsZonesService struct { - s *APIService -} - -func NewServicesProjectsGlobalNetworksPeeredDnsDomainsService(s *APIService) *ServicesProjectsGlobalNetworksPeeredDnsDomainsService { - rs := &ServicesProjectsGlobalNetworksPeeredDnsDomainsService{s: s} - return rs -} - -type ServicesProjectsGlobalNetworksPeeredDnsDomainsService struct { - s *APIService -} - -func NewServicesRolesService(s *APIService) *ServicesRolesService { - rs := &ServicesRolesService{s: s} - return rs -} - -type ServicesRolesService struct { - s *APIService -} - -// AddDnsRecordSetMetadata: Metadata provided through GetOperation request for -// the LRO generated by AddDnsRecordSet API -type AddDnsRecordSetMetadata struct { -} - -// AddDnsRecordSetRequest: Request to add a record set to a private managed DNS -// zone in the shared producer host project. -type AddDnsRecordSetRequest struct { - // ConsumerNetwork: Required. The network that the consumer is using to connect - // with services. Must be in the form of - // projects/{project}/global/networks/{network} {project} is the project - // number, as in '12345' {network} is the network name. - ConsumerNetwork string `json:"consumerNetwork,omitempty"` - // DnsRecordSet: Required. The DNS record set to add. - DnsRecordSet *DnsRecordSet `json:"dnsRecordSet,omitempty"` - // Zone: Required. The name of the private DNS zone in the shared producer host - // project to which the record set will be added. - Zone string `json:"zone,omitempty"` - // ForceSendFields is a list of field names (e.g. "ConsumerNetwork") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ConsumerNetwork") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s AddDnsRecordSetRequest) MarshalJSON() ([]byte, error) { - type NoMethod AddDnsRecordSetRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// AddDnsZoneMetadata: Metadata provided through GetOperation request for the -// LRO generated by AddDnsZone API -type AddDnsZoneMetadata struct { -} - -// AddDnsZoneRequest: Request to add a private managed DNS zone in the shared -// producer host project and a matching DNS peering zone in the consumer -// project. -type AddDnsZoneRequest struct { - // ConsumerNetwork: Required. The network that the consumer is using to connect - // with services. Must be in the form of - // projects/{project}/global/networks/{network} {project} is the project - // number, as in '12345' {network} is the network name. - ConsumerNetwork string `json:"consumerNetwork,omitempty"` - // DnsSuffix: Required. The DNS name suffix for the zones e.g. `example.com.`. - // Cloud DNS requires that a DNS suffix ends with a trailing dot. - DnsSuffix string `json:"dnsSuffix,omitempty"` - // Name: Required. The name for both the private zone in the shared producer - // host project and the peering zone in the consumer project. Must be unique - // within both projects. The name must be 1-63 characters long, must begin with - // a letter, end with a letter or digit, and only contain lowercase letters, - // digits or dashes. - Name string `json:"name,omitempty"` - // ForceSendFields is a list of field names (e.g. "ConsumerNetwork") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ConsumerNetwork") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s AddDnsZoneRequest) MarshalJSON() ([]byte, error) { - type NoMethod AddDnsZoneRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// AddDnsZoneResponse: Represents managed DNS zones created in the shared -// producer host and consumer projects. -type AddDnsZoneResponse struct { - // ConsumerPeeringZone: The DNS peering zone created in the consumer project. - ConsumerPeeringZone *DnsZone `json:"consumerPeeringZone,omitempty"` - // ProducerPrivateZone: The private DNS zone created in the shared producer - // host project. - ProducerPrivateZone *DnsZone `json:"producerPrivateZone,omitempty"` - // ForceSendFields is a list of field names (e.g. "ConsumerPeeringZone") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ConsumerPeeringZone") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s AddDnsZoneResponse) MarshalJSON() ([]byte, error) { - type NoMethod AddDnsZoneResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// AddRolesMetadata: Metadata provided through GetOperation request for the LRO -// generated by AddRoles API -type AddRolesMetadata struct { -} - -// AddRolesRequest: Request for AddRoles to allow Service Producers to add -// roles in the shared VPC host project for them to use. -type AddRolesRequest struct { - // ConsumerNetwork: Required. The network that the consumer is using to connect - // with services. Must be in the form of - // projects/{project}/global/networks/{network} {project} is a project number, - // as in '12345' {network} is a network name. - ConsumerNetwork string `json:"consumerNetwork,omitempty"` - // PolicyBinding: Required. List of policy bindings to add to shared VPC host - // project. - PolicyBinding []*PolicyBinding `json:"policyBinding,omitempty"` - // ForceSendFields is a list of field names (e.g. "ConsumerNetwork") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ConsumerNetwork") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s AddRolesRequest) MarshalJSON() ([]byte, error) { - type NoMethod AddRolesRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// AddRolesResponse: Represents IAM roles added to the shared VPC host project. -type AddRolesResponse struct { - // PolicyBinding: Required. List of policy bindings that were added to the - // shared VPC host project. - PolicyBinding []*PolicyBinding `json:"policyBinding,omitempty"` - // ForceSendFields is a list of field names (e.g. "PolicyBinding") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "PolicyBinding") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s AddRolesResponse) MarshalJSON() ([]byte, error) { - type NoMethod AddRolesResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// AddSubnetworkRequest: Request to create a subnetwork in a previously peered -// service network. -type AddSubnetworkRequest struct { - // AllowSubnetCidrRoutesOverlap: Optional. Defines the - // allowSubnetCidrRoutesOverlap field of the subnet, e.g. Available in alpha - // and beta according to Compute API documentation - // (https://cloud.google.com/compute/docs/reference/rest/beta/subnetworks/insert) - AllowSubnetCidrRoutesOverlap bool `json:"allowSubnetCidrRoutesOverlap,omitempty"` - // CheckServiceNetworkingUsePermission: Optional. The IAM permission check - // determines whether the consumer project has 'servicenetworking.services.use' - // permission or not. - CheckServiceNetworkingUsePermission bool `json:"checkServiceNetworkingUsePermission,omitempty"` - // ComputeIdempotencyWindow: Optional. Specifies a custom time bucket for GCE - // subnetwork request idempotency. If two equivalent concurrent requests are - // made, GCE will know to ignore the request if it has already been completed - // or is in progress. Only requests with matching compute_idempotency_window - // have guaranteed idempotency. Changing this time window between requests - // results in undefined behavior. Zero (or empty) value with - // custom_compute_idempotency_window=true specifies no idempotency (i.e. no - // request ID is provided to GCE). Maximum value of 14 days (enforced by GCE - // limit). - ComputeIdempotencyWindow string `json:"computeIdempotencyWindow,omitempty"` - // Consumer: Required. A resource that represents the service consumer, such as - // `projects/123456`. The project number can be different from the value in the - // consumer network parameter. For example, the network might be part of a - // Shared VPC network. In those cases, Service Networking validates that this - // resource belongs to that Shared VPC. - Consumer string `json:"consumer,omitempty"` - // ConsumerNetwork: Required. The name of the service consumer's VPC network. - // The network must have an existing private connection that was provisioned - // through the connections.create method. The name must be in the following - // format: `projects/{project}/global/networks/{network}`, where {project} is a - // project number, such as `12345`. {network} is the name of a VPC network in - // the project. - ConsumerNetwork string `json:"consumerNetwork,omitempty"` - // Description: Optional. Description of the subnet. - Description string `json:"description,omitempty"` - // InternalRange: Optional. The url of an Internal Range. Eg: - // `projects//locations/global/internalRanges/`. If specified, it means that - // the subnetwork cidr will be created using the combination of - // requested_address/ip_prefix_length. Note that the subnet cidr has to be - // within the cidr range of this Internal Range. - InternalRange string `json:"internalRange,omitempty"` - // IpPrefixLength: Required. The prefix length of the subnet's IP address - // range. Use CIDR range notation, such as `29` to provision a subnet with an - // `x.x.x.x/29` CIDR range. The IP address range is drawn from a pool of - // available ranges in the service consumer's allocated range. GCE disallows - // subnets with prefix_length > 29 - IpPrefixLength int64 `json:"ipPrefixLength,omitempty"` - // OutsideAllocationPublicIpRange: Optional. Enable outside allocation using - // public IP addresses. Any public IP range may be specified. If this field is - // provided, we will not use customer reserved ranges for this primary IP - // range. - OutsideAllocationPublicIpRange string `json:"outsideAllocationPublicIpRange,omitempty"` - // PrivateIpv6GoogleAccess: Optional. The private IPv6 google access type for - // the VMs in this subnet. For information about the access types that can be - // set using this field, see subnetwork - // (https://cloud.google.com/compute/docs/reference/rest/v1/subnetworks) in the - // Compute API documentation. - PrivateIpv6GoogleAccess string `json:"privateIpv6GoogleAccess,omitempty"` - // Purpose: Optional. Defines the purpose field of the subnet, e.g. - // 'PRIVATE_SERVICE_CONNECT'. For information about the purposes that can be - // set using this field, see subnetwork - // (https://cloud.google.com/compute/docs/reference/rest/v1/subnetworks) in the - // Compute API documentation. - Purpose string `json:"purpose,omitempty"` - // Region: Required. The name of a region - // (https://cloud.google.com/compute/docs/regions-zones) for the subnet, such - // `europe-west1`. - Region string `json:"region,omitempty"` - // RequestedAddress: Optional. The starting address of a range. The address - // must be a valid IPv4 address in the x.x.x.x format. This value combined with - // the IP prefix range is the CIDR range for the subnet. The range must be - // within the allocated range that is assigned to the private connection. If - // the CIDR range isn't available, the call fails. - RequestedAddress string `json:"requestedAddress,omitempty"` - // RequestedRanges: Optional. The name of one or more allocated IP address - // ranges associated with this private service access connection. If no range - // names are provided all ranges associated with this connection will be - // considered. If a CIDR range with the specified IP prefix length is not - // available within these ranges, the call fails. - RequestedRanges []string `json:"requestedRanges,omitempty"` - // Role: Optional. Defines the role field of the subnet, e.g. 'ACTIVE'. For - // information about the roles that can be set using this field, see subnetwork - // (https://cloud.google.com/compute/docs/reference/rest/v1/subnetworks) in the - // Compute API documentation. - Role string `json:"role,omitempty"` - // SecondaryIpRangeSpecs: Optional. A list of secondary IP ranges to be created - // within the new subnetwork. - SecondaryIpRangeSpecs []*SecondaryIpRangeSpec `json:"secondaryIpRangeSpecs,omitempty"` - // SkipRequestedAddressValidation: Optional. Skips validating if the - // requested_address is in use by SN VPC’s peering group. Compute Engine will - // still perform this check and fail the request if the requested_address is in - // use. Note that Compute Engine does not check for the existence of dynamic - // routes when performing this check. Caller of this API should make sure that - // there are no dynamic routes overlapping with the - // requested_address/prefix_length IP address range otherwise the created - // subnet could cause misrouting. - SkipRequestedAddressValidation bool `json:"skipRequestedAddressValidation,omitempty"` - // Subnetwork: Required. A name for the new subnet. For information about the - // naming requirements, see subnetwork - // (https://cloud.google.com/compute/docs/reference/rest/v1/subnetworks) in the - // Compute API documentation. - Subnetwork string `json:"subnetwork,omitempty"` - // SubnetworkUsers: A list of members that are granted the - // `roles/servicenetworking.subnetworkAdmin` role on the subnet. - SubnetworkUsers []string `json:"subnetworkUsers,omitempty"` - // UseCustomComputeIdempotencyWindow: Optional. Specifies if Service Networking - // should use a custom time bucket for GCE idempotency. If false, Service - // Networking uses a 300 second (5 minute) GCE idempotency window. If true, - // Service Networking uses a custom idempotency window provided by the user in - // field compute_idempotency_window. - UseCustomComputeIdempotencyWindow bool `json:"useCustomComputeIdempotencyWindow,omitempty"` - // ForceSendFields is a list of field names (e.g. - // "AllowSubnetCidrRoutesOverlap") to unconditionally include in API requests. - // By default, fields with empty or default values are omitted from API - // requests. See https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields - // for more details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AllowSubnetCidrRoutesOverlap") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s AddSubnetworkRequest) MarshalJSON() ([]byte, error) { - type NoMethod AddSubnetworkRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// Api: Api is a light-weight descriptor for an API Interface. Interfaces are -// also described as "protocol buffer services" in some contexts, such as by -// the "service" keyword in a .proto file, but they are different from API -// Services, which represent a concrete implementation of an interface as -// opposed to simply a description of methods and bindings. They are also -// sometimes simply referred to as "APIs" in other contexts, such as the name -// of this message itself. See https://cloud.google.com/apis/design/glossary -// for detailed terminology. New usages of this message as an alternative to -// ServiceDescriptorProto are strongly discouraged. This message does not -// reliability preserve all information necessary to model the schema and -// preserve semantics. Instead make use of FileDescriptorSet which preserves -// the necessary information. -type Api struct { - // Edition: The source edition string, only valid when syntax is - // SYNTAX_EDITIONS. - Edition string `json:"edition,omitempty"` - // Methods: The methods of this interface, in unspecified order. - Methods []*Method `json:"methods,omitempty"` - // Mixins: Included interfaces. See Mixin. - Mixins []*Mixin `json:"mixins,omitempty"` - // Name: The fully qualified name of this interface, including package name - // followed by the interface's simple name. - Name string `json:"name,omitempty"` - // Options: Any metadata attached to the interface. - Options []*Option `json:"options,omitempty"` - // SourceContext: Source context for the protocol buffer service represented by - // this message. - SourceContext *SourceContext `json:"sourceContext,omitempty"` - // Syntax: The source syntax of the service. - // - // Possible values: - // "SYNTAX_PROTO2" - Syntax `proto2`. - // "SYNTAX_PROTO3" - Syntax `proto3`. - // "SYNTAX_EDITIONS" - Syntax `editions`. - Syntax string `json:"syntax,omitempty"` - // Version: A version string for this interface. If specified, must have the - // form `major-version.minor-version`, as in `1.10`. If the minor version is - // omitted, it defaults to zero. If the entire version field is empty, the - // major version is derived from the package name, as outlined below. If the - // field is not empty, the version in the package name will be verified to be - // consistent with what is provided here. The versioning schema uses semantic - // versioning (http://semver.org) where the major version number indicates a - // breaking change and the minor version an additive, non-breaking change. Both - // version numbers are signals to users what to expect from different versions, - // and should be carefully chosen based on the product plan. The major version - // is also reflected in the package name of the interface, which must end in - // `v`, as in `google.feature.v1`. For major versions 0 and 1, the suffix can - // be omitted. Zero major versions must only be used for experimental, non-GA - // interfaces. - Version string `json:"version,omitempty"` - // ForceSendFields is a list of field names (e.g. "Edition") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Edition") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s Api) MarshalJSON() ([]byte, error) { - type NoMethod Api - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// Aspect: Aspect represents Generic aspect. It is used to configure an aspect -// without making direct changes to service.proto -type Aspect struct { - // Kind: The type of this aspect configuration. - Kind string `json:"kind,omitempty"` - // Rules: Optional. Rules of the Configuration. - Rules []*AspectRule `json:"rules,omitempty"` - // Spec: Content of the configuration. The underlying schema should be defined - // by Aspect owners as protobuf message under `google/api/configaspects/proto`. - Spec googleapi.RawMessage `json:"spec,omitempty"` - // ForceSendFields is a list of field names (e.g. "Kind") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Kind") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s Aspect) MarshalJSON() ([]byte, error) { - type NoMethod Aspect - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// AspectRule: Rule-based configuration for an aspect. -type AspectRule struct { - // Config: Required. Rules of the configuration. The underlying schema should - // be defined by Aspect owners as protobuf message under - // `google/api/configaspects/proto`. - Config googleapi.RawMessage `json:"config,omitempty"` - // Selector: Required. Selects the RPC methods to which this rule applies. - // Refer to selector for syntax details. - Selector string `json:"selector,omitempty"` - // ForceSendFields is a list of field names (e.g. "Config") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Config") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s AspectRule) MarshalJSON() ([]byte, error) { - type NoMethod AspectRule - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// AuthProvider: Configuration for an authentication provider, including -// support for JSON Web Token (JWT) -// (https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32). -type AuthProvider struct { - // Audiences: The list of JWT audiences - // (https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.3). - // that are allowed to access. A JWT containing any of these audiences will be - // accepted. When this setting is absent, JWTs with audiences: - - // "https://[service.name]/[google.protobuf.Api.name]" - - // "https://[service.name]/" will be accepted. For example, if no audiences are - // in the setting, LibraryService API will accept JWTs with the following - // audiences: - - // https://library-example.googleapis.com/google.example.library.v1.LibraryService - // - https://library-example.googleapis.com/ Example: audiences: - // bookstore_android.apps.googleusercontent.com, - // bookstore_web.apps.googleusercontent.com - Audiences string `json:"audiences,omitempty"` - // AuthorizationUrl: Redirect URL if JWT token is required but not present or - // is expired. Implement authorizationUrl of securityDefinitions in OpenAPI - // spec. - AuthorizationUrl string `json:"authorizationUrl,omitempty"` - // Id: The unique identifier of the auth provider. It will be referred to by - // `AuthRequirement.provider_id`. Example: "bookstore_auth". - Id string `json:"id,omitempty"` - // Issuer: Identifies the principal that issued the JWT. See - // https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.1 - // Usually a URL or an email address. Example: https://securetoken.google.com - // Example: 1234567-compute@developer.gserviceaccount.com - Issuer string `json:"issuer,omitempty"` - // JwksUri: URL of the provider's public key set to validate signature of the - // JWT. See OpenID Discovery - // (https://openid.net/specs/openid-connect-discovery-1_0.html#ProviderMetadata). - // Optional if the key set document: - can be retrieved from OpenID Discovery - // (https://openid.net/specs/openid-connect-discovery-1_0.html) of the issuer. - // - can be inferred from the email domain of the issuer (e.g. a Google service - // account). Example: https://www.googleapis.com/oauth2/v1/certs - JwksUri string `json:"jwksUri,omitempty"` - // JwtLocations: Defines the locations to extract the JWT. For now it is only - // used by the Cloud Endpoints to store the OpenAPI extension - // [x-google-jwt-locations] - // (https://cloud.google.com/endpoints/docs/openapi/openapi-extensions#x-google-jwt-locations) - // JWT locations can be one of HTTP headers, URL query parameters or cookies. - // The rule is that the first match wins. If not specified, default to use - // following 3 locations: 1) Authorization: Bearer 2) x-goog-iap-jwt-assertion - // 3) access_token query parameter Default locations can be specified as - // followings: jwt_locations: - header: Authorization value_prefix: "Bearer " - - // header: x-goog-iap-jwt-assertion - query: access_token - JwtLocations []*JwtLocation `json:"jwtLocations,omitempty"` - // ForceSendFields is a list of field names (e.g. "Audiences") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Audiences") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s AuthProvider) MarshalJSON() ([]byte, error) { - type NoMethod AuthProvider - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// AuthRequirement: User-defined authentication requirements, including support -// for JSON Web Token (JWT) -// (https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32). -type AuthRequirement struct { - // Audiences: NOTE: This will be deprecated soon, once AuthProvider.audiences - // is implemented and accepted in all the runtime components. The list of JWT - // audiences - // (https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.3). - // that are allowed to access. A JWT containing any of these audiences will be - // accepted. When this setting is absent, only JWTs with audience - // "https://Service_name/API_name" will be accepted. For example, if no - // audiences are in the setting, LibraryService API will only accept JWTs with - // the following audience - // "https://library-example.googleapis.com/google.example.library.v1.LibraryServ - // ice". Example: audiences: bookstore_android.apps.googleusercontent.com, - // bookstore_web.apps.googleusercontent.com - Audiences string `json:"audiences,omitempty"` - // ProviderId: id from authentication provider. Example: provider_id: - // bookstore_auth - ProviderId string `json:"providerId,omitempty"` - // ForceSendFields is a list of field names (e.g. "Audiences") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Audiences") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s AuthRequirement) MarshalJSON() ([]byte, error) { - type NoMethod AuthRequirement - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// Authentication: `Authentication` defines the authentication configuration -// for API methods provided by an API service. Example: name: -// calendar.googleapis.com authentication: providers: - id: -// google_calendar_auth jwks_uri: https://www.googleapis.com/oauth2/v1/certs -// issuer: https://securetoken.google.com rules: - selector: "*" requirements: -// provider_id: google_calendar_auth - selector: google.calendar.Delegate -// oauth: canonical_scopes: https://www.googleapis.com/auth/calendar.read -type Authentication struct { - // Providers: Defines a set of authentication providers that a service - // supports. - Providers []*AuthProvider `json:"providers,omitempty"` - // Rules: A list of authentication rules that apply to individual API methods. - // **NOTE:** All service configuration rules follow "last one wins" order. - Rules []*AuthenticationRule `json:"rules,omitempty"` - // ForceSendFields is a list of field names (e.g. "Providers") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Providers") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s Authentication) MarshalJSON() ([]byte, error) { - type NoMethod Authentication - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// AuthenticationRule: Authentication rules for the service. By default, if a -// method has any authentication requirements, every request must include a -// valid credential matching one of the requirements. It's an error to include -// more than one kind of credential in a single request. If a method doesn't -// have any auth requirements, request credentials will be ignored. -type AuthenticationRule struct { - // AllowWithoutCredential: If true, the service accepts API keys without any - // other credential. This flag only applies to HTTP and gRPC requests. - AllowWithoutCredential bool `json:"allowWithoutCredential,omitempty"` - // Oauth: The requirements for OAuth credentials. - Oauth *OAuthRequirements `json:"oauth,omitempty"` - // Requirements: Requirements for additional authentication providers. - Requirements []*AuthRequirement `json:"requirements,omitempty"` - // Selector: Selects the methods to which this rule applies. Refer to selector - // for syntax details. - Selector string `json:"selector,omitempty"` - // ForceSendFields is a list of field names (e.g. "AllowWithoutCredential") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AllowWithoutCredential") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s AuthenticationRule) MarshalJSON() ([]byte, error) { - type NoMethod AuthenticationRule - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// Backend: `Backend` defines the backend configuration for a service. -type Backend struct { - // Rules: A list of API backend rules that apply to individual API methods. - // **NOTE:** All service configuration rules follow "last one wins" order. - Rules []*BackendRule `json:"rules,omitempty"` - // ForceSendFields is a list of field names (e.g. "Rules") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Rules") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s Backend) MarshalJSON() ([]byte, error) { - type NoMethod Backend - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// BackendRule: A backend rule provides configuration for an individual API -// element. -type BackendRule struct { - // Address: The address of the API backend. The scheme is used to determine the - // backend protocol and security. The following schemes are accepted: SCHEME - // PROTOCOL SECURITY http:// HTTP None https:// HTTP TLS grpc:// gRPC None - // grpcs:// gRPC TLS It is recommended to explicitly include a scheme. Leaving - // out the scheme may cause constrasting behaviors across platforms. If the - // port is unspecified, the default is: - 80 for schemes without TLS - 443 for - // schemes with TLS For HTTP backends, use protocol to specify the protocol - // version. - Address string `json:"address,omitempty"` - // Deadline: The number of seconds to wait for a response from a request. The - // default varies based on the request protocol and deployment environment. - Deadline float64 `json:"deadline,omitempty"` - // DisableAuth: When disable_auth is true, a JWT ID token won't be generated - // and the original "Authorization" HTTP header will be preserved. If the - // header is used to carry the original token and is expected by the backend, - // this field must be set to true to preserve the header. - DisableAuth bool `json:"disableAuth,omitempty"` - // JwtAudience: The JWT audience is used when generating a JWT ID token for the - // backend. This ID token will be added in the HTTP "authorization" header, and - // sent to the backend. - JwtAudience string `json:"jwtAudience,omitempty"` - // LoadBalancingPolicy: The load balancing policy used for connection to the - // application backend. Defined as an arbitrary string to accomondate custom - // load balancing policies supported by the underlying channel, but suggest - // most users use one of the standard policies, such as the default, - // "RoundRobin". - LoadBalancingPolicy string `json:"loadBalancingPolicy,omitempty"` - // MinDeadline: Deprecated, do not use. - MinDeadline float64 `json:"minDeadline,omitempty"` - // OperationDeadline: The number of seconds to wait for the completion of a - // long running operation. The default is no deadline. - OperationDeadline float64 `json:"operationDeadline,omitempty"` - // OverridesByRequestProtocol: The map between request protocol and the backend - // address. - OverridesByRequestProtocol map[string]BackendRule `json:"overridesByRequestProtocol,omitempty"` - // PathTranslation: no-lint - // - // Possible values: - // "PATH_TRANSLATION_UNSPECIFIED" - // "CONSTANT_ADDRESS" - Use the backend address as-is, with no modification - // to the path. If the URL pattern contains variables, the variable names and - // values will be appended to the query string. If a query string parameter and - // a URL pattern variable have the same name, this may result in duplicate keys - // in the query string. # Examples Given the following operation config: Method - // path: /api/company/{cid}/user/{uid} Backend address: - // https://example.cloudfunctions.net/getUser Requests to the following request - // paths will call the backend at the translated path: Request path: - // /api/company/widgetworks/user/johndoe Translated: - // https://example.cloudfunctions.net/getUser?cid=widgetworks&uid=johndoe - // Request path: /api/company/widgetworks/user/johndoe?timezone=EST Translated: - // https://example.cloudfunctions.net/getUser?timezone=EST&cid=widgetworks&uid=johndoe - // "APPEND_PATH_TO_ADDRESS" - The request path will be appended to the - // backend address. # Examples Given the following operation config: Method - // path: /api/company/{cid}/user/{uid} Backend address: - // https://example.appspot.com Requests to the following request paths will - // call the backend at the translated path: Request path: - // /api/company/widgetworks/user/johndoe Translated: - // https://example.appspot.com/api/company/widgetworks/user/johndoe Request - // path: /api/company/widgetworks/user/johndoe?timezone=EST Translated: - // https://example.appspot.com/api/company/widgetworks/user/johndoe?timezone=EST - PathTranslation string `json:"pathTranslation,omitempty"` - // Protocol: The protocol used for sending a request to the backend. The - // supported values are "http/1.1" and "h2". The default value is inferred from - // the scheme in the address field: SCHEME PROTOCOL http:// http/1.1 https:// - // http/1.1 grpc:// h2 grpcs:// h2 For secure HTTP backends (https://) that - // support HTTP/2, set this field to "h2" for improved performance. Configuring - // this field to non-default values is only supported for secure HTTP backends. - // This field will be ignored for all other backends. See - // https://www.iana.org/assignments/tls-extensiontype-values/tls-extensiontype-values.xhtml#alpn-protocol-ids - // for more details on the supported values. - Protocol string `json:"protocol,omitempty"` - // Selector: Selects the methods to which this rule applies. Refer to selector - // for syntax details. - Selector string `json:"selector,omitempty"` - // ForceSendFields is a list of field names (e.g. "Address") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Address") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s BackendRule) MarshalJSON() ([]byte, error) { - type NoMethod BackendRule - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -func (s *BackendRule) UnmarshalJSON(data []byte) error { - type NoMethod BackendRule - var s1 struct { - Deadline gensupport.JSONFloat64 `json:"deadline"` - MinDeadline gensupport.JSONFloat64 `json:"minDeadline"` - OperationDeadline gensupport.JSONFloat64 `json:"operationDeadline"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.Deadline = float64(s1.Deadline) - s.MinDeadline = float64(s1.MinDeadline) - s.OperationDeadline = float64(s1.OperationDeadline) - return nil -} - -// BatchingConfigProto: `BatchingConfigProto` defines the batching -// configuration for an API method. -type BatchingConfigProto struct { - // BatchDescriptor: The request and response fields used in batching. - BatchDescriptor *BatchingDescriptorProto `json:"batchDescriptor,omitempty"` - // Thresholds: The thresholds which trigger a batched request to be sent. - Thresholds *BatchingSettingsProto `json:"thresholds,omitempty"` - // ForceSendFields is a list of field names (e.g. "BatchDescriptor") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "BatchDescriptor") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s BatchingConfigProto) MarshalJSON() ([]byte, error) { - type NoMethod BatchingConfigProto - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// BatchingDescriptorProto: `BatchingDescriptorProto` specifies the fields of -// the request message to be used for batching, and, optionally, the fields of -// the response message to be used for demultiplexing. -type BatchingDescriptorProto struct { - // BatchedField: The repeated field in the request message to be aggregated by - // batching. - BatchedField string `json:"batchedField,omitempty"` - // DiscriminatorFields: A list of the fields in the request message. Two - // requests will be batched together only if the values of every field - // specified in `request_discriminator_fields` is equal between the two - // requests. - DiscriminatorFields []string `json:"discriminatorFields,omitempty"` - // SubresponseField: Optional. When present, indicates the field in the - // response message to be used to demultiplex the response into multiple - // response messages, in correspondence with the multiple request messages - // originally batched together. - SubresponseField string `json:"subresponseField,omitempty"` - // ForceSendFields is a list of field names (e.g. "BatchedField") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "BatchedField") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s BatchingDescriptorProto) MarshalJSON() ([]byte, error) { - type NoMethod BatchingDescriptorProto - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// BatchingSettingsProto: `BatchingSettingsProto` specifies a set of batching -// thresholds, each of which acts as a trigger to send a batch of messages as a -// request. At least one threshold must be positive nonzero. -type BatchingSettingsProto struct { - // DelayThreshold: The duration after which a batch should be sent, starting - // from the addition of the first message to that batch. - DelayThreshold string `json:"delayThreshold,omitempty"` - // ElementCountLimit: The maximum number of elements collected in a batch that - // could be accepted by server. - ElementCountLimit int64 `json:"elementCountLimit,omitempty"` - // ElementCountThreshold: The number of elements of a field collected into a - // batch which, if exceeded, causes the batch to be sent. - ElementCountThreshold int64 `json:"elementCountThreshold,omitempty"` - // FlowControlByteLimit: The maximum size of data allowed by flow control. - FlowControlByteLimit int64 `json:"flowControlByteLimit,omitempty"` - // FlowControlElementLimit: The maximum number of elements allowed by flow - // control. - FlowControlElementLimit int64 `json:"flowControlElementLimit,omitempty"` - // FlowControlLimitExceededBehavior: The behavior to take when the flow control - // limit is exceeded. - // - // Possible values: - // "UNSET_BEHAVIOR" - Default behavior, system-defined. - // "THROW_EXCEPTION" - Stop operation, raise error. - // "BLOCK" - Pause operation until limit clears. - // "IGNORE" - Continue operation, disregard limit. - FlowControlLimitExceededBehavior string `json:"flowControlLimitExceededBehavior,omitempty"` - // RequestByteLimit: The maximum size of the request that could be accepted by - // server. - RequestByteLimit int64 `json:"requestByteLimit,omitempty"` - // RequestByteThreshold: The aggregated size of the batched field which, if - // exceeded, causes the batch to be sent. This size is computed by aggregating - // the sizes of the request field to be batched, not of the entire request - // message. - RequestByteThreshold int64 `json:"requestByteThreshold,omitempty,string"` - // ForceSendFields is a list of field names (e.g. "DelayThreshold") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DelayThreshold") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s BatchingSettingsProto) MarshalJSON() ([]byte, error) { - type NoMethod BatchingSettingsProto - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// Billing: Billing related configuration of the service. The following example -// shows how to configure monitored resources and metrics for billing, -// `consumer_destinations` is the only supported destination and the monitored -// resources need at least one label key `cloud.googleapis.com/location` to -// indicate the location of the billing usage, using different monitored -// resources between monitoring and billing is recommended so they can be -// evolved independently: monitored_resources: - type: -// library.googleapis.com/billing_branch labels: - key: -// cloud.googleapis.com/location description: | Predefined label to support -// billing location restriction. - key: city description: | Custom label to -// define the city where the library branch is located in. - key: name -// description: Custom label to define the name of the library branch. metrics: -// - name: library.googleapis.com/book/borrowed_count metric_kind: DELTA -// value_type: INT64 unit: "1" billing: consumer_destinations: - -// monitored_resource: library.googleapis.com/billing_branch metrics: - -// library.googleapis.com/book/borrowed_count -type Billing struct { - // ConsumerDestinations: Billing configurations for sending metrics to the - // consumer project. There can be multiple consumer destinations per service, - // each one must have a different monitored resource type. A metric can be used - // in at most one consumer destination. - ConsumerDestinations []*BillingDestination `json:"consumerDestinations,omitempty"` - // ForceSendFields is a list of field names (e.g. "ConsumerDestinations") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ConsumerDestinations") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s Billing) MarshalJSON() ([]byte, error) { - type NoMethod Billing - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// BillingDestination: Configuration of a specific billing destination -// (Currently only support bill against consumer project). -type BillingDestination struct { - // Metrics: Names of the metrics to report to this billing destination. Each - // name must be defined in Service.metrics section. - Metrics []string `json:"metrics,omitempty"` - // MonitoredResource: The monitored resource type. The type must be defined in - // Service.monitored_resources section. - MonitoredResource string `json:"monitoredResource,omitempty"` - // ForceSendFields is a list of field names (e.g. "Metrics") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Metrics") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s BillingDestination) MarshalJSON() ([]byte, error) { - type NoMethod BillingDestination - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// CancelOperationRequest: The request message for Operations.CancelOperation. -type CancelOperationRequest struct { -} - -// CleanupConnectionMetadata: Metadata provided through GetOperation request -// for the LRO generated by Cleanup Connection API -type CleanupConnectionMetadata struct { -} - -// ClientLibrarySettings: Details about how and where to publish client -// libraries. -type ClientLibrarySettings struct { - // CppSettings: Settings for C++ client libraries. - CppSettings *CppSettings `json:"cppSettings,omitempty"` - // DotnetSettings: Settings for .NET client libraries. - DotnetSettings *DotnetSettings `json:"dotnetSettings,omitempty"` - // GoSettings: Settings for Go client libraries. - GoSettings *GoSettings `json:"goSettings,omitempty"` - // JavaSettings: Settings for legacy Java features, supported in the Service - // YAML. - JavaSettings *JavaSettings `json:"javaSettings,omitempty"` - // LaunchStage: Launch stage of this version of the API. - // - // Possible values: - // "LAUNCH_STAGE_UNSPECIFIED" - Do not use this default value. - // "UNIMPLEMENTED" - The feature is not yet implemented. Users can not use - // it. - // "PRELAUNCH" - Prelaunch features are hidden from users and are only - // visible internally. - // "EARLY_ACCESS" - Early Access features are limited to a closed group of - // testers. To use these features, you must sign up in advance and sign a - // Trusted Tester agreement (which includes confidentiality provisions). These - // features may be unstable, changed in backward-incompatible ways, and are not - // guaranteed to be released. - // "ALPHA" - Alpha is a limited availability test for releases before they - // are cleared for widespread use. By Alpha, all significant design issues are - // resolved and we are in the process of verifying functionality. Alpha - // customers need to apply for access, agree to applicable terms, and have - // their projects allowlisted. Alpha releases don't have to be feature - // complete, no SLAs are provided, and there are no technical support - // obligations, but they will be far enough along that customers can actually - // use them in test environments or for limited-use tests -- just like they - // would in normal production cases. - // "BETA" - Beta is the point at which we are ready to open a release for any - // customer to use. There are no SLA or technical support obligations in a Beta - // release. Products will be complete from a feature perspective, but may have - // some open outstanding issues. Beta releases are suitable for limited - // production use cases. - // "GA" - GA features are open to all developers and are considered stable - // and fully qualified for production use. - // "DEPRECATED" - Deprecated features are scheduled to be shut down and - // removed. For more information, see the "Deprecation Policy" section of our - // [Terms of Service](https://cloud.google.com/terms/) and the [Google Cloud - // Platform Subject to the Deprecation - // Policy](https://cloud.google.com/terms/deprecation) documentation. - LaunchStage string `json:"launchStage,omitempty"` - // NodeSettings: Settings for Node client libraries. - NodeSettings *NodeSettings `json:"nodeSettings,omitempty"` - // PhpSettings: Settings for PHP client libraries. - PhpSettings *PhpSettings `json:"phpSettings,omitempty"` - // PythonSettings: Settings for Python client libraries. - PythonSettings *PythonSettings `json:"pythonSettings,omitempty"` - // RestNumericEnums: When using transport=rest, the client request will encode - // enums as numbers rather than strings. - RestNumericEnums bool `json:"restNumericEnums,omitempty"` - // RubySettings: Settings for Ruby client libraries. - RubySettings *RubySettings `json:"rubySettings,omitempty"` - // Version: Version of the API to apply these settings to. This is the full - // protobuf package for the API, ending in the version element. Examples: - // "google.cloud.speech.v1" and "google.spanner.admin.database.v1". - Version string `json:"version,omitempty"` - // ForceSendFields is a list of field names (e.g. "CppSettings") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CppSettings") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ClientLibrarySettings) MarshalJSON() ([]byte, error) { - type NoMethod ClientLibrarySettings - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// CloudSQLConfig: Cloud SQL configuration. -type CloudSQLConfig struct { - // Service: Required. Peering service used for peering with the Cloud SQL - // project. - Service string `json:"service,omitempty"` - // UmbrellaNetwork: Required. The name of the umbrella network in the Cloud SQL - // umbrella project. - UmbrellaNetwork string `json:"umbrellaNetwork,omitempty"` - // UmbrellaProject: Required. The project number of the Cloud SQL umbrella - // project. - UmbrellaProject int64 `json:"umbrellaProject,omitempty,string"` - // ForceSendFields is a list of field names (e.g. "Service") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Service") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s CloudSQLConfig) MarshalJSON() ([]byte, error) { - type NoMethod CloudSQLConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// CommonLanguageSettings: Required information for every language. -type CommonLanguageSettings struct { - // Destinations: The destination where API teams want this client library to be - // published. - // - // Possible values: - // "CLIENT_LIBRARY_DESTINATION_UNSPECIFIED" - Client libraries will neither - // be generated nor published to package managers. - // "GITHUB" - Generate the client library in a repo under - // github.com/googleapis, but don't publish it to package managers. - // "PACKAGE_MANAGER" - Publish the library to package managers like nuget.org - // and npmjs.com. - Destinations []string `json:"destinations,omitempty"` - // ReferenceDocsUri: Link to automatically generated reference documentation. - // Example: https://cloud.google.com/nodejs/docs/reference/asset/latest - ReferenceDocsUri string `json:"referenceDocsUri,omitempty"` - // SelectiveGapicGeneration: Configuration for which RPCs should be generated - // in the GAPIC client. - SelectiveGapicGeneration *SelectiveGapicGeneration `json:"selectiveGapicGeneration,omitempty"` - // ForceSendFields is a list of field names (e.g. "Destinations") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Destinations") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s CommonLanguageSettings) MarshalJSON() ([]byte, error) { - type NoMethod CommonLanguageSettings - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// Connection: Represents a private connection resource. A private connection -// is implemented as a VPC Network Peering connection between a service -// producer's VPC network and a service consumer's VPC network. -type Connection struct { - // Network: Required. The name of service consumer's VPC network that's - // connected with service producer network, in the following format: - // `projects/{project}/global/networks/{network}`. `{project}` is a project - // number, such as in `12345` that includes the VPC service consumer's VPC - // network. `{network}` is the name of the service consumer's VPC network. - Network string `json:"network,omitempty"` - // Peering: Output only. The name of the VPC Network Peering connection that - // was created by the service producer. - Peering string `json:"peering,omitempty"` - // ReservedPeeringRanges: The name of one or more allocated IP address ranges - // for this service producer of type `PEERING`. Note that invoking - // CreateConnection method with a different range when connection is already - // established will not modify already provisioned service producer - // subnetworks. If CreateConnection method is invoked repeatedly to reconnect - // when peering connection had been disconnected on the consumer side, leaving - // this field empty will restore previously allocated IP ranges. - ReservedPeeringRanges []string `json:"reservedPeeringRanges,omitempty"` - // Service: Output only. The name of the peering service that's associated with - // this connection, in the following format: `services/{service name}`. - Service string `json:"service,omitempty"` - // ForceSendFields is a list of field names (e.g. "Network") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Network") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s Connection) MarshalJSON() ([]byte, error) { - type NoMethod Connection - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ConsumerConfig: Configuration information for a private service access -// connection. -type ConsumerConfig struct { - // CloudsqlConfigs: Represents one or multiple Cloud SQL configurations. - CloudsqlConfigs []*CloudSQLConfig `json:"cloudsqlConfigs,omitempty"` - // ConsumerExportCustomRoutes: Export custom routes flag value for peering from - // consumer to producer. - ConsumerExportCustomRoutes bool `json:"consumerExportCustomRoutes,omitempty"` - // ConsumerExportSubnetRoutesWithPublicIp: Export subnet routes with public ip - // flag value for peering from consumer to producer. - ConsumerExportSubnetRoutesWithPublicIp bool `json:"consumerExportSubnetRoutesWithPublicIp,omitempty"` - // ConsumerImportCustomRoutes: Import custom routes flag value for peering from - // consumer to producer. - ConsumerImportCustomRoutes bool `json:"consumerImportCustomRoutes,omitempty"` - // ConsumerImportSubnetRoutesWithPublicIp: Import subnet routes with public ip - // flag value for peering from consumer to producer. - ConsumerImportSubnetRoutesWithPublicIp bool `json:"consumerImportSubnetRoutesWithPublicIp,omitempty"` - // ConsumerPeeringActive: Output only. If this is true, consumer peering is - // active. - ConsumerPeeringActive bool `json:"consumerPeeringActive,omitempty"` - // ProducerExportCustomRoutes: Export custom routes flag value for peering from - // producer to consumer. - ProducerExportCustomRoutes bool `json:"producerExportCustomRoutes,omitempty"` - // ProducerExportSubnetRoutesWithPublicIp: Export subnet routes with public ip - // flag value for peering from producer to consumer. - ProducerExportSubnetRoutesWithPublicIp bool `json:"producerExportSubnetRoutesWithPublicIp,omitempty"` - // ProducerImportCustomRoutes: Import custom routes flag value for peering from - // producer to consumer. - ProducerImportCustomRoutes bool `json:"producerImportCustomRoutes,omitempty"` - // ProducerImportSubnetRoutesWithPublicIp: Import subnet routes with public ip - // flag value for peering from producer to consumer. - ProducerImportSubnetRoutesWithPublicIp bool `json:"producerImportSubnetRoutesWithPublicIp,omitempty"` - // ProducerNetwork: Output only. The VPC host network that is used to host - // managed service instances. In the format, - // projects/{project}/global/networks/{network} where {project} is the project - // number e.g. '12345' and {network} is the network name. - ProducerNetwork string `json:"producerNetwork,omitempty"` - // ReservedRanges: Output only. The reserved ranges associated with this - // private service access connection. - ReservedRanges []*GoogleCloudServicenetworkingV1ConsumerConfigReservedRange `json:"reservedRanges,omitempty"` - // UsedIpRanges: Output only. The IP ranges already in use by consumer or - // producer - UsedIpRanges []string `json:"usedIpRanges,omitempty"` - // VpcScReferenceArchitectureEnabled: Output only. Indicates whether the VPC - // Service Controls reference architecture is configured for the producer VPC - // host network. - VpcScReferenceArchitectureEnabled bool `json:"vpcScReferenceArchitectureEnabled,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "CloudsqlConfigs") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CloudsqlConfigs") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ConsumerConfig) MarshalJSON() ([]byte, error) { - type NoMethod ConsumerConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ConsumerConfigMetadata: Metadata provided through GetOperation request for -// the LRO generated by UpdateConsumerConfig API. -type ConsumerConfigMetadata struct { -} - -// ConsumerProject: Represents a consumer project. -type ConsumerProject struct { - // ProjectNum: Required. Project number of the consumer that is launching the - // service instance. It can own the network that is peered with Google or, be a - // service project in an XPN where the host project has the network. - ProjectNum int64 `json:"projectNum,omitempty,string"` - // ForceSendFields is a list of field names (e.g. "ProjectNum") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ProjectNum") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ConsumerProject) MarshalJSON() ([]byte, error) { - type NoMethod ConsumerProject - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// Context: `Context` defines which contexts an API requests. Example: context: -// rules: - selector: "*" requested: - google.rpc.context.ProjectContext - -// google.rpc.context.OriginContext The above specifies that all methods in the -// API request `google.rpc.context.ProjectContext` and -// `google.rpc.context.OriginContext`. Available context types are defined in -// package `google.rpc.context`. This also provides mechanism to allowlist any -// protobuf message extension that can be sent in grpc metadata using -// “x-goog-ext--bin” and “x-goog-ext--jspb” format. For example, list -// any service specific protobuf types that can appear in grpc metadata as -// follows in your yaml file: Example: context: rules: - selector: -// "google.example.library.v1.LibraryService.CreateBook" -// allowed_request_extensions: - google.foo.v1.NewExtension -// allowed_response_extensions: - google.foo.v1.NewExtension You can also -// specify extension ID instead of fully qualified extension name here. -type Context struct { - // Rules: A list of RPC context rules that apply to individual API methods. - // **NOTE:** All service configuration rules follow "last one wins" order. - Rules []*ContextRule `json:"rules,omitempty"` - // ForceSendFields is a list of field names (e.g. "Rules") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Rules") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s Context) MarshalJSON() ([]byte, error) { - type NoMethod Context - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ContextRule: A context rule provides information about the context for an -// individual API element. -type ContextRule struct { - // AllowedRequestExtensions: A list of full type names or extension IDs of - // extensions allowed in grpc side channel from client to backend. - AllowedRequestExtensions []string `json:"allowedRequestExtensions,omitempty"` - // AllowedResponseExtensions: A list of full type names or extension IDs of - // extensions allowed in grpc side channel from backend to client. - AllowedResponseExtensions []string `json:"allowedResponseExtensions,omitempty"` - // Provided: A list of full type names of provided contexts. It is used to - // support propagating HTTP headers and ETags from the response extension. - Provided []string `json:"provided,omitempty"` - // Requested: A list of full type names of requested contexts, only the - // requested context will be made available to the backend. - Requested []string `json:"requested,omitempty"` - // Selector: Selects the methods to which this rule applies. Refer to selector - // for syntax details. - Selector string `json:"selector,omitempty"` - // ForceSendFields is a list of field names (e.g. "AllowedRequestExtensions") - // to unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AllowedRequestExtensions") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ContextRule) MarshalJSON() ([]byte, error) { - type NoMethod ContextRule - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// Control: Selects and configures the service controller used by the service. -// Example: control: environment: servicecontrol.googleapis.com -type Control struct { - // Environment: The service controller environment to use. If empty, no control - // plane features (like quota and billing) will be enabled. The recommended - // value for most services is servicecontrol.googleapis.com. - Environment string `json:"environment,omitempty"` - // MethodPolicies: Defines policies applying to the API methods of the service. - MethodPolicies []*MethodPolicy `json:"methodPolicies,omitempty"` - // ForceSendFields is a list of field names (e.g. "Environment") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Environment") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s Control) MarshalJSON() ([]byte, error) { - type NoMethod Control - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// CppSettings: Settings for C++ client libraries. -type CppSettings struct { - // Common: Some settings. - Common *CommonLanguageSettings `json:"common,omitempty"` - // ForceSendFields is a list of field names (e.g. "Common") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Common") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s CppSettings) MarshalJSON() ([]byte, error) { - type NoMethod CppSettings - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// CustomError: Customize service error responses. For example, list any -// service specific protobuf types that can appear in error detail lists of -// error responses. Example: custom_error: types: - google.foo.v1.CustomError - -// google.foo.v1.AnotherError -type CustomError struct { - // Rules: The list of custom error rules that apply to individual API messages. - // **NOTE:** All service configuration rules follow "last one wins" order. - Rules []*CustomErrorRule `json:"rules,omitempty"` - // Types: The list of custom error detail types, e.g. - // 'google.foo.v1.CustomError'. - Types []string `json:"types,omitempty"` - // ForceSendFields is a list of field names (e.g. "Rules") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Rules") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s CustomError) MarshalJSON() ([]byte, error) { - type NoMethod CustomError - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// CustomErrorRule: A custom error rule. -type CustomErrorRule struct { - // IsErrorType: Mark this message as possible payload in error response. - // Otherwise, objects of this type will be filtered when they appear in error - // payload. - IsErrorType bool `json:"isErrorType,omitempty"` - // Selector: Selects messages to which this rule applies. Refer to selector for - // syntax details. - Selector string `json:"selector,omitempty"` - // ForceSendFields is a list of field names (e.g. "IsErrorType") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "IsErrorType") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s CustomErrorRule) MarshalJSON() ([]byte, error) { - type NoMethod CustomErrorRule - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// CustomHttpPattern: A custom pattern is used for defining custom HTTP verb. -type CustomHttpPattern struct { - // Kind: The name of this custom HTTP verb. - Kind string `json:"kind,omitempty"` - // Path: The path matched by this custom verb. - Path string `json:"path,omitempty"` - // ForceSendFields is a list of field names (e.g. "Kind") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Kind") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s CustomHttpPattern) MarshalJSON() ([]byte, error) { - type NoMethod CustomHttpPattern - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// DeleteConnectionMetadata: Metadata provided through GetOperation request for -// the LRO generated by Delete Connection API -type DeleteConnectionMetadata struct { -} - -// DeleteConnectionRequest: Request to delete a private service access -// connection. The call will fail if there are any managed service instances -// using this connection. -type DeleteConnectionRequest struct { - // ConsumerNetwork: Required. The network that the consumer is using to connect - // with services. Must be in the form of - // projects/{project}/global/networks/{network} {project} is a project number, - // as in '12345' {network} is a network name. - ConsumerNetwork string `json:"consumerNetwork,omitempty"` - // ForceSendFields is a list of field names (e.g. "ConsumerNetwork") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ConsumerNetwork") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s DeleteConnectionRequest) MarshalJSON() ([]byte, error) { - type NoMethod DeleteConnectionRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// DeletePeeredDnsDomainMetadata: Metadata provided through GetOperation -// request for the LRO generated by DeletePeeredDnsDomain API. -type DeletePeeredDnsDomainMetadata struct { -} - -// DisableVpcServiceControlsRequest: Request to disable VPC service controls. -type DisableVpcServiceControlsRequest struct { - // ConsumerNetwork: Required. The network that the consumer is using to connect - // with services. Must be in the form of - // projects/{project}/global/networks/{network} {project} is a project number, - // as in '12345' {network} is network name. - ConsumerNetwork string `json:"consumerNetwork,omitempty"` - // ForceSendFields is a list of field names (e.g. "ConsumerNetwork") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ConsumerNetwork") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s DisableVpcServiceControlsRequest) MarshalJSON() ([]byte, error) { - type NoMethod DisableVpcServiceControlsRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// DnsRecordSet: Represents a DNS record set resource. -type DnsRecordSet struct { - // Data: Required. As defined in RFC 1035 (section 5) and RFC 1034 (section - // 3.6.1) for examples see https://cloud.google.com/dns/records/json-record. - Data []string `json:"data,omitempty"` - // Domain: Required. The DNS or domain name of the record set, e.g. - // `test.example.com`. Cloud DNS requires that a DNS suffix ends with a - // trailing dot. - Domain string `json:"domain,omitempty"` - // Ttl: Required. The period of time for which this RecordSet can be cached by - // resolvers. - Ttl string `json:"ttl,omitempty"` - // Type: Required. The identifier of a supported record type. - Type string `json:"type,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Data") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Data") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s DnsRecordSet) MarshalJSON() ([]byte, error) { - type NoMethod DnsRecordSet - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// DnsZone: Represents a DNS zone resource. -type DnsZone struct { - // DnsSuffix: The DNS name suffix of this zone e.g. `example.com.`. Cloud DNS - // requires that a DNS suffix ends with a trailing dot. - DnsSuffix string `json:"dnsSuffix,omitempty"` - // Name: User assigned name for this resource. Must be unique within the - // project. The name must be 1-63 characters long, must begin with a letter, - // end with a letter or digit, and only contain lowercase letters, digits or - // dashes. - Name string `json:"name,omitempty"` - // ForceSendFields is a list of field names (e.g. "DnsSuffix") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DnsSuffix") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s DnsZone) MarshalJSON() ([]byte, error) { - type NoMethod DnsZone - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// DnsZonePair: * Represents a pair of private and peering DNS zone resources. -// * -type DnsZonePair struct { - // ConsumerPeeringZone: The DNS peering zone in the consumer project. - ConsumerPeeringZone *DnsZone `json:"consumerPeeringZone,omitempty"` - // ProducerPrivateZone: The private DNS zone in the shared producer host - // project. - ProducerPrivateZone *DnsZone `json:"producerPrivateZone,omitempty"` - // ForceSendFields is a list of field names (e.g. "ConsumerPeeringZone") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ConsumerPeeringZone") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s DnsZonePair) MarshalJSON() ([]byte, error) { - type NoMethod DnsZonePair - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// Documentation: `Documentation` provides the information for describing a -// service. Example: documentation: summary: > The Google Calendar API gives -// access to most calendar features. pages: - name: Overview content: (== -// include google/foo/overview.md ==) - name: Tutorial content: (== include -// google/foo/tutorial.md ==) subpages: - name: Java content: (== include -// google/foo/tutorial_java.md ==) rules: - selector: -// google.calendar.Calendar.Get description: > ... - selector: -// google.calendar.Calendar.Put description: > ... Documentation is provided in -// markdown syntax. In addition to standard markdown features, definition -// lists, tables and fenced code blocks are supported. Section headers can be -// provided and are interpreted relative to the section nesting of the context -// where a documentation fragment is embedded. Documentation from the IDL is -// merged with documentation defined via the config at normalization time, -// where documentation provided by config rules overrides IDL provided. A -// number of constructs specific to the API platform are supported in -// documentation text. In order to reference a proto element, the following -// notation can be used: [fully.qualified.proto.name][] To override the display -// text used for the link, this can be used: [display -// text][fully.qualified.proto.name] Text can be excluded from doc using the -// following notation: (-- internal comment --) A few directives are available -// in documentation. Note that directives must appear on a single line to be -// properly identified. The `include` directive includes a markdown file from -// an external source: (== include path/to/file ==) The `resource_for` -// directive marks a message to be the resource of a collection in REST view. -// If it is not specified, tools attempt to infer the resource from the -// operations in a collection: (== resource_for v1.shelves.books ==) The -// directive `suppress_warning` does not directly affect documentation and is -// documented together with service config validation. -type Documentation struct { - // AdditionalIamInfo: Optional information about the IAM configuration. This is - // typically used to link to documentation about a product's IAM roles and - // permissions. - AdditionalIamInfo string `json:"additionalIamInfo,omitempty"` - // DocumentationRootUrl: The URL to the root of documentation. - DocumentationRootUrl string `json:"documentationRootUrl,omitempty"` - // Overview: Declares a single overview page. For example: documentation: - // summary: ... overview: (== include overview.md ==) This is a shortcut for - // the following declaration (using pages style): documentation: summary: ... - // pages: - name: Overview content: (== include overview.md ==) Note: you - // cannot specify both `overview` field and `pages` field. - Overview string `json:"overview,omitempty"` - // Pages: The top level pages for the documentation set. - Pages []*Page `json:"pages,omitempty"` - // Rules: A list of documentation rules that apply to individual API elements. - // **NOTE:** All service configuration rules follow "last one wins" order. - Rules []*DocumentationRule `json:"rules,omitempty"` - // SectionOverrides: Specifies section and content to override the boilerplate - // content. Currently overrides following sections: 1. - // rest.service.client_libraries - SectionOverrides []*Page `json:"sectionOverrides,omitempty"` - // ServiceRootUrl: Specifies the service root url if the default one (the - // service name from the yaml file) is not suitable. This can be seen in any - // fully specified service urls as well as sections that show a base that other - // urls are relative to. - ServiceRootUrl string `json:"serviceRootUrl,omitempty"` - // Summary: A short description of what the service does. The summary must be - // plain text. It becomes the overview of the service displayed in Google Cloud - // Console. NOTE: This field is equivalent to the standard field `description`. - Summary string `json:"summary,omitempty"` - // ForceSendFields is a list of field names (e.g. "AdditionalIamInfo") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AdditionalIamInfo") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s Documentation) MarshalJSON() ([]byte, error) { - type NoMethod Documentation - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// DocumentationRule: A documentation rule provides information about -// individual API elements. -type DocumentationRule struct { - // DeprecationDescription: Deprecation description of the selected element(s). - // It can be provided if an element is marked as `deprecated`. - DeprecationDescription string `json:"deprecationDescription,omitempty"` - // Description: Description of the selected proto element (e.g. a message, a - // method, a 'service' definition, or a field). Defaults to leading & trailing - // comments taken from the proto source definition of the proto element. - Description string `json:"description,omitempty"` - // DisableReplacementWords: String of comma or space separated case-sensitive - // words for which method/field name replacement will be disabled. - DisableReplacementWords string `json:"disableReplacementWords,omitempty"` - // Selector: The selector is a comma-separated list of patterns for any element - // such as a method, a field, an enum value. Each pattern is a qualified name - // of the element which may end in "*", indicating a wildcard. Wildcards are - // only allowed at the end and for a whole component of the qualified name, - // i.e. "foo.*" is ok, but not "foo.b*" or "foo.*.bar". A wildcard will match - // one or more components. To specify a default for all applicable elements, - // the whole pattern "*" is used. - Selector string `json:"selector,omitempty"` - // ForceSendFields is a list of field names (e.g. "DeprecationDescription") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DeprecationDescription") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s DocumentationRule) MarshalJSON() ([]byte, error) { - type NoMethod DocumentationRule - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// DotnetSettings: Settings for Dotnet client libraries. -type DotnetSettings struct { - // Common: Some settings. - Common *CommonLanguageSettings `json:"common,omitempty"` - // ForcedNamespaceAliases: Namespaces which must be aliased in snippets due to - // a known (but non-generator-predictable) naming collision - ForcedNamespaceAliases []string `json:"forcedNamespaceAliases,omitempty"` - // HandwrittenSignatures: Method signatures (in the form - // "service.method(signature)") which are provided separately, so shouldn't be - // generated. Snippets *calling* these methods are still generated, however. - HandwrittenSignatures []string `json:"handwrittenSignatures,omitempty"` - // IgnoredResources: List of full resource types to ignore during generation. - // This is typically used for API-specific Location resources, which should be - // handled by the generator as if they were actually the common Location - // resources. Example entry: "documentai.googleapis.com/Location" - IgnoredResources []string `json:"ignoredResources,omitempty"` - // RenamedResources: Map from full resource types to the effective short name - // for the resource. This is used when otherwise resource named from different - // services would cause naming collisions. Example entry: - // "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" - RenamedResources map[string]string `json:"renamedResources,omitempty"` - // RenamedServices: Map from original service names to renamed versions. This - // is used when the default generated types would cause a naming conflict. - // (Neither name is fully-qualified.) Example: Subscriber to - // SubscriberServiceApi. - RenamedServices map[string]string `json:"renamedServices,omitempty"` - // ForceSendFields is a list of field names (e.g. "Common") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Common") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s DotnetSettings) MarshalJSON() ([]byte, error) { - type NoMethod DotnetSettings - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// Empty: A generic empty message that you can re-use to avoid defining -// duplicated empty messages in your APIs. A typical example is to use it as -// the request or the response type of an API method. For instance: service Foo -// { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } -type Empty struct { - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` -} - -// EnableVpcServiceControlsRequest: Request to enable VPC service controls. -type EnableVpcServiceControlsRequest struct { - // ConsumerNetwork: Required. The network that the consumer is using to connect - // with services. Must be in the form of - // projects/{project}/global/networks/{network} {project} is a project number, - // as in '12345' {network} is network name. - ConsumerNetwork string `json:"consumerNetwork,omitempty"` - // ForceSendFields is a list of field names (e.g. "ConsumerNetwork") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ConsumerNetwork") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s EnableVpcServiceControlsRequest) MarshalJSON() ([]byte, error) { - type NoMethod EnableVpcServiceControlsRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// Endpoint: `Endpoint` describes a network address of a service that serves a -// set of APIs. It is commonly known as a service endpoint. A service may -// expose any number of service endpoints, and all service endpoints share the -// same service definition, such as quota limits and monitoring metrics. -// Example: type: google.api.Service name: library-example.googleapis.com -// endpoints: # Declares network address -// `https://library-example.googleapis.com` # for service -// `library-example.googleapis.com`. The `https` scheme # is implicit for all -// service endpoints. Other schemes may be # supported in the future. - name: -// library-example.googleapis.com allow_cors: false - name: -// content-staging-library-example.googleapis.com # Allows HTTP OPTIONS calls -// to be passed to the API frontend, for it # to decide whether the subsequent -// cross-origin request is allowed # to proceed. allow_cors: true -type Endpoint struct { - // Aliases: Aliases for this endpoint, these will be served by the same UrlMap - // as the parent endpoint, and will be provisioned in the GCP stack for the - // Regional Endpoints. - Aliases []string `json:"aliases,omitempty"` - // AllowCors: Allowing CORS - // (https://en.wikipedia.org/wiki/Cross-origin_resource_sharing), aka - // cross-domain traffic, would allow the backends served from this endpoint to - // receive and respond to HTTP OPTIONS requests. The response will be used by - // the browser to determine whether the subsequent cross-origin request is - // allowed to proceed. - AllowCors bool `json:"allowCors,omitempty"` - // Name: The canonical name of this endpoint. - Name string `json:"name,omitempty"` - // Target: The specification of an Internet routable address of API frontend - // that will handle requests to this API Endpoint - // (https://cloud.google.com/apis/design/glossary). It should be either a valid - // IPv4 address or a fully-qualified domain name. For example, "8.8.8.8" or - // "myservice.appspot.com". - Target string `json:"target,omitempty"` - // ForceSendFields is a list of field names (e.g. "Aliases") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Aliases") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s Endpoint) MarshalJSON() ([]byte, error) { - type NoMethod Endpoint - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// Enum: Enum type definition. New usages of this message as an alternative to -// EnumDescriptorProto are strongly discouraged. This message does not -// reliability preserve all information necessary to model the schema and -// preserve semantics. Instead make use of FileDescriptorSet which preserves -// the necessary information. -type Enum struct { - // Edition: The source edition string, only valid when syntax is - // SYNTAX_EDITIONS. - Edition string `json:"edition,omitempty"` - // Enumvalue: Enum value definitions. - Enumvalue []*EnumValue `json:"enumvalue,omitempty"` - // Name: Enum type name. - Name string `json:"name,omitempty"` - // Options: Protocol buffer options. - Options []*Option `json:"options,omitempty"` - // SourceContext: The source context. - SourceContext *SourceContext `json:"sourceContext,omitempty"` - // Syntax: The source syntax. - // - // Possible values: - // "SYNTAX_PROTO2" - Syntax `proto2`. - // "SYNTAX_PROTO3" - Syntax `proto3`. - // "SYNTAX_EDITIONS" - Syntax `editions`. - Syntax string `json:"syntax,omitempty"` - // ForceSendFields is a list of field names (e.g. "Edition") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Edition") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s Enum) MarshalJSON() ([]byte, error) { - type NoMethod Enum - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// EnumValue: Enum value definition. New usages of this message as an -// alternative to EnumValueDescriptorProto are strongly discouraged. This -// message does not reliability preserve all information necessary to model the -// schema and preserve semantics. Instead make use of FileDescriptorSet which -// preserves the necessary information. -type EnumValue struct { - // Name: Enum value name. - Name string `json:"name,omitempty"` - // Number: Enum value number. - Number int64 `json:"number,omitempty"` - // Options: Protocol buffer options. - Options []*Option `json:"options,omitempty"` - // ForceSendFields is a list of field names (e.g. "Name") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Name") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s EnumValue) MarshalJSON() ([]byte, error) { - type NoMethod EnumValue - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ExperimentalFeatures: Experimental features to be included during client -// library generation. These fields will be deprecated once the feature -// graduates and is enabled by default. -type ExperimentalFeatures struct { - // ProtobufPythonicTypesEnabled: Enables generation of protobuf code using new - // types that are more Pythonic which are included in `protobuf>=5.29.x`. This - // feature will be enabled by default 1 month after launching the feature in - // preview packages. - ProtobufPythonicTypesEnabled bool `json:"protobufPythonicTypesEnabled,omitempty"` - // RestAsyncIoEnabled: Enables generation of asynchronous REST clients if - // `rest` transport is enabled. By default, asynchronous REST clients will not - // be generated. This feature will be enabled by default 1 month after - // launching the feature in preview packages. - RestAsyncIoEnabled bool `json:"restAsyncIoEnabled,omitempty"` - // UnversionedPackageDisabled: Disables generation of an unversioned Python - // package for this client library. This means that the module names will need - // to be versioned in import statements. For example `import - // google.cloud.library_v2` instead of `import google.cloud.library`. - UnversionedPackageDisabled bool `json:"unversionedPackageDisabled,omitempty"` - // ForceSendFields is a list of field names (e.g. - // "ProtobufPythonicTypesEnabled") to unconditionally include in API requests. - // By default, fields with empty or default values are omitted from API - // requests. See https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields - // for more details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ProtobufPythonicTypesEnabled") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ExperimentalFeatures) MarshalJSON() ([]byte, error) { - type NoMethod ExperimentalFeatures - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// Field: A single field of a message type. New usages of this message as an -// alternative to FieldDescriptorProto are strongly discouraged. This message -// does not reliability preserve all information necessary to model the schema -// and preserve semantics. Instead make use of FileDescriptorSet which -// preserves the necessary information. -type Field struct { - // Cardinality: The field cardinality. - // - // Possible values: - // "CARDINALITY_UNKNOWN" - For fields with unknown cardinality. - // "CARDINALITY_OPTIONAL" - For optional fields. - // "CARDINALITY_REQUIRED" - For required fields. Proto2 syntax only. - // "CARDINALITY_REPEATED" - For repeated fields. - Cardinality string `json:"cardinality,omitempty"` - // DefaultValue: The string value of the default value of this field. Proto2 - // syntax only. - DefaultValue string `json:"defaultValue,omitempty"` - // JsonName: The field JSON name. - JsonName string `json:"jsonName,omitempty"` - // Kind: The field type. - // - // Possible values: - // "TYPE_UNKNOWN" - Field type unknown. - // "TYPE_DOUBLE" - Field type double. - // "TYPE_FLOAT" - Field type float. - // "TYPE_INT64" - Field type int64. - // "TYPE_UINT64" - Field type uint64. - // "TYPE_INT32" - Field type int32. - // "TYPE_FIXED64" - Field type fixed64. - // "TYPE_FIXED32" - Field type fixed32. - // "TYPE_BOOL" - Field type bool. - // "TYPE_STRING" - Field type string. - // "TYPE_GROUP" - Field type group. Proto2 syntax only, and deprecated. - // "TYPE_MESSAGE" - Field type message. - // "TYPE_BYTES" - Field type bytes. - // "TYPE_UINT32" - Field type uint32. - // "TYPE_ENUM" - Field type enum. - // "TYPE_SFIXED32" - Field type sfixed32. - // "TYPE_SFIXED64" - Field type sfixed64. - // "TYPE_SINT32" - Field type sint32. - // "TYPE_SINT64" - Field type sint64. - Kind string `json:"kind,omitempty"` - // Name: The field name. - Name string `json:"name,omitempty"` - // Number: The field number. - Number int64 `json:"number,omitempty"` - // OneofIndex: The index of the field type in `Type.oneofs`, for message or - // enumeration types. The first type has index 1; zero means the type is not in - // the list. - OneofIndex int64 `json:"oneofIndex,omitempty"` - // Options: The protocol buffer options. - Options []*Option `json:"options,omitempty"` - // Packed: Whether to use alternative packed wire representation. - Packed bool `json:"packed,omitempty"` - // TypeUrl: The field type URL, without the scheme, for message or enumeration - // types. Example: "type.googleapis.com/google.protobuf.Timestamp". - TypeUrl string `json:"typeUrl,omitempty"` - // ForceSendFields is a list of field names (e.g. "Cardinality") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Cardinality") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s Field) MarshalJSON() ([]byte, error) { - type NoMethod Field - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// FieldPolicy: Google API Policy Annotation This message defines a simple API -// policy annotation that can be used to annotate API request and response -// message fields with applicable policies. One field may have multiple -// applicable policies that must all be satisfied before a request can be -// processed. This policy annotation is used to generate the overall policy -// that will be used for automatic runtime policy enforcement and documentation -// generation. -type FieldPolicy struct { - // ResourcePermission: Specifies the required permission(s) for the resource - // referred to by the field. It requires the field contains a valid resource - // reference, and the request must pass the permission checks to proceed. For - // example, "resourcemanager.projects.get". - ResourcePermission string `json:"resourcePermission,omitempty"` - // ResourceType: Specifies the resource type for the resource referred to by - // the field. - ResourceType string `json:"resourceType,omitempty"` - // Selector: Selects one or more request or response message fields to apply - // this `FieldPolicy`. When a `FieldPolicy` is used in proto annotation, the - // selector must be left as empty. The service config generator will - // automatically fill the correct value. When a `FieldPolicy` is used in - // service config, the selector must be a comma-separated string with valid - // request or response field paths, such as "foo.bar" or "foo.bar,foo.baz". - Selector string `json:"selector,omitempty"` - // ForceSendFields is a list of field names (e.g. "ResourcePermission") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ResourcePermission") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s FieldPolicy) MarshalJSON() ([]byte, error) { - type NoMethod FieldPolicy - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GetDnsZoneResponse: Represents managed DNS zones created in the shared -// Producer host and consumer projects. -type GetDnsZoneResponse struct { - // ConsumerPeeringZone: The DNS peering zone created in the consumer project. - ConsumerPeeringZone *DnsZone `json:"consumerPeeringZone,omitempty"` - // ProducerPrivateZone: The private DNS zone created in the shared producer - // host project. - ProducerPrivateZone *DnsZone `json:"producerPrivateZone,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "ConsumerPeeringZone") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ConsumerPeeringZone") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GetDnsZoneResponse) MarshalJSON() ([]byte, error) { - type NoMethod GetDnsZoneResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoSettings: Settings for Go client libraries. -type GoSettings struct { - // Common: Some settings. - Common *CommonLanguageSettings `json:"common,omitempty"` - // RenamedServices: Map of service names to renamed services. Keys are the - // package relative service names and values are the name to be used for the - // service client and call options. Example: publishing: go_settings: - // renamed_services: Publisher: TopicAdmin - RenamedServices map[string]string `json:"renamedServices,omitempty"` - // ForceSendFields is a list of field names (e.g. "Common") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Common") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoSettings) MarshalJSON() ([]byte, error) { - type NoMethod GoSettings - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudServicenetworkingV1ConsumerConfigReservedRange: Allocated IP -// address ranges for this private service access connection. -type GoogleCloudServicenetworkingV1ConsumerConfigReservedRange struct { - // Address: The starting address of the reserved range. The address must be a - // valid IPv4 address in the x.x.x.x format. This value combined with the IP - // prefix length is the CIDR range for the reserved range. - Address string `json:"address,omitempty"` - // IpPrefixLength: The prefix length of the reserved range. - IpPrefixLength int64 `json:"ipPrefixLength,omitempty"` - // Name: The name of the reserved range. - Name string `json:"name,omitempty"` - // ForceSendFields is a list of field names (e.g. "Address") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Address") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudServicenetworkingV1ConsumerConfigReservedRange) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudServicenetworkingV1ConsumerConfigReservedRange - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudServicenetworkingV1betaConnection: Represents a private -// connection resource. A private connection is implemented as a VPC Network -// Peering connection between a service producer's VPC network and a service -// consumer's VPC network. -type GoogleCloudServicenetworkingV1betaConnection struct { - // Network: The name of service consumer's VPC network that's connected with - // service producer network, in the following format: - // `projects/{project}/global/networks/{network}`. `{project}` is a project - // number, such as in `12345` that includes the VPC service consumer's VPC - // network. `{network}` is the name of the service consumer's VPC network. - Network string `json:"network,omitempty"` - // Peering: Output only. The name of the VPC Network Peering connection that - // was created by the service producer. - Peering string `json:"peering,omitempty"` - // ReservedPeeringRanges: The name of one or more allocated IP address ranges - // for this service producer of type `PEERING`. Note that invoking this method - // with a different range when connection is already established will not - // modify already provisioned service producer subnetworks. - ReservedPeeringRanges []string `json:"reservedPeeringRanges,omitempty"` - // Service: Output only. The name of the peering service that's associated with - // this connection, in the following format: `services/{service name}`. - Service string `json:"service,omitempty"` - // ForceSendFields is a list of field names (e.g. "Network") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Network") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudServicenetworkingV1betaConnection) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudServicenetworkingV1betaConnection - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudServicenetworkingV1betaSubnetwork: Represents a subnet that was -// created or discovered by a private access management service. -type GoogleCloudServicenetworkingV1betaSubnetwork struct { - // IpCidrRange: Subnetwork CIDR range in `10.x.x.x/y` format. - IpCidrRange string `json:"ipCidrRange,omitempty"` - // Name: Subnetwork name. See https://cloud.google.com/compute/docs/vpc/ - Name string `json:"name,omitempty"` - // Network: In the Shared VPC host project, the VPC network that's peered with - // the consumer network. For example: - // `projects/1234321/global/networks/host-network` - Network string `json:"network,omitempty"` - // OutsideAllocation: This is a discovered subnet that is not within the - // current consumer allocated ranges. - OutsideAllocation bool `json:"outsideAllocation,omitempty"` - // ForceSendFields is a list of field names (e.g. "IpCidrRange") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "IpCidrRange") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudServicenetworkingV1betaSubnetwork) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudServicenetworkingV1betaSubnetwork - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// Http: Defines the HTTP configuration for an API service. It contains a list -// of HttpRule, each specifying the mapping of an RPC method to one or more -// HTTP REST API methods. -type Http struct { - // FullyDecodeReservedExpansion: When set to true, URL path parameters will be - // fully URI-decoded except in cases of single segment matches in reserved - // expansion, where "%2F" will be left encoded. The default behavior is to not - // decode RFC 6570 reserved characters in multi segment matches. - FullyDecodeReservedExpansion bool `json:"fullyDecodeReservedExpansion,omitempty"` - // Rules: A list of HTTP configuration rules that apply to individual API - // methods. **NOTE:** All service configuration rules follow "last one wins" - // order. - Rules []*HttpRule `json:"rules,omitempty"` - // ForceSendFields is a list of field names (e.g. - // "FullyDecodeReservedExpansion") to unconditionally include in API requests. - // By default, fields with empty or default values are omitted from API - // requests. See https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields - // for more details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "FullyDecodeReservedExpansion") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s Http) MarshalJSON() ([]byte, error) { - type NoMethod Http - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// HttpRule: gRPC Transcoding gRPC Transcoding is a feature for mapping between -// a gRPC method and one or more HTTP REST endpoints. It allows developers to -// build a single API service that supports both gRPC APIs and REST APIs. Many -// systems, including Google APIs (https://github.com/googleapis/googleapis), -// Cloud Endpoints (https://cloud.google.com/endpoints), gRPC Gateway -// (https://github.com/grpc-ecosystem/grpc-gateway), and Envoy -// (https://github.com/envoyproxy/envoy) proxy support this feature and use it -// for large scale production services. `HttpRule` defines the schema of the -// gRPC/REST mapping. The mapping specifies how different portions of the gRPC -// request message are mapped to the URL path, URL query parameters, and HTTP -// request body. It also controls how the gRPC response message is mapped to -// the HTTP response body. `HttpRule` is typically specified as an -// `google.api.http` annotation on the gRPC method. Each mapping specifies a -// URL path template and an HTTP method. The path template may refer to one or -// more fields in the gRPC request message, as long as each field is a -// non-repeated field with a primitive (non-message) type. The path template -// controls how fields of the request message are mapped to the URL path. -// Example: service Messaging { rpc GetMessage(GetMessageRequest) returns -// (Message) { option (google.api.http) = { get: "/v1/{name=messages/*}" }; } } -// message GetMessageRequest { string name = 1; // Mapped to URL path. } -// message Message { string text = 1; // The resource content. } This enables -// an HTTP REST to gRPC mapping as below: - HTTP: `GET /v1/messages/123456` - -// gRPC: `GetMessage(name: "messages/123456")` Any fields in the request -// message which are not bound by the path template automatically become HTTP -// query parameters if there is no HTTP request body. For example: service -// Messaging { rpc GetMessage(GetMessageRequest) returns (Message) { option -// (google.api.http) = { get:"/v1/messages/{message_id}" }; } } message -// GetMessageRequest { message SubMessage { string subfield = 1; } string -// message_id = 1; // Mapped to URL path. int64 revision = 2; // Mapped to URL -// query parameter `revision`. SubMessage sub = 3; // Mapped to URL query -// parameter `sub.subfield`. } This enables a HTTP JSON to RPC mapping as -// below: - HTTP: `GET /v1/messages/123456?revision=2&sub.subfield=foo` - gRPC: -// `GetMessage(message_id: "123456" revision: 2 sub: SubMessage(subfield: -// "foo"))` Note that fields which are mapped to URL query parameters must have -// a primitive type or a repeated primitive type or a non-repeated message -// type. In the case of a repeated type, the parameter can be repeated in the -// URL as `...?param=A¶m=B`. In the case of a message type, each field of -// the message is mapped to a separate parameter, such as -// `...?foo.a=A&foo.b=B&foo.c=C`. For HTTP methods that allow a request body, -// the `body` field specifies the mapping. Consider a REST update method on the -// message resource collection: service Messaging { rpc -// UpdateMessage(UpdateMessageRequest) returns (Message) { option -// (google.api.http) = { patch: "/v1/messages/{message_id}" body: "message" }; -// } } message UpdateMessageRequest { string message_id = 1; // mapped to the -// URL Message message = 2; // mapped to the body } The following HTTP JSON to -// RPC mapping is enabled, where the representation of the JSON in the request -// body is determined by protos JSON encoding: - HTTP: `PATCH -// /v1/messages/123456 { "text": "Hi!" }` - gRPC: `UpdateMessage(message_id: -// "123456" message { text: "Hi!" })` The special name `*` can be used in the -// body mapping to define that every field not bound by the path template -// should be mapped to the request body. This enables the following alternative -// definition of the update method: service Messaging { rpc -// UpdateMessage(Message) returns (Message) { option (google.api.http) = { -// patch: "/v1/messages/{message_id}" body: "*" }; } } message Message { string -// message_id = 1; string text = 2; } The following HTTP JSON to RPC mapping is -// enabled: - HTTP: `PATCH /v1/messages/123456 { "text": "Hi!" }` - gRPC: -// `UpdateMessage(message_id: "123456" text: "Hi!")` Note that when using `*` -// in the body mapping, it is not possible to have HTTP parameters, as all -// fields not bound by the path end in the body. This makes this option more -// rarely used in practice when defining REST APIs. The common usage of `*` is -// in custom methods which don't use the URL at all for transferring data. It -// is possible to define multiple HTTP methods for one RPC by using the -// `additional_bindings` option. Example: service Messaging { rpc -// GetMessage(GetMessageRequest) returns (Message) { option (google.api.http) = -// { get: "/v1/messages/{message_id}" additional_bindings { get: -// "/v1/users/{user_id}/messages/{message_id}" } }; } } message -// GetMessageRequest { string message_id = 1; string user_id = 2; } This -// enables the following two alternative HTTP JSON to RPC mappings: - HTTP: -// `GET /v1/messages/123456` - gRPC: `GetMessage(message_id: "123456")` - HTTP: -// `GET /v1/users/me/messages/123456` - gRPC: `GetMessage(user_id: "me" -// message_id: "123456")` Rules for HTTP mapping 1. Leaf request fields -// (recursive expansion nested messages in the request message) are classified -// into three categories: - Fields referred by the path template. They are -// passed via the URL path. - Fields referred by the HttpRule.body. They are -// passed via the HTTP request body. - All other fields are passed via the URL -// query parameters, and the parameter name is the field path in the request -// message. A repeated field can be represented as multiple query parameters -// under the same name. 2. If HttpRule.body is "*", there is no URL query -// parameter, all fields are passed via URL path and HTTP request body. 3. If -// HttpRule.body is omitted, there is no HTTP request body, all fields are -// passed via URL path and URL query parameters. Path template syntax Template -// = "/" Segments [ Verb ] ; Segments = Segment { "/" Segment } ; Segment = "*" -// | "**" | LITERAL | Variable ; Variable = "{" FieldPath [ "=" Segments ] "}" -// ; FieldPath = IDENT { "." IDENT } ; Verb = ":" LITERAL ; The syntax `*` -// matches a single URL path segment. The syntax `**` matches zero or more URL -// path segments, which must be the last part of the URL path except the -// `Verb`. The syntax `Variable` matches part of the URL path as specified by -// its template. A variable template must not contain other variables. If a -// variable matches a single path segment, its template may be omitted, e.g. -// `{var}` is equivalent to `{var=*}`. The syntax `LITERAL` matches literal -// text in the URL path. If the `LITERAL` contains any reserved character, such -// characters should be percent-encoded before the matching. If a variable -// contains exactly one path segment, such as "{var}" or "{var=*}", when -// such a variable is expanded into a URL path on the client side, all -// characters except `[-_.~0-9a-zA-Z]` are percent-encoded. The server side -// does the reverse decoding. Such variables show up in the Discovery Document -// (https://developers.google.com/discovery/v1/reference/apis) as `{var}`. If a -// variable contains multiple path segments, such as "{var=foo/*}" or -// "{var=**}", when such a variable is expanded into a URL path on the client -// side, all characters except `[-_.~/0-9a-zA-Z]` are percent-encoded. The -// server side does the reverse decoding, except "%2F" and "%2f" are left -// unchanged. Such variables show up in the Discovery Document -// (https://developers.google.com/discovery/v1/reference/apis) as `{+var}`. -// Using gRPC API Service Configuration gRPC API Service Configuration (service -// config) is a configuration language for configuring a gRPC service to become -// a user-facing product. The service config is simply the YAML representation -// of the `google.api.Service` proto message. As an alternative to annotating -// your proto file, you can configure gRPC transcoding in your service config -// YAML files. You do this by specifying a `HttpRule` that maps the gRPC method -// to a REST endpoint, achieving the same effect as the proto annotation. This -// can be particularly useful if you have a proto that is reused in multiple -// services. Note that any transcoding specified in the service config will -// override any matching transcoding configuration in the proto. The following -// example selects a gRPC method and applies an `HttpRule` to it: http: rules: -// - selector: example.v1.Messaging.GetMessage get: -// /v1/messages/{message_id}/{sub.subfield} Special notes When gRPC Transcoding -// is used to map a gRPC to JSON REST endpoints, the proto to JSON conversion -// must follow the proto3 specification -// (https://developers.google.com/protocol-buffers/docs/proto3#json). While the -// single segment variable follows the semantics of RFC 6570 -// (https://tools.ietf.org/html/rfc6570) Section 3.2.2 Simple String Expansion, -// the multi segment variable **does not** follow RFC 6570 Section 3.2.3 -// Reserved Expansion. The reason is that the Reserved Expansion does not -// expand special characters like `?` and `#`, which would lead to invalid -// URLs. As the result, gRPC Transcoding uses a custom encoding for multi -// segment variables. The path variables **must not** refer to any repeated or -// mapped field, because client libraries are not capable of handling such -// variable expansion. The path variables **must not** capture the leading "/" -// character. The reason is that the most common use case "{var}" does not -// capture the leading "/" character. For consistency, all path variables must -// share the same behavior. Repeated message fields must not be mapped to URL -// query parameters, because no client library can support such complicated -// mapping. If an API needs to use a JSON array for request or response body, -// it can map the request or response body to a repeated field. However, some -// gRPC Transcoding implementations may not support this feature. -type HttpRule struct { - // AdditionalBindings: Additional HTTP bindings for the selector. Nested - // bindings must not contain an `additional_bindings` field themselves (that - // is, the nesting may only be one level deep). - AdditionalBindings []*HttpRule `json:"additionalBindings,omitempty"` - // Body: The name of the request field whose value is mapped to the HTTP - // request body, or `*` for mapping all request fields not captured by the path - // pattern to the HTTP body, or omitted for not having any HTTP request body. - // NOTE: the referred field must be present at the top-level of the request - // message type. - Body string `json:"body,omitempty"` - // Custom: The custom pattern is used for specifying an HTTP method that is not - // included in the `pattern` field, such as HEAD, or "*" to leave the HTTP - // method unspecified for this rule. The wild-card rule is useful for services - // that provide content to Web (HTML) clients. - Custom *CustomHttpPattern `json:"custom,omitempty"` - // Delete: Maps to HTTP DELETE. Used for deleting a resource. - Delete string `json:"delete,omitempty"` - // Get: Maps to HTTP GET. Used for listing and getting information about - // resources. - Get string `json:"get,omitempty"` - // Patch: Maps to HTTP PATCH. Used for updating a resource. - Patch string `json:"patch,omitempty"` - // Post: Maps to HTTP POST. Used for creating a resource or performing an - // action. - Post string `json:"post,omitempty"` - // Put: Maps to HTTP PUT. Used for replacing a resource. - Put string `json:"put,omitempty"` - // ResponseBody: Optional. The name of the response field whose value is mapped - // to the HTTP response body. When omitted, the entire response message will be - // used as the HTTP response body. NOTE: The referred field must be present at - // the top-level of the response message type. - ResponseBody string `json:"responseBody,omitempty"` - // Selector: Selects a method to which this rule applies. Refer to selector for - // syntax details. - Selector string `json:"selector,omitempty"` - // ForceSendFields is a list of field names (e.g. "AdditionalBindings") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AdditionalBindings") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s HttpRule) MarshalJSON() ([]byte, error) { - type NoMethod HttpRule - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// JavaSettings: Settings for Java client libraries. -type JavaSettings struct { - // Common: Some settings. - Common *CommonLanguageSettings `json:"common,omitempty"` - // LibraryPackage: The package name to use in Java. Clobbers the java_package - // option set in the protobuf. This should be used **only** by APIs who have - // already set the language_settings.java.package_name" field in gapic.yaml. - // API teams should use the protobuf java_package option where possible. - // Example of a YAML configuration:: publishing: library_settings: - // java_settings: library_package: com.google.cloud.pubsub.v1 - LibraryPackage string `json:"libraryPackage,omitempty"` - // ServiceClassNames: Configure the Java class name to use instead of the - // service's for its corresponding generated GAPIC client. Keys are - // fully-qualified service names as they appear in the protobuf (including the - // full the language_settings.java.interface_names" field in gapic.yaml. API - // teams should otherwise use the service name as it appears in the protobuf. - // Example of a YAML configuration:: publishing: java_settings: - // service_class_names: - google.pubsub.v1.Publisher: TopicAdmin - - // google.pubsub.v1.Subscriber: SubscriptionAdmin - ServiceClassNames map[string]string `json:"serviceClassNames,omitempty"` - // ForceSendFields is a list of field names (e.g. "Common") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Common") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s JavaSettings) MarshalJSON() ([]byte, error) { - type NoMethod JavaSettings - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// JwtLocation: Specifies a location to extract JWT from an API request. -type JwtLocation struct { - // Cookie: Specifies cookie name to extract JWT token. - Cookie string `json:"cookie,omitempty"` - // Header: Specifies HTTP header name to extract JWT token. - Header string `json:"header,omitempty"` - // Query: Specifies URL query parameter name to extract JWT token. - Query string `json:"query,omitempty"` - // ValuePrefix: The value prefix. The value format is "value_prefix{token}" - // Only applies to "in" header type. Must be empty for "in" query type. If not - // empty, the header value has to match (case sensitive) this prefix. If not - // matched, JWT will not be extracted. If matched, JWT will be extracted after - // the prefix is removed. For example, for "Authorization: Bearer {JWT}", - // value_prefix="Bearer " with a space at the end. - ValuePrefix string `json:"valuePrefix,omitempty"` - // ForceSendFields is a list of field names (e.g. "Cookie") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Cookie") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s JwtLocation) MarshalJSON() ([]byte, error) { - type NoMethod JwtLocation - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// LabelDescriptor: A description of a label. -type LabelDescriptor struct { - // Description: A human-readable description for the label. - Description string `json:"description,omitempty"` - // Key: The label key. - Key string `json:"key,omitempty"` - // ValueType: The type of data that can be assigned to the label. - // - // Possible values: - // "STRING" - A variable-length string. This is the default. - // "BOOL" - Boolean; true or false. - // "INT64" - A 64-bit signed integer. - ValueType string `json:"valueType,omitempty"` - // ForceSendFields is a list of field names (e.g. "Description") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Description") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s LabelDescriptor) MarshalJSON() ([]byte, error) { - type NoMethod LabelDescriptor - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ListConnectionsResponse: ListConnectionsResponse is the response to list -// peering states for the given service and consumer project. -type ListConnectionsResponse struct { - // Connections: The list of Connections. - Connections []*Connection `json:"connections,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Connections") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Connections") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ListConnectionsResponse) MarshalJSON() ([]byte, error) { - type NoMethod ListConnectionsResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ListDnsRecordSetsResponse: Represents all DNS RecordSets associated with the -// producer network -type ListDnsRecordSetsResponse struct { - // DnsRecordSets: DNS record Set Resource - DnsRecordSets []*DnsRecordSet `json:"dnsRecordSets,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "DnsRecordSets") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DnsRecordSets") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ListDnsRecordSetsResponse) MarshalJSON() ([]byte, error) { - type NoMethod ListDnsRecordSetsResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ListDnsZonesResponse: Represents all DNS zones in the shared producer host -// project and the matching peering zones in the consumer project. -type ListDnsZonesResponse struct { - // DnsZonePairs: All pairs of private DNS zones in the shared producer host - // project and the matching peering zones in the consumer project.. - DnsZonePairs []*DnsZonePair `json:"dnsZonePairs,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "DnsZonePairs") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DnsZonePairs") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ListDnsZonesResponse) MarshalJSON() ([]byte, error) { - type NoMethod ListDnsZonesResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ListOperationsResponse: The response message for Operations.ListOperations. -type ListOperationsResponse struct { - // NextPageToken: The standard List next-page token. - NextPageToken string `json:"nextPageToken,omitempty"` - // Operations: A list of operations that matches the specified filter in the - // request. - Operations []*Operation `json:"operations,omitempty"` - // Unreachable: Unordered list. Unreachable resources. Populated when the - // request sets `ListOperationsRequest.return_partial_success` and reads across - // collections. For example, when attempting to list all resources across all - // supported locations. - Unreachable []string `json:"unreachable,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "NextPageToken") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "NextPageToken") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ListOperationsResponse) MarshalJSON() ([]byte, error) { - type NoMethod ListOperationsResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ListPeeredDnsDomainsResponse: Response to list peered DNS domains for a -// given connection. -type ListPeeredDnsDomainsResponse struct { - // PeeredDnsDomains: The list of peered DNS domains. - PeeredDnsDomains []*PeeredDnsDomain `json:"peeredDnsDomains,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "PeeredDnsDomains") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "PeeredDnsDomains") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ListPeeredDnsDomainsResponse) MarshalJSON() ([]byte, error) { - type NoMethod ListPeeredDnsDomainsResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// LogDescriptor: A description of a log type. Example in YAML format: - name: -// library.googleapis.com/activity_history description: The history of -// borrowing and returning library items. display_name: Activity labels: - key: -// /customer_id description: Identifier of a library customer -type LogDescriptor struct { - // Description: A human-readable description of this log. This information - // appears in the documentation and can contain details. - Description string `json:"description,omitempty"` - // DisplayName: The human-readable name for this log. This information appears - // on the user interface and should be concise. - DisplayName string `json:"displayName,omitempty"` - // Labels: The set of labels that are available to describe a specific log - // entry. Runtime requests that contain labels not specified here are - // considered invalid. - Labels []*LabelDescriptor `json:"labels,omitempty"` - // Name: The name of the log. It must be less than 512 characters long and can - // include the following characters: upper- and lower-case alphanumeric - // characters [A-Za-z0-9], and punctuation characters including slash, - // underscore, hyphen, period [/_-.]. - Name string `json:"name,omitempty"` - // ForceSendFields is a list of field names (e.g. "Description") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Description") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s LogDescriptor) MarshalJSON() ([]byte, error) { - type NoMethod LogDescriptor - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// Logging: Logging configuration of the service. The following example shows -// how to configure logs to be sent to the producer and consumer projects. In -// the example, the `activity_history` log is sent to both the producer and -// consumer projects, whereas the `purchase_history` log is only sent to the -// producer project. monitored_resources: - type: library.googleapis.com/branch -// labels: - key: /city description: The city where the library branch is -// located in. - key: /name description: The name of the branch. logs: - name: -// activity_history labels: - key: /customer_id - name: purchase_history -// logging: producer_destinations: - monitored_resource: -// library.googleapis.com/branch logs: - activity_history - purchase_history -// consumer_destinations: - monitored_resource: library.googleapis.com/branch -// logs: - activity_history -type Logging struct { - // ConsumerDestinations: Logging configurations for sending logs to the - // consumer project. There can be multiple consumer destinations, each one must - // have a different monitored resource type. A log can be used in at most one - // consumer destination. - ConsumerDestinations []*LoggingDestination `json:"consumerDestinations,omitempty"` - // ProducerDestinations: Logging configurations for sending logs to the - // producer project. There can be multiple producer destinations, each one must - // have a different monitored resource type. A log can be used in at most one - // producer destination. - ProducerDestinations []*LoggingDestination `json:"producerDestinations,omitempty"` - // ForceSendFields is a list of field names (e.g. "ConsumerDestinations") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ConsumerDestinations") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s Logging) MarshalJSON() ([]byte, error) { - type NoMethod Logging - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// LoggingDestination: Configuration of a specific logging destination (the -// producer project or the consumer project). -type LoggingDestination struct { - // Logs: Names of the logs to be sent to this destination. Each name must be - // defined in the Service.logs section. If the log name is not a domain scoped - // name, it will be automatically prefixed with the service name followed by - // "/". - Logs []string `json:"logs,omitempty"` - // MonitoredResource: The monitored resource type. The type must be defined in - // the Service.monitored_resources section. - MonitoredResource string `json:"monitoredResource,omitempty"` - // ForceSendFields is a list of field names (e.g. "Logs") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Logs") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s LoggingDestination) MarshalJSON() ([]byte, error) { - type NoMethod LoggingDestination - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// LongRunning: Describes settings to use when generating API methods that use -// the long-running operation pattern. All default values below are from those -// used in the client library generators (e.g. Java -// (https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). -type LongRunning struct { - // InitialPollDelay: Initial delay after which the first poll request will be - // made. Default value: 5 seconds. - InitialPollDelay string `json:"initialPollDelay,omitempty"` - // MaxPollDelay: Maximum time between two subsequent poll requests. Default - // value: 45 seconds. - MaxPollDelay string `json:"maxPollDelay,omitempty"` - // PollDelayMultiplier: Multiplier to gradually increase delay between - // subsequent polls until it reaches max_poll_delay. Default value: 1.5. - PollDelayMultiplier float64 `json:"pollDelayMultiplier,omitempty"` - // TotalPollTimeout: Total polling timeout. Default value: 5 minutes. - TotalPollTimeout string `json:"totalPollTimeout,omitempty"` - // ForceSendFields is a list of field names (e.g. "InitialPollDelay") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "InitialPollDelay") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s LongRunning) MarshalJSON() ([]byte, error) { - type NoMethod LongRunning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -func (s *LongRunning) UnmarshalJSON(data []byte) error { - type NoMethod LongRunning - var s1 struct { - PollDelayMultiplier gensupport.JSONFloat64 `json:"pollDelayMultiplier"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.PollDelayMultiplier = float64(s1.PollDelayMultiplier) - return nil -} - -// Method: Method represents a method of an API interface. New usages of this -// message as an alternative to MethodDescriptorProto are strongly discouraged. -// This message does not reliability preserve all information necessary to -// model the schema and preserve semantics. Instead make use of -// FileDescriptorSet which preserves the necessary information. -type Method struct { - // Edition: The source edition string, only valid when syntax is - // SYNTAX_EDITIONS. This field should be ignored, instead the edition should be - // inherited from Api. This is similar to Field and EnumValue. - Edition string `json:"edition,omitempty"` - // Name: The simple name of this method. - Name string `json:"name,omitempty"` - // Options: Any metadata attached to the method. - Options []*Option `json:"options,omitempty"` - // RequestStreaming: If true, the request is streamed. - RequestStreaming bool `json:"requestStreaming,omitempty"` - // RequestTypeUrl: A URL of the input message type. - RequestTypeUrl string `json:"requestTypeUrl,omitempty"` - // ResponseStreaming: If true, the response is streamed. - ResponseStreaming bool `json:"responseStreaming,omitempty"` - // ResponseTypeUrl: The URL of the output message type. - ResponseTypeUrl string `json:"responseTypeUrl,omitempty"` - // Syntax: The source syntax of this method. This field should be ignored, - // instead the syntax should be inherited from Api. This is similar to Field - // and EnumValue. - // - // Possible values: - // "SYNTAX_PROTO2" - Syntax `proto2`. - // "SYNTAX_PROTO3" - Syntax `proto3`. - // "SYNTAX_EDITIONS" - Syntax `editions`. - Syntax string `json:"syntax,omitempty"` - // ForceSendFields is a list of field names (e.g. "Edition") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Edition") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s Method) MarshalJSON() ([]byte, error) { - type NoMethod Method - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// MethodPolicy: Defines policies applying to an RPC method. -type MethodPolicy struct { - // RequestPolicies: Policies that are applicable to the request message. - RequestPolicies []*FieldPolicy `json:"requestPolicies,omitempty"` - // Selector: Selects a method to which these policies should be enforced, for - // example, "google.pubsub.v1.Subscriber.CreateSubscription". Refer to selector - // for syntax details. NOTE: This field must not be set in the proto - // annotation. It will be automatically filled by the service config compiler . - Selector string `json:"selector,omitempty"` - // ForceSendFields is a list of field names (e.g. "RequestPolicies") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "RequestPolicies") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s MethodPolicy) MarshalJSON() ([]byte, error) { - type NoMethod MethodPolicy - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// MethodSettings: Describes the generator configuration for a method. -type MethodSettings struct { - // AutoPopulatedFields: List of top-level fields of the request message, that - // should be automatically populated by the client libraries based on their - // (google.api.field_info).format. Currently supported format: UUID4. Example - // of a YAML configuration: publishing: method_settings: - selector: - // google.example.v1.ExampleService.CreateExample auto_populated_fields: - - // request_id - AutoPopulatedFields []string `json:"autoPopulatedFields,omitempty"` - // Batching: Batching configuration for an API method in client libraries. - // Example of a YAML configuration: publishing: method_settings: - selector: - // google.example.v1.ExampleService.BatchCreateExample batching: - // element_count_threshold: 1000 request_byte_threshold: 100000000 - // delay_threshold_millis: 10 - Batching *BatchingConfigProto `json:"batching,omitempty"` - // LongRunning: Describes settings to use for long-running operations when - // generating API methods for RPCs. Complements RPCs that use the annotations - // in google/longrunning/operations.proto. Example of a YAML configuration:: - // publishing: method_settings: - selector: - // google.cloud.speech.v2.Speech.BatchRecognize long_running: - // initial_poll_delay: 60s # 1 minute poll_delay_multiplier: 1.5 - // max_poll_delay: 360s # 6 minutes total_poll_timeout: 54000s # 90 minutes - LongRunning *LongRunning `json:"longRunning,omitempty"` - // Selector: The fully qualified name of the method, for which the options - // below apply. This is used to find the method to apply the options. Example: - // publishing: method_settings: - selector: - // google.storage.control.v2.StorageControl.CreateFolder # method settings for - // CreateFolder... - Selector string `json:"selector,omitempty"` - // ForceSendFields is a list of field names (e.g. "AutoPopulatedFields") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AutoPopulatedFields") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s MethodSettings) MarshalJSON() ([]byte, error) { - type NoMethod MethodSettings - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// MetricDescriptor: Defines a metric type and its schema. Once a metric -// descriptor is created, deleting or altering it stops data collection and -// makes the metric type's existing data unusable. -type MetricDescriptor struct { - // Description: A detailed description of the metric, which can be used in - // documentation. - Description string `json:"description,omitempty"` - // DisplayName: A concise name for the metric, which can be displayed in user - // interfaces. Use sentence case without an ending period, for example "Request - // count". This field is optional but it is recommended to be set for any - // metrics associated with user-visible concepts, such as Quota. - DisplayName string `json:"displayName,omitempty"` - // Labels: The set of labels that can be used to describe a specific instance - // of this metric type. For example, the - // `appengine.googleapis.com/http/server/response_latencies` metric type has a - // label for the HTTP response code, `response_code`, so you can look at - // latencies for successful responses or just for responses that failed. - Labels []*LabelDescriptor `json:"labels,omitempty"` - // LaunchStage: Optional. The launch stage of the metric definition. - // - // Possible values: - // "LAUNCH_STAGE_UNSPECIFIED" - Do not use this default value. - // "UNIMPLEMENTED" - The feature is not yet implemented. Users can not use - // it. - // "PRELAUNCH" - Prelaunch features are hidden from users and are only - // visible internally. - // "EARLY_ACCESS" - Early Access features are limited to a closed group of - // testers. To use these features, you must sign up in advance and sign a - // Trusted Tester agreement (which includes confidentiality provisions). These - // features may be unstable, changed in backward-incompatible ways, and are not - // guaranteed to be released. - // "ALPHA" - Alpha is a limited availability test for releases before they - // are cleared for widespread use. By Alpha, all significant design issues are - // resolved and we are in the process of verifying functionality. Alpha - // customers need to apply for access, agree to applicable terms, and have - // their projects allowlisted. Alpha releases don't have to be feature - // complete, no SLAs are provided, and there are no technical support - // obligations, but they will be far enough along that customers can actually - // use them in test environments or for limited-use tests -- just like they - // would in normal production cases. - // "BETA" - Beta is the point at which we are ready to open a release for any - // customer to use. There are no SLA or technical support obligations in a Beta - // release. Products will be complete from a feature perspective, but may have - // some open outstanding issues. Beta releases are suitable for limited - // production use cases. - // "GA" - GA features are open to all developers and are considered stable - // and fully qualified for production use. - // "DEPRECATED" - Deprecated features are scheduled to be shut down and - // removed. For more information, see the "Deprecation Policy" section of our - // [Terms of Service](https://cloud.google.com/terms/) and the [Google Cloud - // Platform Subject to the Deprecation - // Policy](https://cloud.google.com/terms/deprecation) documentation. - LaunchStage string `json:"launchStage,omitempty"` - // Metadata: Optional. Metadata which can be used to guide usage of the metric. - Metadata *MetricDescriptorMetadata `json:"metadata,omitempty"` - // MetricKind: Whether the metric records instantaneous values, changes to a - // value, etc. Some combinations of `metric_kind` and `value_type` might not be - // supported. - // - // Possible values: - // "METRIC_KIND_UNSPECIFIED" - Do not use this default value. - // "GAUGE" - An instantaneous measurement of a value. - // "DELTA" - The change in a value during a time interval. - // "CUMULATIVE" - A value accumulated over a time interval. Cumulative - // measurements in a time series should have the same start time and increasing - // end times, until an event resets the cumulative value to zero and sets a new - // start time for the following points. - MetricKind string `json:"metricKind,omitempty"` - // MonitoredResourceTypes: Read-only. If present, then a time series, which is - // identified partially by a metric type and a MonitoredResourceDescriptor, - // that is associated with this metric type can only be associated with one of - // the monitored resource types listed here. - MonitoredResourceTypes []string `json:"monitoredResourceTypes,omitempty"` - // Name: The resource name of the metric descriptor. - Name string `json:"name,omitempty"` - // Type: The metric type, including its DNS name prefix. The type is not - // URL-encoded. All user-defined metric types have the DNS name - // `custom.googleapis.com` or `external.googleapis.com`. Metric types should - // use a natural hierarchical grouping. For example: - // "custom.googleapis.com/invoice/paid/amount" - // "external.googleapis.com/prometheus/up" - // "appengine.googleapis.com/http/server/response_latencies" - Type string `json:"type,omitempty"` - // Unit: The units in which the metric value is reported. It is only applicable - // if the `value_type` is `INT64`, `DOUBLE`, or `DISTRIBUTION`. The `unit` - // defines the representation of the stored metric values. Different systems - // might scale the values to be more easily displayed (so a value of `0.02kBy` - // _might_ be displayed as `20By`, and a value of `3523kBy` _might_ be - // displayed as `3.5MBy`). However, if the `unit` is `kBy`, then the value of - // the metric is always in thousands of bytes, no matter how it might be - // displayed. If you want a custom metric to record the exact number of - // CPU-seconds used by a job, you can create an `INT64 CUMULATIVE` metric whose - // `unit` is `s{CPU}` (or equivalently `1s{CPU}` or just `s`). If the job uses - // 12,005 CPU-seconds, then the value is written as `12005`. Alternatively, if - // you want a custom metric to record data in a more granular way, you can - // create a `DOUBLE CUMULATIVE` metric whose `unit` is `ks{CPU}`, and then - // write the value `12.005` (which is `12005/1000`), or use `Kis{CPU}` and - // write `11.723` (which is `12005/1024`). The supported units are a subset of - // The Unified Code for Units of Measure (https://unitsofmeasure.org/ucum.html) - // standard: **Basic units (UNIT)** * `bit` bit * `By` byte * `s` second * - // `min` minute * `h` hour * `d` day * `1` dimensionless **Prefixes (PREFIX)** - // * `k` kilo (10^3) * `M` mega (10^6) * `G` giga (10^9) * `T` tera (10^12) * - // `P` peta (10^15) * `E` exa (10^18) * `Z` zetta (10^21) * `Y` yotta (10^24) * - // `m` milli (10^-3) * `u` micro (10^-6) * `n` nano (10^-9) * `p` pico (10^-12) - // * `f` femto (10^-15) * `a` atto (10^-18) * `z` zepto (10^-21) * `y` yocto - // (10^-24) * `Ki` kibi (2^10) * `Mi` mebi (2^20) * `Gi` gibi (2^30) * `Ti` - // tebi (2^40) * `Pi` pebi (2^50) **Grammar** The grammar also includes these - // connectors: * `/` division or ratio (as an infix operator). For examples, - // `kBy/{email}` or `MiBy/10ms` (although you should almost never have `/s` in - // a metric `unit`; rates should always be computed at query time from the - // underlying cumulative or delta value). * `.` multiplication or composition - // (as an infix operator). For examples, `GBy.d` or `k{watt}.h`. The grammar - // for a unit is as follows: Expression = Component { "." Component } { "/" - // Component } ; Component = ( [ PREFIX ] UNIT | "%" ) [ Annotation ] | - // Annotation | "1" ; Annotation = "{" NAME "}" ; Notes: * `Annotation` is just - // a comment if it follows a `UNIT`. If the annotation is used alone, then the - // unit is equivalent to `1`. For examples, `{request}/s == 1/s`, - // `By{transmitted}/s == By/s`. * `NAME` is a sequence of non-blank printable - // ASCII characters not containing `{` or `}`. * `1` represents a unitary - // dimensionless unit (https://en.wikipedia.org/wiki/Dimensionless_quantity) of - // 1, such as in `1/s`. It is typically used when none of the basic units are - // appropriate. For example, "new users per day" can be represented as `1/d` or - // `{new-users}/d` (and a metric value `5` would mean "5 new users). - // Alternatively, "thousands of page views per day" would be represented as - // `1000/d` or `k1/d` or `k{page_views}/d` (and a metric value of `5.3` would - // mean "5300 page views per day"). * `%` represents dimensionless value of - // 1/100, and annotates values giving a percentage (so the metric values are - // typically in the range of 0..100, and a metric value `3` means "3 percent"). - // * `10^2.%` indicates a metric contains a ratio, typically in the range 0..1, - // that will be multiplied by 100 and displayed as a percentage (so a metric - // value `0.03` means "3 percent"). - Unit string `json:"unit,omitempty"` - // ValueType: Whether the measurement is an integer, a floating-point number, - // etc. Some combinations of `metric_kind` and `value_type` might not be - // supported. - // - // Possible values: - // "VALUE_TYPE_UNSPECIFIED" - Do not use this default value. - // "BOOL" - The value is a boolean. This value type can be used only if the - // metric kind is `GAUGE`. - // "INT64" - The value is a signed 64-bit integer. - // "DOUBLE" - The value is a double precision floating point number. - // "STRING" - The value is a text string. This value type can be used only if - // the metric kind is `GAUGE`. - // "DISTRIBUTION" - The value is a `Distribution`. - // "MONEY" - The value is money. - ValueType string `json:"valueType,omitempty"` - // ForceSendFields is a list of field names (e.g. "Description") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Description") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s MetricDescriptor) MarshalJSON() ([]byte, error) { - type NoMethod MetricDescriptor - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// MetricDescriptorMetadata: Additional annotations that can be used to guide -// the usage of a metric. -type MetricDescriptorMetadata struct { - // IngestDelay: The delay of data points caused by ingestion. Data points older - // than this age are guaranteed to be ingested and available to be read, - // excluding data loss due to errors. - IngestDelay string `json:"ingestDelay,omitempty"` - // LaunchStage: Deprecated. Must use the MetricDescriptor.launch_stage instead. - // - // Possible values: - // "LAUNCH_STAGE_UNSPECIFIED" - Do not use this default value. - // "UNIMPLEMENTED" - The feature is not yet implemented. Users can not use - // it. - // "PRELAUNCH" - Prelaunch features are hidden from users and are only - // visible internally. - // "EARLY_ACCESS" - Early Access features are limited to a closed group of - // testers. To use these features, you must sign up in advance and sign a - // Trusted Tester agreement (which includes confidentiality provisions). These - // features may be unstable, changed in backward-incompatible ways, and are not - // guaranteed to be released. - // "ALPHA" - Alpha is a limited availability test for releases before they - // are cleared for widespread use. By Alpha, all significant design issues are - // resolved and we are in the process of verifying functionality. Alpha - // customers need to apply for access, agree to applicable terms, and have - // their projects allowlisted. Alpha releases don't have to be feature - // complete, no SLAs are provided, and there are no technical support - // obligations, but they will be far enough along that customers can actually - // use them in test environments or for limited-use tests -- just like they - // would in normal production cases. - // "BETA" - Beta is the point at which we are ready to open a release for any - // customer to use. There are no SLA or technical support obligations in a Beta - // release. Products will be complete from a feature perspective, but may have - // some open outstanding issues. Beta releases are suitable for limited - // production use cases. - // "GA" - GA features are open to all developers and are considered stable - // and fully qualified for production use. - // "DEPRECATED" - Deprecated features are scheduled to be shut down and - // removed. For more information, see the "Deprecation Policy" section of our - // [Terms of Service](https://cloud.google.com/terms/) and the [Google Cloud - // Platform Subject to the Deprecation - // Policy](https://cloud.google.com/terms/deprecation) documentation. - LaunchStage string `json:"launchStage,omitempty"` - // SamplePeriod: The sampling period of metric data points. For metrics which - // are written periodically, consecutive data points are stored at this time - // interval, excluding data loss due to errors. Metrics with a higher - // granularity have a smaller sampling period. - SamplePeriod string `json:"samplePeriod,omitempty"` - // TimeSeriesResourceHierarchyLevel: The scope of the timeseries data of the - // metric. - // - // Possible values: - // "TIME_SERIES_RESOURCE_HIERARCHY_LEVEL_UNSPECIFIED" - Do not use this - // default value. - // "PROJECT" - Scopes a metric to a project. - // "ORGANIZATION" - Scopes a metric to an organization. - // "FOLDER" - Scopes a metric to a folder. - TimeSeriesResourceHierarchyLevel []string `json:"timeSeriesResourceHierarchyLevel,omitempty"` - // ForceSendFields is a list of field names (e.g. "IngestDelay") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "IngestDelay") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s MetricDescriptorMetadata) MarshalJSON() ([]byte, error) { - type NoMethod MetricDescriptorMetadata - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// MetricRule: Bind API methods to metrics. Binding a method to a metric causes -// that metric's configured quota behaviors to apply to the method call. -type MetricRule struct { - // MetricCosts: Metrics to update when the selected methods are called, and the - // associated cost applied to each metric. The key of the map is the metric - // name, and the values are the amount increased for the metric against which - // the quota limits are defined. The value must not be negative. - MetricCosts map[string]string `json:"metricCosts,omitempty"` - // Selector: Selects the methods to which this rule applies. Refer to selector - // for syntax details. - Selector string `json:"selector,omitempty"` - // ForceSendFields is a list of field names (e.g. "MetricCosts") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "MetricCosts") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s MetricRule) MarshalJSON() ([]byte, error) { - type NoMethod MetricRule - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// Mixin: Declares an API Interface to be included in this interface. The -// including interface must redeclare all the methods from the included -// interface, but documentation and options are inherited as follows: - If -// after comment and whitespace stripping, the documentation string of the -// redeclared method is empty, it will be inherited from the original method. - -// Each annotation belonging to the service config (http, visibility) which is -// not set in the redeclared method will be inherited. - If an http annotation -// is inherited, the path pattern will be modified as follows. Any version -// prefix will be replaced by the version of the including interface plus the -// root path if specified. Example of a simple mixin: package google.acl.v1; -// service AccessControl { // Get the underlying ACL object. rpc -// GetAcl(GetAclRequest) returns (Acl) { option (google.api.http).get = -// "/v1/{resource=**}:getAcl"; } } package google.storage.v2; service Storage { -// // rpc GetAcl(GetAclRequest) returns (Acl); // Get a data record. rpc -// GetData(GetDataRequest) returns (Data) { option (google.api.http).get = -// "/v2/{resource=**}"; } } Example of a mixin configuration: apis: - name: -// google.storage.v2.Storage mixins: - name: google.acl.v1.AccessControl The -// mixin construct implies that all methods in `AccessControl` are also -// declared with same name and request/response types in `Storage`. A -// documentation generator or annotation processor will see the effective -// `Storage.GetAcl` method after inheriting documentation and annotations as -// follows: service Storage { // Get the underlying ACL object. rpc -// GetAcl(GetAclRequest) returns (Acl) { option (google.api.http).get = -// "/v2/{resource=**}:getAcl"; } ... } Note how the version in the path pattern -// changed from `v1` to `v2`. If the `root` field in the mixin is specified, it -// should be a relative path under which inherited HTTP paths are placed. -// Example: apis: - name: google.storage.v2.Storage mixins: - name: -// google.acl.v1.AccessControl root: acls This implies the following inherited -// HTTP annotation: service Storage { // Get the underlying ACL object. rpc -// GetAcl(GetAclRequest) returns (Acl) { option (google.api.http).get = -// "/v2/acls/{resource=**}:getAcl"; } ... } -type Mixin struct { - // Name: The fully qualified name of the interface which is included. - Name string `json:"name,omitempty"` - // Root: If non-empty specifies a path under which inherited HTTP paths are - // rooted. - Root string `json:"root,omitempty"` - // ForceSendFields is a list of field names (e.g. "Name") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Name") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s Mixin) MarshalJSON() ([]byte, error) { - type NoMethod Mixin - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// MonitoredResourceDescriptor: An object that describes the schema of a -// MonitoredResource object using a type name and a set of labels. For example, -// the monitored resource descriptor for Google Compute Engine VM instances has -// a type of "gce_instance" and specifies the use of the labels -// "instance_id" and "zone" to identify particular VM instances. Different -// APIs can support different monitored resource types. APIs generally provide -// a `list` method that returns the monitored resource descriptors used by the -// API. -type MonitoredResourceDescriptor struct { - // Description: Optional. A detailed description of the monitored resource type - // that might be used in documentation. - Description string `json:"description,omitempty"` - // DisplayName: Optional. A concise name for the monitored resource type that - // might be displayed in user interfaces. It should be a Title Cased Noun - // Phrase, without any article or other determiners. For example, "Google - // Cloud SQL Database". - DisplayName string `json:"displayName,omitempty"` - // Labels: Required. A set of labels used to describe instances of this - // monitored resource type. For example, an individual Google Cloud SQL - // database is identified by values for the labels "database_id" and - // "zone". - Labels []*LabelDescriptor `json:"labels,omitempty"` - // LaunchStage: Optional. The launch stage of the monitored resource - // definition. - // - // Possible values: - // "LAUNCH_STAGE_UNSPECIFIED" - Do not use this default value. - // "UNIMPLEMENTED" - The feature is not yet implemented. Users can not use - // it. - // "PRELAUNCH" - Prelaunch features are hidden from users and are only - // visible internally. - // "EARLY_ACCESS" - Early Access features are limited to a closed group of - // testers. To use these features, you must sign up in advance and sign a - // Trusted Tester agreement (which includes confidentiality provisions). These - // features may be unstable, changed in backward-incompatible ways, and are not - // guaranteed to be released. - // "ALPHA" - Alpha is a limited availability test for releases before they - // are cleared for widespread use. By Alpha, all significant design issues are - // resolved and we are in the process of verifying functionality. Alpha - // customers need to apply for access, agree to applicable terms, and have - // their projects allowlisted. Alpha releases don't have to be feature - // complete, no SLAs are provided, and there are no technical support - // obligations, but they will be far enough along that customers can actually - // use them in test environments or for limited-use tests -- just like they - // would in normal production cases. - // "BETA" - Beta is the point at which we are ready to open a release for any - // customer to use. There are no SLA or technical support obligations in a Beta - // release. Products will be complete from a feature perspective, but may have - // some open outstanding issues. Beta releases are suitable for limited - // production use cases. - // "GA" - GA features are open to all developers and are considered stable - // and fully qualified for production use. - // "DEPRECATED" - Deprecated features are scheduled to be shut down and - // removed. For more information, see the "Deprecation Policy" section of our - // [Terms of Service](https://cloud.google.com/terms/) and the [Google Cloud - // Platform Subject to the Deprecation - // Policy](https://cloud.google.com/terms/deprecation) documentation. - LaunchStage string `json:"launchStage,omitempty"` - // Name: Optional. The resource name of the monitored resource descriptor: - // "projects/{project_id}/monitoredResourceDescriptors/{type}" where {type} - // is the value of the `type` field in this object and {project_id} is a - // project ID that provides API-specific context for accessing the type. APIs - // that do not use project information can use the resource name format - // "monitoredResourceDescriptors/{type}". - Name string `json:"name,omitempty"` - // Type: Required. The monitored resource type. For example, the type - // "cloudsql_database" represents databases in Google Cloud SQL. For a list - // of types, see Monitored resource types - // (https://cloud.google.com/monitoring/api/resources) and Logging resource - // types (https://cloud.google.com/logging/docs/api/v2/resource-list). - Type string `json:"type,omitempty"` - // ForceSendFields is a list of field names (e.g. "Description") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Description") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s MonitoredResourceDescriptor) MarshalJSON() ([]byte, error) { - type NoMethod MonitoredResourceDescriptor - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// Monitoring: Monitoring configuration of the service. The example below shows -// how to configure monitored resources and metrics for monitoring. In the -// example, a monitored resource and two metrics are defined. The -// `library.googleapis.com/book/returned_count` metric is sent to both producer -// and consumer projects, whereas the `library.googleapis.com/book/num_overdue` -// metric is only sent to the consumer project. monitored_resources: - type: -// library.googleapis.com/Branch display_name: "Library Branch" description: "A -// branch of a library." launch_stage: GA labels: - key: resource_container -// description: "The Cloud container (ie. project id) for the Branch." - key: -// location description: "The location of the library branch." - key: branch_id -// description: "The id of the branch." metrics: - name: -// library.googleapis.com/book/returned_count display_name: "Books Returned" -// description: "The count of books that have been returned." launch_stage: GA -// metric_kind: DELTA value_type: INT64 unit: "1" labels: - key: customer_id -// description: "The id of the customer." - name: -// library.googleapis.com/book/num_overdue display_name: "Books Overdue" -// description: "The current number of overdue books." launch_stage: GA -// metric_kind: GAUGE value_type: INT64 unit: "1" labels: - key: customer_id -// description: "The id of the customer." monitoring: producer_destinations: - -// monitored_resource: library.googleapis.com/Branch metrics: - -// library.googleapis.com/book/returned_count consumer_destinations: - -// monitored_resource: library.googleapis.com/Branch metrics: - -// library.googleapis.com/book/returned_count - -// library.googleapis.com/book/num_overdue -type Monitoring struct { - // ConsumerDestinations: Monitoring configurations for sending metrics to the - // consumer project. There can be multiple consumer destinations. A monitored - // resource type may appear in multiple monitoring destinations if different - // aggregations are needed for different sets of metrics associated with that - // monitored resource type. A monitored resource and metric pair may only be - // used once in the Monitoring configuration. - ConsumerDestinations []*MonitoringDestination `json:"consumerDestinations,omitempty"` - // ProducerDestinations: Monitoring configurations for sending metrics to the - // producer project. There can be multiple producer destinations. A monitored - // resource type may appear in multiple monitoring destinations if different - // aggregations are needed for different sets of metrics associated with that - // monitored resource type. A monitored resource and metric pair may only be - // used once in the Monitoring configuration. - ProducerDestinations []*MonitoringDestination `json:"producerDestinations,omitempty"` - // ForceSendFields is a list of field names (e.g. "ConsumerDestinations") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ConsumerDestinations") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s Monitoring) MarshalJSON() ([]byte, error) { - type NoMethod Monitoring - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// MonitoringDestination: Configuration of a specific monitoring destination -// (the producer project or the consumer project). -type MonitoringDestination struct { - // Metrics: Types of the metrics to report to this monitoring destination. Each - // type must be defined in Service.metrics section. - Metrics []string `json:"metrics,omitempty"` - // MonitoredResource: The monitored resource type. The type must be defined in - // Service.monitored_resources section. - MonitoredResource string `json:"monitoredResource,omitempty"` - // ForceSendFields is a list of field names (e.g. "Metrics") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Metrics") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s MonitoringDestination) MarshalJSON() ([]byte, error) { - type NoMethod MonitoringDestination - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// NodeSettings: Settings for Node client libraries. -type NodeSettings struct { - // Common: Some settings. - Common *CommonLanguageSettings `json:"common,omitempty"` - // ForceSendFields is a list of field names (e.g. "Common") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Common") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NodeSettings) MarshalJSON() ([]byte, error) { - type NoMethod NodeSettings - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// OAuthRequirements: OAuth scopes are a way to define data and permissions on -// data. For example, there are scopes defined for "Read-only access to Google -// Calendar" and "Access to Cloud Platform". Users can consent to a scope for -// an application, giving it permission to access that data on their behalf. -// OAuth scope specifications should be fairly coarse grained; a user will need -// to see and understand the text description of what your scope means. In most -// cases: use one or at most two OAuth scopes for an entire family of products. -// If your product has multiple APIs, you should probably be sharing the OAuth -// scope across all of those APIs. When you need finer grained OAuth consent -// screens: talk with your product management about how developers will use -// them in practice. Please note that even though each of the canonical scopes -// is enough for a request to be accepted and passed to the backend, a request -// can still fail due to the backend requiring additional scopes or -// permissions. -type OAuthRequirements struct { - // CanonicalScopes: The list of publicly documented OAuth scopes that are - // allowed access. An OAuth token containing any of these scopes will be - // accepted. Example: canonical_scopes: - // https://www.googleapis.com/auth/calendar, - // https://www.googleapis.com/auth/calendar.read - CanonicalScopes string `json:"canonicalScopes,omitempty"` - // ForceSendFields is a list of field names (e.g. "CanonicalScopes") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CanonicalScopes") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s OAuthRequirements) MarshalJSON() ([]byte, error) { - type NoMethod OAuthRequirements - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// Operation: This resource represents a long-running operation that is the -// result of a network API call. -type Operation struct { - // Done: If the value is `false`, it means the operation is still in progress. - // If `true`, the operation is completed, and either `error` or `response` is - // available. - Done bool `json:"done,omitempty"` - // Error: The error result of the operation in case of failure or cancellation. - Error *Status `json:"error,omitempty"` - // Metadata: Service-specific metadata associated with the operation. It - // typically contains progress information and common metadata such as create - // time. Some services might not provide such metadata. Any method that returns - // a long-running operation should document the metadata type, if any. - Metadata googleapi.RawMessage `json:"metadata,omitempty"` - // Name: The server-assigned name, which is only unique within the same service - // that originally returns it. If you use the default HTTP mapping, the `name` - // should be a resource name ending with `operations/{unique_id}`. - Name string `json:"name,omitempty"` - // Response: The normal, successful response of the operation. If the original - // method returns no data on success, such as `Delete`, the response is - // `google.protobuf.Empty`. If the original method is standard - // `Get`/`Create`/`Update`, the response should be the resource. For other - // methods, the response should have the type `XxxResponse`, where `Xxx` is the - // original method name. For example, if the original method name is - // `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. - Response googleapi.RawMessage `json:"response,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Done") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Done") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s Operation) MarshalJSON() ([]byte, error) { - type NoMethod Operation - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// Option: A protocol buffer option, which can be attached to a message, field, -// enumeration, etc. New usages of this message as an alternative to -// FileOptions, MessageOptions, FieldOptions, EnumOptions, EnumValueOptions, -// ServiceOptions, or MethodOptions are strongly discouraged. -type Option struct { - // Name: The option's name. For protobuf built-in options (options defined in - // descriptor.proto), this is the short name. For example, "map_entry". For - // custom options, it should be the fully-qualified name. For example, - // "google.api.http". - Name string `json:"name,omitempty"` - // Value: The option's value packed in an Any message. If the value is a - // primitive, the corresponding wrapper type defined in - // google/protobuf/wrappers.proto should be used. If the value is an enum, it - // should be stored as an int32 value using the google.protobuf.Int32Value - // type. - Value googleapi.RawMessage `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Name") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Name") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s Option) MarshalJSON() ([]byte, error) { - type NoMethod Option - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// Page: Represents a documentation page. A page can contain subpages to -// represent nested documentation set structure. -type Page struct { - // Content: The Markdown content of the page. You can use ```(== include {path} - // ==)``` to include content from a Markdown file. The content can be used to - // produce the documentation page such as HTML format page. - Content string `json:"content,omitempty"` - // Name: The name of the page. It will be used as an identity of the page to - // generate URI of the page, text of the link to this page in navigation, etc. - // The full page name (start from the root page name to this page concatenated - // with `.`) can be used as reference to the page in your documentation. For - // example: pages: - name: Tutorial content: (== include tutorial.md ==) - // subpages: - name: Java content: (== include tutorial_java.md ==) You can - // reference `Java` page using Markdown reference link syntax: `Java`. - Name string `json:"name,omitempty"` - // Subpages: Subpages of this page. The order of subpages specified here will - // be honored in the generated docset. - Subpages []*Page `json:"subpages,omitempty"` - // ForceSendFields is a list of field names (e.g. "Content") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Content") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s Page) MarshalJSON() ([]byte, error) { - type NoMethod Page - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// PartialDeleteConnectionMetadata: Metadata provided through GetOperation -// request for the LRO generated by Partial Delete Connection API -type PartialDeleteConnectionMetadata struct { -} - -// PeeredDnsDomain: DNS domain suffix for which requests originating in the -// producer VPC network are resolved in the associated consumer VPC network. -type PeeredDnsDomain struct { - // DnsSuffix: The DNS domain name suffix e.g. `example.com.`. Cloud DNS - // requires that a DNS suffix ends with a trailing dot. - DnsSuffix string `json:"dnsSuffix,omitempty"` - // Name: Required. User assigned name for this resource. Must be unique within - // the consumer network. The name must be 1-63 characters long, must begin with - // a letter, end with a letter or digit, and only contain lowercase letters, - // digits or dashes. - Name string `json:"name,omitempty"` - // ForceSendFields is a list of field names (e.g. "DnsSuffix") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DnsSuffix") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s PeeredDnsDomain) MarshalJSON() ([]byte, error) { - type NoMethod PeeredDnsDomain - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// PeeredDnsDomainMetadata: Metadata provided through GetOperation request for -// the LRO generated by CreatePeeredDnsDomain API. -type PeeredDnsDomainMetadata struct { -} - -// PhpSettings: Settings for Php client libraries. -type PhpSettings struct { - // Common: Some settings. - Common *CommonLanguageSettings `json:"common,omitempty"` - // LibraryPackage: The package name to use in Php. Clobbers the php_namespace - // option set in the protobuf. This should be used **only** by APIs who have - // already set the language_settings.php.package_name" field in gapic.yaml. API - // teams should use the protobuf php_namespace option where possible. Example - // of a YAML configuration:: publishing: library_settings: php_settings: - // library_package: Google\Cloud\PubSub\V1 - LibraryPackage string `json:"libraryPackage,omitempty"` - // ForceSendFields is a list of field names (e.g. "Common") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Common") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s PhpSettings) MarshalJSON() ([]byte, error) { - type NoMethod PhpSettings - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// PolicyBinding: Grouping of IAM role and IAM member. -type PolicyBinding struct { - // Member: Required. Member to bind the role with. See - // /iam/docs/reference/rest/v1/Policy#Binding for how to format each member. - // Eg. - user:myuser@mydomain.com - - // serviceAccount:my-service-account@app.gserviceaccount.com - Member string `json:"member,omitempty"` - // Role: Required. Role to apply. Only allowlisted roles can be used at the - // specified granularity. The role must be one of the following: - - // 'roles/container.hostServiceAgentUser' applied on the shared VPC host - // project - 'roles/compute.securityAdmin' applied on the shared VPC host - // project - 'roles/compute.networkAdmin' applied on the shared VPC host - // project - 'roles/tpu.xpnAgent' applied on the shared VPC host project - - // 'roles/dns.admin' applied on the shared VPC host project - - // 'roles/logging.admin' applied on the shared VPC host project - - // 'roles/monitoring.viewer' applied on the shared VPC host project - - // 'roles/servicemanagement.quotaViewer' applied on the shared VPC host project - Role string `json:"role,omitempty"` - // ForceSendFields is a list of field names (e.g. "Member") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Member") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s PolicyBinding) MarshalJSON() ([]byte, error) { - type NoMethod PolicyBinding - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// Publishing: This message configures the settings for publishing Google Cloud -// Client libraries (https://cloud.google.com/apis/docs/cloud-client-libraries) -// generated from the service config. -type Publishing struct { - // ApiShortName: Used as a tracking tag when collecting data about the APIs - // developer relations artifacts like docs, packages delivered to package - // managers, etc. Example: "speech". - ApiShortName string `json:"apiShortName,omitempty"` - // CodeownerGithubTeams: GitHub teams to be added to CODEOWNERS in the - // directory in GitHub containing source code for the client libraries for this - // API. - CodeownerGithubTeams []string `json:"codeownerGithubTeams,omitempty"` - // DocTagPrefix: A prefix used in sample code when demarking regions to be - // included in documentation. - DocTagPrefix string `json:"docTagPrefix,omitempty"` - // DocumentationUri: Link to product home page. Example: - // https://cloud.google.com/asset-inventory/docs/overview - DocumentationUri string `json:"documentationUri,omitempty"` - // GithubLabel: GitHub label to apply to issues and pull requests opened for - // this API. - GithubLabel string `json:"githubLabel,omitempty"` - // LibrarySettings: Client library settings. If the same version string appears - // multiple times in this list, then the last one wins. Settings from earlier - // settings with the same version string are discarded. - LibrarySettings []*ClientLibrarySettings `json:"librarySettings,omitempty"` - // MethodSettings: A list of API method settings, e.g. the behavior for methods - // that use the long-running operation pattern. - MethodSettings []*MethodSettings `json:"methodSettings,omitempty"` - // NewIssueUri: Link to a *public* URI where users can report issues. Example: - // https://issuetracker.google.com/issues/new?component=190865&template=1161103 - NewIssueUri string `json:"newIssueUri,omitempty"` - // Organization: For whom the client library is being published. - // - // Possible values: - // "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED" - Not useful. - // "CLOUD" - Google Cloud Platform Org. - // "ADS" - Ads (Advertising) Org. - // "PHOTOS" - Photos Org. - // "STREET_VIEW" - Street View Org. - // "SHOPPING" - Shopping Org. - // "GEO" - Geo Org. - // "GENERATIVE_AI" - Generative AI - https://developers.generativeai.google - Organization string `json:"organization,omitempty"` - // ProtoReferenceDocumentationUri: Optional link to proto reference - // documentation. Example: - // https://cloud.google.com/pubsub/lite/docs/reference/rpc - ProtoReferenceDocumentationUri string `json:"protoReferenceDocumentationUri,omitempty"` - // RestReferenceDocumentationUri: Optional link to REST reference - // documentation. Example: - // https://cloud.google.com/pubsub/lite/docs/reference/rest - RestReferenceDocumentationUri string `json:"restReferenceDocumentationUri,omitempty"` - // ForceSendFields is a list of field names (e.g. "ApiShortName") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ApiShortName") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s Publishing) MarshalJSON() ([]byte, error) { - type NoMethod Publishing - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// PythonSettings: Settings for Python client libraries. -type PythonSettings struct { - // Common: Some settings. - Common *CommonLanguageSettings `json:"common,omitempty"` - // ExperimentalFeatures: Experimental features to be included during client - // library generation. - ExperimentalFeatures *ExperimentalFeatures `json:"experimentalFeatures,omitempty"` - // ForceSendFields is a list of field names (e.g. "Common") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Common") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s PythonSettings) MarshalJSON() ([]byte, error) { - type NoMethod PythonSettings - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// Quota: Quota configuration helps to achieve fairness and budgeting in -// service usage. The metric based quota configuration works this way: - The -// service configuration defines a set of metrics. - For API calls, the -// quota.metric_rules maps methods to metrics with corresponding costs. - The -// quota.limits defines limits on the metrics, which will be used for quota -// checks at runtime. An example quota configuration in yaml format: quota: -// limits: - name: apiWriteQpsPerProject metric: -// library.googleapis.com/write_calls unit: "1/min/{project}" # rate limit for -// consumer projects values: STANDARD: 10000 (The metric rules bind all methods -// to the read_calls metric, except for the UpdateBook and DeleteBook methods. -// These two methods are mapped to the write_calls metric, with the UpdateBook -// method consuming at twice rate as the DeleteBook method.) metric_rules: - -// selector: "*" metric_costs: library.googleapis.com/read_calls: 1 - selector: -// google.example.library.v1.LibraryService.UpdateBook metric_costs: -// library.googleapis.com/write_calls: 2 - selector: -// google.example.library.v1.LibraryService.DeleteBook metric_costs: -// library.googleapis.com/write_calls: 1 Corresponding Metric definition: -// metrics: - name: library.googleapis.com/read_calls display_name: Read -// requests metric_kind: DELTA value_type: INT64 - name: -// library.googleapis.com/write_calls display_name: Write requests metric_kind: -// DELTA value_type: INT64 -type Quota struct { - // Limits: List of QuotaLimit definitions for the service. - Limits []*QuotaLimit `json:"limits,omitempty"` - // MetricRules: List of MetricRule definitions, each one mapping a selected - // method to one or more metrics. - MetricRules []*MetricRule `json:"metricRules,omitempty"` - // ForceSendFields is a list of field names (e.g. "Limits") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Limits") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s Quota) MarshalJSON() ([]byte, error) { - type NoMethod Quota - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// QuotaLimit: `QuotaLimit` defines a specific limit that applies over a -// specified duration for a limit type. There can be at most one limit for a -// duration and limit type combination defined within a `QuotaGroup`. -type QuotaLimit struct { - // DefaultLimit: Default number of tokens that can be consumed during the - // specified duration. This is the number of tokens assigned when a client - // application developer activates the service for his/her project. Specifying - // a value of 0 will block all requests. This can be used if you are - // provisioning quota to selected consumers and blocking others. Similarly, a - // value of -1 will indicate an unlimited quota. No other negative values are - // allowed. Used by group-based quotas only. - DefaultLimit int64 `json:"defaultLimit,omitempty,string"` - // Description: Optional. User-visible, extended description for this quota - // limit. Should be used only when more context is needed to understand this - // limit than provided by the limit's display name (see: `display_name`). - Description string `json:"description,omitempty"` - // DisplayName: User-visible display name for this limit. Optional. If not set, - // the UI will provide a default display name based on the quota configuration. - // This field can be used to override the default display name generated from - // the configuration. - DisplayName string `json:"displayName,omitempty"` - // Duration: Duration of this limit in textual notation. Must be "100s" or - // "1d". Used by group-based quotas only. - Duration string `json:"duration,omitempty"` - // FreeTier: Free tier value displayed in the Developers Console for this - // limit. The free tier is the number of tokens that will be subtracted from - // the billed amount when billing is enabled. This field can only be set on a - // limit with duration "1d", in a billable group; it is invalid on any other - // limit. If this field is not set, it defaults to 0, indicating that there is - // no free tier for this service. Used by group-based quotas only. - FreeTier int64 `json:"freeTier,omitempty,string"` - // MaxLimit: Maximum number of tokens that can be consumed during the specified - // duration. Client application developers can override the default limit up to - // this maximum. If specified, this value cannot be set to a value less than - // the default limit. If not specified, it is set to the default limit. To - // allow clients to apply overrides with no upper bound, set this to -1, - // indicating unlimited maximum quota. Used by group-based quotas only. - MaxLimit int64 `json:"maxLimit,omitempty,string"` - // Metric: The name of the metric this quota limit applies to. The quota limits - // with the same metric will be checked together during runtime. The metric - // must be defined within the service config. - Metric string `json:"metric,omitempty"` - // Name: Name of the quota limit. The name must be provided, and it must be - // unique within the service. The name can only include alphanumeric characters - // as well as '-'. The maximum length of the limit name is 64 characters. - Name string `json:"name,omitempty"` - // Unit: Specify the unit of the quota limit. It uses the same syntax as - // MetricDescriptor.unit. The supported unit kinds are determined by the quota - // backend system. Here are some examples: * "1/min/{project}" for quota per - // minute per project. Note: the order of unit components is insignificant. The - // "1" at the beginning is required to follow the metric unit syntax. - Unit string `json:"unit,omitempty"` - // Values: Tiered limit values. You must specify this as a key:value pair, with - // an integer value that is the maximum number of requests allowed for the - // specified unit. Currently only STANDARD is supported. - Values map[string]string `json:"values,omitempty"` - // ForceSendFields is a list of field names (e.g. "DefaultLimit") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DefaultLimit") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s QuotaLimit) MarshalJSON() ([]byte, error) { - type NoMethod QuotaLimit - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// Range: Represents a found unused range. -type Range struct { - // IpCidrRange: CIDR range in "10.x.x.x/y" format that is within the allocated - // ranges and currently unused. - IpCidrRange string `json:"ipCidrRange,omitempty"` - // Network: In the Shared VPC host project, the VPC network that's peered with - // the consumer network. For example: - // `projects/1234321/global/networks/host-network` - Network string `json:"network,omitempty"` - // ForceSendFields is a list of field names (e.g. "IpCidrRange") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "IpCidrRange") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s Range) MarshalJSON() ([]byte, error) { - type NoMethod Range - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// RangeReservation: Represents a range reservation. -type RangeReservation struct { - // IpPrefixLength: Required. The size of the desired subnet. Use usual CIDR - // range notation. For example, '29' to find unused x.x.x.x/29 CIDR range. The - // goal is to determine if one of the allocated ranges has enough free space - // for a subnet of the requested size. GCE disallows subnets with prefix_length - // > 29 - IpPrefixLength int64 `json:"ipPrefixLength,omitempty"` - // RequestedRanges: Optional. The name of one or more allocated IP address - // ranges associated with this private service access connection. If no range - // names are provided all ranges associated with this connection will be - // considered. If a CIDR range with the specified IP prefix length is not - // available within these ranges the validation fails. - RequestedRanges []string `json:"requestedRanges,omitempty"` - // SecondaryRangeIpPrefixLengths: Optional. The size of the desired secondary - // ranges for the subnet. Use usual CIDR range notation. For example, '29' to - // find unused x.x.x.x/29 CIDR range. The goal is to determine that the - // allocated ranges have enough free space for all the requested secondary - // ranges. GCE disallows subnets with prefix_length > 29 - SecondaryRangeIpPrefixLengths []int64 `json:"secondaryRangeIpPrefixLengths,omitempty"` - // SubnetworkCandidates: Optional. List of subnetwork candidates to validate. - // The required input fields are `name`, `network`, and `region`. Subnetworks - // from this list which exist will be returned in the response with the - // `ip_cidr_range`, `secondary_ip_cider_ranges`, and `outside_allocation` - // fields set. - SubnetworkCandidates []*Subnetwork `json:"subnetworkCandidates,omitempty"` - // ForceSendFields is a list of field names (e.g. "IpPrefixLength") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "IpPrefixLength") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RangeReservation) MarshalJSON() ([]byte, error) { - type NoMethod RangeReservation - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// RemoveDnsRecordSetMetadata: Metadata provided through GetOperation request -// for the LRO generated by RemoveDnsRecordSet API -type RemoveDnsRecordSetMetadata struct { -} - -// RemoveDnsRecordSetRequest: Request to remove a record set from a private -// managed DNS zone in the shared producer host project. The name, type, ttl, -// and data values must all exactly match an existing record set in the -// specified zone. -type RemoveDnsRecordSetRequest struct { - // ConsumerNetwork: Required. The network that the consumer is using to connect - // with services. Must be in the form of - // projects/{project}/global/networks/{network} {project} is the project - // number, as in '12345' {network} is the network name. - ConsumerNetwork string `json:"consumerNetwork,omitempty"` - // DnsRecordSet: Required. The DNS record set to remove. - DnsRecordSet *DnsRecordSet `json:"dnsRecordSet,omitempty"` - // Zone: Required. The name of the private DNS zone in the shared producer host - // project from which the record set will be removed. - Zone string `json:"zone,omitempty"` - // ForceSendFields is a list of field names (e.g. "ConsumerNetwork") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ConsumerNetwork") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RemoveDnsRecordSetRequest) MarshalJSON() ([]byte, error) { - type NoMethod RemoveDnsRecordSetRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// RemoveDnsRecordSetResponse: Blank message response type for -// RemoveDnsRecordSet API -type RemoveDnsRecordSetResponse struct { -} - -// RemoveDnsZoneMetadata: Metadata provided through GetOperation request for -// the LRO generated by RemoveDnsZone API -type RemoveDnsZoneMetadata struct { -} - -// RemoveDnsZoneRequest: Request to remove a private managed DNS zone in the -// shared producer host project and a matching DNS peering zone in the consumer -// project. -type RemoveDnsZoneRequest struct { - // ConsumerNetwork: Required. The network that the consumer is using to connect - // with services. Must be in the form of - // projects/{project}/global/networks/{network} {project} is the project - // number, as in '12345' {network} is the network name. - ConsumerNetwork string `json:"consumerNetwork,omitempty"` - // Name: Required. The name for both the private zone in the shared producer - // host project and the peering zone in the consumer project. - Name string `json:"name,omitempty"` - // ForceSendFields is a list of field names (e.g. "ConsumerNetwork") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ConsumerNetwork") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RemoveDnsZoneRequest) MarshalJSON() ([]byte, error) { - type NoMethod RemoveDnsZoneRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// RemoveDnsZoneResponse: Blank message response type for RemoveDnsZone API -type RemoveDnsZoneResponse struct { -} - -// Route: Represents a route that was created or discovered by a private access -// management service. -type Route struct { - // DestRange: Destination CIDR range that this route applies to. - DestRange string `json:"destRange,omitempty"` - // Name: Route name. See https://cloud.google.com/vpc/docs/routes - Name string `json:"name,omitempty"` - // Network: Fully-qualified URL of the VPC network in the producer host tenant - // project that this route applies to. For example: - // `projects/123456/global/networks/host-network` - Network string `json:"network,omitempty"` - // NextHopGateway: Fully-qualified URL of the gateway that should handle - // matching packets that this route applies to. For example: - // `projects/123456/global/gateways/default-internet-gateway` - NextHopGateway string `json:"nextHopGateway,omitempty"` - // ForceSendFields is a list of field names (e.g. "DestRange") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DestRange") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s Route) MarshalJSON() ([]byte, error) { - type NoMethod Route - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// RubySettings: Settings for Ruby client libraries. -type RubySettings struct { - // Common: Some settings. - Common *CommonLanguageSettings `json:"common,omitempty"` - // ForceSendFields is a list of field names (e.g. "Common") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Common") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RubySettings) MarshalJSON() ([]byte, error) { - type NoMethod RubySettings - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// SearchRangeRequest: Request to search for an unused range within allocated -// ranges. -type SearchRangeRequest struct { - // IpPrefixLength: Required. The prefix length of the IP range. Use usual CIDR - // range notation. For example, '30' to find unused x.x.x.x/30 CIDR range. - // Actual range will be determined using allocated range for the consumer - // peered network and returned in the result. - IpPrefixLength int64 `json:"ipPrefixLength,omitempty"` - // Network: Required. Network name in the consumer project. This network must - // have been already peered with a shared VPC network using CreateConnection - // method. Must be in a form 'projects/{project}/global/networks/{network}'. - // {project} is a project number, as in '12345' {network} is network name. - Network string `json:"network,omitempty"` - // ForceSendFields is a list of field names (e.g. "IpPrefixLength") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "IpPrefixLength") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SearchRangeRequest) MarshalJSON() ([]byte, error) { - type NoMethod SearchRangeRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type SecondaryIpRange struct { - // IpCidrRange: Secondary IP CIDR range in `x.x.x.x/y` format. - IpCidrRange string `json:"ipCidrRange,omitempty"` - // RangeName: Name of the secondary IP range. - RangeName string `json:"rangeName,omitempty"` - // ForceSendFields is a list of field names (e.g. "IpCidrRange") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "IpCidrRange") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SecondaryIpRange) MarshalJSON() ([]byte, error) { - type NoMethod SecondaryIpRange - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type SecondaryIpRangeSpec struct { - // IpPrefixLength: Required. The prefix length of the secondary IP range. Use - // CIDR range notation, such as `30` to provision a secondary IP range with an - // `x.x.x.x/30` CIDR range. The IP address range is drawn from a pool of - // available ranges in the service consumer's allocated range. - IpPrefixLength int64 `json:"ipPrefixLength,omitempty"` - // OutsideAllocationPublicIpRange: Optional. Enable outside allocation using - // public IP addresses. Any public IP range may be specified. If this field is - // provided, we will not use customer reserved ranges for this secondary IP - // range. - OutsideAllocationPublicIpRange string `json:"outsideAllocationPublicIpRange,omitempty"` - // RangeName: Required. A name for the secondary IP range. The name must be - // 1-63 characters long, and comply with RFC1035. The name must be unique - // within the subnetwork. - RangeName string `json:"rangeName,omitempty"` - // RequestedAddress: Optional. The starting address of a range. The address - // must be a valid IPv4 address in the x.x.x.x format. This value combined with - // the IP prefix range is the CIDR range for the secondary IP range. The range - // must be within the allocated range that is assigned to the private - // connection. If the CIDR range isn't available, the call fails. - RequestedAddress string `json:"requestedAddress,omitempty"` - // ForceSendFields is a list of field names (e.g. "IpPrefixLength") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "IpPrefixLength") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SecondaryIpRangeSpec) MarshalJSON() ([]byte, error) { - type NoMethod SecondaryIpRangeSpec - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// SelectiveGapicGeneration: This message is used to configure the generation -// of a subset of the RPCs in a service for client libraries. -type SelectiveGapicGeneration struct { - // GenerateOmittedAsInternal: Setting this to true indicates to the client - // generators that methods that would be excluded from the generation should - // instead be generated in a way that indicates these methods should not be - // consumed by end users. How this is expressed is up to individual language - // implementations to decide. Some examples may be: added annotations, - // obfuscated identifiers, or other language idiomatic patterns. - GenerateOmittedAsInternal bool `json:"generateOmittedAsInternal,omitempty"` - // Methods: An allowlist of the fully qualified names of RPCs that should be - // included on public client surfaces. - Methods []string `json:"methods,omitempty"` - // ForceSendFields is a list of field names (e.g. "GenerateOmittedAsInternal") - // to unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "GenerateOmittedAsInternal") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SelectiveGapicGeneration) MarshalJSON() ([]byte, error) { - type NoMethod SelectiveGapicGeneration - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// Service: `Service` is the root object of Google API service configuration -// (service config). It describes the basic information about a logical -// service, such as the service name and the user-facing title, and delegates -// other aspects to sub-sections. Each sub-section is either a proto message or -// a repeated proto message that configures a specific aspect, such as auth. -// For more information, see each proto message definition. Example: type: -// google.api.Service name: calendar.googleapis.com title: Google Calendar API -// apis: - name: google.calendar.v3.Calendar visibility: rules: - selector: -// "google.calendar.v3.*" restriction: PREVIEW backend: rules: - selector: -// "google.calendar.v3.*" address: calendar.example.com authentication: -// providers: - id: google_calendar_auth jwks_uri: -// https://www.googleapis.com/oauth2/v1/certs issuer: -// https://securetoken.google.com rules: - selector: "*" requirements: -// provider_id: google_calendar_auth -type Service struct { - // Apis: A list of API interfaces exported by this service. Only the `name` - // field of the google.protobuf.Api needs to be provided by the configuration - // author, as the remaining fields will be derived from the IDL during the - // normalization process. It is an error to specify an API interface here which - // cannot be resolved against the associated IDL files. - Apis []*Api `json:"apis,omitempty"` - // Aspects: Configuration aspects. This is a repeated field to allow multiple - // aspects to be configured. The kind field in each ConfigAspect specifies the - // type of aspect. The spec field contains the configuration for that aspect. - // The schema for the spec field is defined by the backend service owners. - Aspects []*Aspect `json:"aspects,omitempty"` - // Authentication: Auth configuration. - Authentication *Authentication `json:"authentication,omitempty"` - // Backend: API backend configuration. - Backend *Backend `json:"backend,omitempty"` - // Billing: Billing configuration. - Billing *Billing `json:"billing,omitempty"` - // ConfigVersion: Obsolete. Do not use. This field has no semantic meaning. The - // service config compiler always sets this field to `3`. - ConfigVersion int64 `json:"configVersion,omitempty"` - // Context: Context configuration. - Context *Context `json:"context,omitempty"` - // Control: Configuration for the service control plane. - Control *Control `json:"control,omitempty"` - // CustomError: Custom error configuration. - CustomError *CustomError `json:"customError,omitempty"` - // Documentation: Additional API documentation. - Documentation *Documentation `json:"documentation,omitempty"` - // Endpoints: Configuration for network endpoints. If this is empty, then an - // endpoint with the same name as the service is automatically generated to - // service all defined APIs. WARNING: Defining any entries in the `endpoints` - // list disables the automatic generation of default endpoint variations (e.g., - // `{service}.clients6.google.com`, `content-{service}.googleapis.com`, and - // mTLS variants like `{service}.mtls.googleapis.com`). To retain these default - // variations, you are required to explicitly include your main service - // endpoint (e.g., `myservice.googleapis.com`) in this list alongside any other - // custom endpoints (like REP, GFE, etc.). - Endpoints []*Endpoint `json:"endpoints,omitempty"` - // Enums: A list of all enum types included in this API service. Enums - // referenced directly or indirectly by the `apis` are automatically included. - // Enums which are not referenced but shall be included should be listed here - // by name by the configuration author. Example: enums: - name: - // google.someapi.v1.SomeEnum - Enums []*Enum `json:"enums,omitempty"` - // Http: HTTP configuration. - Http *Http `json:"http,omitempty"` - // Id: A unique ID for a specific instance of this message, typically assigned - // by the client for tracking purpose. Must be no longer than 63 characters and - // only lower case letters, digits, '.', '_' and '-' are allowed. If empty, the - // server may choose to generate one instead. - Id string `json:"id,omitempty"` - // Logging: Logging configuration. - Logging *Logging `json:"logging,omitempty"` - // Logs: Defines the logs used by this service. - Logs []*LogDescriptor `json:"logs,omitempty"` - // Metrics: Defines the metrics used by this service. - Metrics []*MetricDescriptor `json:"metrics,omitempty"` - // MonitoredResources: Defines the monitored resources used by this service. - // This is required by the `Service.monitoring` and `Service.logging` - // configurations. - MonitoredResources []*MonitoredResourceDescriptor `json:"monitoredResources,omitempty"` - // Monitoring: Monitoring configuration. - Monitoring *Monitoring `json:"monitoring,omitempty"` - // Name: The service name, which is a DNS-like logical identifier for the - // service, such as `calendar.googleapis.com`. The service name typically goes - // through DNS verification to make sure the owner of the service also owns the - // DNS name. - Name string `json:"name,omitempty"` - // ProducerProjectId: The Google project that owns this service. - ProducerProjectId string `json:"producerProjectId,omitempty"` - // Publishing: Settings for Google Cloud Client libraries - // (https://cloud.google.com/apis/docs/cloud-client-libraries) generated from - // APIs defined as protocol buffers. - Publishing *Publishing `json:"publishing,omitempty"` - // Quota: Quota configuration. - Quota *Quota `json:"quota,omitempty"` - // SourceInfo: Output only. The source information for this configuration if - // available. - SourceInfo *SourceInfo `json:"sourceInfo,omitempty"` - // SystemParameters: System parameter configuration. - SystemParameters *SystemParameters `json:"systemParameters,omitempty"` - // SystemTypes: A list of all proto message types included in this API service. - // It serves similar purpose as [google.api.Service.types], except that these - // types are not needed by user-defined APIs. Therefore, they will not show up - // in the generated discovery doc. This field should only be used to define - // system APIs in ESF. - SystemTypes []*Type `json:"systemTypes,omitempty"` - // Title: The product title for this service, it is the name displayed in - // Google Cloud Console. - Title string `json:"title,omitempty"` - // Types: A list of all proto message types included in this API service. Types - // referenced directly or indirectly by the `apis` are automatically included. - // Messages which are not referenced but shall be included, such as types used - // by the `google.protobuf.Any` type, should be listed here by name by the - // configuration author. Example: types: - name: google.protobuf.Int32 - Types []*Type `json:"types,omitempty"` - // Usage: Configuration controlling usage of this service. - Usage *Usage `json:"usage,omitempty"` - // ForceSendFields is a list of field names (e.g. "Apis") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Apis") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s Service) MarshalJSON() ([]byte, error) { - type NoMethod Service - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// SourceContext: `SourceContext` represents information about the source of a -// protobuf element, like the file in which it is defined. -type SourceContext struct { - // FileName: The path-qualified name of the .proto file that contained the - // associated protobuf element. For example: - // "google/protobuf/source_context.proto". - FileName string `json:"fileName,omitempty"` - // ForceSendFields is a list of field names (e.g. "FileName") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "FileName") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SourceContext) MarshalJSON() ([]byte, error) { - type NoMethod SourceContext - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// SourceInfo: Source information used to create a Service Config -type SourceInfo struct { - // SourceFiles: All files used during config generation. - SourceFiles []googleapi.RawMessage `json:"sourceFiles,omitempty"` - // ForceSendFields is a list of field names (e.g. "SourceFiles") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "SourceFiles") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SourceInfo) MarshalJSON() ([]byte, error) { - type NoMethod SourceInfo - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// Status: The `Status` type defines a logical error model that is suitable for -// different programming environments, including REST APIs and RPC APIs. It is -// used by gRPC (https://github.com/grpc). Each `Status` message contains three -// pieces of data: error code, error message, and error details. You can find -// out more about this error model and how to work with it in the API Design -// Guide (https://cloud.google.com/apis/design/errors). -type Status struct { - // Code: The status code, which should be an enum value of google.rpc.Code. - Code int64 `json:"code,omitempty"` - // Details: A list of messages that carry the error details. There is a common - // set of message types for APIs to use. - Details []googleapi.RawMessage `json:"details,omitempty"` - // Message: A developer-facing error message, which should be in English. Any - // user-facing error message should be localized and sent in the - // google.rpc.Status.details field, or localized by the client. - Message string `json:"message,omitempty"` - // ForceSendFields is a list of field names (e.g. "Code") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s Status) MarshalJSON() ([]byte, error) { - type NoMethod Status - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// Subnetwork: Represents a subnet that was created or discovered by a private -// access management service. -type Subnetwork struct { - // IpCidrRange: Subnetwork CIDR range in `10.x.x.x/y` format. - IpCidrRange string `json:"ipCidrRange,omitempty"` - // Name: Subnetwork name. See https://cloud.google.com/compute/docs/vpc/ - Name string `json:"name,omitempty"` - // Network: In the Shared VPC host project, the VPC network that's peered with - // the consumer network. For example: - // `projects/1234321/global/networks/host-network` - Network string `json:"network,omitempty"` - // OutsideAllocation: This is a discovered subnet that is not within the - // current consumer allocated ranges. - OutsideAllocation bool `json:"outsideAllocation,omitempty"` - // Region: GCP region where the subnetwork is located. - Region string `json:"region,omitempty"` - // SecondaryIpRanges: List of secondary IP ranges in this subnetwork. - SecondaryIpRanges []*SecondaryIpRange `json:"secondaryIpRanges,omitempty"` - // ForceSendFields is a list of field names (e.g. "IpCidrRange") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "IpCidrRange") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s Subnetwork) MarshalJSON() ([]byte, error) { - type NoMethod Subnetwork - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// SystemParameter: Define a parameter's name and location. The parameter may -// be passed as either an HTTP header or a URL query parameter, and if both are -// passed the behavior is implementation-dependent. -type SystemParameter struct { - // HttpHeader: Define the HTTP header name to use for the parameter. It is case - // insensitive. - HttpHeader string `json:"httpHeader,omitempty"` - // Name: Define the name of the parameter, such as "api_key" . It is case - // sensitive. - Name string `json:"name,omitempty"` - // UrlQueryParameter: Define the URL query parameter name to use for the - // parameter. It is case sensitive. - UrlQueryParameter string `json:"urlQueryParameter,omitempty"` - // ForceSendFields is a list of field names (e.g. "HttpHeader") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "HttpHeader") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SystemParameter) MarshalJSON() ([]byte, error) { - type NoMethod SystemParameter - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// SystemParameterRule: Define a system parameter rule mapping system parameter -// definitions to methods. -type SystemParameterRule struct { - // Parameters: Define parameters. Multiple names may be defined for a - // parameter. For a given method call, only one of them should be used. If - // multiple names are used the behavior is implementation-dependent. If none of - // the specified names are present the behavior is parameter-dependent. - Parameters []*SystemParameter `json:"parameters,omitempty"` - // Selector: Selects the methods to which this rule applies. Use '*' to - // indicate all methods in all APIs. Refer to selector for syntax details. - Selector string `json:"selector,omitempty"` - // ForceSendFields is a list of field names (e.g. "Parameters") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Parameters") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SystemParameterRule) MarshalJSON() ([]byte, error) { - type NoMethod SystemParameterRule - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// SystemParameters: ### System parameter configuration A system parameter is a -// special kind of parameter defined by the API system, not by an individual -// API. It is typically mapped to an HTTP header and/or a URL query parameter. -// This configuration specifies which methods change the names of the system -// parameters. -type SystemParameters struct { - // Rules: Define system parameters. The parameters defined here will override - // the default parameters implemented by the system. If this field is missing - // from the service config, default system parameters will be used. Default - // system parameters and names is implementation-dependent. Example: define api - // key for all methods system_parameters rules: - selector: "*" parameters: - - // name: api_key url_query_parameter: api_key Example: define 2 api key names - // for a specific method. system_parameters rules: - selector: "/ListShelves" - // parameters: - name: api_key http_header: Api-Key1 - name: api_key - // http_header: Api-Key2 **NOTE:** All service configuration rules follow "last - // one wins" order. - Rules []*SystemParameterRule `json:"rules,omitempty"` - // ForceSendFields is a list of field names (e.g. "Rules") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Rules") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SystemParameters) MarshalJSON() ([]byte, error) { - type NoMethod SystemParameters - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// Type: A protocol buffer message type. New usages of this message as an -// alternative to DescriptorProto are strongly discouraged. This message does -// not reliability preserve all information necessary to model the schema and -// preserve semantics. Instead make use of FileDescriptorSet which preserves -// the necessary information. -type Type struct { - // Edition: The source edition string, only valid when syntax is - // SYNTAX_EDITIONS. - Edition string `json:"edition,omitempty"` - // Fields: The list of fields. - Fields []*Field `json:"fields,omitempty"` - // Name: The fully qualified message name. - Name string `json:"name,omitempty"` - // Oneofs: The list of types appearing in `oneof` definitions in this type. - Oneofs []string `json:"oneofs,omitempty"` - // Options: The protocol buffer options. - Options []*Option `json:"options,omitempty"` - // SourceContext: The source context. - SourceContext *SourceContext `json:"sourceContext,omitempty"` - // Syntax: The source syntax. - // - // Possible values: - // "SYNTAX_PROTO2" - Syntax `proto2`. - // "SYNTAX_PROTO3" - Syntax `proto3`. - // "SYNTAX_EDITIONS" - Syntax `editions`. - Syntax string `json:"syntax,omitempty"` - // ForceSendFields is a list of field names (e.g. "Edition") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Edition") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s Type) MarshalJSON() ([]byte, error) { - type NoMethod Type - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// UpdateConsumerConfigRequest: Request to update the configuration of a -// service networking connection including the import/export of custom routes -// and subnetwork routes with public IP. -type UpdateConsumerConfigRequest struct { - // ConsumerConfig: Required. The updated peering config. - ConsumerConfig *ConsumerConfig `json:"consumerConfig,omitempty"` - // ForceSendFields is a list of field names (e.g. "ConsumerConfig") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ConsumerConfig") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s UpdateConsumerConfigRequest) MarshalJSON() ([]byte, error) { - type NoMethod UpdateConsumerConfigRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// UpdateDnsRecordSetMetadata: Metadata provided through GetOperation request -// for the LRO generated by UpdateDnsRecordSet API -type UpdateDnsRecordSetMetadata struct { -} - -// UpdateDnsRecordSetRequest: Request to update a record set from a private -// managed DNS zone in the shared producer host project. The name, type, ttl, -// and data values of the existing record set must all exactly match an -// existing record set in the specified zone. -type UpdateDnsRecordSetRequest struct { - // ConsumerNetwork: Required. The network that the consumer is using to connect - // with services. Must be in the form of - // projects/{project}/global/networks/{network} {project} is the project - // number, as in '12345' {network} is the network name. - ConsumerNetwork string `json:"consumerNetwork,omitempty"` - // ExistingDnsRecordSet: Required. The existing DNS record set to update. - ExistingDnsRecordSet *DnsRecordSet `json:"existingDnsRecordSet,omitempty"` - // NewDnsRecordSet: Required. The new values that the DNS record set should be - // updated to hold. - NewDnsRecordSet *DnsRecordSet `json:"newDnsRecordSet,omitempty"` - // Zone: Required. The name of the private DNS zone in the shared producer host - // project from which the record set will be removed. - Zone string `json:"zone,omitempty"` - // ForceSendFields is a list of field names (e.g. "ConsumerNetwork") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ConsumerNetwork") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s UpdateDnsRecordSetRequest) MarshalJSON() ([]byte, error) { - type NoMethod UpdateDnsRecordSetRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// Usage: Configuration controlling usage of a service. -type Usage struct { - // ProducerNotificationChannel: The full resource name of a channel used for - // sending notifications to the service producer. Google Service Management - // currently only supports Google Cloud Pub/Sub - // (https://cloud.google.com/pubsub) as a notification channel. To use Google - // Cloud Pub/Sub as the channel, this must be the name of a Cloud Pub/Sub topic - // that uses the Cloud Pub/Sub topic name format documented in - // https://cloud.google.com/pubsub/docs/overview. - ProducerNotificationChannel string `json:"producerNotificationChannel,omitempty"` - // Requirements: Requirements that must be satisfied before a consumer project - // can use the service. Each requirement is of the form /; for example - // 'serviceusage.googleapis.com/billing-enabled'. For Google APIs, a Terms of - // Service requirement must be included here. Google Cloud APIs must include - // "serviceusage.googleapis.com/tos/cloud". Other Google APIs should include - // "serviceusage.googleapis.com/tos/universal". Additional ToS can be included - // based on the business needs. - Requirements []string `json:"requirements,omitempty"` - // Rules: A list of usage rules that apply to individual API methods. **NOTE:** - // All service configuration rules follow "last one wins" order. - Rules []*UsageRule `json:"rules,omitempty"` - // ForceSendFields is a list of field names (e.g. - // "ProducerNotificationChannel") to unconditionally include in API requests. - // By default, fields with empty or default values are omitted from API - // requests. See https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields - // for more details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ProducerNotificationChannel") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s Usage) MarshalJSON() ([]byte, error) { - type NoMethod Usage - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// UsageRule: Usage configuration rules for the service. -type UsageRule struct { - // AllowUnregisteredCalls: Use this rule to configure unregistered calls for - // the service. Unregistered calls are calls that do not contain consumer - // project identity. (Example: calls that do not contain an API key). WARNING: - // By default, API methods do not allow unregistered calls, and each method - // call must be identified by a consumer project identity. - AllowUnregisteredCalls bool `json:"allowUnregisteredCalls,omitempty"` - // Selector: Selects the methods to which this rule applies. Use '*' to - // indicate all methods in all APIs. Refer to selector for syntax details. - Selector string `json:"selector,omitempty"` - // SkipServiceControl: If true, the selected method should skip service control - // and the control plane features, such as quota and billing, will not be - // available. This flag is used by Google Cloud Endpoints to bypass checks for - // internal methods, such as service health check methods. - SkipServiceControl bool `json:"skipServiceControl,omitempty"` - // ForceSendFields is a list of field names (e.g. "AllowUnregisteredCalls") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AllowUnregisteredCalls") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s UsageRule) MarshalJSON() ([]byte, error) { - type NoMethod UsageRule - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ValidateConsumerConfigRequest struct { - // CheckServiceNetworkingUsePermission: Optional. The IAM permission check - // determines whether the consumer project has 'servicenetworking.services.use' - // permission or not. - CheckServiceNetworkingUsePermission bool `json:"checkServiceNetworkingUsePermission,omitempty"` - // ConsumerNetwork: Required. The network that the consumer is using to connect - // with services. Must be in the form of - // projects/{project}/global/networks/{network} {project} is a project number, - // as in '12345' {network} is network name. - ConsumerNetwork string `json:"consumerNetwork,omitempty"` - // ConsumerProject: NETWORK_NOT_IN_CONSUMERS_PROJECT, - // NETWORK_NOT_IN_CONSUMERS_HOST_PROJECT, and HOST_PROJECT_NOT_FOUND are done - // when consumer_project is provided. - ConsumerProject *ConsumerProject `json:"consumerProject,omitempty"` - // RangeReservation: RANGES_EXHAUSTED, RANGES_NOT_RESERVED, and - // RANGES_DELETED_LATER are done when range_reservation is provided. - RangeReservation *RangeReservation `json:"rangeReservation,omitempty"` - // ValidateNetwork: The validations will be performed in the order listed in - // the ValidationError enum. The first failure will return. If a validation is - // not requested, then the next one will be performed. - // SERVICE_NETWORKING_NOT_ENABLED and NETWORK_NOT_PEERED checks are performed - // for all requests where validation is requested. NETWORK_NOT_FOUND and - // NETWORK_DISCONNECTED checks are done for requests that have validate_network - // set to true. - ValidateNetwork bool `json:"validateNetwork,omitempty"` - // ForceSendFields is a list of field names (e.g. - // "CheckServiceNetworkingUsePermission") to unconditionally include in API - // requests. By default, fields with empty or default values are omitted from - // API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. - // "CheckServiceNetworkingUsePermission") to include in API requests with the - // JSON null value. By default, fields with empty values are omitted from API - // requests. See https://pkg.go.dev/google.golang.org/api#hdr-NullFields for - // more details. - NullFields []string `json:"-"` -} - -func (s ValidateConsumerConfigRequest) MarshalJSON() ([]byte, error) { - type NoMethod ValidateConsumerConfigRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ValidateConsumerConfigResponse struct { - // ExistingSubnetworkCandidates: List of subnetwork candidates from the request - // which exist with the `ip_cidr_range`, `secondary_ip_cider_ranges`, and - // `outside_allocation` fields set. - ExistingSubnetworkCandidates []*Subnetwork `json:"existingSubnetworkCandidates,omitempty"` - // IsValid: Indicates whether all the requested validations passed. - IsValid bool `json:"isValid,omitempty"` - // ValidationError: The first validation which failed. - // - // Possible values: - // "VALIDATION_ERROR_UNSPECIFIED" - // "VALIDATION_NOT_REQUESTED" - In case none of the validations are - // requested. - // "SERVICE_NETWORKING_NOT_ENABLED" - // "NETWORK_NOT_FOUND" - The network provided by the consumer does not exist. - // "NETWORK_NOT_PEERED" - The network has not been peered with the producer - // org. - // "NETWORK_PEERING_DELETED" - The peering was created and later deleted. - // "NETWORK_NOT_IN_CONSUMERS_PROJECT" - The network is a regular VPC but the - // network is not in the consumer's project. - // "NETWORK_NOT_IN_CONSUMERS_HOST_PROJECT" - The consumer project is a - // service project, and network is a shared VPC, but the network is not in the - // host project of this consumer project. - // "HOST_PROJECT_NOT_FOUND" - The host project associated with the consumer - // project was not found. - // "CONSUMER_PROJECT_NOT_SERVICE_PROJECT" - The consumer project is not a - // service project for the specified host project. - // "RANGES_EXHAUSTED" - The reserved IP ranges do not have enough space to - // create a subnet of desired size. - // "RANGES_NOT_RESERVED" - The IP ranges were not reserved. - // "RANGES_DELETED_LATER" - The IP ranges were reserved but deleted later. - // "COMPUTE_API_NOT_ENABLED" - The consumer project does not have the compute - // api enabled. - // "USE_PERMISSION_NOT_FOUND" - The consumer project does not have the - // permission from the host project. - // "SN_SERVICE_AGENT_PERMISSION_DENIED_ON_CONSUMER_PROJECT" - The SN service - // agent {service-@service-networking.iam.gserviceaccount.com} does not have - // the SN service agent role on the consumer project. - ValidationError string `json:"validationError,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. - // "ExistingSubnetworkCandidates") to unconditionally include in API requests. - // By default, fields with empty or default values are omitted from API - // requests. See https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields - // for more details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ExistingSubnetworkCandidates") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ValidateConsumerConfigResponse) MarshalJSON() ([]byte, error) { - type NoMethod ValidateConsumerConfigResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// VpcServiceControls: Response for the get VPC Service Controls request. -type VpcServiceControls struct { - // Enabled: Output only. Indicates whether the VPC Service Controls are enabled - // or disabled for the connection. If the consumer called the - // EnableVpcServiceControls method, then this is true. If the consumer called - // DisableVpcServiceControls, then this is false. The default is false. - Enabled bool `json:"enabled,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Enabled") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Enabled") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s VpcServiceControls) MarshalJSON() ([]byte, error) { - type NoMethod VpcServiceControls - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type OperationsCancelCall struct { - s *APIService - name string - canceloperationrequest *CancelOperationRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Cancel: Starts asynchronous cancellation on a long-running operation. The -// server makes a best effort to cancel the operation, but success is not -// guaranteed. If the server doesn't support this method, it returns -// `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or -// other methods to check whether the cancellation succeeded or whether the -// operation completed despite cancellation. On successful cancellation, the -// operation is not deleted; instead, it becomes an operation with an -// Operation.error value with a google.rpc.Status.code of `1`, corresponding to -// `Code.CANCELLED`. -// -// - name: The name of the operation resource to be cancelled. -func (r *OperationsService) Cancel(name string, canceloperationrequest *CancelOperationRequest) *OperationsCancelCall { - c := &OperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.canceloperationrequest = canceloperationrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *OperationsCancelCall) Fields(s ...googleapi.Field) *OperationsCancelCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *OperationsCancelCall) Context(ctx context.Context) *OperationsCancelCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *OperationsCancelCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *OperationsCancelCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.canceloperationrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "servicenetworking.operations.cancel", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "servicenetworking.operations.cancel" call. -// Any non-2xx status code is an error. Response headers are in either -// *Empty.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *OperationsCancelCall) Do(opts ...googleapi.CallOption) (*Empty, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &Empty{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "servicenetworking.operations.cancel", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type OperationsDeleteCall struct { - s *APIService - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes a long-running operation. This method indicates that the -// client is no longer interested in the operation result. It does not cancel -// the operation. If the server doesn't support this method, it returns -// `google.rpc.Code.UNIMPLEMENTED`. -// -// - name: The name of the operation resource to be deleted. -func (r *OperationsService) Delete(name string) *OperationsDeleteCall { - c := &OperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *OperationsDeleteCall) Fields(s ...googleapi.Field) *OperationsDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *OperationsDeleteCall) Context(ctx context.Context) *OperationsDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *OperationsDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *OperationsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "servicenetworking.operations.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "servicenetworking.operations.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Empty.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *OperationsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &Empty{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "servicenetworking.operations.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type OperationsGetCall struct { - s *APIService - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Gets the latest state of a long-running operation. Clients can use this -// method to poll the operation result at intervals as recommended by the API -// service. -// -// - name: The name of the operation resource. -func (r *OperationsService) Get(name string) *OperationsGetCall { - c := &OperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *OperationsGetCall) Fields(s ...googleapi.Field) *OperationsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *OperationsGetCall) IfNoneMatch(entityTag string) *OperationsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *OperationsGetCall) Context(ctx context.Context) *OperationsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *OperationsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *OperationsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "servicenetworking.operations.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "servicenetworking.operations.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *OperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "servicenetworking.operations.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type OperationsListCall struct { - s *APIService - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Lists operations that match the specified filter in the request. If -// the server doesn't support this method, it returns `UNIMPLEMENTED`. -// -// - name: The name of the operation's parent resource. -func (r *OperationsService) List(name string) *OperationsListCall { - c := &OperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// Filter sets the optional parameter "filter": The standard list filter. -func (c *OperationsListCall) Filter(filter string) *OperationsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// PageSize sets the optional parameter "pageSize": The standard list page -// size. -func (c *OperationsListCall) PageSize(pageSize int64) *OperationsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": The standard list page -// token. -func (c *OperationsListCall) PageToken(pageToken string) *OperationsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// When set to `true`, operations that are reachable are returned as normal, -// and those that are unreachable are returned in the -// ListOperationsResponse.unreachable field. This can only be `true` when -// reading across collections. For example, when `parent` is set to -// "projects/example/locations/-". This field is not supported by default and -// will result in an `UNIMPLEMENTED` error if set unless explicitly documented -// otherwise in service or product specific documentation. -func (c *OperationsListCall) ReturnPartialSuccess(returnPartialSuccess bool) *OperationsListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *OperationsListCall) Fields(s ...googleapi.Field) *OperationsListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *OperationsListCall) IfNoneMatch(entityTag string) *OperationsListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *OperationsListCall) Context(ctx context.Context) *OperationsListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *OperationsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *OperationsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "servicenetworking.operations.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "servicenetworking.operations.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *ListOperationsResponse.ServerResponse.Header or (if a response was returned -// at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified was -// returned. -func (c *OperationsListCall) Do(opts ...googleapi.CallOption) (*ListOperationsResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &ListOperationsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "servicenetworking.operations.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *OperationsListCall) Pages(ctx context.Context, f func(*ListOperationsResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -type ServicesAddSubnetworkCall struct { - s *APIService - parent string - addsubnetworkrequest *AddSubnetworkRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// AddSubnetwork: For service producers, provisions a new subnet in a peered -// service's shared VPC network in the requested region and with the requested -// size that's expressed as a CIDR range (number of leading bits of ipV4 -// network mask). The method checks against the assigned allocated ranges to -// find a non-conflicting IP address range. The method will reuse a subnet if -// subsequent calls contain the same subnet name, region, and prefix length. -// This method will make producer's tenant project to be a shared VPC service -// project as needed. -// -// - parent: A tenant project in the service producer organization, in the -// following format: services/{service}/{collection-id}/{resource-id}. -// {collection-id} is the cloud resource collection type that represents the -// tenant project. Only `projects` are supported. {resource-id} is the tenant -// project numeric id, such as `123456`. {service} the name of the peering -// service, such as `service-peering.example.com`. This service must already -// be enabled in the service consumer's project. -func (r *ServicesService) AddSubnetwork(parent string, addsubnetworkrequest *AddSubnetworkRequest) *ServicesAddSubnetworkCall { - c := &ServicesAddSubnetworkCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.addsubnetworkrequest = addsubnetworkrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ServicesAddSubnetworkCall) Fields(s ...googleapi.Field) *ServicesAddSubnetworkCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ServicesAddSubnetworkCall) Context(ctx context.Context) *ServicesAddSubnetworkCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ServicesAddSubnetworkCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ServicesAddSubnetworkCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.addsubnetworkrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}:addSubnetwork") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "servicenetworking.services.addSubnetwork", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "servicenetworking.services.addSubnetwork" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ServicesAddSubnetworkCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "servicenetworking.services.addSubnetwork", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ServicesDisableVpcServiceControlsCall struct { - s *APIService - parent string - disablevpcservicecontrolsrequest *DisableVpcServiceControlsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// DisableVpcServiceControls: Disables VPC service controls for a connection. -// -// - parent: The service that is managing peering connectivity for a service -// producer's organization. For Google services that support this -// functionality, this value is `services/servicenetworking.googleapis.com`. -func (r *ServicesService) DisableVpcServiceControls(parent string, disablevpcservicecontrolsrequest *DisableVpcServiceControlsRequest) *ServicesDisableVpcServiceControlsCall { - c := &ServicesDisableVpcServiceControlsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.disablevpcservicecontrolsrequest = disablevpcservicecontrolsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ServicesDisableVpcServiceControlsCall) Fields(s ...googleapi.Field) *ServicesDisableVpcServiceControlsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ServicesDisableVpcServiceControlsCall) Context(ctx context.Context) *ServicesDisableVpcServiceControlsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ServicesDisableVpcServiceControlsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ServicesDisableVpcServiceControlsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.disablevpcservicecontrolsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}:disableVpcServiceControls") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "servicenetworking.services.disableVpcServiceControls", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "servicenetworking.services.disableVpcServiceControls" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ServicesDisableVpcServiceControlsCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "servicenetworking.services.disableVpcServiceControls", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ServicesEnableVpcServiceControlsCall struct { - s *APIService - parent string - enablevpcservicecontrolsrequest *EnableVpcServiceControlsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// EnableVpcServiceControls: Enables VPC service controls for a connection. -// -// - parent: The service that is managing peering connectivity for a service -// producer's organization. For Google services that support this -// functionality, this value is `services/servicenetworking.googleapis.com`. -func (r *ServicesService) EnableVpcServiceControls(parent string, enablevpcservicecontrolsrequest *EnableVpcServiceControlsRequest) *ServicesEnableVpcServiceControlsCall { - c := &ServicesEnableVpcServiceControlsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.enablevpcservicecontrolsrequest = enablevpcservicecontrolsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ServicesEnableVpcServiceControlsCall) Fields(s ...googleapi.Field) *ServicesEnableVpcServiceControlsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ServicesEnableVpcServiceControlsCall) Context(ctx context.Context) *ServicesEnableVpcServiceControlsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ServicesEnableVpcServiceControlsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ServicesEnableVpcServiceControlsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.enablevpcservicecontrolsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}:enableVpcServiceControls") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "servicenetworking.services.enableVpcServiceControls", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "servicenetworking.services.enableVpcServiceControls" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ServicesEnableVpcServiceControlsCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "servicenetworking.services.enableVpcServiceControls", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ServicesSearchRangeCall struct { - s *APIService - parent string - searchrangerequest *SearchRangeRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SearchRange: Service producers can use this method to find a currently -// unused range within consumer allocated ranges. This returned range is not -// reserved, and not guaranteed to remain unused. It will validate previously -// provided allocated ranges, find non-conflicting sub-range of requested size -// (expressed in number of leading bits of ipv4 network mask, as in CIDR range -// notation). -// -// - parent: This is in a form services/{service}. {service} the name of the -// private access management service, for example -// 'service-peering.example.com'. -func (r *ServicesService) SearchRange(parent string, searchrangerequest *SearchRangeRequest) *ServicesSearchRangeCall { - c := &ServicesSearchRangeCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.searchrangerequest = searchrangerequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ServicesSearchRangeCall) Fields(s ...googleapi.Field) *ServicesSearchRangeCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ServicesSearchRangeCall) Context(ctx context.Context) *ServicesSearchRangeCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ServicesSearchRangeCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ServicesSearchRangeCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.searchrangerequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}:searchRange") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "servicenetworking.services.searchRange", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "servicenetworking.services.searchRange" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ServicesSearchRangeCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "servicenetworking.services.searchRange", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ServicesValidateCall struct { - s *APIService - parent string - validateconsumerconfigrequest *ValidateConsumerConfigRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Validate: Service producers use this method to validate if the consumer -// provided network, project and requested range are valid. This allows them to -// use a fail-fast mechanism for consumer requests, and not have to wait for -// AddSubnetwork operation completion to determine if user request is invalid. -// -// - parent: This is in a form services/{service} where {service} is the name -// of the private access management service. For example -// 'service-peering.example.com'. -func (r *ServicesService) Validate(parent string, validateconsumerconfigrequest *ValidateConsumerConfigRequest) *ServicesValidateCall { - c := &ServicesValidateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.validateconsumerconfigrequest = validateconsumerconfigrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ServicesValidateCall) Fields(s ...googleapi.Field) *ServicesValidateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ServicesValidateCall) Context(ctx context.Context) *ServicesValidateCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ServicesValidateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ServicesValidateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.validateconsumerconfigrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}:validate") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "servicenetworking.services.validate", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "servicenetworking.services.validate" call. -// Any non-2xx status code is an error. Response headers are in either -// *ValidateConsumerConfigResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ServicesValidateCall) Do(opts ...googleapi.CallOption) (*ValidateConsumerConfigResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &ValidateConsumerConfigResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "servicenetworking.services.validate", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ServicesConnectionsCreateCall struct { - s *APIService - parent string - connection *Connection - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Create: Creates a private connection that establishes a VPC Network Peering -// connection to a VPC network in the service producer's organization. The -// administrator of the service consumer's VPC network invokes this method. The -// administrator must assign one or more allocated IP ranges for provisioning -// subnetworks in the service producer's VPC network. This connection is used -// for all supported services in the service producer's organization, so it -// only needs to be invoked once. -// -// - parent: The service that is managing peering connectivity for a service -// producer's organization. For Google services that support this -// functionality, this value is `services/servicenetworking.googleapis.com`. -func (r *ServicesConnectionsService) Create(parent string, connection *Connection) *ServicesConnectionsCreateCall { - c := &ServicesConnectionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.connection = connection - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ServicesConnectionsCreateCall) Fields(s ...googleapi.Field) *ServicesConnectionsCreateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ServicesConnectionsCreateCall) Context(ctx context.Context) *ServicesConnectionsCreateCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ServicesConnectionsCreateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ServicesConnectionsCreateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.connection) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/connections") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "servicenetworking.services.connections.create", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "servicenetworking.services.connections.create" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ServicesConnectionsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "servicenetworking.services.connections.create", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ServicesConnectionsDeleteConnectionCall struct { - s *APIService - name string - deleteconnectionrequest *DeleteConnectionRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// DeleteConnection: Deletes a private service access connection. -// -// - name: The private service connection that connects to a service producer -// organization. The name includes both the private service name and the VPC -// network peering name in the format of -// `services/{peering_service_name}/connections/{vpc_peering_name}`. For -// Google services that support this functionality, this is -// `services/servicenetworking.googleapis.com/connections/servicenetworking-go -// ogleapis-com`. -func (r *ServicesConnectionsService) DeleteConnection(name string, deleteconnectionrequest *DeleteConnectionRequest) *ServicesConnectionsDeleteConnectionCall { - c := &ServicesConnectionsDeleteConnectionCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.deleteconnectionrequest = deleteconnectionrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ServicesConnectionsDeleteConnectionCall) Fields(s ...googleapi.Field) *ServicesConnectionsDeleteConnectionCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ServicesConnectionsDeleteConnectionCall) Context(ctx context.Context) *ServicesConnectionsDeleteConnectionCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ServicesConnectionsDeleteConnectionCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ServicesConnectionsDeleteConnectionCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.deleteconnectionrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "servicenetworking.services.connections.deleteConnection", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "servicenetworking.services.connections.deleteConnection" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ServicesConnectionsDeleteConnectionCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "servicenetworking.services.connections.deleteConnection", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ServicesConnectionsListCall struct { - s *APIService - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: List the private connections that are configured in a service -// consumer's VPC network. -// -// - parent: The service that is managing peering connectivity for a service -// producer's organization. For Google services that support this -// functionality, this value is `services/servicenetworking.googleapis.com`. -// If you specify `services/-` as the parameter value, all configured peering -// services are listed. -func (r *ServicesConnectionsService) List(parent string) *ServicesConnectionsListCall { - c := &ServicesConnectionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// Network sets the optional parameter "network": Required. The name of service -// consumer's VPC network that's connected with service producer network -// through a private connection. The network name must be in the following -// format: `projects/{project}/global/networks/{network}`. {project} is a -// project number, such as in `12345` that includes the VPC service consumer's -// VPC network. {network} is the name of the service consumer's VPC network. -func (c *ServicesConnectionsListCall) Network(network string) *ServicesConnectionsListCall { - c.urlParams_.Set("network", network) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ServicesConnectionsListCall) Fields(s ...googleapi.Field) *ServicesConnectionsListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *ServicesConnectionsListCall) IfNoneMatch(entityTag string) *ServicesConnectionsListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ServicesConnectionsListCall) Context(ctx context.Context) *ServicesConnectionsListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ServicesConnectionsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ServicesConnectionsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/connections") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "servicenetworking.services.connections.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "servicenetworking.services.connections.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *ListConnectionsResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ServicesConnectionsListCall) Do(opts ...googleapi.CallOption) (*ListConnectionsResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &ListConnectionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "servicenetworking.services.connections.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ServicesConnectionsPatchCall struct { - s *APIService - name string - connection *Connection - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Updates the allocated ranges that are assigned to a connection. -// -// - name: The private service connection that connects to a service producer -// organization. The name includes both the private service name and the VPC -// network peering name in the format of -// `services/{peering_service_name}/connections/{vpc_peering_name}`. For -// Google services that support this functionality, this is -// `services/servicenetworking.googleapis.com/connections/servicenetworking-go -// ogleapis-com`. -func (r *ServicesConnectionsService) Patch(name string, connection *Connection) *ServicesConnectionsPatchCall { - c := &ServicesConnectionsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.connection = connection - return c -} - -// Force sets the optional parameter "force": If a previously defined allocated -// range is removed, force flag must be set to true. -func (c *ServicesConnectionsPatchCall) Force(force bool) *ServicesConnectionsPatchCall { - c.urlParams_.Set("force", fmt.Sprint(force)) - return c -} - -// UpdateMask sets the optional parameter "updateMask": The update mask. If -// this is omitted, it defaults to "*". You can only update the listed peering -// ranges. -func (c *ServicesConnectionsPatchCall) UpdateMask(updateMask string) *ServicesConnectionsPatchCall { - c.urlParams_.Set("updateMask", updateMask) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ServicesConnectionsPatchCall) Fields(s ...googleapi.Field) *ServicesConnectionsPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ServicesConnectionsPatchCall) Context(ctx context.Context) *ServicesConnectionsPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ServicesConnectionsPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ServicesConnectionsPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.connection) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "servicenetworking.services.connections.patch", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "servicenetworking.services.connections.patch" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ServicesConnectionsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "servicenetworking.services.connections.patch", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ServicesDnsRecordSetsAddCall struct { - s *APIService - parent string - adddnsrecordsetrequest *AddDnsRecordSetRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Add: Service producers can use this method to add DNS record sets to private -// DNS zones in the shared producer host project. -// -// - parent: The service that is managing peering connectivity for a service -// producer's organization. For Google services that support this -// functionality, this value is `services/servicenetworking.googleapis.com`. -func (r *ServicesDnsRecordSetsService) Add(parent string, adddnsrecordsetrequest *AddDnsRecordSetRequest) *ServicesDnsRecordSetsAddCall { - c := &ServicesDnsRecordSetsAddCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.adddnsrecordsetrequest = adddnsrecordsetrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ServicesDnsRecordSetsAddCall) Fields(s ...googleapi.Field) *ServicesDnsRecordSetsAddCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ServicesDnsRecordSetsAddCall) Context(ctx context.Context) *ServicesDnsRecordSetsAddCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ServicesDnsRecordSetsAddCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ServicesDnsRecordSetsAddCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.adddnsrecordsetrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/dnsRecordSets:add") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "servicenetworking.services.dnsRecordSets.add", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "servicenetworking.services.dnsRecordSets.add" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ServicesDnsRecordSetsAddCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "servicenetworking.services.dnsRecordSets.add", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ServicesDnsRecordSetsGetCall struct { - s *APIService - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Producers can use this method to retrieve information about the DNS -// record set added to the private zone inside the shared tenant host project -// associated with a consumer network. -// -// - parent: Parent resource identifying the connection which owns this -// collection of DNS zones in the format services/{service}. -func (r *ServicesDnsRecordSetsService) Get(parent string) *ServicesDnsRecordSetsGetCall { - c := &ServicesDnsRecordSetsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// ConsumerNetwork sets the optional parameter "consumerNetwork": Required. The -// consumer network containing the record set. Must be in the form of -// projects/{project}/global/networks/{network} -func (c *ServicesDnsRecordSetsGetCall) ConsumerNetwork(consumerNetwork string) *ServicesDnsRecordSetsGetCall { - c.urlParams_.Set("consumerNetwork", consumerNetwork) - return c -} - -// Domain sets the optional parameter "domain": Required. The domain name of -// the zone containing the recordset. -func (c *ServicesDnsRecordSetsGetCall) Domain(domain string) *ServicesDnsRecordSetsGetCall { - c.urlParams_.Set("domain", domain) - return c -} - -// Type sets the optional parameter "type": Required. RecordSet Type eg. -// type='A'. See the list of Supported DNS Types -// (https://cloud.google.com/dns/records/json-record). -func (c *ServicesDnsRecordSetsGetCall) Type(type_ string) *ServicesDnsRecordSetsGetCall { - c.urlParams_.Set("type", type_) - return c -} - -// Zone sets the optional parameter "zone": Required. The name of the zone -// containing the record set. -func (c *ServicesDnsRecordSetsGetCall) Zone(zone string) *ServicesDnsRecordSetsGetCall { - c.urlParams_.Set("zone", zone) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ServicesDnsRecordSetsGetCall) Fields(s ...googleapi.Field) *ServicesDnsRecordSetsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *ServicesDnsRecordSetsGetCall) IfNoneMatch(entityTag string) *ServicesDnsRecordSetsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ServicesDnsRecordSetsGetCall) Context(ctx context.Context) *ServicesDnsRecordSetsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ServicesDnsRecordSetsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ServicesDnsRecordSetsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/dnsRecordSets:get") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "servicenetworking.services.dnsRecordSets.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "servicenetworking.services.dnsRecordSets.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *DnsRecordSet.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ServicesDnsRecordSetsGetCall) Do(opts ...googleapi.CallOption) (*DnsRecordSet, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &DnsRecordSet{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "servicenetworking.services.dnsRecordSets.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ServicesDnsRecordSetsListCall struct { - s *APIService - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Producers can use this method to retrieve a list of available DNS -// RecordSets available inside the private zone on the tenant host project -// accessible from their network. -// -// - parent: The service that is managing peering connectivity for a service -// producer's organization. For Google services that support this -// functionality, this value is `services/servicenetworking.googleapis.com`. -func (r *ServicesDnsRecordSetsService) List(parent string) *ServicesDnsRecordSetsListCall { - c := &ServicesDnsRecordSetsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// ConsumerNetwork sets the optional parameter "consumerNetwork": Required. The -// network that the consumer is using to connect with services. Must be in the -// form of projects/{project}/global/networks/{network} {project} is the -// project number, as in '12345' {network} is the network name. -func (c *ServicesDnsRecordSetsListCall) ConsumerNetwork(consumerNetwork string) *ServicesDnsRecordSetsListCall { - c.urlParams_.Set("consumerNetwork", consumerNetwork) - return c -} - -// Zone sets the optional parameter "zone": Required. The name of the private -// DNS zone in the shared producer host project from which the record set will -// be removed. -func (c *ServicesDnsRecordSetsListCall) Zone(zone string) *ServicesDnsRecordSetsListCall { - c.urlParams_.Set("zone", zone) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ServicesDnsRecordSetsListCall) Fields(s ...googleapi.Field) *ServicesDnsRecordSetsListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *ServicesDnsRecordSetsListCall) IfNoneMatch(entityTag string) *ServicesDnsRecordSetsListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ServicesDnsRecordSetsListCall) Context(ctx context.Context) *ServicesDnsRecordSetsListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ServicesDnsRecordSetsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ServicesDnsRecordSetsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/dnsRecordSets:list") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "servicenetworking.services.dnsRecordSets.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "servicenetworking.services.dnsRecordSets.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *ListDnsRecordSetsResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ServicesDnsRecordSetsListCall) Do(opts ...googleapi.CallOption) (*ListDnsRecordSetsResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &ListDnsRecordSetsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "servicenetworking.services.dnsRecordSets.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ServicesDnsRecordSetsRemoveCall struct { - s *APIService - parent string - removednsrecordsetrequest *RemoveDnsRecordSetRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Remove: Service producers can use this method to remove DNS record sets from -// private DNS zones in the shared producer host project. -// -// - parent: The service that is managing peering connectivity for a service -// producer's organization. For Google services that support this -// functionality, this value is `services/servicenetworking.googleapis.com`. -func (r *ServicesDnsRecordSetsService) Remove(parent string, removednsrecordsetrequest *RemoveDnsRecordSetRequest) *ServicesDnsRecordSetsRemoveCall { - c := &ServicesDnsRecordSetsRemoveCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.removednsrecordsetrequest = removednsrecordsetrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ServicesDnsRecordSetsRemoveCall) Fields(s ...googleapi.Field) *ServicesDnsRecordSetsRemoveCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ServicesDnsRecordSetsRemoveCall) Context(ctx context.Context) *ServicesDnsRecordSetsRemoveCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ServicesDnsRecordSetsRemoveCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ServicesDnsRecordSetsRemoveCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.removednsrecordsetrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/dnsRecordSets:remove") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "servicenetworking.services.dnsRecordSets.remove", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "servicenetworking.services.dnsRecordSets.remove" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ServicesDnsRecordSetsRemoveCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "servicenetworking.services.dnsRecordSets.remove", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ServicesDnsRecordSetsUpdateCall struct { - s *APIService - parent string - updatednsrecordsetrequest *UpdateDnsRecordSetRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Update: Service producers can use this method to update DNS record sets from -// private DNS zones in the shared producer host project. -// -// - parent: The service that is managing peering connectivity for a service -// producer's organization. For Google services that support this -// functionality, this value is `services/servicenetworking.googleapis.com`. -func (r *ServicesDnsRecordSetsService) Update(parent string, updatednsrecordsetrequest *UpdateDnsRecordSetRequest) *ServicesDnsRecordSetsUpdateCall { - c := &ServicesDnsRecordSetsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.updatednsrecordsetrequest = updatednsrecordsetrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ServicesDnsRecordSetsUpdateCall) Fields(s ...googleapi.Field) *ServicesDnsRecordSetsUpdateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ServicesDnsRecordSetsUpdateCall) Context(ctx context.Context) *ServicesDnsRecordSetsUpdateCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ServicesDnsRecordSetsUpdateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ServicesDnsRecordSetsUpdateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.updatednsrecordsetrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/dnsRecordSets:update") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "servicenetworking.services.dnsRecordSets.update", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "servicenetworking.services.dnsRecordSets.update" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ServicesDnsRecordSetsUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "servicenetworking.services.dnsRecordSets.update", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ServicesDnsZonesAddCall struct { - s *APIService - parent string - adddnszonerequest *AddDnsZoneRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Add: Service producers can use this method to add private DNS zones in the -// shared producer host project and matching peering zones in the consumer -// project. -// -// - parent: The service that is managing peering connectivity for a service -// producer's organization. For Google services that support this -// functionality, this value is `services/servicenetworking.googleapis.com`. -func (r *ServicesDnsZonesService) Add(parent string, adddnszonerequest *AddDnsZoneRequest) *ServicesDnsZonesAddCall { - c := &ServicesDnsZonesAddCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.adddnszonerequest = adddnszonerequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ServicesDnsZonesAddCall) Fields(s ...googleapi.Field) *ServicesDnsZonesAddCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ServicesDnsZonesAddCall) Context(ctx context.Context) *ServicesDnsZonesAddCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ServicesDnsZonesAddCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ServicesDnsZonesAddCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.adddnszonerequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/dnsZones:add") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "servicenetworking.services.dnsZones.add", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "servicenetworking.services.dnsZones.add" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ServicesDnsZonesAddCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "servicenetworking.services.dnsZones.add", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ServicesDnsZonesRemoveCall struct { - s *APIService - parent string - removednszonerequest *RemoveDnsZoneRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Remove: Service producers can use this method to remove private DNS zones in -// the shared producer host project and matching peering zones in the consumer -// project. -// -// - parent: The service that is managing peering connectivity for a service -// producer's organization. For Google services that support this -// functionality, this value is `services/servicenetworking.googleapis.com`. -func (r *ServicesDnsZonesService) Remove(parent string, removednszonerequest *RemoveDnsZoneRequest) *ServicesDnsZonesRemoveCall { - c := &ServicesDnsZonesRemoveCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.removednszonerequest = removednszonerequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ServicesDnsZonesRemoveCall) Fields(s ...googleapi.Field) *ServicesDnsZonesRemoveCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ServicesDnsZonesRemoveCall) Context(ctx context.Context) *ServicesDnsZonesRemoveCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ServicesDnsZonesRemoveCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ServicesDnsZonesRemoveCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.removednszonerequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/dnsZones:remove") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "servicenetworking.services.dnsZones.remove", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "servicenetworking.services.dnsZones.remove" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ServicesDnsZonesRemoveCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "servicenetworking.services.dnsZones.remove", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ServicesProjectsGlobalNetworksGetCall struct { - s *APIService - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Service producers use this method to get the configuration of their -// connection including the import/export of custom routes and subnetwork -// routes with public IP. -// -// - name: Name of the consumer config to retrieve in the format: -// `services/{service}/projects/{project}/global/networks/{network}`. -// {service} is the peering service that is managing connectivity for the -// service producer's organization. For Google services that support this -// functionality, this value is `servicenetworking.googleapis.com`. {project} -// is a project number e.g. `12345` that contains the service consumer's VPC -// network. {network} is the name of the service consumer's VPC network. -func (r *ServicesProjectsGlobalNetworksService) Get(name string) *ServicesProjectsGlobalNetworksGetCall { - c := &ServicesProjectsGlobalNetworksGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// IncludeUsedIpRanges sets the optional parameter "includeUsedIpRanges": When -// true, include the used IP ranges as part of the GetConsumerConfig output. -// This includes routes created inside the service networking network, consumer -// network, peers of the consumer network, and reserved ranges inside the -// service networking network. By default, this is false -func (c *ServicesProjectsGlobalNetworksGetCall) IncludeUsedIpRanges(includeUsedIpRanges bool) *ServicesProjectsGlobalNetworksGetCall { - c.urlParams_.Set("includeUsedIpRanges", fmt.Sprint(includeUsedIpRanges)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ServicesProjectsGlobalNetworksGetCall) Fields(s ...googleapi.Field) *ServicesProjectsGlobalNetworksGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *ServicesProjectsGlobalNetworksGetCall) IfNoneMatch(entityTag string) *ServicesProjectsGlobalNetworksGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ServicesProjectsGlobalNetworksGetCall) Context(ctx context.Context) *ServicesProjectsGlobalNetworksGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ServicesProjectsGlobalNetworksGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ServicesProjectsGlobalNetworksGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "servicenetworking.services.projects.global.networks.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "servicenetworking.services.projects.global.networks.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *ConsumerConfig.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ServicesProjectsGlobalNetworksGetCall) Do(opts ...googleapi.CallOption) (*ConsumerConfig, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &ConsumerConfig{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "servicenetworking.services.projects.global.networks.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ServicesProjectsGlobalNetworksGetVpcServiceControlsCall struct { - s *APIService - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// GetVpcServiceControls: Consumers use this method to find out the state of -// VPC Service Controls. The controls could be enabled or disabled for a -// connection. -// -// - name: Name of the VPC Service Controls config to retrieve in the format: -// `services/{service}/projects/{project}/global/networks/{network}`. -// {service} is the peering service that is managing connectivity for the -// service producer's organization. For Google services that support this -// functionality, this value is `servicenetworking.googleapis.com`. {project} -// is a project number e.g. `12345` that contains the service consumer's VPC -// network. {network} is the name of the service consumer's VPC network. -func (r *ServicesProjectsGlobalNetworksService) GetVpcServiceControls(name string) *ServicesProjectsGlobalNetworksGetVpcServiceControlsCall { - c := &ServicesProjectsGlobalNetworksGetVpcServiceControlsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ServicesProjectsGlobalNetworksGetVpcServiceControlsCall) Fields(s ...googleapi.Field) *ServicesProjectsGlobalNetworksGetVpcServiceControlsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *ServicesProjectsGlobalNetworksGetVpcServiceControlsCall) IfNoneMatch(entityTag string) *ServicesProjectsGlobalNetworksGetVpcServiceControlsCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ServicesProjectsGlobalNetworksGetVpcServiceControlsCall) Context(ctx context.Context) *ServicesProjectsGlobalNetworksGetVpcServiceControlsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ServicesProjectsGlobalNetworksGetVpcServiceControlsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ServicesProjectsGlobalNetworksGetVpcServiceControlsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/vpcServiceControls") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "servicenetworking.services.projects.global.networks.getVpcServiceControls", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "servicenetworking.services.projects.global.networks.getVpcServiceControls" call. -// Any non-2xx status code is an error. Response headers are in either -// *VpcServiceControls.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified was -// returned. -func (c *ServicesProjectsGlobalNetworksGetVpcServiceControlsCall) Do(opts ...googleapi.CallOption) (*VpcServiceControls, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &VpcServiceControls{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "servicenetworking.services.projects.global.networks.getVpcServiceControls", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ServicesProjectsGlobalNetworksUpdateConsumerConfigCall struct { - s *APIService - parent string - updateconsumerconfigrequest *UpdateConsumerConfigRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// UpdateConsumerConfig: Service producers use this method to update the -// configuration of their connection including the import/export of custom -// routes and subnetwork routes with public IP. -// -// - parent: Parent resource identifying the connection for which the consumer -// config is being updated in the format: -// `services/{service}/projects/{project}/global/networks/{network}` -// {service} is the peering service that is managing connectivity for the -// service producer's organization. For Google services that support this -// functionality, this value is `servicenetworking.googleapis.com`. {project} -// is the number of the project that contains the service consumer's VPC -// network e.g. `12345`. {network} is the name of the service consumer's VPC -// network. -func (r *ServicesProjectsGlobalNetworksService) UpdateConsumerConfig(parent string, updateconsumerconfigrequest *UpdateConsumerConfigRequest) *ServicesProjectsGlobalNetworksUpdateConsumerConfigCall { - c := &ServicesProjectsGlobalNetworksUpdateConsumerConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.updateconsumerconfigrequest = updateconsumerconfigrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ServicesProjectsGlobalNetworksUpdateConsumerConfigCall) Fields(s ...googleapi.Field) *ServicesProjectsGlobalNetworksUpdateConsumerConfigCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ServicesProjectsGlobalNetworksUpdateConsumerConfigCall) Context(ctx context.Context) *ServicesProjectsGlobalNetworksUpdateConsumerConfigCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ServicesProjectsGlobalNetworksUpdateConsumerConfigCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ServicesProjectsGlobalNetworksUpdateConsumerConfigCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.updateconsumerconfigrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}:updateConsumerConfig") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "servicenetworking.services.projects.global.networks.updateConsumerConfig", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "servicenetworking.services.projects.global.networks.updateConsumerConfig" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ServicesProjectsGlobalNetworksUpdateConsumerConfigCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "servicenetworking.services.projects.global.networks.updateConsumerConfig", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ServicesProjectsGlobalNetworksDnsZonesGetCall struct { - s *APIService - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Service producers can use this method to retrieve a DNS zone in the -// shared producer host project and the matching peering zones in consumer -// project -// -// - name: The network that the consumer is using to connect with services. -// Must be in the form of -// services/{service}/projects/{project}/global/networks/{network}/dnsZones/{z -// oneName} Where {service} is the peering service that is managing -// connectivity for the service producer's organization. For Google services -// that support this {project} is the project number, as in '12345' {network} -// is the network name. {zoneName} is the DNS zone name. -func (r *ServicesProjectsGlobalNetworksDnsZonesService) Get(name string) *ServicesProjectsGlobalNetworksDnsZonesGetCall { - c := &ServicesProjectsGlobalNetworksDnsZonesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ServicesProjectsGlobalNetworksDnsZonesGetCall) Fields(s ...googleapi.Field) *ServicesProjectsGlobalNetworksDnsZonesGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *ServicesProjectsGlobalNetworksDnsZonesGetCall) IfNoneMatch(entityTag string) *ServicesProjectsGlobalNetworksDnsZonesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ServicesProjectsGlobalNetworksDnsZonesGetCall) Context(ctx context.Context) *ServicesProjectsGlobalNetworksDnsZonesGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ServicesProjectsGlobalNetworksDnsZonesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ServicesProjectsGlobalNetworksDnsZonesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "servicenetworking.services.projects.global.networks.dnsZones.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "servicenetworking.services.projects.global.networks.dnsZones.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *GetDnsZoneResponse.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified was -// returned. -func (c *ServicesProjectsGlobalNetworksDnsZonesGetCall) Do(opts ...googleapi.CallOption) (*GetDnsZoneResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &GetDnsZoneResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "servicenetworking.services.projects.global.networks.dnsZones.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ServicesProjectsGlobalNetworksDnsZonesListCall struct { - s *APIService - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: * Service producers can use this method to retrieve a list of -// available DNS zones in the shared producer host project and the matching -// peering zones in the consumer project. * -// -// - parent: Parent resource identifying the connection which owns this -// collection of DNS zones in the format -// services/{service}/projects/{project}/global/networks/{network} Service: -// The service that is managing connectivity for the service producer's -// organization. For Google services that support this functionality, this -// value is `servicenetworking.googleapis.com`. Projects: the consumer -// project containing the consumer network. Network: The consumer network -// accessible from the tenant project. -func (r *ServicesProjectsGlobalNetworksDnsZonesService) List(parent string) *ServicesProjectsGlobalNetworksDnsZonesListCall { - c := &ServicesProjectsGlobalNetworksDnsZonesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ServicesProjectsGlobalNetworksDnsZonesListCall) Fields(s ...googleapi.Field) *ServicesProjectsGlobalNetworksDnsZonesListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *ServicesProjectsGlobalNetworksDnsZonesListCall) IfNoneMatch(entityTag string) *ServicesProjectsGlobalNetworksDnsZonesListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ServicesProjectsGlobalNetworksDnsZonesListCall) Context(ctx context.Context) *ServicesProjectsGlobalNetworksDnsZonesListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ServicesProjectsGlobalNetworksDnsZonesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ServicesProjectsGlobalNetworksDnsZonesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/dnsZones:list") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "servicenetworking.services.projects.global.networks.dnsZones.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "servicenetworking.services.projects.global.networks.dnsZones.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *ListDnsZonesResponse.ServerResponse.Header or (if a response was returned -// at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified was -// returned. -func (c *ServicesProjectsGlobalNetworksDnsZonesListCall) Do(opts ...googleapi.CallOption) (*ListDnsZonesResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &ListDnsZonesResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "servicenetworking.services.projects.global.networks.dnsZones.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ServicesProjectsGlobalNetworksPeeredDnsDomainsCreateCall struct { - s *APIService - parent string - peereddnsdomain *PeeredDnsDomain - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Create: Creates a peered DNS domain which sends requests for records in -// given namespace originating in the service producer VPC network to the -// consumer VPC network to be resolved. -// -// - parent: Parent resource identifying the connection for which the peered -// DNS domain will be created in the format: -// `services/{service}/projects/{project}/global/networks/{network}` -// {service} is the peering service that is managing connectivity for the -// service producer's organization. For Google services that support this -// functionality, this value is `servicenetworking.googleapis.com`. {project} -// is the number of the project that contains the service consumer's VPC -// network e.g. `12345`. {network} is the name of the service consumer's VPC -// network. -func (r *ServicesProjectsGlobalNetworksPeeredDnsDomainsService) Create(parent string, peereddnsdomain *PeeredDnsDomain) *ServicesProjectsGlobalNetworksPeeredDnsDomainsCreateCall { - c := &ServicesProjectsGlobalNetworksPeeredDnsDomainsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.peereddnsdomain = peereddnsdomain - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ServicesProjectsGlobalNetworksPeeredDnsDomainsCreateCall) Fields(s ...googleapi.Field) *ServicesProjectsGlobalNetworksPeeredDnsDomainsCreateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ServicesProjectsGlobalNetworksPeeredDnsDomainsCreateCall) Context(ctx context.Context) *ServicesProjectsGlobalNetworksPeeredDnsDomainsCreateCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ServicesProjectsGlobalNetworksPeeredDnsDomainsCreateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ServicesProjectsGlobalNetworksPeeredDnsDomainsCreateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.peereddnsdomain) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/peeredDnsDomains") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "servicenetworking.services.projects.global.networks.peeredDnsDomains.create", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "servicenetworking.services.projects.global.networks.peeredDnsDomains.create" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ServicesProjectsGlobalNetworksPeeredDnsDomainsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "servicenetworking.services.projects.global.networks.peeredDnsDomains.create", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ServicesProjectsGlobalNetworksPeeredDnsDomainsDeleteCall struct { - s *APIService - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes a peered DNS domain. -// -// - name: The name of the peered DNS domain to delete in the format: -// `services/{service}/projects/{project}/global/networks/{network}/peeredDnsD -// omains/{name}`. {service} is the peering service that is managing -// connectivity for the service producer's organization. For Google services -// that support this functionality, this value is -// `servicenetworking.googleapis.com`. {project} is the number of the project -// that contains the service consumer's VPC network e.g. `12345`. {network} -// is the name of the service consumer's VPC network. {name} is the name of -// the peered DNS domain. -func (r *ServicesProjectsGlobalNetworksPeeredDnsDomainsService) Delete(name string) *ServicesProjectsGlobalNetworksPeeredDnsDomainsDeleteCall { - c := &ServicesProjectsGlobalNetworksPeeredDnsDomainsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ServicesProjectsGlobalNetworksPeeredDnsDomainsDeleteCall) Fields(s ...googleapi.Field) *ServicesProjectsGlobalNetworksPeeredDnsDomainsDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ServicesProjectsGlobalNetworksPeeredDnsDomainsDeleteCall) Context(ctx context.Context) *ServicesProjectsGlobalNetworksPeeredDnsDomainsDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ServicesProjectsGlobalNetworksPeeredDnsDomainsDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ServicesProjectsGlobalNetworksPeeredDnsDomainsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "servicenetworking.services.projects.global.networks.peeredDnsDomains.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "servicenetworking.services.projects.global.networks.peeredDnsDomains.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ServicesProjectsGlobalNetworksPeeredDnsDomainsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "servicenetworking.services.projects.global.networks.peeredDnsDomains.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ServicesProjectsGlobalNetworksPeeredDnsDomainsListCall struct { - s *APIService - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Lists peered DNS domains for a connection. -// -// - parent: Parent resource identifying the connection which owns this -// collection of peered DNS domains in the format: -// `services/{service}/projects/{project}/global/networks/{network}`. -// {service} is the peering service that is managing connectivity for the -// service producer's organization. For Google services that support this -// functionality, this value is `servicenetworking.googleapis.com`. {project} -// is a project number e.g. `12345` that contains the service consumer's VPC -// network. {network} is the name of the service consumer's VPC network. -func (r *ServicesProjectsGlobalNetworksPeeredDnsDomainsService) List(parent string) *ServicesProjectsGlobalNetworksPeeredDnsDomainsListCall { - c := &ServicesProjectsGlobalNetworksPeeredDnsDomainsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ServicesProjectsGlobalNetworksPeeredDnsDomainsListCall) Fields(s ...googleapi.Field) *ServicesProjectsGlobalNetworksPeeredDnsDomainsListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *ServicesProjectsGlobalNetworksPeeredDnsDomainsListCall) IfNoneMatch(entityTag string) *ServicesProjectsGlobalNetworksPeeredDnsDomainsListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ServicesProjectsGlobalNetworksPeeredDnsDomainsListCall) Context(ctx context.Context) *ServicesProjectsGlobalNetworksPeeredDnsDomainsListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ServicesProjectsGlobalNetworksPeeredDnsDomainsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ServicesProjectsGlobalNetworksPeeredDnsDomainsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/peeredDnsDomains") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "servicenetworking.services.projects.global.networks.peeredDnsDomains.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "servicenetworking.services.projects.global.networks.peeredDnsDomains.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *ListPeeredDnsDomainsResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ServicesProjectsGlobalNetworksPeeredDnsDomainsListCall) Do(opts ...googleapi.CallOption) (*ListPeeredDnsDomainsResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &ListPeeredDnsDomainsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "servicenetworking.services.projects.global.networks.peeredDnsDomains.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ServicesRolesAddCall struct { - s *APIService - parent string - addrolesrequest *AddRolesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Add: Service producers can use this method to add roles in the shared VPC -// host project. Each role is bound to the provided member. Each role must be -// selected from within an allowlisted set of roles. Each role is applied at -// only the granularity specified in the allowlist. -// -// - parent: This is in a form services/{service} where {service} is the name -// of the private access management service. For example -// 'service-peering.example.com'. -func (r *ServicesRolesService) Add(parent string, addrolesrequest *AddRolesRequest) *ServicesRolesAddCall { - c := &ServicesRolesAddCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.addrolesrequest = addrolesrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ServicesRolesAddCall) Fields(s ...googleapi.Field) *ServicesRolesAddCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ServicesRolesAddCall) Context(ctx context.Context) *ServicesRolesAddCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ServicesRolesAddCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ServicesRolesAddCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.addrolesrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/roles:add") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "servicenetworking.services.roles.add", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "servicenetworking.services.roles.add" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ServicesRolesAddCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "servicenetworking.services.roles.add", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} diff --git a/vendor/google.golang.org/api/sqladmin/v1/sqladmin-api.json b/vendor/google.golang.org/api/sqladmin/v1/sqladmin-api.json deleted file mode 100644 index 06f5a94969..0000000000 --- a/vendor/google.golang.org/api/sqladmin/v1/sqladmin-api.json +++ /dev/null @@ -1,9039 +0,0 @@ -{ - "auth": { - "oauth2": { - "scopes": { - "https://www.googleapis.com/auth/cloud-platform": { - "description": "See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account." - }, - "https://www.googleapis.com/auth/sqlservice.admin": { - "description": "Manage your Google SQL Service instances" - } - } - } - }, - "basePath": "", - "baseUrl": "https://sqladmin.googleapis.com/", - "batchPath": "batch", - "canonicalName": "SQL Admin", - "description": "API for Cloud SQL database instance management", - "discoveryVersion": "v1", - "documentationLink": "https://cloud.google.com/sql/docs", - "fullyEncodeReservedExpansion": true, - "icons": { - "x16": "http://www.google.com/images/icons/product/search-16.gif", - "x32": "http://www.google.com/images/icons/product/search-32.gif" - }, - "id": "sqladmin:v1", - "kind": "discovery#restDescription", - "mtlsRootUrl": "https://sqladmin.mtls.googleapis.com/", - "name": "sqladmin", - "ownerDomain": "google.com", - "ownerName": "Google", - "parameters": { - "$.xgafv": { - "description": "V1 error format.", - "enum": [ - "1", - "2" - ], - "enumDescriptions": [ - "v1 error format", - "v2 error format" - ], - "location": "query", - "type": "string" - }, - "access_token": { - "description": "OAuth access token.", - "location": "query", - "type": "string" - }, - "alt": { - "default": "json", - "description": "Data format for response.", - "enum": [ - "json", - "media", - "proto" - ], - "enumDescriptions": [ - "Responses with Content-Type of application/json", - "Media download with context-dependent Content-Type", - "Responses with Content-Type of application/x-protobuf" - ], - "location": "query", - "type": "string" - }, - "callback": { - "description": "JSONP", - "location": "query", - "type": "string" - }, - "fields": { - "description": "Selector specifying which fields to include in a partial response.", - "location": "query", - "type": "string" - }, - "key": { - "description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", - "location": "query", - "type": "string" - }, - "oauth_token": { - "description": "OAuth 2.0 token for the current user.", - "location": "query", - "type": "string" - }, - "prettyPrint": { - "default": "true", - "description": "Returns response with indentations and line breaks.", - "location": "query", - "type": "boolean" - }, - "quotaUser": { - "description": "Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.", - "location": "query", - "type": "string" - }, - "uploadType": { - "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", - "location": "query", - "type": "string" - }, - "upload_protocol": { - "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", - "location": "query", - "type": "string" - } - }, - "protocol": "rest", - "resources": { - "Backups": { - "methods": { - "CreateBackup": { - "description": "Creates a backup for a Cloud SQL instance. This API can be used only to create on-demand backups.", - "flatPath": "v1/projects/{projectsId}/backups", - "httpMethod": "POST", - "id": "sql.Backups.CreateBackup", - "parameterOrder": [ - "parent" - ], - "parameters": { - "parent": { - "description": "Required. The parent resource where this backup is created. Format: projects/{project}", - "location": "path", - "pattern": "^projects/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+parent}/backups", - "request": { - "$ref": "Backup" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/sqlservice.admin" - ] - }, - "DeleteBackup": { - "description": "Deletes the backup.", - "flatPath": "v1/projects/{projectsId}/backups/{backupsId}", - "httpMethod": "DELETE", - "id": "sql.Backups.DeleteBackup", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Required. The name of the backup to delete. Format: projects/{project}/backups/{backup}", - "location": "path", - "pattern": "^projects/[^/]+/backups/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+name}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/sqlservice.admin" - ] - }, - "GetBackup": { - "description": "Retrieves a resource containing information about a backup.", - "flatPath": "v1/projects/{projectsId}/backups/{backupsId}", - "httpMethod": "GET", - "id": "sql.Backups.GetBackup", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Required. The name of the backup to retrieve. Format: projects/{project}/backups/{backup}", - "location": "path", - "pattern": "^projects/[^/]+/backups/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+name}", - "response": { - "$ref": "Backup" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/sqlservice.admin" - ] - }, - "ListBackups": { - "description": "Lists all backups associated with the project.", - "flatPath": "v1/projects/{projectsId}/backups", - "httpMethod": "GET", - "id": "sql.Backups.ListBackups", - "parameterOrder": [ - "parent" - ], - "parameters": { - "filter": { - "description": "Multiple filter queries are separated by spaces. For example, 'instance:abc AND type:FINAL, 'location:us', 'backupInterval.startTime\u003e=1950-01-01T01:01:25.771Z'. You can filter by type, instance, backupInterval.startTime (creation time), or location.", - "location": "query", - "type": "string" - }, - "pageSize": { - "description": "The maximum number of backups to return per response. The service might return fewer backups than this value. If a value for this parameter isn't specified, then, at most, 500 backups are returned. The maximum value is 2,000. Any values that you set, which are greater than 2,000, are changed to 2,000.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "pageToken": { - "description": "A page token, received from a previous `ListBackups` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListBackups` must match the call that provided the page token.", - "location": "query", - "type": "string" - }, - "parent": { - "description": "Required. The parent that owns this collection of backups. Format: projects/{project}", - "location": "path", - "pattern": "^projects/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+parent}/backups", - "response": { - "$ref": "ListBackupsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/sqlservice.admin" - ] - }, - "UpdateBackup": { - "description": "Updates the retention period and description of the backup. You can use this API to update final backups only.", - "flatPath": "v1/projects/{projectsId}/backups/{backupsId}", - "httpMethod": "PATCH", - "id": "sql.Backups.UpdateBackup", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Output only. The resource name of the backup. Format: projects/{project}/backups/{backup}.", - "location": "path", - "pattern": "^projects/[^/]+/backups/[^/]+$", - "required": true, - "type": "string" - }, - "updateMask": { - "description": "The list of fields that you can update. You can update only the description and retention period of the final backup.", - "format": "google-fieldmask", - "location": "query", - "type": "string" - } - }, - "path": "v1/{+name}", - "request": { - "$ref": "Backup" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/sqlservice.admin" - ] - } - } - }, - "backupRuns": { - "methods": { - "delete": { - "description": "Deletes the backup taken by a backup run.", - "flatPath": "v1/projects/{project}/instances/{instance}/backupRuns/{id}", - "httpMethod": "DELETE", - "id": "sql.backupRuns.delete", - "parameterOrder": [ - "project", - "instance", - "id" - ], - "parameters": { - "id": { - "description": "The ID of the backup run to delete. To find a backup run ID, use the [list](https://cloud.google.com/sql/docs/mysql/admin-api/rest/v1/backupRuns/list) method.", - "format": "int64", - "location": "path", - "required": true, - "type": "string" - }, - "instance": { - "description": "Cloud SQL instance ID. This does not include the project ID.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID of the project that contains the instance.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "v1/projects/{project}/instances/{instance}/backupRuns/{id}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/sqlservice.admin" - ] - }, - "get": { - "description": "Retrieves a resource containing information about a backup run.", - "flatPath": "v1/projects/{project}/instances/{instance}/backupRuns/{id}", - "httpMethod": "GET", - "id": "sql.backupRuns.get", - "parameterOrder": [ - "project", - "instance", - "id" - ], - "parameters": { - "id": { - "description": "The ID of this backup run.", - "format": "int64", - "location": "path", - "required": true, - "type": "string" - }, - "instance": { - "description": "Cloud SQL instance ID. This does not include the project ID.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID of the project that contains the instance.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "v1/projects/{project}/instances/{instance}/backupRuns/{id}", - "response": { - "$ref": "BackupRun" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/sqlservice.admin" - ] - }, - "insert": { - "description": "Creates a new backup run on demand.", - "flatPath": "v1/projects/{project}/instances/{instance}/backupRuns", - "httpMethod": "POST", - "id": "sql.backupRuns.insert", - "parameterOrder": [ - "project", - "instance" - ], - "parameters": { - "instance": { - "description": "Cloud SQL instance ID. This does not include the project ID.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID of the project that contains the instance.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "v1/projects/{project}/instances/{instance}/backupRuns", - "request": { - "$ref": "BackupRun" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/sqlservice.admin" - ] - }, - "list": { - "description": "Lists all backup runs associated with the project or a given instance and configuration in the reverse chronological order of the backup initiation time.", - "flatPath": "v1/projects/{project}/instances/{instance}/backupRuns", - "httpMethod": "GET", - "id": "sql.backupRuns.list", - "parameterOrder": [ - "project", - "instance" - ], - "parameters": { - "instance": { - "description": "Cloud SQL instance ID, or \"-\" for all instances. This does not include the project ID.", - "location": "path", - "required": true, - "type": "string" - }, - "maxResults": { - "description": "Maximum number of backup runs per response.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "pageToken": { - "description": "A previously-returned page token representing part of the larger set of results to view.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID of the project that contains the instance.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "v1/projects/{project}/instances/{instance}/backupRuns", - "response": { - "$ref": "BackupRunsListResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/sqlservice.admin" - ] - } - } - }, - "connect": { - "methods": { - "generateEphemeralCert": { - "description": "Generates a short-lived X509 certificate containing the provided public key and signed by a private key specific to the target instance. Users may use the certificate to authenticate as themselves when connecting to the database.", - "flatPath": "v1/projects/{project}/instances/{instance}:generateEphemeralCert", - "httpMethod": "POST", - "id": "sql.connect.generateEphemeral", - "parameterOrder": [ - "project", - "instance" - ], - "parameters": { - "instance": { - "description": "Cloud SQL instance ID. This does not include the project ID.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID of the project that contains the instance.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "v1/projects/{project}/instances/{instance}:generateEphemeralCert", - "request": { - "$ref": "GenerateEphemeralCertRequest" - }, - "response": { - "$ref": "GenerateEphemeralCertResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/sqlservice.admin" - ] - }, - "get": { - "description": "Retrieves connect settings about a Cloud SQL instance.", - "flatPath": "v1/projects/{project}/instances/{instance}/connectSettings", - "httpMethod": "GET", - "id": "sql.connect.get", - "parameterOrder": [ - "project", - "instance" - ], - "parameters": { - "instance": { - "description": "Cloud SQL instance ID. This does not include the project ID.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID of the project that contains the instance.", - "location": "path", - "required": true, - "type": "string" - }, - "readTime": { - "description": "Optional. Optional snapshot read timestamp to trade freshness for performance.", - "format": "google-datetime", - "location": "query", - "type": "string" - } - }, - "path": "v1/projects/{project}/instances/{instance}/connectSettings", - "response": { - "$ref": "ConnectSettings" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/sqlservice.admin" - ] - } - } - }, - "databases": { - "methods": { - "delete": { - "description": "Deletes a database from a Cloud SQL instance.", - "flatPath": "v1/projects/{project}/instances/{instance}/databases/{database}", - "httpMethod": "DELETE", - "id": "sql.databases.delete", - "parameterOrder": [ - "project", - "instance", - "database" - ], - "parameters": { - "database": { - "description": "Name of the database to be deleted in the instance.", - "location": "path", - "required": true, - "type": "string" - }, - "instance": { - "description": "Database instance ID. This does not include the project ID.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID of the project that contains the instance.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "v1/projects/{project}/instances/{instance}/databases/{database}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/sqlservice.admin" - ] - }, - "get": { - "description": "Retrieves a resource containing information about a database inside a Cloud SQL instance.", - "flatPath": "v1/projects/{project}/instances/{instance}/databases/{database}", - "httpMethod": "GET", - "id": "sql.databases.get", - "parameterOrder": [ - "project", - "instance", - "database" - ], - "parameters": { - "database": { - "description": "Name of the database in the instance.", - "location": "path", - "required": true, - "type": "string" - }, - "instance": { - "description": "Database instance ID. This does not include the project ID.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID of the project that contains the instance.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "v1/projects/{project}/instances/{instance}/databases/{database}", - "response": { - "$ref": "Database" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/sqlservice.admin" - ] - }, - "insert": { - "description": "Inserts a resource containing information about a database inside a Cloud SQL instance. **Note:** You can't modify the default character set and collation.", - "flatPath": "v1/projects/{project}/instances/{instance}/databases", - "httpMethod": "POST", - "id": "sql.databases.insert", - "parameterOrder": [ - "project", - "instance" - ], - "parameters": { - "instance": { - "description": "Database instance ID. This does not include the project ID.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID of the project that contains the instance.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "v1/projects/{project}/instances/{instance}/databases", - "request": { - "$ref": "Database" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/sqlservice.admin" - ] - }, - "list": { - "description": "Lists databases in the specified Cloud SQL instance.", - "flatPath": "v1/projects/{project}/instances/{instance}/databases", - "httpMethod": "GET", - "id": "sql.databases.list", - "parameterOrder": [ - "project", - "instance" - ], - "parameters": { - "instance": { - "description": "Cloud SQL instance ID. This does not include the project ID.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID of the project that contains the instance.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "v1/projects/{project}/instances/{instance}/databases", - "response": { - "$ref": "DatabasesListResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/sqlservice.admin" - ] - }, - "patch": { - "description": "Partially updates a resource containing information about a database inside a Cloud SQL instance. This method supports patch semantics.", - "flatPath": "v1/projects/{project}/instances/{instance}/databases/{database}", - "httpMethod": "PATCH", - "id": "sql.databases.patch", - "parameterOrder": [ - "project", - "instance", - "database" - ], - "parameters": { - "database": { - "description": "Name of the database to be updated in the instance.", - "location": "path", - "required": true, - "type": "string" - }, - "instance": { - "description": "Database instance ID. This does not include the project ID.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID of the project that contains the instance.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "v1/projects/{project}/instances/{instance}/databases/{database}", - "request": { - "$ref": "Database" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/sqlservice.admin" - ] - }, - "update": { - "description": "Updates a resource containing information about a database inside a Cloud SQL instance.", - "flatPath": "v1/projects/{project}/instances/{instance}/databases/{database}", - "httpMethod": "PUT", - "id": "sql.databases.update", - "parameterOrder": [ - "project", - "instance", - "database" - ], - "parameters": { - "database": { - "description": "Name of the database to be updated in the instance.", - "location": "path", - "required": true, - "type": "string" - }, - "instance": { - "description": "Database instance ID. This does not include the project ID.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID of the project that contains the instance.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "v1/projects/{project}/instances/{instance}/databases/{database}", - "request": { - "$ref": "Database" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/sqlservice.admin" - ] - } - } - }, - "flags": { - "methods": { - "list": { - "description": "Lists all available database flags for Cloud SQL instances.", - "flatPath": "v1/flags", - "httpMethod": "GET", - "id": "sql.flags.list", - "parameterOrder": [], - "parameters": { - "databaseVersion": { - "description": "Database type and version you want to retrieve flags for. By default, this method returns flags for all database types and versions.", - "location": "query", - "type": "string" - }, - "flagScope": { - "description": "Optional. Specify the scope of flags to be returned by SqlFlagsListService. Return list of database flags if unspecified.", - "enum": [ - "SQL_FLAG_SCOPE_UNSPECIFIED", - "SQL_FLAG_SCOPE_DATABASE", - "SQL_FLAG_SCOPE_CONNECTION_POOL" - ], - "enumDescriptions": [ - "Assume database flags if unspecified", - "database flags", - "connection pool configuration flags" - ], - "location": "query", - "type": "string" - } - }, - "path": "v1/flags", - "response": { - "$ref": "FlagsListResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/sqlservice.admin" - ] - } - } - }, - "instances": { - "methods": { - "ListEntraIdCertificates": { - "description": "Lists all versions of EntraID certificates for the specified instance. There can be up to three sets of certificates listed: the certificate that is currently in use, a future that has been added but not yet used to sign a certificate, and a certificate that has been rotated out.", - "flatPath": "v1/projects/{project}/instances/{instance}/listEntraIdCertificates", - "httpMethod": "GET", - "id": "sql.instances.ListEntraIdCertificates", - "parameterOrder": [ - "project", - "instance" - ], - "parameters": { - "instance": { - "description": "Required. Cloud SQL instance ID. This does not include the project ID.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Required. Project ID of the project that contains the instance.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "v1/projects/{project}/instances/{instance}/listEntraIdCertificates", - "response": { - "$ref": "InstancesListEntraIdCertificatesResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/sqlservice.admin" - ] - }, - "ListServerCertificates": { - "description": "Lists all versions of server certificates and certificate authorities (CAs) for the specified instance. There can be up to three sets of certs listed: the certificate that is currently in use, a future that has been added but not yet used to sign a certificate, and a certificate that has been rotated out. For instances not using Certificate Authority Service (CAS) server CA, use ListServerCas instead.", - "flatPath": "v1/projects/{project}/instances/{instance}/listServerCertificates", - "httpMethod": "GET", - "id": "sql.instances.ListServerCertificates", - "parameterOrder": [ - "project", - "instance" - ], - "parameters": { - "instance": { - "description": "Required. Cloud SQL instance ID. This does not include the project ID.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Required. Project ID of the project that contains the instance.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "v1/projects/{project}/instances/{instance}/listServerCertificates", - "response": { - "$ref": "InstancesListServerCertificatesResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/sqlservice.admin" - ] - }, - "RotateEntraIdCertificate": { - "description": "Rotates the server certificate version to one previously added with the addEntraIdCertificate method.", - "flatPath": "v1/projects/{project}/instances/{instance}/rotateEntraIdCertificate", - "httpMethod": "POST", - "id": "sql.instances.RotateEntraIdCertificate", - "parameterOrder": [ - "project", - "instance" - ], - "parameters": { - "instance": { - "description": "Required. Cloud SQL instance ID. This does not include the project ID.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Required. Project ID of the project that contains the instance.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "v1/projects/{project}/instances/{instance}/rotateEntraIdCertificate", - "request": { - "$ref": "InstancesRotateEntraIdCertificateRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/sqlservice.admin" - ] - }, - "RotateServerCertificate": { - "description": "Rotates the server certificate version to one previously added with the addServerCertificate method. For instances not using Certificate Authority Service (CAS) server CA, use RotateServerCa instead.", - "flatPath": "v1/projects/{project}/instances/{instance}/rotateServerCertificate", - "httpMethod": "POST", - "id": "sql.instances.RotateServerCertificate", - "parameterOrder": [ - "project", - "instance" - ], - "parameters": { - "instance": { - "description": "Required. Cloud SQL instance ID. This does not include the project ID.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Required. Project ID of the project that contains the instance.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "v1/projects/{project}/instances/{instance}/rotateServerCertificate", - "request": { - "$ref": "InstancesRotateServerCertificateRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/sqlservice.admin" - ] - }, - "acquireSsrsLease": { - "description": "Acquire a lease for the setup of SQL Server Reporting Services (SSRS).", - "flatPath": "v1/projects/{project}/instances/{instance}/acquireSsrsLease", - "httpMethod": "POST", - "id": "sql.instances.acquireSsrsLease", - "parameterOrder": [ - "project", - "instance" - ], - "parameters": { - "instance": { - "description": "Required. Cloud SQL instance ID. This doesn't include the project ID. It's composed of lowercase letters, numbers, and hyphens, and it must start with a letter. The total length must be 98 characters or less (Example: instance-id).", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Required. Project ID of the project that contains the instance (Example: project-id).", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "v1/projects/{project}/instances/{instance}/acquireSsrsLease", - "request": { - "$ref": "InstancesAcquireSsrsLeaseRequest" - }, - "response": { - "$ref": "SqlInstancesAcquireSsrsLeaseResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/sqlservice.admin" - ] - }, - "addEntraIdCertificate": { - "description": "Adds a new Entra ID certificate for the specified instance. If an Entra ID certificate was previously added but never used in a certificate rotation, this operation replaces that version.", - "flatPath": "v1/projects/{project}/instances/{instance}/addEntraIdCertificate", - "httpMethod": "POST", - "id": "sql.instances.addEntraIdCertificate", - "parameterOrder": [ - "project", - "instance" - ], - "parameters": { - "instance": { - "description": "Required. Cloud SQL instance ID. This does not include the project ID.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Required. Project ID of the project that contains the instance.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "v1/projects/{project}/instances/{instance}/addEntraIdCertificate", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/sqlservice.admin" - ] - }, - "addServerCa": { - "description": "Adds a new trusted Certificate Authority (CA) version for the specified instance. Required to prepare for a certificate rotation. If a CA version was previously added but never used in a certificate rotation, this operation replaces that version. There cannot be more than one CA version waiting to be rotated in. For instances that have enabled Certificate Authority Service (CAS) based server CA, use AddServerCertificate to add a new server certificate.", - "flatPath": "v1/projects/{project}/instances/{instance}/addServerCa", - "httpMethod": "POST", - "id": "sql.instances.addServerCa", - "parameterOrder": [ - "project", - "instance" - ], - "parameters": { - "instance": { - "description": "Cloud SQL instance ID. This does not include the project ID.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID of the project that contains the instance.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "v1/projects/{project}/instances/{instance}/addServerCa", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/sqlservice.admin" - ] - }, - "addServerCertificate": { - "description": "Add a new trusted server certificate version for the specified instance using Certificate Authority Service (CAS) server CA. Required to prepare for a certificate rotation. If a server certificate version was previously added but never used in a certificate rotation, this operation replaces that version. There cannot be more than one certificate version waiting to be rotated in. For instances not using CAS server CA, use AddServerCa instead.", - "flatPath": "v1/projects/{project}/instances/{instance}/addServerCertificate", - "httpMethod": "POST", - "id": "sql.instances.addServerCertificate", - "parameterOrder": [ - "project", - "instance" - ], - "parameters": { - "instance": { - "description": "Cloud SQL instance ID. This does not include the project ID.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID of the project that contains the instance.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "v1/projects/{project}/instances/{instance}/addServerCertificate", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/sqlservice.admin" - ] - }, - "clone": { - "description": "Creates a Cloud SQL instance as a clone of the source instance. Using this operation might cause your instance to restart.", - "flatPath": "v1/projects/{project}/instances/{instance}/clone", - "httpMethod": "POST", - "id": "sql.instances.clone", - "parameterOrder": [ - "project", - "instance" - ], - "parameters": { - "instance": { - "description": "Required. The ID of the Cloud SQL instance to be cloned (source). This does not include the project ID.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Required. Project ID of the source Cloud SQL instance.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "v1/projects/{project}/instances/{instance}/clone", - "request": { - "$ref": "InstancesCloneRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/sqlservice.admin" - ] - }, - "delete": { - "description": "Deletes a Cloud SQL instance.", - "flatPath": "v1/projects/{project}/instances/{instance}", - "httpMethod": "DELETE", - "id": "sql.instances.delete", - "parameterOrder": [ - "project", - "instance" - ], - "parameters": { - "enableFinalBackup": { - "description": "Flag to opt-in for final backup. By default, it is turned off.", - "location": "query", - "type": "boolean" - }, - "finalBackupDescription": { - "description": "Optional. The description of the final backup.", - "location": "query", - "type": "string" - }, - "finalBackupExpiryTime": { - "description": "Optional. Final Backup expiration time. Timestamp in UTC of when this resource is considered expired.", - "format": "google-datetime", - "location": "query", - "type": "string" - }, - "finalBackupTtlDays": { - "description": "Optional. Retention period of the final backup.", - "format": "int64", - "location": "query", - "type": "string" - }, - "instance": { - "description": "Cloud SQL instance ID. This does not include the project ID.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID of the project that contains the instance to be deleted.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "v1/projects/{project}/instances/{instance}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/sqlservice.admin" - ] - }, - "demote": { - "description": "Demotes an existing standalone instance to be a Cloud SQL read replica for an external database server.", - "flatPath": "v1/projects/{project}/instances/{instance}/demote", - "httpMethod": "POST", - "id": "sql.instances.demote", - "parameterOrder": [ - "project", - "instance" - ], - "parameters": { - "instance": { - "description": "Required. Cloud SQL instance name.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Required. ID of the project that contains the instance.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "v1/projects/{project}/instances/{instance}/demote", - "request": { - "$ref": "InstancesDemoteRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/sqlservice.admin" - ] - }, - "demoteMaster": { - "description": "Demotes the stand-alone instance to be a Cloud SQL read replica for an external database server.", - "flatPath": "v1/projects/{project}/instances/{instance}/demoteMaster", - "httpMethod": "POST", - "id": "sql.instances.demoteMaster", - "parameterOrder": [ - "project", - "instance" - ], - "parameters": { - "instance": { - "description": "Cloud SQL instance name.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "ID of the project that contains the instance.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "v1/projects/{project}/instances/{instance}/demoteMaster", - "request": { - "$ref": "InstancesDemoteMasterRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/sqlservice.admin" - ] - }, - "executeSql": { - "description": "Execute SQL statements.", - "flatPath": "v1/projects/{project}/instances/{instance}/executeSql", - "httpMethod": "POST", - "id": "sql.instances.executeSql", - "parameterOrder": [ - "project", - "instance" - ], - "parameters": { - "instance": { - "description": "Required. Database instance ID. This does not include the project ID.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Required. Project ID of the project that contains the instance.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "v1/projects/{project}/instances/{instance}/executeSql", - "request": { - "$ref": "ExecuteSqlPayload" - }, - "response": { - "$ref": "SqlInstancesExecuteSqlResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/sqlservice.admin" - ] - }, - "export": { - "description": "Exports data from a Cloud SQL instance to a Cloud Storage bucket as a SQL dump or CSV file.", - "flatPath": "v1/projects/{project}/instances/{instance}/export", - "httpMethod": "POST", - "id": "sql.instances.export", - "parameterOrder": [ - "project", - "instance" - ], - "parameters": { - "instance": { - "description": "Cloud SQL instance ID. This does not include the project ID.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID of the project that contains the instance to be exported.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "v1/projects/{project}/instances/{instance}/export", - "request": { - "$ref": "InstancesExportRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "failover": { - "description": "Initiates a manual failover of a high availability (HA) primary instance to a standby instance, which becomes the primary instance. Users are then rerouted to the new primary. For more information, see the [Overview of high availability](https://cloud.google.com/sql/docs/mysql/high-availability) page in the Cloud SQL documentation. If using Legacy HA (MySQL only), this causes the instance to failover to its failover replica instance.", - "flatPath": "v1/projects/{project}/instances/{instance}/failover", - "httpMethod": "POST", - "id": "sql.instances.failover", - "parameterOrder": [ - "project", - "instance" - ], - "parameters": { - "instance": { - "description": "Cloud SQL instance ID. This does not include the project ID.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "ID of the project that contains the read replica.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "v1/projects/{project}/instances/{instance}/failover", - "request": { - "$ref": "InstancesFailoverRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/sqlservice.admin" - ] - }, - "get": { - "description": "Retrieves a resource containing information about a Cloud SQL instance.", - "flatPath": "v1/projects/{project}/instances/{instance}", - "httpMethod": "GET", - "id": "sql.instances.get", - "parameterOrder": [ - "project", - "instance" - ], - "parameters": { - "instance": { - "description": "Required. Database instance ID. This does not include the project ID.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Required. Project ID of the project that contains the instance.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "v1/projects/{project}/instances/{instance}", - "response": { - "$ref": "DatabaseInstance" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/sqlservice.admin" - ] - }, - "import": { - "description": "Imports data into a Cloud SQL instance from a SQL dump or CSV file in Cloud Storage.", - "flatPath": "v1/projects/{project}/instances/{instance}/import", - "httpMethod": "POST", - "id": "sql.instances.import", - "parameterOrder": [ - "project", - "instance" - ], - "parameters": { - "instance": { - "description": "Cloud SQL instance ID. This does not include the project ID.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID of the project that contains the instance.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "v1/projects/{project}/instances/{instance}/import", - "request": { - "$ref": "InstancesImportRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "insert": { - "description": "Creates a new Cloud SQL instance.", - "flatPath": "v1/projects/{project}/instances", - "httpMethod": "POST", - "id": "sql.instances.insert", - "parameterOrder": [ - "project" - ], - "parameters": { - "project": { - "description": "Project ID of the project to which the newly created Cloud SQL instances should belong.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "v1/projects/{project}/instances", - "request": { - "$ref": "DatabaseInstance" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/sqlservice.admin" - ] - }, - "list": { - "description": "Lists instances under a given project.", - "flatPath": "v1/projects/{project}/instances", - "httpMethod": "GET", - "id": "sql.instances.list", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. The expression is in the form of field:value. For example, 'instanceType:CLOUD_SQL_INSTANCE'. Fields can be nested as needed as per their JSON representation, such as 'settings.userLabels.auto_start:true'. Multiple filter queries are space-separated. For example. 'state:RUNNABLE instanceType:CLOUD_SQL_INSTANCE'. By default, each expression is an AND expression. However, you can include AND and OR expressions explicitly.", - "location": "query", - "type": "string" - }, - "maxResults": { - "description": "The maximum number of instances to return. The service may return fewer than this value. If unspecified, at most 500 instances are returned. The maximum value is 1000; values above 1000 are coerced to 1000.", - "format": "uint32", - "location": "query", - "type": "integer" - }, - "pageToken": { - "description": "A previously-returned page token representing part of the larger set of results to view.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID of the project for which to list Cloud SQL instances.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "v1/projects/{project}/instances", - "response": { - "$ref": "InstancesListResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/sqlservice.admin" - ] - }, - "listServerCas": { - "description": "Lists all of the trusted Certificate Authorities (CAs) for the specified instance. There can be up to three CAs listed: the CA that was used to sign the certificate that is currently in use, a CA that has been added but not yet used to sign a certificate, and a CA used to sign a certificate that has previously rotated out.", - "flatPath": "v1/projects/{project}/instances/{instance}/listServerCas", - "httpMethod": "GET", - "id": "sql.instances.listServerCas", - "parameterOrder": [ - "project", - "instance" - ], - "parameters": { - "instance": { - "description": "Cloud SQL instance ID. This does not include the project ID.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID of the project that contains the instance.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "v1/projects/{project}/instances/{instance}/listServerCas", - "response": { - "$ref": "InstancesListServerCasResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/sqlservice.admin" - ] - }, - "patch": { - "description": "Partially updates settings of a Cloud SQL instance by merging the request with the current configuration. This method supports patch semantics.", - "flatPath": "v1/projects/{project}/instances/{instance}", - "httpMethod": "PATCH", - "id": "sql.instances.patch", - "parameterOrder": [ - "project", - "instance" - ], - "parameters": { - "instance": { - "description": "Cloud SQL instance ID. This does not include the project ID.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID of the project that contains the instance.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "v1/projects/{project}/instances/{instance}", - "request": { - "$ref": "DatabaseInstance" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/sqlservice.admin" - ] - }, - "pointInTimeRestore": { - "description": "Point in time restore for an instance managed by Google Cloud Backup and Disaster Recovery.", - "flatPath": "v1/projects/{projectsId}:pointInTimeRestore", - "httpMethod": "POST", - "id": "sql.instances.pointInTimeRestore", - "parameterOrder": [ - "parent" - ], - "parameters": { - "parent": { - "description": "Required. The parent resource where you created this instance. Format: projects/{project}", - "location": "path", - "pattern": "^projects/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+parent}:pointInTimeRestore", - "request": { - "$ref": "PointInTimeRestoreContext" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/sqlservice.admin" - ] - }, - "preCheckMajorVersionUpgrade": { - "description": "Execute MVU Pre-checks", - "flatPath": "v1/projects/{project}/instances/{instance}/preCheckMajorVersionUpgrade", - "httpMethod": "POST", - "id": "sql.instances.preCheckMajorVersionUpgrade", - "parameterOrder": [ - "project", - "instance" - ], - "parameters": { - "instance": { - "description": "Required. Cloud SQL instance ID. This does not include the project ID.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Required. Project ID of the project that contains the instance.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "v1/projects/{project}/instances/{instance}/preCheckMajorVersionUpgrade", - "request": { - "$ref": "InstancesPreCheckMajorVersionUpgradeRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/sqlservice.admin" - ] - }, - "promoteReplica": { - "description": "Promotes the read replica instance to be an independent Cloud SQL primary instance. Using this operation might cause your instance to restart.", - "flatPath": "v1/projects/{project}/instances/{instance}/promoteReplica", - "httpMethod": "POST", - "id": "sql.instances.promoteReplica", - "parameterOrder": [ - "project", - "instance" - ], - "parameters": { - "failover": { - "description": "Set to true to invoke a replica failover to the DR replica. As part of replica failover, the promote operation attempts to add the original primary instance as a replica of the promoted DR replica when the original primary instance comes back online. If set to false or not specified, then the original primary instance becomes an independent Cloud SQL primary instance.", - "location": "query", - "type": "boolean" - }, - "instance": { - "description": "Cloud SQL read replica instance name.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "ID of the project that contains the read replica.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "v1/projects/{project}/instances/{instance}/promoteReplica", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/sqlservice.admin" - ] - }, - "reencrypt": { - "description": "Reencrypt CMEK instance with latest key version.", - "flatPath": "v1/projects/{project}/instances/{instance}/reencrypt", - "httpMethod": "POST", - "id": "sql.instances.reencrypt", - "parameterOrder": [ - "project", - "instance" - ], - "parameters": { - "instance": { - "description": "Cloud SQL instance ID. This does not include the project ID.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "ID of the project that contains the instance.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "v1/projects/{project}/instances/{instance}/reencrypt", - "request": { - "$ref": "InstancesReencryptRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/sqlservice.admin" - ] - }, - "releaseSsrsLease": { - "description": "Release a lease for the setup of SQL Server Reporting Services (SSRS).", - "flatPath": "v1/projects/{project}/instances/{instance}/releaseSsrsLease", - "httpMethod": "POST", - "id": "sql.instances.releaseSsrsLease", - "parameterOrder": [ - "project", - "instance" - ], - "parameters": { - "instance": { - "description": "Required. The Cloud SQL instance ID. This doesn't include the project ID. The instance ID contains lowercase letters, numbers, and hyphens, and it must start with a letter. This ID can have a maximum length of 98 characters.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Required. The project ID that contains the instance.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "v1/projects/{project}/instances/{instance}/releaseSsrsLease", - "response": { - "$ref": "SqlInstancesReleaseSsrsLeaseResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/sqlservice.admin" - ] - }, - "resetSslConfig": { - "description": "Deletes all client certificates and generates a new server SSL certificate for the instance.", - "flatPath": "v1/projects/{project}/instances/{instance}/resetSslConfig", - "httpMethod": "POST", - "id": "sql.instances.resetSslConfig", - "parameterOrder": [ - "project", - "instance" - ], - "parameters": { - "instance": { - "description": "Cloud SQL instance ID. This does not include the project ID.", - "location": "path", - "required": true, - "type": "string" - }, - "mode": { - "description": "Optional. Reset SSL mode to use.", - "enum": [ - "RESET_SSL_MODE_UNSPECIFIED", - "ALL", - "SYNC_FROM_PRIMARY" - ], - "enumDescriptions": [ - "Reset SSL mode is not specified.", - "Refresh all TLS configs. This is the default behaviour.", - "Refreshes the replication-related TLS configuration settings provided by the primary instance. Not applicable to on-premises replication instances." - ], - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID of the project that contains the instance.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "v1/projects/{project}/instances/{instance}/resetSslConfig", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/sqlservice.admin" - ] - }, - "restart": { - "description": "Restarts a Cloud SQL instance.", - "flatPath": "v1/projects/{project}/instances/{instance}/restart", - "httpMethod": "POST", - "id": "sql.instances.restart", - "parameterOrder": [ - "project", - "instance" - ], - "parameters": { - "instance": { - "description": "Cloud SQL instance ID. This does not include the project ID.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID of the project that contains the instance to be restarted.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "v1/projects/{project}/instances/{instance}/restart", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/sqlservice.admin" - ] - }, - "restoreBackup": { - "description": "Restores a backup of a Cloud SQL instance. Using this operation might cause your instance to restart.", - "flatPath": "v1/projects/{project}/instances/{instance}/restoreBackup", - "httpMethod": "POST", - "id": "sql.instances.restoreBackup", - "parameterOrder": [ - "project", - "instance" - ], - "parameters": { - "instance": { - "description": "Cloud SQL instance ID. This does not include the project ID.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID of the project that contains the instance.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "v1/projects/{project}/instances/{instance}/restoreBackup", - "request": { - "$ref": "InstancesRestoreBackupRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/sqlservice.admin" - ] - }, - "rotateServerCa": { - "description": "Rotates the server certificate to one signed by the Certificate Authority (CA) version previously added with the addServerCA method. For instances that have enabled Certificate Authority Service (CAS) based server CA, use RotateServerCertificate to rotate the server certificate.", - "flatPath": "v1/projects/{project}/instances/{instance}/rotateServerCa", - "httpMethod": "POST", - "id": "sql.instances.rotateServerCa", - "parameterOrder": [ - "project", - "instance" - ], - "parameters": { - "instance": { - "description": "Cloud SQL instance ID. This does not include the project ID.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID of the project that contains the instance.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "v1/projects/{project}/instances/{instance}/rotateServerCa", - "request": { - "$ref": "InstancesRotateServerCaRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/sqlservice.admin" - ] - }, - "startReplica": { - "description": "Starts the replication in the read replica instance.", - "flatPath": "v1/projects/{project}/instances/{instance}/startReplica", - "httpMethod": "POST", - "id": "sql.instances.startReplica", - "parameterOrder": [ - "project", - "instance" - ], - "parameters": { - "instance": { - "description": "Cloud SQL read replica instance name.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "ID of the project that contains the read replica.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "v1/projects/{project}/instances/{instance}/startReplica", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/sqlservice.admin" - ] - }, - "stopReplica": { - "description": "Stops the replication in the read replica instance.", - "flatPath": "v1/projects/{project}/instances/{instance}/stopReplica", - "httpMethod": "POST", - "id": "sql.instances.stopReplica", - "parameterOrder": [ - "project", - "instance" - ], - "parameters": { - "instance": { - "description": "Cloud SQL read replica instance name.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "ID of the project that contains the read replica.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "v1/projects/{project}/instances/{instance}/stopReplica", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/sqlservice.admin" - ] - }, - "switchover": { - "description": "Switches over from the primary instance to the DR replica instance.", - "flatPath": "v1/projects/{project}/instances/{instance}/switchover", - "httpMethod": "POST", - "id": "sql.instances.switchover", - "parameterOrder": [ - "project", - "instance" - ], - "parameters": { - "dbTimeout": { - "description": "Optional. (MySQL and PostgreSQL only) Cloud SQL instance operations timeout, which is a sum of all database operations. Default value is 10 minutes and can be modified to a maximum value of 24 hours.", - "format": "google-duration", - "location": "query", - "type": "string" - }, - "instance": { - "description": "Cloud SQL read replica instance name.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "ID of the project that contains the replica.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "v1/projects/{project}/instances/{instance}/switchover", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/sqlservice.admin" - ] - }, - "truncateLog": { - "description": "Truncate MySQL general and slow query log tables MySQL only.", - "flatPath": "v1/projects/{project}/instances/{instance}/truncateLog", - "httpMethod": "POST", - "id": "sql.instances.truncateLog", - "parameterOrder": [ - "project", - "instance" - ], - "parameters": { - "instance": { - "description": "Cloud SQL instance ID. This does not include the project ID.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID of the Cloud SQL project.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "v1/projects/{project}/instances/{instance}/truncateLog", - "request": { - "$ref": "InstancesTruncateLogRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/sqlservice.admin" - ] - }, - "update": { - "description": "Updates settings of a Cloud SQL instance. Using this operation might cause your instance to restart.", - "flatPath": "v1/projects/{project}/instances/{instance}", - "httpMethod": "PUT", - "id": "sql.instances.update", - "parameterOrder": [ - "project", - "instance" - ], - "parameters": { - "instance": { - "description": "Cloud SQL instance ID. This does not include the project ID.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID of the project that contains the instance.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "v1/projects/{project}/instances/{instance}", - "request": { - "$ref": "DatabaseInstance" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/sqlservice.admin" - ] - } - } - }, - "operations": { - "methods": { - "cancel": { - "description": "Cancels an instance operation that has been performed on an instance.", - "flatPath": "v1/projects/{project}/operations/{operation}/cancel", - "httpMethod": "POST", - "id": "sql.operations.cancel", - "parameterOrder": [ - "project", - "operation" - ], - "parameters": { - "operation": { - "description": "Instance operation ID.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID of the project that contains the instance.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "v1/projects/{project}/operations/{operation}/cancel", - "response": { - "$ref": "Empty" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/sqlservice.admin" - ] - }, - "get": { - "description": "Retrieves an instance operation that has been performed on an instance.", - "flatPath": "v1/projects/{project}/operations/{operation}", - "httpMethod": "GET", - "id": "sql.operations.get", - "parameterOrder": [ - "project", - "operation" - ], - "parameters": { - "operation": { - "description": "Required. Instance operation ID.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Required. Project ID of the project that contains the instance.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "v1/projects/{project}/operations/{operation}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/sqlservice.admin" - ] - }, - "list": { - "description": "Lists all instance operations that have been performed on the given Cloud SQL instance in the reverse chronological order of the start time.", - "flatPath": "v1/projects/{project}/operations", - "httpMethod": "GET", - "id": "sql.operations.list", - "parameterOrder": [ - "project" - ], - "parameters": { - "instance": { - "description": "Cloud SQL instance ID. This does not include the project ID.", - "location": "query", - "type": "string" - }, - "maxResults": { - "description": "Maximum number of operations per response.", - "format": "uint32", - "location": "query", - "type": "integer" - }, - "pageToken": { - "description": "A previously-returned page token representing part of the larger set of results to view.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID of the project that contains the instance.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "v1/projects/{project}/operations", - "response": { - "$ref": "OperationsListResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/sqlservice.admin" - ] - } - } - }, - "projects": { - "resources": { - "instances": { - "methods": { - "getDiskShrinkConfig": { - "description": "Get Disk Shrink Config for a given instance.", - "flatPath": "v1/projects/{project}/instances/{instance}/getDiskShrinkConfig", - "httpMethod": "GET", - "id": "sql.projects.instances.getDiskShrinkConfig", - "parameterOrder": [ - "project", - "instance" - ], - "parameters": { - "instance": { - "description": "Cloud SQL instance ID. This does not include the project ID.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID of the project that contains the instance.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "v1/projects/{project}/instances/{instance}/getDiskShrinkConfig", - "response": { - "$ref": "SqlInstancesGetDiskShrinkConfigResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/sqlservice.admin" - ] - }, - "getLatestRecoveryTime": { - "description": "Get Latest Recovery Time for a given instance.", - "flatPath": "v1/projects/{project}/instances/{instance}/getLatestRecoveryTime", - "httpMethod": "GET", - "id": "sql.projects.instances.getLatestRecoveryTime", - "parameterOrder": [ - "project", - "instance" - ], - "parameters": { - "instance": { - "description": "Cloud SQL instance ID. This does not include the project ID.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID of the project that contains the instance.", - "location": "path", - "required": true, - "type": "string" - }, - "sourceInstanceDeletionTime": { - "description": "The timestamp used to identify the time when the source instance is deleted. If this instance is deleted, then you must set the timestamp.", - "format": "google-datetime", - "location": "query", - "type": "string" - } - }, - "path": "v1/projects/{project}/instances/{instance}/getLatestRecoveryTime", - "response": { - "$ref": "SqlInstancesGetLatestRecoveryTimeResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/sqlservice.admin" - ] - }, - "performDiskShrink": { - "description": "Perform Disk Shrink on primary instance.", - "flatPath": "v1/projects/{project}/instances/{instance}/performDiskShrink", - "httpMethod": "POST", - "id": "sql.projects.instances.performDiskShrink", - "parameterOrder": [ - "project", - "instance" - ], - "parameters": { - "instance": { - "description": "Cloud SQL instance ID. This does not include the project ID.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID of the project that contains the instance.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "v1/projects/{project}/instances/{instance}/performDiskShrink", - "request": { - "$ref": "PerformDiskShrinkContext" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/sqlservice.admin" - ] - }, - "rescheduleMaintenance": { - "description": "Reschedules the maintenance on the given instance.", - "flatPath": "v1/projects/{project}/instances/{instance}/rescheduleMaintenance", - "httpMethod": "POST", - "id": "sql.projects.instances.rescheduleMaintenance", - "parameterOrder": [ - "project", - "instance" - ], - "parameters": { - "instance": { - "description": "Cloud SQL instance ID. This does not include the project ID.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "ID of the project that contains the instance.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "v1/projects/{project}/instances/{instance}/rescheduleMaintenance", - "request": { - "$ref": "SqlInstancesRescheduleMaintenanceRequestBody" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/sqlservice.admin" - ] - }, - "resetReplicaSize": { - "description": "Reset Replica Size to primary instance disk size.", - "flatPath": "v1/projects/{project}/instances/{instance}/resetReplicaSize", - "httpMethod": "POST", - "id": "sql.projects.instances.resetReplicaSize", - "parameterOrder": [ - "project", - "instance" - ], - "parameters": { - "instance": { - "description": "Cloud SQL read replica instance name.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "ID of the project that contains the read replica.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "v1/projects/{project}/instances/{instance}/resetReplicaSize", - "request": { - "$ref": "SqlInstancesResetReplicaSizeRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/sqlservice.admin" - ] - }, - "startExternalSync": { - "description": "Start External primary instance migration.", - "flatPath": "v1/projects/{project}/instances/{instance}/startExternalSync", - "httpMethod": "POST", - "id": "sql.projects.instances.startExternalSync", - "parameterOrder": [ - "project", - "instance" - ], - "parameters": { - "instance": { - "description": "Cloud SQL instance ID. This does not include the project ID.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "ID of the project that contains the instance.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "v1/projects/{project}/instances/{instance}/startExternalSync", - "request": { - "$ref": "SqlInstancesStartExternalSyncRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/sqlservice.admin" - ] - }, - "verifyExternalSyncSettings": { - "description": "Verify External primary instance external sync settings.", - "flatPath": "v1/projects/{project}/instances/{instance}/verifyExternalSyncSettings", - "httpMethod": "POST", - "id": "sql.projects.instances.verifyExternalSyncSettings", - "parameterOrder": [ - "project", - "instance" - ], - "parameters": { - "instance": { - "description": "Cloud SQL instance ID. This does not include the project ID.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID of the project that contains the instance.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "v1/projects/{project}/instances/{instance}/verifyExternalSyncSettings", - "request": { - "$ref": "SqlInstancesVerifyExternalSyncSettingsRequest" - }, - "response": { - "$ref": "SqlInstancesVerifyExternalSyncSettingsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/sqlservice.admin" - ] - } - } - } - } - }, - "sslCerts": { - "methods": { - "createEphemeral": { - "description": "Generates a short-lived X509 certificate containing the provided public key and signed by a private key specific to the target instance. Users may use the certificate to authenticate as themselves when connecting to the database.", - "flatPath": "v1/projects/{project}/instances/{instance}/createEphemeral", - "httpMethod": "POST", - "id": "sql.sslCerts.createEphemeral", - "parameterOrder": [ - "project", - "instance" - ], - "parameters": { - "instance": { - "description": "Cloud SQL instance ID. This does not include the project ID.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID of the Cloud SQL project.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "v1/projects/{project}/instances/{instance}/createEphemeral", - "request": { - "$ref": "SslCertsCreateEphemeralRequest" - }, - "response": { - "$ref": "SslCert" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/sqlservice.admin" - ] - }, - "delete": { - "description": "Deletes the SSL certificate. For First Generation instances, the certificate remains valid until the instance is restarted.", - "flatPath": "v1/projects/{project}/instances/{instance}/sslCerts/{sha1Fingerprint}", - "httpMethod": "DELETE", - "id": "sql.sslCerts.delete", - "parameterOrder": [ - "project", - "instance", - "sha1Fingerprint" - ], - "parameters": { - "instance": { - "description": "Cloud SQL instance ID. This does not include the project ID.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID of the project that contains the instance.", - "location": "path", - "required": true, - "type": "string" - }, - "sha1Fingerprint": { - "description": "Sha1 FingerPrint.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "v1/projects/{project}/instances/{instance}/sslCerts/{sha1Fingerprint}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/sqlservice.admin" - ] - }, - "get": { - "description": "Retrieves a particular SSL certificate. Does not include the private key (required for usage). The private key must be saved from the response to initial creation.", - "flatPath": "v1/projects/{project}/instances/{instance}/sslCerts/{sha1Fingerprint}", - "httpMethod": "GET", - "id": "sql.sslCerts.get", - "parameterOrder": [ - "project", - "instance", - "sha1Fingerprint" - ], - "parameters": { - "instance": { - "description": "Cloud SQL instance ID. This does not include the project ID.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID of the project that contains the instance.", - "location": "path", - "required": true, - "type": "string" - }, - "sha1Fingerprint": { - "description": "Sha1 FingerPrint.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "v1/projects/{project}/instances/{instance}/sslCerts/{sha1Fingerprint}", - "response": { - "$ref": "SslCert" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/sqlservice.admin" - ] - }, - "insert": { - "description": "Creates an SSL certificate and returns it along with the private key and server certificate authority. The new certificate will not be usable until the instance is restarted.", - "flatPath": "v1/projects/{project}/instances/{instance}/sslCerts", - "httpMethod": "POST", - "id": "sql.sslCerts.insert", - "parameterOrder": [ - "project", - "instance" - ], - "parameters": { - "instance": { - "description": "Cloud SQL instance ID. This does not include the project ID.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID of the project that contains the instance.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "v1/projects/{project}/instances/{instance}/sslCerts", - "request": { - "$ref": "SslCertsInsertRequest" - }, - "response": { - "$ref": "SslCertsInsertResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/sqlservice.admin" - ] - }, - "list": { - "description": "Lists all of the current SSL certificates for the instance.", - "flatPath": "v1/projects/{project}/instances/{instance}/sslCerts", - "httpMethod": "GET", - "id": "sql.sslCerts.list", - "parameterOrder": [ - "project", - "instance" - ], - "parameters": { - "instance": { - "description": "Cloud SQL instance ID. This does not include the project ID.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID of the project that contains the instance.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "v1/projects/{project}/instances/{instance}/sslCerts", - "response": { - "$ref": "SslCertsListResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/sqlservice.admin" - ] - } - } - }, - "tiers": { - "methods": { - "list": { - "description": "Lists all available machine types (tiers) for Cloud SQL, for example, `db-custom-1-3840`. For more information, see https://cloud.google.com/sql/pricing.", - "flatPath": "v1/projects/{project}/tiers", - "httpMethod": "GET", - "id": "sql.tiers.list", - "parameterOrder": [ - "project" - ], - "parameters": { - "project": { - "description": "Project ID of the project for which to list tiers.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "v1/projects/{project}/tiers", - "response": { - "$ref": "TiersListResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/sqlservice.admin" - ] - } - } - }, - "users": { - "methods": { - "delete": { - "description": "Deletes a user from a Cloud SQL instance.", - "flatPath": "v1/projects/{project}/instances/{instance}/users", - "httpMethod": "DELETE", - "id": "sql.users.delete", - "parameterOrder": [ - "project", - "instance" - ], - "parameters": { - "host": { - "description": "Host of the user in the instance.", - "location": "query", - "type": "string" - }, - "instance": { - "description": "Database instance ID. This does not include the project ID.", - "location": "path", - "required": true, - "type": "string" - }, - "name": { - "description": "Name of the user in the instance.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID of the project that contains the instance.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "v1/projects/{project}/instances/{instance}/users", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/sqlservice.admin" - ] - }, - "get": { - "description": "Retrieves a resource containing information about a user.", - "flatPath": "v1/projects/{project}/instances/{instance}/users/{name}", - "httpMethod": "GET", - "id": "sql.users.get", - "parameterOrder": [ - "project", - "instance", - "name" - ], - "parameters": { - "host": { - "description": "Host of a user of the instance.", - "location": "query", - "type": "string" - }, - "instance": { - "description": "Database instance ID. This does not include the project ID.", - "location": "path", - "required": true, - "type": "string" - }, - "name": { - "description": "User of the instance.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID of the project that contains the instance.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "v1/projects/{project}/instances/{instance}/users/{name}", - "response": { - "$ref": "User" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/sqlservice.admin" - ] - }, - "insert": { - "description": "Creates a new user in a Cloud SQL instance.", - "flatPath": "v1/projects/{project}/instances/{instance}/users", - "httpMethod": "POST", - "id": "sql.users.insert", - "parameterOrder": [ - "project", - "instance" - ], - "parameters": { - "instance": { - "description": "Database instance ID. This does not include the project ID.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID of the project that contains the instance.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "v1/projects/{project}/instances/{instance}/users", - "request": { - "$ref": "User" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/sqlservice.admin" - ] - }, - "list": { - "description": "Lists users in the specified Cloud SQL instance.", - "flatPath": "v1/projects/{project}/instances/{instance}/users", - "httpMethod": "GET", - "id": "sql.users.list", - "parameterOrder": [ - "project", - "instance" - ], - "parameters": { - "instance": { - "description": "Database instance ID. This does not include the project ID.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID of the project that contains the instance.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "v1/projects/{project}/instances/{instance}/users", - "response": { - "$ref": "UsersListResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/sqlservice.admin" - ] - }, - "update": { - "description": "Updates an existing user in a Cloud SQL instance.", - "flatPath": "v1/projects/{project}/instances/{instance}/users", - "httpMethod": "PUT", - "id": "sql.users.update", - "parameterOrder": [ - "project", - "instance" - ], - "parameters": { - "databaseRoles": { - "description": "Optional. List of database roles to grant to the user. body.database_roles will be ignored for update request.", - "location": "query", - "repeated": true, - "type": "string" - }, - "host": { - "description": "Optional. Host of the user in the instance.", - "location": "query", - "type": "string" - }, - "instance": { - "description": "Database instance ID. This does not include the project ID.", - "location": "path", - "required": true, - "type": "string" - }, - "name": { - "description": "Name of the user in the instance.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID of the project that contains the instance.", - "location": "path", - "required": true, - "type": "string" - }, - "revokeExistingRoles": { - "description": "Optional. Specifies whether to revoke existing roles that are not present in the `database_roles` field. If `false` or unset, the database roles specified in `database_roles` are added to the user's existing roles.", - "location": "query", - "type": "boolean" - } - }, - "path": "v1/projects/{project}/instances/{instance}/users", - "request": { - "$ref": "User" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/sqlservice.admin" - ] - } - } - } - }, - "revision": "20260317", - "rootUrl": "https://sqladmin.googleapis.com/", - "schemas": { - "AclEntry": { - "description": "An entry for an Access Control list.", - "id": "AclEntry", - "properties": { - "expirationTime": { - "description": "The time when this access control entry expires in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`.", - "format": "google-datetime", - "type": "string" - }, - "kind": { - "description": "This is always `sql#aclEntry`.", - "type": "string" - }, - "name": { - "description": "Optional. A label to identify this entry.", - "type": "string" - }, - "value": { - "description": "The allowlisted value for the access control list.", - "type": "string" - } - }, - "type": "object" - }, - "AcquireSsrsLeaseContext": { - "description": "Acquire SSRS lease context.", - "id": "AcquireSsrsLeaseContext", - "properties": { - "duration": { - "description": "Lease duration needed for SSRS setup.", - "format": "google-duration", - "type": "string" - }, - "reportDatabase": { - "description": "The report database to be used for SSRS setup.", - "type": "string" - }, - "serviceLogin": { - "description": "The username to be used as the service login to connect to the report database for SSRS setup.", - "type": "string" - }, - "setupLogin": { - "description": "The username to be used as the setup login to connect to the database server for SSRS setup.", - "type": "string" - } - }, - "type": "object" - }, - "AdvancedMachineFeatures": { - "description": "Specifies options for controlling advanced machine features.", - "id": "AdvancedMachineFeatures", - "properties": { - "threadsPerCore": { - "description": "The number of threads per physical core.", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "ApiWarning": { - "description": "An Admin API warning message.", - "id": "ApiWarning", - "properties": { - "code": { - "description": "Code to uniquely identify the warning type.", - "enum": [ - "SQL_API_WARNING_CODE_UNSPECIFIED", - "REGION_UNREACHABLE", - "MAX_RESULTS_EXCEEDS_LIMIT", - "COMPROMISED_CREDENTIALS", - "INTERNAL_STATE_FAILURE" - ], - "enumDescriptions": [ - "An unknown or unset warning type from Cloud SQL API.", - "Warning when one or more regions are not reachable. The returned result set may be incomplete.", - "Warning when user provided maxResults parameter exceeds the limit. The returned result set may be incomplete.", - "Warning when user tries to create/update a user with credentials that have previously been compromised by a public data breach.", - "Warning when the operation succeeds but some non-critical workflow state failed." - ], - "type": "string" - }, - "message": { - "description": "The warning message.", - "type": "string" - }, - "region": { - "description": "The region name for REGION_UNREACHABLE warning.", - "type": "string" - } - }, - "type": "object" - }, - "AvailableDatabaseVersion": { - "description": "An available database version. It can be a major or a minor version.", - "id": "AvailableDatabaseVersion", - "properties": { - "displayName": { - "description": "The database version's display name.", - "type": "string" - }, - "majorVersion": { - "description": "The version's major version name.", - "type": "string" - }, - "name": { - "description": "The database version name. For MySQL 8.0, this string provides the database major and minor version.", - "type": "string" - } - }, - "type": "object" - }, - "Backup": { - "description": "A backup resource.", - "id": "Backup", - "properties": { - "backupInterval": { - "$ref": "Interval", - "description": "Output only. This output contains the following values: start_time: All database writes up to this time are available. end_time: Any database writes after this time aren't available.", - "readOnly": true - }, - "backupKind": { - "description": "Output only. Specifies the kind of backup, PHYSICAL or DEFAULT_SNAPSHOT.", - "enum": [ - "SQL_BACKUP_KIND_UNSPECIFIED", - "SNAPSHOT", - "PHYSICAL" - ], - "enumDescriptions": [ - "This is an unknown BackupKind.", - "Snapshot-based backups.", - "Physical backups." - ], - "readOnly": true, - "type": "string" - }, - "backupRun": { - "description": "Output only. The mapping to backup run resource used for IAM validations.", - "readOnly": true, - "type": "string" - }, - "databaseVersion": { - "description": "Output only. The database version of the instance of at the time this backup was made.", - "enum": [ - "SQL_DATABASE_VERSION_UNSPECIFIED", - "MYSQL_5_1", - "MYSQL_5_5", - "MYSQL_5_6", - "MYSQL_5_7", - "MYSQL_8_0", - "MYSQL_8_0_18", - "MYSQL_8_0_26", - "MYSQL_8_0_27", - "MYSQL_8_0_28", - "MYSQL_8_0_29", - "MYSQL_8_0_30", - "MYSQL_8_0_31", - "MYSQL_8_0_32", - "MYSQL_8_0_33", - "MYSQL_8_0_34", - "MYSQL_8_0_35", - "MYSQL_8_0_36", - "MYSQL_8_0_37", - "MYSQL_8_0_39", - "MYSQL_8_0_40", - "MYSQL_8_0_41", - "MYSQL_8_0_42", - "MYSQL_8_0_43", - "MYSQL_8_0_44", - "MYSQL_8_0_45", - "MYSQL_8_0_46", - "MYSQL_8_4", - "MYSQL_9_7", - "SQLSERVER_2017_STANDARD", - "SQLSERVER_2017_ENTERPRISE", - "SQLSERVER_2017_EXPRESS", - "SQLSERVER_2017_WEB", - "POSTGRES_9_6", - "POSTGRES_10", - "POSTGRES_11", - "POSTGRES_12", - "POSTGRES_13", - "POSTGRES_14", - "POSTGRES_15", - "POSTGRES_16", - "POSTGRES_17", - "POSTGRES_18", - "SQLSERVER_2019_STANDARD", - "SQLSERVER_2019_ENTERPRISE", - "SQLSERVER_2019_EXPRESS", - "SQLSERVER_2019_WEB", - "SQLSERVER_2022_STANDARD", - "SQLSERVER_2022_ENTERPRISE", - "SQLSERVER_2022_EXPRESS", - "SQLSERVER_2022_WEB", - "SQLSERVER_2025_STANDARD", - "SQLSERVER_2025_ENTERPRISE", - "SQLSERVER_2025_EXPRESS" - ], - "enumDeprecated": [ - false, - true, - true, - false, - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "This is an unknown database version.", - "The database version is MySQL 5.1.", - "The database version is MySQL 5.5.", - "The database version is MySQL 5.6.", - "The database version is MySQL 5.7.", - "The database version is MySQL 8.", - "The database major version is MySQL 8.0 and the minor version is 18.", - "The database major version is MySQL 8.0 and the minor version is 26.", - "The database major version is MySQL 8.0 and the minor version is 27.", - "The database major version is MySQL 8.0 and the minor version is 28.", - "The database major version is MySQL 8.0 and the minor version is 29.", - "The database major version is MySQL 8.0 and the minor version is 30.", - "The database major version is MySQL 8.0 and the minor version is 31.", - "The database major version is MySQL 8.0 and the minor version is 32.", - "The database major version is MySQL 8.0 and the minor version is 33.", - "The database major version is MySQL 8.0 and the minor version is 34.", - "The database major version is MySQL 8.0 and the minor version is 35.", - "The database major version is MySQL 8.0 and the minor version is 36.", - "The database major version is MySQL 8.0 and the minor version is 37.", - "The database major version is MySQL 8.0 and the minor version is 39.", - "The database major version is MySQL 8.0 and the minor version is 40.", - "The database major version is MySQL 8.0 and the minor version is 41.", - "The database major version is MySQL 8.0 and the minor version is 42.", - "The database major version is MySQL 8.0 and the minor version is 43.", - "The database major version is MySQL 8.0 and the minor version is 44.", - "The database major version is MySQL 8.0 and the minor version is 45.", - "The database major version is MySQL 8.0 and the minor version is 46.", - "The database version is MySQL 8.4.", - "The database version is MySQL 9.7.", - "The database version is SQL Server 2017 Standard.", - "The database version is SQL Server 2017 Enterprise.", - "The database version is SQL Server 2017 Express.", - "The database version is SQL Server 2017 Web.", - "The database version is PostgreSQL 9.6.", - "The database version is PostgreSQL 10.", - "The database version is PostgreSQL 11.", - "The database version is PostgreSQL 12.", - "The database version is PostgreSQL 13.", - "The database version is PostgreSQL 14.", - "The database version is PostgreSQL 15.", - "The database version is PostgreSQL 16.", - "The database version is PostgreSQL 17.", - "The database version is PostgreSQL 18.", - "The database version is SQL Server 2019 Standard.", - "The database version is SQL Server 2019 Enterprise.", - "The database version is SQL Server 2019 Express.", - "The database version is SQL Server 2019 Web.", - "The database version is SQL Server 2022 Standard.", - "The database version is SQL Server 2022 Enterprise.", - "The database version is SQL Server 2022 Express.", - "The database version is SQL Server 2022 Web.", - "The database version is SQL Server 2025 Standard.", - "The database version is SQL Server 2025 Enterprise.", - "The database version is SQL Server 2025 Express." - ], - "readOnly": true, - "type": "string" - }, - "description": { - "description": "The description of this backup.", - "type": "string" - }, - "error": { - "$ref": "OperationError", - "description": "Output only. Information about why the backup operation fails (for example, when the backup state fails).", - "readOnly": true - }, - "expiryTime": { - "description": "Backup expiration time. A UTC timestamp of when this backup expired.", - "format": "google-datetime", - "type": "string" - }, - "instance": { - "description": "The name of the source database instance.", - "type": "string" - }, - "instanceDeletionTime": { - "description": "Optional. Output only. Timestamp in UTC of when the instance associated with this backup is deleted.", - "format": "google-datetime", - "readOnly": true, - "type": "string" - }, - "instanceSettings": { - "$ref": "DatabaseInstance", - "description": "Optional. Output only. The instance setting of the source instance that's associated with this backup.", - "readOnly": true - }, - "kind": { - "description": "Output only. This is always `sql#backup`.", - "readOnly": true, - "type": "string" - }, - "kmsKey": { - "description": "Output only. This output contains the encryption configuration for a backup and the resource name of the KMS key for disk encryption.", - "readOnly": true, - "type": "string" - }, - "kmsKeyVersion": { - "description": "Output only. This output contains the encryption status for a backup and the version of the KMS key that's used to encrypt the Cloud SQL instance.", - "readOnly": true, - "type": "string" - }, - "location": { - "description": "The storage location of the backups. The location can be multi-regional.", - "type": "string" - }, - "maxChargeableBytes": { - "description": "Output only. The maximum chargeable bytes for the backup.", - "format": "int64", - "readOnly": true, - "type": "string" - }, - "name": { - "description": "Output only. The resource name of the backup. Format: projects/{project}/backups/{backup}.", - "readOnly": true, - "type": "string" - }, - "satisfiesPzi": { - "description": "Output only. This status indicates whether the backup satisfies PZI. The status is reserved for future use.", - "readOnly": true, - "type": "boolean" - }, - "satisfiesPzs": { - "description": "Output only. This status indicates whether the backup satisfies PZS. The status is reserved for future use.", - "readOnly": true, - "type": "boolean" - }, - "selfLink": { - "description": "Output only. The URI of this resource.", - "readOnly": true, - "type": "string" - }, - "state": { - "description": "Output only. The status of this backup.", - "enum": [ - "SQL_BACKUP_STATE_UNSPECIFIED", - "ENQUEUED", - "RUNNING", - "FAILED", - "SUCCESSFUL", - "DELETING", - "DELETION_FAILED" - ], - "enumDescriptions": [ - "The state of the backup is unknown.", - "The backup that's added to a queue.", - "The backup is in progress.", - "The backup failed.", - "The backup is successful.", - "The backup is being deleted.", - "Deletion of the backup failed." - ], - "readOnly": true, - "type": "string" - }, - "timeZone": { - "description": "Output only. This output contains a backup time zone. If a Cloud SQL for SQL Server instance has a different time zone from the backup's time zone, then the restore to the instance doesn't happen.", - "readOnly": true, - "type": "string" - }, - "ttlDays": { - "description": "Input only. The time-to-live (TTL) interval for this resource (in days). For example: ttlDays:7, means 7 days from the current time. The expiration time can't exceed 365 days from the time that the backup is created.", - "format": "int64", - "type": "string" - }, - "type": { - "description": "Output only. The type of this backup. The type can be \"AUTOMATED\", \"ON_DEMAND\" or “FINAL”.", - "enum": [ - "SQL_BACKUP_TYPE_UNSPECIFIED", - "AUTOMATED", - "ON_DEMAND", - "FINAL" - ], - "enumDescriptions": [ - "This is an unknown backup type.", - "The backup schedule triggers a backup automatically.", - "The user triggers a backup manually.", - "The backup created when instance is deleted." - ], - "readOnly": true, - "type": "string" - } - }, - "type": "object" - }, - "BackupConfiguration": { - "description": "Database instance backup configuration.", - "id": "BackupConfiguration", - "properties": { - "backupRetentionSettings": { - "$ref": "BackupRetentionSettings", - "description": "Backup retention settings." - }, - "backupTier": { - "description": "Output only. Backup tier that manages the backups for the instance.", - "enum": [ - "BACKUP_TIER_UNSPECIFIED", - "STANDARD", - "ADVANCED", - "ENHANCED" - ], - "enumDeprecated": [ - false, - false, - true, - false - ], - "enumDescriptions": [ - "Unspecified.", - "Instance is managed by Cloud SQL.", - "Deprecated: ADVANCED is deprecated. Please use ENHANCED instead.", - "Instance is managed by Google Cloud Backup and DR Service." - ], - "readOnly": true, - "type": "string" - }, - "binaryLogEnabled": { - "description": "(MySQL only) Whether binary log is enabled. If backup configuration is disabled, binarylog must be disabled as well.", - "type": "boolean" - }, - "enabled": { - "description": "Whether this configuration is enabled.", - "type": "boolean" - }, - "kind": { - "description": "This is always `sql#backupConfiguration`.", - "type": "string" - }, - "location": { - "description": "Location of the backup", - "type": "string" - }, - "pointInTimeRecoveryEnabled": { - "description": "Whether point in time recovery is enabled.", - "type": "boolean" - }, - "replicationLogArchivingEnabled": { - "description": "Reserved for future use.", - "type": "boolean" - }, - "startTime": { - "description": "Start time for the daily backup configuration in UTC timezone in the 24 hour format - `HH:MM`.", - "type": "string" - }, - "transactionLogRetentionDays": { - "description": "The number of days of transaction logs we retain for point in time restore, from 1-7.", - "format": "int32", - "type": "integer" - }, - "transactionalLogStorageState": { - "description": "Output only. This value contains the storage location of transactional logs used to perform point-in-time recovery (PITR) for the database.", - "enum": [ - "TRANSACTIONAL_LOG_STORAGE_STATE_UNSPECIFIED", - "DISK", - "SWITCHING_TO_CLOUD_STORAGE", - "SWITCHED_TO_CLOUD_STORAGE", - "CLOUD_STORAGE" - ], - "enumDescriptions": [ - "Unspecified.", - "The transaction logs used for PITR for the instance are stored on a data disk.", - "The transaction logs used for PITR for the instance are switching from being stored on a data disk to being stored in Cloud Storage. Only applicable to MySQL.", - "The transaction logs used for PITR for the instance are now stored in Cloud Storage. Previously, they were stored on a data disk. Only applicable to MySQL.", - "The transaction logs used for PITR for the instance are stored in Cloud Storage. Only applicable to MySQL and PostgreSQL." - ], - "readOnly": true, - "type": "string" - } - }, - "type": "object" - }, - "BackupContext": { - "description": "Backup context.", - "id": "BackupContext", - "properties": { - "backupId": { - "description": "The identifier of the backup.", - "format": "int64", - "type": "string" - }, - "kind": { - "description": "This is always `sql#backupContext`.", - "type": "string" - }, - "name": { - "description": "The name of the backup. Format: projects/{project}/backups/{backup}", - "type": "string" - } - }, - "type": "object" - }, - "BackupReencryptionConfig": { - "description": "Backup Reencryption Config", - "id": "BackupReencryptionConfig", - "properties": { - "backupLimit": { - "description": "Backup re-encryption limit", - "format": "int32", - "type": "integer" - }, - "backupType": { - "description": "Type of backups users want to re-encrypt.", - "enum": [ - "BACKUP_TYPE_UNSPECIFIED", - "AUTOMATED", - "ON_DEMAND" - ], - "enumDescriptions": [ - "Unknown backup type, will be defaulted to AUTOMATIC backup type", - "Reencrypt automatic backups", - "Reencrypt on-demand backups" - ], - "type": "string" - } - }, - "type": "object" - }, - "BackupRetentionSettings": { - "description": "We currently only support backup retention by specifying the number of backups we will retain.", - "id": "BackupRetentionSettings", - "properties": { - "retainedBackups": { - "description": "Depending on the value of retention_unit, this is used to determine if a backup needs to be deleted. If retention_unit is 'COUNT', we will retain this many backups.", - "format": "int32", - "type": "integer" - }, - "retentionUnit": { - "description": "The unit that 'retained_backups' represents.", - "enum": [ - "RETENTION_UNIT_UNSPECIFIED", - "COUNT" - ], - "enumDescriptions": [ - "Backup retention unit is unspecified, will be treated as COUNT.", - "Retention will be by count, eg. \"retain the most recent 7 backups\"." - ], - "type": "string" - } - }, - "type": "object" - }, - "BackupRun": { - "description": "A BackupRun resource.", - "id": "BackupRun", - "properties": { - "backupKind": { - "description": "Specifies the kind of backup, PHYSICAL or DEFAULT_SNAPSHOT.", - "enum": [ - "SQL_BACKUP_KIND_UNSPECIFIED", - "SNAPSHOT", - "PHYSICAL" - ], - "enumDescriptions": [ - "This is an unknown BackupKind.", - "Snapshot-based backups.", - "Physical backups." - ], - "type": "string" - }, - "databaseVersion": { - "description": "Output only. The instance database version at the time this backup was made.", - "enum": [ - "SQL_DATABASE_VERSION_UNSPECIFIED", - "MYSQL_5_1", - "MYSQL_5_5", - "MYSQL_5_6", - "MYSQL_5_7", - "MYSQL_8_0", - "MYSQL_8_0_18", - "MYSQL_8_0_26", - "MYSQL_8_0_27", - "MYSQL_8_0_28", - "MYSQL_8_0_29", - "MYSQL_8_0_30", - "MYSQL_8_0_31", - "MYSQL_8_0_32", - "MYSQL_8_0_33", - "MYSQL_8_0_34", - "MYSQL_8_0_35", - "MYSQL_8_0_36", - "MYSQL_8_0_37", - "MYSQL_8_0_39", - "MYSQL_8_0_40", - "MYSQL_8_0_41", - "MYSQL_8_0_42", - "MYSQL_8_0_43", - "MYSQL_8_0_44", - "MYSQL_8_0_45", - "MYSQL_8_0_46", - "MYSQL_8_4", - "MYSQL_9_7", - "SQLSERVER_2017_STANDARD", - "SQLSERVER_2017_ENTERPRISE", - "SQLSERVER_2017_EXPRESS", - "SQLSERVER_2017_WEB", - "POSTGRES_9_6", - "POSTGRES_10", - "POSTGRES_11", - "POSTGRES_12", - "POSTGRES_13", - "POSTGRES_14", - "POSTGRES_15", - "POSTGRES_16", - "POSTGRES_17", - "POSTGRES_18", - "SQLSERVER_2019_STANDARD", - "SQLSERVER_2019_ENTERPRISE", - "SQLSERVER_2019_EXPRESS", - "SQLSERVER_2019_WEB", - "SQLSERVER_2022_STANDARD", - "SQLSERVER_2022_ENTERPRISE", - "SQLSERVER_2022_EXPRESS", - "SQLSERVER_2022_WEB", - "SQLSERVER_2025_STANDARD", - "SQLSERVER_2025_ENTERPRISE", - "SQLSERVER_2025_EXPRESS" - ], - "enumDeprecated": [ - false, - true, - true, - false, - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "This is an unknown database version.", - "The database version is MySQL 5.1.", - "The database version is MySQL 5.5.", - "The database version is MySQL 5.6.", - "The database version is MySQL 5.7.", - "The database version is MySQL 8.", - "The database major version is MySQL 8.0 and the minor version is 18.", - "The database major version is MySQL 8.0 and the minor version is 26.", - "The database major version is MySQL 8.0 and the minor version is 27.", - "The database major version is MySQL 8.0 and the minor version is 28.", - "The database major version is MySQL 8.0 and the minor version is 29.", - "The database major version is MySQL 8.0 and the minor version is 30.", - "The database major version is MySQL 8.0 and the minor version is 31.", - "The database major version is MySQL 8.0 and the minor version is 32.", - "The database major version is MySQL 8.0 and the minor version is 33.", - "The database major version is MySQL 8.0 and the minor version is 34.", - "The database major version is MySQL 8.0 and the minor version is 35.", - "The database major version is MySQL 8.0 and the minor version is 36.", - "The database major version is MySQL 8.0 and the minor version is 37.", - "The database major version is MySQL 8.0 and the minor version is 39.", - "The database major version is MySQL 8.0 and the minor version is 40.", - "The database major version is MySQL 8.0 and the minor version is 41.", - "The database major version is MySQL 8.0 and the minor version is 42.", - "The database major version is MySQL 8.0 and the minor version is 43.", - "The database major version is MySQL 8.0 and the minor version is 44.", - "The database major version is MySQL 8.0 and the minor version is 45.", - "The database major version is MySQL 8.0 and the minor version is 46.", - "The database version is MySQL 8.4.", - "The database version is MySQL 9.7.", - "The database version is SQL Server 2017 Standard.", - "The database version is SQL Server 2017 Enterprise.", - "The database version is SQL Server 2017 Express.", - "The database version is SQL Server 2017 Web.", - "The database version is PostgreSQL 9.6.", - "The database version is PostgreSQL 10.", - "The database version is PostgreSQL 11.", - "The database version is PostgreSQL 12.", - "The database version is PostgreSQL 13.", - "The database version is PostgreSQL 14.", - "The database version is PostgreSQL 15.", - "The database version is PostgreSQL 16.", - "The database version is PostgreSQL 17.", - "The database version is PostgreSQL 18.", - "The database version is SQL Server 2019 Standard.", - "The database version is SQL Server 2019 Enterprise.", - "The database version is SQL Server 2019 Express.", - "The database version is SQL Server 2019 Web.", - "The database version is SQL Server 2022 Standard.", - "The database version is SQL Server 2022 Enterprise.", - "The database version is SQL Server 2022 Express.", - "The database version is SQL Server 2022 Web.", - "The database version is SQL Server 2025 Standard.", - "The database version is SQL Server 2025 Enterprise.", - "The database version is SQL Server 2025 Express." - ], - "readOnly": true, - "type": "string" - }, - "description": { - "description": "The description of this run, only applicable to on-demand backups.", - "type": "string" - }, - "diskEncryptionConfiguration": { - "$ref": "DiskEncryptionConfiguration", - "description": "Encryption configuration specific to a backup." - }, - "diskEncryptionStatus": { - "$ref": "DiskEncryptionStatus", - "description": "Encryption status specific to a backup." - }, - "endTime": { - "description": "The time the backup operation completed in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`.", - "format": "google-datetime", - "type": "string" - }, - "enqueuedTime": { - "description": "The time the run was enqueued in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`.", - "format": "google-datetime", - "type": "string" - }, - "error": { - "$ref": "OperationError", - "description": "Information about why the backup operation failed. This is only present if the run has the FAILED status." - }, - "id": { - "description": "The identifier for this backup run. Unique only for a specific Cloud SQL instance.", - "format": "int64", - "type": "string" - }, - "instance": { - "description": "Name of the database instance.", - "type": "string" - }, - "kind": { - "description": "This is always `sql#backupRun`.", - "type": "string" - }, - "location": { - "description": "Location of the backups.", - "type": "string" - }, - "maxChargeableBytes": { - "description": "Output only. The maximum chargeable bytes for the backup.", - "format": "int64", - "readOnly": true, - "type": "string" - }, - "selfLink": { - "description": "The URI of this resource.", - "type": "string" - }, - "startTime": { - "description": "The time the backup operation actually started in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`.", - "format": "google-datetime", - "type": "string" - }, - "status": { - "description": "The status of this run.", - "enum": [ - "SQL_BACKUP_RUN_STATUS_UNSPECIFIED", - "ENQUEUED", - "OVERDUE", - "RUNNING", - "FAILED", - "SUCCESSFUL", - "SKIPPED", - "DELETION_PENDING", - "DELETION_FAILED", - "DELETED" - ], - "enumDescriptions": [ - "The status of the run is unknown.", - "The backup operation was enqueued.", - "The backup is overdue across a given backup window. Indicates a problem. Example: Long-running operation in progress during the whole window.", - "The backup is in progress.", - "The backup failed.", - "The backup was successful.", - "The backup was skipped (without problems) for a given backup window. Example: Instance was idle.", - "The backup is about to be deleted.", - "The backup deletion failed.", - "The backup has been deleted." - ], - "type": "string" - }, - "timeZone": { - "description": "Backup time zone to prevent restores to an instance with a different time zone. Now relevant only for SQL Server.", - "type": "string" - }, - "type": { - "description": "The type of this run; can be either \"AUTOMATED\" or \"ON_DEMAND\" or \"FINAL\". This field defaults to \"ON_DEMAND\" and is ignored, when specified for insert requests.", - "enum": [ - "SQL_BACKUP_RUN_TYPE_UNSPECIFIED", - "AUTOMATED", - "ON_DEMAND" - ], - "enumDescriptions": [ - "This is an unknown BackupRun type.", - "The backup schedule automatically triggers a backup.", - "The user manually triggers a backup." - ], - "type": "string" - }, - "windowStartTime": { - "description": "The start time of the backup window during which this the backup was attempted in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`.", - "format": "google-datetime", - "type": "string" - } - }, - "type": "object" - }, - "BackupRunsListResponse": { - "description": "Backup run list results.", - "id": "BackupRunsListResponse", - "properties": { - "items": { - "description": "A list of backup runs in reverse chronological order of the enqueued time.", - "items": { - "$ref": "BackupRun" - }, - "type": "array" - }, - "kind": { - "description": "This is always `sql#backupRunsList`.", - "type": "string" - }, - "nextPageToken": { - "description": "The continuation token, used to page through large result sets. Provide this value in a subsequent request to return the next page of results.", - "type": "string" - } - }, - "type": "object" - }, - "BinLogCoordinates": { - "description": "Binary log coordinates.", - "id": "BinLogCoordinates", - "properties": { - "binLogFileName": { - "description": "Name of the binary log file for a Cloud SQL instance.", - "type": "string" - }, - "binLogPosition": { - "description": "Position (offset) within the binary log file.", - "format": "int64", - "type": "string" - }, - "kind": { - "description": "This is always `sql#binLogCoordinates`.", - "type": "string" - } - }, - "type": "object" - }, - "CloneContext": { - "description": "Database instance clone context.", - "id": "CloneContext", - "properties": { - "allocatedIpRange": { - "description": "The name of the allocated ip range for the private ip Cloud SQL instance. For example: \"google-managed-services-default\". If set, the cloned instance ip will be created in the allocated range. The range name must comply with [RFC 1035](https://tools.ietf.org/html/rfc1035). Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])?. Reserved for future use.", - "type": "string" - }, - "binLogCoordinates": { - "$ref": "BinLogCoordinates", - "description": "Binary log coordinates, if specified, identify the position up to which the source instance is cloned. If not specified, the source instance is cloned up to the most recent binary log coordinates." - }, - "databaseNames": { - "description": "(SQL Server only) Clone only the specified databases from the source instance. Clone all databases if empty.", - "items": { - "type": "string" - }, - "type": "array" - }, - "destinationInstanceName": { - "description": "Required. Name of the Cloud SQL instance to be created as a clone.", - "type": "string" - }, - "destinationNetwork": { - "description": "Optional. The fully qualified URI of the VPC network to which the cloned instance will be connected via Private Services Access for private IP. For example:`projects/my-network-project/global/networks/my-network`. This field is only required for cross-project cloning.", - "type": "string" - }, - "destinationProject": { - "description": "Optional. The project ID of the destination project where the cloned instance will be created. To perform a cross-project clone, this field is required. If not specified, the clone is created in the same project as the source instance.", - "type": "string" - }, - "kind": { - "description": "This is always `sql#cloneContext`.", - "type": "string" - }, - "pitrTimestampMs": { - "description": "Reserved for future use.", - "format": "int64", - "type": "string" - }, - "pointInTime": { - "description": "Timestamp, if specified, identifies the time to which the source instance is cloned.", - "format": "google-datetime", - "type": "string" - }, - "preferredSecondaryZone": { - "description": "Optional. Copy clone and point-in-time recovery clone of a regional instance in the specified zones. If not specified, clone to the same secondary zone as the source instance. This value cannot be the same as the preferred_zone field. This field applies to all DB types.", - "type": "string" - }, - "preferredZone": { - "description": "Optional. Copy clone and point-in-time recovery clone of an instance to the specified zone. If no zone is specified, clone to the same primary zone as the source instance. This field applies to all DB types.", - "type": "string" - }, - "sourceInstanceDeletionTime": { - "description": "The timestamp used to identify the time when the source instance is deleted. If this instance is deleted, then you must set the timestamp.", - "format": "google-datetime", - "type": "string" - } - }, - "type": "object" - }, - "Column": { - "description": "Contains the name and datatype of a column.", - "id": "Column", - "properties": { - "name": { - "description": "Name of the column.", - "type": "string" - }, - "type": { - "description": "Datatype of the column.", - "type": "string" - } - }, - "type": "object" - }, - "ConnectPoolNodeConfig": { - "description": "Details of a single read pool node of a read pool.", - "id": "ConnectPoolNodeConfig", - "properties": { - "dnsName": { - "description": "Output only. The DNS name of the read pool node.", - "readOnly": true, - "type": "string" - }, - "dnsNames": { - "description": "Output only. The list of DNS names used by this read pool node.", - "items": { - "$ref": "DnsNameMapping" - }, - "readOnly": true, - "type": "array" - }, - "ipAddresses": { - "description": "Output only. Mappings containing IP addresses that can be used to connect to the read pool node.", - "items": { - "$ref": "IpMapping" - }, - "readOnly": true, - "type": "array" - }, - "name": { - "description": "Output only. The name of the read pool node. Doesn't include the project ID.", - "readOnly": true, - "type": "string" - } - }, - "type": "object" - }, - "ConnectSettings": { - "description": "Connect settings retrieval response.", - "id": "ConnectSettings", - "properties": { - "backendType": { - "description": "`SECOND_GEN`: Cloud SQL database instance. `EXTERNAL`: A database server that is not managed by Google. This property is read-only; use the `tier` property in the `settings` object to determine the database type.", - "enum": [ - "SQL_BACKEND_TYPE_UNSPECIFIED", - "FIRST_GEN", - "SECOND_GEN", - "EXTERNAL" - ], - "enumDeprecated": [ - false, - true, - false, - false - ], - "enumDescriptions": [ - "This is an unknown backend type for instance.", - "V1 speckle instance.", - "V2 speckle instance.", - "On premises instance." - ], - "type": "string" - }, - "customSubjectAlternativeNames": { - "description": "Custom subject alternative names for the server certificate.", - "items": { - "type": "string" - }, - "type": "array" - }, - "databaseVersion": { - "description": "The database engine type and version. The `databaseVersion` field cannot be changed after instance creation. MySQL instances: `MYSQL_8_0`, `MYSQL_5_7` (default), or `MYSQL_5_6`. PostgreSQL instances: `POSTGRES_9_6`, `POSTGRES_10`, `POSTGRES_11`, `POSTGRES_12` (default), `POSTGRES_13`, or `POSTGRES_14`. SQL Server instances: `SQLSERVER_2017_STANDARD` (default), `SQLSERVER_2017_ENTERPRISE`, `SQLSERVER_2017_EXPRESS`, `SQLSERVER_2017_WEB`, `SQLSERVER_2019_STANDARD`, `SQLSERVER_2019_ENTERPRISE`, `SQLSERVER_2019_EXPRESS`, or `SQLSERVER_2019_WEB`.", - "enum": [ - "SQL_DATABASE_VERSION_UNSPECIFIED", - "MYSQL_5_1", - "MYSQL_5_5", - "MYSQL_5_6", - "MYSQL_5_7", - "MYSQL_8_0", - "MYSQL_8_0_18", - "MYSQL_8_0_26", - "MYSQL_8_0_27", - "MYSQL_8_0_28", - "MYSQL_8_0_29", - "MYSQL_8_0_30", - "MYSQL_8_0_31", - "MYSQL_8_0_32", - "MYSQL_8_0_33", - "MYSQL_8_0_34", - "MYSQL_8_0_35", - "MYSQL_8_0_36", - "MYSQL_8_0_37", - "MYSQL_8_0_39", - "MYSQL_8_0_40", - "MYSQL_8_0_41", - "MYSQL_8_0_42", - "MYSQL_8_0_43", - "MYSQL_8_0_44", - "MYSQL_8_0_45", - "MYSQL_8_0_46", - "MYSQL_8_4", - "MYSQL_9_7", - "SQLSERVER_2017_STANDARD", - "SQLSERVER_2017_ENTERPRISE", - "SQLSERVER_2017_EXPRESS", - "SQLSERVER_2017_WEB", - "POSTGRES_9_6", - "POSTGRES_10", - "POSTGRES_11", - "POSTGRES_12", - "POSTGRES_13", - "POSTGRES_14", - "POSTGRES_15", - "POSTGRES_16", - "POSTGRES_17", - "POSTGRES_18", - "SQLSERVER_2019_STANDARD", - "SQLSERVER_2019_ENTERPRISE", - "SQLSERVER_2019_EXPRESS", - "SQLSERVER_2019_WEB", - "SQLSERVER_2022_STANDARD", - "SQLSERVER_2022_ENTERPRISE", - "SQLSERVER_2022_EXPRESS", - "SQLSERVER_2022_WEB", - "SQLSERVER_2025_STANDARD", - "SQLSERVER_2025_ENTERPRISE", - "SQLSERVER_2025_EXPRESS" - ], - "enumDeprecated": [ - false, - true, - true, - false, - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "This is an unknown database version.", - "The database version is MySQL 5.1.", - "The database version is MySQL 5.5.", - "The database version is MySQL 5.6.", - "The database version is MySQL 5.7.", - "The database version is MySQL 8.", - "The database major version is MySQL 8.0 and the minor version is 18.", - "The database major version is MySQL 8.0 and the minor version is 26.", - "The database major version is MySQL 8.0 and the minor version is 27.", - "The database major version is MySQL 8.0 and the minor version is 28.", - "The database major version is MySQL 8.0 and the minor version is 29.", - "The database major version is MySQL 8.0 and the minor version is 30.", - "The database major version is MySQL 8.0 and the minor version is 31.", - "The database major version is MySQL 8.0 and the minor version is 32.", - "The database major version is MySQL 8.0 and the minor version is 33.", - "The database major version is MySQL 8.0 and the minor version is 34.", - "The database major version is MySQL 8.0 and the minor version is 35.", - "The database major version is MySQL 8.0 and the minor version is 36.", - "The database major version is MySQL 8.0 and the minor version is 37.", - "The database major version is MySQL 8.0 and the minor version is 39.", - "The database major version is MySQL 8.0 and the minor version is 40.", - "The database major version is MySQL 8.0 and the minor version is 41.", - "The database major version is MySQL 8.0 and the minor version is 42.", - "The database major version is MySQL 8.0 and the minor version is 43.", - "The database major version is MySQL 8.0 and the minor version is 44.", - "The database major version is MySQL 8.0 and the minor version is 45.", - "The database major version is MySQL 8.0 and the minor version is 46.", - "The database version is MySQL 8.4.", - "The database version is MySQL 9.7.", - "The database version is SQL Server 2017 Standard.", - "The database version is SQL Server 2017 Enterprise.", - "The database version is SQL Server 2017 Express.", - "The database version is SQL Server 2017 Web.", - "The database version is PostgreSQL 9.6.", - "The database version is PostgreSQL 10.", - "The database version is PostgreSQL 11.", - "The database version is PostgreSQL 12.", - "The database version is PostgreSQL 13.", - "The database version is PostgreSQL 14.", - "The database version is PostgreSQL 15.", - "The database version is PostgreSQL 16.", - "The database version is PostgreSQL 17.", - "The database version is PostgreSQL 18.", - "The database version is SQL Server 2019 Standard.", - "The database version is SQL Server 2019 Enterprise.", - "The database version is SQL Server 2019 Express.", - "The database version is SQL Server 2019 Web.", - "The database version is SQL Server 2022 Standard.", - "The database version is SQL Server 2022 Enterprise.", - "The database version is SQL Server 2022 Express.", - "The database version is SQL Server 2022 Web.", - "The database version is SQL Server 2025 Standard.", - "The database version is SQL Server 2025 Enterprise.", - "The database version is SQL Server 2025 Express." - ], - "type": "string" - }, - "dnsName": { - "description": "The dns name of the instance.", - "type": "string" - }, - "dnsNames": { - "description": "Output only. The list of DNS names used by this instance.", - "items": { - "$ref": "DnsNameMapping" - }, - "readOnly": true, - "type": "array" - }, - "ipAddresses": { - "description": "The assigned IP addresses for the instance.", - "items": { - "$ref": "IpMapping" - }, - "type": "array" - }, - "kind": { - "description": "This is always `sql#connectSettings`.", - "type": "string" - }, - "mdxProtocolSupport": { - "description": "Optional. Output only. mdx_protocol_support controls how the client uses metadata exchange when connecting to the instance. The values in the list representing parts of the MDX protocol that are supported by this instance. When the list is empty, the instance does not support MDX, so the client must not send an MDX request. The default is empty.", - "items": { - "enum": [ - "MDX_PROTOCOL_SUPPORT_UNSPECIFIED", - "CLIENT_PROTOCOL_TYPE" - ], - "enumDescriptions": [ - "Not specified.", - "Client should send the client protocol type in the MDX request." - ], - "type": "string" - }, - "readOnly": true, - "type": "array" - }, - "nodeCount": { - "description": "The number of read pool nodes in a read pool.", - "format": "int32", - "type": "integer" - }, - "nodes": { - "description": "Output only. Entries containing information about each read pool node of the read pool.", - "items": { - "$ref": "ConnectPoolNodeConfig" - }, - "readOnly": true, - "type": "array" - }, - "pscEnabled": { - "description": "Whether PSC connectivity is enabled for this instance.", - "type": "boolean" - }, - "region": { - "description": "The cloud region for the instance. For example, `us-central1`, `europe-west1`. The region cannot be changed after instance creation.", - "type": "string" - }, - "serverCaCert": { - "$ref": "SslCert", - "description": "SSL configuration." - }, - "serverCaMode": { - "description": "Specify what type of CA is used for the server certificate.", - "enum": [ - "CA_MODE_UNSPECIFIED", - "GOOGLE_MANAGED_INTERNAL_CA", - "GOOGLE_MANAGED_CAS_CA", - "CUSTOMER_MANAGED_CAS_CA" - ], - "enumDescriptions": [ - "CA mode is unknown.", - "Google-managed self-signed internal CA.", - "Google-managed regional CA part of root CA hierarchy hosted on Google Cloud's Certificate Authority Service (CAS).", - "Customer-managed CA hosted on Google Cloud's Certificate Authority Service (CAS)." - ], - "type": "string" - } - }, - "type": "object" - }, - "ConnectionPoolConfig": { - "description": "The managed connection pooling configuration.", - "id": "ConnectionPoolConfig", - "properties": { - "connectionPoolingEnabled": { - "description": "Whether managed connection pooling is enabled.", - "type": "boolean" - }, - "flags": { - "description": "Optional. List of connection pool configuration flags.", - "items": { - "$ref": "ConnectionPoolFlags" - }, - "type": "array" - }, - "poolerCount": { - "description": "Output only. Number of connection poolers.", - "format": "int32", - "readOnly": true, - "type": "integer" - } - }, - "type": "object" - }, - "ConnectionPoolFlags": { - "description": "Connection pool flags for Cloud SQL instances managed connection pool configuration.", - "id": "ConnectionPoolFlags", - "properties": { - "name": { - "description": "Required. The name of the flag.", - "type": "string" - }, - "value": { - "description": "Required. The value of the flag. Boolean flags are set to `on` for true and `off` for false. This field must be omitted if the flag doesn't take a value.", - "type": "string" - } - }, - "type": "object" - }, - "DataCacheConfig": { - "description": "Data cache configurations.", - "id": "DataCacheConfig", - "properties": { - "dataCacheEnabled": { - "description": "Whether data cache is enabled for the instance.", - "type": "boolean" - } - }, - "type": "object" - }, - "Database": { - "description": "Represents a SQL database on the Cloud SQL instance.", - "id": "Database", - "properties": { - "charset": { - "description": "The Cloud SQL charset value.", - "type": "string" - }, - "collation": { - "description": "The Cloud SQL collation value.", - "type": "string" - }, - "etag": { - "description": "This field is deprecated and will be removed from a future version of the API.", - "type": "string" - }, - "instance": { - "description": "The name of the Cloud SQL instance. This does not include the project ID.", - "type": "string" - }, - "kind": { - "description": "This is always `sql#database`.", - "type": "string" - }, - "name": { - "description": "The name of the database in the Cloud SQL instance. This does not include the project ID or instance name.", - "type": "string" - }, - "project": { - "description": "The project ID of the project containing the Cloud SQL database. The Google apps domain is prefixed if applicable.", - "type": "string" - }, - "selfLink": { - "description": "The URI of this resource.", - "type": "string" - }, - "sqlserverDatabaseDetails": { - "$ref": "SqlServerDatabaseDetails" - } - }, - "type": "object" - }, - "DatabaseFlags": { - "description": "Database flags for Cloud SQL instances.", - "id": "DatabaseFlags", - "properties": { - "name": { - "description": "The name of the flag. These flags are passed at instance startup, so include both server options and system variables. Flags are specified with underscores, not hyphens. For more information, see [Configuring Database Flags](https://cloud.google.com/sql/docs/mysql/flags) in the Cloud SQL documentation.", - "type": "string" - }, - "value": { - "description": "The value of the flag. Boolean flags are set to `on` for true and `off` for false. This field must be omitted if the flag doesn't take a value.", - "type": "string" - } - }, - "type": "object" - }, - "DatabaseInstance": { - "description": "A Cloud SQL instance resource.", - "id": "DatabaseInstance", - "properties": { - "availableMaintenanceVersions": { - "description": "Output only. List all maintenance versions applicable on the instance", - "items": { - "type": "string" - }, - "readOnly": true, - "type": "array" - }, - "backendType": { - "description": "The backend type. `SECOND_GEN`: Cloud SQL database instance. `EXTERNAL`: A database server that is not managed by Google. This property is read-only; use the `tier` property in the `settings` object to determine the database type.", - "enum": [ - "SQL_BACKEND_TYPE_UNSPECIFIED", - "FIRST_GEN", - "SECOND_GEN", - "EXTERNAL" - ], - "enumDeprecated": [ - false, - true, - false, - false - ], - "enumDescriptions": [ - "This is an unknown backend type for instance.", - "V1 speckle instance.", - "V2 speckle instance.", - "On premises instance." - ], - "type": "string" - }, - "connectionName": { - "description": "Connection name of the Cloud SQL instance used in connection strings.", - "type": "string" - }, - "createTime": { - "description": "Output only. The time when the instance was created in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`.", - "format": "google-datetime", - "readOnly": true, - "type": "string" - }, - "currentDiskSize": { - "deprecated": true, - "description": "The current disk usage of the instance in bytes. This property has been deprecated. Use the \"cloudsql.googleapis.com/database/disk/bytes_used\" metric in Cloud Monitoring API instead. Please see [this announcement](https://groups.google.com/d/msg/google-cloud-sql-announce/I_7-F9EBhT0/BtvFtdFeAgAJ) for details.", - "format": "int64", - "type": "string" - }, - "databaseInstalledVersion": { - "description": "Output only. Stores the current database version running on the instance including minor version such as `MYSQL_8_0_18`.", - "readOnly": true, - "type": "string" - }, - "databaseVersion": { - "description": "The database engine type and version. The `databaseVersion` field cannot be changed after instance creation.", - "enum": [ - "SQL_DATABASE_VERSION_UNSPECIFIED", - "MYSQL_5_1", - "MYSQL_5_5", - "MYSQL_5_6", - "MYSQL_5_7", - "MYSQL_8_0", - "MYSQL_8_0_18", - "MYSQL_8_0_26", - "MYSQL_8_0_27", - "MYSQL_8_0_28", - "MYSQL_8_0_29", - "MYSQL_8_0_30", - "MYSQL_8_0_31", - "MYSQL_8_0_32", - "MYSQL_8_0_33", - "MYSQL_8_0_34", - "MYSQL_8_0_35", - "MYSQL_8_0_36", - "MYSQL_8_0_37", - "MYSQL_8_0_39", - "MYSQL_8_0_40", - "MYSQL_8_0_41", - "MYSQL_8_0_42", - "MYSQL_8_0_43", - "MYSQL_8_0_44", - "MYSQL_8_0_45", - "MYSQL_8_0_46", - "MYSQL_8_4", - "MYSQL_9_7", - "SQLSERVER_2017_STANDARD", - "SQLSERVER_2017_ENTERPRISE", - "SQLSERVER_2017_EXPRESS", - "SQLSERVER_2017_WEB", - "POSTGRES_9_6", - "POSTGRES_10", - "POSTGRES_11", - "POSTGRES_12", - "POSTGRES_13", - "POSTGRES_14", - "POSTGRES_15", - "POSTGRES_16", - "POSTGRES_17", - "POSTGRES_18", - "SQLSERVER_2019_STANDARD", - "SQLSERVER_2019_ENTERPRISE", - "SQLSERVER_2019_EXPRESS", - "SQLSERVER_2019_WEB", - "SQLSERVER_2022_STANDARD", - "SQLSERVER_2022_ENTERPRISE", - "SQLSERVER_2022_EXPRESS", - "SQLSERVER_2022_WEB", - "SQLSERVER_2025_STANDARD", - "SQLSERVER_2025_ENTERPRISE", - "SQLSERVER_2025_EXPRESS" - ], - "enumDeprecated": [ - false, - true, - true, - false, - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "This is an unknown database version.", - "The database version is MySQL 5.1.", - "The database version is MySQL 5.5.", - "The database version is MySQL 5.6.", - "The database version is MySQL 5.7.", - "The database version is MySQL 8.", - "The database major version is MySQL 8.0 and the minor version is 18.", - "The database major version is MySQL 8.0 and the minor version is 26.", - "The database major version is MySQL 8.0 and the minor version is 27.", - "The database major version is MySQL 8.0 and the minor version is 28.", - "The database major version is MySQL 8.0 and the minor version is 29.", - "The database major version is MySQL 8.0 and the minor version is 30.", - "The database major version is MySQL 8.0 and the minor version is 31.", - "The database major version is MySQL 8.0 and the minor version is 32.", - "The database major version is MySQL 8.0 and the minor version is 33.", - "The database major version is MySQL 8.0 and the minor version is 34.", - "The database major version is MySQL 8.0 and the minor version is 35.", - "The database major version is MySQL 8.0 and the minor version is 36.", - "The database major version is MySQL 8.0 and the minor version is 37.", - "The database major version is MySQL 8.0 and the minor version is 39.", - "The database major version is MySQL 8.0 and the minor version is 40.", - "The database major version is MySQL 8.0 and the minor version is 41.", - "The database major version is MySQL 8.0 and the minor version is 42.", - "The database major version is MySQL 8.0 and the minor version is 43.", - "The database major version is MySQL 8.0 and the minor version is 44.", - "The database major version is MySQL 8.0 and the minor version is 45.", - "The database major version is MySQL 8.0 and the minor version is 46.", - "The database version is MySQL 8.4.", - "The database version is MySQL 9.7.", - "The database version is SQL Server 2017 Standard.", - "The database version is SQL Server 2017 Enterprise.", - "The database version is SQL Server 2017 Express.", - "The database version is SQL Server 2017 Web.", - "The database version is PostgreSQL 9.6.", - "The database version is PostgreSQL 10.", - "The database version is PostgreSQL 11.", - "The database version is PostgreSQL 12.", - "The database version is PostgreSQL 13.", - "The database version is PostgreSQL 14.", - "The database version is PostgreSQL 15.", - "The database version is PostgreSQL 16.", - "The database version is PostgreSQL 17.", - "The database version is PostgreSQL 18.", - "The database version is SQL Server 2019 Standard.", - "The database version is SQL Server 2019 Enterprise.", - "The database version is SQL Server 2019 Express.", - "The database version is SQL Server 2019 Web.", - "The database version is SQL Server 2022 Standard.", - "The database version is SQL Server 2022 Enterprise.", - "The database version is SQL Server 2022 Express.", - "The database version is SQL Server 2022 Web.", - "The database version is SQL Server 2025 Standard.", - "The database version is SQL Server 2025 Enterprise.", - "The database version is SQL Server 2025 Express." - ], - "type": "string" - }, - "diskEncryptionConfiguration": { - "$ref": "DiskEncryptionConfiguration", - "description": "Disk encryption configuration specific to an instance." - }, - "diskEncryptionStatus": { - "$ref": "DiskEncryptionStatus", - "description": "Disk encryption status specific to an instance." - }, - "dnsName": { - "description": "Output only. The dns name of the instance.", - "readOnly": true, - "type": "string" - }, - "dnsNames": { - "description": "Output only. The list of DNS names used by this instance.", - "items": { - "$ref": "DnsNameMapping" - }, - "readOnly": true, - "type": "array" - }, - "etag": { - "description": "This field is deprecated and will be removed from a future version of the API. Use the `settings.settingsVersion` field instead.", - "type": "string" - }, - "failoverReplica": { - "description": "The name and status of the failover replica.", - "properties": { - "available": { - "description": "The availability status of the failover replica. A false status indicates that the failover replica is out of sync. The primary instance can only failover to the failover replica when the status is true.", - "type": "boolean" - }, - "name": { - "description": "The name of the failover replica. If specified at instance creation, a failover replica is created for the instance. The name doesn't include the project ID.", - "type": "string" - } - }, - "type": "object" - }, - "gceZone": { - "description": "The Compute Engine zone that the instance is currently serving from. This value could be different from the zone that was specified when the instance was created if the instance has failed over to its secondary zone. WARNING: Changing this might restart the instance.", - "type": "string" - }, - "geminiConfig": { - "$ref": "GeminiInstanceConfig", - "description": "Gemini instance configuration." - }, - "includeReplicasForMajorVersionUpgrade": { - "description": "Input only. Determines whether an in-place major version upgrade of replicas happens when an in-place major version upgrade of a primary instance is initiated.", - "type": "boolean" - }, - "instanceType": { - "description": "The instance type.", - "enum": [ - "SQL_INSTANCE_TYPE_UNSPECIFIED", - "CLOUD_SQL_INSTANCE", - "ON_PREMISES_INSTANCE", - "READ_REPLICA_INSTANCE", - "READ_POOL_INSTANCE" - ], - "enumDescriptions": [ - "This is an unknown Cloud SQL instance type.", - "A regular Cloud SQL instance that is not replicating from a primary instance.", - "An instance running on the customer's premises that is not managed by Cloud SQL.", - "A Cloud SQL instance acting as a read-replica.", - "A Cloud SQL read pool." - ], - "type": "string" - }, - "ipAddresses": { - "description": "The assigned IP addresses for the instance.", - "items": { - "$ref": "IpMapping" - }, - "type": "array" - }, - "ipv6Address": { - "deprecated": true, - "description": "The IPv6 address assigned to the instance. (Deprecated) This property was applicable only to First Generation instances.", - "type": "string" - }, - "kind": { - "description": "This is always `sql#instance`.", - "type": "string" - }, - "maintenanceVersion": { - "description": "The current software version on the instance.", - "type": "string" - }, - "masterInstanceName": { - "description": "The name of the instance which will act as primary in the replication setup.", - "type": "string" - }, - "maxDiskSize": { - "deprecated": true, - "description": "The maximum disk size of the instance in bytes.", - "format": "int64", - "type": "string" - }, - "name": { - "description": "Name of the Cloud SQL instance. This does not include the project ID.", - "type": "string" - }, - "nodeCount": { - "description": "The number of read pool nodes in a read pool.", - "format": "int32", - "type": "integer" - }, - "nodes": { - "description": "Output only. Entries containing information about each read pool node of the read pool.", - "items": { - "$ref": "PoolNodeConfig" - }, - "readOnly": true, - "type": "array" - }, - "onPremisesConfiguration": { - "$ref": "OnPremisesConfiguration", - "description": "Configuration specific to on-premises instances." - }, - "outOfDiskReport": { - "$ref": "SqlOutOfDiskReport", - "description": "This field represents the report generated by the proactive database wellness job for OutOfDisk issues. * Writers: * the proactive database wellness job for OOD. * Readers: * the proactive database wellness job" - }, - "primaryDnsName": { - "deprecated": true, - "description": "Output only. DEPRECATED: please use write_endpoint instead.", - "readOnly": true, - "type": "string" - }, - "project": { - "description": "The project ID of the project containing the Cloud SQL instance. The Google apps domain is prefixed if applicable.", - "type": "string" - }, - "pscServiceAttachmentLink": { - "description": "Output only. The link to service attachment of PSC instance.", - "readOnly": true, - "type": "string" - }, - "region": { - "description": "The geographical region of the Cloud SQL instance. It can be one of the [regions](https://cloud.google.com/sql/docs/mysql/locations#location-r) where Cloud SQL operates: For example, `asia-east1`, `europe-west1`, and `us-central1`. The default value is `us-central1`.", - "type": "string" - }, - "replicaConfiguration": { - "$ref": "ReplicaConfiguration", - "description": "Configuration specific to failover replicas and read replicas." - }, - "replicaNames": { - "description": "The replicas of the instance.", - "items": { - "type": "string" - }, - "type": "array" - }, - "replicationCluster": { - "$ref": "ReplicationCluster", - "description": "Optional. A primary instance and disaster recovery (DR) replica pair. A DR replica is a cross-region replica that you designate for failover in the event that the primary instance experiences regional failure. Applicable to MySQL and PostgreSQL." - }, - "rootPassword": { - "description": "Initial root password. Use only on creation. You must set root passwords before you can connect to PostgreSQL instances.", - "type": "string" - }, - "satisfiesPzi": { - "description": "Output only. This status indicates whether the instance satisfies PZI. The status is reserved for future use.", - "readOnly": true, - "type": "boolean" - }, - "satisfiesPzs": { - "description": "This status indicates whether the instance satisfies PZS. The status is reserved for future use.", - "type": "boolean" - }, - "scheduledMaintenance": { - "$ref": "SqlScheduledMaintenance", - "description": "The start time of any upcoming scheduled maintenance for this instance." - }, - "secondaryGceZone": { - "description": "The Compute Engine zone that the failover instance is currently serving from for a regional instance. This value could be different from the zone that was specified when the instance was created if the instance has failed over to its secondary/failover zone.", - "type": "string" - }, - "selfLink": { - "description": "The URI of this resource.", - "type": "string" - }, - "serverCaCert": { - "$ref": "SslCert", - "description": "SSL configuration." - }, - "serviceAccountEmailAddress": { - "description": "The service account email address assigned to the instance.\\This property is read-only.", - "type": "string" - }, - "settings": { - "$ref": "Settings", - "description": "The user settings." - }, - "sqlNetworkArchitecture": { - "enum": [ - "SQL_NETWORK_ARCHITECTURE_UNSPECIFIED", - "NEW_NETWORK_ARCHITECTURE", - "OLD_NETWORK_ARCHITECTURE" - ], - "enumDescriptions": [ - "", - "The instance uses the new network architecture.", - "The instance uses the old network architecture." - ], - "type": "string" - }, - "state": { - "description": "The current serving state of the Cloud SQL instance.", - "enum": [ - "SQL_INSTANCE_STATE_UNSPECIFIED", - "RUNNABLE", - "SUSPENDED", - "PENDING_DELETE", - "PENDING_CREATE", - "MAINTENANCE", - "FAILED", - "ONLINE_MAINTENANCE", - "REPAIRING" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - false, - true, - false - ], - "enumDescriptions": [ - "The state of the instance is unknown.", - "The instance is running, or has been stopped by owner.", - "The instance is not available, for example due to problems with billing.", - "The instance is being deleted.", - "The instance is being created.", - "The instance is down for maintenance.", - "The creation of the instance failed or a fatal error occurred during maintenance.", - "Deprecated", - "(Applicable to read pool nodes only.) The read pool node needs to be repaired. The database might be unavailable." - ], - "type": "string" - }, - "suspensionReason": { - "description": "If the instance state is SUSPENDED, the reason for the suspension.", - "items": { - "enum": [ - "SQL_SUSPENSION_REASON_UNSPECIFIED", - "BILLING_ISSUE", - "LEGAL_ISSUE", - "OPERATIONAL_ISSUE", - "KMS_KEY_ISSUE" - ], - "enumDescriptions": [ - "This is an unknown suspension reason.", - "The instance is suspended due to billing issues (for example:, account issue)", - "The instance is suspended due to illegal content (for example:, child pornography, copyrighted material, etc.).", - "The instance is causing operational issues (for example:, causing the database to crash).", - "The KMS key used by the instance is either revoked or denied access to" - ], - "type": "string" - }, - "type": "array" - }, - "switchTransactionLogsToCloudStorageEnabled": { - "description": "Input only. Whether Cloud SQL is enabled to switch storing point-in-time recovery log files from a data disk to Cloud Storage.", - "type": "boolean" - }, - "tags": { - "additionalProperties": { - "type": "string" - }, - "description": "Optional. Input only. Immutable. Tag keys and tag values that are bound to this instance. You must represent each item in the map as: `\"\" : \"\"`. For example, a single resource can have the following tags: ``` \"123/environment\": \"production\", \"123/costCenter\": \"marketing\", ``` For more information on tag creation and management, see https://cloud.google.com/resource-manager/docs/tags/tags-overview.", - "type": "object" - }, - "upgradableDatabaseVersions": { - "description": "Output only. All database versions that are available for upgrade.", - "items": { - "$ref": "AvailableDatabaseVersion" - }, - "readOnly": true, - "type": "array" - }, - "writeEndpoint": { - "description": "Output only. The dns name of the primary instance in a replication group.", - "readOnly": true, - "type": "string" - } - }, - "type": "object" - }, - "DatabasesListResponse": { - "description": "Database list response.", - "id": "DatabasesListResponse", - "properties": { - "items": { - "description": "List of database resources in the instance.", - "items": { - "$ref": "Database" - }, - "type": "array" - }, - "kind": { - "description": "This is always `sql#databasesList`.", - "type": "string" - } - }, - "type": "object" - }, - "DemoteContext": { - "description": "This context is used to demote an existing standalone instance to be a Cloud SQL read replica for an external database server.", - "id": "DemoteContext", - "properties": { - "kind": { - "description": "This is always `sql#demoteContext`.", - "type": "string" - }, - "sourceRepresentativeInstanceName": { - "description": "Required. The name of the instance which acts as the on-premises primary instance in the replication setup.", - "type": "string" - } - }, - "type": "object" - }, - "DemoteMasterConfiguration": { - "description": "Read-replica configuration for connecting to the on-premises primary instance.", - "id": "DemoteMasterConfiguration", - "properties": { - "kind": { - "description": "This is always `sql#demoteMasterConfiguration`.", - "type": "string" - }, - "mysqlReplicaConfiguration": { - "$ref": "DemoteMasterMySqlReplicaConfiguration", - "description": "MySQL specific configuration when replicating from a MySQL on-premises primary instance. Replication configuration information such as the username, password, certificates, and keys are not stored in the instance metadata. The configuration information is used only to set up the replication connection and is stored by MySQL in a file named `master.info` in the data directory." - } - }, - "type": "object" - }, - "DemoteMasterContext": { - "description": "Database instance demote primary instance context.", - "id": "DemoteMasterContext", - "properties": { - "kind": { - "description": "This is always `sql#demoteMasterContext`.", - "type": "string" - }, - "masterInstanceName": { - "description": "The name of the instance which will act as on-premises primary instance in the replication setup.", - "type": "string" - }, - "replicaConfiguration": { - "$ref": "DemoteMasterConfiguration", - "description": "Configuration specific to read-replicas replicating from the on-premises primary instance." - }, - "skipReplicationSetup": { - "description": "Flag to skip replication setup on the instance.", - "type": "boolean" - }, - "verifyGtidConsistency": { - "description": "Verify the GTID consistency for demote operation. Default value: `True`. Setting this flag to `false` enables you to bypass the GTID consistency check between on-premises primary instance and Cloud SQL instance during the demotion operation but also exposes you to the risk of future replication failures. Change the value only if you know the reason for the GTID divergence and are confident that doing so will not cause any replication issues.", - "type": "boolean" - } - }, - "type": "object" - }, - "DemoteMasterMySqlReplicaConfiguration": { - "description": "Read-replica configuration specific to MySQL databases.", - "id": "DemoteMasterMySqlReplicaConfiguration", - "properties": { - "caCertificate": { - "description": "PEM representation of the trusted CA's x509 certificate.", - "type": "string" - }, - "clientCertificate": { - "description": "PEM representation of the replica's x509 certificate.", - "type": "string" - }, - "clientKey": { - "description": "PEM representation of the replica's private key. The corresponding public key is encoded in the client's certificate. The format of the replica's private key can be either PKCS #1 or PKCS #8.", - "type": "string" - }, - "kind": { - "description": "This is always `sql#demoteMasterMysqlReplicaConfiguration`.", - "type": "string" - }, - "password": { - "description": "The password for the replication connection.", - "type": "string" - }, - "username": { - "description": "The username for the replication connection.", - "type": "string" - } - }, - "type": "object" - }, - "DenyMaintenancePeriod": { - "description": "Deny maintenance Periods. This specifies a date range during when all CSA rollout will be denied.", - "id": "DenyMaintenancePeriod", - "properties": { - "endDate": { - "description": "\"deny maintenance period\" end date. If the year of the end date is empty, the year of the start date also must be empty. In this case, it means the no maintenance interval recurs every year. The date is in format yyyy-mm-dd i.e., 2020-11-01, or mm-dd, i.e., 11-01", - "type": "string" - }, - "startDate": { - "description": "\"deny maintenance period\" start date. If the year of the start date is empty, the year of the end date also must be empty. In this case, it means the deny maintenance period recurs every year. The date is in format yyyy-mm-dd i.e., 2020-11-01, or mm-dd, i.e., 11-01", - "type": "string" - }, - "time": { - "description": "Time in UTC when the \"deny maintenance period\" starts on start_date and ends on end_date. The time is in format: HH:mm:SS, i.e., 00:00:00", - "type": "string" - } - }, - "type": "object" - }, - "DiskEncryptionConfiguration": { - "description": "Disk encryption configuration for an instance.", - "id": "DiskEncryptionConfiguration", - "properties": { - "kind": { - "description": "This is always `sql#diskEncryptionConfiguration`.", - "type": "string" - }, - "kmsKeyName": { - "description": "Resource name of KMS key for disk encryption", - "type": "string" - } - }, - "type": "object" - }, - "DiskEncryptionStatus": { - "description": "Disk encryption status for an instance.", - "id": "DiskEncryptionStatus", - "properties": { - "kind": { - "description": "This is always `sql#diskEncryptionStatus`.", - "type": "string" - }, - "kmsKeyVersionName": { - "description": "KMS key version used to encrypt the Cloud SQL instance resource", - "type": "string" - } - }, - "type": "object" - }, - "DnsNameMapping": { - "description": "DNS metadata.", - "id": "DnsNameMapping", - "properties": { - "connectionType": { - "description": "Output only. The connection type of the DNS name.", - "enum": [ - "CONNECTION_TYPE_UNSPECIFIED", - "PUBLIC", - "PRIVATE_SERVICES_ACCESS", - "PRIVATE_SERVICE_CONNECT" - ], - "enumDescriptions": [ - "Unknown connection type.", - "Public IP.", - "Private services access (private IP).", - "Private Service Connect." - ], - "readOnly": true, - "type": "string" - }, - "dnsScope": { - "description": "Output only. The scope that the DNS name applies to.", - "enum": [ - "DNS_SCOPE_UNSPECIFIED", - "INSTANCE", - "CLUSTER" - ], - "enumDescriptions": [ - "DNS scope not set. This value should not be used.", - "Indicates an instance-level DNS name.", - "Indicates a cluster-level DNS name." - ], - "readOnly": true, - "type": "string" - }, - "name": { - "description": "Output only. The DNS name.", - "readOnly": true, - "type": "string" - }, - "recordManager": { - "description": "Output only. The manager for this DNS record.", - "enum": [ - "RECORD_MANAGER_UNSPECIFIED", - "CUSTOMER", - "CLOUD_SQL_AUTOMATION" - ], - "enumDescriptions": [ - "Record manager not set. This value should not be used.", - "The record may be managed by the customer. It is not automatically managed by Cloud SQL automation.", - "The record is managed by Cloud SQL, which will create, update, and delete the DNS records for the zone automatically when the Cloud SQL database instance is created or updated." - ], - "readOnly": true, - "type": "string" - } - }, - "type": "object" - }, - "Empty": { - "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }", - "id": "Empty", - "properties": {}, - "type": "object" - }, - "ExecuteSqlPayload": { - "description": "The request payload used to execute SQL statements.", - "id": "ExecuteSqlPayload", - "properties": { - "application": { - "description": "Optional. Specifies the name of the application that is making the request. This field is used for telemetry. Only alphanumeric characters, dashes, and underscores are allowed. The maximum length is 32 characters.", - "type": "string" - }, - "autoIamAuthn": { - "description": "Optional. When set to `true`, the API caller identity associated with the request is used for database authentication. The API caller must be an IAM user in the database.", - "type": "boolean" - }, - "database": { - "description": "Optional. Name of the database on which the statement will be executed.", - "type": "string" - }, - "partialResultMode": { - "description": "Optional. Controls how the API should respond when the SQL execution result is incomplete due to the size limit or another error. The default mode is to throw an error.", - "enum": [ - "PARTIAL_RESULT_MODE_UNSPECIFIED", - "FAIL_PARTIAL_RESULT", - "ALLOW_PARTIAL_RESULT" - ], - "enumDescriptions": [ - "Unspecified mode, effectively the same as `FAIL_PARTIAL_RESULT`.", - "Throw an error if the result exceeds 10 MB or if only a partial result can be retrieved. Don't return the result.", - "Return a truncated result and set `partial_result` to true if the result exceeds 10 MB or if only a partial result can be retrieved due to error. Don't throw an error." - ], - "type": "string" - }, - "rowLimit": { - "description": "Optional. The maximum number of rows returned per SQL statement.", - "format": "int64", - "type": "string" - }, - "sqlStatement": { - "description": "Required. SQL statements to run on the database. It can be a single statement or a sequence of statements separated by semicolons.", - "type": "string" - }, - "user": { - "description": "Optional. The name of an existing database user to connect to the database. When `auto_iam_authn` is set to true, this field is ignored and the API caller's IAM user is used.", - "type": "string" - } - }, - "type": "object" - }, - "ExportContext": { - "description": "Database instance export context.", - "id": "ExportContext", - "properties": { - "bakExportOptions": { - "description": "Options for exporting BAK files (SQL Server-only)", - "properties": { - "bakType": { - "description": "Type of this bak file will be export, FULL or DIFF, SQL Server only", - "enum": [ - "BAK_TYPE_UNSPECIFIED", - "FULL", - "DIFF", - "TLOG" - ], - "enumDescriptions": [ - "Default type.", - "Full backup.", - "Differential backup.", - "Transaction Log backup" - ], - "type": "string" - }, - "copyOnly": { - "deprecated": true, - "description": "Deprecated: copy_only is deprecated. Use differential_base instead", - "type": "boolean" - }, - "differentialBase": { - "description": "Whether or not the backup can be used as a differential base copy_only backup can not be served as differential base", - "type": "boolean" - }, - "exportLogEndTime": { - "description": "Optional. The end timestamp when transaction log will be included in the export operation. [RFC 3339](https://tools.ietf.org/html/rfc3339) format (for example, `2023-10-01T16:19:00.094`) in UTC. When omitted, all available logs until current time will be included. Only applied to Cloud SQL for SQL Server.", - "format": "google-datetime", - "type": "string" - }, - "exportLogStartTime": { - "description": "Optional. The begin timestamp when transaction log will be included in the export operation. [RFC 3339](https://tools.ietf.org/html/rfc3339) format (for example, `2023-10-01T16:19:00.094`) in UTC. When omitted, all available logs from the beginning of retention period will be included. Only applied to Cloud SQL for SQL Server.", - "format": "google-datetime", - "type": "string" - }, - "stripeCount": { - "description": "Option for specifying how many stripes to use for the export. If blank, and the value of the striped field is true, the number of stripes is automatically chosen.", - "format": "int32", - "type": "integer" - }, - "striped": { - "description": "Whether or not the export should be striped.", - "type": "boolean" - } - }, - "type": "object" - }, - "csvExportOptions": { - "description": "Options for exporting data as CSV. `MySQL` and `PostgreSQL` instances only.", - "properties": { - "escapeCharacter": { - "description": "Specifies the character that should appear before a data character that needs to be escaped.", - "type": "string" - }, - "fieldsTerminatedBy": { - "description": "Specifies the character that separates columns within each row (line) of the file.", - "type": "string" - }, - "linesTerminatedBy": { - "description": "This is used to separate lines. If a line does not contain all fields, the rest of the columns are set to their default values.", - "type": "string" - }, - "quoteCharacter": { - "description": "Specifies the quoting character to be used when a data value is quoted.", - "type": "string" - }, - "selectQuery": { - "description": "The select query used to extract the data.", - "type": "string" - } - }, - "type": "object" - }, - "databases": { - "description": "Databases to be exported. `MySQL instances:` If `fileType` is `SQL` and no database is specified, all databases are exported, except for the `mysql` system database. If `fileType` is `CSV`, you can specify one database, either by using this property or by using the `csvExportOptions.selectQuery` property, which takes precedence over this property. `PostgreSQL instances:` If you don't specify a database by name, all user databases in the instance are exported. This excludes system databases and Cloud SQL databases used to manage internal operations. Exporting all user databases is only available for directory-formatted parallel export. If `fileType` is `CSV`, this database must match the one specified in the `csvExportOptions.selectQuery` property. `SQL Server instances:` You must specify one database to be exported, and the `fileType` must be `BAK`.", - "items": { - "type": "string" - }, - "type": "array" - }, - "fileType": { - "description": "The file type for the specified uri.", - "enum": [ - "SQL_FILE_TYPE_UNSPECIFIED", - "SQL", - "CSV", - "BAK", - "TDE" - ], - "enumDescriptions": [ - "Unknown file type.", - "File containing SQL statements.", - "File in CSV format.", - "", - "TDE certificate." - ], - "type": "string" - }, - "kind": { - "description": "This is always `sql#exportContext`.", - "type": "string" - }, - "offload": { - "description": "Whether to perform a serverless export.", - "type": "boolean" - }, - "sqlExportOptions": { - "description": "Options for exporting data as SQL statements.", - "properties": { - "mysqlExportOptions": { - "description": "Options for exporting from MySQL.", - "properties": { - "masterData": { - "description": "Option to include SQL statement required to set up replication. If set to `1`, the dump file includes a CHANGE MASTER TO statement with the binary log coordinates, and --set-gtid-purged is set to ON. If set to `2`, the CHANGE MASTER TO statement is written as a SQL comment and has no effect. If set to any value other than `1`, --set-gtid-purged is set to OFF.", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "parallel": { - "description": "Optional. Whether or not the export should be parallel.", - "type": "boolean" - }, - "postgresExportOptions": { - "description": "Options for exporting from a Cloud SQL for PostgreSQL instance.", - "properties": { - "clean": { - "description": "Optional. Use this option to include DROP \u003cobject\u003e SQL statements. Use these statements to delete database objects before running the import operation.", - "type": "boolean" - }, - "ifExists": { - "description": "Optional. Option to include an IF EXISTS SQL statement with each DROP statement produced by clean.", - "type": "boolean" - } - }, - "type": "object" - }, - "schemaOnly": { - "description": "Export only schemas.", - "type": "boolean" - }, - "tables": { - "description": "Tables to export, or that were exported, from the specified database. If you specify tables, specify one and only one database. For PostgreSQL instances, you can specify only one table.", - "items": { - "type": "string" - }, - "type": "array" - }, - "threads": { - "description": "Optional. The number of threads to use for parallel export.", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "tdeExportOptions": { - "description": "Optional. Export parameters specific to SQL Server TDE certificates", - "properties": { - "certificatePath": { - "description": "Required. Path to the TDE certificate public key in the form gs://bucketName/fileName. The instance must have write access to the bucket. Applicable only for SQL Server instances.", - "type": "string" - }, - "name": { - "description": "Required. Certificate name. Applicable only for SQL Server instances.", - "type": "string" - }, - "privateKeyPassword": { - "description": "Required. Password that encrypts the private key.", - "type": "string" - }, - "privateKeyPath": { - "description": "Required. Path to the TDE certificate private key in the form gs://bucketName/fileName. The instance must have write access to the location. Applicable only for SQL Server instances.", - "type": "string" - } - }, - "type": "object" - }, - "uri": { - "description": "The path to the file in Google Cloud Storage where the export will be stored. The URI is in the form `gs://bucketName/fileName`. If the file already exists, the request succeeds, but the operation fails. If `fileType` is `SQL` and the filename ends with .gz, the contents are compressed.", - "type": "string" - } - }, - "type": "object" - }, - "ExternalSyncSelectedObject": { - "description": "The selected object that Cloud SQL migrates.", - "id": "ExternalSyncSelectedObject", - "properties": { - "database": { - "description": "The name of the database that Cloud SQL migrates.", - "type": "string" - } - }, - "type": "object" - }, - "FailoverContext": { - "description": "Database instance failover context.", - "id": "FailoverContext", - "properties": { - "kind": { - "description": "This is always `sql#failoverContext`.", - "type": "string" - }, - "settingsVersion": { - "description": "The current settings version of this instance. Request will be rejected if this version doesn't match the current settings version.", - "format": "int64", - "type": "string" - } - }, - "type": "object" - }, - "FinalBackupConfig": { - "description": "Config used to determine the final backup settings for the instance.", - "id": "FinalBackupConfig", - "properties": { - "enabled": { - "description": "Whether the final backup is enabled for the instance.", - "type": "boolean" - }, - "retentionDays": { - "description": "The number of days to retain the final backup after the instance deletion. The final backup will be purged at (time_of_instance_deletion + retention_days).", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "Flag": { - "description": "A flag resource.", - "id": "Flag", - "properties": { - "allowedIntValues": { - "description": "Use this field if only certain integers are accepted. Can be combined with min_value and max_value to add additional values.", - "items": { - "format": "int64", - "type": "string" - }, - "type": "array" - }, - "allowedStringValues": { - "description": "For `STRING` flags, a list of strings that the value can be set to.", - "items": { - "type": "string" - }, - "type": "array" - }, - "appliesTo": { - "description": "The database version this flag applies to. Can be MySQL instances: `MYSQL_8_0`, `MYSQL_8_0_18`, `MYSQL_8_0_26`, `MYSQL_5_7`, or `MYSQL_5_6`. PostgreSQL instances: `POSTGRES_9_6`, `POSTGRES_10`, `POSTGRES_11` or `POSTGRES_12`. SQL Server instances: `SQLSERVER_2017_STANDARD`, `SQLSERVER_2017_ENTERPRISE`, `SQLSERVER_2017_EXPRESS`, `SQLSERVER_2017_WEB`, `SQLSERVER_2019_STANDARD`, `SQLSERVER_2019_ENTERPRISE`, `SQLSERVER_2019_EXPRESS`, or `SQLSERVER_2019_WEB`. See [the complete list](/sql/docs/mysql/admin-api/rest/v1/SqlDatabaseVersion).", - "items": { - "enum": [ - "SQL_DATABASE_VERSION_UNSPECIFIED", - "MYSQL_5_1", - "MYSQL_5_5", - "MYSQL_5_6", - "MYSQL_5_7", - "MYSQL_8_0", - "MYSQL_8_0_18", - "MYSQL_8_0_26", - "MYSQL_8_0_27", - "MYSQL_8_0_28", - "MYSQL_8_0_29", - "MYSQL_8_0_30", - "MYSQL_8_0_31", - "MYSQL_8_0_32", - "MYSQL_8_0_33", - "MYSQL_8_0_34", - "MYSQL_8_0_35", - "MYSQL_8_0_36", - "MYSQL_8_0_37", - "MYSQL_8_0_39", - "MYSQL_8_0_40", - "MYSQL_8_0_41", - "MYSQL_8_0_42", - "MYSQL_8_0_43", - "MYSQL_8_0_44", - "MYSQL_8_0_45", - "MYSQL_8_0_46", - "MYSQL_8_4", - "MYSQL_9_7", - "SQLSERVER_2017_STANDARD", - "SQLSERVER_2017_ENTERPRISE", - "SQLSERVER_2017_EXPRESS", - "SQLSERVER_2017_WEB", - "POSTGRES_9_6", - "POSTGRES_10", - "POSTGRES_11", - "POSTGRES_12", - "POSTGRES_13", - "POSTGRES_14", - "POSTGRES_15", - "POSTGRES_16", - "POSTGRES_17", - "POSTGRES_18", - "SQLSERVER_2019_STANDARD", - "SQLSERVER_2019_ENTERPRISE", - "SQLSERVER_2019_EXPRESS", - "SQLSERVER_2019_WEB", - "SQLSERVER_2022_STANDARD", - "SQLSERVER_2022_ENTERPRISE", - "SQLSERVER_2022_EXPRESS", - "SQLSERVER_2022_WEB", - "SQLSERVER_2025_STANDARD", - "SQLSERVER_2025_ENTERPRISE", - "SQLSERVER_2025_EXPRESS" - ], - "enumDeprecated": [ - false, - true, - true, - false, - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "This is an unknown database version.", - "The database version is MySQL 5.1.", - "The database version is MySQL 5.5.", - "The database version is MySQL 5.6.", - "The database version is MySQL 5.7.", - "The database version is MySQL 8.", - "The database major version is MySQL 8.0 and the minor version is 18.", - "The database major version is MySQL 8.0 and the minor version is 26.", - "The database major version is MySQL 8.0 and the minor version is 27.", - "The database major version is MySQL 8.0 and the minor version is 28.", - "The database major version is MySQL 8.0 and the minor version is 29.", - "The database major version is MySQL 8.0 and the minor version is 30.", - "The database major version is MySQL 8.0 and the minor version is 31.", - "The database major version is MySQL 8.0 and the minor version is 32.", - "The database major version is MySQL 8.0 and the minor version is 33.", - "The database major version is MySQL 8.0 and the minor version is 34.", - "The database major version is MySQL 8.0 and the minor version is 35.", - "The database major version is MySQL 8.0 and the minor version is 36.", - "The database major version is MySQL 8.0 and the minor version is 37.", - "The database major version is MySQL 8.0 and the minor version is 39.", - "The database major version is MySQL 8.0 and the minor version is 40.", - "The database major version is MySQL 8.0 and the minor version is 41.", - "The database major version is MySQL 8.0 and the minor version is 42.", - "The database major version is MySQL 8.0 and the minor version is 43.", - "The database major version is MySQL 8.0 and the minor version is 44.", - "The database major version is MySQL 8.0 and the minor version is 45.", - "The database major version is MySQL 8.0 and the minor version is 46.", - "The database version is MySQL 8.4.", - "The database version is MySQL 9.7.", - "The database version is SQL Server 2017 Standard.", - "The database version is SQL Server 2017 Enterprise.", - "The database version is SQL Server 2017 Express.", - "The database version is SQL Server 2017 Web.", - "The database version is PostgreSQL 9.6.", - "The database version is PostgreSQL 10.", - "The database version is PostgreSQL 11.", - "The database version is PostgreSQL 12.", - "The database version is PostgreSQL 13.", - "The database version is PostgreSQL 14.", - "The database version is PostgreSQL 15.", - "The database version is PostgreSQL 16.", - "The database version is PostgreSQL 17.", - "The database version is PostgreSQL 18.", - "The database version is SQL Server 2019 Standard.", - "The database version is SQL Server 2019 Enterprise.", - "The database version is SQL Server 2019 Express.", - "The database version is SQL Server 2019 Web.", - "The database version is SQL Server 2022 Standard.", - "The database version is SQL Server 2022 Enterprise.", - "The database version is SQL Server 2022 Express.", - "The database version is SQL Server 2022 Web.", - "The database version is SQL Server 2025 Standard.", - "The database version is SQL Server 2025 Enterprise.", - "The database version is SQL Server 2025 Express." - ], - "type": "string" - }, - "type": "array" - }, - "flagScope": { - "description": "Scope of flag.", - "enum": [ - "SQL_FLAG_SCOPE_UNSPECIFIED", - "SQL_FLAG_SCOPE_DATABASE", - "SQL_FLAG_SCOPE_CONNECTION_POOL" - ], - "enumDescriptions": [ - "Assume database flags if unspecified", - "database flags", - "connection pool configuration flags" - ], - "type": "string" - }, - "inBeta": { - "description": "Whether or not the flag is considered in beta.", - "type": "boolean" - }, - "kind": { - "description": "This is always `sql#flag`.", - "type": "string" - }, - "maxValue": { - "description": "For `INTEGER` flags, the maximum allowed value.", - "format": "int64", - "type": "string" - }, - "minValue": { - "description": "For `INTEGER` flags, the minimum allowed value.", - "format": "int64", - "type": "string" - }, - "name": { - "description": "This is the name of the flag. Flag names always use underscores, not hyphens, for example: `max_allowed_packet`", - "type": "string" - }, - "recommendedIntValue": { - "description": "Recommended int value in integer format for UI display.", - "format": "int64", - "type": "string" - }, - "recommendedStringValue": { - "description": "Recommended string value in string format for UI display.", - "type": "string" - }, - "requiresRestart": { - "description": "Indicates whether changing this flag will trigger a database restart. Only applicable to Second Generation instances.", - "type": "boolean" - }, - "type": { - "description": "The type of the flag. Flags are typed to being `BOOLEAN`, `STRING`, `INTEGER` or `NONE`. `NONE` is used for flags that do not take a value, such as `skip_grant_tables`.", - "enum": [ - "SQL_FLAG_TYPE_UNSPECIFIED", - "BOOLEAN", - "STRING", - "INTEGER", - "NONE", - "MYSQL_TIMEZONE_OFFSET", - "FLOAT", - "REPEATED_STRING" - ], - "enumDescriptions": [ - "This is an unknown flag type.", - "Boolean type flag.", - "String type flag.", - "Integer type flag.", - "Flag type used for a server startup option.", - "Type introduced specially for MySQL TimeZone offset. Accept a string value with the format [-12:59, 13:00].", - "Float type flag.", - "Comma-separated list of the strings in a SqlFlagType enum." - ], - "type": "string" - } - }, - "type": "object" - }, - "FlagsListResponse": { - "description": "Flags list response.", - "id": "FlagsListResponse", - "properties": { - "items": { - "description": "List of flags.", - "items": { - "$ref": "Flag" - }, - "type": "array" - }, - "kind": { - "description": "This is always `sql#flagsList`.", - "type": "string" - } - }, - "type": "object" - }, - "GeminiInstanceConfig": { - "description": "Gemini instance configuration.", - "id": "GeminiInstanceConfig", - "properties": { - "activeQueryEnabled": { - "description": "Output only. Whether the active query is enabled.", - "readOnly": true, - "type": "boolean" - }, - "entitled": { - "description": "Output only. Whether Gemini is enabled.", - "readOnly": true, - "type": "boolean" - }, - "flagRecommenderEnabled": { - "description": "Output only. Whether the flag recommender is enabled.", - "readOnly": true, - "type": "boolean" - }, - "googleVacuumMgmtEnabled": { - "description": "Output only. Whether the vacuum management is enabled.", - "readOnly": true, - "type": "boolean" - }, - "indexAdvisorEnabled": { - "description": "Output only. Whether the index advisor is enabled.", - "readOnly": true, - "type": "boolean" - }, - "oomSessionCancelEnabled": { - "description": "Output only. Whether canceling the out-of-memory (OOM) session is enabled.", - "readOnly": true, - "type": "boolean" - } - }, - "type": "object" - }, - "GenerateEphemeralCertRequest": { - "description": "Ephemeral certificate creation request.", - "id": "GenerateEphemeralCertRequest", - "properties": { - "access_token": { - "description": "Optional. Access token to include in the signed certificate.", - "type": "string" - }, - "public_key": { - "description": "PEM encoded public key to include in the signed certificate.", - "type": "string" - }, - "readTime": { - "description": "Optional. Optional snapshot read timestamp to trade freshness for performance.", - "format": "google-datetime", - "type": "string" - }, - "validDuration": { - "description": "Optional. If set, it will contain the cert valid duration.", - "format": "google-duration", - "type": "string" - } - }, - "type": "object" - }, - "GenerateEphemeralCertResponse": { - "description": "Ephemeral certificate creation request.", - "id": "GenerateEphemeralCertResponse", - "properties": { - "ephemeralCert": { - "$ref": "SslCert", - "description": "Generated cert" - } - }, - "type": "object" - }, - "ImportContext": { - "description": "Database instance import context.", - "id": "ImportContext", - "properties": { - "bakImportOptions": { - "description": "Import parameters specific to SQL Server .BAK files", - "properties": { - "bakType": { - "description": "Type of the bak content, FULL or DIFF", - "enum": [ - "BAK_TYPE_UNSPECIFIED", - "FULL", - "DIFF", - "TLOG" - ], - "enumDescriptions": [ - "Default type.", - "Full backup.", - "Differential backup.", - "Transaction Log backup" - ], - "type": "string" - }, - "encryptionOptions": { - "properties": { - "certPath": { - "description": "Path to the Certificate (.cer) in Cloud Storage, in the form `gs://bucketName/fileName`. The instance must have write permissions to the bucket and read access to the file.", - "type": "string" - }, - "keepEncrypted": { - "description": "Optional. Whether the imported file remains encrypted.", - "type": "boolean" - }, - "pvkPassword": { - "description": "Password that encrypts the private key", - "type": "string" - }, - "pvkPath": { - "description": "Path to the Certificate Private Key (.pvk) in Cloud Storage, in the form `gs://bucketName/fileName`. The instance must have write permissions to the bucket and read access to the file.", - "type": "string" - } - }, - "type": "object" - }, - "noRecovery": { - "description": "Whether or not the backup importing will restore database with NORECOVERY option. Applies only to Cloud SQL for SQL Server.", - "type": "boolean" - }, - "recoveryOnly": { - "description": "Whether or not the backup importing request will just bring database online without downloading Bak content only one of \"no_recovery\" and \"recovery_only\" can be true otherwise error will return. Applies only to Cloud SQL for SQL Server.", - "type": "boolean" - }, - "stopAt": { - "description": "Optional. The timestamp when the import should stop. This timestamp is in the [RFC 3339](https://tools.ietf.org/html/rfc3339) format (for example, `2023-10-01T16:19:00.094`). This field is equivalent to the STOPAT keyword and applies to Cloud SQL for SQL Server only.", - "format": "google-datetime", - "type": "string" - }, - "stopAtMark": { - "description": "Optional. The marked transaction where the import should stop. This field is equivalent to the STOPATMARK keyword and applies to Cloud SQL for SQL Server only.", - "type": "string" - }, - "striped": { - "description": "Whether or not the backup set being restored is striped. Applies only to Cloud SQL for SQL Server.", - "type": "boolean" - } - }, - "type": "object" - }, - "csvImportOptions": { - "description": "Options for importing data as CSV.", - "properties": { - "columns": { - "description": "The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data.", - "items": { - "type": "string" - }, - "type": "array" - }, - "escapeCharacter": { - "description": "Specifies the character that should appear before a data character that needs to be escaped.", - "type": "string" - }, - "fieldsTerminatedBy": { - "description": "Specifies the character that separates columns within each row (line) of the file.", - "type": "string" - }, - "linesTerminatedBy": { - "description": "This is used to separate lines. If a line does not contain all fields, the rest of the columns are set to their default values.", - "type": "string" - }, - "quoteCharacter": { - "description": "Specifies the quoting character to be used when a data value is quoted.", - "type": "string" - }, - "table": { - "description": "The table to which CSV data is imported.", - "type": "string" - } - }, - "type": "object" - }, - "database": { - "description": "The target database for the import. If `fileType` is `SQL`, this field is required only if the import file does not specify a database, and is overridden by any database specification in the import file. For entire instance parallel import operations, the database is overridden by the database name stored in subdirectory name. If `fileType` is `CSV`, one database must be specified.", - "type": "string" - }, - "fileType": { - "description": "The file type for the specified uri.\\`SQL`: The file contains SQL statements. \\`CSV`: The file contains CSV data.", - "enum": [ - "SQL_FILE_TYPE_UNSPECIFIED", - "SQL", - "CSV", - "BAK", - "TDE" - ], - "enumDescriptions": [ - "Unknown file type.", - "File containing SQL statements.", - "File in CSV format.", - "", - "TDE certificate." - ], - "type": "string" - }, - "importUser": { - "description": "The PostgreSQL user for this import operation. PostgreSQL instances only.", - "type": "string" - }, - "kind": { - "description": "This is always `sql#importContext`.", - "type": "string" - }, - "sqlImportOptions": { - "description": "Optional. Options for importing data from SQL statements.", - "properties": { - "parallel": { - "description": "Optional. Whether or not the import should be parallel.", - "type": "boolean" - }, - "postgresImportOptions": { - "description": "Optional. Options for importing from a Cloud SQL for PostgreSQL instance.", - "properties": { - "clean": { - "description": "Optional. The --clean flag for the pg_restore utility. This flag applies only if you enabled Cloud SQL to import files in parallel.", - "type": "boolean" - }, - "ifExists": { - "description": "Optional. The --if-exists flag for the pg_restore utility. This flag applies only if you enabled Cloud SQL to import files in parallel.", - "type": "boolean" - } - }, - "type": "object" - }, - "threads": { - "description": "Optional. The number of threads to use for parallel import.", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "tdeImportOptions": { - "description": "Optional. Import parameters specific to SQL Server TDE certificates", - "properties": { - "certificatePath": { - "description": "Required. Path to the TDE certificate public key in the form gs://bucketName/fileName. The instance must have read access to the file. Applicable only for SQL Server instances.", - "type": "string" - }, - "name": { - "description": "Required. Certificate name. Applicable only for SQL Server instances.", - "type": "string" - }, - "privateKeyPassword": { - "description": "Required. Password that encrypts the private key.", - "type": "string" - }, - "privateKeyPath": { - "description": "Required. Path to the TDE certificate private key in the form gs://bucketName/fileName. The instance must have read access to the file. Applicable only for SQL Server instances.", - "type": "string" - } - }, - "type": "object" - }, - "uri": { - "description": "Path to the import file in Cloud Storage, in the form `gs://bucketName/fileName`. Compressed gzip files (.gz) are supported when `fileType` is `SQL`. The instance must have write permissions to the bucket and read access to the file.", - "type": "string" - } - }, - "type": "object" - }, - "InsightsConfig": { - "description": "Insights configuration. This specifies when Cloud SQL Insights feature is enabled and optional configuration.", - "id": "InsightsConfig", - "properties": { - "enhancedQueryInsightsEnabled": { - "description": "Optional. Whether enhanced query insights feature is enabled.", - "type": "boolean" - }, - "queryInsightsEnabled": { - "description": "Whether Query Insights feature is enabled.", - "type": "boolean" - }, - "queryPlansPerMinute": { - "description": "Number of query execution plans captured by Insights per minute for all queries combined. Default is 5.", - "format": "int32", - "type": "integer" - }, - "queryStringLength": { - "description": "Maximum query length stored in bytes. Default value: 1024 bytes. Range: 256-4500 bytes. Query lengths greater than this field value will be truncated to this value. When unset, query length will be the default value. Changing query length will restart the database.", - "format": "int32", - "type": "integer" - }, - "recordApplicationTags": { - "description": "Whether Query Insights will record application tags from query when enabled.", - "type": "boolean" - }, - "recordClientAddress": { - "description": "Whether Query Insights will record client address when enabled.", - "type": "boolean" - } - }, - "type": "object" - }, - "InstanceReference": { - "description": "Reference to another Cloud SQL instance.", - "id": "InstanceReference", - "properties": { - "name": { - "description": "The name of the Cloud SQL instance being referenced. This does not include the project ID.", - "type": "string" - }, - "project": { - "description": "The project ID of the Cloud SQL instance being referenced. The default is the same project ID as the instance references it.", - "type": "string" - }, - "region": { - "description": "The region of the Cloud SQL instance being referenced.", - "type": "string" - } - }, - "type": "object" - }, - "InstancesAcquireSsrsLeaseRequest": { - "description": "Request to acquire a lease for SSRS.", - "id": "InstancesAcquireSsrsLeaseRequest", - "properties": { - "acquireSsrsLeaseContext": { - "$ref": "AcquireSsrsLeaseContext", - "description": "Contains details about the acquire SSRS lease operation." - } - }, - "type": "object" - }, - "InstancesCloneRequest": { - "description": "Database instance clone request.", - "id": "InstancesCloneRequest", - "properties": { - "cloneContext": { - "$ref": "CloneContext", - "description": "Required. Contains details about the clone operation." - } - }, - "type": "object" - }, - "InstancesDemoteMasterRequest": { - "description": "Database demote primary instance request.", - "id": "InstancesDemoteMasterRequest", - "properties": { - "demoteMasterContext": { - "$ref": "DemoteMasterContext", - "description": "Contains details about the demoteMaster operation." - } - }, - "type": "object" - }, - "InstancesDemoteRequest": { - "description": "This request is used to demote an existing standalone instance to be a Cloud SQL read replica for an external database server.", - "id": "InstancesDemoteRequest", - "properties": { - "demoteContext": { - "$ref": "DemoteContext", - "description": "Required. Contains details about the demote operation." - } - }, - "type": "object" - }, - "InstancesExportRequest": { - "description": "Database instance export request.", - "id": "InstancesExportRequest", - "properties": { - "exportContext": { - "$ref": "ExportContext", - "description": "Contains details about the export operation." - } - }, - "type": "object" - }, - "InstancesFailoverRequest": { - "description": "Instance failover request.", - "id": "InstancesFailoverRequest", - "properties": { - "failoverContext": { - "$ref": "FailoverContext", - "description": "Failover Context." - } - }, - "type": "object" - }, - "InstancesImportRequest": { - "description": "Database instance import request.", - "id": "InstancesImportRequest", - "properties": { - "importContext": { - "$ref": "ImportContext", - "description": "Contains details about the import operation." - } - }, - "type": "object" - }, - "InstancesListEntraIdCertificatesResponse": { - "description": "Instances ListEntraIdCertificates response.", - "id": "InstancesListEntraIdCertificatesResponse", - "properties": { - "activeVersion": { - "description": "The `sha1_fingerprint` of the active certificate from `certs`.", - "type": "string" - }, - "certs": { - "description": "List of Entra ID certificates for the instance.", - "items": { - "$ref": "SslCert" - }, - "type": "array" - }, - "kind": { - "description": "This is always `sql#instancesListEntraIdCertificates`.", - "type": "string" - } - }, - "type": "object" - }, - "InstancesListResponse": { - "description": "Database instances list response.", - "id": "InstancesListResponse", - "properties": { - "items": { - "description": "List of database instance resources.", - "items": { - "$ref": "DatabaseInstance" - }, - "type": "array" - }, - "kind": { - "description": "This is always `sql#instancesList`.", - "type": "string" - }, - "nextPageToken": { - "description": "The continuation token, used to page through large result sets. Provide this value in a subsequent request to return the next page of results.", - "type": "string" - }, - "warnings": { - "description": "List of warnings that occurred while handling the request.", - "items": { - "$ref": "ApiWarning" - }, - "type": "array" - } - }, - "type": "object" - }, - "InstancesListServerCasResponse": { - "description": "Instances ListServerCas response.", - "id": "InstancesListServerCasResponse", - "properties": { - "activeVersion": { - "type": "string" - }, - "certs": { - "description": "List of server CA certificates for the instance.", - "items": { - "$ref": "SslCert" - }, - "type": "array" - }, - "kind": { - "description": "This is always `sql#instancesListServerCas`.", - "type": "string" - } - }, - "type": "object" - }, - "InstancesListServerCertificatesResponse": { - "description": "Instances ListServerCertificates response.", - "id": "InstancesListServerCertificatesResponse", - "properties": { - "activeVersion": { - "description": "The `sha1_fingerprint` of the active certificate from `server_certs`.", - "type": "string" - }, - "caCerts": { - "description": "List of server CA certificates for the instance.", - "items": { - "$ref": "SslCert" - }, - "type": "array" - }, - "kind": { - "description": "This is always `sql#instancesListServerCertificates`.", - "type": "string" - }, - "serverCerts": { - "description": "List of server certificates for the instance, signed by the corresponding CA from the `ca_certs` list.", - "items": { - "$ref": "SslCert" - }, - "type": "array" - } - }, - "type": "object" - }, - "InstancesPreCheckMajorVersionUpgradeRequest": { - "description": "Request for Pre-checks for MVU", - "id": "InstancesPreCheckMajorVersionUpgradeRequest", - "properties": { - "preCheckMajorVersionUpgradeContext": { - "$ref": "PreCheckMajorVersionUpgradeContext", - "description": "Required. Contains details about the pre-check major version upgrade operation." - } - }, - "type": "object" - }, - "InstancesReencryptRequest": { - "description": "Database Instance reencrypt request.", - "id": "InstancesReencryptRequest", - "properties": { - "backupReencryptionConfig": { - "$ref": "BackupReencryptionConfig", - "description": "Configuration specific to backup re-encryption" - } - }, - "type": "object" - }, - "InstancesRestoreBackupRequest": { - "description": "Database instance restore backup request.", - "id": "InstancesRestoreBackupRequest", - "properties": { - "backup": { - "description": "The name of the backup that's used to restore a Cloud SQL instance: Format: projects/{project-id}/backups/{backup-uid}. Only one of restore_backup_context, backup, backupdr_backup can be passed to the input.", - "type": "string" - }, - "backupdrBackup": { - "description": "The name of the backup that's used to restore a Cloud SQL instance: Format: \"projects/{project-id}/locations/{location}/backupVaults/{backupvault}/dataSources/{datasource}/backups/{backup-uid}\". Only one of restore_backup_context, backup, backupdr_backup can be passed to the input.", - "type": "string" - }, - "restoreBackupContext": { - "$ref": "RestoreBackupContext", - "description": "Parameters required to perform the restore backup operation." - }, - "restoreInstanceClearOverridesFieldNames": { - "description": "Optional. This field has the same purpose as restore_instance_settings, changes any instance settings stored in the backup you are restoring from. With the difference that these fields are cleared in the settings.", - "items": { - "type": "string" - }, - "type": "array" - }, - "restoreInstanceSettings": { - "$ref": "DatabaseInstance", - "description": "Optional. By using this parameter, Cloud SQL overrides any instance settings stored in the backup you are restoring from. You can't change the instance's major database version and you can only increase the disk size. You can use this field to restore new instances only. This field is not applicable for restore to existing instances." - } - }, - "type": "object" - }, - "InstancesRotateEntraIdCertificateRequest": { - "description": "Rotate Entra ID certificate request.", - "id": "InstancesRotateEntraIdCertificateRequest", - "properties": { - "rotateEntraIdCertificateContext": { - "$ref": "RotateEntraIdCertificateContext", - "description": "Optional. Contains details about the rotate server certificate operation." - } - }, - "type": "object" - }, - "InstancesRotateServerCaRequest": { - "description": "Rotate server CA request.", - "id": "InstancesRotateServerCaRequest", - "properties": { - "rotateServerCaContext": { - "$ref": "RotateServerCaContext", - "description": "Contains details about the rotate server CA operation." - } - }, - "type": "object" - }, - "InstancesRotateServerCertificateRequest": { - "description": "Rotate server certificate request.", - "id": "InstancesRotateServerCertificateRequest", - "properties": { - "rotateServerCertificateContext": { - "$ref": "RotateServerCertificateContext", - "description": "Optional. Contains details about the rotate server certificate operation." - } - }, - "type": "object" - }, - "InstancesTruncateLogRequest": { - "description": "Instance truncate log request.", - "id": "InstancesTruncateLogRequest", - "properties": { - "truncateLogContext": { - "$ref": "TruncateLogContext", - "description": "Contains details about the truncate log operation." - } - }, - "type": "object" - }, - "Interval": { - "description": "Represents a time interval, encoded as a Timestamp start (inclusive) and a Timestamp end (exclusive). The start must be less than or equal to the end. When the start equals the end, the interval is empty (matches no time). When both start and end are unspecified, the interval matches any time.", - "id": "Interval", - "properties": { - "endTime": { - "description": "Optional. Exclusive end of the interval. If specified, a Timestamp matching this interval will have to be before the end.", - "format": "google-datetime", - "type": "string" - }, - "startTime": { - "description": "Optional. Inclusive start of the interval. If specified, a Timestamp matching this interval will have to be the same or after the start.", - "format": "google-datetime", - "type": "string" - } - }, - "type": "object" - }, - "IpConfiguration": { - "description": "IP Management configuration.", - "id": "IpConfiguration", - "properties": { - "allocatedIpRange": { - "description": "The name of the allocated ip range for the private ip Cloud SQL instance. For example: \"google-managed-services-default\". If set, the instance ip will be created in the allocated range. The range name must comply with [RFC 1035](https://tools.ietf.org/html/rfc1035). Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?.`", - "type": "string" - }, - "authorizedNetworks": { - "description": "The list of external networks that are allowed to connect to the instance using the IP. In 'CIDR' notation, also known as 'slash' notation (for example: `157.197.200.0/24`).", - "items": { - "$ref": "AclEntry" - }, - "type": "array" - }, - "customSubjectAlternativeNames": { - "description": "Optional. Custom Subject Alternative Name(SAN)s for a Cloud SQL instance.", - "items": { - "type": "string" - }, - "type": "array" - }, - "enablePrivatePathForGoogleCloudServices": { - "description": "Controls connectivity to private IP instances from Google services, such as BigQuery.", - "type": "boolean" - }, - "ipv4Enabled": { - "description": "Whether the instance is assigned a public IP address or not.", - "type": "boolean" - }, - "privateNetwork": { - "description": "The resource link for the VPC network from which the Cloud SQL instance is accessible for private IP. For example, `/projects/myProject/global/networks/default`. This setting can be updated, but it cannot be removed after it is set.", - "type": "string" - }, - "pscConfig": { - "$ref": "PscConfig", - "description": "PSC settings for this instance." - }, - "requireSsl": { - "description": "Use `ssl_mode` instead. Whether SSL/TLS connections over IP are enforced. If set to false, then allow both non-SSL/non-TLS and SSL/TLS connections. For SSL/TLS connections, the client certificate won't be verified. If set to true, then only allow connections encrypted with SSL/TLS and with valid client certificates. If you want to enforce SSL/TLS without enforcing the requirement for valid client certificates, then use the `ssl_mode` flag instead of the `require_ssl` flag.", - "type": "boolean" - }, - "serverCaMode": { - "description": "Specify what type of CA is used for the server certificate.", - "enum": [ - "CA_MODE_UNSPECIFIED", - "GOOGLE_MANAGED_INTERNAL_CA", - "GOOGLE_MANAGED_CAS_CA", - "CUSTOMER_MANAGED_CAS_CA" - ], - "enumDescriptions": [ - "CA mode is unspecified. It is effectively the same as `GOOGLE_MANAGED_INTERNAL_CA`.", - "Google-managed self-signed internal CA.", - "Google-managed regional CA part of root CA hierarchy hosted on Google Cloud's Certificate Authority Service (CAS).", - "Customer-managed CA hosted on Google Cloud's Certificate Authority Service (CAS)." - ], - "type": "string" - }, - "serverCaPool": { - "description": "Optional. The resource name of the server CA pool for an instance with `CUSTOMER_MANAGED_CAS_CA` as the `server_ca_mode`. Format: projects/{PROJECT}/locations/{REGION}/caPools/{CA_POOL_ID}", - "type": "string" - }, - "serverCertificateRotationMode": { - "description": "Optional. Controls the automatic server certificate rotation feature. This feature is disabled by default. When enabled, the server certificate will be automatically rotated during Cloud SQL scheduled maintenance or self-service maintenance updates up to six months before it expires. This setting can only be set if server_ca_mode is either GOOGLE_MANAGED_CAS_CA or CUSTOMER_MANAGED_CAS_CA.", - "enum": [ - "SERVER_CERTIFICATE_ROTATION_MODE_UNSPECIFIED", - "NO_AUTOMATIC_ROTATION", - "AUTOMATIC_ROTATION_DURING_MAINTENANCE" - ], - "enumDescriptions": [ - "Unspecified: no automatic server certificate rotation.", - "No automatic server certificate rotation. The user must [manage server certificate rotation](/sql/docs/mysql/manage-ssl-instance#rotate-server-certificate-cas) on their side.", - "Automatic server certificate rotation during Cloud SQL scheduled maintenance or self-service maintenance updates. Requires `server_ca_mode` to be `GOOGLE_MANAGED_CAS_CA` or `CUSTOMER_MANAGED_CAS_CA`." - ], - "type": "string" - }, - "sslMode": { - "description": "Specify how SSL/TLS is enforced in database connections. If you must use the `require_ssl` flag for backward compatibility, then only the following value pairs are valid: For PostgreSQL and MySQL: * `ssl_mode=ALLOW_UNENCRYPTED_AND_ENCRYPTED` and `require_ssl=false` * `ssl_mode=ENCRYPTED_ONLY` and `require_ssl=false` * `ssl_mode=TRUSTED_CLIENT_CERTIFICATE_REQUIRED` and `require_ssl=true` For SQL Server: * `ssl_mode=ALLOW_UNENCRYPTED_AND_ENCRYPTED` and `require_ssl=false` * `ssl_mode=ENCRYPTED_ONLY` and `require_ssl=true` The value of `ssl_mode` has priority over the value of `require_ssl`. For example, for the pair `ssl_mode=ENCRYPTED_ONLY` and `require_ssl=false`, `ssl_mode=ENCRYPTED_ONLY` means accept only SSL connections, while `require_ssl=false` means accept both non-SSL and SSL connections. In this case, MySQL and PostgreSQL databases respect `ssl_mode` and accepts only SSL connections.", - "enum": [ - "SSL_MODE_UNSPECIFIED", - "ALLOW_UNENCRYPTED_AND_ENCRYPTED", - "ENCRYPTED_ONLY", - "TRUSTED_CLIENT_CERTIFICATE_REQUIRED" - ], - "enumDescriptions": [ - "The SSL mode is unknown.", - "Allow non-SSL/non-TLS and SSL/TLS connections. For SSL connections to MySQL and PostgreSQL, the client certificate isn't verified. When this value is used, the legacy `require_ssl` flag must be false or cleared to avoid a conflict between the values of the two flags.", - "Only allow connections encrypted with SSL/TLS. For SSL connections to MySQL and PostgreSQL, the client certificate isn't verified. When this value is used, the legacy `require_ssl` flag must be false or cleared to avoid a conflict between the values of the two flags.", - "Only allow connections encrypted with SSL/TLS and with valid client certificates. When this value is used, the legacy `require_ssl` flag must be true or cleared to avoid the conflict between values of two flags. PostgreSQL clients or users that connect using IAM database authentication must use either the [Cloud SQL Auth Proxy](https://cloud.google.com/sql/docs/postgres/connect-auth-proxy) or [Cloud SQL Connectors](https://cloud.google.com/sql/docs/postgres/connect-connectors) to enforce client identity verification. Only applicable to MySQL and PostgreSQL. Not applicable to SQL Server." - ], - "type": "string" - } - }, - "type": "object" - }, - "IpMapping": { - "description": "Database instance IP mapping", - "id": "IpMapping", - "properties": { - "ipAddress": { - "description": "The IP address assigned.", - "type": "string" - }, - "timeToRetire": { - "description": "The due time for this IP to be retired in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`. This field is only available when the IP is scheduled to be retired.", - "format": "google-datetime", - "type": "string" - }, - "type": { - "description": "The type of this IP address. A `PRIMARY` address is a public address that can accept incoming connections. A `PRIVATE` address is a private address that can accept incoming connections. An `OUTGOING` address is the source address of connections originating from the instance, if supported.", - "enum": [ - "SQL_IP_ADDRESS_TYPE_UNSPECIFIED", - "PRIMARY", - "OUTGOING", - "PRIVATE", - "MIGRATED_1ST_GEN" - ], - "enumDescriptions": [ - "This is an unknown IP address type.", - "IP address the customer is supposed to connect to. Usually this is the load balancer's IP address", - "Source IP address of the connection a read replica establishes to its external primary instance. This IP address can be allowlisted by the customer in case it has a firewall that filters incoming connection to its on premises primary instance.", - "Private IP used when using private IPs and network peering.", - "V1 IP of a migrated instance. We want the user to decommission this IP as soon as the migration is complete. Note: V1 instances with V1 ip addresses will be counted as PRIMARY." - ], - "type": "string" - } - }, - "type": "object" - }, - "ListBackupsResponse": { - "description": "The response payload containing a list of the backups.", - "id": "ListBackupsResponse", - "properties": { - "backups": { - "description": "A list of backups.", - "items": { - "$ref": "Backup" - }, - "type": "array" - }, - "nextPageToken": { - "description": "A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, then there aren't subsequent pages.", - "type": "string" - }, - "warnings": { - "description": "If a region isn't unavailable or if an unknown error occurs, then a warning message is returned.", - "items": { - "$ref": "ApiWarning" - }, - "type": "array" - } - }, - "type": "object" - }, - "LocationPreference": { - "description": "Preferred location. This specifies where a Cloud SQL instance is located. Note that if the preferred location is not available, the instance will be located as close as possible within the region. Only one location may be specified.", - "id": "LocationPreference", - "properties": { - "followGaeApplication": { - "deprecated": true, - "description": "The App Engine application to follow, it must be in the same region as the Cloud SQL instance. WARNING: Changing this might restart the instance.", - "type": "string" - }, - "kind": { - "description": "This is always `sql#locationPreference`.", - "type": "string" - }, - "secondaryZone": { - "description": "The preferred Compute Engine zone for the secondary/failover (for example: us-central1-a, us-central1-b, etc.). To disable this field, set it to 'no_secondary_zone'.", - "type": "string" - }, - "zone": { - "description": "The preferred Compute Engine zone (for example: us-central1-a, us-central1-b, etc.). WARNING: Changing this might restart the instance.", - "type": "string" - } - }, - "type": "object" - }, - "MaintenanceWindow": { - "description": "Maintenance window. This specifies when a Cloud SQL instance is restarted for system maintenance purposes.", - "id": "MaintenanceWindow", - "properties": { - "day": { - "description": "Day of week - `MONDAY`, `TUESDAY`, `WEDNESDAY`, `THURSDAY`, `FRIDAY`, `SATURDAY`, or `SUNDAY`. Specify in the UTC time zone. Returned in output as an integer, 1 to 7, where `1` equals Monday.", - "format": "int32", - "type": "integer" - }, - "hour": { - "description": "Hour of day - 0 to 23. Specify in the UTC time zone.", - "format": "int32", - "type": "integer" - }, - "kind": { - "description": "This is always `sql#maintenanceWindow`.", - "type": "string" - }, - "updateTrack": { - "description": "Maintenance timing settings: `canary`, `stable`, or `week5`. For more information, see [About maintenance on Cloud SQL instances](https://cloud.google.com/sql/docs/mysql/maintenance).", - "enum": [ - "SQL_UPDATE_TRACK_UNSPECIFIED", - "canary", - "stable", - "week5" - ], - "enumDescriptions": [ - "This is an unknown maintenance timing preference.", - "For an instance with a scheduled maintenance window, this maintenance timing indicates that the maintenance update is scheduled 7 to 14 days after the notification is sent out. Also referred to as `Week 1` (Console) and `preview` (gcloud CLI).", - "For an instance with a scheduled maintenance window, this maintenance timing indicates that the maintenance update is scheduled 15 to 21 days after the notification is sent out. Also referred to as `Week 2` (Console) and `production` (gcloud CLI).", - "For instance with a scheduled maintenance window, this maintenance timing indicates that the maintenance update is scheduled 35 to 42 days after the notification is sent out." - ], - "type": "string" - } - }, - "type": "object" - }, - "Message": { - "description": "Represents a notice or warning message from the database.", - "id": "Message", - "properties": { - "message": { - "description": "The full message string. For PostgreSQL, this is a formatted string that may include severity, code, and the notice/warning message. For MySQL, this contains the warning message.", - "type": "string" - }, - "severity": { - "description": "The severity of the message (e.g., \"NOTICE\" for PostgreSQL, \"WARNING\" for MySQL).", - "type": "string" - } - }, - "type": "object" - }, - "Metadata": { - "description": "The additional metadata information regarding the execution of the SQL statements.", - "id": "Metadata", - "properties": { - "sqlStatementExecutionTime": { - "description": "The time taken to execute the SQL statements.", - "format": "google-duration", - "type": "string" - } - }, - "type": "object" - }, - "MySqlReplicaConfiguration": { - "description": "Read-replica configuration specific to MySQL databases.", - "id": "MySqlReplicaConfiguration", - "properties": { - "caCertificate": { - "description": "PEM representation of the trusted CA's x509 certificate.", - "type": "string" - }, - "clientCertificate": { - "description": "PEM representation of the replica's x509 certificate.", - "type": "string" - }, - "clientKey": { - "description": "PEM representation of the replica's private key. The corresponding public key is encoded in the client's certificate.", - "type": "string" - }, - "connectRetryInterval": { - "description": "Seconds to wait between connect retries. MySQL's default is 60 seconds.", - "format": "int32", - "type": "integer" - }, - "dumpFilePath": { - "description": "Path to a SQL dump file in Google Cloud Storage from which the replica instance is to be created. The URI is in the form gs://bucketName/fileName. Compressed gzip files (.gz) are also supported. Dumps have the binlog co-ordinates from which replication begins. This can be accomplished by setting --master-data to 1 when using mysqldump.", - "type": "string" - }, - "kind": { - "description": "This is always `sql#mysqlReplicaConfiguration`.", - "type": "string" - }, - "masterHeartbeatPeriod": { - "description": "Interval in milliseconds between replication heartbeats.", - "format": "int64", - "type": "string" - }, - "password": { - "description": "The password for the replication connection.", - "type": "string" - }, - "sslCipher": { - "description": "A list of permissible ciphers to use for SSL encryption.", - "type": "string" - }, - "username": { - "description": "The username for the replication connection.", - "type": "string" - }, - "verifyServerCertificate": { - "description": "Whether or not to check the primary instance's Common Name value in the certificate that it sends during the SSL handshake.", - "type": "boolean" - } - }, - "type": "object" - }, - "MySqlSyncConfig": { - "description": "MySQL-specific external server sync settings.", - "id": "MySqlSyncConfig", - "properties": { - "initialSyncFlags": { - "description": "Flags to use for the initial dump.", - "items": { - "$ref": "SyncFlags" - }, - "type": "array" - } - }, - "type": "object" - }, - "OnPremisesConfiguration": { - "description": "On-premises instance configuration.", - "id": "OnPremisesConfiguration", - "properties": { - "caCertificate": { - "description": "PEM representation of the trusted CA's x509 certificate.", - "type": "string" - }, - "clientCertificate": { - "description": "PEM representation of the replica's x509 certificate.", - "type": "string" - }, - "clientKey": { - "description": "PEM representation of the replica's private key. The corresponding public key is encoded in the client's certificate.", - "type": "string" - }, - "dumpFilePath": { - "description": "The dump file to create the Cloud SQL replica.", - "type": "string" - }, - "hostPort": { - "description": "The host and port of the on-premises instance in host:port format", - "type": "string" - }, - "kind": { - "description": "This is always `sql#onPremisesConfiguration`.", - "type": "string" - }, - "password": { - "description": "The password for connecting to on-premises instance.", - "type": "string" - }, - "selectedObjects": { - "description": "Optional. A list of objects that the user selects for replication from an external source instance.", - "items": { - "$ref": "SelectedObjects" - }, - "type": "array" - }, - "sourceInstance": { - "$ref": "InstanceReference", - "description": "The reference to Cloud SQL instance if the source is Cloud SQL." - }, - "sslOption": { - "description": "Optional. SSL option for replica connection to the on-premises source.", - "enum": [ - "SSL_OPTION_UNSPECIFIED", - "DISABLE", - "REQUIRE", - "VERIFY_CA" - ], - "enumDescriptions": [ - "Unknown SSL option i.e. SSL option not specified by user.", - "SSL is not used for replica connection to the on-premises source.", - "SSL is required for replica connection to the on-premises source.", - "Verify CA is required for replica connection to the on-premises source." - ], - "type": "string" - }, - "username": { - "description": "The username for connecting to on-premises instance.", - "type": "string" - } - }, - "type": "object" - }, - "Operation": { - "description": "An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource.", - "id": "Operation", - "properties": { - "acquireSsrsLeaseContext": { - "$ref": "AcquireSsrsLeaseContext", - "description": "The context for acquire SSRS lease operation, if applicable." - }, - "apiWarning": { - "$ref": "ApiWarning", - "description": "An Admin API warning message." - }, - "backupContext": { - "$ref": "BackupContext", - "description": "The context for backup operation, if applicable." - }, - "endTime": { - "description": "The time this operation finished in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`.", - "format": "google-datetime", - "type": "string" - }, - "error": { - "$ref": "OperationErrors", - "description": "If errors occurred during processing of this operation, this field will be populated." - }, - "exportContext": { - "$ref": "ExportContext", - "description": "The context for export operation, if applicable." - }, - "importContext": { - "$ref": "ImportContext", - "description": "The context for import operation, if applicable." - }, - "insertTime": { - "description": "The time this operation was enqueued in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`.", - "format": "google-datetime", - "type": "string" - }, - "kind": { - "description": "This is always `sql#operation`.", - "type": "string" - }, - "name": { - "description": "An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation.", - "type": "string" - }, - "operationType": { - "description": "The type of the operation. Valid values are: * `CREATE` * `DELETE` * `UPDATE` * `RESTART` * `IMPORT` * `EXPORT` * `BACKUP_VOLUME` * `RESTORE_VOLUME` * `CREATE_USER` * `DELETE_USER` * `CREATE_DATABASE` * `DELETE_DATABASE`", - "enum": [ - "SQL_OPERATION_TYPE_UNSPECIFIED", - "IMPORT", - "EXPORT", - "CREATE", - "UPDATE", - "DELETE", - "RESTART", - "BACKUP", - "SNAPSHOT", - "BACKUP_VOLUME", - "DELETE_VOLUME", - "RESTORE_VOLUME", - "INJECT_USER", - "CLONE", - "STOP_REPLICA", - "START_REPLICA", - "PROMOTE_REPLICA", - "CREATE_REPLICA", - "CREATE_USER", - "DELETE_USER", - "UPDATE_USER", - "CREATE_DATABASE", - "DELETE_DATABASE", - "UPDATE_DATABASE", - "FAILOVER", - "DELETE_BACKUP", - "RECREATE_REPLICA", - "TRUNCATE_LOG", - "DEMOTE_MASTER", - "MAINTENANCE", - "ENABLE_PRIVATE_IP", - "DEFER_MAINTENANCE", - "CREATE_CLONE", - "RESCHEDULE_MAINTENANCE", - "START_EXTERNAL_SYNC", - "LOG_CLEANUP", - "AUTO_RESTART", - "REENCRYPT", - "SWITCHOVER", - "UPDATE_BACKUP", - "ACQUIRE_SSRS_LEASE", - "RELEASE_SSRS_LEASE", - "RECONFIGURE_OLD_PRIMARY", - "CLUSTER_MAINTENANCE", - "SELF_SERVICE_MAINTENANCE", - "SWITCHOVER_TO_REPLICA", - "MAJOR_VERSION_UPGRADE", - "ADVANCED_BACKUP", - "MANAGE_BACKUP", - "ENHANCED_BACKUP", - "REPAIR_READ_POOL", - "CREATE_READ_POOL", - "PRE_CHECK_MAJOR_VERSION_UPGRADE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - false, - true, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - true, - true, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - true, - true, - false, - false, - true, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Unknown operation type.", - "Imports data into a Cloud SQL instance.", - "Exports data from a Cloud SQL instance to a Cloud Storage bucket.", - "Creates a new Cloud SQL instance.", - "Updates the settings of a Cloud SQL instance.", - "Deletes a Cloud SQL instance.", - "Restarts the Cloud SQL instance.", - "", - "", - "Performs instance backup.", - "Deletes an instance backup.", - "Restores an instance backup.", - "Injects a privileged user in mysql for MOB instances.", - "Clones a Cloud SQL instance.", - "Stops replication on a Cloud SQL read replica instance.", - "Starts replication on a Cloud SQL read replica instance.", - "Promotes a Cloud SQL replica instance.", - "Creates a Cloud SQL replica instance.", - "Creates a new user in a Cloud SQL instance.", - "Deletes a user from a Cloud SQL instance.", - "Updates an existing user in a Cloud SQL instance. If a user with the specified username doesn't exist, a new user is created.", - "Creates a database in the Cloud SQL instance.", - "Deletes a database in the Cloud SQL instance.", - "Updates a database in the Cloud SQL instance.", - "Performs failover of an HA-enabled Cloud SQL failover replica.", - "Deletes the backup taken by a backup run.", - "", - "Truncates a general or slow log table in MySQL.", - "Demotes the stand-alone instance to be a Cloud SQL read replica for an external database server.", - "Indicates that the instance is currently in maintenance. Maintenance typically causes the instance to be unavailable for 1-3 minutes.", - "This field is deprecated, and will be removed in future version of API.", - "", - "Creates clone instance.", - "Reschedule maintenance to another time.", - "Starts external sync of a Cloud SQL EM replica to an external primary instance.", - "Recovers logs from an instance's old data disk.", - "Performs auto-restart of an HA-enabled Cloud SQL database for auto recovery.", - "Re-encrypts CMEK instances with latest key version.", - "Switches the roles of the primary and replica pair. The target instance should be the replica.", - "Update a backup.", - "Acquire a lease for the setup of SQL Server Reporting Services (SSRS).", - "Release a lease for the setup of SQL Server Reporting Services (SSRS).", - "Reconfigures old primary after a promote replica operation. Effect of a promote operation to the old primary is executed in this operation, asynchronously from the promote replica operation executed to the replica.", - "Indicates that the instance, its read replicas, and its cascading replicas are in maintenance. Maintenance typically gets initiated on groups of replicas first, followed by the primary instance. For each instance, maintenance typically causes the instance to be unavailable for 1-3 minutes.", - "Indicates that the instance (and any of its replicas) are currently in maintenance. This is initiated as a self-service request by using SSM. Maintenance typically causes the instance to be unavailable for 1-3 minutes.", - "Switches a primary instance to a replica. This operation runs as part of a switchover operation to the original primary instance.", - "Updates the major version of a Cloud SQL instance.", - "Deprecated: ADVANCED_BACKUP is deprecated. Use ENHANCED_BACKUP instead.", - "Changes the BackupTier of a Cloud SQL instance.", - "Creates a backup for an Enhanced BackupTier Cloud SQL instance.", - "Repairs entire read pool or specified read pool nodes in the read pool.", - "Creates a Cloud SQL read pool instance.", - "Pre-checks the major version upgrade operation." - ], - "type": "string" - }, - "preCheckMajorVersionUpgradeContext": { - "$ref": "PreCheckMajorVersionUpgradeContext", - "description": "This field is only populated when the operation_type is PRE_CHECK_MAJOR_VERSION_UPGRADE. The PreCheckMajorVersionUpgradeContext message itself contains the details for that pre-check, such as the target database version for the upgrade and the results of the check (including any warnings or errors found)." - }, - "selfLink": { - "description": "The URI of this resource.", - "type": "string" - }, - "startTime": { - "description": "The time this operation actually started in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`.", - "format": "google-datetime", - "type": "string" - }, - "status": { - "description": "The status of an operation.", - "enum": [ - "SQL_OPERATION_STATUS_UNSPECIFIED", - "PENDING", - "RUNNING", - "DONE" - ], - "enumDescriptions": [ - "The state of the operation is unknown.", - "The operation has been queued, but has not started yet.", - "The operation is running.", - "The operation completed." - ], - "type": "string" - }, - "subOperationType": { - "$ref": "SqlSubOperationType", - "description": "Optional. The sub operation based on the operation type." - }, - "targetId": { - "description": "Name of the resource on which this operation runs.", - "type": "string" - }, - "targetLink": { - "type": "string" - }, - "targetProject": { - "description": "The project ID of the target instance related to this operation.", - "type": "string" - }, - "user": { - "description": "The email address of the user who initiated this operation.", - "type": "string" - } - }, - "type": "object" - }, - "OperationError": { - "description": "Database instance operation error.", - "id": "OperationError", - "properties": { - "code": { - "description": "Identifies the specific error that occurred.", - "type": "string" - }, - "kind": { - "description": "This is always `sql#operationError`.", - "type": "string" - }, - "message": { - "description": "Additional information about the error encountered.", - "type": "string" - } - }, - "type": "object" - }, - "OperationErrors": { - "description": "Database instance operation errors list wrapper.", - "id": "OperationErrors", - "properties": { - "errors": { - "description": "The list of errors encountered while processing this operation.", - "items": { - "$ref": "OperationError" - }, - "type": "array" - }, - "kind": { - "description": "This is always `sql#operationErrors`.", - "type": "string" - } - }, - "type": "object" - }, - "OperationMetadata": { - "description": "Represents the metadata of the long-running operation.", - "id": "OperationMetadata", - "properties": { - "apiVersion": { - "description": "Output only. API version used to start the operation.", - "readOnly": true, - "type": "string" - }, - "cancelRequested": { - "description": "Output only. Identifies whether the user has requested cancellation of the operation. Operations that have been cancelled successfully have google.longrunning.Operation.error value with a google.rpc.Status.code of `1`, corresponding to `Code.CANCELLED`.", - "readOnly": true, - "type": "boolean" - }, - "createTime": { - "description": "Output only. The time the operation was created.", - "format": "google-datetime", - "readOnly": true, - "type": "string" - }, - "endTime": { - "description": "Output only. The time the operation finished running.", - "format": "google-datetime", - "readOnly": true, - "type": "string" - }, - "statusDetail": { - "description": "Output only. Human-readable status of the operation, if any.", - "readOnly": true, - "type": "string" - }, - "target": { - "description": "Output only. Server-defined resource path for the target of the operation.", - "readOnly": true, - "type": "string" - }, - "verb": { - "description": "Output only. Name of the verb executed by the operation.", - "readOnly": true, - "type": "string" - } - }, - "type": "object" - }, - "OperationsListResponse": { - "description": "Operations list response.", - "id": "OperationsListResponse", - "properties": { - "items": { - "description": "List of operation resources.", - "items": { - "$ref": "Operation" - }, - "type": "array" - }, - "kind": { - "description": "This is always `sql#operationsList`.", - "type": "string" - }, - "nextPageToken": { - "description": "The continuation token, used to page through large result sets. Provide this value in a subsequent request to return the next page of results.", - "type": "string" - } - }, - "type": "object" - }, - "PasswordStatus": { - "description": "Read-only password status.", - "id": "PasswordStatus", - "properties": { - "locked": { - "description": "If true, user does not have login privileges.", - "type": "boolean" - }, - "passwordExpirationTime": { - "description": "The expiration time of the current password.", - "format": "google-datetime", - "type": "string" - } - }, - "type": "object" - }, - "PasswordValidationPolicy": { - "description": "Database instance local user password validation policy. This message defines the password policy for local database users. When enabled, it enforces constraints on password complexity, length, and reuse. Keep this policy enabled to help prevent unauthorized access.", - "id": "PasswordValidationPolicy", - "properties": { - "complexity": { - "description": "The complexity of the password.", - "enum": [ - "COMPLEXITY_UNSPECIFIED", - "COMPLEXITY_DEFAULT" - ], - "enumDescriptions": [ - "Complexity check is not specified.", - "A combination of lowercase, uppercase, numeric, and non-alphanumeric characters." - ], - "type": "string" - }, - "disallowCompromisedCredentials": { - "deprecated": true, - "description": "This field is deprecated and will be removed in a future version of the API.", - "type": "boolean" - }, - "disallowUsernameSubstring": { - "description": "Disallow username as a part of the password.", - "type": "boolean" - }, - "enablePasswordPolicy": { - "description": "Whether to enable the password policy or not. When enabled, passwords must meet complexity requirements. Keep this policy enabled to help prevent unauthorized access. Disabling this policy allows weak passwords.", - "type": "boolean" - }, - "minLength": { - "description": "Minimum number of characters allowed.", - "format": "int32", - "type": "integer" - }, - "passwordChangeInterval": { - "description": "Minimum interval after which the password can be changed. This flag is only supported for PostgreSQL.", - "format": "google-duration", - "type": "string" - }, - "reuseInterval": { - "description": "Number of previous passwords that cannot be reused.", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "PerformDiskShrinkContext": { - "description": "Perform disk shrink context.", - "id": "PerformDiskShrinkContext", - "properties": { - "targetSizeGb": { - "description": "The target disk shrink size in GigaBytes.", - "format": "int64", - "type": "string" - } - }, - "type": "object" - }, - "PerformanceCaptureConfig": { - "description": "Performance Capture configuration.", - "id": "PerformanceCaptureConfig", - "properties": { - "enabled": { - "description": "Optional. Enable or disable the Performance Capture feature.", - "type": "boolean" - }, - "probeThreshold": { - "description": "Optional. The minimum number of consecutive readings above threshold that triggers instance state capture.", - "format": "int32", - "type": "integer" - }, - "probingIntervalSeconds": { - "description": "Optional. The time interval in seconds between any two probes.", - "format": "int32", - "type": "integer" - }, - "runningThreadsThreshold": { - "description": "Optional. The minimum number of server threads running to trigger the capture on primary.", - "format": "int32", - "type": "integer" - }, - "secondsBehindSourceThreshold": { - "description": "Optional. The minimum number of seconds replica must be lagging behind primary to trigger capture on replica.", - "format": "int32", - "type": "integer" - }, - "transactionDurationThreshold": { - "description": "Optional. The amount of time in seconds that a transaction needs to have been open before the watcher starts recording it.", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "PointInTimeRestoreContext": { - "description": "The context to perform a point-in-time recovery of an instance managed by Backup and Disaster Recovery (DR) Service.", - "id": "PointInTimeRestoreContext", - "properties": { - "allocatedIpRange": { - "description": "Optional. The name of the allocated IP range for the internal IP Cloud SQL instance. For example: \"google-managed-services-default\". If you set this, then Cloud SQL creates the IP address for the cloned instance in the allocated range. This range must comply with [RFC 1035](https://tools.ietf.org/html/rfc1035) standards. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])?. Reserved for future use.", - "type": "string" - }, - "datasource": { - "description": "The Backup and Disaster Recovery (DR) Service Datasource URI. Format: projects/{project}/locations/{region}/backupVaults/{backupvault}/dataSources/{datasource}.", - "type": "string" - }, - "pointInTime": { - "description": "Required. The date and time to which you want to restore the instance.", - "format": "google-datetime", - "type": "string" - }, - "preferredSecondaryZone": { - "description": "Optional. Point-in-time recovery of a regional instance in the specified zones. If not specified, clone to the same secondary zone as the source instance. This value cannot be the same as the preferred_zone field.", - "type": "string" - }, - "preferredZone": { - "description": "Optional. Point-in-time recovery of an instance to the specified zone. If no zone is specified, then clone to the same primary zone as the source instance.", - "type": "string" - }, - "privateNetwork": { - "description": "Optional. The resource link for the VPC network from which the Cloud SQL instance is accessible for private IP. For example, `/projects/myProject/global/networks/default`.", - "type": "string" - }, - "region": { - "description": "Optional. The region of the target instance where the datasource will be restored. For example: \"us-central1\".", - "type": "string" - }, - "targetInstance": { - "description": "Target instance name.", - "type": "string" - }, - "targetInstanceClearSettingsFieldNames": { - "description": "Optional. Specifies the instance settings that will be cleared from the source instance. This field is only applicable for cross project PITRs.", - "items": { - "type": "string" - }, - "type": "array" - }, - "targetInstanceSettings": { - "$ref": "DatabaseInstance", - "description": "Optional. Specifies the instance settings that will be overridden from the source instance. This field is only applicable for cross project PITRs." - } - }, - "type": "object" - }, - "PoolNodeConfig": { - "description": "Details of a single read pool node of a read pool.", - "id": "PoolNodeConfig", - "properties": { - "dnsName": { - "description": "Output only. The DNS name of the read pool node.", - "readOnly": true, - "type": "string" - }, - "dnsNames": { - "description": "Output only. The list of DNS names used by this read pool node.", - "items": { - "$ref": "DnsNameMapping" - }, - "readOnly": true, - "type": "array" - }, - "gceZone": { - "description": "Output only. The zone of the read pool node.", - "readOnly": true, - "type": "string" - }, - "ipAddresses": { - "description": "Output only. Mappings containing IP addresses that can be used to connect to the read pool node.", - "items": { - "$ref": "IpMapping" - }, - "readOnly": true, - "type": "array" - }, - "name": { - "description": "Output only. The name of the read pool node, to be used for retrieving metrics and logs.", - "readOnly": true, - "type": "string" - }, - "pscAutoConnections": { - "description": "Output only. The list of settings for requested automatically-setup Private Service Connect (PSC) consumer endpoints that can be used to connect to this read pool node.", - "items": { - "$ref": "PscAutoConnectionConfig" - }, - "readOnly": true, - "type": "array" - }, - "pscServiceAttachmentLink": { - "description": "Output only. The Private Service Connect (PSC) service attachment of the read pool node.", - "readOnly": true, - "type": "string" - }, - "state": { - "description": "Output only. The current state of the read pool node.", - "enum": [ - "SQL_INSTANCE_STATE_UNSPECIFIED", - "RUNNABLE", - "SUSPENDED", - "PENDING_DELETE", - "PENDING_CREATE", - "MAINTENANCE", - "FAILED", - "ONLINE_MAINTENANCE", - "REPAIRING" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - false, - true, - false - ], - "enumDescriptions": [ - "The state of the instance is unknown.", - "The instance is running, or has been stopped by owner.", - "The instance is not available, for example due to problems with billing.", - "The instance is being deleted.", - "The instance is being created.", - "The instance is down for maintenance.", - "The creation of the instance failed or a fatal error occurred during maintenance.", - "Deprecated", - "(Applicable to read pool nodes only.) The read pool node needs to be repaired. The database might be unavailable." - ], - "readOnly": true, - "type": "string" - } - }, - "type": "object" - }, - "PreCheckMajorVersionUpgradeContext": { - "description": "Pre-check major version upgrade context.", - "id": "PreCheckMajorVersionUpgradeContext", - "properties": { - "kind": { - "description": "Optional. This is always `sql#preCheckMajorVersionUpgradeContext`.", - "type": "string" - }, - "preCheckResponse": { - "description": "Output only. The responses from the precheck operation.", - "items": { - "$ref": "PreCheckResponse" - }, - "readOnly": true, - "type": "array" - }, - "targetDatabaseVersion": { - "description": "Required. The target database version to upgrade to.", - "enum": [ - "SQL_DATABASE_VERSION_UNSPECIFIED", - "MYSQL_5_1", - "MYSQL_5_5", - "MYSQL_5_6", - "MYSQL_5_7", - "MYSQL_8_0", - "MYSQL_8_0_18", - "MYSQL_8_0_26", - "MYSQL_8_0_27", - "MYSQL_8_0_28", - "MYSQL_8_0_29", - "MYSQL_8_0_30", - "MYSQL_8_0_31", - "MYSQL_8_0_32", - "MYSQL_8_0_33", - "MYSQL_8_0_34", - "MYSQL_8_0_35", - "MYSQL_8_0_36", - "MYSQL_8_0_37", - "MYSQL_8_0_39", - "MYSQL_8_0_40", - "MYSQL_8_0_41", - "MYSQL_8_0_42", - "MYSQL_8_0_43", - "MYSQL_8_0_44", - "MYSQL_8_0_45", - "MYSQL_8_0_46", - "MYSQL_8_4", - "MYSQL_9_7", - "SQLSERVER_2017_STANDARD", - "SQLSERVER_2017_ENTERPRISE", - "SQLSERVER_2017_EXPRESS", - "SQLSERVER_2017_WEB", - "POSTGRES_9_6", - "POSTGRES_10", - "POSTGRES_11", - "POSTGRES_12", - "POSTGRES_13", - "POSTGRES_14", - "POSTGRES_15", - "POSTGRES_16", - "POSTGRES_17", - "POSTGRES_18", - "SQLSERVER_2019_STANDARD", - "SQLSERVER_2019_ENTERPRISE", - "SQLSERVER_2019_EXPRESS", - "SQLSERVER_2019_WEB", - "SQLSERVER_2022_STANDARD", - "SQLSERVER_2022_ENTERPRISE", - "SQLSERVER_2022_EXPRESS", - "SQLSERVER_2022_WEB", - "SQLSERVER_2025_STANDARD", - "SQLSERVER_2025_ENTERPRISE", - "SQLSERVER_2025_EXPRESS" - ], - "enumDeprecated": [ - false, - true, - true, - false, - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "This is an unknown database version.", - "The database version is MySQL 5.1.", - "The database version is MySQL 5.5.", - "The database version is MySQL 5.6.", - "The database version is MySQL 5.7.", - "The database version is MySQL 8.", - "The database major version is MySQL 8.0 and the minor version is 18.", - "The database major version is MySQL 8.0 and the minor version is 26.", - "The database major version is MySQL 8.0 and the minor version is 27.", - "The database major version is MySQL 8.0 and the minor version is 28.", - "The database major version is MySQL 8.0 and the minor version is 29.", - "The database major version is MySQL 8.0 and the minor version is 30.", - "The database major version is MySQL 8.0 and the minor version is 31.", - "The database major version is MySQL 8.0 and the minor version is 32.", - "The database major version is MySQL 8.0 and the minor version is 33.", - "The database major version is MySQL 8.0 and the minor version is 34.", - "The database major version is MySQL 8.0 and the minor version is 35.", - "The database major version is MySQL 8.0 and the minor version is 36.", - "The database major version is MySQL 8.0 and the minor version is 37.", - "The database major version is MySQL 8.0 and the minor version is 39.", - "The database major version is MySQL 8.0 and the minor version is 40.", - "The database major version is MySQL 8.0 and the minor version is 41.", - "The database major version is MySQL 8.0 and the minor version is 42.", - "The database major version is MySQL 8.0 and the minor version is 43.", - "The database major version is MySQL 8.0 and the minor version is 44.", - "The database major version is MySQL 8.0 and the minor version is 45.", - "The database major version is MySQL 8.0 and the minor version is 46.", - "The database version is MySQL 8.4.", - "The database version is MySQL 9.7.", - "The database version is SQL Server 2017 Standard.", - "The database version is SQL Server 2017 Enterprise.", - "The database version is SQL Server 2017 Express.", - "The database version is SQL Server 2017 Web.", - "The database version is PostgreSQL 9.6.", - "The database version is PostgreSQL 10.", - "The database version is PostgreSQL 11.", - "The database version is PostgreSQL 12.", - "The database version is PostgreSQL 13.", - "The database version is PostgreSQL 14.", - "The database version is PostgreSQL 15.", - "The database version is PostgreSQL 16.", - "The database version is PostgreSQL 17.", - "The database version is PostgreSQL 18.", - "The database version is SQL Server 2019 Standard.", - "The database version is SQL Server 2019 Enterprise.", - "The database version is SQL Server 2019 Express.", - "The database version is SQL Server 2019 Web.", - "The database version is SQL Server 2022 Standard.", - "The database version is SQL Server 2022 Enterprise.", - "The database version is SQL Server 2022 Express.", - "The database version is SQL Server 2022 Web.", - "The database version is SQL Server 2025 Standard.", - "The database version is SQL Server 2025 Enterprise.", - "The database version is SQL Server 2025 Express." - ], - "type": "string" - } - }, - "type": "object" - }, - "PreCheckResponse": { - "description": "Structured PreCheckResponse containing message, type, and required actions.", - "id": "PreCheckResponse", - "properties": { - "actionsRequired": { - "description": "The actions that the user needs to take. Use repeated for multiple actions.", - "items": { - "type": "string" - }, - "type": "array" - }, - "message": { - "description": "The message to be displayed to the user.", - "type": "string" - }, - "messageType": { - "description": "The type of message whether it is an info, warning, or error.", - "enum": [ - "MESSAGE_TYPE_UNSPECIFIED", - "INFO", - "WARNING", - "ERROR" - ], - "enumDescriptions": [ - "Default unspecified value to prevent unintended behavior changes.", - "General informational messages that don't require action.", - "Warnings that might impact the upgrade but don't block it.", - "Errors that a user must resolve before proceeding with the upgrade." - ], - "type": "string" - } - }, - "type": "object" - }, - "PscAutoConnectionConfig": { - "description": "Settings for an automatically-setup Private Service Connect consumer endpoint that is used to connect to a Cloud SQL instance.", - "id": "PscAutoConnectionConfig", - "properties": { - "consumerNetwork": { - "description": "Optional. The consumer network of this consumer endpoint. This must be a resource path that includes both the host project and the network name. For example, `projects/project1/global/networks/network1`. The consumer host project of this network might be different from the consumer service project.", - "type": "string" - }, - "consumerNetworkStatus": { - "description": "The connection policy status of the consumer network.", - "type": "string" - }, - "consumerProject": { - "description": "Optional. This is the project ID of consumer service project of this consumer endpoint. This is only applicable if `consumer_network` is a shared VPC network.", - "type": "string" - }, - "ipAddress": { - "description": "The IP address of the consumer endpoint.", - "type": "string" - }, - "status": { - "description": "The connection status of the consumer endpoint.", - "type": "string" - } - }, - "type": "object" - }, - "PscConfig": { - "description": "PSC settings for a Cloud SQL instance.", - "id": "PscConfig", - "properties": { - "allowedConsumerProjects": { - "description": "Optional. The list of consumer projects that are allow-listed for PSC connections to this instance. This instance can be connected to with PSC from any network in these projects. Each consumer project in this list may be represented by a project number (numeric) or by a project id (alphanumeric).", - "items": { - "type": "string" - }, - "type": "array" - }, - "networkAttachmentUri": { - "description": "Optional. The network attachment of the consumer network that the Private Service Connect enabled Cloud SQL instance is authorized to connect via PSC interface. format: projects/PROJECT/regions/REGION/networkAttachments/ID", - "type": "string" - }, - "pscAutoConnections": { - "description": "Optional. The list of settings for requested Private Service Connect consumer endpoints that can be used to connect to this Cloud SQL instance.", - "items": { - "$ref": "PscAutoConnectionConfig" - }, - "type": "array" - }, - "pscAutoDnsEnabled": { - "description": "Optional. Indicates whether PSC DNS automation is enabled for this instance. When enabled, Cloud SQL provisions a universal DNS record across all networks configured with Private Service Connect (PSC) auto-connections. This will default to true for new instances when Private Service Connect is enabled.", - "type": "boolean" - }, - "pscEnabled": { - "description": "Whether PSC connectivity is enabled for this instance.", - "type": "boolean" - }, - "pscWriteEndpointDnsEnabled": { - "description": "Optional. Indicates whether PSC write endpoint DNS automation is enabled for this instance. When enabled, Cloud SQL provisions a universal global DNS record across all networks configured with Private Service Connect (PSC) auto-connections that always points to the cluster primary instance. This feature is only supported for Enterprise Plus edition. This will default to true for new Enterprise Plus instances when `psc_auto_dns_enabled` is enabled.", - "type": "boolean" - } - }, - "type": "object" - }, - "QueryResult": { - "description": "QueryResult contains the result of executing a single SQL statement.", - "id": "QueryResult", - "properties": { - "columns": { - "description": "List of columns included in the result. This also includes the data type of the column.", - "items": { - "$ref": "Column" - }, - "type": "array" - }, - "message": { - "description": "Message related to the SQL execution result.", - "type": "string" - }, - "partialResult": { - "description": "Set to true if the SQL execution's result is truncated due to size limits or an error retrieving results.", - "type": "boolean" - }, - "rows": { - "description": "Rows returned by the SQL statement.", - "items": { - "$ref": "Row" - }, - "type": "array" - }, - "status": { - "$ref": "Status", - "description": "If results were truncated due to an error, details of that error." - } - }, - "type": "object" - }, - "ReadPoolAutoScaleConfig": { - "description": "The read pool auto-scale configuration.", - "id": "ReadPoolAutoScaleConfig", - "properties": { - "disableScaleIn": { - "description": "Indicates whether read pool auto scaling supports scale in operations (removing nodes).", - "type": "boolean" - }, - "enabled": { - "description": "Indicates whether read pool auto scaling is enabled.", - "type": "boolean" - }, - "maxNodeCount": { - "description": "Maximum number of read pool nodes to be maintained.", - "format": "int32", - "type": "integer" - }, - "minNodeCount": { - "description": "Minimum number of read pool nodes to be maintained.", - "format": "int32", - "type": "integer" - }, - "scaleInCooldownSeconds": { - "description": "The cooldown period for scale-in operations.", - "format": "int32", - "type": "integer" - }, - "scaleOutCooldownSeconds": { - "description": "The cooldown period for scale-out operations.", - "format": "int32", - "type": "integer" - }, - "targetMetrics": { - "description": "Optional. Target metrics for read pool auto scaling.", - "items": { - "$ref": "TargetMetric" - }, - "type": "array" - } - }, - "type": "object" - }, - "ReplicaConfiguration": { - "description": "Read-replica configuration for connecting to the primary instance.", - "id": "ReplicaConfiguration", - "properties": { - "cascadableReplica": { - "description": "Optional. Specifies if a SQL Server replica is a cascadable replica. A cascadable replica is a SQL Server cross region replica that supports replica(s) under it.", - "type": "boolean" - }, - "failoverTarget": { - "description": "Specifies if the replica is the failover target. If the field is set to `true`, the replica will be designated as a failover replica. In case the primary instance fails, the replica instance will be promoted as the new primary instance. Only one replica can be specified as failover target, and the replica has to be in different zone with the primary instance.", - "type": "boolean" - }, - "kind": { - "description": "This is always `sql#replicaConfiguration`.", - "type": "string" - }, - "mysqlReplicaConfiguration": { - "$ref": "MySqlReplicaConfiguration", - "description": "MySQL specific configuration when replicating from a MySQL on-premises primary instance. Replication configuration information such as the username, password, certificates, and keys are not stored in the instance metadata. The configuration information is used only to set up the replication connection and is stored by MySQL in a file named `master.info` in the data directory." - } - }, - "type": "object" - }, - "ReplicationCluster": { - "description": "A primary instance and disaster recovery (DR) replica pair. A DR replica is a cross-region replica that you designate for failover in the event that the primary instance experiences regional failure. Applicable to MySQL and PostgreSQL.", - "id": "ReplicationCluster", - "properties": { - "drReplica": { - "description": "Output only. Read-only field that indicates whether the replica is a DR replica. This field is not set if the instance is a primary instance.", - "readOnly": true, - "type": "boolean" - }, - "failoverDrReplicaName": { - "description": "Optional. If the instance is a primary instance, then this field identifies the disaster recovery (DR) replica. A DR replica is an optional configuration for Enterprise Plus edition instances. If the instance is a read replica, then the field is not set. Set this field to a replica name to designate a DR replica for a primary instance. Remove the replica name to remove the DR replica designation.", - "type": "string" - }, - "psaWriteEndpoint": { - "description": "Output only. If set, this field indicates this instance has a private service access (PSA) DNS endpoint that is pointing to the primary instance of the cluster. If this instance is the primary, then the DNS endpoint points to this instance. After a switchover or replica failover operation, this DNS endpoint points to the promoted instance. This is a read-only field, returned to the user as information. This field can exist even if a standalone instance doesn't have a DR replica yet or the DR replica is deleted.", - "readOnly": true, - "type": "string" - } - }, - "type": "object" - }, - "Reschedule": { - "id": "Reschedule", - "properties": { - "rescheduleType": { - "description": "Required. The type of the reschedule.", - "enum": [ - "RESCHEDULE_TYPE_UNSPECIFIED", - "IMMEDIATE", - "NEXT_AVAILABLE_WINDOW", - "SPECIFIC_TIME" - ], - "enumDescriptions": [ - "", - "Reschedules maintenance to happen now (within 5 minutes).", - "Reschedules maintenance to occur within one week from the originally scheduled day and time.", - "Reschedules maintenance to a specific time and day." - ], - "type": "string" - }, - "scheduleTime": { - "description": "Optional. Timestamp when the maintenance shall be rescheduled to if reschedule_type=SPECIFIC_TIME, in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`.", - "format": "google-datetime", - "type": "string" - } - }, - "type": "object" - }, - "RestoreBackupContext": { - "description": "Database instance restore from backup context. Backup context contains source instance id and project id.", - "id": "RestoreBackupContext", - "properties": { - "backupRunId": { - "description": "The ID of the backup run to restore from.", - "format": "int64", - "type": "string" - }, - "instanceId": { - "description": "The ID of the instance that the backup was taken from.", - "type": "string" - }, - "kind": { - "description": "This is always `sql#restoreBackupContext`.", - "type": "string" - }, - "project": { - "description": "The full project ID of the source instance.", - "type": "string" - } - }, - "type": "object" - }, - "RotateEntraIdCertificateContext": { - "description": "Instance rotate Entra ID certificate context.", - "id": "RotateEntraIdCertificateContext", - "properties": { - "kind": { - "description": "Optional. This is always `sql#rotateEntraIdCertificateContext`.", - "type": "string" - }, - "nextVersion": { - "description": "Optional. The fingerprint of the next version to be rotated to. If left unspecified, will be rotated to the most recently added server certificate version.", - "type": "string" - } - }, - "type": "object" - }, - "RotateServerCaContext": { - "description": "Instance rotate server CA context.", - "id": "RotateServerCaContext", - "properties": { - "kind": { - "description": "This is always `sql#rotateServerCaContext`.", - "type": "string" - }, - "nextVersion": { - "description": "The fingerprint of the next version to be rotated to. If left unspecified, will be rotated to the most recently added server CA version.", - "type": "string" - } - }, - "type": "object" - }, - "RotateServerCertificateContext": { - "description": "Instance rotate server certificate context.", - "id": "RotateServerCertificateContext", - "properties": { - "kind": { - "description": "Optional. This is always `sql#rotateServerCertificateContext`.", - "type": "string" - }, - "nextVersion": { - "description": "The fingerprint of the next version to be rotated to. If left unspecified, will be rotated to the most recently added server certificate version.", - "type": "string" - } - }, - "type": "object" - }, - "Row": { - "description": "Contains the values for a row.", - "id": "Row", - "properties": { - "values": { - "description": "The values for the row.", - "items": { - "$ref": "Value" - }, - "type": "array" - } - }, - "type": "object" - }, - "SelectedObjects": { - "description": "A list of objects that the user selects for replication from an external source instance.", - "id": "SelectedObjects", - "properties": { - "database": { - "description": "Required. The name of the database to migrate.", - "type": "string" - } - }, - "type": "object" - }, - "Settings": { - "description": "Database instance settings.", - "id": "Settings", - "properties": { - "acceleratedReplicaMode": { - "description": "Optional. Whether the replica is in accelerated mode. This feature is in private preview and requires allowlisting to take effect.", - "type": "boolean" - }, - "activationPolicy": { - "description": "The activation policy specifies when the instance is activated; it is applicable only when the instance state is RUNNABLE. Valid values: * `ALWAYS`: The instance is on, and remains so even in the absence of connection requests. * `NEVER`: The instance is off; it is not activated, even if a connection request arrives.", - "enum": [ - "SQL_ACTIVATION_POLICY_UNSPECIFIED", - "ALWAYS", - "NEVER", - "ON_DEMAND" - ], - "enumDeprecated": [ - false, - false, - false, - true - ], - "enumDescriptions": [ - "Unknown activation plan.", - "The instance is always up and running.", - "The instance never starts.", - "The instance starts upon receiving requests." - ], - "type": "string" - }, - "activeDirectoryConfig": { - "$ref": "SqlActiveDirectoryConfig", - "description": "Active Directory configuration, relevant only for Cloud SQL for SQL Server." - }, - "advancedMachineFeatures": { - "$ref": "AdvancedMachineFeatures", - "description": "Specifies advanced machine configuration for the instances relevant only for SQL Server." - }, - "authorizedGaeApplications": { - "deprecated": true, - "description": "The App Engine app IDs that can access this instance. (Deprecated) Applied to First Generation instances only.", - "items": { - "type": "string" - }, - "type": "array" - }, - "autoUpgradeEnabled": { - "description": "Optional. Cloud SQL for MySQL auto-upgrade configuration. When this parameter is set to true, auto-upgrade is enabled for MySQL 8.0 minor versions. The MySQL version must be 8.0.35 or higher.", - "type": "boolean" - }, - "availabilityType": { - "description": "Availability type. Potential values: * `ZONAL`: The instance serves data from only one zone. Outages in that zone affect data accessibility. * `REGIONAL`: The instance can serve data from more than one zone in a region (it is highly available)./ For more information, see [Overview of the High Availability Configuration](https://cloud.google.com/sql/docs/mysql/high-availability).", - "enum": [ - "SQL_AVAILABILITY_TYPE_UNSPECIFIED", - "ZONAL", - "REGIONAL" - ], - "enumDescriptions": [ - "This is an unknown Availability type.", - "Zonal available instance.", - "Regional available instance." - ], - "type": "string" - }, - "backupConfiguration": { - "$ref": "BackupConfiguration", - "description": "The daily backup configuration for the instance." - }, - "collation": { - "description": "The name of server Instance collation.", - "type": "string" - }, - "connectionPoolConfig": { - "$ref": "ConnectionPoolConfig", - "description": "Optional. The managed connection pooling configuration for the instance." - }, - "connectorEnforcement": { - "description": "Specifies if connections must use Cloud SQL connectors. Option values include the following: `NOT_REQUIRED` (Cloud SQL instances can be connected without Cloud SQL Connectors) and `REQUIRED` (Only allow connections that use Cloud SQL Connectors). Note that using REQUIRED disables all existing authorized networks. If this field is not specified when creating a new instance, NOT_REQUIRED is used. If this field is not specified when patching or updating an existing instance, it is left unchanged in the instance.", - "enum": [ - "CONNECTOR_ENFORCEMENT_UNSPECIFIED", - "NOT_REQUIRED", - "REQUIRED" - ], - "enumDescriptions": [ - "The requirement for Cloud SQL connectors is unknown.", - "Do not require Cloud SQL connectors.", - "Require all connections to use Cloud SQL connectors, including the Cloud SQL Auth Proxy and Cloud SQL Java, Python, and Go connectors. Note: This disables all existing authorized networks." - ], - "type": "string" - }, - "crashSafeReplicationEnabled": { - "deprecated": true, - "description": "Configuration specific to read replica instances. Indicates whether database flags for crash-safe replication are enabled. This property was only applicable to First Generation instances.", - "type": "boolean" - }, - "dataApiAccess": { - "description": "This parameter controls whether to allow using ExecuteSql API to connect to the instance. Not allowed by default.", - "enum": [ - "DATA_API_ACCESS_UNSPECIFIED", - "DISALLOW_DATA_API", - "ALLOW_DATA_API" - ], - "enumDescriptions": [ - "Unspecified, effectively the same as `DISALLOW_DATA_API`.", - "Disallow using ExecuteSql API to connect to the instance.", - "Allow using ExecuteSql API to connect to the instance. For private IP instances, this allows authorized users to access the instance from the public internet using ExecuteSql API." - ], - "type": "string" - }, - "dataCacheConfig": { - "$ref": "DataCacheConfig", - "description": "Configuration for data cache." - }, - "dataDiskProvisionedIops": { - "description": "Optional. Provisioned number of I/O operations per second for the data disk. This field is only used for hyperdisk-balanced disk types.", - "format": "int64", - "type": "string" - }, - "dataDiskProvisionedThroughput": { - "description": "Optional. Provisioned throughput measured in MiB per second for the data disk. This field is only used for hyperdisk-balanced disk types.", - "format": "int64", - "type": "string" - }, - "dataDiskSizeGb": { - "description": "The size of data disk, in GB. The data disk size minimum is 10GB.", - "format": "int64", - "type": "string" - }, - "dataDiskType": { - "description": "The type of data disk: `PD_SSD` (default) or `PD_HDD`. Not used for First Generation instances.", - "enum": [ - "SQL_DATA_DISK_TYPE_UNSPECIFIED", - "PD_SSD", - "PD_HDD", - "OBSOLETE_LOCAL_SSD", - "HYPERDISK_BALANCED" - ], - "enumDeprecated": [ - false, - false, - false, - true, - false - ], - "enumDescriptions": [ - "This is an unknown data disk type.", - "An SSD data disk.", - "An HDD data disk.", - "This field is deprecated and will be removed from a future version of the API.", - "A Hyperdisk Balanced data disk." - ], - "type": "string" - }, - "databaseFlags": { - "description": "The database flags passed to the instance at startup.", - "items": { - "$ref": "DatabaseFlags" - }, - "type": "array" - }, - "databaseReplicationEnabled": { - "description": "Configuration specific to read replica instances. Indicates whether replication is enabled or not. WARNING: Changing this restarts the instance.", - "type": "boolean" - }, - "deletionProtectionEnabled": { - "description": "Configuration to protect against accidental instance deletion.", - "type": "boolean" - }, - "denyMaintenancePeriods": { - "description": "Deny maintenance periods", - "items": { - "$ref": "DenyMaintenancePeriod" - }, - "type": "array" - }, - "edition": { - "description": "Optional. The edition of the instance.", - "enum": [ - "EDITION_UNSPECIFIED", - "ENTERPRISE", - "ENTERPRISE_PLUS" - ], - "enumDescriptions": [ - "The instance did not specify the edition.", - "The instance is an enterprise edition.", - "The instance is an Enterprise Plus edition." - ], - "type": "string" - }, - "enableDataplexIntegration": { - "description": "Optional. By default, Cloud SQL instances have schema extraction disabled for Dataplex. When this parameter is set to true, schema extraction for Dataplex on Cloud SQL instances is activated.", - "type": "boolean" - }, - "enableGoogleMlIntegration": { - "description": "Optional. When this parameter is set to true, Cloud SQL instances can connect to Vertex AI to pass requests for real-time predictions and insights to the AI. The default value is false. This applies only to Cloud SQL for MySQL and Cloud SQL for PostgreSQL instances.", - "type": "boolean" - }, - "entraidConfig": { - "$ref": "SqlServerEntraIdConfig", - "description": "Optional. The Microsoft Entra ID configuration for the SQL Server instance." - }, - "finalBackupConfig": { - "$ref": "FinalBackupConfig", - "description": "Optional. The final backup configuration for the instance." - }, - "insightsConfig": { - "$ref": "InsightsConfig", - "description": "Insights configuration, for now relevant only for Postgres." - }, - "ipConfiguration": { - "$ref": "IpConfiguration", - "description": "The settings for IP Management. This allows to enable or disable the instance IP and manage which external networks can connect to the instance. The IPv4 address cannot be disabled for Second Generation instances." - }, - "kind": { - "description": "This is always `sql#settings`.", - "type": "string" - }, - "locationPreference": { - "$ref": "LocationPreference", - "description": "The location preference settings. This allows the instance to be located as near as possible to either an App Engine app or Compute Engine zone for better performance. App Engine co-location was only applicable to First Generation instances." - }, - "maintenanceWindow": { - "$ref": "MaintenanceWindow", - "description": "The maintenance window for this instance. This specifies when the instance can be restarted for maintenance purposes." - }, - "passwordValidationPolicy": { - "$ref": "PasswordValidationPolicy", - "description": "The local user password validation policy of the instance." - }, - "performanceCaptureConfig": { - "$ref": "PerformanceCaptureConfig", - "description": "Optional. Configuration for Performance Capture, provides diagnostic metrics during high load situations." - }, - "pricingPlan": { - "description": "The pricing plan for this instance. This can be either `PER_USE` or `PACKAGE`. Only `PER_USE` is supported for Second Generation instances.", - "enum": [ - "SQL_PRICING_PLAN_UNSPECIFIED", - "PACKAGE", - "PER_USE" - ], - "enumDescriptions": [ - "This is an unknown pricing plan for this instance.", - "The instance is billed at a monthly flat rate.", - "The instance is billed per usage." - ], - "type": "string" - }, - "readPoolAutoScaleConfig": { - "$ref": "ReadPoolAutoScaleConfig", - "description": "Optional. The read pool auto-scale configuration for the instance." - }, - "replicationLagMaxSeconds": { - "description": "Optional. Configuration value for recreation of replica after certain replication lag", - "format": "int32", - "type": "integer" - }, - "replicationType": { - "deprecated": true, - "description": "The type of replication this instance uses. This can be either `ASYNCHRONOUS` or `SYNCHRONOUS`. (Deprecated) This property was only applicable to First Generation instances.", - "enum": [ - "SQL_REPLICATION_TYPE_UNSPECIFIED", - "SYNCHRONOUS", - "ASYNCHRONOUS" - ], - "enumDescriptions": [ - "This is an unknown replication type for a Cloud SQL instance.", - "The synchronous replication mode for First Generation instances. It is the default value.", - "The asynchronous replication mode for First Generation instances. It provides a slight performance gain, but if an outage occurs while this option is set to asynchronous, you can lose up to a few seconds of updates to your data." - ], - "type": "string" - }, - "retainBackupsOnDelete": { - "description": "Optional. When this parameter is set to true, Cloud SQL retains backups of the instance even after the instance is deleted. The ON_DEMAND backup will be retained until customer deletes the backup or the project. The AUTOMATED backup will be retained based on the backups retention setting.", - "type": "boolean" - }, - "settingsVersion": { - "description": "The version of instance settings. This is a required field for update method to make sure concurrent updates are handled properly. During update, use the most recent settingsVersion value for this instance and do not try to update this value.", - "format": "int64", - "type": "string" - }, - "sqlServerAuditConfig": { - "$ref": "SqlServerAuditConfig", - "description": "SQL Server specific audit configuration." - }, - "storageAutoResize": { - "description": "Configuration to increase storage size automatically. The default value is true.", - "type": "boolean" - }, - "storageAutoResizeLimit": { - "description": "The maximum size to which storage capacity can be automatically increased. The default value is 0, which specifies that there is no limit.", - "format": "int64", - "type": "string" - }, - "tier": { - "description": "The tier (or machine type) for this instance, for example `db-custom-1-3840`. WARNING: Changing this restarts the instance.", - "type": "string" - }, - "timeZone": { - "description": "Server timezone, relevant only for Cloud SQL for SQL Server.", - "type": "string" - }, - "userLabels": { - "additionalProperties": { - "type": "string" - }, - "description": "User-provided labels, represented as a dictionary where each label is a single key value pair.", - "type": "object" - } - }, - "type": "object" - }, - "SqlActiveDirectoryConfig": { - "description": "Active Directory configuration, relevant only for Cloud SQL for SQL Server.", - "id": "SqlActiveDirectoryConfig", - "properties": { - "adminCredentialSecretName": { - "description": "Optional. The secret manager key storing the administrator credential. (e.g., projects/{project}/secrets/{secret}).", - "type": "string" - }, - "dnsServers": { - "description": "Optional. Domain controller IPv4 addresses used to bootstrap Active Directory.", - "items": { - "type": "string" - }, - "type": "array" - }, - "domain": { - "description": "The name of the domain (e.g., mydomain.com).", - "type": "string" - }, - "kind": { - "description": "This is always sql#activeDirectoryConfig.", - "type": "string" - }, - "mode": { - "description": "Optional. The mode of the Active Directory configuration.", - "enum": [ - "ACTIVE_DIRECTORY_MODE_UNSPECIFIED", - "MANAGED_ACTIVE_DIRECTORY", - "SELF_MANAGED_ACTIVE_DIRECTORY", - "CUSTOMER_MANAGED_ACTIVE_DIRECTORY" - ], - "enumDeprecated": [ - false, - false, - true, - false - ], - "enumDescriptions": [ - "Unspecified mode. Will default to MANAGED_ACTIVE_DIRECTORY if the mode is not specified to maintain backward compatibility.", - "Managed Active Directory mode.", - "Deprecated: Use CUSTOMER_MANAGED_ACTIVE_DIRECTORY instead.", - "Customer-managed Active Directory mode." - ], - "type": "string" - }, - "organizationalUnit": { - "description": "Optional. The organizational unit distinguished name. This is the full hierarchical path to the organizational unit.", - "type": "string" - } - }, - "type": "object" - }, - "SqlExternalSyncSettingError": { - "description": "External primary instance migration setting error/warning.", - "id": "SqlExternalSyncSettingError", - "properties": { - "detail": { - "description": "Additional information about the error encountered.", - "type": "string" - }, - "kind": { - "description": "Can be `sql#externalSyncSettingError` or `sql#externalSyncSettingWarning`.", - "type": "string" - }, - "type": { - "description": "Identifies the specific error that occurred.", - "enum": [ - "SQL_EXTERNAL_SYNC_SETTING_ERROR_TYPE_UNSPECIFIED", - "CONNECTION_FAILURE", - "BINLOG_NOT_ENABLED", - "INCOMPATIBLE_DATABASE_VERSION", - "REPLICA_ALREADY_SETUP", - "INSUFFICIENT_PRIVILEGE", - "UNSUPPORTED_MIGRATION_TYPE", - "NO_PGLOGICAL_INSTALLED", - "PGLOGICAL_NODE_ALREADY_EXISTS", - "INVALID_WAL_LEVEL", - "INVALID_SHARED_PRELOAD_LIBRARY", - "INSUFFICIENT_MAX_REPLICATION_SLOTS", - "INSUFFICIENT_MAX_WAL_SENDERS", - "INSUFFICIENT_MAX_WORKER_PROCESSES", - "UNSUPPORTED_EXTENSIONS", - "INVALID_RDS_LOGICAL_REPLICATION", - "INVALID_LOGGING_SETUP", - "INVALID_DB_PARAM", - "UNSUPPORTED_GTID_MODE", - "SQLSERVER_AGENT_NOT_RUNNING", - "UNSUPPORTED_TABLE_DEFINITION", - "UNSUPPORTED_DEFINER", - "SQLSERVER_SERVERNAME_MISMATCH", - "PRIMARY_ALREADY_SETUP", - "UNSUPPORTED_BINLOG_FORMAT", - "BINLOG_RETENTION_SETTING", - "UNSUPPORTED_STORAGE_ENGINE", - "LIMITED_SUPPORT_TABLES", - "EXISTING_DATA_IN_REPLICA", - "MISSING_OPTIONAL_PRIVILEGES", - "RISKY_BACKUP_ADMIN_PRIVILEGE", - "INSUFFICIENT_GCS_PERMISSIONS", - "INVALID_FILE_INFO", - "UNSUPPORTED_DATABASE_SETTINGS", - "MYSQL_PARALLEL_IMPORT_INSUFFICIENT_PRIVILEGE", - "LOCAL_INFILE_OFF", - "TURN_ON_PITR_AFTER_PROMOTE", - "INCOMPATIBLE_DATABASE_MINOR_VERSION", - "SOURCE_MAX_SUBSCRIPTIONS", - "UNABLE_TO_VERIFY_DEFINERS", - "SUBSCRIPTION_CALCULATION_STATUS", - "PG_SUBSCRIPTION_COUNT", - "PG_SYNC_PARALLEL_LEVEL", - "INSUFFICIENT_DISK_SIZE", - "INSUFFICIENT_MACHINE_TIER", - "UNSUPPORTED_EXTENSIONS_NOT_MIGRATED", - "EXTENSIONS_NOT_MIGRATED", - "PG_CRON_FLAG_ENABLED_IN_REPLICA", - "EXTENSIONS_NOT_ENABLED_IN_REPLICA", - "UNSUPPORTED_COLUMNS", - "USERS_NOT_CREATED_IN_REPLICA", - "UNSUPPORTED_SYSTEM_OBJECTS", - "UNSUPPORTED_TABLES_WITH_REPLICA_IDENTITY", - "SELECTED_OBJECTS_NOT_EXIST_ON_SOURCE", - "PSC_ONLY_INSTANCE_WITH_NO_NETWORK_ATTACHMENT_URI", - "SELECTED_OBJECTS_REFERENCE_UNSELECTED_OBJECTS", - "PROMPT_DELETE_EXISTING", - "WILL_DELETE_EXISTING", - "PG_DDL_REPLICATION_INSUFFICIENT_PRIVILEGE" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "", - "The replication user is missing privileges that are required.", - "Unsupported migration type.", - "No pglogical extension installed on databases, applicable for postgres.", - "pglogical node already exists on databases, applicable for postgres.", - "The value of parameter wal_level is not set to logical.", - "The value of parameter shared_preload_libraries does not include pglogical.", - "The value of parameter max_replication_slots is not sufficient.", - "The value of parameter max_wal_senders is not sufficient.", - "The value of parameter max_worker_processes is not sufficient.", - "Extensions installed are either not supported or having unsupported versions.", - "The value of parameter rds.logical_replication is not set to 1.", - "The primary instance logging setup doesn't allow EM sync.", - "The primary instance database parameter setup doesn't allow EM sync.", - "The gtid_mode is not supported, applicable for MySQL.", - "SQL Server Agent is not running.", - "The table definition is not support due to missing primary key or replica identity, applicable for postgres. Note that this is a warning and won't block the migration.", - "The customer has a definer that will break EM setup.", - "SQL Server @@SERVERNAME does not match actual host name.", - "The primary instance has been setup and will fail the setup.", - "The primary instance has unsupported binary log format.", - "The primary instance's binary log retention setting.", - "The primary instance has tables with unsupported storage engine.", - "Source has tables with limited support eg: PostgreSQL tables without primary keys.", - "The replica instance contains existing data.", - "The replication user is missing privileges that are optional.", - "Additional BACKUP_ADMIN privilege is granted to the replication user which may lock source MySQL 8 instance for DDLs during initial sync.", - "The Cloud Storage bucket is missing necessary permissions.", - "The Cloud Storage bucket has an error in the file or contains invalid file information.", - "The source instance has unsupported database settings for migration.", - "The replication user is missing parallel import specific privileges. (e.g. LOCK TABLES) for MySQL.", - "The global variable local_infile is off on external server replica.", - "This code instructs customers to turn on point-in-time recovery manually for the instance after promoting the Cloud SQL for PostgreSQL instance.", - "The minor version of replica database is incompatible with the source.", - "This warning message indicates that Cloud SQL uses the maximum number of subscriptions to migrate data from the source to the destination.", - "Unable to verify definers on the source for MySQL.", - "If a time out occurs while the subscription counts are calculated, then this value is set to 1. Otherwise, this value is set to 2.", - "Count of subscriptions needed to sync source data for PostgreSQL database.", - "Final parallel level that is used to do migration.", - "The disk size of the replica instance is smaller than the data size of the source instance.", - "The data size of the source instance is greater than 1 TB, the number of cores of the replica instance is less than 8, and the memory of the replica is less than 32 GB.", - "The warning message indicates the unsupported extensions will not be migrated to the destination.", - "The warning message indicates the pg_cron extension and settings will not be migrated to the destination.", - "The error message indicates that pg_cron flags are enabled on the destination which is not supported during the migration.", - "This error message indicates that the specified extensions are not enabled on destination instance. For example, before you can migrate data to the destination instance, you must enable the PGAudit extension on the instance.", - "The source database has generated columns that can't be migrated. Please change them to regular columns before migration.", - "The source database has users that aren't created in the replica. First, create all users, which are in the pg_user_mappings table of the source database, in the destination instance. Then, perform the migration.", - "The selected objects include system objects that aren't supported for migration.", - "The source database has tables with the FULL or NOTHING replica identity. Before starting your migration, either remove the identity or change it to DEFAULT. Note that this is an error and will block the migration.", - "The selected objects don't exist on the source instance.", - "PSC only destination instance does not have a network attachment URI.", - "Selected objects reference unselected objects. Based on their object type (foreign key constraint or view), selected objects will fail during migration.", - "The migration will delete existing data in the replica; set replica_overwrite_enabled in the request to acknowledge this. This is an error. MySQL only.", - "The migration will delete existing data in the replica; replica_overwrite_enabled was set in the request acknowledging this. This is a warning rather than an error. MySQL only.", - "The replication user is missing specific privileges to setup DDL replication. (e.g. CREATE EVENT TRIGGER, CREATE SCHEMA) for PostgreSQL." - ], - "type": "string" - } - }, - "type": "object" - }, - "SqlInstancesAcquireSsrsLeaseResponse": { - "description": "Response for the acquire SSRS lease request.", - "id": "SqlInstancesAcquireSsrsLeaseResponse", - "properties": { - "operationId": { - "description": "The unique identifier for this operation.", - "type": "string" - } - }, - "type": "object" - }, - "SqlInstancesExecuteSqlResponse": { - "description": "Execute SQL statements response.", - "id": "SqlInstancesExecuteSqlResponse", - "properties": { - "messages": { - "description": "A list of notices and warnings generated during query execution. For PostgreSQL, this includes all notices and warnings. For MySQL, this includes warnings generated by the last executed statement. To retrieve all warnings for a multi-statement query, `SHOW WARNINGS` must be executed after each statement.", - "items": { - "$ref": "Message" - }, - "type": "array" - }, - "metadata": { - "$ref": "Metadata", - "description": "The additional metadata information regarding the execution of the SQL statements." - }, - "results": { - "description": "The list of results after executing all the SQL statements.", - "items": { - "$ref": "QueryResult" - }, - "type": "array" - }, - "status": { - "$ref": "Status", - "description": "Contains the error from the database if the SQL execution failed." - } - }, - "type": "object" - }, - "SqlInstancesGetDiskShrinkConfigResponse": { - "description": "Instance get disk shrink config response.", - "id": "SqlInstancesGetDiskShrinkConfigResponse", - "properties": { - "kind": { - "description": "This is always `sql#getDiskShrinkConfig`.", - "type": "string" - }, - "message": { - "description": "Additional message to customers.", - "type": "string" - }, - "minimalTargetSizeGb": { - "description": "The minimum size to which a disk can be shrunk in GigaBytes.", - "format": "int64", - "type": "string" - } - }, - "type": "object" - }, - "SqlInstancesGetLatestRecoveryTimeResponse": { - "description": "Instance get latest recovery time response.", - "id": "SqlInstancesGetLatestRecoveryTimeResponse", - "properties": { - "earliestRecoveryTime": { - "description": "Timestamp, identifies the earliest recovery time of the source instance.", - "format": "google-datetime", - "type": "string" - }, - "kind": { - "description": "This is always `sql#getLatestRecoveryTime`.", - "type": "string" - }, - "latestRecoveryTime": { - "description": "Timestamp, identifies the latest recovery time of the source instance.", - "format": "google-datetime", - "type": "string" - } - }, - "type": "object" - }, - "SqlInstancesReleaseSsrsLeaseResponse": { - "description": "Response for the release SSRS lease request.", - "id": "SqlInstancesReleaseSsrsLeaseResponse", - "properties": { - "operationId": { - "description": "The unique identifier for this operation.", - "type": "string" - } - }, - "type": "object" - }, - "SqlInstancesRescheduleMaintenanceRequestBody": { - "description": "Reschedule options for maintenance windows.", - "id": "SqlInstancesRescheduleMaintenanceRequestBody", - "properties": { - "reschedule": { - "$ref": "Reschedule", - "description": "Required. The type of the reschedule the user wants." - } - }, - "type": "object" - }, - "SqlInstancesResetReplicaSizeRequest": { - "description": "Instance reset replica size request.", - "id": "SqlInstancesResetReplicaSizeRequest", - "properties": {}, - "type": "object" - }, - "SqlInstancesStartExternalSyncRequest": { - "description": "Instance start external sync request.", - "id": "SqlInstancesStartExternalSyncRequest", - "properties": { - "migrationType": { - "description": "Optional. MigrationType configures the migration to use physical files or logical dump files. If not set, then the logical dump file configuration is used. Valid values are `LOGICAL` or `PHYSICAL`. Only applicable to MySQL.", - "enum": [ - "MIGRATION_TYPE_UNSPECIFIED", - "LOGICAL", - "PHYSICAL" - ], - "enumDescriptions": [ - "Default value is a logical dump file-based migration", - "Logical dump file-based migration", - "Physical file-based migration" - ], - "type": "string" - }, - "mysqlSyncConfig": { - "$ref": "MySqlSyncConfig", - "description": "MySQL-specific settings for start external sync." - }, - "replicaOverwriteEnabled": { - "description": "Optional. MySQL only. True if end-user has confirmed that this SES call will wipe replica databases overlapping with the proposed selected_objects. If this field is not set and there are both overlapping and additional databases proposed, an error will be returned.", - "type": "boolean" - }, - "skipVerification": { - "description": "Whether to skip the verification step (VESS).", - "type": "boolean" - }, - "syncMode": { - "description": "External sync mode.", - "enum": [ - "EXTERNAL_SYNC_MODE_UNSPECIFIED", - "ONLINE", - "OFFLINE" - ], - "enumDescriptions": [ - "Unknown external sync mode, will be defaulted to ONLINE mode", - "Online external sync will set up replication after initial data external sync", - "Offline external sync only dumps and loads a one-time snapshot of the primary instance's data" - ], - "type": "string" - }, - "syncParallelLevel": { - "description": "Optional. Parallel level for initial data sync. Currently only applicable for MySQL.", - "enum": [ - "EXTERNAL_SYNC_PARALLEL_LEVEL_UNSPECIFIED", - "MIN", - "OPTIMAL", - "MAX" - ], - "enumDescriptions": [ - "Unknown sync parallel level. Will be defaulted to OPTIMAL.", - "Minimal parallel level.", - "Optimal parallel level.", - "Maximum parallel level." - ], - "type": "string" - } - }, - "type": "object" - }, - "SqlInstancesVerifyExternalSyncSettingsRequest": { - "description": "Instance verify external sync settings request.", - "id": "SqlInstancesVerifyExternalSyncSettingsRequest", - "properties": { - "migrationType": { - "description": "Optional. MigrationType configures the migration to use physical files or logical dump files. If not set, then the logical dump file configuration is used. Valid values are `LOGICAL` or `PHYSICAL`. Only applicable to MySQL.", - "enum": [ - "MIGRATION_TYPE_UNSPECIFIED", - "LOGICAL", - "PHYSICAL" - ], - "enumDescriptions": [ - "Default value is a logical dump file-based migration", - "Logical dump file-based migration", - "Physical file-based migration" - ], - "type": "string" - }, - "mysqlSyncConfig": { - "$ref": "MySqlSyncConfig", - "description": "Optional. MySQL-specific settings for start external sync." - }, - "selectedObjects": { - "description": "Optional. Migrate only the specified objects from the source instance. If this field is empty, then migrate all objects.", - "items": { - "$ref": "ExternalSyncSelectedObject" - }, - "type": "array" - }, - "syncMode": { - "description": "External sync mode", - "enum": [ - "EXTERNAL_SYNC_MODE_UNSPECIFIED", - "ONLINE", - "OFFLINE" - ], - "enumDescriptions": [ - "Unknown external sync mode, will be defaulted to ONLINE mode", - "Online external sync will set up replication after initial data external sync", - "Offline external sync only dumps and loads a one-time snapshot of the primary instance's data" - ], - "type": "string" - }, - "syncParallelLevel": { - "description": "Optional. Parallel level for initial data sync. Only applicable for PostgreSQL.", - "enum": [ - "EXTERNAL_SYNC_PARALLEL_LEVEL_UNSPECIFIED", - "MIN", - "OPTIMAL", - "MAX" - ], - "enumDescriptions": [ - "Unknown sync parallel level. Will be defaulted to OPTIMAL.", - "Minimal parallel level.", - "Optimal parallel level.", - "Maximum parallel level." - ], - "type": "string" - }, - "verifyConnectionOnly": { - "description": "Flag to enable verifying connection only", - "type": "boolean" - }, - "verifyReplicationOnly": { - "description": "Optional. Flag to verify settings required by replication setup only", - "type": "boolean" - } - }, - "type": "object" - }, - "SqlInstancesVerifyExternalSyncSettingsResponse": { - "description": "Instance verify external sync settings response.", - "id": "SqlInstancesVerifyExternalSyncSettingsResponse", - "properties": { - "errors": { - "description": "List of migration violations.", - "items": { - "$ref": "SqlExternalSyncSettingError" - }, - "type": "array" - }, - "kind": { - "description": "This is always `sql#migrationSettingErrorList`.", - "type": "string" - }, - "warnings": { - "description": "List of migration warnings.", - "items": { - "$ref": "SqlExternalSyncSettingError" - }, - "type": "array" - } - }, - "type": "object" - }, - "SqlOutOfDiskReport": { - "description": "This message wraps up the information written by out-of-disk detection job.", - "id": "SqlOutOfDiskReport", - "properties": { - "sqlMinRecommendedIncreaseSizeGb": { - "description": "The minimum recommended increase size in GigaBytes This field is consumed by the frontend * Writers: * the proactive database wellness job for OOD. * Readers:", - "format": "int32", - "type": "integer" - }, - "sqlOutOfDiskState": { - "description": "This field represents the state generated by the proactive database wellness job for OutOfDisk issues. * Writers: * the proactive database wellness job for OOD. * Readers: * the proactive database wellness job", - "enum": [ - "SQL_OUT_OF_DISK_STATE_UNSPECIFIED", - "NORMAL", - "SOFT_SHUTDOWN" - ], - "enumDescriptions": [ - "Unspecified state", - "The instance has plenty space on data disk", - "Data disk is almost used up. It is shutdown to prevent data corruption." - ], - "type": "string" - } - }, - "type": "object" - }, - "SqlScheduledMaintenance": { - "description": "Any scheduled maintenance for this instance.", - "id": "SqlScheduledMaintenance", - "properties": { - "canDefer": { - "deprecated": true, - "type": "boolean" - }, - "canReschedule": { - "description": "If the scheduled maintenance can be rescheduled.", - "type": "boolean" - }, - "scheduleDeadlineTime": { - "description": "Maintenance cannot be rescheduled to start beyond this deadline.", - "format": "google-datetime", - "type": "string" - }, - "startTime": { - "description": "The start time of any upcoming scheduled maintenance for this instance.", - "format": "google-datetime", - "type": "string" - } - }, - "type": "object" - }, - "SqlServerAuditConfig": { - "description": "SQL Server specific audit configuration.", - "id": "SqlServerAuditConfig", - "properties": { - "bucket": { - "description": "The name of the destination bucket (e.g., gs://mybucket).", - "type": "string" - }, - "kind": { - "description": "This is always sql#sqlServerAuditConfig", - "type": "string" - }, - "retentionInterval": { - "description": "How long to keep generated audit files.", - "format": "google-duration", - "type": "string" - }, - "uploadInterval": { - "description": "How often to upload generated audit files.", - "format": "google-duration", - "type": "string" - } - }, - "type": "object" - }, - "SqlServerDatabaseDetails": { - "description": "Represents a Sql Server database on the Cloud SQL instance.", - "id": "SqlServerDatabaseDetails", - "properties": { - "compatibilityLevel": { - "description": "The version of SQL Server with which the database is to be made compatible", - "format": "int32", - "type": "integer" - }, - "recoveryModel": { - "description": "The recovery model of a SQL Server database", - "type": "string" - } - }, - "type": "object" - }, - "SqlServerEntraIdConfig": { - "description": "SQL Server Entra ID configuration.", - "id": "SqlServerEntraIdConfig", - "properties": { - "applicationId": { - "description": "Optional. The application ID for the Entra ID configuration.", - "type": "string" - }, - "kind": { - "description": "Output only. This is always sql#sqlServerEntraIdConfig", - "readOnly": true, - "type": "string" - }, - "tenantId": { - "description": "Optional. The tenant ID for the Entra ID configuration.", - "type": "string" - } - }, - "type": "object" - }, - "SqlServerUserDetails": { - "description": "Represents a Sql Server user on the Cloud SQL instance.", - "id": "SqlServerUserDetails", - "properties": { - "disabled": { - "description": "If the user has been disabled", - "type": "boolean" - }, - "serverRoles": { - "description": "The server roles for this user", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "SqlSubOperationType": { - "description": "The sub operation type based on the operation type.", - "id": "SqlSubOperationType", - "properties": { - "maintenanceType": { - "description": "The type of maintenance to be performed on the instance.", - "enum": [ - "SQL_MAINTENANCE_TYPE_UNSPECIFIED", - "INSTANCE_MAINTENANCE", - "REPLICA_INCLUDED_MAINTENANCE", - "INSTANCE_SELF_SERVICE_MAINTENANCE", - "REPLICA_INCLUDED_SELF_SERVICE_MAINTENANCE" - ], - "enumDescriptions": [ - "Maintenance type is unspecified.", - "Indicates that a standalone instance is undergoing maintenance. The instance can be either a primary instance or a replica.", - "Indicates that the primary instance and all of its replicas, including cascading replicas, are undergoing maintenance. Maintenance is performed on groups of replicas first, followed by the primary instance.", - "Indicates that the standalone instance is undergoing maintenance, initiated by self-service. The instance can be either a primary instance or a replica.", - "Indicates that the primary instance and all of its replicas are undergoing maintenance, initiated by self-service. Maintenance is performed on groups of replicas first, followed by the primary instance." - ], - "type": "string" - } - }, - "type": "object" - }, - "SslCert": { - "description": "SslCerts Resource", - "id": "SslCert", - "properties": { - "cert": { - "description": "PEM representation.", - "type": "string" - }, - "certSerialNumber": { - "description": "Serial number, as extracted from the certificate.", - "type": "string" - }, - "commonName": { - "description": "User supplied name. Constrained to [a-zA-Z.-_ ]+.", - "type": "string" - }, - "createTime": { - "description": "The time when the certificate was created in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`", - "format": "google-datetime", - "type": "string" - }, - "expirationTime": { - "description": "The time when the certificate expires in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`.", - "format": "google-datetime", - "type": "string" - }, - "instance": { - "description": "Name of the database instance.", - "type": "string" - }, - "kind": { - "description": "This is always `sql#sslCert`.", - "type": "string" - }, - "selfLink": { - "description": "The URI of this resource.", - "type": "string" - }, - "sha1Fingerprint": { - "description": "Sha1 Fingerprint.", - "type": "string" - } - }, - "type": "object" - }, - "SslCertDetail": { - "description": "SslCertDetail.", - "id": "SslCertDetail", - "properties": { - "certInfo": { - "$ref": "SslCert", - "description": "The public information about the cert." - }, - "certPrivateKey": { - "description": "The private key for the client cert, in pem format. Keep private in order to protect your security.", - "type": "string" - } - }, - "type": "object" - }, - "SslCertsCreateEphemeralRequest": { - "description": "SslCerts create ephemeral certificate request.", - "id": "SslCertsCreateEphemeralRequest", - "properties": { - "access_token": { - "description": "Access token to include in the signed certificate.", - "type": "string" - }, - "public_key": { - "description": "PEM encoded public key to include in the signed certificate.", - "type": "string" - } - }, - "type": "object" - }, - "SslCertsInsertRequest": { - "description": "SslCerts insert request.", - "id": "SslCertsInsertRequest", - "properties": { - "commonName": { - "description": "User supplied name. Must be a distinct name from the other certificates for this instance.", - "type": "string" - } - }, - "type": "object" - }, - "SslCertsInsertResponse": { - "description": "SslCert insert response.", - "id": "SslCertsInsertResponse", - "properties": { - "clientCert": { - "$ref": "SslCertDetail", - "description": "The new client certificate and private key." - }, - "kind": { - "description": "This is always `sql#sslCertsInsert`.", - "type": "string" - }, - "operation": { - "$ref": "Operation", - "description": "The operation to track the ssl certs insert request." - }, - "serverCaCert": { - "$ref": "SslCert", - "description": "The server Certificate Authority's certificate. If this is missing you can force a new one to be generated by calling resetSslConfig method on instances resource." - } - }, - "type": "object" - }, - "SslCertsListResponse": { - "description": "SslCerts list response.", - "id": "SslCertsListResponse", - "properties": { - "items": { - "description": "List of client certificates for the instance.", - "items": { - "$ref": "SslCert" - }, - "type": "array" - }, - "kind": { - "description": "This is always `sql#sslCertsList`.", - "type": "string" - } - }, - "type": "object" - }, - "Status": { - "description": "The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).", - "id": "Status", - "properties": { - "code": { - "description": "The status code, which should be an enum value of google.rpc.Code.", - "format": "int32", - "type": "integer" - }, - "details": { - "description": "A list of messages that carry the error details. There is a common set of message types for APIs to use.", - "items": { - "additionalProperties": { - "description": "Properties of the object. Contains field @type with type URL.", - "type": "any" - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.", - "type": "string" - } - }, - "type": "object" - }, - "SyncFlags": { - "description": "Initial sync flags for certain Cloud SQL APIs. Currently used for the MySQL external server initial dump.", - "id": "SyncFlags", - "properties": { - "name": { - "description": "The name of the flag.", - "type": "string" - }, - "value": { - "description": "The value of the flag. This field must be omitted if the flag doesn't take a value.", - "type": "string" - } - }, - "type": "object" - }, - "TargetMetric": { - "description": "Target metric for read pool auto scaling.", - "id": "TargetMetric", - "properties": { - "metric": { - "description": "The metric name to be used for auto scaling.", - "type": "string" - }, - "targetValue": { - "description": "The target value for the metric.", - "format": "float", - "type": "number" - } - }, - "type": "object" - }, - "Tier": { - "description": "A Google Cloud SQL service tier resource.", - "id": "Tier", - "properties": { - "DiskQuota": { - "description": "The maximum disk size of this tier in bytes.", - "format": "int64", - "type": "string" - }, - "RAM": { - "description": "The maximum RAM usage of this tier in bytes.", - "format": "int64", - "type": "string" - }, - "kind": { - "description": "This is always `sql#tier`.", - "type": "string" - }, - "region": { - "description": "The applicable regions for this tier.", - "items": { - "type": "string" - }, - "type": "array" - }, - "tier": { - "description": "An identifier for the machine type, for example, `db-custom-1-3840`. For related information, see [Pricing](/sql/pricing).", - "type": "string" - } - }, - "type": "object" - }, - "TiersListResponse": { - "description": "Tiers list response.", - "id": "TiersListResponse", - "properties": { - "items": { - "description": "List of tiers.", - "items": { - "$ref": "Tier" - }, - "type": "array" - }, - "kind": { - "description": "This is always `sql#tiersList`.", - "type": "string" - } - }, - "type": "object" - }, - "TruncateLogContext": { - "description": "Database Instance truncate log context.", - "id": "TruncateLogContext", - "properties": { - "kind": { - "description": "This is always `sql#truncateLogContext`.", - "type": "string" - }, - "logType": { - "description": "The type of log to truncate. Valid values are `MYSQL_GENERAL_TABLE` and `MYSQL_SLOW_TABLE`.", - "type": "string" - } - }, - "type": "object" - }, - "User": { - "description": "A Cloud SQL user resource.", - "id": "User", - "properties": { - "databaseRoles": { - "description": "Optional. Role memberships of the user", - "items": { - "type": "string" - }, - "type": "array" - }, - "dualPasswordType": { - "description": "Dual password status for the user.", - "enum": [ - "DUAL_PASSWORD_TYPE_UNSPECIFIED", - "NO_MODIFY_DUAL_PASSWORD", - "NO_DUAL_PASSWORD", - "DUAL_PASSWORD" - ], - "enumDescriptions": [ - "The default value.", - "Do not update the user's dual password status.", - "No dual password usable for connecting using this user.", - "Dual password usable for connecting using this user." - ], - "type": "string" - }, - "etag": { - "description": "This field is deprecated and will be removed from a future version of the API.", - "type": "string" - }, - "host": { - "description": "Optional. The host from which the user can connect. For `insert` operations, host defaults to an empty string. For `update` operations, host is specified as part of the request URL. The host name cannot be updated after insertion. For a MySQL instance, it's required; for a PostgreSQL or SQL Server instance, it's optional.", - "type": "string" - }, - "iamEmail": { - "description": "Optional. The full email for an IAM user. For normal database users, this will not be filled. Only applicable to MySQL database users.", - "type": "string" - }, - "iamStatus": { - "description": "Indicates if a group is active or inactive for IAM database authentication.", - "enum": [ - "IAM_STATUS_UNSPECIFIED", - "INACTIVE", - "ACTIVE" - ], - "enumDescriptions": [ - "The default value for users that are not of type CLOUD_IAM_GROUP. Only CLOUD_IAM_GROUP users will be inactive or active. Users with an IamStatus of IAM_STATUS_UNSPECIFIED will not display whether they are active or inactive as that is not applicable to them.", - "INACTIVE indicates a group is not available for IAM database authentication.", - "ACTIVE indicates a group is available for IAM database authentication." - ], - "type": "string" - }, - "instance": { - "description": "The name of the Cloud SQL instance. This does not include the project ID. Can be omitted for `update` because it is already specified on the URL.", - "type": "string" - }, - "kind": { - "description": "This is always `sql#user`.", - "type": "string" - }, - "name": { - "description": "The name of the user in the Cloud SQL instance. Can be omitted for `update` because it is already specified in the URL.", - "type": "string" - }, - "password": { - "description": "The password for the user.", - "type": "string" - }, - "passwordPolicy": { - "$ref": "UserPasswordValidationPolicy", - "description": "User level password validation policy." - }, - "project": { - "description": "The project ID of the project containing the Cloud SQL database. The Google apps domain is prefixed if applicable. Can be omitted for `update` because it is already specified on the URL.", - "type": "string" - }, - "sqlserverUserDetails": { - "$ref": "SqlServerUserDetails" - }, - "type": { - "description": "The user type. It determines the method to authenticate the user during login. The default is the database's built-in user type.", - "enum": [ - "BUILT_IN", - "CLOUD_IAM_USER", - "CLOUD_IAM_SERVICE_ACCOUNT", - "CLOUD_IAM_GROUP", - "CLOUD_IAM_GROUP_USER", - "CLOUD_IAM_GROUP_SERVICE_ACCOUNT", - "ENTRAID_USER" - ], - "enumDescriptions": [ - "The database's built-in user type.", - "Cloud IAM user.", - "Cloud IAM service account.", - "Cloud IAM group. Not used for login.", - "Read-only. Login for a user that belongs to the Cloud IAM group.", - "Read-only. Login for a service account that belongs to the Cloud IAM group.", - "Microsoft Entra ID user." - ], - "type": "string" - } - }, - "type": "object" - }, - "UserPasswordValidationPolicy": { - "description": "User level password validation policy.", - "id": "UserPasswordValidationPolicy", - "properties": { - "allowedFailedAttempts": { - "description": "Number of failed login attempts allowed before user get locked.", - "format": "int32", - "type": "integer" - }, - "enableFailedAttemptsCheck": { - "description": "If true, failed login attempts check will be enabled.", - "type": "boolean" - }, - "enablePasswordVerification": { - "description": "If true, the user must specify the current password before changing the password. This flag is supported only for MySQL.", - "type": "boolean" - }, - "passwordExpirationDuration": { - "description": "Expiration duration after password is updated.", - "format": "google-duration", - "type": "string" - }, - "status": { - "$ref": "PasswordStatus", - "description": "Output only. Read-only password status.", - "readOnly": true - } - }, - "type": "object" - }, - "UsersListResponse": { - "description": "User list response.", - "id": "UsersListResponse", - "properties": { - "items": { - "description": "List of user resources in the instance.", - "items": { - "$ref": "User" - }, - "type": "array" - }, - "kind": { - "description": "This is always `sql#usersList`.", - "type": "string" - }, - "nextPageToken": { - "deprecated": true, - "description": "Unused.", - "type": "string" - } - }, - "type": "object" - }, - "Value": { - "description": "The cell value of the table.", - "id": "Value", - "properties": { - "nullValue": { - "description": "If cell value is null, then this flag will be set to true.", - "type": "boolean" - }, - "value": { - "description": "The cell value in string format.", - "type": "string" - } - }, - "type": "object" - } - }, - "servicePath": "", - "title": "Cloud SQL Admin API", - "version": "v1" -} \ No newline at end of file diff --git a/vendor/google.golang.org/api/sqladmin/v1/sqladmin-gen.go b/vendor/google.golang.org/api/sqladmin/v1/sqladmin-gen.go deleted file mode 100644 index b1809001c0..0000000000 --- a/vendor/google.golang.org/api/sqladmin/v1/sqladmin-gen.go +++ /dev/null @@ -1,15157 +0,0 @@ -// Copyright 2026 Google LLC. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// Code generated file. DO NOT EDIT. - -// Package sqladmin provides access to the Cloud SQL Admin API. -// -// For product documentation, see: https://cloud.google.com/sql/docs -// -// # Library status -// -// These client libraries are officially supported by Google. However, this -// library is considered complete and is in maintenance mode. This means -// that we will address critical bugs and security issues but will not add -// any new features. -// -// When possible, we recommend using our newer -// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) -// that are still actively being worked and iterated on. -// -// # Creating a client -// -// Usage example: -// -// import "google.golang.org/api/sqladmin/v1" -// ... -// ctx := context.Background() -// sqladminService, err := sqladmin.NewService(ctx) -// -// In this example, Google Application Default Credentials are used for -// authentication. For information on how to create and obtain Application -// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. -// -// # Other authentication options -// -// By default, all available scopes (see "Constants") are used to authenticate. -// To restrict scopes, use [google.golang.org/api/option.WithScopes]: -// -// sqladminService, err := sqladmin.NewService(ctx, option.WithScopes(sqladmin.SqlserviceAdminScope)) -// -// To use an API key for authentication (note: some APIs do not support API -// keys), use [google.golang.org/api/option.WithAPIKey]: -// -// sqladminService, err := sqladmin.NewService(ctx, option.WithAPIKey("AIza...")) -// -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth -// flow, use [google.golang.org/api/option.WithTokenSource]: -// -// config := &oauth2.Config{...} -// // ... -// token, err := config.Exchange(ctx, ...) -// sqladminService, err := sqladmin.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) -// -// See [google.golang.org/api/option.ClientOption] for details on options. -package sqladmin // import "google.golang.org/api/sqladmin/v1" - -import ( - "bytes" - "context" - "encoding/json" - "errors" - "fmt" - "io" - "log/slog" - "net/http" - "net/url" - "strconv" - "strings" - - "github.com/googleapis/gax-go/v2/internallog" - googleapi "google.golang.org/api/googleapi" - internal "google.golang.org/api/internal" - gensupport "google.golang.org/api/internal/gensupport" - option "google.golang.org/api/option" - internaloption "google.golang.org/api/option/internaloption" - htransport "google.golang.org/api/transport/http" -) - -// Always reference these packages, just in case the auto-generated code -// below doesn't. -var _ = bytes.NewBuffer -var _ = strconv.Itoa -var _ = fmt.Sprintf -var _ = json.NewDecoder -var _ = io.Copy -var _ = url.Parse -var _ = gensupport.MarshalJSON -var _ = googleapi.Version -var _ = errors.New -var _ = strings.Replace -var _ = context.Canceled -var _ = internaloption.WithDefaultEndpoint -var _ = internal.Version -var _ = internallog.New - -const apiId = "sqladmin:v1" -const apiName = "sqladmin" -const apiVersion = "v1" -const basePath = "https://sqladmin.googleapis.com/" -const basePathTemplate = "https://sqladmin.UNIVERSE_DOMAIN/" -const mtlsBasePath = "https://sqladmin.mtls.googleapis.com/" - -// OAuth2 scopes used by this API. -const ( - // See, edit, configure, and delete your Google Cloud data and see the email - // address for your Google Account. - CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform" - - // Manage your Google SQL Service instances - SqlserviceAdminScope = "https://www.googleapis.com/auth/sqlservice.admin" -) - -// NewService creates a new Service. -func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) { - scopesOption := internaloption.WithDefaultScopes( - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/sqlservice.admin", - ) - // NOTE: prepend, so we don't override user-specified scopes. - opts = append([]option.ClientOption{scopesOption}, opts...) - opts = append(opts, internaloption.WithDefaultEndpoint(basePath)) - opts = append(opts, internaloption.WithDefaultEndpointTemplate(basePathTemplate)) - opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath)) - opts = append(opts, internaloption.EnableNewAuthLibrary()) - client, endpoint, err := htransport.NewClient(ctx, opts...) - if err != nil { - return nil, err - } - s := &Service{client: client, BasePath: basePath, logger: internaloption.GetLogger(opts)} - s.Backups = NewBackupsService(s) - s.BackupRuns = NewBackupRunsService(s) - s.Connect = NewConnectService(s) - s.Databases = NewDatabasesService(s) - s.Flags = NewFlagsService(s) - s.Instances = NewInstancesService(s) - s.Operations = NewOperationsService(s) - s.Projects = NewProjectsService(s) - s.SslCerts = NewSslCertsService(s) - s.Tiers = NewTiersService(s) - s.Users = NewUsersService(s) - if endpoint != "" { - s.BasePath = endpoint - } - return s, nil -} - -// New creates a new Service. It uses the provided http.Client for requests. -// -// Deprecated: please use NewService instead. -// To provide a custom HTTP client, use option.WithHTTPClient. -// If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead. -func New(client *http.Client) (*Service, error) { - if client == nil { - return nil, errors.New("client is nil") - } - return NewService(context.TODO(), option.WithHTTPClient(client)) -} - -type Service struct { - client *http.Client - logger *slog.Logger - BasePath string // API endpoint base URL - UserAgent string // optional additional User-Agent fragment - - Backups *BackupsService - - BackupRuns *BackupRunsService - - Connect *ConnectService - - Databases *DatabasesService - - Flags *FlagsService - - Instances *InstancesService - - Operations *OperationsService - - Projects *ProjectsService - - SslCerts *SslCertsService - - Tiers *TiersService - - Users *UsersService -} - -func (s *Service) userAgent() string { - if s.UserAgent == "" { - return googleapi.UserAgent - } - return googleapi.UserAgent + " " + s.UserAgent -} - -func NewBackupsService(s *Service) *BackupsService { - rs := &BackupsService{s: s} - return rs -} - -type BackupsService struct { - s *Service -} - -func NewBackupRunsService(s *Service) *BackupRunsService { - rs := &BackupRunsService{s: s} - return rs -} - -type BackupRunsService struct { - s *Service -} - -func NewConnectService(s *Service) *ConnectService { - rs := &ConnectService{s: s} - return rs -} - -type ConnectService struct { - s *Service -} - -func NewDatabasesService(s *Service) *DatabasesService { - rs := &DatabasesService{s: s} - return rs -} - -type DatabasesService struct { - s *Service -} - -func NewFlagsService(s *Service) *FlagsService { - rs := &FlagsService{s: s} - return rs -} - -type FlagsService struct { - s *Service -} - -func NewInstancesService(s *Service) *InstancesService { - rs := &InstancesService{s: s} - return rs -} - -type InstancesService struct { - s *Service -} - -func NewOperationsService(s *Service) *OperationsService { - rs := &OperationsService{s: s} - return rs -} - -type OperationsService struct { - s *Service -} - -func NewProjectsService(s *Service) *ProjectsService { - rs := &ProjectsService{s: s} - rs.Instances = NewProjectsInstancesService(s) - return rs -} - -type ProjectsService struct { - s *Service - - Instances *ProjectsInstancesService -} - -func NewProjectsInstancesService(s *Service) *ProjectsInstancesService { - rs := &ProjectsInstancesService{s: s} - return rs -} - -type ProjectsInstancesService struct { - s *Service -} - -func NewSslCertsService(s *Service) *SslCertsService { - rs := &SslCertsService{s: s} - return rs -} - -type SslCertsService struct { - s *Service -} - -func NewTiersService(s *Service) *TiersService { - rs := &TiersService{s: s} - return rs -} - -type TiersService struct { - s *Service -} - -func NewUsersService(s *Service) *UsersService { - rs := &UsersService{s: s} - return rs -} - -type UsersService struct { - s *Service -} - -// AclEntry: An entry for an Access Control list. -type AclEntry struct { - // ExpirationTime: The time when this access control entry expires in RFC 3339 - // (https://tools.ietf.org/html/rfc3339) format, for example - // `2012-11-15T16:19:00.094Z`. - ExpirationTime string `json:"expirationTime,omitempty"` - // Kind: This is always `sql#aclEntry`. - Kind string `json:"kind,omitempty"` - // Name: Optional. A label to identify this entry. - Name string `json:"name,omitempty"` - // Value: The allowlisted value for the access control list. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "ExpirationTime") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ExpirationTime") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s AclEntry) MarshalJSON() ([]byte, error) { - type NoMethod AclEntry - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// AcquireSsrsLeaseContext: Acquire SSRS lease context. -type AcquireSsrsLeaseContext struct { - // Duration: Lease duration needed for SSRS setup. - Duration string `json:"duration,omitempty"` - // ReportDatabase: The report database to be used for SSRS setup. - ReportDatabase string `json:"reportDatabase,omitempty"` - // ServiceLogin: The username to be used as the service login to connect to the - // report database for SSRS setup. - ServiceLogin string `json:"serviceLogin,omitempty"` - // SetupLogin: The username to be used as the setup login to connect to the - // database server for SSRS setup. - SetupLogin string `json:"setupLogin,omitempty"` - // ForceSendFields is a list of field names (e.g. "Duration") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Duration") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s AcquireSsrsLeaseContext) MarshalJSON() ([]byte, error) { - type NoMethod AcquireSsrsLeaseContext - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// AdvancedMachineFeatures: Specifies options for controlling advanced machine -// features. -type AdvancedMachineFeatures struct { - // ThreadsPerCore: The number of threads per physical core. - ThreadsPerCore int64 `json:"threadsPerCore,omitempty"` - // ForceSendFields is a list of field names (e.g. "ThreadsPerCore") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ThreadsPerCore") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s AdvancedMachineFeatures) MarshalJSON() ([]byte, error) { - type NoMethod AdvancedMachineFeatures - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ApiWarning: An Admin API warning message. -type ApiWarning struct { - // Code: Code to uniquely identify the warning type. - // - // Possible values: - // "SQL_API_WARNING_CODE_UNSPECIFIED" - An unknown or unset warning type from - // Cloud SQL API. - // "REGION_UNREACHABLE" - Warning when one or more regions are not reachable. - // The returned result set may be incomplete. - // "MAX_RESULTS_EXCEEDS_LIMIT" - Warning when user provided maxResults - // parameter exceeds the limit. The returned result set may be incomplete. - // "COMPROMISED_CREDENTIALS" - Warning when user tries to create/update a - // user with credentials that have previously been compromised by a public data - // breach. - // "INTERNAL_STATE_FAILURE" - Warning when the operation succeeds but some - // non-critical workflow state failed. - Code string `json:"code,omitempty"` - // Message: The warning message. - Message string `json:"message,omitempty"` - // Region: The region name for REGION_UNREACHABLE warning. - Region string `json:"region,omitempty"` - // ForceSendFields is a list of field names (e.g. "Code") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ApiWarning) MarshalJSON() ([]byte, error) { - type NoMethod ApiWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// AvailableDatabaseVersion: An available database version. It can be a major -// or a minor version. -type AvailableDatabaseVersion struct { - // DisplayName: The database version's display name. - DisplayName string `json:"displayName,omitempty"` - // MajorVersion: The version's major version name. - MajorVersion string `json:"majorVersion,omitempty"` - // Name: The database version name. For MySQL 8.0, this string provides the - // database major and minor version. - Name string `json:"name,omitempty"` - // ForceSendFields is a list of field names (e.g. "DisplayName") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DisplayName") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s AvailableDatabaseVersion) MarshalJSON() ([]byte, error) { - type NoMethod AvailableDatabaseVersion - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// Backup: A backup resource. -type Backup struct { - // BackupInterval: Output only. This output contains the following values: - // start_time: All database writes up to this time are available. end_time: Any - // database writes after this time aren't available. - BackupInterval *Interval `json:"backupInterval,omitempty"` - // BackupKind: Output only. Specifies the kind of backup, PHYSICAL or - // DEFAULT_SNAPSHOT. - // - // Possible values: - // "SQL_BACKUP_KIND_UNSPECIFIED" - This is an unknown BackupKind. - // "SNAPSHOT" - Snapshot-based backups. - // "PHYSICAL" - Physical backups. - BackupKind string `json:"backupKind,omitempty"` - // BackupRun: Output only. The mapping to backup run resource used for IAM - // validations. - BackupRun string `json:"backupRun,omitempty"` - // DatabaseVersion: Output only. The database version of the instance of at the - // time this backup was made. - // - // Possible values: - // "SQL_DATABASE_VERSION_UNSPECIFIED" - This is an unknown database version. - // "MYSQL_5_1" - The database version is MySQL 5.1. - // "MYSQL_5_5" - The database version is MySQL 5.5. - // "MYSQL_5_6" - The database version is MySQL 5.6. - // "MYSQL_5_7" - The database version is MySQL 5.7. - // "MYSQL_8_0" - The database version is MySQL 8. - // "MYSQL_8_0_18" - The database major version is MySQL 8.0 and the minor - // version is 18. - // "MYSQL_8_0_26" - The database major version is MySQL 8.0 and the minor - // version is 26. - // "MYSQL_8_0_27" - The database major version is MySQL 8.0 and the minor - // version is 27. - // "MYSQL_8_0_28" - The database major version is MySQL 8.0 and the minor - // version is 28. - // "MYSQL_8_0_29" - The database major version is MySQL 8.0 and the minor - // version is 29. - // "MYSQL_8_0_30" - The database major version is MySQL 8.0 and the minor - // version is 30. - // "MYSQL_8_0_31" - The database major version is MySQL 8.0 and the minor - // version is 31. - // "MYSQL_8_0_32" - The database major version is MySQL 8.0 and the minor - // version is 32. - // "MYSQL_8_0_33" - The database major version is MySQL 8.0 and the minor - // version is 33. - // "MYSQL_8_0_34" - The database major version is MySQL 8.0 and the minor - // version is 34. - // "MYSQL_8_0_35" - The database major version is MySQL 8.0 and the minor - // version is 35. - // "MYSQL_8_0_36" - The database major version is MySQL 8.0 and the minor - // version is 36. - // "MYSQL_8_0_37" - The database major version is MySQL 8.0 and the minor - // version is 37. - // "MYSQL_8_0_39" - The database major version is MySQL 8.0 and the minor - // version is 39. - // "MYSQL_8_0_40" - The database major version is MySQL 8.0 and the minor - // version is 40. - // "MYSQL_8_0_41" - The database major version is MySQL 8.0 and the minor - // version is 41. - // "MYSQL_8_0_42" - The database major version is MySQL 8.0 and the minor - // version is 42. - // "MYSQL_8_0_43" - The database major version is MySQL 8.0 and the minor - // version is 43. - // "MYSQL_8_0_44" - The database major version is MySQL 8.0 and the minor - // version is 44. - // "MYSQL_8_0_45" - The database major version is MySQL 8.0 and the minor - // version is 45. - // "MYSQL_8_0_46" - The database major version is MySQL 8.0 and the minor - // version is 46. - // "MYSQL_8_4" - The database version is MySQL 8.4. - // "MYSQL_9_7" - The database version is MySQL 9.7. - // "SQLSERVER_2017_STANDARD" - The database version is SQL Server 2017 - // Standard. - // "SQLSERVER_2017_ENTERPRISE" - The database version is SQL Server 2017 - // Enterprise. - // "SQLSERVER_2017_EXPRESS" - The database version is SQL Server 2017 - // Express. - // "SQLSERVER_2017_WEB" - The database version is SQL Server 2017 Web. - // "POSTGRES_9_6" - The database version is PostgreSQL 9.6. - // "POSTGRES_10" - The database version is PostgreSQL 10. - // "POSTGRES_11" - The database version is PostgreSQL 11. - // "POSTGRES_12" - The database version is PostgreSQL 12. - // "POSTGRES_13" - The database version is PostgreSQL 13. - // "POSTGRES_14" - The database version is PostgreSQL 14. - // "POSTGRES_15" - The database version is PostgreSQL 15. - // "POSTGRES_16" - The database version is PostgreSQL 16. - // "POSTGRES_17" - The database version is PostgreSQL 17. - // "POSTGRES_18" - The database version is PostgreSQL 18. - // "SQLSERVER_2019_STANDARD" - The database version is SQL Server 2019 - // Standard. - // "SQLSERVER_2019_ENTERPRISE" - The database version is SQL Server 2019 - // Enterprise. - // "SQLSERVER_2019_EXPRESS" - The database version is SQL Server 2019 - // Express. - // "SQLSERVER_2019_WEB" - The database version is SQL Server 2019 Web. - // "SQLSERVER_2022_STANDARD" - The database version is SQL Server 2022 - // Standard. - // "SQLSERVER_2022_ENTERPRISE" - The database version is SQL Server 2022 - // Enterprise. - // "SQLSERVER_2022_EXPRESS" - The database version is SQL Server 2022 - // Express. - // "SQLSERVER_2022_WEB" - The database version is SQL Server 2022 Web. - // "SQLSERVER_2025_STANDARD" - The database version is SQL Server 2025 - // Standard. - // "SQLSERVER_2025_ENTERPRISE" - The database version is SQL Server 2025 - // Enterprise. - // "SQLSERVER_2025_EXPRESS" - The database version is SQL Server 2025 - // Express. - DatabaseVersion string `json:"databaseVersion,omitempty"` - // Description: The description of this backup. - Description string `json:"description,omitempty"` - // Error: Output only. Information about why the backup operation fails (for - // example, when the backup state fails). - Error *OperationError `json:"error,omitempty"` - // ExpiryTime: Backup expiration time. A UTC timestamp of when this backup - // expired. - ExpiryTime string `json:"expiryTime,omitempty"` - // Instance: The name of the source database instance. - Instance string `json:"instance,omitempty"` - // InstanceDeletionTime: Optional. Output only. Timestamp in UTC of when the - // instance associated with this backup is deleted. - InstanceDeletionTime string `json:"instanceDeletionTime,omitempty"` - // InstanceSettings: Optional. Output only. The instance setting of the source - // instance that's associated with this backup. - InstanceSettings *DatabaseInstance `json:"instanceSettings,omitempty"` - // Kind: Output only. This is always `sql#backup`. - Kind string `json:"kind,omitempty"` - // KmsKey: Output only. This output contains the encryption configuration for a - // backup and the resource name of the KMS key for disk encryption. - KmsKey string `json:"kmsKey,omitempty"` - // KmsKeyVersion: Output only. This output contains the encryption status for a - // backup and the version of the KMS key that's used to encrypt the Cloud SQL - // instance. - KmsKeyVersion string `json:"kmsKeyVersion,omitempty"` - // Location: The storage location of the backups. The location can be - // multi-regional. - Location string `json:"location,omitempty"` - // MaxChargeableBytes: Output only. The maximum chargeable bytes for the - // backup. - MaxChargeableBytes int64 `json:"maxChargeableBytes,omitempty,string"` - // Name: Output only. The resource name of the backup. Format: - // projects/{project}/backups/{backup}. - Name string `json:"name,omitempty"` - // SatisfiesPzi: Output only. This status indicates whether the backup - // satisfies PZI. The status is reserved for future use. - SatisfiesPzi bool `json:"satisfiesPzi,omitempty"` - // SatisfiesPzs: Output only. This status indicates whether the backup - // satisfies PZS. The status is reserved for future use. - SatisfiesPzs bool `json:"satisfiesPzs,omitempty"` - // SelfLink: Output only. The URI of this resource. - SelfLink string `json:"selfLink,omitempty"` - // State: Output only. The status of this backup. - // - // Possible values: - // "SQL_BACKUP_STATE_UNSPECIFIED" - The state of the backup is unknown. - // "ENQUEUED" - The backup that's added to a queue. - // "RUNNING" - The backup is in progress. - // "FAILED" - The backup failed. - // "SUCCESSFUL" - The backup is successful. - // "DELETING" - The backup is being deleted. - // "DELETION_FAILED" - Deletion of the backup failed. - State string `json:"state,omitempty"` - // TimeZone: Output only. This output contains a backup time zone. If a Cloud - // SQL for SQL Server instance has a different time zone from the backup's time - // zone, then the restore to the instance doesn't happen. - TimeZone string `json:"timeZone,omitempty"` - // TtlDays: Input only. The time-to-live (TTL) interval for this resource (in - // days). For example: ttlDays:7, means 7 days from the current time. The - // expiration time can't exceed 365 days from the time that the backup is - // created. - TtlDays int64 `json:"ttlDays,omitempty,string"` - // Type: Output only. The type of this backup. The type can be "AUTOMATED", - // "ON_DEMAND" or “FINAL”. - // - // Possible values: - // "SQL_BACKUP_TYPE_UNSPECIFIED" - This is an unknown backup type. - // "AUTOMATED" - The backup schedule triggers a backup automatically. - // "ON_DEMAND" - The user triggers a backup manually. - // "FINAL" - The backup created when instance is deleted. - Type string `json:"type,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "BackupInterval") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "BackupInterval") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s Backup) MarshalJSON() ([]byte, error) { - type NoMethod Backup - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// BackupConfiguration: Database instance backup configuration. -type BackupConfiguration struct { - // BackupRetentionSettings: Backup retention settings. - BackupRetentionSettings *BackupRetentionSettings `json:"backupRetentionSettings,omitempty"` - // BackupTier: Output only. Backup tier that manages the backups for the - // instance. - // - // Possible values: - // "BACKUP_TIER_UNSPECIFIED" - Unspecified. - // "STANDARD" - Instance is managed by Cloud SQL. - // "ADVANCED" - Deprecated: ADVANCED is deprecated. Please use ENHANCED - // instead. - // "ENHANCED" - Instance is managed by Google Cloud Backup and DR Service. - BackupTier string `json:"backupTier,omitempty"` - // BinaryLogEnabled: (MySQL only) Whether binary log is enabled. If backup - // configuration is disabled, binarylog must be disabled as well. - BinaryLogEnabled bool `json:"binaryLogEnabled,omitempty"` - // Enabled: Whether this configuration is enabled. - Enabled bool `json:"enabled,omitempty"` - // Kind: This is always `sql#backupConfiguration`. - Kind string `json:"kind,omitempty"` - // Location: Location of the backup - Location string `json:"location,omitempty"` - // PointInTimeRecoveryEnabled: Whether point in time recovery is enabled. - PointInTimeRecoveryEnabled bool `json:"pointInTimeRecoveryEnabled,omitempty"` - // ReplicationLogArchivingEnabled: Reserved for future use. - ReplicationLogArchivingEnabled bool `json:"replicationLogArchivingEnabled,omitempty"` - // StartTime: Start time for the daily backup configuration in UTC timezone in - // the 24 hour format - `HH:MM`. - StartTime string `json:"startTime,omitempty"` - // TransactionLogRetentionDays: The number of days of transaction logs we - // retain for point in time restore, from 1-7. - TransactionLogRetentionDays int64 `json:"transactionLogRetentionDays,omitempty"` - // TransactionalLogStorageState: Output only. This value contains the storage - // location of transactional logs used to perform point-in-time recovery (PITR) - // for the database. - // - // Possible values: - // "TRANSACTIONAL_LOG_STORAGE_STATE_UNSPECIFIED" - Unspecified. - // "DISK" - The transaction logs used for PITR for the instance are stored on - // a data disk. - // "SWITCHING_TO_CLOUD_STORAGE" - The transaction logs used for PITR for the - // instance are switching from being stored on a data disk to being stored in - // Cloud Storage. Only applicable to MySQL. - // "SWITCHED_TO_CLOUD_STORAGE" - The transaction logs used for PITR for the - // instance are now stored in Cloud Storage. Previously, they were stored on a - // data disk. Only applicable to MySQL. - // "CLOUD_STORAGE" - The transaction logs used for PITR for the instance are - // stored in Cloud Storage. Only applicable to MySQL and PostgreSQL. - TransactionalLogStorageState string `json:"transactionalLogStorageState,omitempty"` - // ForceSendFields is a list of field names (e.g. "BackupRetentionSettings") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "BackupRetentionSettings") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s BackupConfiguration) MarshalJSON() ([]byte, error) { - type NoMethod BackupConfiguration - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// BackupContext: Backup context. -type BackupContext struct { - // BackupId: The identifier of the backup. - BackupId int64 `json:"backupId,omitempty,string"` - // Kind: This is always `sql#backupContext`. - Kind string `json:"kind,omitempty"` - // Name: The name of the backup. Format: projects/{project}/backups/{backup} - Name string `json:"name,omitempty"` - // ForceSendFields is a list of field names (e.g. "BackupId") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "BackupId") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s BackupContext) MarshalJSON() ([]byte, error) { - type NoMethod BackupContext - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// BackupReencryptionConfig: Backup Reencryption Config -type BackupReencryptionConfig struct { - // BackupLimit: Backup re-encryption limit - BackupLimit int64 `json:"backupLimit,omitempty"` - // BackupType: Type of backups users want to re-encrypt. - // - // Possible values: - // "BACKUP_TYPE_UNSPECIFIED" - Unknown backup type, will be defaulted to - // AUTOMATIC backup type - // "AUTOMATED" - Reencrypt automatic backups - // "ON_DEMAND" - Reencrypt on-demand backups - BackupType string `json:"backupType,omitempty"` - // ForceSendFields is a list of field names (e.g. "BackupLimit") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "BackupLimit") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s BackupReencryptionConfig) MarshalJSON() ([]byte, error) { - type NoMethod BackupReencryptionConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// BackupRetentionSettings: We currently only support backup retention by -// specifying the number of backups we will retain. -type BackupRetentionSettings struct { - // RetainedBackups: Depending on the value of retention_unit, this is used to - // determine if a backup needs to be deleted. If retention_unit is 'COUNT', we - // will retain this many backups. - RetainedBackups int64 `json:"retainedBackups,omitempty"` - // RetentionUnit: The unit that 'retained_backups' represents. - // - // Possible values: - // "RETENTION_UNIT_UNSPECIFIED" - Backup retention unit is unspecified, will - // be treated as COUNT. - // "COUNT" - Retention will be by count, eg. "retain the most recent 7 - // backups". - RetentionUnit string `json:"retentionUnit,omitempty"` - // ForceSendFields is a list of field names (e.g. "RetainedBackups") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "RetainedBackups") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s BackupRetentionSettings) MarshalJSON() ([]byte, error) { - type NoMethod BackupRetentionSettings - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// BackupRun: A BackupRun resource. -type BackupRun struct { - // BackupKind: Specifies the kind of backup, PHYSICAL or DEFAULT_SNAPSHOT. - // - // Possible values: - // "SQL_BACKUP_KIND_UNSPECIFIED" - This is an unknown BackupKind. - // "SNAPSHOT" - Snapshot-based backups. - // "PHYSICAL" - Physical backups. - BackupKind string `json:"backupKind,omitempty"` - // DatabaseVersion: Output only. The instance database version at the time this - // backup was made. - // - // Possible values: - // "SQL_DATABASE_VERSION_UNSPECIFIED" - This is an unknown database version. - // "MYSQL_5_1" - The database version is MySQL 5.1. - // "MYSQL_5_5" - The database version is MySQL 5.5. - // "MYSQL_5_6" - The database version is MySQL 5.6. - // "MYSQL_5_7" - The database version is MySQL 5.7. - // "MYSQL_8_0" - The database version is MySQL 8. - // "MYSQL_8_0_18" - The database major version is MySQL 8.0 and the minor - // version is 18. - // "MYSQL_8_0_26" - The database major version is MySQL 8.0 and the minor - // version is 26. - // "MYSQL_8_0_27" - The database major version is MySQL 8.0 and the minor - // version is 27. - // "MYSQL_8_0_28" - The database major version is MySQL 8.0 and the minor - // version is 28. - // "MYSQL_8_0_29" - The database major version is MySQL 8.0 and the minor - // version is 29. - // "MYSQL_8_0_30" - The database major version is MySQL 8.0 and the minor - // version is 30. - // "MYSQL_8_0_31" - The database major version is MySQL 8.0 and the minor - // version is 31. - // "MYSQL_8_0_32" - The database major version is MySQL 8.0 and the minor - // version is 32. - // "MYSQL_8_0_33" - The database major version is MySQL 8.0 and the minor - // version is 33. - // "MYSQL_8_0_34" - The database major version is MySQL 8.0 and the minor - // version is 34. - // "MYSQL_8_0_35" - The database major version is MySQL 8.0 and the minor - // version is 35. - // "MYSQL_8_0_36" - The database major version is MySQL 8.0 and the minor - // version is 36. - // "MYSQL_8_0_37" - The database major version is MySQL 8.0 and the minor - // version is 37. - // "MYSQL_8_0_39" - The database major version is MySQL 8.0 and the minor - // version is 39. - // "MYSQL_8_0_40" - The database major version is MySQL 8.0 and the minor - // version is 40. - // "MYSQL_8_0_41" - The database major version is MySQL 8.0 and the minor - // version is 41. - // "MYSQL_8_0_42" - The database major version is MySQL 8.0 and the minor - // version is 42. - // "MYSQL_8_0_43" - The database major version is MySQL 8.0 and the minor - // version is 43. - // "MYSQL_8_0_44" - The database major version is MySQL 8.0 and the minor - // version is 44. - // "MYSQL_8_0_45" - The database major version is MySQL 8.0 and the minor - // version is 45. - // "MYSQL_8_0_46" - The database major version is MySQL 8.0 and the minor - // version is 46. - // "MYSQL_8_4" - The database version is MySQL 8.4. - // "MYSQL_9_7" - The database version is MySQL 9.7. - // "SQLSERVER_2017_STANDARD" - The database version is SQL Server 2017 - // Standard. - // "SQLSERVER_2017_ENTERPRISE" - The database version is SQL Server 2017 - // Enterprise. - // "SQLSERVER_2017_EXPRESS" - The database version is SQL Server 2017 - // Express. - // "SQLSERVER_2017_WEB" - The database version is SQL Server 2017 Web. - // "POSTGRES_9_6" - The database version is PostgreSQL 9.6. - // "POSTGRES_10" - The database version is PostgreSQL 10. - // "POSTGRES_11" - The database version is PostgreSQL 11. - // "POSTGRES_12" - The database version is PostgreSQL 12. - // "POSTGRES_13" - The database version is PostgreSQL 13. - // "POSTGRES_14" - The database version is PostgreSQL 14. - // "POSTGRES_15" - The database version is PostgreSQL 15. - // "POSTGRES_16" - The database version is PostgreSQL 16. - // "POSTGRES_17" - The database version is PostgreSQL 17. - // "POSTGRES_18" - The database version is PostgreSQL 18. - // "SQLSERVER_2019_STANDARD" - The database version is SQL Server 2019 - // Standard. - // "SQLSERVER_2019_ENTERPRISE" - The database version is SQL Server 2019 - // Enterprise. - // "SQLSERVER_2019_EXPRESS" - The database version is SQL Server 2019 - // Express. - // "SQLSERVER_2019_WEB" - The database version is SQL Server 2019 Web. - // "SQLSERVER_2022_STANDARD" - The database version is SQL Server 2022 - // Standard. - // "SQLSERVER_2022_ENTERPRISE" - The database version is SQL Server 2022 - // Enterprise. - // "SQLSERVER_2022_EXPRESS" - The database version is SQL Server 2022 - // Express. - // "SQLSERVER_2022_WEB" - The database version is SQL Server 2022 Web. - // "SQLSERVER_2025_STANDARD" - The database version is SQL Server 2025 - // Standard. - // "SQLSERVER_2025_ENTERPRISE" - The database version is SQL Server 2025 - // Enterprise. - // "SQLSERVER_2025_EXPRESS" - The database version is SQL Server 2025 - // Express. - DatabaseVersion string `json:"databaseVersion,omitempty"` - // Description: The description of this run, only applicable to on-demand - // backups. - Description string `json:"description,omitempty"` - // DiskEncryptionConfiguration: Encryption configuration specific to a backup. - DiskEncryptionConfiguration *DiskEncryptionConfiguration `json:"diskEncryptionConfiguration,omitempty"` - // DiskEncryptionStatus: Encryption status specific to a backup. - DiskEncryptionStatus *DiskEncryptionStatus `json:"diskEncryptionStatus,omitempty"` - // EndTime: The time the backup operation completed in UTC timezone in RFC 3339 - // (https://tools.ietf.org/html/rfc3339) format, for example - // `2012-11-15T16:19:00.094Z`. - EndTime string `json:"endTime,omitempty"` - // EnqueuedTime: The time the run was enqueued in UTC timezone in RFC 3339 - // (https://tools.ietf.org/html/rfc3339) format, for example - // `2012-11-15T16:19:00.094Z`. - EnqueuedTime string `json:"enqueuedTime,omitempty"` - // Error: Information about why the backup operation failed. This is only - // present if the run has the FAILED status. - Error *OperationError `json:"error,omitempty"` - // Id: The identifier for this backup run. Unique only for a specific Cloud SQL - // instance. - Id int64 `json:"id,omitempty,string"` - // Instance: Name of the database instance. - Instance string `json:"instance,omitempty"` - // Kind: This is always `sql#backupRun`. - Kind string `json:"kind,omitempty"` - // Location: Location of the backups. - Location string `json:"location,omitempty"` - // MaxChargeableBytes: Output only. The maximum chargeable bytes for the - // backup. - MaxChargeableBytes int64 `json:"maxChargeableBytes,omitempty,string"` - // SelfLink: The URI of this resource. - SelfLink string `json:"selfLink,omitempty"` - // StartTime: The time the backup operation actually started in UTC timezone in - // RFC 3339 (https://tools.ietf.org/html/rfc3339) format, for example - // `2012-11-15T16:19:00.094Z`. - StartTime string `json:"startTime,omitempty"` - // Status: The status of this run. - // - // Possible values: - // "SQL_BACKUP_RUN_STATUS_UNSPECIFIED" - The status of the run is unknown. - // "ENQUEUED" - The backup operation was enqueued. - // "OVERDUE" - The backup is overdue across a given backup window. Indicates - // a problem. Example: Long-running operation in progress during the whole - // window. - // "RUNNING" - The backup is in progress. - // "FAILED" - The backup failed. - // "SUCCESSFUL" - The backup was successful. - // "SKIPPED" - The backup was skipped (without problems) for a given backup - // window. Example: Instance was idle. - // "DELETION_PENDING" - The backup is about to be deleted. - // "DELETION_FAILED" - The backup deletion failed. - // "DELETED" - The backup has been deleted. - Status string `json:"status,omitempty"` - // TimeZone: Backup time zone to prevent restores to an instance with a - // different time zone. Now relevant only for SQL Server. - TimeZone string `json:"timeZone,omitempty"` - // Type: The type of this run; can be either "AUTOMATED" or "ON_DEMAND" or - // "FINAL". This field defaults to "ON_DEMAND" and is ignored, when specified - // for insert requests. - // - // Possible values: - // "SQL_BACKUP_RUN_TYPE_UNSPECIFIED" - This is an unknown BackupRun type. - // "AUTOMATED" - The backup schedule automatically triggers a backup. - // "ON_DEMAND" - The user manually triggers a backup. - Type string `json:"type,omitempty"` - // WindowStartTime: The start time of the backup window during which this the - // backup was attempted in RFC 3339 (https://tools.ietf.org/html/rfc3339) - // format, for example `2012-11-15T16:19:00.094Z`. - WindowStartTime string `json:"windowStartTime,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "BackupKind") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "BackupKind") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s BackupRun) MarshalJSON() ([]byte, error) { - type NoMethod BackupRun - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// BackupRunsListResponse: Backup run list results. -type BackupRunsListResponse struct { - // Items: A list of backup runs in reverse chronological order of the enqueued - // time. - Items []*BackupRun `json:"items,omitempty"` - // Kind: This is always `sql#backupRunsList`. - Kind string `json:"kind,omitempty"` - // NextPageToken: The continuation token, used to page through large result - // sets. Provide this value in a subsequent request to return the next page of - // results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Items") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Items") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s BackupRunsListResponse) MarshalJSON() ([]byte, error) { - type NoMethod BackupRunsListResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// BinLogCoordinates: Binary log coordinates. -type BinLogCoordinates struct { - // BinLogFileName: Name of the binary log file for a Cloud SQL instance. - BinLogFileName string `json:"binLogFileName,omitempty"` - // BinLogPosition: Position (offset) within the binary log file. - BinLogPosition int64 `json:"binLogPosition,omitempty,string"` - // Kind: This is always `sql#binLogCoordinates`. - Kind string `json:"kind,omitempty"` - // ForceSendFields is a list of field names (e.g. "BinLogFileName") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "BinLogFileName") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s BinLogCoordinates) MarshalJSON() ([]byte, error) { - type NoMethod BinLogCoordinates - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// CloneContext: Database instance clone context. -type CloneContext struct { - // AllocatedIpRange: The name of the allocated ip range for the private ip - // Cloud SQL instance. For example: "google-managed-services-default". If set, - // the cloned instance ip will be created in the allocated range. The range - // name must comply with RFC 1035 (https://tools.ietf.org/html/rfc1035). - // Specifically, the name must be 1-63 characters long and match the regular - // expression a-z ([-a-z0-9]*[a-z0-9])?. Reserved for future use. - AllocatedIpRange string `json:"allocatedIpRange,omitempty"` - // BinLogCoordinates: Binary log coordinates, if specified, identify the - // position up to which the source instance is cloned. If not specified, the - // source instance is cloned up to the most recent binary log coordinates. - BinLogCoordinates *BinLogCoordinates `json:"binLogCoordinates,omitempty"` - // DatabaseNames: (SQL Server only) Clone only the specified databases from the - // source instance. Clone all databases if empty. - DatabaseNames []string `json:"databaseNames,omitempty"` - // DestinationInstanceName: Required. Name of the Cloud SQL instance to be - // created as a clone. - DestinationInstanceName string `json:"destinationInstanceName,omitempty"` - // DestinationNetwork: Optional. The fully qualified URI of the VPC network to - // which the cloned instance will be connected via Private Services Access for - // private IP. For - // example:`projects/my-network-project/global/networks/my-network`. This field - // is only required for cross-project cloning. - DestinationNetwork string `json:"destinationNetwork,omitempty"` - // DestinationProject: Optional. The project ID of the destination project - // where the cloned instance will be created. To perform a cross-project clone, - // this field is required. If not specified, the clone is created in the same - // project as the source instance. - DestinationProject string `json:"destinationProject,omitempty"` - // Kind: This is always `sql#cloneContext`. - Kind string `json:"kind,omitempty"` - // PitrTimestampMs: Reserved for future use. - PitrTimestampMs int64 `json:"pitrTimestampMs,omitempty,string"` - // PointInTime: Timestamp, if specified, identifies the time to which the - // source instance is cloned. - PointInTime string `json:"pointInTime,omitempty"` - // PreferredSecondaryZone: Optional. Copy clone and point-in-time recovery - // clone of a regional instance in the specified zones. If not specified, clone - // to the same secondary zone as the source instance. This value cannot be the - // same as the preferred_zone field. This field applies to all DB types. - PreferredSecondaryZone string `json:"preferredSecondaryZone,omitempty"` - // PreferredZone: Optional. Copy clone and point-in-time recovery clone of an - // instance to the specified zone. If no zone is specified, clone to the same - // primary zone as the source instance. This field applies to all DB types. - PreferredZone string `json:"preferredZone,omitempty"` - // SourceInstanceDeletionTime: The timestamp used to identify the time when the - // source instance is deleted. If this instance is deleted, then you must set - // the timestamp. - SourceInstanceDeletionTime string `json:"sourceInstanceDeletionTime,omitempty"` - // ForceSendFields is a list of field names (e.g. "AllocatedIpRange") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AllocatedIpRange") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s CloneContext) MarshalJSON() ([]byte, error) { - type NoMethod CloneContext - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// Column: Contains the name and datatype of a column. -type Column struct { - // Name: Name of the column. - Name string `json:"name,omitempty"` - // Type: Datatype of the column. - Type string `json:"type,omitempty"` - // ForceSendFields is a list of field names (e.g. "Name") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Name") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s Column) MarshalJSON() ([]byte, error) { - type NoMethod Column - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ConnectPoolNodeConfig: Details of a single read pool node of a read pool. -type ConnectPoolNodeConfig struct { - // DnsName: Output only. The DNS name of the read pool node. - DnsName string `json:"dnsName,omitempty"` - // DnsNames: Output only. The list of DNS names used by this read pool node. - DnsNames []*DnsNameMapping `json:"dnsNames,omitempty"` - // IpAddresses: Output only. Mappings containing IP addresses that can be used - // to connect to the read pool node. - IpAddresses []*IpMapping `json:"ipAddresses,omitempty"` - // Name: Output only. The name of the read pool node. Doesn't include the - // project ID. - Name string `json:"name,omitempty"` - // ForceSendFields is a list of field names (e.g. "DnsName") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DnsName") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ConnectPoolNodeConfig) MarshalJSON() ([]byte, error) { - type NoMethod ConnectPoolNodeConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ConnectSettings: Connect settings retrieval response. -type ConnectSettings struct { - // BackendType: `SECOND_GEN`: Cloud SQL database instance. `EXTERNAL`: A - // database server that is not managed by Google. This property is read-only; - // use the `tier` property in the `settings` object to determine the database - // type. - // - // Possible values: - // "SQL_BACKEND_TYPE_UNSPECIFIED" - This is an unknown backend type for - // instance. - // "FIRST_GEN" - V1 speckle instance. - // "SECOND_GEN" - V2 speckle instance. - // "EXTERNAL" - On premises instance. - BackendType string `json:"backendType,omitempty"` - // CustomSubjectAlternativeNames: Custom subject alternative names for the - // server certificate. - CustomSubjectAlternativeNames []string `json:"customSubjectAlternativeNames,omitempty"` - // DatabaseVersion: The database engine type and version. The `databaseVersion` - // field cannot be changed after instance creation. MySQL instances: - // `MYSQL_8_0`, `MYSQL_5_7` (default), or `MYSQL_5_6`. PostgreSQL instances: - // `POSTGRES_9_6`, `POSTGRES_10`, `POSTGRES_11`, `POSTGRES_12` (default), - // `POSTGRES_13`, or `POSTGRES_14`. SQL Server instances: - // `SQLSERVER_2017_STANDARD` (default), `SQLSERVER_2017_ENTERPRISE`, - // `SQLSERVER_2017_EXPRESS`, `SQLSERVER_2017_WEB`, `SQLSERVER_2019_STANDARD`, - // `SQLSERVER_2019_ENTERPRISE`, `SQLSERVER_2019_EXPRESS`, or - // `SQLSERVER_2019_WEB`. - // - // Possible values: - // "SQL_DATABASE_VERSION_UNSPECIFIED" - This is an unknown database version. - // "MYSQL_5_1" - The database version is MySQL 5.1. - // "MYSQL_5_5" - The database version is MySQL 5.5. - // "MYSQL_5_6" - The database version is MySQL 5.6. - // "MYSQL_5_7" - The database version is MySQL 5.7. - // "MYSQL_8_0" - The database version is MySQL 8. - // "MYSQL_8_0_18" - The database major version is MySQL 8.0 and the minor - // version is 18. - // "MYSQL_8_0_26" - The database major version is MySQL 8.0 and the minor - // version is 26. - // "MYSQL_8_0_27" - The database major version is MySQL 8.0 and the minor - // version is 27. - // "MYSQL_8_0_28" - The database major version is MySQL 8.0 and the minor - // version is 28. - // "MYSQL_8_0_29" - The database major version is MySQL 8.0 and the minor - // version is 29. - // "MYSQL_8_0_30" - The database major version is MySQL 8.0 and the minor - // version is 30. - // "MYSQL_8_0_31" - The database major version is MySQL 8.0 and the minor - // version is 31. - // "MYSQL_8_0_32" - The database major version is MySQL 8.0 and the minor - // version is 32. - // "MYSQL_8_0_33" - The database major version is MySQL 8.0 and the minor - // version is 33. - // "MYSQL_8_0_34" - The database major version is MySQL 8.0 and the minor - // version is 34. - // "MYSQL_8_0_35" - The database major version is MySQL 8.0 and the minor - // version is 35. - // "MYSQL_8_0_36" - The database major version is MySQL 8.0 and the minor - // version is 36. - // "MYSQL_8_0_37" - The database major version is MySQL 8.0 and the minor - // version is 37. - // "MYSQL_8_0_39" - The database major version is MySQL 8.0 and the minor - // version is 39. - // "MYSQL_8_0_40" - The database major version is MySQL 8.0 and the minor - // version is 40. - // "MYSQL_8_0_41" - The database major version is MySQL 8.0 and the minor - // version is 41. - // "MYSQL_8_0_42" - The database major version is MySQL 8.0 and the minor - // version is 42. - // "MYSQL_8_0_43" - The database major version is MySQL 8.0 and the minor - // version is 43. - // "MYSQL_8_0_44" - The database major version is MySQL 8.0 and the minor - // version is 44. - // "MYSQL_8_0_45" - The database major version is MySQL 8.0 and the minor - // version is 45. - // "MYSQL_8_0_46" - The database major version is MySQL 8.0 and the minor - // version is 46. - // "MYSQL_8_4" - The database version is MySQL 8.4. - // "MYSQL_9_7" - The database version is MySQL 9.7. - // "SQLSERVER_2017_STANDARD" - The database version is SQL Server 2017 - // Standard. - // "SQLSERVER_2017_ENTERPRISE" - The database version is SQL Server 2017 - // Enterprise. - // "SQLSERVER_2017_EXPRESS" - The database version is SQL Server 2017 - // Express. - // "SQLSERVER_2017_WEB" - The database version is SQL Server 2017 Web. - // "POSTGRES_9_6" - The database version is PostgreSQL 9.6. - // "POSTGRES_10" - The database version is PostgreSQL 10. - // "POSTGRES_11" - The database version is PostgreSQL 11. - // "POSTGRES_12" - The database version is PostgreSQL 12. - // "POSTGRES_13" - The database version is PostgreSQL 13. - // "POSTGRES_14" - The database version is PostgreSQL 14. - // "POSTGRES_15" - The database version is PostgreSQL 15. - // "POSTGRES_16" - The database version is PostgreSQL 16. - // "POSTGRES_17" - The database version is PostgreSQL 17. - // "POSTGRES_18" - The database version is PostgreSQL 18. - // "SQLSERVER_2019_STANDARD" - The database version is SQL Server 2019 - // Standard. - // "SQLSERVER_2019_ENTERPRISE" - The database version is SQL Server 2019 - // Enterprise. - // "SQLSERVER_2019_EXPRESS" - The database version is SQL Server 2019 - // Express. - // "SQLSERVER_2019_WEB" - The database version is SQL Server 2019 Web. - // "SQLSERVER_2022_STANDARD" - The database version is SQL Server 2022 - // Standard. - // "SQLSERVER_2022_ENTERPRISE" - The database version is SQL Server 2022 - // Enterprise. - // "SQLSERVER_2022_EXPRESS" - The database version is SQL Server 2022 - // Express. - // "SQLSERVER_2022_WEB" - The database version is SQL Server 2022 Web. - // "SQLSERVER_2025_STANDARD" - The database version is SQL Server 2025 - // Standard. - // "SQLSERVER_2025_ENTERPRISE" - The database version is SQL Server 2025 - // Enterprise. - // "SQLSERVER_2025_EXPRESS" - The database version is SQL Server 2025 - // Express. - DatabaseVersion string `json:"databaseVersion,omitempty"` - // DnsName: The dns name of the instance. - DnsName string `json:"dnsName,omitempty"` - // DnsNames: Output only. The list of DNS names used by this instance. - DnsNames []*DnsNameMapping `json:"dnsNames,omitempty"` - // IpAddresses: The assigned IP addresses for the instance. - IpAddresses []*IpMapping `json:"ipAddresses,omitempty"` - // Kind: This is always `sql#connectSettings`. - Kind string `json:"kind,omitempty"` - // MdxProtocolSupport: Optional. Output only. mdx_protocol_support controls how - // the client uses metadata exchange when connecting to the instance. The - // values in the list representing parts of the MDX protocol that are supported - // by this instance. When the list is empty, the instance does not support MDX, - // so the client must not send an MDX request. The default is empty. - // - // Possible values: - // "MDX_PROTOCOL_SUPPORT_UNSPECIFIED" - Not specified. - // "CLIENT_PROTOCOL_TYPE" - Client should send the client protocol type in - // the MDX request. - MdxProtocolSupport []string `json:"mdxProtocolSupport,omitempty"` - // NodeCount: The number of read pool nodes in a read pool. - NodeCount int64 `json:"nodeCount,omitempty"` - // Nodes: Output only. Entries containing information about each read pool node - // of the read pool. - Nodes []*ConnectPoolNodeConfig `json:"nodes,omitempty"` - // PscEnabled: Whether PSC connectivity is enabled for this instance. - PscEnabled bool `json:"pscEnabled,omitempty"` - // Region: The cloud region for the instance. For example, `us-central1`, - // `europe-west1`. The region cannot be changed after instance creation. - Region string `json:"region,omitempty"` - // ServerCaCert: SSL configuration. - ServerCaCert *SslCert `json:"serverCaCert,omitempty"` - // ServerCaMode: Specify what type of CA is used for the server certificate. - // - // Possible values: - // "CA_MODE_UNSPECIFIED" - CA mode is unknown. - // "GOOGLE_MANAGED_INTERNAL_CA" - Google-managed self-signed internal CA. - // "GOOGLE_MANAGED_CAS_CA" - Google-managed regional CA part of root CA - // hierarchy hosted on Google Cloud's Certificate Authority Service (CAS). - // "CUSTOMER_MANAGED_CAS_CA" - Customer-managed CA hosted on Google Cloud's - // Certificate Authority Service (CAS). - ServerCaMode string `json:"serverCaMode,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "BackendType") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "BackendType") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ConnectSettings) MarshalJSON() ([]byte, error) { - type NoMethod ConnectSettings - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ConnectionPoolConfig: The managed connection pooling configuration. -type ConnectionPoolConfig struct { - // ConnectionPoolingEnabled: Whether managed connection pooling is enabled. - ConnectionPoolingEnabled bool `json:"connectionPoolingEnabled,omitempty"` - // Flags: Optional. List of connection pool configuration flags. - Flags []*ConnectionPoolFlags `json:"flags,omitempty"` - // PoolerCount: Output only. Number of connection poolers. - PoolerCount int64 `json:"poolerCount,omitempty"` - // ForceSendFields is a list of field names (e.g. "ConnectionPoolingEnabled") - // to unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ConnectionPoolingEnabled") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ConnectionPoolConfig) MarshalJSON() ([]byte, error) { - type NoMethod ConnectionPoolConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ConnectionPoolFlags: Connection pool flags for Cloud SQL instances managed -// connection pool configuration. -type ConnectionPoolFlags struct { - // Name: Required. The name of the flag. - Name string `json:"name,omitempty"` - // Value: Required. The value of the flag. Boolean flags are set to `on` for - // true and `off` for false. This field must be omitted if the flag doesn't - // take a value. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Name") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Name") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ConnectionPoolFlags) MarshalJSON() ([]byte, error) { - type NoMethod ConnectionPoolFlags - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// DataCacheConfig: Data cache configurations. -type DataCacheConfig struct { - // DataCacheEnabled: Whether data cache is enabled for the instance. - DataCacheEnabled bool `json:"dataCacheEnabled,omitempty"` - // ForceSendFields is a list of field names (e.g. "DataCacheEnabled") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DataCacheEnabled") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s DataCacheConfig) MarshalJSON() ([]byte, error) { - type NoMethod DataCacheConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// Database: Represents a SQL database on the Cloud SQL instance. -type Database struct { - // Charset: The Cloud SQL charset value. - Charset string `json:"charset,omitempty"` - // Collation: The Cloud SQL collation value. - Collation string `json:"collation,omitempty"` - // Etag: This field is deprecated and will be removed from a future version of - // the API. - Etag string `json:"etag,omitempty"` - // Instance: The name of the Cloud SQL instance. This does not include the - // project ID. - Instance string `json:"instance,omitempty"` - // Kind: This is always `sql#database`. - Kind string `json:"kind,omitempty"` - // Name: The name of the database in the Cloud SQL instance. This does not - // include the project ID or instance name. - Name string `json:"name,omitempty"` - // Project: The project ID of the project containing the Cloud SQL database. - // The Google apps domain is prefixed if applicable. - Project string `json:"project,omitempty"` - // SelfLink: The URI of this resource. - SelfLink string `json:"selfLink,omitempty"` - SqlserverDatabaseDetails *SqlServerDatabaseDetails `json:"sqlserverDatabaseDetails,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Charset") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Charset") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s Database) MarshalJSON() ([]byte, error) { - type NoMethod Database - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// DatabaseFlags: Database flags for Cloud SQL instances. -type DatabaseFlags struct { - // Name: The name of the flag. These flags are passed at instance startup, so - // include both server options and system variables. Flags are specified with - // underscores, not hyphens. For more information, see Configuring Database - // Flags (https://cloud.google.com/sql/docs/mysql/flags) in the Cloud SQL - // documentation. - Name string `json:"name,omitempty"` - // Value: The value of the flag. Boolean flags are set to `on` for true and - // `off` for false. This field must be omitted if the flag doesn't take a - // value. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Name") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Name") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s DatabaseFlags) MarshalJSON() ([]byte, error) { - type NoMethod DatabaseFlags - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// DatabaseInstance: A Cloud SQL instance resource. -type DatabaseInstance struct { - // AvailableMaintenanceVersions: Output only. List all maintenance versions - // applicable on the instance - AvailableMaintenanceVersions []string `json:"availableMaintenanceVersions,omitempty"` - // BackendType: The backend type. `SECOND_GEN`: Cloud SQL database instance. - // `EXTERNAL`: A database server that is not managed by Google. This property - // is read-only; use the `tier` property in the `settings` object to determine - // the database type. - // - // Possible values: - // "SQL_BACKEND_TYPE_UNSPECIFIED" - This is an unknown backend type for - // instance. - // "FIRST_GEN" - V1 speckle instance. - // "SECOND_GEN" - V2 speckle instance. - // "EXTERNAL" - On premises instance. - BackendType string `json:"backendType,omitempty"` - // ConnectionName: Connection name of the Cloud SQL instance used in connection - // strings. - ConnectionName string `json:"connectionName,omitempty"` - // CreateTime: Output only. The time when the instance was created in RFC 3339 - // (https://tools.ietf.org/html/rfc3339) format, for example - // `2012-11-15T16:19:00.094Z`. - CreateTime string `json:"createTime,omitempty"` - // CurrentDiskSize: The current disk usage of the instance in bytes. This - // property has been deprecated. Use the - // "cloudsql.googleapis.com/database/disk/bytes_used" metric in Cloud - // Monitoring API instead. Please see this announcement - // (https://groups.google.com/d/msg/google-cloud-sql-announce/I_7-F9EBhT0/BtvFtdFeAgAJ) - // for details. - CurrentDiskSize int64 `json:"currentDiskSize,omitempty,string"` - // DatabaseInstalledVersion: Output only. Stores the current database version - // running on the instance including minor version such as `MYSQL_8_0_18`. - DatabaseInstalledVersion string `json:"databaseInstalledVersion,omitempty"` - // DatabaseVersion: The database engine type and version. The `databaseVersion` - // field cannot be changed after instance creation. - // - // Possible values: - // "SQL_DATABASE_VERSION_UNSPECIFIED" - This is an unknown database version. - // "MYSQL_5_1" - The database version is MySQL 5.1. - // "MYSQL_5_5" - The database version is MySQL 5.5. - // "MYSQL_5_6" - The database version is MySQL 5.6. - // "MYSQL_5_7" - The database version is MySQL 5.7. - // "MYSQL_8_0" - The database version is MySQL 8. - // "MYSQL_8_0_18" - The database major version is MySQL 8.0 and the minor - // version is 18. - // "MYSQL_8_0_26" - The database major version is MySQL 8.0 and the minor - // version is 26. - // "MYSQL_8_0_27" - The database major version is MySQL 8.0 and the minor - // version is 27. - // "MYSQL_8_0_28" - The database major version is MySQL 8.0 and the minor - // version is 28. - // "MYSQL_8_0_29" - The database major version is MySQL 8.0 and the minor - // version is 29. - // "MYSQL_8_0_30" - The database major version is MySQL 8.0 and the minor - // version is 30. - // "MYSQL_8_0_31" - The database major version is MySQL 8.0 and the minor - // version is 31. - // "MYSQL_8_0_32" - The database major version is MySQL 8.0 and the minor - // version is 32. - // "MYSQL_8_0_33" - The database major version is MySQL 8.0 and the minor - // version is 33. - // "MYSQL_8_0_34" - The database major version is MySQL 8.0 and the minor - // version is 34. - // "MYSQL_8_0_35" - The database major version is MySQL 8.0 and the minor - // version is 35. - // "MYSQL_8_0_36" - The database major version is MySQL 8.0 and the minor - // version is 36. - // "MYSQL_8_0_37" - The database major version is MySQL 8.0 and the minor - // version is 37. - // "MYSQL_8_0_39" - The database major version is MySQL 8.0 and the minor - // version is 39. - // "MYSQL_8_0_40" - The database major version is MySQL 8.0 and the minor - // version is 40. - // "MYSQL_8_0_41" - The database major version is MySQL 8.0 and the minor - // version is 41. - // "MYSQL_8_0_42" - The database major version is MySQL 8.0 and the minor - // version is 42. - // "MYSQL_8_0_43" - The database major version is MySQL 8.0 and the minor - // version is 43. - // "MYSQL_8_0_44" - The database major version is MySQL 8.0 and the minor - // version is 44. - // "MYSQL_8_0_45" - The database major version is MySQL 8.0 and the minor - // version is 45. - // "MYSQL_8_0_46" - The database major version is MySQL 8.0 and the minor - // version is 46. - // "MYSQL_8_4" - The database version is MySQL 8.4. - // "MYSQL_9_7" - The database version is MySQL 9.7. - // "SQLSERVER_2017_STANDARD" - The database version is SQL Server 2017 - // Standard. - // "SQLSERVER_2017_ENTERPRISE" - The database version is SQL Server 2017 - // Enterprise. - // "SQLSERVER_2017_EXPRESS" - The database version is SQL Server 2017 - // Express. - // "SQLSERVER_2017_WEB" - The database version is SQL Server 2017 Web. - // "POSTGRES_9_6" - The database version is PostgreSQL 9.6. - // "POSTGRES_10" - The database version is PostgreSQL 10. - // "POSTGRES_11" - The database version is PostgreSQL 11. - // "POSTGRES_12" - The database version is PostgreSQL 12. - // "POSTGRES_13" - The database version is PostgreSQL 13. - // "POSTGRES_14" - The database version is PostgreSQL 14. - // "POSTGRES_15" - The database version is PostgreSQL 15. - // "POSTGRES_16" - The database version is PostgreSQL 16. - // "POSTGRES_17" - The database version is PostgreSQL 17. - // "POSTGRES_18" - The database version is PostgreSQL 18. - // "SQLSERVER_2019_STANDARD" - The database version is SQL Server 2019 - // Standard. - // "SQLSERVER_2019_ENTERPRISE" - The database version is SQL Server 2019 - // Enterprise. - // "SQLSERVER_2019_EXPRESS" - The database version is SQL Server 2019 - // Express. - // "SQLSERVER_2019_WEB" - The database version is SQL Server 2019 Web. - // "SQLSERVER_2022_STANDARD" - The database version is SQL Server 2022 - // Standard. - // "SQLSERVER_2022_ENTERPRISE" - The database version is SQL Server 2022 - // Enterprise. - // "SQLSERVER_2022_EXPRESS" - The database version is SQL Server 2022 - // Express. - // "SQLSERVER_2022_WEB" - The database version is SQL Server 2022 Web. - // "SQLSERVER_2025_STANDARD" - The database version is SQL Server 2025 - // Standard. - // "SQLSERVER_2025_ENTERPRISE" - The database version is SQL Server 2025 - // Enterprise. - // "SQLSERVER_2025_EXPRESS" - The database version is SQL Server 2025 - // Express. - DatabaseVersion string `json:"databaseVersion,omitempty"` - // DiskEncryptionConfiguration: Disk encryption configuration specific to an - // instance. - DiskEncryptionConfiguration *DiskEncryptionConfiguration `json:"diskEncryptionConfiguration,omitempty"` - // DiskEncryptionStatus: Disk encryption status specific to an instance. - DiskEncryptionStatus *DiskEncryptionStatus `json:"diskEncryptionStatus,omitempty"` - // DnsName: Output only. The dns name of the instance. - DnsName string `json:"dnsName,omitempty"` - // DnsNames: Output only. The list of DNS names used by this instance. - DnsNames []*DnsNameMapping `json:"dnsNames,omitempty"` - // Etag: This field is deprecated and will be removed from a future version of - // the API. Use the `settings.settingsVersion` field instead. - Etag string `json:"etag,omitempty"` - // FailoverReplica: The name and status of the failover replica. - FailoverReplica *DatabaseInstanceFailoverReplica `json:"failoverReplica,omitempty"` - // GceZone: The Compute Engine zone that the instance is currently serving - // from. This value could be different from the zone that was specified when - // the instance was created if the instance has failed over to its secondary - // zone. WARNING: Changing this might restart the instance. - GceZone string `json:"gceZone,omitempty"` - // GeminiConfig: Gemini instance configuration. - GeminiConfig *GeminiInstanceConfig `json:"geminiConfig,omitempty"` - // IncludeReplicasForMajorVersionUpgrade: Input only. Determines whether an - // in-place major version upgrade of replicas happens when an in-place major - // version upgrade of a primary instance is initiated. - IncludeReplicasForMajorVersionUpgrade bool `json:"includeReplicasForMajorVersionUpgrade,omitempty"` - // InstanceType: The instance type. - // - // Possible values: - // "SQL_INSTANCE_TYPE_UNSPECIFIED" - This is an unknown Cloud SQL instance - // type. - // "CLOUD_SQL_INSTANCE" - A regular Cloud SQL instance that is not - // replicating from a primary instance. - // "ON_PREMISES_INSTANCE" - An instance running on the customer's premises - // that is not managed by Cloud SQL. - // "READ_REPLICA_INSTANCE" - A Cloud SQL instance acting as a read-replica. - // "READ_POOL_INSTANCE" - A Cloud SQL read pool. - InstanceType string `json:"instanceType,omitempty"` - // IpAddresses: The assigned IP addresses for the instance. - IpAddresses []*IpMapping `json:"ipAddresses,omitempty"` - // Ipv6Address: The IPv6 address assigned to the instance. (Deprecated) This - // property was applicable only to First Generation instances. - Ipv6Address string `json:"ipv6Address,omitempty"` - // Kind: This is always `sql#instance`. - Kind string `json:"kind,omitempty"` - // MaintenanceVersion: The current software version on the instance. - MaintenanceVersion string `json:"maintenanceVersion,omitempty"` - // MasterInstanceName: The name of the instance which will act as primary in - // the replication setup. - MasterInstanceName string `json:"masterInstanceName,omitempty"` - // MaxDiskSize: The maximum disk size of the instance in bytes. - MaxDiskSize int64 `json:"maxDiskSize,omitempty,string"` - // Name: Name of the Cloud SQL instance. This does not include the project ID. - Name string `json:"name,omitempty"` - // NodeCount: The number of read pool nodes in a read pool. - NodeCount int64 `json:"nodeCount,omitempty"` - // Nodes: Output only. Entries containing information about each read pool node - // of the read pool. - Nodes []*PoolNodeConfig `json:"nodes,omitempty"` - // OnPremisesConfiguration: Configuration specific to on-premises instances. - OnPremisesConfiguration *OnPremisesConfiguration `json:"onPremisesConfiguration,omitempty"` - // OutOfDiskReport: This field represents the report generated by the proactive - // database wellness job for OutOfDisk issues. * Writers: * the proactive - // database wellness job for OOD. * Readers: * the proactive database wellness - // job - OutOfDiskReport *SqlOutOfDiskReport `json:"outOfDiskReport,omitempty"` - // PrimaryDnsName: Output only. DEPRECATED: please use write_endpoint instead. - PrimaryDnsName string `json:"primaryDnsName,omitempty"` - // Project: The project ID of the project containing the Cloud SQL instance. - // The Google apps domain is prefixed if applicable. - Project string `json:"project,omitempty"` - // PscServiceAttachmentLink: Output only. The link to service attachment of PSC - // instance. - PscServiceAttachmentLink string `json:"pscServiceAttachmentLink,omitempty"` - // Region: The geographical region of the Cloud SQL instance. It can be one of - // the regions (https://cloud.google.com/sql/docs/mysql/locations#location-r) - // where Cloud SQL operates: For example, `asia-east1`, `europe-west1`, and - // `us-central1`. The default value is `us-central1`. - Region string `json:"region,omitempty"` - // ReplicaConfiguration: Configuration specific to failover replicas and read - // replicas. - ReplicaConfiguration *ReplicaConfiguration `json:"replicaConfiguration,omitempty"` - // ReplicaNames: The replicas of the instance. - ReplicaNames []string `json:"replicaNames,omitempty"` - // ReplicationCluster: Optional. A primary instance and disaster recovery (DR) - // replica pair. A DR replica is a cross-region replica that you designate for - // failover in the event that the primary instance experiences regional - // failure. Applicable to MySQL and PostgreSQL. - ReplicationCluster *ReplicationCluster `json:"replicationCluster,omitempty"` - // RootPassword: Initial root password. Use only on creation. You must set root - // passwords before you can connect to PostgreSQL instances. - RootPassword string `json:"rootPassword,omitempty"` - // SatisfiesPzi: Output only. This status indicates whether the instance - // satisfies PZI. The status is reserved for future use. - SatisfiesPzi bool `json:"satisfiesPzi,omitempty"` - // SatisfiesPzs: This status indicates whether the instance satisfies PZS. The - // status is reserved for future use. - SatisfiesPzs bool `json:"satisfiesPzs,omitempty"` - // ScheduledMaintenance: The start time of any upcoming scheduled maintenance - // for this instance. - ScheduledMaintenance *SqlScheduledMaintenance `json:"scheduledMaintenance,omitempty"` - // SecondaryGceZone: The Compute Engine zone that the failover instance is - // currently serving from for a regional instance. This value could be - // different from the zone that was specified when the instance was created if - // the instance has failed over to its secondary/failover zone. - SecondaryGceZone string `json:"secondaryGceZone,omitempty"` - // SelfLink: The URI of this resource. - SelfLink string `json:"selfLink,omitempty"` - // ServerCaCert: SSL configuration. - ServerCaCert *SslCert `json:"serverCaCert,omitempty"` - // ServiceAccountEmailAddress: The service account email address assigned to - // the instance.\This property is read-only. - ServiceAccountEmailAddress string `json:"serviceAccountEmailAddress,omitempty"` - // Settings: The user settings. - Settings *Settings `json:"settings,omitempty"` - // Possible values: - // "SQL_NETWORK_ARCHITECTURE_UNSPECIFIED" - // "NEW_NETWORK_ARCHITECTURE" - The instance uses the new network - // architecture. - // "OLD_NETWORK_ARCHITECTURE" - The instance uses the old network - // architecture. - SqlNetworkArchitecture string `json:"sqlNetworkArchitecture,omitempty"` - // State: The current serving state of the Cloud SQL instance. - // - // Possible values: - // "SQL_INSTANCE_STATE_UNSPECIFIED" - The state of the instance is unknown. - // "RUNNABLE" - The instance is running, or has been stopped by owner. - // "SUSPENDED" - The instance is not available, for example due to problems - // with billing. - // "PENDING_DELETE" - The instance is being deleted. - // "PENDING_CREATE" - The instance is being created. - // "MAINTENANCE" - The instance is down for maintenance. - // "FAILED" - The creation of the instance failed or a fatal error occurred - // during maintenance. - // "ONLINE_MAINTENANCE" - Deprecated - // "REPAIRING" - (Applicable to read pool nodes only.) The read pool node - // needs to be repaired. The database might be unavailable. - State string `json:"state,omitempty"` - // SuspensionReason: If the instance state is SUSPENDED, the reason for the - // suspension. - // - // Possible values: - // "SQL_SUSPENSION_REASON_UNSPECIFIED" - This is an unknown suspension - // reason. - // "BILLING_ISSUE" - The instance is suspended due to billing issues (for - // example:, account issue) - // "LEGAL_ISSUE" - The instance is suspended due to illegal content (for - // example:, child pornography, copyrighted material, etc.). - // "OPERATIONAL_ISSUE" - The instance is causing operational issues (for - // example:, causing the database to crash). - // "KMS_KEY_ISSUE" - The KMS key used by the instance is either revoked or - // denied access to - SuspensionReason []string `json:"suspensionReason,omitempty"` - // SwitchTransactionLogsToCloudStorageEnabled: Input only. Whether Cloud SQL is - // enabled to switch storing point-in-time recovery log files from a data disk - // to Cloud Storage. - SwitchTransactionLogsToCloudStorageEnabled bool `json:"switchTransactionLogsToCloudStorageEnabled,omitempty"` - // Tags: Optional. Input only. Immutable. Tag keys and tag values that are - // bound to this instance. You must represent each item in the map as: "" : - // "". For example, a single resource can have the following tags: ``` - // "123/environment": "production", "123/costCenter": "marketing", ``` For more - // information on tag creation and management, see - // https://cloud.google.com/resource-manager/docs/tags/tags-overview. - Tags map[string]string `json:"tags,omitempty"` - // UpgradableDatabaseVersions: Output only. All database versions that are - // available for upgrade. - UpgradableDatabaseVersions []*AvailableDatabaseVersion `json:"upgradableDatabaseVersions,omitempty"` - // WriteEndpoint: Output only. The dns name of the primary instance in a - // replication group. - WriteEndpoint string `json:"writeEndpoint,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. - // "AvailableMaintenanceVersions") to unconditionally include in API requests. - // By default, fields with empty or default values are omitted from API - // requests. See https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields - // for more details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AvailableMaintenanceVersions") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s DatabaseInstance) MarshalJSON() ([]byte, error) { - type NoMethod DatabaseInstance - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// DatabaseInstanceFailoverReplica: The name and status of the failover -// replica. -type DatabaseInstanceFailoverReplica struct { - // Available: The availability status of the failover replica. A false status - // indicates that the failover replica is out of sync. The primary instance can - // only failover to the failover replica when the status is true. - Available bool `json:"available,omitempty"` - // Name: The name of the failover replica. If specified at instance creation, a - // failover replica is created for the instance. The name doesn't include the - // project ID. - Name string `json:"name,omitempty"` - // ForceSendFields is a list of field names (e.g. "Available") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Available") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s DatabaseInstanceFailoverReplica) MarshalJSON() ([]byte, error) { - type NoMethod DatabaseInstanceFailoverReplica - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// DatabasesListResponse: Database list response. -type DatabasesListResponse struct { - // Items: List of database resources in the instance. - Items []*Database `json:"items,omitempty"` - // Kind: This is always `sql#databasesList`. - Kind string `json:"kind,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Items") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Items") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s DatabasesListResponse) MarshalJSON() ([]byte, error) { - type NoMethod DatabasesListResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// DemoteContext: This context is used to demote an existing standalone -// instance to be a Cloud SQL read replica for an external database server. -type DemoteContext struct { - // Kind: This is always `sql#demoteContext`. - Kind string `json:"kind,omitempty"` - // SourceRepresentativeInstanceName: Required. The name of the instance which - // acts as the on-premises primary instance in the replication setup. - SourceRepresentativeInstanceName string `json:"sourceRepresentativeInstanceName,omitempty"` - // ForceSendFields is a list of field names (e.g. "Kind") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Kind") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s DemoteContext) MarshalJSON() ([]byte, error) { - type NoMethod DemoteContext - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// DemoteMasterConfiguration: Read-replica configuration for connecting to the -// on-premises primary instance. -type DemoteMasterConfiguration struct { - // Kind: This is always `sql#demoteMasterConfiguration`. - Kind string `json:"kind,omitempty"` - // MysqlReplicaConfiguration: MySQL specific configuration when replicating - // from a MySQL on-premises primary instance. Replication configuration - // information such as the username, password, certificates, and keys are not - // stored in the instance metadata. The configuration information is used only - // to set up the replication connection and is stored by MySQL in a file named - // `master.info` in the data directory. - MysqlReplicaConfiguration *DemoteMasterMySqlReplicaConfiguration `json:"mysqlReplicaConfiguration,omitempty"` - // ForceSendFields is a list of field names (e.g. "Kind") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Kind") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s DemoteMasterConfiguration) MarshalJSON() ([]byte, error) { - type NoMethod DemoteMasterConfiguration - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// DemoteMasterContext: Database instance demote primary instance context. -type DemoteMasterContext struct { - // Kind: This is always `sql#demoteMasterContext`. - Kind string `json:"kind,omitempty"` - // MasterInstanceName: The name of the instance which will act as on-premises - // primary instance in the replication setup. - MasterInstanceName string `json:"masterInstanceName,omitempty"` - // ReplicaConfiguration: Configuration specific to read-replicas replicating - // from the on-premises primary instance. - ReplicaConfiguration *DemoteMasterConfiguration `json:"replicaConfiguration,omitempty"` - // SkipReplicationSetup: Flag to skip replication setup on the instance. - SkipReplicationSetup bool `json:"skipReplicationSetup,omitempty"` - // VerifyGtidConsistency: Verify the GTID consistency for demote operation. - // Default value: `True`. Setting this flag to `false` enables you to bypass - // the GTID consistency check between on-premises primary instance and Cloud - // SQL instance during the demotion operation but also exposes you to the risk - // of future replication failures. Change the value only if you know the reason - // for the GTID divergence and are confident that doing so will not cause any - // replication issues. - VerifyGtidConsistency bool `json:"verifyGtidConsistency,omitempty"` - // ForceSendFields is a list of field names (e.g. "Kind") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Kind") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s DemoteMasterContext) MarshalJSON() ([]byte, error) { - type NoMethod DemoteMasterContext - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// DemoteMasterMySqlReplicaConfiguration: Read-replica configuration specific -// to MySQL databases. -type DemoteMasterMySqlReplicaConfiguration struct { - // CaCertificate: PEM representation of the trusted CA's x509 certificate. - CaCertificate string `json:"caCertificate,omitempty"` - // ClientCertificate: PEM representation of the replica's x509 certificate. - ClientCertificate string `json:"clientCertificate,omitempty"` - // ClientKey: PEM representation of the replica's private key. The - // corresponding public key is encoded in the client's certificate. The format - // of the replica's private key can be either PKCS #1 or PKCS #8. - ClientKey string `json:"clientKey,omitempty"` - // Kind: This is always `sql#demoteMasterMysqlReplicaConfiguration`. - Kind string `json:"kind,omitempty"` - // Password: The password for the replication connection. - Password string `json:"password,omitempty"` - // Username: The username for the replication connection. - Username string `json:"username,omitempty"` - // ForceSendFields is a list of field names (e.g. "CaCertificate") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CaCertificate") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s DemoteMasterMySqlReplicaConfiguration) MarshalJSON() ([]byte, error) { - type NoMethod DemoteMasterMySqlReplicaConfiguration - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// DenyMaintenancePeriod: Deny maintenance Periods. This specifies a date range -// during when all CSA rollout will be denied. -type DenyMaintenancePeriod struct { - // EndDate: "deny maintenance period" end date. If the year of the end date is - // empty, the year of the start date also must be empty. In this case, it means - // the no maintenance interval recurs every year. The date is in format - // yyyy-mm-dd i.e., 2020-11-01, or mm-dd, i.e., 11-01 - EndDate string `json:"endDate,omitempty"` - // StartDate: "deny maintenance period" start date. If the year of the start - // date is empty, the year of the end date also must be empty. In this case, it - // means the deny maintenance period recurs every year. The date is in format - // yyyy-mm-dd i.e., 2020-11-01, or mm-dd, i.e., 11-01 - StartDate string `json:"startDate,omitempty"` - // Time: Time in UTC when the "deny maintenance period" starts on start_date - // and ends on end_date. The time is in format: HH:mm:SS, i.e., 00:00:00 - Time string `json:"time,omitempty"` - // ForceSendFields is a list of field names (e.g. "EndDate") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "EndDate") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s DenyMaintenancePeriod) MarshalJSON() ([]byte, error) { - type NoMethod DenyMaintenancePeriod - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// DiskEncryptionConfiguration: Disk encryption configuration for an instance. -type DiskEncryptionConfiguration struct { - // Kind: This is always `sql#diskEncryptionConfiguration`. - Kind string `json:"kind,omitempty"` - // KmsKeyName: Resource name of KMS key for disk encryption - KmsKeyName string `json:"kmsKeyName,omitempty"` - // ForceSendFields is a list of field names (e.g. "Kind") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Kind") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s DiskEncryptionConfiguration) MarshalJSON() ([]byte, error) { - type NoMethod DiskEncryptionConfiguration - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// DiskEncryptionStatus: Disk encryption status for an instance. -type DiskEncryptionStatus struct { - // Kind: This is always `sql#diskEncryptionStatus`. - Kind string `json:"kind,omitempty"` - // KmsKeyVersionName: KMS key version used to encrypt the Cloud SQL instance - // resource - KmsKeyVersionName string `json:"kmsKeyVersionName,omitempty"` - // ForceSendFields is a list of field names (e.g. "Kind") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Kind") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s DiskEncryptionStatus) MarshalJSON() ([]byte, error) { - type NoMethod DiskEncryptionStatus - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// DnsNameMapping: DNS metadata. -type DnsNameMapping struct { - // ConnectionType: Output only. The connection type of the DNS name. - // - // Possible values: - // "CONNECTION_TYPE_UNSPECIFIED" - Unknown connection type. - // "PUBLIC" - Public IP. - // "PRIVATE_SERVICES_ACCESS" - Private services access (private IP). - // "PRIVATE_SERVICE_CONNECT" - Private Service Connect. - ConnectionType string `json:"connectionType,omitempty"` - // DnsScope: Output only. The scope that the DNS name applies to. - // - // Possible values: - // "DNS_SCOPE_UNSPECIFIED" - DNS scope not set. This value should not be - // used. - // "INSTANCE" - Indicates an instance-level DNS name. - // "CLUSTER" - Indicates a cluster-level DNS name. - DnsScope string `json:"dnsScope,omitempty"` - // Name: Output only. The DNS name. - Name string `json:"name,omitempty"` - // RecordManager: Output only. The manager for this DNS record. - // - // Possible values: - // "RECORD_MANAGER_UNSPECIFIED" - Record manager not set. This value should - // not be used. - // "CUSTOMER" - The record may be managed by the customer. It is not - // automatically managed by Cloud SQL automation. - // "CLOUD_SQL_AUTOMATION" - The record is managed by Cloud SQL, which will - // create, update, and delete the DNS records for the zone automatically when - // the Cloud SQL database instance is created or updated. - RecordManager string `json:"recordManager,omitempty"` - // ForceSendFields is a list of field names (e.g. "ConnectionType") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ConnectionType") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s DnsNameMapping) MarshalJSON() ([]byte, error) { - type NoMethod DnsNameMapping - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// Empty: A generic empty message that you can re-use to avoid defining -// duplicated empty messages in your APIs. A typical example is to use it as -// the request or the response type of an API method. For instance: service Foo -// { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } -type Empty struct { - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` -} - -// ExecuteSqlPayload: The request payload used to execute SQL statements. -type ExecuteSqlPayload struct { - // Application: Optional. Specifies the name of the application that is making - // the request. This field is used for telemetry. Only alphanumeric characters, - // dashes, and underscores are allowed. The maximum length is 32 characters. - Application string `json:"application,omitempty"` - // AutoIamAuthn: Optional. When set to `true`, the API caller identity - // associated with the request is used for database authentication. The API - // caller must be an IAM user in the database. - AutoIamAuthn bool `json:"autoIamAuthn,omitempty"` - // Database: Optional. Name of the database on which the statement will be - // executed. - Database string `json:"database,omitempty"` - // PartialResultMode: Optional. Controls how the API should respond when the - // SQL execution result is incomplete due to the size limit or another error. - // The default mode is to throw an error. - // - // Possible values: - // "PARTIAL_RESULT_MODE_UNSPECIFIED" - Unspecified mode, effectively the same - // as `FAIL_PARTIAL_RESULT`. - // "FAIL_PARTIAL_RESULT" - Throw an error if the result exceeds 10 MB or if - // only a partial result can be retrieved. Don't return the result. - // "ALLOW_PARTIAL_RESULT" - Return a truncated result and set - // `partial_result` to true if the result exceeds 10 MB or if only a partial - // result can be retrieved due to error. Don't throw an error. - PartialResultMode string `json:"partialResultMode,omitempty"` - // RowLimit: Optional. The maximum number of rows returned per SQL statement. - RowLimit int64 `json:"rowLimit,omitempty,string"` - // SqlStatement: Required. SQL statements to run on the database. It can be a - // single statement or a sequence of statements separated by semicolons. - SqlStatement string `json:"sqlStatement,omitempty"` - // User: Optional. The name of an existing database user to connect to the - // database. When `auto_iam_authn` is set to true, this field is ignored and - // the API caller's IAM user is used. - User string `json:"user,omitempty"` - // ForceSendFields is a list of field names (e.g. "Application") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Application") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ExecuteSqlPayload) MarshalJSON() ([]byte, error) { - type NoMethod ExecuteSqlPayload - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ExportContext: Database instance export context. -type ExportContext struct { - // BakExportOptions: Options for exporting BAK files (SQL Server-only) - BakExportOptions *ExportContextBakExportOptions `json:"bakExportOptions,omitempty"` - // CsvExportOptions: Options for exporting data as CSV. `MySQL` and - // `PostgreSQL` instances only. - CsvExportOptions *ExportContextCsvExportOptions `json:"csvExportOptions,omitempty"` - // Databases: Databases to be exported. `MySQL instances:` If `fileType` is - // `SQL` and no database is specified, all databases are exported, except for - // the `mysql` system database. If `fileType` is `CSV`, you can specify one - // database, either by using this property or by using the - // `csvExportOptions.selectQuery` property, which takes precedence over this - // property. `PostgreSQL instances:` If you don't specify a database by name, - // all user databases in the instance are exported. This excludes system - // databases and Cloud SQL databases used to manage internal operations. - // Exporting all user databases is only available for directory-formatted - // parallel export. If `fileType` is `CSV`, this database must match the one - // specified in the `csvExportOptions.selectQuery` property. `SQL Server - // instances:` You must specify one database to be exported, and the `fileType` - // must be `BAK`. - Databases []string `json:"databases,omitempty"` - // FileType: The file type for the specified uri. - // - // Possible values: - // "SQL_FILE_TYPE_UNSPECIFIED" - Unknown file type. - // "SQL" - File containing SQL statements. - // "CSV" - File in CSV format. - // "BAK" - // "TDE" - TDE certificate. - FileType string `json:"fileType,omitempty"` - // Kind: This is always `sql#exportContext`. - Kind string `json:"kind,omitempty"` - // Offload: Whether to perform a serverless export. - Offload bool `json:"offload,omitempty"` - // SqlExportOptions: Options for exporting data as SQL statements. - SqlExportOptions *ExportContextSqlExportOptions `json:"sqlExportOptions,omitempty"` - // TdeExportOptions: Optional. Export parameters specific to SQL Server TDE - // certificates - TdeExportOptions *ExportContextTdeExportOptions `json:"tdeExportOptions,omitempty"` - // Uri: The path to the file in Google Cloud Storage where the export will be - // stored. The URI is in the form `gs://bucketName/fileName`. If the file - // already exists, the request succeeds, but the operation fails. If `fileType` - // is `SQL` and the filename ends with .gz, the contents are compressed. - Uri string `json:"uri,omitempty"` - // ForceSendFields is a list of field names (e.g. "BakExportOptions") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "BakExportOptions") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ExportContext) MarshalJSON() ([]byte, error) { - type NoMethod ExportContext - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ExportContextBakExportOptions: Options for exporting BAK files (SQL -// Server-only) -type ExportContextBakExportOptions struct { - // BakType: Type of this bak file will be export, FULL or DIFF, SQL Server only - // - // Possible values: - // "BAK_TYPE_UNSPECIFIED" - Default type. - // "FULL" - Full backup. - // "DIFF" - Differential backup. - // "TLOG" - Transaction Log backup - BakType string `json:"bakType,omitempty"` - // CopyOnly: Deprecated: copy_only is deprecated. Use differential_base instead - CopyOnly bool `json:"copyOnly,omitempty"` - // DifferentialBase: Whether or not the backup can be used as a differential - // base copy_only backup can not be served as differential base - DifferentialBase bool `json:"differentialBase,omitempty"` - // ExportLogEndTime: Optional. The end timestamp when transaction log will be - // included in the export operation. RFC 3339 - // (https://tools.ietf.org/html/rfc3339) format (for example, - // `2023-10-01T16:19:00.094`) in UTC. When omitted, all available logs until - // current time will be included. Only applied to Cloud SQL for SQL Server. - ExportLogEndTime string `json:"exportLogEndTime,omitempty"` - // ExportLogStartTime: Optional. The begin timestamp when transaction log will - // be included in the export operation. RFC 3339 - // (https://tools.ietf.org/html/rfc3339) format (for example, - // `2023-10-01T16:19:00.094`) in UTC. When omitted, all available logs from the - // beginning of retention period will be included. Only applied to Cloud SQL - // for SQL Server. - ExportLogStartTime string `json:"exportLogStartTime,omitempty"` - // StripeCount: Option for specifying how many stripes to use for the export. - // If blank, and the value of the striped field is true, the number of stripes - // is automatically chosen. - StripeCount int64 `json:"stripeCount,omitempty"` - // Striped: Whether or not the export should be striped. - Striped bool `json:"striped,omitempty"` - // ForceSendFields is a list of field names (e.g. "BakType") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "BakType") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ExportContextBakExportOptions) MarshalJSON() ([]byte, error) { - type NoMethod ExportContextBakExportOptions - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ExportContextCsvExportOptions: Options for exporting data as CSV. `MySQL` -// and `PostgreSQL` instances only. -type ExportContextCsvExportOptions struct { - // EscapeCharacter: Specifies the character that should appear before a data - // character that needs to be escaped. - EscapeCharacter string `json:"escapeCharacter,omitempty"` - // FieldsTerminatedBy: Specifies the character that separates columns within - // each row (line) of the file. - FieldsTerminatedBy string `json:"fieldsTerminatedBy,omitempty"` - // LinesTerminatedBy: This is used to separate lines. If a line does not - // contain all fields, the rest of the columns are set to their default values. - LinesTerminatedBy string `json:"linesTerminatedBy,omitempty"` - // QuoteCharacter: Specifies the quoting character to be used when a data value - // is quoted. - QuoteCharacter string `json:"quoteCharacter,omitempty"` - // SelectQuery: The select query used to extract the data. - SelectQuery string `json:"selectQuery,omitempty"` - // ForceSendFields is a list of field names (e.g. "EscapeCharacter") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "EscapeCharacter") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ExportContextCsvExportOptions) MarshalJSON() ([]byte, error) { - type NoMethod ExportContextCsvExportOptions - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ExportContextSqlExportOptions: Options for exporting data as SQL statements. -type ExportContextSqlExportOptions struct { - // MysqlExportOptions: Options for exporting from MySQL. - MysqlExportOptions *ExportContextSqlExportOptionsMysqlExportOptions `json:"mysqlExportOptions,omitempty"` - // Parallel: Optional. Whether or not the export should be parallel. - Parallel bool `json:"parallel,omitempty"` - // PostgresExportOptions: Options for exporting from a Cloud SQL for PostgreSQL - // instance. - PostgresExportOptions *ExportContextSqlExportOptionsPostgresExportOptions `json:"postgresExportOptions,omitempty"` - // SchemaOnly: Export only schemas. - SchemaOnly bool `json:"schemaOnly,omitempty"` - // Tables: Tables to export, or that were exported, from the specified - // database. If you specify tables, specify one and only one database. For - // PostgreSQL instances, you can specify only one table. - Tables []string `json:"tables,omitempty"` - // Threads: Optional. The number of threads to use for parallel export. - Threads int64 `json:"threads,omitempty"` - // ForceSendFields is a list of field names (e.g. "MysqlExportOptions") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "MysqlExportOptions") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ExportContextSqlExportOptions) MarshalJSON() ([]byte, error) { - type NoMethod ExportContextSqlExportOptions - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ExportContextSqlExportOptionsMysqlExportOptions: Options for exporting from -// MySQL. -type ExportContextSqlExportOptionsMysqlExportOptions struct { - // MasterData: Option to include SQL statement required to set up replication. - // If set to `1`, the dump file includes a CHANGE MASTER TO statement with the - // binary log coordinates, and --set-gtid-purged is set to ON. If set to `2`, - // the CHANGE MASTER TO statement is written as a SQL comment and has no - // effect. If set to any value other than `1`, --set-gtid-purged is set to OFF. - MasterData int64 `json:"masterData,omitempty"` - // ForceSendFields is a list of field names (e.g. "MasterData") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "MasterData") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ExportContextSqlExportOptionsMysqlExportOptions) MarshalJSON() ([]byte, error) { - type NoMethod ExportContextSqlExportOptionsMysqlExportOptions - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ExportContextSqlExportOptionsPostgresExportOptions: Options for exporting -// from a Cloud SQL for PostgreSQL instance. -type ExportContextSqlExportOptionsPostgresExportOptions struct { - // Clean: Optional. Use this option to include DROP SQL statements. - // Use these statements to delete database objects before running the import - // operation. - Clean bool `json:"clean,omitempty"` - // IfExists: Optional. Option to include an IF EXISTS SQL statement with each - // DROP statement produced by clean. - IfExists bool `json:"ifExists,omitempty"` - // ForceSendFields is a list of field names (e.g. "Clean") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Clean") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ExportContextSqlExportOptionsPostgresExportOptions) MarshalJSON() ([]byte, error) { - type NoMethod ExportContextSqlExportOptionsPostgresExportOptions - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ExportContextTdeExportOptions: Optional. Export parameters specific to SQL -// Server TDE certificates -type ExportContextTdeExportOptions struct { - // CertificatePath: Required. Path to the TDE certificate public key in the - // form gs://bucketName/fileName. The instance must have write access to the - // bucket. Applicable only for SQL Server instances. - CertificatePath string `json:"certificatePath,omitempty"` - // Name: Required. Certificate name. Applicable only for SQL Server instances. - Name string `json:"name,omitempty"` - // PrivateKeyPassword: Required. Password that encrypts the private key. - PrivateKeyPassword string `json:"privateKeyPassword,omitempty"` - // PrivateKeyPath: Required. Path to the TDE certificate private key in the - // form gs://bucketName/fileName. The instance must have write access to the - // location. Applicable only for SQL Server instances. - PrivateKeyPath string `json:"privateKeyPath,omitempty"` - // ForceSendFields is a list of field names (e.g. "CertificatePath") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CertificatePath") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ExportContextTdeExportOptions) MarshalJSON() ([]byte, error) { - type NoMethod ExportContextTdeExportOptions - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ExternalSyncSelectedObject: The selected object that Cloud SQL migrates. -type ExternalSyncSelectedObject struct { - // Database: The name of the database that Cloud SQL migrates. - Database string `json:"database,omitempty"` - // ForceSendFields is a list of field names (e.g. "Database") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Database") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ExternalSyncSelectedObject) MarshalJSON() ([]byte, error) { - type NoMethod ExternalSyncSelectedObject - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// FailoverContext: Database instance failover context. -type FailoverContext struct { - // Kind: This is always `sql#failoverContext`. - Kind string `json:"kind,omitempty"` - // SettingsVersion: The current settings version of this instance. Request will - // be rejected if this version doesn't match the current settings version. - SettingsVersion int64 `json:"settingsVersion,omitempty,string"` - // ForceSendFields is a list of field names (e.g. "Kind") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Kind") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s FailoverContext) MarshalJSON() ([]byte, error) { - type NoMethod FailoverContext - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// FinalBackupConfig: Config used to determine the final backup settings for -// the instance. -type FinalBackupConfig struct { - // Enabled: Whether the final backup is enabled for the instance. - Enabled bool `json:"enabled,omitempty"` - // RetentionDays: The number of days to retain the final backup after the - // instance deletion. The final backup will be purged at - // (time_of_instance_deletion + retention_days). - RetentionDays int64 `json:"retentionDays,omitempty"` - // ForceSendFields is a list of field names (e.g. "Enabled") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Enabled") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s FinalBackupConfig) MarshalJSON() ([]byte, error) { - type NoMethod FinalBackupConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// Flag: A flag resource. -type Flag struct { - // AllowedIntValues: Use this field if only certain integers are accepted. Can - // be combined with min_value and max_value to add additional values. - AllowedIntValues googleapi.Int64s `json:"allowedIntValues,omitempty"` - // AllowedStringValues: For `STRING` flags, a list of strings that the value - // can be set to. - AllowedStringValues []string `json:"allowedStringValues,omitempty"` - // AppliesTo: The database version this flag applies to. Can be MySQL - // instances: `MYSQL_8_0`, `MYSQL_8_0_18`, `MYSQL_8_0_26`, `MYSQL_5_7`, or - // `MYSQL_5_6`. PostgreSQL instances: `POSTGRES_9_6`, `POSTGRES_10`, - // `POSTGRES_11` or `POSTGRES_12`. SQL Server instances: - // `SQLSERVER_2017_STANDARD`, `SQLSERVER_2017_ENTERPRISE`, - // `SQLSERVER_2017_EXPRESS`, `SQLSERVER_2017_WEB`, `SQLSERVER_2019_STANDARD`, - // `SQLSERVER_2019_ENTERPRISE`, `SQLSERVER_2019_EXPRESS`, or - // `SQLSERVER_2019_WEB`. See the complete list - // (/sql/docs/mysql/admin-api/rest/v1/SqlDatabaseVersion). - // - // Possible values: - // "SQL_DATABASE_VERSION_UNSPECIFIED" - This is an unknown database version. - // "MYSQL_5_1" - The database version is MySQL 5.1. - // "MYSQL_5_5" - The database version is MySQL 5.5. - // "MYSQL_5_6" - The database version is MySQL 5.6. - // "MYSQL_5_7" - The database version is MySQL 5.7. - // "MYSQL_8_0" - The database version is MySQL 8. - // "MYSQL_8_0_18" - The database major version is MySQL 8.0 and the minor - // version is 18. - // "MYSQL_8_0_26" - The database major version is MySQL 8.0 and the minor - // version is 26. - // "MYSQL_8_0_27" - The database major version is MySQL 8.0 and the minor - // version is 27. - // "MYSQL_8_0_28" - The database major version is MySQL 8.0 and the minor - // version is 28. - // "MYSQL_8_0_29" - The database major version is MySQL 8.0 and the minor - // version is 29. - // "MYSQL_8_0_30" - The database major version is MySQL 8.0 and the minor - // version is 30. - // "MYSQL_8_0_31" - The database major version is MySQL 8.0 and the minor - // version is 31. - // "MYSQL_8_0_32" - The database major version is MySQL 8.0 and the minor - // version is 32. - // "MYSQL_8_0_33" - The database major version is MySQL 8.0 and the minor - // version is 33. - // "MYSQL_8_0_34" - The database major version is MySQL 8.0 and the minor - // version is 34. - // "MYSQL_8_0_35" - The database major version is MySQL 8.0 and the minor - // version is 35. - // "MYSQL_8_0_36" - The database major version is MySQL 8.0 and the minor - // version is 36. - // "MYSQL_8_0_37" - The database major version is MySQL 8.0 and the minor - // version is 37. - // "MYSQL_8_0_39" - The database major version is MySQL 8.0 and the minor - // version is 39. - // "MYSQL_8_0_40" - The database major version is MySQL 8.0 and the minor - // version is 40. - // "MYSQL_8_0_41" - The database major version is MySQL 8.0 and the minor - // version is 41. - // "MYSQL_8_0_42" - The database major version is MySQL 8.0 and the minor - // version is 42. - // "MYSQL_8_0_43" - The database major version is MySQL 8.0 and the minor - // version is 43. - // "MYSQL_8_0_44" - The database major version is MySQL 8.0 and the minor - // version is 44. - // "MYSQL_8_0_45" - The database major version is MySQL 8.0 and the minor - // version is 45. - // "MYSQL_8_0_46" - The database major version is MySQL 8.0 and the minor - // version is 46. - // "MYSQL_8_4" - The database version is MySQL 8.4. - // "MYSQL_9_7" - The database version is MySQL 9.7. - // "SQLSERVER_2017_STANDARD" - The database version is SQL Server 2017 - // Standard. - // "SQLSERVER_2017_ENTERPRISE" - The database version is SQL Server 2017 - // Enterprise. - // "SQLSERVER_2017_EXPRESS" - The database version is SQL Server 2017 - // Express. - // "SQLSERVER_2017_WEB" - The database version is SQL Server 2017 Web. - // "POSTGRES_9_6" - The database version is PostgreSQL 9.6. - // "POSTGRES_10" - The database version is PostgreSQL 10. - // "POSTGRES_11" - The database version is PostgreSQL 11. - // "POSTGRES_12" - The database version is PostgreSQL 12. - // "POSTGRES_13" - The database version is PostgreSQL 13. - // "POSTGRES_14" - The database version is PostgreSQL 14. - // "POSTGRES_15" - The database version is PostgreSQL 15. - // "POSTGRES_16" - The database version is PostgreSQL 16. - // "POSTGRES_17" - The database version is PostgreSQL 17. - // "POSTGRES_18" - The database version is PostgreSQL 18. - // "SQLSERVER_2019_STANDARD" - The database version is SQL Server 2019 - // Standard. - // "SQLSERVER_2019_ENTERPRISE" - The database version is SQL Server 2019 - // Enterprise. - // "SQLSERVER_2019_EXPRESS" - The database version is SQL Server 2019 - // Express. - // "SQLSERVER_2019_WEB" - The database version is SQL Server 2019 Web. - // "SQLSERVER_2022_STANDARD" - The database version is SQL Server 2022 - // Standard. - // "SQLSERVER_2022_ENTERPRISE" - The database version is SQL Server 2022 - // Enterprise. - // "SQLSERVER_2022_EXPRESS" - The database version is SQL Server 2022 - // Express. - // "SQLSERVER_2022_WEB" - The database version is SQL Server 2022 Web. - // "SQLSERVER_2025_STANDARD" - The database version is SQL Server 2025 - // Standard. - // "SQLSERVER_2025_ENTERPRISE" - The database version is SQL Server 2025 - // Enterprise. - // "SQLSERVER_2025_EXPRESS" - The database version is SQL Server 2025 - // Express. - AppliesTo []string `json:"appliesTo,omitempty"` - // FlagScope: Scope of flag. - // - // Possible values: - // "SQL_FLAG_SCOPE_UNSPECIFIED" - Assume database flags if unspecified - // "SQL_FLAG_SCOPE_DATABASE" - database flags - // "SQL_FLAG_SCOPE_CONNECTION_POOL" - connection pool configuration flags - FlagScope string `json:"flagScope,omitempty"` - // InBeta: Whether or not the flag is considered in beta. - InBeta bool `json:"inBeta,omitempty"` - // Kind: This is always `sql#flag`. - Kind string `json:"kind,omitempty"` - // MaxValue: For `INTEGER` flags, the maximum allowed value. - MaxValue int64 `json:"maxValue,omitempty,string"` - // MinValue: For `INTEGER` flags, the minimum allowed value. - MinValue int64 `json:"minValue,omitempty,string"` - // Name: This is the name of the flag. Flag names always use underscores, not - // hyphens, for example: `max_allowed_packet` - Name string `json:"name,omitempty"` - // RecommendedIntValue: Recommended int value in integer format for UI display. - RecommendedIntValue int64 `json:"recommendedIntValue,omitempty,string"` - // RecommendedStringValue: Recommended string value in string format for UI - // display. - RecommendedStringValue string `json:"recommendedStringValue,omitempty"` - // RequiresRestart: Indicates whether changing this flag will trigger a - // database restart. Only applicable to Second Generation instances. - RequiresRestart bool `json:"requiresRestart,omitempty"` - // Type: The type of the flag. Flags are typed to being `BOOLEAN`, `STRING`, - // `INTEGER` or `NONE`. `NONE` is used for flags that do not take a value, such - // as `skip_grant_tables`. - // - // Possible values: - // "SQL_FLAG_TYPE_UNSPECIFIED" - This is an unknown flag type. - // "BOOLEAN" - Boolean type flag. - // "STRING" - String type flag. - // "INTEGER" - Integer type flag. - // "NONE" - Flag type used for a server startup option. - // "MYSQL_TIMEZONE_OFFSET" - Type introduced specially for MySQL TimeZone - // offset. Accept a string value with the format [-12:59, 13:00]. - // "FLOAT" - Float type flag. - // "REPEATED_STRING" - Comma-separated list of the strings in a SqlFlagType - // enum. - Type string `json:"type,omitempty"` - // ForceSendFields is a list of field names (e.g. "AllowedIntValues") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AllowedIntValues") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s Flag) MarshalJSON() ([]byte, error) { - type NoMethod Flag - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// FlagsListResponse: Flags list response. -type FlagsListResponse struct { - // Items: List of flags. - Items []*Flag `json:"items,omitempty"` - // Kind: This is always `sql#flagsList`. - Kind string `json:"kind,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Items") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Items") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s FlagsListResponse) MarshalJSON() ([]byte, error) { - type NoMethod FlagsListResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GeminiInstanceConfig: Gemini instance configuration. -type GeminiInstanceConfig struct { - // ActiveQueryEnabled: Output only. Whether the active query is enabled. - ActiveQueryEnabled bool `json:"activeQueryEnabled,omitempty"` - // Entitled: Output only. Whether Gemini is enabled. - Entitled bool `json:"entitled,omitempty"` - // FlagRecommenderEnabled: Output only. Whether the flag recommender is - // enabled. - FlagRecommenderEnabled bool `json:"flagRecommenderEnabled,omitempty"` - // GoogleVacuumMgmtEnabled: Output only. Whether the vacuum management is - // enabled. - GoogleVacuumMgmtEnabled bool `json:"googleVacuumMgmtEnabled,omitempty"` - // IndexAdvisorEnabled: Output only. Whether the index advisor is enabled. - IndexAdvisorEnabled bool `json:"indexAdvisorEnabled,omitempty"` - // OomSessionCancelEnabled: Output only. Whether canceling the out-of-memory - // (OOM) session is enabled. - OomSessionCancelEnabled bool `json:"oomSessionCancelEnabled,omitempty"` - // ForceSendFields is a list of field names (e.g. "ActiveQueryEnabled") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ActiveQueryEnabled") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GeminiInstanceConfig) MarshalJSON() ([]byte, error) { - type NoMethod GeminiInstanceConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GenerateEphemeralCertRequest: Ephemeral certificate creation request. -type GenerateEphemeralCertRequest struct { - // AccessToken: Optional. Access token to include in the signed certificate. - AccessToken string `json:"access_token,omitempty"` - // PublicKey: PEM encoded public key to include in the signed certificate. - PublicKey string `json:"public_key,omitempty"` - // ReadTime: Optional. Optional snapshot read timestamp to trade freshness for - // performance. - ReadTime string `json:"readTime,omitempty"` - // ValidDuration: Optional. If set, it will contain the cert valid duration. - ValidDuration string `json:"validDuration,omitempty"` - // ForceSendFields is a list of field names (e.g. "AccessToken") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AccessToken") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GenerateEphemeralCertRequest) MarshalJSON() ([]byte, error) { - type NoMethod GenerateEphemeralCertRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GenerateEphemeralCertResponse: Ephemeral certificate creation request. -type GenerateEphemeralCertResponse struct { - // EphemeralCert: Generated cert - EphemeralCert *SslCert `json:"ephemeralCert,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "EphemeralCert") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "EphemeralCert") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GenerateEphemeralCertResponse) MarshalJSON() ([]byte, error) { - type NoMethod GenerateEphemeralCertResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ImportContext: Database instance import context. -type ImportContext struct { - // BakImportOptions: Import parameters specific to SQL Server .BAK files - BakImportOptions *ImportContextBakImportOptions `json:"bakImportOptions,omitempty"` - // CsvImportOptions: Options for importing data as CSV. - CsvImportOptions *ImportContextCsvImportOptions `json:"csvImportOptions,omitempty"` - // Database: The target database for the import. If `fileType` is `SQL`, this - // field is required only if the import file does not specify a database, and - // is overridden by any database specification in the import file. For entire - // instance parallel import operations, the database is overridden by the - // database name stored in subdirectory name. If `fileType` is `CSV`, one - // database must be specified. - Database string `json:"database,omitempty"` - // FileType: The file type for the specified uri.\`SQL`: The file contains SQL - // statements. \`CSV`: The file contains CSV data. - // - // Possible values: - // "SQL_FILE_TYPE_UNSPECIFIED" - Unknown file type. - // "SQL" - File containing SQL statements. - // "CSV" - File in CSV format. - // "BAK" - // "TDE" - TDE certificate. - FileType string `json:"fileType,omitempty"` - // ImportUser: The PostgreSQL user for this import operation. PostgreSQL - // instances only. - ImportUser string `json:"importUser,omitempty"` - // Kind: This is always `sql#importContext`. - Kind string `json:"kind,omitempty"` - // SqlImportOptions: Optional. Options for importing data from SQL statements. - SqlImportOptions *ImportContextSqlImportOptions `json:"sqlImportOptions,omitempty"` - // TdeImportOptions: Optional. Import parameters specific to SQL Server TDE - // certificates - TdeImportOptions *ImportContextTdeImportOptions `json:"tdeImportOptions,omitempty"` - // Uri: Path to the import file in Cloud Storage, in the form - // `gs://bucketName/fileName`. Compressed gzip files (.gz) are supported when - // `fileType` is `SQL`. The instance must have write permissions to the bucket - // and read access to the file. - Uri string `json:"uri,omitempty"` - // ForceSendFields is a list of field names (e.g. "BakImportOptions") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "BakImportOptions") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ImportContext) MarshalJSON() ([]byte, error) { - type NoMethod ImportContext - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ImportContextBakImportOptions: Import parameters specific to SQL Server .BAK -// files -type ImportContextBakImportOptions struct { - // BakType: Type of the bak content, FULL or DIFF - // - // Possible values: - // "BAK_TYPE_UNSPECIFIED" - Default type. - // "FULL" - Full backup. - // "DIFF" - Differential backup. - // "TLOG" - Transaction Log backup - BakType string `json:"bakType,omitempty"` - EncryptionOptions *ImportContextBakImportOptionsEncryptionOptions `json:"encryptionOptions,omitempty"` - // NoRecovery: Whether or not the backup importing will restore database with - // NORECOVERY option. Applies only to Cloud SQL for SQL Server. - NoRecovery bool `json:"noRecovery,omitempty"` - // RecoveryOnly: Whether or not the backup importing request will just bring - // database online without downloading Bak content only one of "no_recovery" - // and "recovery_only" can be true otherwise error will return. Applies only to - // Cloud SQL for SQL Server. - RecoveryOnly bool `json:"recoveryOnly,omitempty"` - // StopAt: Optional. The timestamp when the import should stop. This timestamp - // is in the RFC 3339 (https://tools.ietf.org/html/rfc3339) format (for - // example, `2023-10-01T16:19:00.094`). This field is equivalent to the STOPAT - // keyword and applies to Cloud SQL for SQL Server only. - StopAt string `json:"stopAt,omitempty"` - // StopAtMark: Optional. The marked transaction where the import should stop. - // This field is equivalent to the STOPATMARK keyword and applies to Cloud SQL - // for SQL Server only. - StopAtMark string `json:"stopAtMark,omitempty"` - // Striped: Whether or not the backup set being restored is striped. Applies - // only to Cloud SQL for SQL Server. - Striped bool `json:"striped,omitempty"` - // ForceSendFields is a list of field names (e.g. "BakType") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "BakType") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ImportContextBakImportOptions) MarshalJSON() ([]byte, error) { - type NoMethod ImportContextBakImportOptions - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ImportContextBakImportOptionsEncryptionOptions struct { - // CertPath: Path to the Certificate (.cer) in Cloud Storage, in the form - // `gs://bucketName/fileName`. The instance must have write permissions to the - // bucket and read access to the file. - CertPath string `json:"certPath,omitempty"` - // KeepEncrypted: Optional. Whether the imported file remains encrypted. - KeepEncrypted bool `json:"keepEncrypted,omitempty"` - // PvkPassword: Password that encrypts the private key - PvkPassword string `json:"pvkPassword,omitempty"` - // PvkPath: Path to the Certificate Private Key (.pvk) in Cloud Storage, in the - // form `gs://bucketName/fileName`. The instance must have write permissions to - // the bucket and read access to the file. - PvkPath string `json:"pvkPath,omitempty"` - // ForceSendFields is a list of field names (e.g. "CertPath") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CertPath") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ImportContextBakImportOptionsEncryptionOptions) MarshalJSON() ([]byte, error) { - type NoMethod ImportContextBakImportOptionsEncryptionOptions - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ImportContextCsvImportOptions: Options for importing data as CSV. -type ImportContextCsvImportOptions struct { - // Columns: The columns to which CSV data is imported. If not specified, all - // columns of the database table are loaded with CSV data. - Columns []string `json:"columns,omitempty"` - // EscapeCharacter: Specifies the character that should appear before a data - // character that needs to be escaped. - EscapeCharacter string `json:"escapeCharacter,omitempty"` - // FieldsTerminatedBy: Specifies the character that separates columns within - // each row (line) of the file. - FieldsTerminatedBy string `json:"fieldsTerminatedBy,omitempty"` - // LinesTerminatedBy: This is used to separate lines. If a line does not - // contain all fields, the rest of the columns are set to their default values. - LinesTerminatedBy string `json:"linesTerminatedBy,omitempty"` - // QuoteCharacter: Specifies the quoting character to be used when a data value - // is quoted. - QuoteCharacter string `json:"quoteCharacter,omitempty"` - // Table: The table to which CSV data is imported. - Table string `json:"table,omitempty"` - // ForceSendFields is a list of field names (e.g. "Columns") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Columns") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ImportContextCsvImportOptions) MarshalJSON() ([]byte, error) { - type NoMethod ImportContextCsvImportOptions - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ImportContextSqlImportOptions: Optional. Options for importing data from SQL -// statements. -type ImportContextSqlImportOptions struct { - // Parallel: Optional. Whether or not the import should be parallel. - Parallel bool `json:"parallel,omitempty"` - // PostgresImportOptions: Optional. Options for importing from a Cloud SQL for - // PostgreSQL instance. - PostgresImportOptions *ImportContextSqlImportOptionsPostgresImportOptions `json:"postgresImportOptions,omitempty"` - // Threads: Optional. The number of threads to use for parallel import. - Threads int64 `json:"threads,omitempty"` - // ForceSendFields is a list of field names (e.g. "Parallel") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Parallel") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ImportContextSqlImportOptions) MarshalJSON() ([]byte, error) { - type NoMethod ImportContextSqlImportOptions - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ImportContextSqlImportOptionsPostgresImportOptions: Optional. Options for -// importing from a Cloud SQL for PostgreSQL instance. -type ImportContextSqlImportOptionsPostgresImportOptions struct { - // Clean: Optional. The --clean flag for the pg_restore utility. This flag - // applies only if you enabled Cloud SQL to import files in parallel. - Clean bool `json:"clean,omitempty"` - // IfExists: Optional. The --if-exists flag for the pg_restore utility. This - // flag applies only if you enabled Cloud SQL to import files in parallel. - IfExists bool `json:"ifExists,omitempty"` - // ForceSendFields is a list of field names (e.g. "Clean") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Clean") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ImportContextSqlImportOptionsPostgresImportOptions) MarshalJSON() ([]byte, error) { - type NoMethod ImportContextSqlImportOptionsPostgresImportOptions - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ImportContextTdeImportOptions: Optional. Import parameters specific to SQL -// Server TDE certificates -type ImportContextTdeImportOptions struct { - // CertificatePath: Required. Path to the TDE certificate public key in the - // form gs://bucketName/fileName. The instance must have read access to the - // file. Applicable only for SQL Server instances. - CertificatePath string `json:"certificatePath,omitempty"` - // Name: Required. Certificate name. Applicable only for SQL Server instances. - Name string `json:"name,omitempty"` - // PrivateKeyPassword: Required. Password that encrypts the private key. - PrivateKeyPassword string `json:"privateKeyPassword,omitempty"` - // PrivateKeyPath: Required. Path to the TDE certificate private key in the - // form gs://bucketName/fileName. The instance must have read access to the - // file. Applicable only for SQL Server instances. - PrivateKeyPath string `json:"privateKeyPath,omitempty"` - // ForceSendFields is a list of field names (e.g. "CertificatePath") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CertificatePath") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ImportContextTdeImportOptions) MarshalJSON() ([]byte, error) { - type NoMethod ImportContextTdeImportOptions - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InsightsConfig: Insights configuration. This specifies when Cloud SQL -// Insights feature is enabled and optional configuration. -type InsightsConfig struct { - // EnhancedQueryInsightsEnabled: Optional. Whether enhanced query insights - // feature is enabled. - EnhancedQueryInsightsEnabled bool `json:"enhancedQueryInsightsEnabled,omitempty"` - // QueryInsightsEnabled: Whether Query Insights feature is enabled. - QueryInsightsEnabled bool `json:"queryInsightsEnabled,omitempty"` - // QueryPlansPerMinute: Number of query execution plans captured by Insights - // per minute for all queries combined. Default is 5. - QueryPlansPerMinute int64 `json:"queryPlansPerMinute,omitempty"` - // QueryStringLength: Maximum query length stored in bytes. Default value: 1024 - // bytes. Range: 256-4500 bytes. Query lengths greater than this field value - // will be truncated to this value. When unset, query length will be the - // default value. Changing query length will restart the database. - QueryStringLength int64 `json:"queryStringLength,omitempty"` - // RecordApplicationTags: Whether Query Insights will record application tags - // from query when enabled. - RecordApplicationTags bool `json:"recordApplicationTags,omitempty"` - // RecordClientAddress: Whether Query Insights will record client address when - // enabled. - RecordClientAddress bool `json:"recordClientAddress,omitempty"` - // ForceSendFields is a list of field names (e.g. - // "EnhancedQueryInsightsEnabled") to unconditionally include in API requests. - // By default, fields with empty or default values are omitted from API - // requests. See https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields - // for more details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "EnhancedQueryInsightsEnabled") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InsightsConfig) MarshalJSON() ([]byte, error) { - type NoMethod InsightsConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InstanceReference: Reference to another Cloud SQL instance. -type InstanceReference struct { - // Name: The name of the Cloud SQL instance being referenced. This does not - // include the project ID. - Name string `json:"name,omitempty"` - // Project: The project ID of the Cloud SQL instance being referenced. The - // default is the same project ID as the instance references it. - Project string `json:"project,omitempty"` - // Region: The region of the Cloud SQL instance being referenced. - Region string `json:"region,omitempty"` - // ForceSendFields is a list of field names (e.g. "Name") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Name") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceReference) MarshalJSON() ([]byte, error) { - type NoMethod InstanceReference - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InstancesAcquireSsrsLeaseRequest: Request to acquire a lease for SSRS. -type InstancesAcquireSsrsLeaseRequest struct { - // AcquireSsrsLeaseContext: Contains details about the acquire SSRS lease - // operation. - AcquireSsrsLeaseContext *AcquireSsrsLeaseContext `json:"acquireSsrsLeaseContext,omitempty"` - // ForceSendFields is a list of field names (e.g. "AcquireSsrsLeaseContext") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AcquireSsrsLeaseContext") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstancesAcquireSsrsLeaseRequest) MarshalJSON() ([]byte, error) { - type NoMethod InstancesAcquireSsrsLeaseRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InstancesCloneRequest: Database instance clone request. -type InstancesCloneRequest struct { - // CloneContext: Required. Contains details about the clone operation. - CloneContext *CloneContext `json:"cloneContext,omitempty"` - // ForceSendFields is a list of field names (e.g. "CloneContext") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CloneContext") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstancesCloneRequest) MarshalJSON() ([]byte, error) { - type NoMethod InstancesCloneRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InstancesDemoteMasterRequest: Database demote primary instance request. -type InstancesDemoteMasterRequest struct { - // DemoteMasterContext: Contains details about the demoteMaster operation. - DemoteMasterContext *DemoteMasterContext `json:"demoteMasterContext,omitempty"` - // ForceSendFields is a list of field names (e.g. "DemoteMasterContext") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DemoteMasterContext") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstancesDemoteMasterRequest) MarshalJSON() ([]byte, error) { - type NoMethod InstancesDemoteMasterRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InstancesDemoteRequest: This request is used to demote an existing -// standalone instance to be a Cloud SQL read replica for an external database -// server. -type InstancesDemoteRequest struct { - // DemoteContext: Required. Contains details about the demote operation. - DemoteContext *DemoteContext `json:"demoteContext,omitempty"` - // ForceSendFields is a list of field names (e.g. "DemoteContext") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DemoteContext") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstancesDemoteRequest) MarshalJSON() ([]byte, error) { - type NoMethod InstancesDemoteRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InstancesExportRequest: Database instance export request. -type InstancesExportRequest struct { - // ExportContext: Contains details about the export operation. - ExportContext *ExportContext `json:"exportContext,omitempty"` - // ForceSendFields is a list of field names (e.g. "ExportContext") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ExportContext") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstancesExportRequest) MarshalJSON() ([]byte, error) { - type NoMethod InstancesExportRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InstancesFailoverRequest: Instance failover request. -type InstancesFailoverRequest struct { - // FailoverContext: Failover Context. - FailoverContext *FailoverContext `json:"failoverContext,omitempty"` - // ForceSendFields is a list of field names (e.g. "FailoverContext") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "FailoverContext") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstancesFailoverRequest) MarshalJSON() ([]byte, error) { - type NoMethod InstancesFailoverRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InstancesImportRequest: Database instance import request. -type InstancesImportRequest struct { - // ImportContext: Contains details about the import operation. - ImportContext *ImportContext `json:"importContext,omitempty"` - // ForceSendFields is a list of field names (e.g. "ImportContext") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ImportContext") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstancesImportRequest) MarshalJSON() ([]byte, error) { - type NoMethod InstancesImportRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InstancesListEntraIdCertificatesResponse: Instances ListEntraIdCertificates -// response. -type InstancesListEntraIdCertificatesResponse struct { - // ActiveVersion: The `sha1_fingerprint` of the active certificate from - // `certs`. - ActiveVersion string `json:"activeVersion,omitempty"` - // Certs: List of Entra ID certificates for the instance. - Certs []*SslCert `json:"certs,omitempty"` - // Kind: This is always `sql#instancesListEntraIdCertificates`. - Kind string `json:"kind,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "ActiveVersion") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ActiveVersion") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstancesListEntraIdCertificatesResponse) MarshalJSON() ([]byte, error) { - type NoMethod InstancesListEntraIdCertificatesResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InstancesListResponse: Database instances list response. -type InstancesListResponse struct { - // Items: List of database instance resources. - Items []*DatabaseInstance `json:"items,omitempty"` - // Kind: This is always `sql#instancesList`. - Kind string `json:"kind,omitempty"` - // NextPageToken: The continuation token, used to page through large result - // sets. Provide this value in a subsequent request to return the next page of - // results. - NextPageToken string `json:"nextPageToken,omitempty"` - // Warnings: List of warnings that occurred while handling the request. - Warnings []*ApiWarning `json:"warnings,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Items") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Items") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstancesListResponse) MarshalJSON() ([]byte, error) { - type NoMethod InstancesListResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InstancesListServerCasResponse: Instances ListServerCas response. -type InstancesListServerCasResponse struct { - ActiveVersion string `json:"activeVersion,omitempty"` - // Certs: List of server CA certificates for the instance. - Certs []*SslCert `json:"certs,omitempty"` - // Kind: This is always `sql#instancesListServerCas`. - Kind string `json:"kind,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "ActiveVersion") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ActiveVersion") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstancesListServerCasResponse) MarshalJSON() ([]byte, error) { - type NoMethod InstancesListServerCasResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InstancesListServerCertificatesResponse: Instances ListServerCertificates -// response. -type InstancesListServerCertificatesResponse struct { - // ActiveVersion: The `sha1_fingerprint` of the active certificate from - // `server_certs`. - ActiveVersion string `json:"activeVersion,omitempty"` - // CaCerts: List of server CA certificates for the instance. - CaCerts []*SslCert `json:"caCerts,omitempty"` - // Kind: This is always `sql#instancesListServerCertificates`. - Kind string `json:"kind,omitempty"` - // ServerCerts: List of server certificates for the instance, signed by the - // corresponding CA from the `ca_certs` list. - ServerCerts []*SslCert `json:"serverCerts,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "ActiveVersion") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ActiveVersion") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstancesListServerCertificatesResponse) MarshalJSON() ([]byte, error) { - type NoMethod InstancesListServerCertificatesResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InstancesPreCheckMajorVersionUpgradeRequest: Request for Pre-checks for MVU -type InstancesPreCheckMajorVersionUpgradeRequest struct { - // PreCheckMajorVersionUpgradeContext: Required. Contains details about the - // pre-check major version upgrade operation. - PreCheckMajorVersionUpgradeContext *PreCheckMajorVersionUpgradeContext `json:"preCheckMajorVersionUpgradeContext,omitempty"` - // ForceSendFields is a list of field names (e.g. - // "PreCheckMajorVersionUpgradeContext") to unconditionally include in API - // requests. By default, fields with empty or default values are omitted from - // API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. - // "PreCheckMajorVersionUpgradeContext") to include in API requests with the - // JSON null value. By default, fields with empty values are omitted from API - // requests. See https://pkg.go.dev/google.golang.org/api#hdr-NullFields for - // more details. - NullFields []string `json:"-"` -} - -func (s InstancesPreCheckMajorVersionUpgradeRequest) MarshalJSON() ([]byte, error) { - type NoMethod InstancesPreCheckMajorVersionUpgradeRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InstancesReencryptRequest: Database Instance reencrypt request. -type InstancesReencryptRequest struct { - // BackupReencryptionConfig: Configuration specific to backup re-encryption - BackupReencryptionConfig *BackupReencryptionConfig `json:"backupReencryptionConfig,omitempty"` - // ForceSendFields is a list of field names (e.g. "BackupReencryptionConfig") - // to unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "BackupReencryptionConfig") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstancesReencryptRequest) MarshalJSON() ([]byte, error) { - type NoMethod InstancesReencryptRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InstancesRestoreBackupRequest: Database instance restore backup request. -type InstancesRestoreBackupRequest struct { - // Backup: The name of the backup that's used to restore a Cloud SQL instance: - // Format: projects/{project-id}/backups/{backup-uid}. Only one of - // restore_backup_context, backup, backupdr_backup can be passed to the input. - Backup string `json:"backup,omitempty"` - // BackupdrBackup: The name of the backup that's used to restore a Cloud SQL - // instance: Format: - // "projects/{project-id}/locations/{location}/backupVaults/{backupvault}/dataSo - // urces/{datasource}/backups/{backup-uid}". Only one of - // restore_backup_context, backup, backupdr_backup can be passed to the input. - BackupdrBackup string `json:"backupdrBackup,omitempty"` - // RestoreBackupContext: Parameters required to perform the restore backup - // operation. - RestoreBackupContext *RestoreBackupContext `json:"restoreBackupContext,omitempty"` - // RestoreInstanceClearOverridesFieldNames: Optional. This field has the same - // purpose as restore_instance_settings, changes any instance settings stored - // in the backup you are restoring from. With the difference that these fields - // are cleared in the settings. - RestoreInstanceClearOverridesFieldNames []string `json:"restoreInstanceClearOverridesFieldNames,omitempty"` - // RestoreInstanceSettings: Optional. By using this parameter, Cloud SQL - // overrides any instance settings stored in the backup you are restoring from. - // You can't change the instance's major database version and you can only - // increase the disk size. You can use this field to restore new instances - // only. This field is not applicable for restore to existing instances. - RestoreInstanceSettings *DatabaseInstance `json:"restoreInstanceSettings,omitempty"` - // ForceSendFields is a list of field names (e.g. "Backup") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Backup") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstancesRestoreBackupRequest) MarshalJSON() ([]byte, error) { - type NoMethod InstancesRestoreBackupRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InstancesRotateEntraIdCertificateRequest: Rotate Entra ID certificate -// request. -type InstancesRotateEntraIdCertificateRequest struct { - // RotateEntraIdCertificateContext: Optional. Contains details about the rotate - // server certificate operation. - RotateEntraIdCertificateContext *RotateEntraIdCertificateContext `json:"rotateEntraIdCertificateContext,omitempty"` - // ForceSendFields is a list of field names (e.g. - // "RotateEntraIdCertificateContext") to unconditionally include in API - // requests. By default, fields with empty or default values are omitted from - // API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "RotateEntraIdCertificateContext") - // to include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstancesRotateEntraIdCertificateRequest) MarshalJSON() ([]byte, error) { - type NoMethod InstancesRotateEntraIdCertificateRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InstancesRotateServerCaRequest: Rotate server CA request. -type InstancesRotateServerCaRequest struct { - // RotateServerCaContext: Contains details about the rotate server CA - // operation. - RotateServerCaContext *RotateServerCaContext `json:"rotateServerCaContext,omitempty"` - // ForceSendFields is a list of field names (e.g. "RotateServerCaContext") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "RotateServerCaContext") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstancesRotateServerCaRequest) MarshalJSON() ([]byte, error) { - type NoMethod InstancesRotateServerCaRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InstancesRotateServerCertificateRequest: Rotate server certificate request. -type InstancesRotateServerCertificateRequest struct { - // RotateServerCertificateContext: Optional. Contains details about the rotate - // server certificate operation. - RotateServerCertificateContext *RotateServerCertificateContext `json:"rotateServerCertificateContext,omitempty"` - // ForceSendFields is a list of field names (e.g. - // "RotateServerCertificateContext") to unconditionally include in API - // requests. By default, fields with empty or default values are omitted from - // API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "RotateServerCertificateContext") - // to include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstancesRotateServerCertificateRequest) MarshalJSON() ([]byte, error) { - type NoMethod InstancesRotateServerCertificateRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InstancesTruncateLogRequest: Instance truncate log request. -type InstancesTruncateLogRequest struct { - // TruncateLogContext: Contains details about the truncate log operation. - TruncateLogContext *TruncateLogContext `json:"truncateLogContext,omitempty"` - // ForceSendFields is a list of field names (e.g. "TruncateLogContext") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "TruncateLogContext") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstancesTruncateLogRequest) MarshalJSON() ([]byte, error) { - type NoMethod InstancesTruncateLogRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// Interval: Represents a time interval, encoded as a Timestamp start -// (inclusive) and a Timestamp end (exclusive). The start must be less than or -// equal to the end. When the start equals the end, the interval is empty -// (matches no time). When both start and end are unspecified, the interval -// matches any time. -type Interval struct { - // EndTime: Optional. Exclusive end of the interval. If specified, a Timestamp - // matching this interval will have to be before the end. - EndTime string `json:"endTime,omitempty"` - // StartTime: Optional. Inclusive start of the interval. If specified, a - // Timestamp matching this interval will have to be the same or after the - // start. - StartTime string `json:"startTime,omitempty"` - // ForceSendFields is a list of field names (e.g. "EndTime") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "EndTime") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s Interval) MarshalJSON() ([]byte, error) { - type NoMethod Interval - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// IpConfiguration: IP Management configuration. -type IpConfiguration struct { - // AllocatedIpRange: The name of the allocated ip range for the private ip - // Cloud SQL instance. For example: "google-managed-services-default". If set, - // the instance ip will be created in the allocated range. The range name must - // comply with RFC 1035 (https://tools.ietf.org/html/rfc1035). Specifically, - // the name must be 1-63 characters long and match the regular expression - // `[a-z]([-a-z0-9]*[a-z0-9])?.` - AllocatedIpRange string `json:"allocatedIpRange,omitempty"` - // AuthorizedNetworks: The list of external networks that are allowed to - // connect to the instance using the IP. In 'CIDR' notation, also known as - // 'slash' notation (for example: `157.197.200.0/24`). - AuthorizedNetworks []*AclEntry `json:"authorizedNetworks,omitempty"` - // CustomSubjectAlternativeNames: Optional. Custom Subject Alternative - // Name(SAN)s for a Cloud SQL instance. - CustomSubjectAlternativeNames []string `json:"customSubjectAlternativeNames,omitempty"` - // EnablePrivatePathForGoogleCloudServices: Controls connectivity to private IP - // instances from Google services, such as BigQuery. - EnablePrivatePathForGoogleCloudServices bool `json:"enablePrivatePathForGoogleCloudServices,omitempty"` - // Ipv4Enabled: Whether the instance is assigned a public IP address or not. - Ipv4Enabled bool `json:"ipv4Enabled,omitempty"` - // PrivateNetwork: The resource link for the VPC network from which the Cloud - // SQL instance is accessible for private IP. For example, - // `/projects/myProject/global/networks/default`. This setting can be updated, - // but it cannot be removed after it is set. - PrivateNetwork string `json:"privateNetwork,omitempty"` - // PscConfig: PSC settings for this instance. - PscConfig *PscConfig `json:"pscConfig,omitempty"` - // RequireSsl: Use `ssl_mode` instead. Whether SSL/TLS connections over IP are - // enforced. If set to false, then allow both non-SSL/non-TLS and SSL/TLS - // connections. For SSL/TLS connections, the client certificate won't be - // verified. If set to true, then only allow connections encrypted with SSL/TLS - // and with valid client certificates. If you want to enforce SSL/TLS without - // enforcing the requirement for valid client certificates, then use the - // `ssl_mode` flag instead of the `require_ssl` flag. - RequireSsl bool `json:"requireSsl,omitempty"` - // ServerCaMode: Specify what type of CA is used for the server certificate. - // - // Possible values: - // "CA_MODE_UNSPECIFIED" - CA mode is unspecified. It is effectively the same - // as `GOOGLE_MANAGED_INTERNAL_CA`. - // "GOOGLE_MANAGED_INTERNAL_CA" - Google-managed self-signed internal CA. - // "GOOGLE_MANAGED_CAS_CA" - Google-managed regional CA part of root CA - // hierarchy hosted on Google Cloud's Certificate Authority Service (CAS). - // "CUSTOMER_MANAGED_CAS_CA" - Customer-managed CA hosted on Google Cloud's - // Certificate Authority Service (CAS). - ServerCaMode string `json:"serverCaMode,omitempty"` - // ServerCaPool: Optional. The resource name of the server CA pool for an - // instance with `CUSTOMER_MANAGED_CAS_CA` as the `server_ca_mode`. Format: - // projects/{PROJECT}/locations/{REGION}/caPools/{CA_POOL_ID} - ServerCaPool string `json:"serverCaPool,omitempty"` - // ServerCertificateRotationMode: Optional. Controls the automatic server - // certificate rotation feature. This feature is disabled by default. When - // enabled, the server certificate will be automatically rotated during Cloud - // SQL scheduled maintenance or self-service maintenance updates up to six - // months before it expires. This setting can only be set if server_ca_mode is - // either GOOGLE_MANAGED_CAS_CA or CUSTOMER_MANAGED_CAS_CA. - // - // Possible values: - // "SERVER_CERTIFICATE_ROTATION_MODE_UNSPECIFIED" - Unspecified: no automatic - // server certificate rotation. - // "NO_AUTOMATIC_ROTATION" - No automatic server certificate rotation. The - // user must [manage server certificate - // rotation](/sql/docs/mysql/manage-ssl-instance#rotate-server-certificate-cas) - // on their side. - // "AUTOMATIC_ROTATION_DURING_MAINTENANCE" - Automatic server certificate - // rotation during Cloud SQL scheduled maintenance or self-service maintenance - // updates. Requires `server_ca_mode` to be `GOOGLE_MANAGED_CAS_CA` or - // `CUSTOMER_MANAGED_CAS_CA`. - ServerCertificateRotationMode string `json:"serverCertificateRotationMode,omitempty"` - // SslMode: Specify how SSL/TLS is enforced in database connections. If you - // must use the `require_ssl` flag for backward compatibility, then only the - // following value pairs are valid: For PostgreSQL and MySQL: * - // `ssl_mode=ALLOW_UNENCRYPTED_AND_ENCRYPTED` and `require_ssl=false` * - // `ssl_mode=ENCRYPTED_ONLY` and `require_ssl=false` * - // `ssl_mode=TRUSTED_CLIENT_CERTIFICATE_REQUIRED` and `require_ssl=true` For - // SQL Server: * `ssl_mode=ALLOW_UNENCRYPTED_AND_ENCRYPTED` and - // `require_ssl=false` * `ssl_mode=ENCRYPTED_ONLY` and `require_ssl=true` The - // value of `ssl_mode` has priority over the value of `require_ssl`. For - // example, for the pair `ssl_mode=ENCRYPTED_ONLY` and `require_ssl=false`, - // `ssl_mode=ENCRYPTED_ONLY` means accept only SSL connections, while - // `require_ssl=false` means accept both non-SSL and SSL connections. In this - // case, MySQL and PostgreSQL databases respect `ssl_mode` and accepts only SSL - // connections. - // - // Possible values: - // "SSL_MODE_UNSPECIFIED" - The SSL mode is unknown. - // "ALLOW_UNENCRYPTED_AND_ENCRYPTED" - Allow non-SSL/non-TLS and SSL/TLS - // connections. For SSL connections to MySQL and PostgreSQL, the client - // certificate isn't verified. When this value is used, the legacy - // `require_ssl` flag must be false or cleared to avoid a conflict between the - // values of the two flags. - // "ENCRYPTED_ONLY" - Only allow connections encrypted with SSL/TLS. For SSL - // connections to MySQL and PostgreSQL, the client certificate isn't verified. - // When this value is used, the legacy `require_ssl` flag must be false or - // cleared to avoid a conflict between the values of the two flags. - // "TRUSTED_CLIENT_CERTIFICATE_REQUIRED" - Only allow connections encrypted - // with SSL/TLS and with valid client certificates. When this value is used, - // the legacy `require_ssl` flag must be true or cleared to avoid the conflict - // between values of two flags. PostgreSQL clients or users that connect using - // IAM database authentication must use either the [Cloud SQL Auth - // Proxy](https://cloud.google.com/sql/docs/postgres/connect-auth-proxy) or - // [Cloud SQL - // Connectors](https://cloud.google.com/sql/docs/postgres/connect-connectors) - // to enforce client identity verification. Only applicable to MySQL and - // PostgreSQL. Not applicable to SQL Server. - SslMode string `json:"sslMode,omitempty"` - // ForceSendFields is a list of field names (e.g. "AllocatedIpRange") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AllocatedIpRange") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s IpConfiguration) MarshalJSON() ([]byte, error) { - type NoMethod IpConfiguration - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// IpMapping: Database instance IP mapping -type IpMapping struct { - // IpAddress: The IP address assigned. - IpAddress string `json:"ipAddress,omitempty"` - // TimeToRetire: The due time for this IP to be retired in RFC 3339 - // (https://tools.ietf.org/html/rfc3339) format, for example - // `2012-11-15T16:19:00.094Z`. This field is only available when the IP is - // scheduled to be retired. - TimeToRetire string `json:"timeToRetire,omitempty"` - // Type: The type of this IP address. A `PRIMARY` address is a public address - // that can accept incoming connections. A `PRIVATE` address is a private - // address that can accept incoming connections. An `OUTGOING` address is the - // source address of connections originating from the instance, if supported. - // - // Possible values: - // "SQL_IP_ADDRESS_TYPE_UNSPECIFIED" - This is an unknown IP address type. - // "PRIMARY" - IP address the customer is supposed to connect to. Usually - // this is the load balancer's IP address - // "OUTGOING" - Source IP address of the connection a read replica - // establishes to its external primary instance. This IP address can be - // allowlisted by the customer in case it has a firewall that filters incoming - // connection to its on premises primary instance. - // "PRIVATE" - Private IP used when using private IPs and network peering. - // "MIGRATED_1ST_GEN" - V1 IP of a migrated instance. We want the user to - // decommission this IP as soon as the migration is complete. Note: V1 - // instances with V1 ip addresses will be counted as PRIMARY. - Type string `json:"type,omitempty"` - // ForceSendFields is a list of field names (e.g. "IpAddress") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "IpAddress") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s IpMapping) MarshalJSON() ([]byte, error) { - type NoMethod IpMapping - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ListBackupsResponse: The response payload containing a list of the backups. -type ListBackupsResponse struct { - // Backups: A list of backups. - Backups []*Backup `json:"backups,omitempty"` - // NextPageToken: A token, which can be sent as `page_token` to retrieve the - // next page. If this field is omitted, then there aren't subsequent pages. - NextPageToken string `json:"nextPageToken,omitempty"` - // Warnings: If a region isn't unavailable or if an unknown error occurs, then - // a warning message is returned. - Warnings []*ApiWarning `json:"warnings,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Backups") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Backups") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ListBackupsResponse) MarshalJSON() ([]byte, error) { - type NoMethod ListBackupsResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// LocationPreference: Preferred location. This specifies where a Cloud SQL -// instance is located. Note that if the preferred location is not available, -// the instance will be located as close as possible within the region. Only -// one location may be specified. -type LocationPreference struct { - // FollowGaeApplication: The App Engine application to follow, it must be in - // the same region as the Cloud SQL instance. WARNING: Changing this might - // restart the instance. - FollowGaeApplication string `json:"followGaeApplication,omitempty"` - // Kind: This is always `sql#locationPreference`. - Kind string `json:"kind,omitempty"` - // SecondaryZone: The preferred Compute Engine zone for the secondary/failover - // (for example: us-central1-a, us-central1-b, etc.). To disable this field, - // set it to 'no_secondary_zone'. - SecondaryZone string `json:"secondaryZone,omitempty"` - // Zone: The preferred Compute Engine zone (for example: us-central1-a, - // us-central1-b, etc.). WARNING: Changing this might restart the instance. - Zone string `json:"zone,omitempty"` - // ForceSendFields is a list of field names (e.g. "FollowGaeApplication") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "FollowGaeApplication") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s LocationPreference) MarshalJSON() ([]byte, error) { - type NoMethod LocationPreference - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// MaintenanceWindow: Maintenance window. This specifies when a Cloud SQL -// instance is restarted for system maintenance purposes. -type MaintenanceWindow struct { - // Day: Day of week - `MONDAY`, `TUESDAY`, `WEDNESDAY`, `THURSDAY`, `FRIDAY`, - // `SATURDAY`, or `SUNDAY`. Specify in the UTC time zone. Returned in output as - // an integer, 1 to 7, where `1` equals Monday. - Day int64 `json:"day,omitempty"` - // Hour: Hour of day - 0 to 23. Specify in the UTC time zone. - Hour int64 `json:"hour,omitempty"` - // Kind: This is always `sql#maintenanceWindow`. - Kind string `json:"kind,omitempty"` - // UpdateTrack: Maintenance timing settings: `canary`, `stable`, or `week5`. - // For more information, see About maintenance on Cloud SQL instances - // (https://cloud.google.com/sql/docs/mysql/maintenance). - // - // Possible values: - // "SQL_UPDATE_TRACK_UNSPECIFIED" - This is an unknown maintenance timing - // preference. - // "canary" - For an instance with a scheduled maintenance window, this - // maintenance timing indicates that the maintenance update is scheduled 7 to - // 14 days after the notification is sent out. Also referred to as `Week 1` - // (Console) and `preview` (gcloud CLI). - // "stable" - For an instance with a scheduled maintenance window, this - // maintenance timing indicates that the maintenance update is scheduled 15 to - // 21 days after the notification is sent out. Also referred to as `Week 2` - // (Console) and `production` (gcloud CLI). - // "week5" - For instance with a scheduled maintenance window, this - // maintenance timing indicates that the maintenance update is scheduled 35 to - // 42 days after the notification is sent out. - UpdateTrack string `json:"updateTrack,omitempty"` - // ForceSendFields is a list of field names (e.g. "Day") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Day") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s MaintenanceWindow) MarshalJSON() ([]byte, error) { - type NoMethod MaintenanceWindow - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// Message: Represents a notice or warning message from the database. -type Message struct { - // Message: The full message string. For PostgreSQL, this is a formatted string - // that may include severity, code, and the notice/warning message. For MySQL, - // this contains the warning message. - Message string `json:"message,omitempty"` - // Severity: The severity of the message (e.g., "NOTICE" for PostgreSQL, - // "WARNING" for MySQL). - Severity string `json:"severity,omitempty"` - // ForceSendFields is a list of field names (e.g. "Message") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Message") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s Message) MarshalJSON() ([]byte, error) { - type NoMethod Message - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// Metadata: The additional metadata information regarding the execution of the -// SQL statements. -type Metadata struct { - // SqlStatementExecutionTime: The time taken to execute the SQL statements. - SqlStatementExecutionTime string `json:"sqlStatementExecutionTime,omitempty"` - // ForceSendFields is a list of field names (e.g. "SqlStatementExecutionTime") - // to unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "SqlStatementExecutionTime") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s Metadata) MarshalJSON() ([]byte, error) { - type NoMethod Metadata - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// MySqlReplicaConfiguration: Read-replica configuration specific to MySQL -// databases. -type MySqlReplicaConfiguration struct { - // CaCertificate: PEM representation of the trusted CA's x509 certificate. - CaCertificate string `json:"caCertificate,omitempty"` - // ClientCertificate: PEM representation of the replica's x509 certificate. - ClientCertificate string `json:"clientCertificate,omitempty"` - // ClientKey: PEM representation of the replica's private key. The - // corresponding public key is encoded in the client's certificate. - ClientKey string `json:"clientKey,omitempty"` - // ConnectRetryInterval: Seconds to wait between connect retries. MySQL's - // default is 60 seconds. - ConnectRetryInterval int64 `json:"connectRetryInterval,omitempty"` - // DumpFilePath: Path to a SQL dump file in Google Cloud Storage from which the - // replica instance is to be created. The URI is in the form - // gs://bucketName/fileName. Compressed gzip files (.gz) are also supported. - // Dumps have the binlog co-ordinates from which replication begins. This can - // be accomplished by setting --master-data to 1 when using mysqldump. - DumpFilePath string `json:"dumpFilePath,omitempty"` - // Kind: This is always `sql#mysqlReplicaConfiguration`. - Kind string `json:"kind,omitempty"` - // MasterHeartbeatPeriod: Interval in milliseconds between replication - // heartbeats. - MasterHeartbeatPeriod int64 `json:"masterHeartbeatPeriod,omitempty,string"` - // Password: The password for the replication connection. - Password string `json:"password,omitempty"` - // SslCipher: A list of permissible ciphers to use for SSL encryption. - SslCipher string `json:"sslCipher,omitempty"` - // Username: The username for the replication connection. - Username string `json:"username,omitempty"` - // VerifyServerCertificate: Whether or not to check the primary instance's - // Common Name value in the certificate that it sends during the SSL handshake. - VerifyServerCertificate bool `json:"verifyServerCertificate,omitempty"` - // ForceSendFields is a list of field names (e.g. "CaCertificate") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CaCertificate") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s MySqlReplicaConfiguration) MarshalJSON() ([]byte, error) { - type NoMethod MySqlReplicaConfiguration - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// MySqlSyncConfig: MySQL-specific external server sync settings. -type MySqlSyncConfig struct { - // InitialSyncFlags: Flags to use for the initial dump. - InitialSyncFlags []*SyncFlags `json:"initialSyncFlags,omitempty"` - // ForceSendFields is a list of field names (e.g. "InitialSyncFlags") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "InitialSyncFlags") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s MySqlSyncConfig) MarshalJSON() ([]byte, error) { - type NoMethod MySqlSyncConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// OnPremisesConfiguration: On-premises instance configuration. -type OnPremisesConfiguration struct { - // CaCertificate: PEM representation of the trusted CA's x509 certificate. - CaCertificate string `json:"caCertificate,omitempty"` - // ClientCertificate: PEM representation of the replica's x509 certificate. - ClientCertificate string `json:"clientCertificate,omitempty"` - // ClientKey: PEM representation of the replica's private key. The - // corresponding public key is encoded in the client's certificate. - ClientKey string `json:"clientKey,omitempty"` - // DumpFilePath: The dump file to create the Cloud SQL replica. - DumpFilePath string `json:"dumpFilePath,omitempty"` - // HostPort: The host and port of the on-premises instance in host:port format - HostPort string `json:"hostPort,omitempty"` - // Kind: This is always `sql#onPremisesConfiguration`. - Kind string `json:"kind,omitempty"` - // Password: The password for connecting to on-premises instance. - Password string `json:"password,omitempty"` - // SelectedObjects: Optional. A list of objects that the user selects for - // replication from an external source instance. - SelectedObjects []*SelectedObjects `json:"selectedObjects,omitempty"` - // SourceInstance: The reference to Cloud SQL instance if the source is Cloud - // SQL. - SourceInstance *InstanceReference `json:"sourceInstance,omitempty"` - // SslOption: Optional. SSL option for replica connection to the on-premises - // source. - // - // Possible values: - // "SSL_OPTION_UNSPECIFIED" - Unknown SSL option i.e. SSL option not - // specified by user. - // "DISABLE" - SSL is not used for replica connection to the on-premises - // source. - // "REQUIRE" - SSL is required for replica connection to the on-premises - // source. - // "VERIFY_CA" - Verify CA is required for replica connection to the - // on-premises source. - SslOption string `json:"sslOption,omitempty"` - // Username: The username for connecting to on-premises instance. - Username string `json:"username,omitempty"` - // ForceSendFields is a list of field names (e.g. "CaCertificate") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CaCertificate") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s OnPremisesConfiguration) MarshalJSON() ([]byte, error) { - type NoMethod OnPremisesConfiguration - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// Operation: An Operation resource. For successful operations that return an -// Operation resource, only the fields relevant to the operation are populated -// in the resource. -type Operation struct { - // AcquireSsrsLeaseContext: The context for acquire SSRS lease operation, if - // applicable. - AcquireSsrsLeaseContext *AcquireSsrsLeaseContext `json:"acquireSsrsLeaseContext,omitempty"` - // ApiWarning: An Admin API warning message. - ApiWarning *ApiWarning `json:"apiWarning,omitempty"` - // BackupContext: The context for backup operation, if applicable. - BackupContext *BackupContext `json:"backupContext,omitempty"` - // EndTime: The time this operation finished in UTC timezone in RFC 3339 - // (https://tools.ietf.org/html/rfc3339) format, for example - // `2012-11-15T16:19:00.094Z`. - EndTime string `json:"endTime,omitempty"` - // Error: If errors occurred during processing of this operation, this field - // will be populated. - Error *OperationErrors `json:"error,omitempty"` - // ExportContext: The context for export operation, if applicable. - ExportContext *ExportContext `json:"exportContext,omitempty"` - // ImportContext: The context for import operation, if applicable. - ImportContext *ImportContext `json:"importContext,omitempty"` - // InsertTime: The time this operation was enqueued in UTC timezone in RFC 3339 - // (https://tools.ietf.org/html/rfc3339) format, for example - // `2012-11-15T16:19:00.094Z`. - InsertTime string `json:"insertTime,omitempty"` - // Kind: This is always `sql#operation`. - Kind string `json:"kind,omitempty"` - // Name: An identifier that uniquely identifies the operation. You can use this - // identifier to retrieve the Operations resource that has information about - // the operation. - Name string `json:"name,omitempty"` - // OperationType: The type of the operation. Valid values are: * `CREATE` * - // `DELETE` * `UPDATE` * `RESTART` * `IMPORT` * `EXPORT` * `BACKUP_VOLUME` * - // `RESTORE_VOLUME` * `CREATE_USER` * `DELETE_USER` * `CREATE_DATABASE` * - // `DELETE_DATABASE` - // - // Possible values: - // "SQL_OPERATION_TYPE_UNSPECIFIED" - Unknown operation type. - // "IMPORT" - Imports data into a Cloud SQL instance. - // "EXPORT" - Exports data from a Cloud SQL instance to a Cloud Storage - // bucket. - // "CREATE" - Creates a new Cloud SQL instance. - // "UPDATE" - Updates the settings of a Cloud SQL instance. - // "DELETE" - Deletes a Cloud SQL instance. - // "RESTART" - Restarts the Cloud SQL instance. - // "BACKUP" - // "SNAPSHOT" - // "BACKUP_VOLUME" - Performs instance backup. - // "DELETE_VOLUME" - Deletes an instance backup. - // "RESTORE_VOLUME" - Restores an instance backup. - // "INJECT_USER" - Injects a privileged user in mysql for MOB instances. - // "CLONE" - Clones a Cloud SQL instance. - // "STOP_REPLICA" - Stops replication on a Cloud SQL read replica instance. - // "START_REPLICA" - Starts replication on a Cloud SQL read replica instance. - // "PROMOTE_REPLICA" - Promotes a Cloud SQL replica instance. - // "CREATE_REPLICA" - Creates a Cloud SQL replica instance. - // "CREATE_USER" - Creates a new user in a Cloud SQL instance. - // "DELETE_USER" - Deletes a user from a Cloud SQL instance. - // "UPDATE_USER" - Updates an existing user in a Cloud SQL instance. If a - // user with the specified username doesn't exist, a new user is created. - // "CREATE_DATABASE" - Creates a database in the Cloud SQL instance. - // "DELETE_DATABASE" - Deletes a database in the Cloud SQL instance. - // "UPDATE_DATABASE" - Updates a database in the Cloud SQL instance. - // "FAILOVER" - Performs failover of an HA-enabled Cloud SQL failover - // replica. - // "DELETE_BACKUP" - Deletes the backup taken by a backup run. - // "RECREATE_REPLICA" - // "TRUNCATE_LOG" - Truncates a general or slow log table in MySQL. - // "DEMOTE_MASTER" - Demotes the stand-alone instance to be a Cloud SQL read - // replica for an external database server. - // "MAINTENANCE" - Indicates that the instance is currently in maintenance. - // Maintenance typically causes the instance to be unavailable for 1-3 minutes. - // "ENABLE_PRIVATE_IP" - This field is deprecated, and will be removed in - // future version of API. - // "DEFER_MAINTENANCE" - // "CREATE_CLONE" - Creates clone instance. - // "RESCHEDULE_MAINTENANCE" - Reschedule maintenance to another time. - // "START_EXTERNAL_SYNC" - Starts external sync of a Cloud SQL EM replica to - // an external primary instance. - // "LOG_CLEANUP" - Recovers logs from an instance's old data disk. - // "AUTO_RESTART" - Performs auto-restart of an HA-enabled Cloud SQL database - // for auto recovery. - // "REENCRYPT" - Re-encrypts CMEK instances with latest key version. - // "SWITCHOVER" - Switches the roles of the primary and replica pair. The - // target instance should be the replica. - // "UPDATE_BACKUP" - Update a backup. - // "ACQUIRE_SSRS_LEASE" - Acquire a lease for the setup of SQL Server - // Reporting Services (SSRS). - // "RELEASE_SSRS_LEASE" - Release a lease for the setup of SQL Server - // Reporting Services (SSRS). - // "RECONFIGURE_OLD_PRIMARY" - Reconfigures old primary after a promote - // replica operation. Effect of a promote operation to the old primary is - // executed in this operation, asynchronously from the promote replica - // operation executed to the replica. - // "CLUSTER_MAINTENANCE" - Indicates that the instance, its read replicas, - // and its cascading replicas are in maintenance. Maintenance typically gets - // initiated on groups of replicas first, followed by the primary instance. For - // each instance, maintenance typically causes the instance to be unavailable - // for 1-3 minutes. - // "SELF_SERVICE_MAINTENANCE" - Indicates that the instance (and any of its - // replicas) are currently in maintenance. This is initiated as a self-service - // request by using SSM. Maintenance typically causes the instance to be - // unavailable for 1-3 minutes. - // "SWITCHOVER_TO_REPLICA" - Switches a primary instance to a replica. This - // operation runs as part of a switchover operation to the original primary - // instance. - // "MAJOR_VERSION_UPGRADE" - Updates the major version of a Cloud SQL - // instance. - // "ADVANCED_BACKUP" - Deprecated: ADVANCED_BACKUP is deprecated. Use - // ENHANCED_BACKUP instead. - // "MANAGE_BACKUP" - Changes the BackupTier of a Cloud SQL instance. - // "ENHANCED_BACKUP" - Creates a backup for an Enhanced BackupTier Cloud SQL - // instance. - // "REPAIR_READ_POOL" - Repairs entire read pool or specified read pool nodes - // in the read pool. - // "CREATE_READ_POOL" - Creates a Cloud SQL read pool instance. - // "PRE_CHECK_MAJOR_VERSION_UPGRADE" - Pre-checks the major version upgrade - // operation. - OperationType string `json:"operationType,omitempty"` - // PreCheckMajorVersionUpgradeContext: This field is only populated when the - // operation_type is PRE_CHECK_MAJOR_VERSION_UPGRADE. The - // PreCheckMajorVersionUpgradeContext message itself contains the details for - // that pre-check, such as the target database version for the upgrade and the - // results of the check (including any warnings or errors found). - PreCheckMajorVersionUpgradeContext *PreCheckMajorVersionUpgradeContext `json:"preCheckMajorVersionUpgradeContext,omitempty"` - // SelfLink: The URI of this resource. - SelfLink string `json:"selfLink,omitempty"` - // StartTime: The time this operation actually started in UTC timezone in RFC - // 3339 (https://tools.ietf.org/html/rfc3339) format, for example - // `2012-11-15T16:19:00.094Z`. - StartTime string `json:"startTime,omitempty"` - // Status: The status of an operation. - // - // Possible values: - // "SQL_OPERATION_STATUS_UNSPECIFIED" - The state of the operation is - // unknown. - // "PENDING" - The operation has been queued, but has not started yet. - // "RUNNING" - The operation is running. - // "DONE" - The operation completed. - Status string `json:"status,omitempty"` - // SubOperationType: Optional. The sub operation based on the operation type. - SubOperationType *SqlSubOperationType `json:"subOperationType,omitempty"` - // TargetId: Name of the resource on which this operation runs. - TargetId string `json:"targetId,omitempty"` - TargetLink string `json:"targetLink,omitempty"` - // TargetProject: The project ID of the target instance related to this - // operation. - TargetProject string `json:"targetProject,omitempty"` - // User: The email address of the user who initiated this operation. - User string `json:"user,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "AcquireSsrsLeaseContext") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AcquireSsrsLeaseContext") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s Operation) MarshalJSON() ([]byte, error) { - type NoMethod Operation - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// OperationError: Database instance operation error. -type OperationError struct { - // Code: Identifies the specific error that occurred. - Code string `json:"code,omitempty"` - // Kind: This is always `sql#operationError`. - Kind string `json:"kind,omitempty"` - // Message: Additional information about the error encountered. - Message string `json:"message,omitempty"` - // ForceSendFields is a list of field names (e.g. "Code") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s OperationError) MarshalJSON() ([]byte, error) { - type NoMethod OperationError - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// OperationErrors: Database instance operation errors list wrapper. -type OperationErrors struct { - // Errors: The list of errors encountered while processing this operation. - Errors []*OperationError `json:"errors,omitempty"` - // Kind: This is always `sql#operationErrors`. - Kind string `json:"kind,omitempty"` - // ForceSendFields is a list of field names (e.g. "Errors") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Errors") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s OperationErrors) MarshalJSON() ([]byte, error) { - type NoMethod OperationErrors - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// OperationMetadata: Represents the metadata of the long-running operation. -type OperationMetadata struct { - // ApiVersion: Output only. API version used to start the operation. - ApiVersion string `json:"apiVersion,omitempty"` - // CancelRequested: Output only. Identifies whether the user has requested - // cancellation of the operation. Operations that have been cancelled - // successfully have google.longrunning.Operation.error value with a - // google.rpc.Status.code of `1`, corresponding to `Code.CANCELLED`. - CancelRequested bool `json:"cancelRequested,omitempty"` - // CreateTime: Output only. The time the operation was created. - CreateTime string `json:"createTime,omitempty"` - // EndTime: Output only. The time the operation finished running. - EndTime string `json:"endTime,omitempty"` - // StatusDetail: Output only. Human-readable status of the operation, if any. - StatusDetail string `json:"statusDetail,omitempty"` - // Target: Output only. Server-defined resource path for the target of the - // operation. - Target string `json:"target,omitempty"` - // Verb: Output only. Name of the verb executed by the operation. - Verb string `json:"verb,omitempty"` - // ForceSendFields is a list of field names (e.g. "ApiVersion") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ApiVersion") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s OperationMetadata) MarshalJSON() ([]byte, error) { - type NoMethod OperationMetadata - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// OperationsListResponse: Operations list response. -type OperationsListResponse struct { - // Items: List of operation resources. - Items []*Operation `json:"items,omitempty"` - // Kind: This is always `sql#operationsList`. - Kind string `json:"kind,omitempty"` - // NextPageToken: The continuation token, used to page through large result - // sets. Provide this value in a subsequent request to return the next page of - // results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Items") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Items") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s OperationsListResponse) MarshalJSON() ([]byte, error) { - type NoMethod OperationsListResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// PasswordStatus: Read-only password status. -type PasswordStatus struct { - // Locked: If true, user does not have login privileges. - Locked bool `json:"locked,omitempty"` - // PasswordExpirationTime: The expiration time of the current password. - PasswordExpirationTime string `json:"passwordExpirationTime,omitempty"` - // ForceSendFields is a list of field names (e.g. "Locked") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Locked") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s PasswordStatus) MarshalJSON() ([]byte, error) { - type NoMethod PasswordStatus - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// PasswordValidationPolicy: Database instance local user password validation -// policy. This message defines the password policy for local database users. -// When enabled, it enforces constraints on password complexity, length, and -// reuse. Keep this policy enabled to help prevent unauthorized access. -type PasswordValidationPolicy struct { - // Complexity: The complexity of the password. - // - // Possible values: - // "COMPLEXITY_UNSPECIFIED" - Complexity check is not specified. - // "COMPLEXITY_DEFAULT" - A combination of lowercase, uppercase, numeric, and - // non-alphanumeric characters. - Complexity string `json:"complexity,omitempty"` - // DisallowCompromisedCredentials: This field is deprecated and will be removed - // in a future version of the API. - DisallowCompromisedCredentials bool `json:"disallowCompromisedCredentials,omitempty"` - // DisallowUsernameSubstring: Disallow username as a part of the password. - DisallowUsernameSubstring bool `json:"disallowUsernameSubstring,omitempty"` - // EnablePasswordPolicy: Whether to enable the password policy or not. When - // enabled, passwords must meet complexity requirements. Keep this policy - // enabled to help prevent unauthorized access. Disabling this policy allows - // weak passwords. - EnablePasswordPolicy bool `json:"enablePasswordPolicy,omitempty"` - // MinLength: Minimum number of characters allowed. - MinLength int64 `json:"minLength,omitempty"` - // PasswordChangeInterval: Minimum interval after which the password can be - // changed. This flag is only supported for PostgreSQL. - PasswordChangeInterval string `json:"passwordChangeInterval,omitempty"` - // ReuseInterval: Number of previous passwords that cannot be reused. - ReuseInterval int64 `json:"reuseInterval,omitempty"` - // ForceSendFields is a list of field names (e.g. "Complexity") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Complexity") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s PasswordValidationPolicy) MarshalJSON() ([]byte, error) { - type NoMethod PasswordValidationPolicy - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// PerformDiskShrinkContext: Perform disk shrink context. -type PerformDiskShrinkContext struct { - // TargetSizeGb: The target disk shrink size in GigaBytes. - TargetSizeGb int64 `json:"targetSizeGb,omitempty,string"` - // ForceSendFields is a list of field names (e.g. "TargetSizeGb") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "TargetSizeGb") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s PerformDiskShrinkContext) MarshalJSON() ([]byte, error) { - type NoMethod PerformDiskShrinkContext - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// PerformanceCaptureConfig: Performance Capture configuration. -type PerformanceCaptureConfig struct { - // Enabled: Optional. Enable or disable the Performance Capture feature. - Enabled bool `json:"enabled,omitempty"` - // ProbeThreshold: Optional. The minimum number of consecutive readings above - // threshold that triggers instance state capture. - ProbeThreshold int64 `json:"probeThreshold,omitempty"` - // ProbingIntervalSeconds: Optional. The time interval in seconds between any - // two probes. - ProbingIntervalSeconds int64 `json:"probingIntervalSeconds,omitempty"` - // RunningThreadsThreshold: Optional. The minimum number of server threads - // running to trigger the capture on primary. - RunningThreadsThreshold int64 `json:"runningThreadsThreshold,omitempty"` - // SecondsBehindSourceThreshold: Optional. The minimum number of seconds - // replica must be lagging behind primary to trigger capture on replica. - SecondsBehindSourceThreshold int64 `json:"secondsBehindSourceThreshold,omitempty"` - // TransactionDurationThreshold: Optional. The amount of time in seconds that a - // transaction needs to have been open before the watcher starts recording it. - TransactionDurationThreshold int64 `json:"transactionDurationThreshold,omitempty"` - // ForceSendFields is a list of field names (e.g. "Enabled") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Enabled") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s PerformanceCaptureConfig) MarshalJSON() ([]byte, error) { - type NoMethod PerformanceCaptureConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// PointInTimeRestoreContext: The context to perform a point-in-time recovery -// of an instance managed by Backup and Disaster Recovery (DR) Service. -type PointInTimeRestoreContext struct { - // AllocatedIpRange: Optional. The name of the allocated IP range for the - // internal IP Cloud SQL instance. For example: - // "google-managed-services-default". If you set this, then Cloud SQL creates - // the IP address for the cloned instance in the allocated range. This range - // must comply with RFC 1035 (https://tools.ietf.org/html/rfc1035) standards. - // Specifically, the name must be 1-63 characters long and match the regular - // expression a-z ([-a-z0-9]*[a-z0-9])?. Reserved for future use. - AllocatedIpRange string `json:"allocatedIpRange,omitempty"` - // Datasource: The Backup and Disaster Recovery (DR) Service Datasource URI. - // Format: - // projects/{project}/locations/{region}/backupVaults/{backupvault}/dataSources/ - // {datasource}. - Datasource string `json:"datasource,omitempty"` - // PointInTime: Required. The date and time to which you want to restore the - // instance. - PointInTime string `json:"pointInTime,omitempty"` - // PreferredSecondaryZone: Optional. Point-in-time recovery of a regional - // instance in the specified zones. If not specified, clone to the same - // secondary zone as the source instance. This value cannot be the same as the - // preferred_zone field. - PreferredSecondaryZone string `json:"preferredSecondaryZone,omitempty"` - // PreferredZone: Optional. Point-in-time recovery of an instance to the - // specified zone. If no zone is specified, then clone to the same primary zone - // as the source instance. - PreferredZone string `json:"preferredZone,omitempty"` - // PrivateNetwork: Optional. The resource link for the VPC network from which - // the Cloud SQL instance is accessible for private IP. For example, - // `/projects/myProject/global/networks/default`. - PrivateNetwork string `json:"privateNetwork,omitempty"` - // Region: Optional. The region of the target instance where the datasource - // will be restored. For example: "us-central1". - Region string `json:"region,omitempty"` - // TargetInstance: Target instance name. - TargetInstance string `json:"targetInstance,omitempty"` - // TargetInstanceClearSettingsFieldNames: Optional. Specifies the instance - // settings that will be cleared from the source instance. This field is only - // applicable for cross project PITRs. - TargetInstanceClearSettingsFieldNames []string `json:"targetInstanceClearSettingsFieldNames,omitempty"` - // TargetInstanceSettings: Optional. Specifies the instance settings that will - // be overridden from the source instance. This field is only applicable for - // cross project PITRs. - TargetInstanceSettings *DatabaseInstance `json:"targetInstanceSettings,omitempty"` - // ForceSendFields is a list of field names (e.g. "AllocatedIpRange") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AllocatedIpRange") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s PointInTimeRestoreContext) MarshalJSON() ([]byte, error) { - type NoMethod PointInTimeRestoreContext - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// PoolNodeConfig: Details of a single read pool node of a read pool. -type PoolNodeConfig struct { - // DnsName: Output only. The DNS name of the read pool node. - DnsName string `json:"dnsName,omitempty"` - // DnsNames: Output only. The list of DNS names used by this read pool node. - DnsNames []*DnsNameMapping `json:"dnsNames,omitempty"` - // GceZone: Output only. The zone of the read pool node. - GceZone string `json:"gceZone,omitempty"` - // IpAddresses: Output only. Mappings containing IP addresses that can be used - // to connect to the read pool node. - IpAddresses []*IpMapping `json:"ipAddresses,omitempty"` - // Name: Output only. The name of the read pool node, to be used for retrieving - // metrics and logs. - Name string `json:"name,omitempty"` - // PscAutoConnections: Output only. The list of settings for requested - // automatically-setup Private Service Connect (PSC) consumer endpoints that - // can be used to connect to this read pool node. - PscAutoConnections []*PscAutoConnectionConfig `json:"pscAutoConnections,omitempty"` - // PscServiceAttachmentLink: Output only. The Private Service Connect (PSC) - // service attachment of the read pool node. - PscServiceAttachmentLink string `json:"pscServiceAttachmentLink,omitempty"` - // State: Output only. The current state of the read pool node. - // - // Possible values: - // "SQL_INSTANCE_STATE_UNSPECIFIED" - The state of the instance is unknown. - // "RUNNABLE" - The instance is running, or has been stopped by owner. - // "SUSPENDED" - The instance is not available, for example due to problems - // with billing. - // "PENDING_DELETE" - The instance is being deleted. - // "PENDING_CREATE" - The instance is being created. - // "MAINTENANCE" - The instance is down for maintenance. - // "FAILED" - The creation of the instance failed or a fatal error occurred - // during maintenance. - // "ONLINE_MAINTENANCE" - Deprecated - // "REPAIRING" - (Applicable to read pool nodes only.) The read pool node - // needs to be repaired. The database might be unavailable. - State string `json:"state,omitempty"` - // ForceSendFields is a list of field names (e.g. "DnsName") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DnsName") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s PoolNodeConfig) MarshalJSON() ([]byte, error) { - type NoMethod PoolNodeConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// PreCheckMajorVersionUpgradeContext: Pre-check major version upgrade context. -type PreCheckMajorVersionUpgradeContext struct { - // Kind: Optional. This is always `sql#preCheckMajorVersionUpgradeContext`. - Kind string `json:"kind,omitempty"` - // PreCheckResponse: Output only. The responses from the precheck operation. - PreCheckResponse []*PreCheckResponse `json:"preCheckResponse,omitempty"` - // TargetDatabaseVersion: Required. The target database version to upgrade to. - // - // Possible values: - // "SQL_DATABASE_VERSION_UNSPECIFIED" - This is an unknown database version. - // "MYSQL_5_1" - The database version is MySQL 5.1. - // "MYSQL_5_5" - The database version is MySQL 5.5. - // "MYSQL_5_6" - The database version is MySQL 5.6. - // "MYSQL_5_7" - The database version is MySQL 5.7. - // "MYSQL_8_0" - The database version is MySQL 8. - // "MYSQL_8_0_18" - The database major version is MySQL 8.0 and the minor - // version is 18. - // "MYSQL_8_0_26" - The database major version is MySQL 8.0 and the minor - // version is 26. - // "MYSQL_8_0_27" - The database major version is MySQL 8.0 and the minor - // version is 27. - // "MYSQL_8_0_28" - The database major version is MySQL 8.0 and the minor - // version is 28. - // "MYSQL_8_0_29" - The database major version is MySQL 8.0 and the minor - // version is 29. - // "MYSQL_8_0_30" - The database major version is MySQL 8.0 and the minor - // version is 30. - // "MYSQL_8_0_31" - The database major version is MySQL 8.0 and the minor - // version is 31. - // "MYSQL_8_0_32" - The database major version is MySQL 8.0 and the minor - // version is 32. - // "MYSQL_8_0_33" - The database major version is MySQL 8.0 and the minor - // version is 33. - // "MYSQL_8_0_34" - The database major version is MySQL 8.0 and the minor - // version is 34. - // "MYSQL_8_0_35" - The database major version is MySQL 8.0 and the minor - // version is 35. - // "MYSQL_8_0_36" - The database major version is MySQL 8.0 and the minor - // version is 36. - // "MYSQL_8_0_37" - The database major version is MySQL 8.0 and the minor - // version is 37. - // "MYSQL_8_0_39" - The database major version is MySQL 8.0 and the minor - // version is 39. - // "MYSQL_8_0_40" - The database major version is MySQL 8.0 and the minor - // version is 40. - // "MYSQL_8_0_41" - The database major version is MySQL 8.0 and the minor - // version is 41. - // "MYSQL_8_0_42" - The database major version is MySQL 8.0 and the minor - // version is 42. - // "MYSQL_8_0_43" - The database major version is MySQL 8.0 and the minor - // version is 43. - // "MYSQL_8_0_44" - The database major version is MySQL 8.0 and the minor - // version is 44. - // "MYSQL_8_0_45" - The database major version is MySQL 8.0 and the minor - // version is 45. - // "MYSQL_8_0_46" - The database major version is MySQL 8.0 and the minor - // version is 46. - // "MYSQL_8_4" - The database version is MySQL 8.4. - // "MYSQL_9_7" - The database version is MySQL 9.7. - // "SQLSERVER_2017_STANDARD" - The database version is SQL Server 2017 - // Standard. - // "SQLSERVER_2017_ENTERPRISE" - The database version is SQL Server 2017 - // Enterprise. - // "SQLSERVER_2017_EXPRESS" - The database version is SQL Server 2017 - // Express. - // "SQLSERVER_2017_WEB" - The database version is SQL Server 2017 Web. - // "POSTGRES_9_6" - The database version is PostgreSQL 9.6. - // "POSTGRES_10" - The database version is PostgreSQL 10. - // "POSTGRES_11" - The database version is PostgreSQL 11. - // "POSTGRES_12" - The database version is PostgreSQL 12. - // "POSTGRES_13" - The database version is PostgreSQL 13. - // "POSTGRES_14" - The database version is PostgreSQL 14. - // "POSTGRES_15" - The database version is PostgreSQL 15. - // "POSTGRES_16" - The database version is PostgreSQL 16. - // "POSTGRES_17" - The database version is PostgreSQL 17. - // "POSTGRES_18" - The database version is PostgreSQL 18. - // "SQLSERVER_2019_STANDARD" - The database version is SQL Server 2019 - // Standard. - // "SQLSERVER_2019_ENTERPRISE" - The database version is SQL Server 2019 - // Enterprise. - // "SQLSERVER_2019_EXPRESS" - The database version is SQL Server 2019 - // Express. - // "SQLSERVER_2019_WEB" - The database version is SQL Server 2019 Web. - // "SQLSERVER_2022_STANDARD" - The database version is SQL Server 2022 - // Standard. - // "SQLSERVER_2022_ENTERPRISE" - The database version is SQL Server 2022 - // Enterprise. - // "SQLSERVER_2022_EXPRESS" - The database version is SQL Server 2022 - // Express. - // "SQLSERVER_2022_WEB" - The database version is SQL Server 2022 Web. - // "SQLSERVER_2025_STANDARD" - The database version is SQL Server 2025 - // Standard. - // "SQLSERVER_2025_ENTERPRISE" - The database version is SQL Server 2025 - // Enterprise. - // "SQLSERVER_2025_EXPRESS" - The database version is SQL Server 2025 - // Express. - TargetDatabaseVersion string `json:"targetDatabaseVersion,omitempty"` - // ForceSendFields is a list of field names (e.g. "Kind") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Kind") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s PreCheckMajorVersionUpgradeContext) MarshalJSON() ([]byte, error) { - type NoMethod PreCheckMajorVersionUpgradeContext - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// PreCheckResponse: Structured PreCheckResponse containing message, type, and -// required actions. -type PreCheckResponse struct { - // ActionsRequired: The actions that the user needs to take. Use repeated for - // multiple actions. - ActionsRequired []string `json:"actionsRequired,omitempty"` - // Message: The message to be displayed to the user. - Message string `json:"message,omitempty"` - // MessageType: The type of message whether it is an info, warning, or error. - // - // Possible values: - // "MESSAGE_TYPE_UNSPECIFIED" - Default unspecified value to prevent - // unintended behavior changes. - // "INFO" - General informational messages that don't require action. - // "WARNING" - Warnings that might impact the upgrade but don't block it. - // "ERROR" - Errors that a user must resolve before proceeding with the - // upgrade. - MessageType string `json:"messageType,omitempty"` - // ForceSendFields is a list of field names (e.g. "ActionsRequired") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ActionsRequired") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s PreCheckResponse) MarshalJSON() ([]byte, error) { - type NoMethod PreCheckResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// PscAutoConnectionConfig: Settings for an automatically-setup Private Service -// Connect consumer endpoint that is used to connect to a Cloud SQL instance. -type PscAutoConnectionConfig struct { - // ConsumerNetwork: Optional. The consumer network of this consumer endpoint. - // This must be a resource path that includes both the host project and the - // network name. For example, `projects/project1/global/networks/network1`. The - // consumer host project of this network might be different from the consumer - // service project. - ConsumerNetwork string `json:"consumerNetwork,omitempty"` - // ConsumerNetworkStatus: The connection policy status of the consumer network. - ConsumerNetworkStatus string `json:"consumerNetworkStatus,omitempty"` - // ConsumerProject: Optional. This is the project ID of consumer service - // project of this consumer endpoint. This is only applicable if - // `consumer_network` is a shared VPC network. - ConsumerProject string `json:"consumerProject,omitempty"` - // IpAddress: The IP address of the consumer endpoint. - IpAddress string `json:"ipAddress,omitempty"` - // Status: The connection status of the consumer endpoint. - Status string `json:"status,omitempty"` - // ForceSendFields is a list of field names (e.g. "ConsumerNetwork") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ConsumerNetwork") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s PscAutoConnectionConfig) MarshalJSON() ([]byte, error) { - type NoMethod PscAutoConnectionConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// PscConfig: PSC settings for a Cloud SQL instance. -type PscConfig struct { - // AllowedConsumerProjects: Optional. The list of consumer projects that are - // allow-listed for PSC connections to this instance. This instance can be - // connected to with PSC from any network in these projects. Each consumer - // project in this list may be represented by a project number (numeric) or by - // a project id (alphanumeric). - AllowedConsumerProjects []string `json:"allowedConsumerProjects,omitempty"` - // NetworkAttachmentUri: Optional. The network attachment of the consumer - // network that the Private Service Connect enabled Cloud SQL instance is - // authorized to connect via PSC interface. format: - // projects/PROJECT/regions/REGION/networkAttachments/ID - NetworkAttachmentUri string `json:"networkAttachmentUri,omitempty"` - // PscAutoConnections: Optional. The list of settings for requested Private - // Service Connect consumer endpoints that can be used to connect to this Cloud - // SQL instance. - PscAutoConnections []*PscAutoConnectionConfig `json:"pscAutoConnections,omitempty"` - // PscAutoDnsEnabled: Optional. Indicates whether PSC DNS automation is enabled - // for this instance. When enabled, Cloud SQL provisions a universal DNS record - // across all networks configured with Private Service Connect (PSC) - // auto-connections. This will default to true for new instances when Private - // Service Connect is enabled. - PscAutoDnsEnabled bool `json:"pscAutoDnsEnabled,omitempty"` - // PscEnabled: Whether PSC connectivity is enabled for this instance. - PscEnabled bool `json:"pscEnabled,omitempty"` - // PscWriteEndpointDnsEnabled: Optional. Indicates whether PSC write endpoint - // DNS automation is enabled for this instance. When enabled, Cloud SQL - // provisions a universal global DNS record across all networks configured with - // Private Service Connect (PSC) auto-connections that always points to the - // cluster primary instance. This feature is only supported for Enterprise Plus - // edition. This will default to true for new Enterprise Plus instances when - // `psc_auto_dns_enabled` is enabled. - PscWriteEndpointDnsEnabled bool `json:"pscWriteEndpointDnsEnabled,omitempty"` - // ForceSendFields is a list of field names (e.g. "AllowedConsumerProjects") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AllowedConsumerProjects") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s PscConfig) MarshalJSON() ([]byte, error) { - type NoMethod PscConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// QueryResult: QueryResult contains the result of executing a single SQL -// statement. -type QueryResult struct { - // Columns: List of columns included in the result. This also includes the data - // type of the column. - Columns []*Column `json:"columns,omitempty"` - // Message: Message related to the SQL execution result. - Message string `json:"message,omitempty"` - // PartialResult: Set to true if the SQL execution's result is truncated due to - // size limits or an error retrieving results. - PartialResult bool `json:"partialResult,omitempty"` - // Rows: Rows returned by the SQL statement. - Rows []*Row `json:"rows,omitempty"` - // Status: If results were truncated due to an error, details of that error. - Status *Status `json:"status,omitempty"` - // ForceSendFields is a list of field names (e.g. "Columns") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Columns") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s QueryResult) MarshalJSON() ([]byte, error) { - type NoMethod QueryResult - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ReadPoolAutoScaleConfig: The read pool auto-scale configuration. -type ReadPoolAutoScaleConfig struct { - // DisableScaleIn: Indicates whether read pool auto scaling supports scale in - // operations (removing nodes). - DisableScaleIn bool `json:"disableScaleIn,omitempty"` - // Enabled: Indicates whether read pool auto scaling is enabled. - Enabled bool `json:"enabled,omitempty"` - // MaxNodeCount: Maximum number of read pool nodes to be maintained. - MaxNodeCount int64 `json:"maxNodeCount,omitempty"` - // MinNodeCount: Minimum number of read pool nodes to be maintained. - MinNodeCount int64 `json:"minNodeCount,omitempty"` - // ScaleInCooldownSeconds: The cooldown period for scale-in operations. - ScaleInCooldownSeconds int64 `json:"scaleInCooldownSeconds,omitempty"` - // ScaleOutCooldownSeconds: The cooldown period for scale-out operations. - ScaleOutCooldownSeconds int64 `json:"scaleOutCooldownSeconds,omitempty"` - // TargetMetrics: Optional. Target metrics for read pool auto scaling. - TargetMetrics []*TargetMetric `json:"targetMetrics,omitempty"` - // ForceSendFields is a list of field names (e.g. "DisableScaleIn") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DisableScaleIn") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ReadPoolAutoScaleConfig) MarshalJSON() ([]byte, error) { - type NoMethod ReadPoolAutoScaleConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ReplicaConfiguration: Read-replica configuration for connecting to the -// primary instance. -type ReplicaConfiguration struct { - // CascadableReplica: Optional. Specifies if a SQL Server replica is a - // cascadable replica. A cascadable replica is a SQL Server cross region - // replica that supports replica(s) under it. - CascadableReplica bool `json:"cascadableReplica,omitempty"` - // FailoverTarget: Specifies if the replica is the failover target. If the - // field is set to `true`, the replica will be designated as a failover - // replica. In case the primary instance fails, the replica instance will be - // promoted as the new primary instance. Only one replica can be specified as - // failover target, and the replica has to be in different zone with the - // primary instance. - FailoverTarget bool `json:"failoverTarget,omitempty"` - // Kind: This is always `sql#replicaConfiguration`. - Kind string `json:"kind,omitempty"` - // MysqlReplicaConfiguration: MySQL specific configuration when replicating - // from a MySQL on-premises primary instance. Replication configuration - // information such as the username, password, certificates, and keys are not - // stored in the instance metadata. The configuration information is used only - // to set up the replication connection and is stored by MySQL in a file named - // `master.info` in the data directory. - MysqlReplicaConfiguration *MySqlReplicaConfiguration `json:"mysqlReplicaConfiguration,omitempty"` - // ForceSendFields is a list of field names (e.g. "CascadableReplica") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CascadableReplica") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ReplicaConfiguration) MarshalJSON() ([]byte, error) { - type NoMethod ReplicaConfiguration - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ReplicationCluster: A primary instance and disaster recovery (DR) replica -// pair. A DR replica is a cross-region replica that you designate for failover -// in the event that the primary instance experiences regional failure. -// Applicable to MySQL and PostgreSQL. -type ReplicationCluster struct { - // DrReplica: Output only. Read-only field that indicates whether the replica - // is a DR replica. This field is not set if the instance is a primary - // instance. - DrReplica bool `json:"drReplica,omitempty"` - // FailoverDrReplicaName: Optional. If the instance is a primary instance, then - // this field identifies the disaster recovery (DR) replica. A DR replica is an - // optional configuration for Enterprise Plus edition instances. If the - // instance is a read replica, then the field is not set. Set this field to a - // replica name to designate a DR replica for a primary instance. Remove the - // replica name to remove the DR replica designation. - FailoverDrReplicaName string `json:"failoverDrReplicaName,omitempty"` - // PsaWriteEndpoint: Output only. If set, this field indicates this instance - // has a private service access (PSA) DNS endpoint that is pointing to the - // primary instance of the cluster. If this instance is the primary, then the - // DNS endpoint points to this instance. After a switchover or replica failover - // operation, this DNS endpoint points to the promoted instance. This is a - // read-only field, returned to the user as information. This field can exist - // even if a standalone instance doesn't have a DR replica yet or the DR - // replica is deleted. - PsaWriteEndpoint string `json:"psaWriteEndpoint,omitempty"` - // ForceSendFields is a list of field names (e.g. "DrReplica") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DrReplica") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ReplicationCluster) MarshalJSON() ([]byte, error) { - type NoMethod ReplicationCluster - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type Reschedule struct { - // RescheduleType: Required. The type of the reschedule. - // - // Possible values: - // "RESCHEDULE_TYPE_UNSPECIFIED" - // "IMMEDIATE" - Reschedules maintenance to happen now (within 5 minutes). - // "NEXT_AVAILABLE_WINDOW" - Reschedules maintenance to occur within one week - // from the originally scheduled day and time. - // "SPECIFIC_TIME" - Reschedules maintenance to a specific time and day. - RescheduleType string `json:"rescheduleType,omitempty"` - // ScheduleTime: Optional. Timestamp when the maintenance shall be rescheduled - // to if reschedule_type=SPECIFIC_TIME, in RFC 3339 - // (https://tools.ietf.org/html/rfc3339) format, for example - // `2012-11-15T16:19:00.094Z`. - ScheduleTime string `json:"scheduleTime,omitempty"` - // ForceSendFields is a list of field names (e.g. "RescheduleType") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "RescheduleType") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s Reschedule) MarshalJSON() ([]byte, error) { - type NoMethod Reschedule - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// RestoreBackupContext: Database instance restore from backup context. Backup -// context contains source instance id and project id. -type RestoreBackupContext struct { - // BackupRunId: The ID of the backup run to restore from. - BackupRunId int64 `json:"backupRunId,omitempty,string"` - // InstanceId: The ID of the instance that the backup was taken from. - InstanceId string `json:"instanceId,omitempty"` - // Kind: This is always `sql#restoreBackupContext`. - Kind string `json:"kind,omitempty"` - // Project: The full project ID of the source instance. - Project string `json:"project,omitempty"` - // ForceSendFields is a list of field names (e.g. "BackupRunId") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "BackupRunId") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RestoreBackupContext) MarshalJSON() ([]byte, error) { - type NoMethod RestoreBackupContext - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// RotateEntraIdCertificateContext: Instance rotate Entra ID certificate -// context. -type RotateEntraIdCertificateContext struct { - // Kind: Optional. This is always `sql#rotateEntraIdCertificateContext`. - Kind string `json:"kind,omitempty"` - // NextVersion: Optional. The fingerprint of the next version to be rotated to. - // If left unspecified, will be rotated to the most recently added server - // certificate version. - NextVersion string `json:"nextVersion,omitempty"` - // ForceSendFields is a list of field names (e.g. "Kind") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Kind") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RotateEntraIdCertificateContext) MarshalJSON() ([]byte, error) { - type NoMethod RotateEntraIdCertificateContext - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// RotateServerCaContext: Instance rotate server CA context. -type RotateServerCaContext struct { - // Kind: This is always `sql#rotateServerCaContext`. - Kind string `json:"kind,omitempty"` - // NextVersion: The fingerprint of the next version to be rotated to. If left - // unspecified, will be rotated to the most recently added server CA version. - NextVersion string `json:"nextVersion,omitempty"` - // ForceSendFields is a list of field names (e.g. "Kind") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Kind") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RotateServerCaContext) MarshalJSON() ([]byte, error) { - type NoMethod RotateServerCaContext - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// RotateServerCertificateContext: Instance rotate server certificate context. -type RotateServerCertificateContext struct { - // Kind: Optional. This is always `sql#rotateServerCertificateContext`. - Kind string `json:"kind,omitempty"` - // NextVersion: The fingerprint of the next version to be rotated to. If left - // unspecified, will be rotated to the most recently added server certificate - // version. - NextVersion string `json:"nextVersion,omitempty"` - // ForceSendFields is a list of field names (e.g. "Kind") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Kind") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RotateServerCertificateContext) MarshalJSON() ([]byte, error) { - type NoMethod RotateServerCertificateContext - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// Row: Contains the values for a row. -type Row struct { - // Values: The values for the row. - Values []*Value `json:"values,omitempty"` - // ForceSendFields is a list of field names (e.g. "Values") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Values") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s Row) MarshalJSON() ([]byte, error) { - type NoMethod Row - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// SelectedObjects: A list of objects that the user selects for replication -// from an external source instance. -type SelectedObjects struct { - // Database: Required. The name of the database to migrate. - Database string `json:"database,omitempty"` - // ForceSendFields is a list of field names (e.g. "Database") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Database") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SelectedObjects) MarshalJSON() ([]byte, error) { - type NoMethod SelectedObjects - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// Settings: Database instance settings. -type Settings struct { - // AcceleratedReplicaMode: Optional. Whether the replica is in accelerated - // mode. This feature is in private preview and requires allowlisting to take - // effect. - AcceleratedReplicaMode bool `json:"acceleratedReplicaMode,omitempty"` - // ActivationPolicy: The activation policy specifies when the instance is - // activated; it is applicable only when the instance state is RUNNABLE. Valid - // values: * `ALWAYS`: The instance is on, and remains so even in the absence - // of connection requests. * `NEVER`: The instance is off; it is not activated, - // even if a connection request arrives. - // - // Possible values: - // "SQL_ACTIVATION_POLICY_UNSPECIFIED" - Unknown activation plan. - // "ALWAYS" - The instance is always up and running. - // "NEVER" - The instance never starts. - // "ON_DEMAND" - The instance starts upon receiving requests. - ActivationPolicy string `json:"activationPolicy,omitempty"` - // ActiveDirectoryConfig: Active Directory configuration, relevant only for - // Cloud SQL for SQL Server. - ActiveDirectoryConfig *SqlActiveDirectoryConfig `json:"activeDirectoryConfig,omitempty"` - // AdvancedMachineFeatures: Specifies advanced machine configuration for the - // instances relevant only for SQL Server. - AdvancedMachineFeatures *AdvancedMachineFeatures `json:"advancedMachineFeatures,omitempty"` - // AuthorizedGaeApplications: The App Engine app IDs that can access this - // instance. (Deprecated) Applied to First Generation instances only. - AuthorizedGaeApplications []string `json:"authorizedGaeApplications,omitempty"` - // AutoUpgradeEnabled: Optional. Cloud SQL for MySQL auto-upgrade - // configuration. When this parameter is set to true, auto-upgrade is enabled - // for MySQL 8.0 minor versions. The MySQL version must be 8.0.35 or higher. - AutoUpgradeEnabled bool `json:"autoUpgradeEnabled,omitempty"` - // AvailabilityType: Availability type. Potential values: * `ZONAL`: The - // instance serves data from only one zone. Outages in that zone affect data - // accessibility. * `REGIONAL`: The instance can serve data from more than one - // zone in a region (it is highly available)./ For more information, see - // Overview of the High Availability Configuration - // (https://cloud.google.com/sql/docs/mysql/high-availability). - // - // Possible values: - // "SQL_AVAILABILITY_TYPE_UNSPECIFIED" - This is an unknown Availability - // type. - // "ZONAL" - Zonal available instance. - // "REGIONAL" - Regional available instance. - AvailabilityType string `json:"availabilityType,omitempty"` - // BackupConfiguration: The daily backup configuration for the instance. - BackupConfiguration *BackupConfiguration `json:"backupConfiguration,omitempty"` - // Collation: The name of server Instance collation. - Collation string `json:"collation,omitempty"` - // ConnectionPoolConfig: Optional. The managed connection pooling configuration - // for the instance. - ConnectionPoolConfig *ConnectionPoolConfig `json:"connectionPoolConfig,omitempty"` - // ConnectorEnforcement: Specifies if connections must use Cloud SQL - // connectors. Option values include the following: `NOT_REQUIRED` (Cloud SQL - // instances can be connected without Cloud SQL Connectors) and `REQUIRED` - // (Only allow connections that use Cloud SQL Connectors). Note that using - // REQUIRED disables all existing authorized networks. If this field is not - // specified when creating a new instance, NOT_REQUIRED is used. If this field - // is not specified when patching or updating an existing instance, it is left - // unchanged in the instance. - // - // Possible values: - // "CONNECTOR_ENFORCEMENT_UNSPECIFIED" - The requirement for Cloud SQL - // connectors is unknown. - // "NOT_REQUIRED" - Do not require Cloud SQL connectors. - // "REQUIRED" - Require all connections to use Cloud SQL connectors, - // including the Cloud SQL Auth Proxy and Cloud SQL Java, Python, and Go - // connectors. Note: This disables all existing authorized networks. - ConnectorEnforcement string `json:"connectorEnforcement,omitempty"` - // CrashSafeReplicationEnabled: Configuration specific to read replica - // instances. Indicates whether database flags for crash-safe replication are - // enabled. This property was only applicable to First Generation instances. - CrashSafeReplicationEnabled bool `json:"crashSafeReplicationEnabled,omitempty"` - // DataApiAccess: This parameter controls whether to allow using ExecuteSql API - // to connect to the instance. Not allowed by default. - // - // Possible values: - // "DATA_API_ACCESS_UNSPECIFIED" - Unspecified, effectively the same as - // `DISALLOW_DATA_API`. - // "DISALLOW_DATA_API" - Disallow using ExecuteSql API to connect to the - // instance. - // "ALLOW_DATA_API" - Allow using ExecuteSql API to connect to the instance. - // For private IP instances, this allows authorized users to access the - // instance from the public internet using ExecuteSql API. - DataApiAccess string `json:"dataApiAccess,omitempty"` - // DataCacheConfig: Configuration for data cache. - DataCacheConfig *DataCacheConfig `json:"dataCacheConfig,omitempty"` - // DataDiskProvisionedIops: Optional. Provisioned number of I/O operations per - // second for the data disk. This field is only used for hyperdisk-balanced - // disk types. - DataDiskProvisionedIops int64 `json:"dataDiskProvisionedIops,omitempty,string"` - // DataDiskProvisionedThroughput: Optional. Provisioned throughput measured in - // MiB per second for the data disk. This field is only used for - // hyperdisk-balanced disk types. - DataDiskProvisionedThroughput int64 `json:"dataDiskProvisionedThroughput,omitempty,string"` - // DataDiskSizeGb: The size of data disk, in GB. The data disk size minimum is - // 10GB. - DataDiskSizeGb int64 `json:"dataDiskSizeGb,omitempty,string"` - // DataDiskType: The type of data disk: `PD_SSD` (default) or `PD_HDD`. Not - // used for First Generation instances. - // - // Possible values: - // "SQL_DATA_DISK_TYPE_UNSPECIFIED" - This is an unknown data disk type. - // "PD_SSD" - An SSD data disk. - // "PD_HDD" - An HDD data disk. - // "OBSOLETE_LOCAL_SSD" - This field is deprecated and will be removed from a - // future version of the API. - // "HYPERDISK_BALANCED" - A Hyperdisk Balanced data disk. - DataDiskType string `json:"dataDiskType,omitempty"` - // DatabaseFlags: The database flags passed to the instance at startup. - DatabaseFlags []*DatabaseFlags `json:"databaseFlags,omitempty"` - // DatabaseReplicationEnabled: Configuration specific to read replica - // instances. Indicates whether replication is enabled or not. WARNING: - // Changing this restarts the instance. - DatabaseReplicationEnabled bool `json:"databaseReplicationEnabled,omitempty"` - // DeletionProtectionEnabled: Configuration to protect against accidental - // instance deletion. - DeletionProtectionEnabled bool `json:"deletionProtectionEnabled,omitempty"` - // DenyMaintenancePeriods: Deny maintenance periods - DenyMaintenancePeriods []*DenyMaintenancePeriod `json:"denyMaintenancePeriods,omitempty"` - // Edition: Optional. The edition of the instance. - // - // Possible values: - // "EDITION_UNSPECIFIED" - The instance did not specify the edition. - // "ENTERPRISE" - The instance is an enterprise edition. - // "ENTERPRISE_PLUS" - The instance is an Enterprise Plus edition. - Edition string `json:"edition,omitempty"` - // EnableDataplexIntegration: Optional. By default, Cloud SQL instances have - // schema extraction disabled for Dataplex. When this parameter is set to true, - // schema extraction for Dataplex on Cloud SQL instances is activated. - EnableDataplexIntegration bool `json:"enableDataplexIntegration,omitempty"` - // EnableGoogleMlIntegration: Optional. When this parameter is set to true, - // Cloud SQL instances can connect to Vertex AI to pass requests for real-time - // predictions and insights to the AI. The default value is false. This applies - // only to Cloud SQL for MySQL and Cloud SQL for PostgreSQL instances. - EnableGoogleMlIntegration bool `json:"enableGoogleMlIntegration,omitempty"` - // EntraidConfig: Optional. The Microsoft Entra ID configuration for the SQL - // Server instance. - EntraidConfig *SqlServerEntraIdConfig `json:"entraidConfig,omitempty"` - // FinalBackupConfig: Optional. The final backup configuration for the - // instance. - FinalBackupConfig *FinalBackupConfig `json:"finalBackupConfig,omitempty"` - // InsightsConfig: Insights configuration, for now relevant only for Postgres. - InsightsConfig *InsightsConfig `json:"insightsConfig,omitempty"` - // IpConfiguration: The settings for IP Management. This allows to enable or - // disable the instance IP and manage which external networks can connect to - // the instance. The IPv4 address cannot be disabled for Second Generation - // instances. - IpConfiguration *IpConfiguration `json:"ipConfiguration,omitempty"` - // Kind: This is always `sql#settings`. - Kind string `json:"kind,omitempty"` - // LocationPreference: The location preference settings. This allows the - // instance to be located as near as possible to either an App Engine app or - // Compute Engine zone for better performance. App Engine co-location was only - // applicable to First Generation instances. - LocationPreference *LocationPreference `json:"locationPreference,omitempty"` - // MaintenanceWindow: The maintenance window for this instance. This specifies - // when the instance can be restarted for maintenance purposes. - MaintenanceWindow *MaintenanceWindow `json:"maintenanceWindow,omitempty"` - // PasswordValidationPolicy: The local user password validation policy of the - // instance. - PasswordValidationPolicy *PasswordValidationPolicy `json:"passwordValidationPolicy,omitempty"` - // PerformanceCaptureConfig: Optional. Configuration for Performance Capture, - // provides diagnostic metrics during high load situations. - PerformanceCaptureConfig *PerformanceCaptureConfig `json:"performanceCaptureConfig,omitempty"` - // PricingPlan: The pricing plan for this instance. This can be either - // `PER_USE` or `PACKAGE`. Only `PER_USE` is supported for Second Generation - // instances. - // - // Possible values: - // "SQL_PRICING_PLAN_UNSPECIFIED" - This is an unknown pricing plan for this - // instance. - // "PACKAGE" - The instance is billed at a monthly flat rate. - // "PER_USE" - The instance is billed per usage. - PricingPlan string `json:"pricingPlan,omitempty"` - // ReadPoolAutoScaleConfig: Optional. The read pool auto-scale configuration - // for the instance. - ReadPoolAutoScaleConfig *ReadPoolAutoScaleConfig `json:"readPoolAutoScaleConfig,omitempty"` - // ReplicationLagMaxSeconds: Optional. Configuration value for recreation of - // replica after certain replication lag - ReplicationLagMaxSeconds int64 `json:"replicationLagMaxSeconds,omitempty"` - // ReplicationType: The type of replication this instance uses. This can be - // either `ASYNCHRONOUS` or `SYNCHRONOUS`. (Deprecated) This property was only - // applicable to First Generation instances. - // - // Possible values: - // "SQL_REPLICATION_TYPE_UNSPECIFIED" - This is an unknown replication type - // for a Cloud SQL instance. - // "SYNCHRONOUS" - The synchronous replication mode for First Generation - // instances. It is the default value. - // "ASYNCHRONOUS" - The asynchronous replication mode for First Generation - // instances. It provides a slight performance gain, but if an outage occurs - // while this option is set to asynchronous, you can lose up to a few seconds - // of updates to your data. - ReplicationType string `json:"replicationType,omitempty"` - // RetainBackupsOnDelete: Optional. When this parameter is set to true, Cloud - // SQL retains backups of the instance even after the instance is deleted. The - // ON_DEMAND backup will be retained until customer deletes the backup or the - // project. The AUTOMATED backup will be retained based on the backups - // retention setting. - RetainBackupsOnDelete bool `json:"retainBackupsOnDelete,omitempty"` - // SettingsVersion: The version of instance settings. This is a required field - // for update method to make sure concurrent updates are handled properly. - // During update, use the most recent settingsVersion value for this instance - // and do not try to update this value. - SettingsVersion int64 `json:"settingsVersion,omitempty,string"` - // SqlServerAuditConfig: SQL Server specific audit configuration. - SqlServerAuditConfig *SqlServerAuditConfig `json:"sqlServerAuditConfig,omitempty"` - // StorageAutoResize: Configuration to increase storage size automatically. The - // default value is true. - StorageAutoResize *bool `json:"storageAutoResize,omitempty"` - // StorageAutoResizeLimit: The maximum size to which storage capacity can be - // automatically increased. The default value is 0, which specifies that there - // is no limit. - StorageAutoResizeLimit int64 `json:"storageAutoResizeLimit,omitempty,string"` - // Tier: The tier (or machine type) for this instance, for example - // `db-custom-1-3840`. WARNING: Changing this restarts the instance. - Tier string `json:"tier,omitempty"` - // TimeZone: Server timezone, relevant only for Cloud SQL for SQL Server. - TimeZone string `json:"timeZone,omitempty"` - // UserLabels: User-provided labels, represented as a dictionary where each - // label is a single key value pair. - UserLabels map[string]string `json:"userLabels,omitempty"` - // ForceSendFields is a list of field names (e.g. "AcceleratedReplicaMode") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AcceleratedReplicaMode") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s Settings) MarshalJSON() ([]byte, error) { - type NoMethod Settings - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// SqlActiveDirectoryConfig: Active Directory configuration, relevant only for -// Cloud SQL for SQL Server. -type SqlActiveDirectoryConfig struct { - // AdminCredentialSecretName: Optional. The secret manager key storing the - // administrator credential. (e.g., projects/{project}/secrets/{secret}). - AdminCredentialSecretName string `json:"adminCredentialSecretName,omitempty"` - // DnsServers: Optional. Domain controller IPv4 addresses used to bootstrap - // Active Directory. - DnsServers []string `json:"dnsServers,omitempty"` - // Domain: The name of the domain (e.g., mydomain.com). - Domain string `json:"domain,omitempty"` - // Kind: This is always sql#activeDirectoryConfig. - Kind string `json:"kind,omitempty"` - // Mode: Optional. The mode of the Active Directory configuration. - // - // Possible values: - // "ACTIVE_DIRECTORY_MODE_UNSPECIFIED" - Unspecified mode. Will default to - // MANAGED_ACTIVE_DIRECTORY if the mode is not specified to maintain backward - // compatibility. - // "MANAGED_ACTIVE_DIRECTORY" - Managed Active Directory mode. - // "SELF_MANAGED_ACTIVE_DIRECTORY" - Deprecated: Use - // CUSTOMER_MANAGED_ACTIVE_DIRECTORY instead. - // "CUSTOMER_MANAGED_ACTIVE_DIRECTORY" - Customer-managed Active Directory - // mode. - Mode string `json:"mode,omitempty"` - // OrganizationalUnit: Optional. The organizational unit distinguished name. - // This is the full hierarchical path to the organizational unit. - OrganizationalUnit string `json:"organizationalUnit,omitempty"` - // ForceSendFields is a list of field names (e.g. "AdminCredentialSecretName") - // to unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AdminCredentialSecretName") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SqlActiveDirectoryConfig) MarshalJSON() ([]byte, error) { - type NoMethod SqlActiveDirectoryConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// SqlExternalSyncSettingError: External primary instance migration setting -// error/warning. -type SqlExternalSyncSettingError struct { - // Detail: Additional information about the error encountered. - Detail string `json:"detail,omitempty"` - // Kind: Can be `sql#externalSyncSettingError` or - // `sql#externalSyncSettingWarning`. - Kind string `json:"kind,omitempty"` - // Type: Identifies the specific error that occurred. - // - // Possible values: - // "SQL_EXTERNAL_SYNC_SETTING_ERROR_TYPE_UNSPECIFIED" - // "CONNECTION_FAILURE" - // "BINLOG_NOT_ENABLED" - // "INCOMPATIBLE_DATABASE_VERSION" - // "REPLICA_ALREADY_SETUP" - // "INSUFFICIENT_PRIVILEGE" - The replication user is missing privileges that - // are required. - // "UNSUPPORTED_MIGRATION_TYPE" - Unsupported migration type. - // "NO_PGLOGICAL_INSTALLED" - No pglogical extension installed on databases, - // applicable for postgres. - // "PGLOGICAL_NODE_ALREADY_EXISTS" - pglogical node already exists on - // databases, applicable for postgres. - // "INVALID_WAL_LEVEL" - The value of parameter wal_level is not set to - // logical. - // "INVALID_SHARED_PRELOAD_LIBRARY" - The value of parameter - // shared_preload_libraries does not include pglogical. - // "INSUFFICIENT_MAX_REPLICATION_SLOTS" - The value of parameter - // max_replication_slots is not sufficient. - // "INSUFFICIENT_MAX_WAL_SENDERS" - The value of parameter max_wal_senders is - // not sufficient. - // "INSUFFICIENT_MAX_WORKER_PROCESSES" - The value of parameter - // max_worker_processes is not sufficient. - // "UNSUPPORTED_EXTENSIONS" - Extensions installed are either not supported - // or having unsupported versions. - // "INVALID_RDS_LOGICAL_REPLICATION" - The value of parameter - // rds.logical_replication is not set to 1. - // "INVALID_LOGGING_SETUP" - The primary instance logging setup doesn't allow - // EM sync. - // "INVALID_DB_PARAM" - The primary instance database parameter setup doesn't - // allow EM sync. - // "UNSUPPORTED_GTID_MODE" - The gtid_mode is not supported, applicable for - // MySQL. - // "SQLSERVER_AGENT_NOT_RUNNING" - SQL Server Agent is not running. - // "UNSUPPORTED_TABLE_DEFINITION" - The table definition is not support due - // to missing primary key or replica identity, applicable for postgres. Note - // that this is a warning and won't block the migration. - // "UNSUPPORTED_DEFINER" - The customer has a definer that will break EM - // setup. - // "SQLSERVER_SERVERNAME_MISMATCH" - SQL Server @@SERVERNAME does not match - // actual host name. - // "PRIMARY_ALREADY_SETUP" - The primary instance has been setup and will - // fail the setup. - // "UNSUPPORTED_BINLOG_FORMAT" - The primary instance has unsupported binary - // log format. - // "BINLOG_RETENTION_SETTING" - The primary instance's binary log retention - // setting. - // "UNSUPPORTED_STORAGE_ENGINE" - The primary instance has tables with - // unsupported storage engine. - // "LIMITED_SUPPORT_TABLES" - Source has tables with limited support eg: - // PostgreSQL tables without primary keys. - // "EXISTING_DATA_IN_REPLICA" - The replica instance contains existing data. - // "MISSING_OPTIONAL_PRIVILEGES" - The replication user is missing privileges - // that are optional. - // "RISKY_BACKUP_ADMIN_PRIVILEGE" - Additional BACKUP_ADMIN privilege is - // granted to the replication user which may lock source MySQL 8 instance for - // DDLs during initial sync. - // "INSUFFICIENT_GCS_PERMISSIONS" - The Cloud Storage bucket is missing - // necessary permissions. - // "INVALID_FILE_INFO" - The Cloud Storage bucket has an error in the file or - // contains invalid file information. - // "UNSUPPORTED_DATABASE_SETTINGS" - The source instance has unsupported - // database settings for migration. - // "MYSQL_PARALLEL_IMPORT_INSUFFICIENT_PRIVILEGE" - The replication user is - // missing parallel import specific privileges. (e.g. LOCK TABLES) for MySQL. - // "LOCAL_INFILE_OFF" - The global variable local_infile is off on external - // server replica. - // "TURN_ON_PITR_AFTER_PROMOTE" - This code instructs customers to turn on - // point-in-time recovery manually for the instance after promoting the Cloud - // SQL for PostgreSQL instance. - // "INCOMPATIBLE_DATABASE_MINOR_VERSION" - The minor version of replica - // database is incompatible with the source. - // "SOURCE_MAX_SUBSCRIPTIONS" - This warning message indicates that Cloud SQL - // uses the maximum number of subscriptions to migrate data from the source to - // the destination. - // "UNABLE_TO_VERIFY_DEFINERS" - Unable to verify definers on the source for - // MySQL. - // "SUBSCRIPTION_CALCULATION_STATUS" - If a time out occurs while the - // subscription counts are calculated, then this value is set to 1. Otherwise, - // this value is set to 2. - // "PG_SUBSCRIPTION_COUNT" - Count of subscriptions needed to sync source - // data for PostgreSQL database. - // "PG_SYNC_PARALLEL_LEVEL" - Final parallel level that is used to do - // migration. - // "INSUFFICIENT_DISK_SIZE" - The disk size of the replica instance is - // smaller than the data size of the source instance. - // "INSUFFICIENT_MACHINE_TIER" - The data size of the source instance is - // greater than 1 TB, the number of cores of the replica instance is less than - // 8, and the memory of the replica is less than 32 GB. - // "UNSUPPORTED_EXTENSIONS_NOT_MIGRATED" - The warning message indicates the - // unsupported extensions will not be migrated to the destination. - // "EXTENSIONS_NOT_MIGRATED" - The warning message indicates the pg_cron - // extension and settings will not be migrated to the destination. - // "PG_CRON_FLAG_ENABLED_IN_REPLICA" - The error message indicates that - // pg_cron flags are enabled on the destination which is not supported during - // the migration. - // "EXTENSIONS_NOT_ENABLED_IN_REPLICA" - This error message indicates that - // the specified extensions are not enabled on destination instance. For - // example, before you can migrate data to the destination instance, you must - // enable the PGAudit extension on the instance. - // "UNSUPPORTED_COLUMNS" - The source database has generated columns that - // can't be migrated. Please change them to regular columns before migration. - // "USERS_NOT_CREATED_IN_REPLICA" - The source database has users that aren't - // created in the replica. First, create all users, which are in the - // pg_user_mappings table of the source database, in the destination instance. - // Then, perform the migration. - // "UNSUPPORTED_SYSTEM_OBJECTS" - The selected objects include system objects - // that aren't supported for migration. - // "UNSUPPORTED_TABLES_WITH_REPLICA_IDENTITY" - The source database has - // tables with the FULL or NOTHING replica identity. Before starting your - // migration, either remove the identity or change it to DEFAULT. Note that - // this is an error and will block the migration. - // "SELECTED_OBJECTS_NOT_EXIST_ON_SOURCE" - The selected objects don't exist - // on the source instance. - // "PSC_ONLY_INSTANCE_WITH_NO_NETWORK_ATTACHMENT_URI" - PSC only destination - // instance does not have a network attachment URI. - // "SELECTED_OBJECTS_REFERENCE_UNSELECTED_OBJECTS" - Selected objects - // reference unselected objects. Based on their object type (foreign key - // constraint or view), selected objects will fail during migration. - // "PROMPT_DELETE_EXISTING" - The migration will delete existing data in the - // replica; set replica_overwrite_enabled in the request to acknowledge this. - // This is an error. MySQL only. - // "WILL_DELETE_EXISTING" - The migration will delete existing data in the - // replica; replica_overwrite_enabled was set in the request acknowledging - // this. This is a warning rather than an error. MySQL only. - // "PG_DDL_REPLICATION_INSUFFICIENT_PRIVILEGE" - The replication user is - // missing specific privileges to setup DDL replication. (e.g. CREATE EVENT - // TRIGGER, CREATE SCHEMA) for PostgreSQL. - Type string `json:"type,omitempty"` - // ForceSendFields is a list of field names (e.g. "Detail") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Detail") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SqlExternalSyncSettingError) MarshalJSON() ([]byte, error) { - type NoMethod SqlExternalSyncSettingError - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// SqlInstancesAcquireSsrsLeaseResponse: Response for the acquire SSRS lease -// request. -type SqlInstancesAcquireSsrsLeaseResponse struct { - // OperationId: The unique identifier for this operation. - OperationId string `json:"operationId,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "OperationId") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "OperationId") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SqlInstancesAcquireSsrsLeaseResponse) MarshalJSON() ([]byte, error) { - type NoMethod SqlInstancesAcquireSsrsLeaseResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// SqlInstancesExecuteSqlResponse: Execute SQL statements response. -type SqlInstancesExecuteSqlResponse struct { - // Messages: A list of notices and warnings generated during query execution. - // For PostgreSQL, this includes all notices and warnings. For MySQL, this - // includes warnings generated by the last executed statement. To retrieve all - // warnings for a multi-statement query, `SHOW WARNINGS` must be executed after - // each statement. - Messages []*Message `json:"messages,omitempty"` - // Metadata: The additional metadata information regarding the execution of the - // SQL statements. - Metadata *Metadata `json:"metadata,omitempty"` - // Results: The list of results after executing all the SQL statements. - Results []*QueryResult `json:"results,omitempty"` - // Status: Contains the error from the database if the SQL execution failed. - Status *Status `json:"status,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Messages") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Messages") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SqlInstancesExecuteSqlResponse) MarshalJSON() ([]byte, error) { - type NoMethod SqlInstancesExecuteSqlResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// SqlInstancesGetDiskShrinkConfigResponse: Instance get disk shrink config -// response. -type SqlInstancesGetDiskShrinkConfigResponse struct { - // Kind: This is always `sql#getDiskShrinkConfig`. - Kind string `json:"kind,omitempty"` - // Message: Additional message to customers. - Message string `json:"message,omitempty"` - // MinimalTargetSizeGb: The minimum size to which a disk can be shrunk in - // GigaBytes. - MinimalTargetSizeGb int64 `json:"minimalTargetSizeGb,omitempty,string"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Kind") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Kind") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SqlInstancesGetDiskShrinkConfigResponse) MarshalJSON() ([]byte, error) { - type NoMethod SqlInstancesGetDiskShrinkConfigResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// SqlInstancesGetLatestRecoveryTimeResponse: Instance get latest recovery time -// response. -type SqlInstancesGetLatestRecoveryTimeResponse struct { - // EarliestRecoveryTime: Timestamp, identifies the earliest recovery time of - // the source instance. - EarliestRecoveryTime string `json:"earliestRecoveryTime,omitempty"` - // Kind: This is always `sql#getLatestRecoveryTime`. - Kind string `json:"kind,omitempty"` - // LatestRecoveryTime: Timestamp, identifies the latest recovery time of the - // source instance. - LatestRecoveryTime string `json:"latestRecoveryTime,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "EarliestRecoveryTime") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "EarliestRecoveryTime") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SqlInstancesGetLatestRecoveryTimeResponse) MarshalJSON() ([]byte, error) { - type NoMethod SqlInstancesGetLatestRecoveryTimeResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// SqlInstancesReleaseSsrsLeaseResponse: Response for the release SSRS lease -// request. -type SqlInstancesReleaseSsrsLeaseResponse struct { - // OperationId: The unique identifier for this operation. - OperationId string `json:"operationId,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "OperationId") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "OperationId") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SqlInstancesReleaseSsrsLeaseResponse) MarshalJSON() ([]byte, error) { - type NoMethod SqlInstancesReleaseSsrsLeaseResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// SqlInstancesRescheduleMaintenanceRequestBody: Reschedule options for -// maintenance windows. -type SqlInstancesRescheduleMaintenanceRequestBody struct { - // Reschedule: Required. The type of the reschedule the user wants. - Reschedule *Reschedule `json:"reschedule,omitempty"` - // ForceSendFields is a list of field names (e.g. "Reschedule") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Reschedule") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SqlInstancesRescheduleMaintenanceRequestBody) MarshalJSON() ([]byte, error) { - type NoMethod SqlInstancesRescheduleMaintenanceRequestBody - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// SqlInstancesResetReplicaSizeRequest: Instance reset replica size request. -type SqlInstancesResetReplicaSizeRequest struct { -} - -// SqlInstancesStartExternalSyncRequest: Instance start external sync request. -type SqlInstancesStartExternalSyncRequest struct { - // MigrationType: Optional. MigrationType configures the migration to use - // physical files or logical dump files. If not set, then the logical dump file - // configuration is used. Valid values are `LOGICAL` or `PHYSICAL`. Only - // applicable to MySQL. - // - // Possible values: - // "MIGRATION_TYPE_UNSPECIFIED" - Default value is a logical dump file-based - // migration - // "LOGICAL" - Logical dump file-based migration - // "PHYSICAL" - Physical file-based migration - MigrationType string `json:"migrationType,omitempty"` - // MysqlSyncConfig: MySQL-specific settings for start external sync. - MysqlSyncConfig *MySqlSyncConfig `json:"mysqlSyncConfig,omitempty"` - // ReplicaOverwriteEnabled: Optional. MySQL only. True if end-user has - // confirmed that this SES call will wipe replica databases overlapping with - // the proposed selected_objects. If this field is not set and there are both - // overlapping and additional databases proposed, an error will be returned. - ReplicaOverwriteEnabled bool `json:"replicaOverwriteEnabled,omitempty"` - // SkipVerification: Whether to skip the verification step (VESS). - SkipVerification bool `json:"skipVerification,omitempty"` - // SyncMode: External sync mode. - // - // Possible values: - // "EXTERNAL_SYNC_MODE_UNSPECIFIED" - Unknown external sync mode, will be - // defaulted to ONLINE mode - // "ONLINE" - Online external sync will set up replication after initial data - // external sync - // "OFFLINE" - Offline external sync only dumps and loads a one-time snapshot - // of the primary instance's data - SyncMode string `json:"syncMode,omitempty"` - // SyncParallelLevel: Optional. Parallel level for initial data sync. Currently - // only applicable for MySQL. - // - // Possible values: - // "EXTERNAL_SYNC_PARALLEL_LEVEL_UNSPECIFIED" - Unknown sync parallel level. - // Will be defaulted to OPTIMAL. - // "MIN" - Minimal parallel level. - // "OPTIMAL" - Optimal parallel level. - // "MAX" - Maximum parallel level. - SyncParallelLevel string `json:"syncParallelLevel,omitempty"` - // ForceSendFields is a list of field names (e.g. "MigrationType") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "MigrationType") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SqlInstancesStartExternalSyncRequest) MarshalJSON() ([]byte, error) { - type NoMethod SqlInstancesStartExternalSyncRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// SqlInstancesVerifyExternalSyncSettingsRequest: Instance verify external sync -// settings request. -type SqlInstancesVerifyExternalSyncSettingsRequest struct { - // MigrationType: Optional. MigrationType configures the migration to use - // physical files or logical dump files. If not set, then the logical dump file - // configuration is used. Valid values are `LOGICAL` or `PHYSICAL`. Only - // applicable to MySQL. - // - // Possible values: - // "MIGRATION_TYPE_UNSPECIFIED" - Default value is a logical dump file-based - // migration - // "LOGICAL" - Logical dump file-based migration - // "PHYSICAL" - Physical file-based migration - MigrationType string `json:"migrationType,omitempty"` - // MysqlSyncConfig: Optional. MySQL-specific settings for start external sync. - MysqlSyncConfig *MySqlSyncConfig `json:"mysqlSyncConfig,omitempty"` - // SelectedObjects: Optional. Migrate only the specified objects from the - // source instance. If this field is empty, then migrate all objects. - SelectedObjects []*ExternalSyncSelectedObject `json:"selectedObjects,omitempty"` - // SyncMode: External sync mode - // - // Possible values: - // "EXTERNAL_SYNC_MODE_UNSPECIFIED" - Unknown external sync mode, will be - // defaulted to ONLINE mode - // "ONLINE" - Online external sync will set up replication after initial data - // external sync - // "OFFLINE" - Offline external sync only dumps and loads a one-time snapshot - // of the primary instance's data - SyncMode string `json:"syncMode,omitempty"` - // SyncParallelLevel: Optional. Parallel level for initial data sync. Only - // applicable for PostgreSQL. - // - // Possible values: - // "EXTERNAL_SYNC_PARALLEL_LEVEL_UNSPECIFIED" - Unknown sync parallel level. - // Will be defaulted to OPTIMAL. - // "MIN" - Minimal parallel level. - // "OPTIMAL" - Optimal parallel level. - // "MAX" - Maximum parallel level. - SyncParallelLevel string `json:"syncParallelLevel,omitempty"` - // VerifyConnectionOnly: Flag to enable verifying connection only - VerifyConnectionOnly bool `json:"verifyConnectionOnly,omitempty"` - // VerifyReplicationOnly: Optional. Flag to verify settings required by - // replication setup only - VerifyReplicationOnly bool `json:"verifyReplicationOnly,omitempty"` - // ForceSendFields is a list of field names (e.g. "MigrationType") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "MigrationType") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SqlInstancesVerifyExternalSyncSettingsRequest) MarshalJSON() ([]byte, error) { - type NoMethod SqlInstancesVerifyExternalSyncSettingsRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// SqlInstancesVerifyExternalSyncSettingsResponse: Instance verify external -// sync settings response. -type SqlInstancesVerifyExternalSyncSettingsResponse struct { - // Errors: List of migration violations. - Errors []*SqlExternalSyncSettingError `json:"errors,omitempty"` - // Kind: This is always `sql#migrationSettingErrorList`. - Kind string `json:"kind,omitempty"` - // Warnings: List of migration warnings. - Warnings []*SqlExternalSyncSettingError `json:"warnings,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Errors") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Errors") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SqlInstancesVerifyExternalSyncSettingsResponse) MarshalJSON() ([]byte, error) { - type NoMethod SqlInstancesVerifyExternalSyncSettingsResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// SqlOutOfDiskReport: This message wraps up the information written by -// out-of-disk detection job. -type SqlOutOfDiskReport struct { - // SqlMinRecommendedIncreaseSizeGb: The minimum recommended increase size in - // GigaBytes This field is consumed by the frontend * Writers: * the proactive - // database wellness job for OOD. * Readers: - SqlMinRecommendedIncreaseSizeGb int64 `json:"sqlMinRecommendedIncreaseSizeGb,omitempty"` - // SqlOutOfDiskState: This field represents the state generated by the - // proactive database wellness job for OutOfDisk issues. * Writers: * the - // proactive database wellness job for OOD. * Readers: * the proactive database - // wellness job - // - // Possible values: - // "SQL_OUT_OF_DISK_STATE_UNSPECIFIED" - Unspecified state - // "NORMAL" - The instance has plenty space on data disk - // "SOFT_SHUTDOWN" - Data disk is almost used up. It is shutdown to prevent - // data corruption. - SqlOutOfDiskState string `json:"sqlOutOfDiskState,omitempty"` - // ForceSendFields is a list of field names (e.g. - // "SqlMinRecommendedIncreaseSizeGb") to unconditionally include in API - // requests. By default, fields with empty or default values are omitted from - // API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "SqlMinRecommendedIncreaseSizeGb") - // to include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SqlOutOfDiskReport) MarshalJSON() ([]byte, error) { - type NoMethod SqlOutOfDiskReport - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// SqlScheduledMaintenance: Any scheduled maintenance for this instance. -type SqlScheduledMaintenance struct { - CanDefer bool `json:"canDefer,omitempty"` - // CanReschedule: If the scheduled maintenance can be rescheduled. - CanReschedule bool `json:"canReschedule,omitempty"` - // ScheduleDeadlineTime: Maintenance cannot be rescheduled to start beyond this - // deadline. - ScheduleDeadlineTime string `json:"scheduleDeadlineTime,omitempty"` - // StartTime: The start time of any upcoming scheduled maintenance for this - // instance. - StartTime string `json:"startTime,omitempty"` - // ForceSendFields is a list of field names (e.g. "CanDefer") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CanDefer") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SqlScheduledMaintenance) MarshalJSON() ([]byte, error) { - type NoMethod SqlScheduledMaintenance - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// SqlServerAuditConfig: SQL Server specific audit configuration. -type SqlServerAuditConfig struct { - // Bucket: The name of the destination bucket (e.g., gs://mybucket). - Bucket string `json:"bucket,omitempty"` - // Kind: This is always sql#sqlServerAuditConfig - Kind string `json:"kind,omitempty"` - // RetentionInterval: How long to keep generated audit files. - RetentionInterval string `json:"retentionInterval,omitempty"` - // UploadInterval: How often to upload generated audit files. - UploadInterval string `json:"uploadInterval,omitempty"` - // ForceSendFields is a list of field names (e.g. "Bucket") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Bucket") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SqlServerAuditConfig) MarshalJSON() ([]byte, error) { - type NoMethod SqlServerAuditConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// SqlServerDatabaseDetails: Represents a Sql Server database on the Cloud SQL -// instance. -type SqlServerDatabaseDetails struct { - // CompatibilityLevel: The version of SQL Server with which the database is to - // be made compatible - CompatibilityLevel int64 `json:"compatibilityLevel,omitempty"` - // RecoveryModel: The recovery model of a SQL Server database - RecoveryModel string `json:"recoveryModel,omitempty"` - // ForceSendFields is a list of field names (e.g. "CompatibilityLevel") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CompatibilityLevel") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SqlServerDatabaseDetails) MarshalJSON() ([]byte, error) { - type NoMethod SqlServerDatabaseDetails - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// SqlServerEntraIdConfig: SQL Server Entra ID configuration. -type SqlServerEntraIdConfig struct { - // ApplicationId: Optional. The application ID for the Entra ID configuration. - ApplicationId string `json:"applicationId,omitempty"` - // Kind: Output only. This is always sql#sqlServerEntraIdConfig - Kind string `json:"kind,omitempty"` - // TenantId: Optional. The tenant ID for the Entra ID configuration. - TenantId string `json:"tenantId,omitempty"` - // ForceSendFields is a list of field names (e.g. "ApplicationId") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ApplicationId") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SqlServerEntraIdConfig) MarshalJSON() ([]byte, error) { - type NoMethod SqlServerEntraIdConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// SqlServerUserDetails: Represents a Sql Server user on the Cloud SQL -// instance. -type SqlServerUserDetails struct { - // Disabled: If the user has been disabled - Disabled bool `json:"disabled,omitempty"` - // ServerRoles: The server roles for this user - ServerRoles []string `json:"serverRoles,omitempty"` - // ForceSendFields is a list of field names (e.g. "Disabled") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Disabled") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SqlServerUserDetails) MarshalJSON() ([]byte, error) { - type NoMethod SqlServerUserDetails - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// SqlSubOperationType: The sub operation type based on the operation type. -type SqlSubOperationType struct { - // MaintenanceType: The type of maintenance to be performed on the instance. - // - // Possible values: - // "SQL_MAINTENANCE_TYPE_UNSPECIFIED" - Maintenance type is unspecified. - // "INSTANCE_MAINTENANCE" - Indicates that a standalone instance is - // undergoing maintenance. The instance can be either a primary instance or a - // replica. - // "REPLICA_INCLUDED_MAINTENANCE" - Indicates that the primary instance and - // all of its replicas, including cascading replicas, are undergoing - // maintenance. Maintenance is performed on groups of replicas first, followed - // by the primary instance. - // "INSTANCE_SELF_SERVICE_MAINTENANCE" - Indicates that the standalone - // instance is undergoing maintenance, initiated by self-service. The instance - // can be either a primary instance or a replica. - // "REPLICA_INCLUDED_SELF_SERVICE_MAINTENANCE" - Indicates that the primary - // instance and all of its replicas are undergoing maintenance, initiated by - // self-service. Maintenance is performed on groups of replicas first, followed - // by the primary instance. - MaintenanceType string `json:"maintenanceType,omitempty"` - // ForceSendFields is a list of field names (e.g. "MaintenanceType") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "MaintenanceType") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SqlSubOperationType) MarshalJSON() ([]byte, error) { - type NoMethod SqlSubOperationType - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// SslCert: SslCerts Resource -type SslCert struct { - // Cert: PEM representation. - Cert string `json:"cert,omitempty"` - // CertSerialNumber: Serial number, as extracted from the certificate. - CertSerialNumber string `json:"certSerialNumber,omitempty"` - // CommonName: User supplied name. Constrained to [a-zA-Z.-_ ]+. - CommonName string `json:"commonName,omitempty"` - // CreateTime: The time when the certificate was created in RFC 3339 - // (https://tools.ietf.org/html/rfc3339) format, for example - // `2012-11-15T16:19:00.094Z` - CreateTime string `json:"createTime,omitempty"` - // ExpirationTime: The time when the certificate expires in RFC 3339 - // (https://tools.ietf.org/html/rfc3339) format, for example - // `2012-11-15T16:19:00.094Z`. - ExpirationTime string `json:"expirationTime,omitempty"` - // Instance: Name of the database instance. - Instance string `json:"instance,omitempty"` - // Kind: This is always `sql#sslCert`. - Kind string `json:"kind,omitempty"` - // SelfLink: The URI of this resource. - SelfLink string `json:"selfLink,omitempty"` - // Sha1Fingerprint: Sha1 Fingerprint. - Sha1Fingerprint string `json:"sha1Fingerprint,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Cert") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Cert") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SslCert) MarshalJSON() ([]byte, error) { - type NoMethod SslCert - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// SslCertDetail: SslCertDetail. -type SslCertDetail struct { - // CertInfo: The public information about the cert. - CertInfo *SslCert `json:"certInfo,omitempty"` - // CertPrivateKey: The private key for the client cert, in pem format. Keep - // private in order to protect your security. - CertPrivateKey string `json:"certPrivateKey,omitempty"` - // ForceSendFields is a list of field names (e.g. "CertInfo") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CertInfo") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SslCertDetail) MarshalJSON() ([]byte, error) { - type NoMethod SslCertDetail - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// SslCertsCreateEphemeralRequest: SslCerts create ephemeral certificate -// request. -type SslCertsCreateEphemeralRequest struct { - // AccessToken: Access token to include in the signed certificate. - AccessToken string `json:"access_token,omitempty"` - // PublicKey: PEM encoded public key to include in the signed certificate. - PublicKey string `json:"public_key,omitempty"` - // ForceSendFields is a list of field names (e.g. "AccessToken") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AccessToken") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SslCertsCreateEphemeralRequest) MarshalJSON() ([]byte, error) { - type NoMethod SslCertsCreateEphemeralRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// SslCertsInsertRequest: SslCerts insert request. -type SslCertsInsertRequest struct { - // CommonName: User supplied name. Must be a distinct name from the other - // certificates for this instance. - CommonName string `json:"commonName,omitempty"` - // ForceSendFields is a list of field names (e.g. "CommonName") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CommonName") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SslCertsInsertRequest) MarshalJSON() ([]byte, error) { - type NoMethod SslCertsInsertRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// SslCertsInsertResponse: SslCert insert response. -type SslCertsInsertResponse struct { - // ClientCert: The new client certificate and private key. - ClientCert *SslCertDetail `json:"clientCert,omitempty"` - // Kind: This is always `sql#sslCertsInsert`. - Kind string `json:"kind,omitempty"` - // Operation: The operation to track the ssl certs insert request. - Operation *Operation `json:"operation,omitempty"` - // ServerCaCert: The server Certificate Authority's certificate. If this is - // missing you can force a new one to be generated by calling resetSslConfig - // method on instances resource. - ServerCaCert *SslCert `json:"serverCaCert,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "ClientCert") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ClientCert") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SslCertsInsertResponse) MarshalJSON() ([]byte, error) { - type NoMethod SslCertsInsertResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// SslCertsListResponse: SslCerts list response. -type SslCertsListResponse struct { - // Items: List of client certificates for the instance. - Items []*SslCert `json:"items,omitempty"` - // Kind: This is always `sql#sslCertsList`. - Kind string `json:"kind,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Items") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Items") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SslCertsListResponse) MarshalJSON() ([]byte, error) { - type NoMethod SslCertsListResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// Status: The `Status` type defines a logical error model that is suitable for -// different programming environments, including REST APIs and RPC APIs. It is -// used by gRPC (https://github.com/grpc). Each `Status` message contains three -// pieces of data: error code, error message, and error details. You can find -// out more about this error model and how to work with it in the API Design -// Guide (https://cloud.google.com/apis/design/errors). -type Status struct { - // Code: The status code, which should be an enum value of google.rpc.Code. - Code int64 `json:"code,omitempty"` - // Details: A list of messages that carry the error details. There is a common - // set of message types for APIs to use. - Details []googleapi.RawMessage `json:"details,omitempty"` - // Message: A developer-facing error message, which should be in English. Any - // user-facing error message should be localized and sent in the - // google.rpc.Status.details field, or localized by the client. - Message string `json:"message,omitempty"` - // ForceSendFields is a list of field names (e.g. "Code") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s Status) MarshalJSON() ([]byte, error) { - type NoMethod Status - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// SyncFlags: Initial sync flags for certain Cloud SQL APIs. Currently used for -// the MySQL external server initial dump. -type SyncFlags struct { - // Name: The name of the flag. - Name string `json:"name,omitempty"` - // Value: The value of the flag. This field must be omitted if the flag doesn't - // take a value. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Name") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Name") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SyncFlags) MarshalJSON() ([]byte, error) { - type NoMethod SyncFlags - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// TargetMetric: Target metric for read pool auto scaling. -type TargetMetric struct { - // Metric: The metric name to be used for auto scaling. - Metric string `json:"metric,omitempty"` - // TargetValue: The target value for the metric. - TargetValue float64 `json:"targetValue,omitempty"` - // ForceSendFields is a list of field names (e.g. "Metric") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Metric") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TargetMetric) MarshalJSON() ([]byte, error) { - type NoMethod TargetMetric - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -func (s *TargetMetric) UnmarshalJSON(data []byte) error { - type NoMethod TargetMetric - var s1 struct { - TargetValue gensupport.JSONFloat64 `json:"targetValue"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.TargetValue = float64(s1.TargetValue) - return nil -} - -// Tier: A Google Cloud SQL service tier resource. -type Tier struct { - // DiskQuota: The maximum disk size of this tier in bytes. - DiskQuota int64 `json:"DiskQuota,omitempty,string"` - // RAM: The maximum RAM usage of this tier in bytes. - RAM int64 `json:"RAM,omitempty,string"` - // Kind: This is always `sql#tier`. - Kind string `json:"kind,omitempty"` - // Region: The applicable regions for this tier. - Region []string `json:"region,omitempty"` - // Tier: An identifier for the machine type, for example, `db-custom-1-3840`. - // For related information, see Pricing (/sql/pricing). - Tier string `json:"tier,omitempty"` - // ForceSendFields is a list of field names (e.g. "DiskQuota") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DiskQuota") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s Tier) MarshalJSON() ([]byte, error) { - type NoMethod Tier - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// TiersListResponse: Tiers list response. -type TiersListResponse struct { - // Items: List of tiers. - Items []*Tier `json:"items,omitempty"` - // Kind: This is always `sql#tiersList`. - Kind string `json:"kind,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Items") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Items") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TiersListResponse) MarshalJSON() ([]byte, error) { - type NoMethod TiersListResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// TruncateLogContext: Database Instance truncate log context. -type TruncateLogContext struct { - // Kind: This is always `sql#truncateLogContext`. - Kind string `json:"kind,omitempty"` - // LogType: The type of log to truncate. Valid values are `MYSQL_GENERAL_TABLE` - // and `MYSQL_SLOW_TABLE`. - LogType string `json:"logType,omitempty"` - // ForceSendFields is a list of field names (e.g. "Kind") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Kind") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TruncateLogContext) MarshalJSON() ([]byte, error) { - type NoMethod TruncateLogContext - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// User: A Cloud SQL user resource. -type User struct { - // DatabaseRoles: Optional. Role memberships of the user - DatabaseRoles []string `json:"databaseRoles,omitempty"` - // DualPasswordType: Dual password status for the user. - // - // Possible values: - // "DUAL_PASSWORD_TYPE_UNSPECIFIED" - The default value. - // "NO_MODIFY_DUAL_PASSWORD" - Do not update the user's dual password status. - // "NO_DUAL_PASSWORD" - No dual password usable for connecting using this - // user. - // "DUAL_PASSWORD" - Dual password usable for connecting using this user. - DualPasswordType string `json:"dualPasswordType,omitempty"` - // Etag: This field is deprecated and will be removed from a future version of - // the API. - Etag string `json:"etag,omitempty"` - // Host: Optional. The host from which the user can connect. For `insert` - // operations, host defaults to an empty string. For `update` operations, host - // is specified as part of the request URL. The host name cannot be updated - // after insertion. For a MySQL instance, it's required; for a PostgreSQL or - // SQL Server instance, it's optional. - Host string `json:"host,omitempty"` - // IamEmail: Optional. The full email for an IAM user. For normal database - // users, this will not be filled. Only applicable to MySQL database users. - IamEmail string `json:"iamEmail,omitempty"` - // IamStatus: Indicates if a group is active or inactive for IAM database - // authentication. - // - // Possible values: - // "IAM_STATUS_UNSPECIFIED" - The default value for users that are not of - // type CLOUD_IAM_GROUP. Only CLOUD_IAM_GROUP users will be inactive or active. - // Users with an IamStatus of IAM_STATUS_UNSPECIFIED will not display whether - // they are active or inactive as that is not applicable to them. - // "INACTIVE" - INACTIVE indicates a group is not available for IAM database - // authentication. - // "ACTIVE" - ACTIVE indicates a group is available for IAM database - // authentication. - IamStatus string `json:"iamStatus,omitempty"` - // Instance: The name of the Cloud SQL instance. This does not include the - // project ID. Can be omitted for `update` because it is already specified on - // the URL. - Instance string `json:"instance,omitempty"` - // Kind: This is always `sql#user`. - Kind string `json:"kind,omitempty"` - // Name: The name of the user in the Cloud SQL instance. Can be omitted for - // `update` because it is already specified in the URL. - Name string `json:"name,omitempty"` - // Password: The password for the user. - Password string `json:"password,omitempty"` - // PasswordPolicy: User level password validation policy. - PasswordPolicy *UserPasswordValidationPolicy `json:"passwordPolicy,omitempty"` - // Project: The project ID of the project containing the Cloud SQL database. - // The Google apps domain is prefixed if applicable. Can be omitted for - // `update` because it is already specified on the URL. - Project string `json:"project,omitempty"` - SqlserverUserDetails *SqlServerUserDetails `json:"sqlserverUserDetails,omitempty"` - // Type: The user type. It determines the method to authenticate the user - // during login. The default is the database's built-in user type. - // - // Possible values: - // "BUILT_IN" - The database's built-in user type. - // "CLOUD_IAM_USER" - Cloud IAM user. - // "CLOUD_IAM_SERVICE_ACCOUNT" - Cloud IAM service account. - // "CLOUD_IAM_GROUP" - Cloud IAM group. Not used for login. - // "CLOUD_IAM_GROUP_USER" - Read-only. Login for a user that belongs to the - // Cloud IAM group. - // "CLOUD_IAM_GROUP_SERVICE_ACCOUNT" - Read-only. Login for a service account - // that belongs to the Cloud IAM group. - // "ENTRAID_USER" - Microsoft Entra ID user. - Type string `json:"type,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "DatabaseRoles") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DatabaseRoles") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s User) MarshalJSON() ([]byte, error) { - type NoMethod User - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// UserPasswordValidationPolicy: User level password validation policy. -type UserPasswordValidationPolicy struct { - // AllowedFailedAttempts: Number of failed login attempts allowed before user - // get locked. - AllowedFailedAttempts int64 `json:"allowedFailedAttempts,omitempty"` - // EnableFailedAttemptsCheck: If true, failed login attempts check will be - // enabled. - EnableFailedAttemptsCheck bool `json:"enableFailedAttemptsCheck,omitempty"` - // EnablePasswordVerification: If true, the user must specify the current - // password before changing the password. This flag is supported only for - // MySQL. - EnablePasswordVerification bool `json:"enablePasswordVerification,omitempty"` - // PasswordExpirationDuration: Expiration duration after password is updated. - PasswordExpirationDuration string `json:"passwordExpirationDuration,omitempty"` - // Status: Output only. Read-only password status. - Status *PasswordStatus `json:"status,omitempty"` - // ForceSendFields is a list of field names (e.g. "AllowedFailedAttempts") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AllowedFailedAttempts") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s UserPasswordValidationPolicy) MarshalJSON() ([]byte, error) { - type NoMethod UserPasswordValidationPolicy - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// UsersListResponse: User list response. -type UsersListResponse struct { - // Items: List of user resources in the instance. - Items []*User `json:"items,omitempty"` - // Kind: This is always `sql#usersList`. - Kind string `json:"kind,omitempty"` - // NextPageToken: Unused. - NextPageToken string `json:"nextPageToken,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Items") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Items") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s UsersListResponse) MarshalJSON() ([]byte, error) { - type NoMethod UsersListResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// Value: The cell value of the table. -type Value struct { - // NullValue: If cell value is null, then this flag will be set to true. - NullValue bool `json:"nullValue,omitempty"` - // Value: The cell value in string format. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "NullValue") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "NullValue") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s Value) MarshalJSON() ([]byte, error) { - type NoMethod Value - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type BackupsCreateBackupCall struct { - s *Service - parent string - backup *Backup - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// CreateBackup: Creates a backup for a Cloud SQL instance. This API can be -// used only to create on-demand backups. -// -// - parent: The parent resource where this backup is created. Format: -// projects/{project}. -func (r *BackupsService) CreateBackup(parent string, backup *Backup) *BackupsCreateBackupCall { - c := &BackupsCreateBackupCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.backup = backup - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *BackupsCreateBackupCall) Fields(s ...googleapi.Field) *BackupsCreateBackupCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *BackupsCreateBackupCall) Context(ctx context.Context) *BackupsCreateBackupCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *BackupsCreateBackupCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *BackupsCreateBackupCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.backup) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/backups") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "sql.Backups.CreateBackup", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "sql.Backups.CreateBackup" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *BackupsCreateBackupCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "sql.Backups.CreateBackup", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type BackupsDeleteBackupCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// DeleteBackup: Deletes the backup. -// -// - name: The name of the backup to delete. Format: -// projects/{project}/backups/{backup}. -func (r *BackupsService) DeleteBackup(name string) *BackupsDeleteBackupCall { - c := &BackupsDeleteBackupCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *BackupsDeleteBackupCall) Fields(s ...googleapi.Field) *BackupsDeleteBackupCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *BackupsDeleteBackupCall) Context(ctx context.Context) *BackupsDeleteBackupCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *BackupsDeleteBackupCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *BackupsDeleteBackupCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "sql.Backups.DeleteBackup", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "sql.Backups.DeleteBackup" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *BackupsDeleteBackupCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "sql.Backups.DeleteBackup", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type BackupsGetBackupCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// GetBackup: Retrieves a resource containing information about a backup. -// -// - name: The name of the backup to retrieve. Format: -// projects/{project}/backups/{backup}. -func (r *BackupsService) GetBackup(name string) *BackupsGetBackupCall { - c := &BackupsGetBackupCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *BackupsGetBackupCall) Fields(s ...googleapi.Field) *BackupsGetBackupCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *BackupsGetBackupCall) IfNoneMatch(entityTag string) *BackupsGetBackupCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *BackupsGetBackupCall) Context(ctx context.Context) *BackupsGetBackupCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *BackupsGetBackupCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *BackupsGetBackupCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "sql.Backups.GetBackup", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "sql.Backups.GetBackup" call. -// Any non-2xx status code is an error. Response headers are in either -// *Backup.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *BackupsGetBackupCall) Do(opts ...googleapi.CallOption) (*Backup, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &Backup{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "sql.Backups.GetBackup", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type BackupsListBackupsCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// ListBackups: Lists all backups associated with the project. -// -// - parent: The parent that owns this collection of backups. Format: -// projects/{project}. -func (r *BackupsService) ListBackups(parent string) *BackupsListBackupsCall { - c := &BackupsListBackupsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// Filter sets the optional parameter "filter": Multiple filter queries are -// separated by spaces. For example, 'instance:abc AND type:FINAL, -// 'location:us', 'backupInterval.startTime>=1950-01-01T01:01:25.771Z'. You can -// filter by type, instance, backupInterval.startTime (creation time), or -// location. -func (c *BackupsListBackupsCall) Filter(filter string) *BackupsListBackupsCall { - c.urlParams_.Set("filter", filter) - return c -} - -// PageSize sets the optional parameter "pageSize": The maximum number of -// backups to return per response. The service might return fewer backups than -// this value. If a value for this parameter isn't specified, then, at most, -// 500 backups are returned. The maximum value is 2,000. Any values that you -// set, which are greater than 2,000, are changed to 2,000. -func (c *BackupsListBackupsCall) PageSize(pageSize int64) *BackupsListBackupsCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": A page token, received -// from a previous `ListBackups` call. Provide this to retrieve the subsequent -// page. When paginating, all other parameters provided to `ListBackups` must -// match the call that provided the page token. -func (c *BackupsListBackupsCall) PageToken(pageToken string) *BackupsListBackupsCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *BackupsListBackupsCall) Fields(s ...googleapi.Field) *BackupsListBackupsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *BackupsListBackupsCall) IfNoneMatch(entityTag string) *BackupsListBackupsCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *BackupsListBackupsCall) Context(ctx context.Context) *BackupsListBackupsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *BackupsListBackupsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *BackupsListBackupsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/backups") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "sql.Backups.ListBackups", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "sql.Backups.ListBackups" call. -// Any non-2xx status code is an error. Response headers are in either -// *ListBackupsResponse.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified was -// returned. -func (c *BackupsListBackupsCall) Do(opts ...googleapi.CallOption) (*ListBackupsResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &ListBackupsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "sql.Backups.ListBackups", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *BackupsListBackupsCall) Pages(ctx context.Context, f func(*ListBackupsResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -type BackupsUpdateBackupCall struct { - s *Service - name string - backup *Backup - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// UpdateBackup: Updates the retention period and description of the backup. -// You can use this API to update final backups only. -// -// - name: Output only. The resource name of the backup. Format: -// projects/{project}/backups/{backup}. -func (r *BackupsService) UpdateBackup(name string, backup *Backup) *BackupsUpdateBackupCall { - c := &BackupsUpdateBackupCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.backup = backup - return c -} - -// UpdateMask sets the optional parameter "updateMask": The list of fields that -// you can update. You can update only the description and retention period of -// the final backup. -func (c *BackupsUpdateBackupCall) UpdateMask(updateMask string) *BackupsUpdateBackupCall { - c.urlParams_.Set("updateMask", updateMask) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *BackupsUpdateBackupCall) Fields(s ...googleapi.Field) *BackupsUpdateBackupCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *BackupsUpdateBackupCall) Context(ctx context.Context) *BackupsUpdateBackupCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *BackupsUpdateBackupCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *BackupsUpdateBackupCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.backup) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "sql.Backups.UpdateBackup", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "sql.Backups.UpdateBackup" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *BackupsUpdateBackupCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "sql.Backups.UpdateBackup", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type BackupRunsDeleteCall struct { - s *Service - project string - instance string - id int64 - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the backup taken by a backup run. -// -// - id: The ID of the backup run to delete. To find a backup run ID, use the -// list -// (https://cloud.google.com/sql/docs/mysql/admin-api/rest/v1/backupRuns/list) -// method. -// - instance: Cloud SQL instance ID. This does not include the project ID. -// - project: Project ID of the project that contains the instance. -func (r *BackupRunsService) Delete(project string, instance string, id int64) *BackupRunsDeleteCall { - c := &BackupRunsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.instance = instance - c.id = id - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *BackupRunsDeleteCall) Fields(s ...googleapi.Field) *BackupRunsDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *BackupRunsDeleteCall) Context(ctx context.Context) *BackupRunsDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *BackupRunsDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *BackupRunsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/instances/{instance}/backupRuns/{id}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "instance": c.instance, - "id": strconv.FormatInt(c.id, 10), - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "sql.backupRuns.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "sql.backupRuns.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *BackupRunsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "sql.backupRuns.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type BackupRunsGetCall struct { - s *Service - project string - instance string - id int64 - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Retrieves a resource containing information about a backup run. -// -// - id: The ID of this backup run. -// - instance: Cloud SQL instance ID. This does not include the project ID. -// - project: Project ID of the project that contains the instance. -func (r *BackupRunsService) Get(project string, instance string, id int64) *BackupRunsGetCall { - c := &BackupRunsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.instance = instance - c.id = id - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *BackupRunsGetCall) Fields(s ...googleapi.Field) *BackupRunsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *BackupRunsGetCall) IfNoneMatch(entityTag string) *BackupRunsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *BackupRunsGetCall) Context(ctx context.Context) *BackupRunsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *BackupRunsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *BackupRunsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/instances/{instance}/backupRuns/{id}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "instance": c.instance, - "id": strconv.FormatInt(c.id, 10), - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "sql.backupRuns.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "sql.backupRuns.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *BackupRun.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *BackupRunsGetCall) Do(opts ...googleapi.CallOption) (*BackupRun, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &BackupRun{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "sql.backupRuns.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type BackupRunsInsertCall struct { - s *Service - project string - instance string - backuprun *BackupRun - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a new backup run on demand. -// -// - instance: Cloud SQL instance ID. This does not include the project ID. -// - project: Project ID of the project that contains the instance. -func (r *BackupRunsService) Insert(project string, instance string, backuprun *BackupRun) *BackupRunsInsertCall { - c := &BackupRunsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.instance = instance - c.backuprun = backuprun - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *BackupRunsInsertCall) Fields(s ...googleapi.Field) *BackupRunsInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *BackupRunsInsertCall) Context(ctx context.Context) *BackupRunsInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *BackupRunsInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *BackupRunsInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.backuprun) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/instances/{instance}/backupRuns") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "instance": c.instance, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "sql.backupRuns.insert", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "sql.backupRuns.insert" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *BackupRunsInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "sql.backupRuns.insert", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type BackupRunsListCall struct { - s *Service - project string - instance string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Lists all backup runs associated with the project or a given instance -// and configuration in the reverse chronological order of the backup -// initiation time. -// -// - instance: Cloud SQL instance ID, or "-" for all instances. This does not -// include the project ID. -// - project: Project ID of the project that contains the instance. -func (r *BackupRunsService) List(project string, instance string) *BackupRunsListCall { - c := &BackupRunsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.instance = instance - return c -} - -// MaxResults sets the optional parameter "maxResults": Maximum number of -// backup runs per response. -func (c *BackupRunsListCall) MaxResults(maxResults int64) *BackupRunsListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// PageToken sets the optional parameter "pageToken": A previously-returned -// page token representing part of the larger set of results to view. -func (c *BackupRunsListCall) PageToken(pageToken string) *BackupRunsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *BackupRunsListCall) Fields(s ...googleapi.Field) *BackupRunsListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *BackupRunsListCall) IfNoneMatch(entityTag string) *BackupRunsListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *BackupRunsListCall) Context(ctx context.Context) *BackupRunsListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *BackupRunsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *BackupRunsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/instances/{instance}/backupRuns") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "instance": c.instance, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "sql.backupRuns.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "sql.backupRuns.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *BackupRunsListResponse.ServerResponse.Header or (if a response was returned -// at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified was -// returned. -func (c *BackupRunsListCall) Do(opts ...googleapi.CallOption) (*BackupRunsListResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &BackupRunsListResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "sql.backupRuns.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *BackupRunsListCall) Pages(ctx context.Context, f func(*BackupRunsListResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -type ConnectGenerateEphemeralCertCall struct { - s *Service - project string - instance string - generateephemeralcertrequest *GenerateEphemeralCertRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// GenerateEphemeralCert: Generates a short-lived X509 certificate containing -// the provided public key and signed by a private key specific to the target -// instance. Users may use the certificate to authenticate as themselves when -// connecting to the database. -// -// - instance: Cloud SQL instance ID. This does not include the project ID. -// - project: Project ID of the project that contains the instance. -func (r *ConnectService) GenerateEphemeralCert(project string, instance string, generateephemeralcertrequest *GenerateEphemeralCertRequest) *ConnectGenerateEphemeralCertCall { - c := &ConnectGenerateEphemeralCertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.instance = instance - c.generateephemeralcertrequest = generateephemeralcertrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ConnectGenerateEphemeralCertCall) Fields(s ...googleapi.Field) *ConnectGenerateEphemeralCertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ConnectGenerateEphemeralCertCall) Context(ctx context.Context) *ConnectGenerateEphemeralCertCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ConnectGenerateEphemeralCertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ConnectGenerateEphemeralCertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.generateephemeralcertrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/instances/{instance}:generateEphemeralCert") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "instance": c.instance, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "sql.connect.generateEphemeral", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "sql.connect.generateEphemeral" call. -// Any non-2xx status code is an error. Response headers are in either -// *GenerateEphemeralCertResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ConnectGenerateEphemeralCertCall) Do(opts ...googleapi.CallOption) (*GenerateEphemeralCertResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &GenerateEphemeralCertResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "sql.connect.generateEphemeral", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ConnectGetCall struct { - s *Service - project string - instance string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Retrieves connect settings about a Cloud SQL instance. -// -// - instance: Cloud SQL instance ID. This does not include the project ID. -// - project: Project ID of the project that contains the instance. -func (r *ConnectService) Get(project string, instance string) *ConnectGetCall { - c := &ConnectGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.instance = instance - return c -} - -// ReadTime sets the optional parameter "readTime": Optional snapshot read -// timestamp to trade freshness for performance. -func (c *ConnectGetCall) ReadTime(readTime string) *ConnectGetCall { - c.urlParams_.Set("readTime", readTime) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ConnectGetCall) Fields(s ...googleapi.Field) *ConnectGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *ConnectGetCall) IfNoneMatch(entityTag string) *ConnectGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ConnectGetCall) Context(ctx context.Context) *ConnectGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ConnectGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ConnectGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/instances/{instance}/connectSettings") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "instance": c.instance, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "sql.connect.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "sql.connect.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *ConnectSettings.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified was -// returned. -func (c *ConnectGetCall) Do(opts ...googleapi.CallOption) (*ConnectSettings, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &ConnectSettings{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "sql.connect.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type DatabasesDeleteCall struct { - s *Service - project string - instance string - database string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes a database from a Cloud SQL instance. -// -// - database: Name of the database to be deleted in the instance. -// - instance: Database instance ID. This does not include the project ID. -// - project: Project ID of the project that contains the instance. -func (r *DatabasesService) Delete(project string, instance string, database string) *DatabasesDeleteCall { - c := &DatabasesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.instance = instance - c.database = database - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *DatabasesDeleteCall) Fields(s ...googleapi.Field) *DatabasesDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *DatabasesDeleteCall) Context(ctx context.Context) *DatabasesDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *DatabasesDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *DatabasesDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/instances/{instance}/databases/{database}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "instance": c.instance, - "database": c.database, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "sql.databases.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "sql.databases.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *DatabasesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "sql.databases.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type DatabasesGetCall struct { - s *Service - project string - instance string - database string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Retrieves a resource containing information about a database inside a -// Cloud SQL instance. -// -// - database: Name of the database in the instance. -// - instance: Database instance ID. This does not include the project ID. -// - project: Project ID of the project that contains the instance. -func (r *DatabasesService) Get(project string, instance string, database string) *DatabasesGetCall { - c := &DatabasesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.instance = instance - c.database = database - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *DatabasesGetCall) Fields(s ...googleapi.Field) *DatabasesGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *DatabasesGetCall) IfNoneMatch(entityTag string) *DatabasesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *DatabasesGetCall) Context(ctx context.Context) *DatabasesGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *DatabasesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *DatabasesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/instances/{instance}/databases/{database}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "instance": c.instance, - "database": c.database, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "sql.databases.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "sql.databases.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *Database.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *DatabasesGetCall) Do(opts ...googleapi.CallOption) (*Database, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &Database{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "sql.databases.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type DatabasesInsertCall struct { - s *Service - project string - instance string - database *Database - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Inserts a resource containing information about a database inside a -// Cloud SQL instance. **Note:** You can't modify the default character set and -// collation. -// -// - instance: Database instance ID. This does not include the project ID. -// - project: Project ID of the project that contains the instance. -func (r *DatabasesService) Insert(project string, instance string, database *Database) *DatabasesInsertCall { - c := &DatabasesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.instance = instance - c.database = database - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *DatabasesInsertCall) Fields(s ...googleapi.Field) *DatabasesInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *DatabasesInsertCall) Context(ctx context.Context) *DatabasesInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *DatabasesInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *DatabasesInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.database) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/instances/{instance}/databases") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "instance": c.instance, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "sql.databases.insert", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "sql.databases.insert" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *DatabasesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "sql.databases.insert", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type DatabasesListCall struct { - s *Service - project string - instance string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Lists databases in the specified Cloud SQL instance. -// -// - instance: Cloud SQL instance ID. This does not include the project ID. -// - project: Project ID of the project that contains the instance. -func (r *DatabasesService) List(project string, instance string) *DatabasesListCall { - c := &DatabasesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.instance = instance - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *DatabasesListCall) Fields(s ...googleapi.Field) *DatabasesListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *DatabasesListCall) IfNoneMatch(entityTag string) *DatabasesListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *DatabasesListCall) Context(ctx context.Context) *DatabasesListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *DatabasesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *DatabasesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/instances/{instance}/databases") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "instance": c.instance, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "sql.databases.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "sql.databases.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *DatabasesListResponse.ServerResponse.Header or (if a response was returned -// at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified was -// returned. -func (c *DatabasesListCall) Do(opts ...googleapi.CallOption) (*DatabasesListResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &DatabasesListResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "sql.databases.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type DatabasesPatchCall struct { - s *Service - project string - instance string - database string - database2 *Database - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Partially updates a resource containing information about a database -// inside a Cloud SQL instance. This method supports patch semantics. -// -// - database: Name of the database to be updated in the instance. -// - instance: Database instance ID. This does not include the project ID. -// - project: Project ID of the project that contains the instance. -func (r *DatabasesService) Patch(project string, instance string, database string, database2 *Database) *DatabasesPatchCall { - c := &DatabasesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.instance = instance - c.database = database - c.database2 = database2 - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *DatabasesPatchCall) Fields(s ...googleapi.Field) *DatabasesPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *DatabasesPatchCall) Context(ctx context.Context) *DatabasesPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *DatabasesPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *DatabasesPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.database2) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/instances/{instance}/databases/{database}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "instance": c.instance, - "database": c.database, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "sql.databases.patch", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "sql.databases.patch" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *DatabasesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "sql.databases.patch", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type DatabasesUpdateCall struct { - s *Service - project string - instance string - database string - database2 *Database - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Update: Updates a resource containing information about a database inside a -// Cloud SQL instance. -// -// - database: Name of the database to be updated in the instance. -// - instance: Database instance ID. This does not include the project ID. -// - project: Project ID of the project that contains the instance. -func (r *DatabasesService) Update(project string, instance string, database string, database2 *Database) *DatabasesUpdateCall { - c := &DatabasesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.instance = instance - c.database = database - c.database2 = database2 - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *DatabasesUpdateCall) Fields(s ...googleapi.Field) *DatabasesUpdateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *DatabasesUpdateCall) Context(ctx context.Context) *DatabasesUpdateCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *DatabasesUpdateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *DatabasesUpdateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.database2) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/instances/{instance}/databases/{database}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PUT", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "instance": c.instance, - "database": c.database, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "sql.databases.update", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "sql.databases.update" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *DatabasesUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "sql.databases.update", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type FlagsListCall struct { - s *Service - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Lists all available database flags for Cloud SQL instances. -func (r *FlagsService) List() *FlagsListCall { - c := &FlagsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - return c -} - -// DatabaseVersion sets the optional parameter "databaseVersion": Database type -// and version you want to retrieve flags for. By default, this method returns -// flags for all database types and versions. -func (c *FlagsListCall) DatabaseVersion(databaseVersion string) *FlagsListCall { - c.urlParams_.Set("databaseVersion", databaseVersion) - return c -} - -// FlagScope sets the optional parameter "flagScope": Specify the scope of -// flags to be returned by SqlFlagsListService. Return list of database flags -// if unspecified. -// -// Possible values: -// -// "SQL_FLAG_SCOPE_UNSPECIFIED" - Assume database flags if unspecified -// "SQL_FLAG_SCOPE_DATABASE" - database flags -// "SQL_FLAG_SCOPE_CONNECTION_POOL" - connection pool configuration flags -func (c *FlagsListCall) FlagScope(flagScope string) *FlagsListCall { - c.urlParams_.Set("flagScope", flagScope) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *FlagsListCall) Fields(s ...googleapi.Field) *FlagsListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *FlagsListCall) IfNoneMatch(entityTag string) *FlagsListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *FlagsListCall) Context(ctx context.Context) *FlagsListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *FlagsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *FlagsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/flags") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "sql.flags.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "sql.flags.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *FlagsListResponse.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified was -// returned. -func (c *FlagsListCall) Do(opts ...googleapi.CallOption) (*FlagsListResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &FlagsListResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "sql.flags.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstancesListEntraIdCertificatesCall struct { - s *Service - project string - instance string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// ListEntraIdCertificates: Lists all versions of EntraID certificates for the -// specified instance. There can be up to three sets of certificates listed: -// the certificate that is currently in use, a future that has been added but -// not yet used to sign a certificate, and a certificate that has been rotated -// out. -// -// - instance: Cloud SQL instance ID. This does not include the project ID. -// - project: Project ID of the project that contains the instance. -func (r *InstancesService) ListEntraIdCertificates(project string, instance string) *InstancesListEntraIdCertificatesCall { - c := &InstancesListEntraIdCertificatesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.instance = instance - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *InstancesListEntraIdCertificatesCall) Fields(s ...googleapi.Field) *InstancesListEntraIdCertificatesCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *InstancesListEntraIdCertificatesCall) IfNoneMatch(entityTag string) *InstancesListEntraIdCertificatesCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstancesListEntraIdCertificatesCall) Context(ctx context.Context) *InstancesListEntraIdCertificatesCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstancesListEntraIdCertificatesCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesListEntraIdCertificatesCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/instances/{instance}/listEntraIdCertificates") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "instance": c.instance, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "sql.instances.ListEntraIdCertificates", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "sql.instances.ListEntraIdCertificates" call. -// Any non-2xx status code is an error. Response headers are in either -// *InstancesListEntraIdCertificatesResponse.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *InstancesListEntraIdCertificatesCall) Do(opts ...googleapi.CallOption) (*InstancesListEntraIdCertificatesResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &InstancesListEntraIdCertificatesResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "sql.instances.ListEntraIdCertificates", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstancesListServerCertificatesCall struct { - s *Service - project string - instance string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// ListServerCertificates: Lists all versions of server certificates and -// certificate authorities (CAs) for the specified instance. There can be up to -// three sets of certs listed: the certificate that is currently in use, a -// future that has been added but not yet used to sign a certificate, and a -// certificate that has been rotated out. For instances not using Certificate -// Authority Service (CAS) server CA, use ListServerCas instead. -// -// - instance: Cloud SQL instance ID. This does not include the project ID. -// - project: Project ID of the project that contains the instance. -func (r *InstancesService) ListServerCertificates(project string, instance string) *InstancesListServerCertificatesCall { - c := &InstancesListServerCertificatesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.instance = instance - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *InstancesListServerCertificatesCall) Fields(s ...googleapi.Field) *InstancesListServerCertificatesCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *InstancesListServerCertificatesCall) IfNoneMatch(entityTag string) *InstancesListServerCertificatesCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstancesListServerCertificatesCall) Context(ctx context.Context) *InstancesListServerCertificatesCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstancesListServerCertificatesCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesListServerCertificatesCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/instances/{instance}/listServerCertificates") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "instance": c.instance, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "sql.instances.ListServerCertificates", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "sql.instances.ListServerCertificates" call. -// Any non-2xx status code is an error. Response headers are in either -// *InstancesListServerCertificatesResponse.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *InstancesListServerCertificatesCall) Do(opts ...googleapi.CallOption) (*InstancesListServerCertificatesResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &InstancesListServerCertificatesResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "sql.instances.ListServerCertificates", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstancesRotateEntraIdCertificateCall struct { - s *Service - project string - instance string - instancesrotateentraidcertificaterequest *InstancesRotateEntraIdCertificateRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// RotateEntraIdCertificate: Rotates the server certificate version to one -// previously added with the addEntraIdCertificate method. -// -// - instance: Cloud SQL instance ID. This does not include the project ID. -// - project: Project ID of the project that contains the instance. -func (r *InstancesService) RotateEntraIdCertificate(project string, instance string, instancesrotateentraidcertificaterequest *InstancesRotateEntraIdCertificateRequest) *InstancesRotateEntraIdCertificateCall { - c := &InstancesRotateEntraIdCertificateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.instance = instance - c.instancesrotateentraidcertificaterequest = instancesrotateentraidcertificaterequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *InstancesRotateEntraIdCertificateCall) Fields(s ...googleapi.Field) *InstancesRotateEntraIdCertificateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstancesRotateEntraIdCertificateCall) Context(ctx context.Context) *InstancesRotateEntraIdCertificateCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstancesRotateEntraIdCertificateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesRotateEntraIdCertificateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.instancesrotateentraidcertificaterequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/instances/{instance}/rotateEntraIdCertificate") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "instance": c.instance, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "sql.instances.RotateEntraIdCertificate", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "sql.instances.RotateEntraIdCertificate" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InstancesRotateEntraIdCertificateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "sql.instances.RotateEntraIdCertificate", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstancesRotateServerCertificateCall struct { - s *Service - project string - instance string - instancesrotateservercertificaterequest *InstancesRotateServerCertificateRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// RotateServerCertificate: Rotates the server certificate version to one -// previously added with the addServerCertificate method. For instances not -// using Certificate Authority Service (CAS) server CA, use RotateServerCa -// instead. -// -// - instance: Cloud SQL instance ID. This does not include the project ID. -// - project: Project ID of the project that contains the instance. -func (r *InstancesService) RotateServerCertificate(project string, instance string, instancesrotateservercertificaterequest *InstancesRotateServerCertificateRequest) *InstancesRotateServerCertificateCall { - c := &InstancesRotateServerCertificateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.instance = instance - c.instancesrotateservercertificaterequest = instancesrotateservercertificaterequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *InstancesRotateServerCertificateCall) Fields(s ...googleapi.Field) *InstancesRotateServerCertificateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstancesRotateServerCertificateCall) Context(ctx context.Context) *InstancesRotateServerCertificateCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstancesRotateServerCertificateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesRotateServerCertificateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.instancesrotateservercertificaterequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/instances/{instance}/rotateServerCertificate") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "instance": c.instance, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "sql.instances.RotateServerCertificate", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "sql.instances.RotateServerCertificate" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InstancesRotateServerCertificateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "sql.instances.RotateServerCertificate", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstancesAcquireSsrsLeaseCall struct { - s *Service - project string - instance string - instancesacquiressrsleaserequest *InstancesAcquireSsrsLeaseRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// AcquireSsrsLease: Acquire a lease for the setup of SQL Server Reporting -// Services (SSRS). -// -// - instance: Cloud SQL instance ID. This doesn't include the project ID. It's -// composed of lowercase letters, numbers, and hyphens, and it must start -// with a letter. The total length must be 98 characters or less (Example: -// instance-id). -// - project: Project ID of the project that contains the instance (Example: -// project-id). -func (r *InstancesService) AcquireSsrsLease(project string, instance string, instancesacquiressrsleaserequest *InstancesAcquireSsrsLeaseRequest) *InstancesAcquireSsrsLeaseCall { - c := &InstancesAcquireSsrsLeaseCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.instance = instance - c.instancesacquiressrsleaserequest = instancesacquiressrsleaserequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *InstancesAcquireSsrsLeaseCall) Fields(s ...googleapi.Field) *InstancesAcquireSsrsLeaseCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstancesAcquireSsrsLeaseCall) Context(ctx context.Context) *InstancesAcquireSsrsLeaseCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstancesAcquireSsrsLeaseCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesAcquireSsrsLeaseCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.instancesacquiressrsleaserequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/instances/{instance}/acquireSsrsLease") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "instance": c.instance, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "sql.instances.acquireSsrsLease", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "sql.instances.acquireSsrsLease" call. -// Any non-2xx status code is an error. Response headers are in either -// *SqlInstancesAcquireSsrsLeaseResponse.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *InstancesAcquireSsrsLeaseCall) Do(opts ...googleapi.CallOption) (*SqlInstancesAcquireSsrsLeaseResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &SqlInstancesAcquireSsrsLeaseResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "sql.instances.acquireSsrsLease", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstancesAddEntraIdCertificateCall struct { - s *Service - project string - instance string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// AddEntraIdCertificate: Adds a new Entra ID certificate for the specified -// instance. If an Entra ID certificate was previously added but never used in -// a certificate rotation, this operation replaces that version. -// -// - instance: Cloud SQL instance ID. This does not include the project ID. -// - project: Project ID of the project that contains the instance. -func (r *InstancesService) AddEntraIdCertificate(project string, instance string) *InstancesAddEntraIdCertificateCall { - c := &InstancesAddEntraIdCertificateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.instance = instance - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *InstancesAddEntraIdCertificateCall) Fields(s ...googleapi.Field) *InstancesAddEntraIdCertificateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstancesAddEntraIdCertificateCall) Context(ctx context.Context) *InstancesAddEntraIdCertificateCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstancesAddEntraIdCertificateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesAddEntraIdCertificateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/instances/{instance}/addEntraIdCertificate") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "instance": c.instance, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "sql.instances.addEntraIdCertificate", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "sql.instances.addEntraIdCertificate" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InstancesAddEntraIdCertificateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "sql.instances.addEntraIdCertificate", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstancesAddServerCaCall struct { - s *Service - project string - instance string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// AddServerCa: Adds a new trusted Certificate Authority (CA) version for the -// specified instance. Required to prepare for a certificate rotation. If a CA -// version was previously added but never used in a certificate rotation, this -// operation replaces that version. There cannot be more than one CA version -// waiting to be rotated in. For instances that have enabled Certificate -// Authority Service (CAS) based server CA, use AddServerCertificate to add a -// new server certificate. -// -// - instance: Cloud SQL instance ID. This does not include the project ID. -// - project: Project ID of the project that contains the instance. -func (r *InstancesService) AddServerCa(project string, instance string) *InstancesAddServerCaCall { - c := &InstancesAddServerCaCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.instance = instance - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *InstancesAddServerCaCall) Fields(s ...googleapi.Field) *InstancesAddServerCaCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstancesAddServerCaCall) Context(ctx context.Context) *InstancesAddServerCaCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstancesAddServerCaCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesAddServerCaCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/instances/{instance}/addServerCa") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "instance": c.instance, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "sql.instances.addServerCa", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "sql.instances.addServerCa" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InstancesAddServerCaCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "sql.instances.addServerCa", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstancesAddServerCertificateCall struct { - s *Service - project string - instance string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// AddServerCertificate: Add a new trusted server certificate version for the -// specified instance using Certificate Authority Service (CAS) server CA. -// Required to prepare for a certificate rotation. If a server certificate -// version was previously added but never used in a certificate rotation, this -// operation replaces that version. There cannot be more than one certificate -// version waiting to be rotated in. For instances not using CAS server CA, use -// AddServerCa instead. -// -// - instance: Cloud SQL instance ID. This does not include the project ID. -// - project: Project ID of the project that contains the instance. -func (r *InstancesService) AddServerCertificate(project string, instance string) *InstancesAddServerCertificateCall { - c := &InstancesAddServerCertificateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.instance = instance - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *InstancesAddServerCertificateCall) Fields(s ...googleapi.Field) *InstancesAddServerCertificateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstancesAddServerCertificateCall) Context(ctx context.Context) *InstancesAddServerCertificateCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstancesAddServerCertificateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesAddServerCertificateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/instances/{instance}/addServerCertificate") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "instance": c.instance, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "sql.instances.addServerCertificate", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "sql.instances.addServerCertificate" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InstancesAddServerCertificateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "sql.instances.addServerCertificate", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstancesCloneCall struct { - s *Service - project string - instance string - instancesclonerequest *InstancesCloneRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Clone: Creates a Cloud SQL instance as a clone of the source instance. Using -// this operation might cause your instance to restart. -// -// - instance: The ID of the Cloud SQL instance to be cloned (source). This -// does not include the project ID. -// - project: Project ID of the source Cloud SQL instance. -func (r *InstancesService) Clone(project string, instance string, instancesclonerequest *InstancesCloneRequest) *InstancesCloneCall { - c := &InstancesCloneCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.instance = instance - c.instancesclonerequest = instancesclonerequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *InstancesCloneCall) Fields(s ...googleapi.Field) *InstancesCloneCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstancesCloneCall) Context(ctx context.Context) *InstancesCloneCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstancesCloneCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesCloneCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.instancesclonerequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/instances/{instance}/clone") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "instance": c.instance, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "sql.instances.clone", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "sql.instances.clone" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InstancesCloneCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "sql.instances.clone", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstancesDeleteCall struct { - s *Service - project string - instance string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes a Cloud SQL instance. -// -// - instance: Cloud SQL instance ID. This does not include the project ID. -// - project: Project ID of the project that contains the instance to be -// deleted. -func (r *InstancesService) Delete(project string, instance string) *InstancesDeleteCall { - c := &InstancesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.instance = instance - return c -} - -// EnableFinalBackup sets the optional parameter "enableFinalBackup": Flag to -// opt-in for final backup. By default, it is turned off. -func (c *InstancesDeleteCall) EnableFinalBackup(enableFinalBackup bool) *InstancesDeleteCall { - c.urlParams_.Set("enableFinalBackup", fmt.Sprint(enableFinalBackup)) - return c -} - -// FinalBackupDescription sets the optional parameter "finalBackupDescription": -// The description of the final backup. -func (c *InstancesDeleteCall) FinalBackupDescription(finalBackupDescription string) *InstancesDeleteCall { - c.urlParams_.Set("finalBackupDescription", finalBackupDescription) - return c -} - -// FinalBackupExpiryTime sets the optional parameter "finalBackupExpiryTime": -// Final Backup expiration time. Timestamp in UTC of when this resource is -// considered expired. -func (c *InstancesDeleteCall) FinalBackupExpiryTime(finalBackupExpiryTime string) *InstancesDeleteCall { - c.urlParams_.Set("finalBackupExpiryTime", finalBackupExpiryTime) - return c -} - -// FinalBackupTtlDays sets the optional parameter "finalBackupTtlDays": -// Retention period of the final backup. -func (c *InstancesDeleteCall) FinalBackupTtlDays(finalBackupTtlDays int64) *InstancesDeleteCall { - c.urlParams_.Set("finalBackupTtlDays", fmt.Sprint(finalBackupTtlDays)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *InstancesDeleteCall) Fields(s ...googleapi.Field) *InstancesDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstancesDeleteCall) Context(ctx context.Context) *InstancesDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstancesDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/instances/{instance}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "instance": c.instance, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "sql.instances.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "sql.instances.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InstancesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "sql.instances.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstancesDemoteCall struct { - s *Service - project string - instance string - instancesdemoterequest *InstancesDemoteRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Demote: Demotes an existing standalone instance to be a Cloud SQL read -// replica for an external database server. -// -// - instance: Cloud SQL instance name. -// - project: ID of the project that contains the instance. -func (r *InstancesService) Demote(project string, instance string, instancesdemoterequest *InstancesDemoteRequest) *InstancesDemoteCall { - c := &InstancesDemoteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.instance = instance - c.instancesdemoterequest = instancesdemoterequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *InstancesDemoteCall) Fields(s ...googleapi.Field) *InstancesDemoteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstancesDemoteCall) Context(ctx context.Context) *InstancesDemoteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstancesDemoteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesDemoteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.instancesdemoterequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/instances/{instance}/demote") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "instance": c.instance, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "sql.instances.demote", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "sql.instances.demote" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InstancesDemoteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "sql.instances.demote", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstancesDemoteMasterCall struct { - s *Service - project string - instance string - instancesdemotemasterrequest *InstancesDemoteMasterRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// DemoteMaster: Demotes the stand-alone instance to be a Cloud SQL read -// replica for an external database server. -// -// - instance: Cloud SQL instance name. -// - project: ID of the project that contains the instance. -func (r *InstancesService) DemoteMaster(project string, instance string, instancesdemotemasterrequest *InstancesDemoteMasterRequest) *InstancesDemoteMasterCall { - c := &InstancesDemoteMasterCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.instance = instance - c.instancesdemotemasterrequest = instancesdemotemasterrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *InstancesDemoteMasterCall) Fields(s ...googleapi.Field) *InstancesDemoteMasterCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstancesDemoteMasterCall) Context(ctx context.Context) *InstancesDemoteMasterCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstancesDemoteMasterCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesDemoteMasterCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.instancesdemotemasterrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/instances/{instance}/demoteMaster") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "instance": c.instance, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "sql.instances.demoteMaster", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "sql.instances.demoteMaster" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InstancesDemoteMasterCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "sql.instances.demoteMaster", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstancesExecuteSqlCall struct { - s *Service - project string - instance string - executesqlpayload *ExecuteSqlPayload - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// ExecuteSql: Execute SQL statements. -// -// - instance: Database instance ID. This does not include the project ID. -// - project: Project ID of the project that contains the instance. -func (r *InstancesService) ExecuteSql(project string, instance string, executesqlpayload *ExecuteSqlPayload) *InstancesExecuteSqlCall { - c := &InstancesExecuteSqlCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.instance = instance - c.executesqlpayload = executesqlpayload - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *InstancesExecuteSqlCall) Fields(s ...googleapi.Field) *InstancesExecuteSqlCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstancesExecuteSqlCall) Context(ctx context.Context) *InstancesExecuteSqlCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstancesExecuteSqlCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesExecuteSqlCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.executesqlpayload) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/instances/{instance}/executeSql") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "instance": c.instance, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "sql.instances.executeSql", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "sql.instances.executeSql" call. -// Any non-2xx status code is an error. Response headers are in either -// *SqlInstancesExecuteSqlResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *InstancesExecuteSqlCall) Do(opts ...googleapi.CallOption) (*SqlInstancesExecuteSqlResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &SqlInstancesExecuteSqlResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "sql.instances.executeSql", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstancesExportCall struct { - s *Service - project string - instance string - instancesexportrequest *InstancesExportRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Export: Exports data from a Cloud SQL instance to a Cloud Storage bucket as -// a SQL dump or CSV file. -// -// - instance: Cloud SQL instance ID. This does not include the project ID. -// - project: Project ID of the project that contains the instance to be -// exported. -func (r *InstancesService) Export(project string, instance string, instancesexportrequest *InstancesExportRequest) *InstancesExportCall { - c := &InstancesExportCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.instance = instance - c.instancesexportrequest = instancesexportrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *InstancesExportCall) Fields(s ...googleapi.Field) *InstancesExportCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstancesExportCall) Context(ctx context.Context) *InstancesExportCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstancesExportCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesExportCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.instancesexportrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/instances/{instance}/export") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "instance": c.instance, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "sql.instances.export", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "sql.instances.export" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InstancesExportCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "sql.instances.export", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstancesFailoverCall struct { - s *Service - project string - instance string - instancesfailoverrequest *InstancesFailoverRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Failover: Initiates a manual failover of a high availability (HA) primary -// instance to a standby instance, which becomes the primary instance. Users -// are then rerouted to the new primary. For more information, see the Overview -// of high availability -// (https://cloud.google.com/sql/docs/mysql/high-availability) page in the -// Cloud SQL documentation. If using Legacy HA (MySQL only), this causes the -// instance to failover to its failover replica instance. -// -// - instance: Cloud SQL instance ID. This does not include the project ID. -// - project: ID of the project that contains the read replica. -func (r *InstancesService) Failover(project string, instance string, instancesfailoverrequest *InstancesFailoverRequest) *InstancesFailoverCall { - c := &InstancesFailoverCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.instance = instance - c.instancesfailoverrequest = instancesfailoverrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *InstancesFailoverCall) Fields(s ...googleapi.Field) *InstancesFailoverCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstancesFailoverCall) Context(ctx context.Context) *InstancesFailoverCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstancesFailoverCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesFailoverCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.instancesfailoverrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/instances/{instance}/failover") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "instance": c.instance, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "sql.instances.failover", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "sql.instances.failover" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InstancesFailoverCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "sql.instances.failover", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstancesGetCall struct { - s *Service - project string - instance string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Retrieves a resource containing information about a Cloud SQL instance. -// -// - instance: Database instance ID. This does not include the project ID. -// - project: Project ID of the project that contains the instance. -func (r *InstancesService) Get(project string, instance string) *InstancesGetCall { - c := &InstancesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.instance = instance - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *InstancesGetCall) Fields(s ...googleapi.Field) *InstancesGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *InstancesGetCall) IfNoneMatch(entityTag string) *InstancesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstancesGetCall) Context(ctx context.Context) *InstancesGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstancesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/instances/{instance}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "instance": c.instance, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "sql.instances.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "sql.instances.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *DatabaseInstance.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified was -// returned. -func (c *InstancesGetCall) Do(opts ...googleapi.CallOption) (*DatabaseInstance, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &DatabaseInstance{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "sql.instances.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstancesImportCall struct { - s *Service - project string - instance string - instancesimportrequest *InstancesImportRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Import: Imports data into a Cloud SQL instance from a SQL dump or CSV file -// in Cloud Storage. -// -// - instance: Cloud SQL instance ID. This does not include the project ID. -// - project: Project ID of the project that contains the instance. -func (r *InstancesService) Import(project string, instance string, instancesimportrequest *InstancesImportRequest) *InstancesImportCall { - c := &InstancesImportCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.instance = instance - c.instancesimportrequest = instancesimportrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *InstancesImportCall) Fields(s ...googleapi.Field) *InstancesImportCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstancesImportCall) Context(ctx context.Context) *InstancesImportCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstancesImportCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesImportCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.instancesimportrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/instances/{instance}/import") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "instance": c.instance, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "sql.instances.import", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "sql.instances.import" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InstancesImportCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "sql.instances.import", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstancesInsertCall struct { - s *Service - project string - databaseinstance *DatabaseInstance - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a new Cloud SQL instance. -// -// - project: Project ID of the project to which the newly created Cloud SQL -// instances should belong. -func (r *InstancesService) Insert(project string, databaseinstance *DatabaseInstance) *InstancesInsertCall { - c := &InstancesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.databaseinstance = databaseinstance - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *InstancesInsertCall) Fields(s ...googleapi.Field) *InstancesInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstancesInsertCall) Context(ctx context.Context) *InstancesInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstancesInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.databaseinstance) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/instances") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "sql.instances.insert", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "sql.instances.insert" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InstancesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "sql.instances.insert", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstancesListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Lists instances under a given project. -// -// - project: Project ID of the project for which to list Cloud SQL instances. -func (r *InstancesService) List(project string) *InstancesListCall { - c := &InstancesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. The expression is in the form of -// field:value. For example, 'instanceType:CLOUD_SQL_INSTANCE'. Fields can be -// nested as needed as per their JSON representation, such as -// 'settings.userLabels.auto_start:true'. Multiple filter queries are -// space-separated. For example. 'state:RUNNABLE -// instanceType:CLOUD_SQL_INSTANCE'. By default, each expression is an AND -// expression. However, you can include AND and OR expressions explicitly. -func (c *InstancesListCall) Filter(filter string) *InstancesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// instances to return. The service may return fewer than this value. If -// unspecified, at most 500 instances are returned. The maximum value is 1000; -// values above 1000 are coerced to 1000. -func (c *InstancesListCall) MaxResults(maxResults int64) *InstancesListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// PageToken sets the optional parameter "pageToken": A previously-returned -// page token representing part of the larger set of results to view. -func (c *InstancesListCall) PageToken(pageToken string) *InstancesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *InstancesListCall) Fields(s ...googleapi.Field) *InstancesListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *InstancesListCall) IfNoneMatch(entityTag string) *InstancesListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstancesListCall) Context(ctx context.Context) *InstancesListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstancesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/instances") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "sql.instances.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "sql.instances.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *InstancesListResponse.ServerResponse.Header or (if a response was returned -// at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified was -// returned. -func (c *InstancesListCall) Do(opts ...googleapi.CallOption) (*InstancesListResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &InstancesListResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "sql.instances.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *InstancesListCall) Pages(ctx context.Context, f func(*InstancesListResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -type InstancesListServerCasCall struct { - s *Service - project string - instance string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// ListServerCas: Lists all of the trusted Certificate Authorities (CAs) for -// the specified instance. There can be up to three CAs listed: the CA that was -// used to sign the certificate that is currently in use, a CA that has been -// added but not yet used to sign a certificate, and a CA used to sign a -// certificate that has previously rotated out. -// -// - instance: Cloud SQL instance ID. This does not include the project ID. -// - project: Project ID of the project that contains the instance. -func (r *InstancesService) ListServerCas(project string, instance string) *InstancesListServerCasCall { - c := &InstancesListServerCasCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.instance = instance - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *InstancesListServerCasCall) Fields(s ...googleapi.Field) *InstancesListServerCasCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *InstancesListServerCasCall) IfNoneMatch(entityTag string) *InstancesListServerCasCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstancesListServerCasCall) Context(ctx context.Context) *InstancesListServerCasCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstancesListServerCasCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesListServerCasCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/instances/{instance}/listServerCas") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "instance": c.instance, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "sql.instances.listServerCas", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "sql.instances.listServerCas" call. -// Any non-2xx status code is an error. Response headers are in either -// *InstancesListServerCasResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *InstancesListServerCasCall) Do(opts ...googleapi.CallOption) (*InstancesListServerCasResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &InstancesListServerCasResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "sql.instances.listServerCas", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstancesPatchCall struct { - s *Service - project string - instance string - databaseinstance *DatabaseInstance - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Partially updates settings of a Cloud SQL instance by merging the -// request with the current configuration. This method supports patch -// semantics. -// -// - instance: Cloud SQL instance ID. This does not include the project ID. -// - project: Project ID of the project that contains the instance. -func (r *InstancesService) Patch(project string, instance string, databaseinstance *DatabaseInstance) *InstancesPatchCall { - c := &InstancesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.instance = instance - c.databaseinstance = databaseinstance - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *InstancesPatchCall) Fields(s ...googleapi.Field) *InstancesPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstancesPatchCall) Context(ctx context.Context) *InstancesPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstancesPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.databaseinstance) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/instances/{instance}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "instance": c.instance, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "sql.instances.patch", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "sql.instances.patch" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InstancesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "sql.instances.patch", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstancesPointInTimeRestoreCall struct { - s *Service - parent string - pointintimerestorecontext *PointInTimeRestoreContext - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// PointInTimeRestore: Point in time restore for an instance managed by Google -// Cloud Backup and Disaster Recovery. -// -// - parent: The parent resource where you created this instance. Format: -// projects/{project}. -func (r *InstancesService) PointInTimeRestore(parent string, pointintimerestorecontext *PointInTimeRestoreContext) *InstancesPointInTimeRestoreCall { - c := &InstancesPointInTimeRestoreCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.pointintimerestorecontext = pointintimerestorecontext - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *InstancesPointInTimeRestoreCall) Fields(s ...googleapi.Field) *InstancesPointInTimeRestoreCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstancesPointInTimeRestoreCall) Context(ctx context.Context) *InstancesPointInTimeRestoreCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstancesPointInTimeRestoreCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesPointInTimeRestoreCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.pointintimerestorecontext) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}:pointInTimeRestore") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "sql.instances.pointInTimeRestore", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "sql.instances.pointInTimeRestore" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InstancesPointInTimeRestoreCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "sql.instances.pointInTimeRestore", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstancesPreCheckMajorVersionUpgradeCall struct { - s *Service - project string - instance string - instancesprecheckmajorversionupgraderequest *InstancesPreCheckMajorVersionUpgradeRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// PreCheckMajorVersionUpgrade: Execute MVU Pre-checks -// -// - instance: Cloud SQL instance ID. This does not include the project ID. -// - project: Project ID of the project that contains the instance. -func (r *InstancesService) PreCheckMajorVersionUpgrade(project string, instance string, instancesprecheckmajorversionupgraderequest *InstancesPreCheckMajorVersionUpgradeRequest) *InstancesPreCheckMajorVersionUpgradeCall { - c := &InstancesPreCheckMajorVersionUpgradeCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.instance = instance - c.instancesprecheckmajorversionupgraderequest = instancesprecheckmajorversionupgraderequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *InstancesPreCheckMajorVersionUpgradeCall) Fields(s ...googleapi.Field) *InstancesPreCheckMajorVersionUpgradeCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstancesPreCheckMajorVersionUpgradeCall) Context(ctx context.Context) *InstancesPreCheckMajorVersionUpgradeCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstancesPreCheckMajorVersionUpgradeCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesPreCheckMajorVersionUpgradeCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.instancesprecheckmajorversionupgraderequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/instances/{instance}/preCheckMajorVersionUpgrade") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "instance": c.instance, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "sql.instances.preCheckMajorVersionUpgrade", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "sql.instances.preCheckMajorVersionUpgrade" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InstancesPreCheckMajorVersionUpgradeCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "sql.instances.preCheckMajorVersionUpgrade", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstancesPromoteReplicaCall struct { - s *Service - project string - instance string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// PromoteReplica: Promotes the read replica instance to be an independent -// Cloud SQL primary instance. Using this operation might cause your instance -// to restart. -// -// - instance: Cloud SQL read replica instance name. -// - project: ID of the project that contains the read replica. -func (r *InstancesService) PromoteReplica(project string, instance string) *InstancesPromoteReplicaCall { - c := &InstancesPromoteReplicaCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.instance = instance - return c -} - -// Failover sets the optional parameter "failover": Set to true to invoke a -// replica failover to the DR replica. As part of replica failover, the promote -// operation attempts to add the original primary instance as a replica of the -// promoted DR replica when the original primary instance comes back online. If -// set to false or not specified, then the original primary instance becomes an -// independent Cloud SQL primary instance. -func (c *InstancesPromoteReplicaCall) Failover(failover bool) *InstancesPromoteReplicaCall { - c.urlParams_.Set("failover", fmt.Sprint(failover)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *InstancesPromoteReplicaCall) Fields(s ...googleapi.Field) *InstancesPromoteReplicaCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstancesPromoteReplicaCall) Context(ctx context.Context) *InstancesPromoteReplicaCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstancesPromoteReplicaCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesPromoteReplicaCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/instances/{instance}/promoteReplica") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "instance": c.instance, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "sql.instances.promoteReplica", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "sql.instances.promoteReplica" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InstancesPromoteReplicaCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "sql.instances.promoteReplica", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstancesReencryptCall struct { - s *Service - project string - instance string - instancesreencryptrequest *InstancesReencryptRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Reencrypt: Reencrypt CMEK instance with latest key version. -// -// - instance: Cloud SQL instance ID. This does not include the project ID. -// - project: ID of the project that contains the instance. -func (r *InstancesService) Reencrypt(project string, instance string, instancesreencryptrequest *InstancesReencryptRequest) *InstancesReencryptCall { - c := &InstancesReencryptCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.instance = instance - c.instancesreencryptrequest = instancesreencryptrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *InstancesReencryptCall) Fields(s ...googleapi.Field) *InstancesReencryptCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstancesReencryptCall) Context(ctx context.Context) *InstancesReencryptCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstancesReencryptCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesReencryptCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.instancesreencryptrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/instances/{instance}/reencrypt") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "instance": c.instance, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "sql.instances.reencrypt", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "sql.instances.reencrypt" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InstancesReencryptCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "sql.instances.reencrypt", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstancesReleaseSsrsLeaseCall struct { - s *Service - project string - instance string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// ReleaseSsrsLease: Release a lease for the setup of SQL Server Reporting -// Services (SSRS). -// -// - instance: The Cloud SQL instance ID. This doesn't include the project ID. -// The instance ID contains lowercase letters, numbers, and hyphens, and it -// must start with a letter. This ID can have a maximum length of 98 -// characters. -// - project: The project ID that contains the instance. -func (r *InstancesService) ReleaseSsrsLease(project string, instance string) *InstancesReleaseSsrsLeaseCall { - c := &InstancesReleaseSsrsLeaseCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.instance = instance - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *InstancesReleaseSsrsLeaseCall) Fields(s ...googleapi.Field) *InstancesReleaseSsrsLeaseCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstancesReleaseSsrsLeaseCall) Context(ctx context.Context) *InstancesReleaseSsrsLeaseCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstancesReleaseSsrsLeaseCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesReleaseSsrsLeaseCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/instances/{instance}/releaseSsrsLease") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "instance": c.instance, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "sql.instances.releaseSsrsLease", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "sql.instances.releaseSsrsLease" call. -// Any non-2xx status code is an error. Response headers are in either -// *SqlInstancesReleaseSsrsLeaseResponse.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *InstancesReleaseSsrsLeaseCall) Do(opts ...googleapi.CallOption) (*SqlInstancesReleaseSsrsLeaseResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &SqlInstancesReleaseSsrsLeaseResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "sql.instances.releaseSsrsLease", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstancesResetSslConfigCall struct { - s *Service - project string - instance string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// ResetSslConfig: Deletes all client certificates and generates a new server -// SSL certificate for the instance. -// -// - instance: Cloud SQL instance ID. This does not include the project ID. -// - project: Project ID of the project that contains the instance. -func (r *InstancesService) ResetSslConfig(project string, instance string) *InstancesResetSslConfigCall { - c := &InstancesResetSslConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.instance = instance - return c -} - -// Mode sets the optional parameter "mode": Reset SSL mode to use. -// -// Possible values: -// -// "RESET_SSL_MODE_UNSPECIFIED" - Reset SSL mode is not specified. -// "ALL" - Refresh all TLS configs. This is the default behaviour. -// "SYNC_FROM_PRIMARY" - Refreshes the replication-related TLS configuration -// -// settings provided by the primary instance. Not applicable to on-premises -// replication instances. -func (c *InstancesResetSslConfigCall) Mode(mode string) *InstancesResetSslConfigCall { - c.urlParams_.Set("mode", mode) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *InstancesResetSslConfigCall) Fields(s ...googleapi.Field) *InstancesResetSslConfigCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstancesResetSslConfigCall) Context(ctx context.Context) *InstancesResetSslConfigCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstancesResetSslConfigCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesResetSslConfigCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/instances/{instance}/resetSslConfig") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "instance": c.instance, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "sql.instances.resetSslConfig", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "sql.instances.resetSslConfig" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InstancesResetSslConfigCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "sql.instances.resetSslConfig", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstancesRestartCall struct { - s *Service - project string - instance string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Restart: Restarts a Cloud SQL instance. -// -// - instance: Cloud SQL instance ID. This does not include the project ID. -// - project: Project ID of the project that contains the instance to be -// restarted. -func (r *InstancesService) Restart(project string, instance string) *InstancesRestartCall { - c := &InstancesRestartCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.instance = instance - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *InstancesRestartCall) Fields(s ...googleapi.Field) *InstancesRestartCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstancesRestartCall) Context(ctx context.Context) *InstancesRestartCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstancesRestartCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesRestartCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/instances/{instance}/restart") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "instance": c.instance, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "sql.instances.restart", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "sql.instances.restart" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InstancesRestartCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "sql.instances.restart", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstancesRestoreBackupCall struct { - s *Service - project string - instance string - instancesrestorebackuprequest *InstancesRestoreBackupRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// RestoreBackup: Restores a backup of a Cloud SQL instance. Using this -// operation might cause your instance to restart. -// -// - instance: Cloud SQL instance ID. This does not include the project ID. -// - project: Project ID of the project that contains the instance. -func (r *InstancesService) RestoreBackup(project string, instance string, instancesrestorebackuprequest *InstancesRestoreBackupRequest) *InstancesRestoreBackupCall { - c := &InstancesRestoreBackupCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.instance = instance - c.instancesrestorebackuprequest = instancesrestorebackuprequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *InstancesRestoreBackupCall) Fields(s ...googleapi.Field) *InstancesRestoreBackupCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstancesRestoreBackupCall) Context(ctx context.Context) *InstancesRestoreBackupCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstancesRestoreBackupCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesRestoreBackupCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.instancesrestorebackuprequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/instances/{instance}/restoreBackup") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "instance": c.instance, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "sql.instances.restoreBackup", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "sql.instances.restoreBackup" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InstancesRestoreBackupCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "sql.instances.restoreBackup", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstancesRotateServerCaCall struct { - s *Service - project string - instance string - instancesrotateservercarequest *InstancesRotateServerCaRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// RotateServerCa: Rotates the server certificate to one signed by the -// Certificate Authority (CA) version previously added with the addServerCA -// method. For instances that have enabled Certificate Authority Service (CAS) -// based server CA, use RotateServerCertificate to rotate the server -// certificate. -// -// - instance: Cloud SQL instance ID. This does not include the project ID. -// - project: Project ID of the project that contains the instance. -func (r *InstancesService) RotateServerCa(project string, instance string, instancesrotateservercarequest *InstancesRotateServerCaRequest) *InstancesRotateServerCaCall { - c := &InstancesRotateServerCaCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.instance = instance - c.instancesrotateservercarequest = instancesrotateservercarequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *InstancesRotateServerCaCall) Fields(s ...googleapi.Field) *InstancesRotateServerCaCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstancesRotateServerCaCall) Context(ctx context.Context) *InstancesRotateServerCaCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstancesRotateServerCaCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesRotateServerCaCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.instancesrotateservercarequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/instances/{instance}/rotateServerCa") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "instance": c.instance, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "sql.instances.rotateServerCa", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "sql.instances.rotateServerCa" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InstancesRotateServerCaCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "sql.instances.rotateServerCa", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstancesStartReplicaCall struct { - s *Service - project string - instance string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// StartReplica: Starts the replication in the read replica instance. -// -// - instance: Cloud SQL read replica instance name. -// - project: ID of the project that contains the read replica. -func (r *InstancesService) StartReplica(project string, instance string) *InstancesStartReplicaCall { - c := &InstancesStartReplicaCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.instance = instance - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *InstancesStartReplicaCall) Fields(s ...googleapi.Field) *InstancesStartReplicaCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstancesStartReplicaCall) Context(ctx context.Context) *InstancesStartReplicaCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstancesStartReplicaCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesStartReplicaCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/instances/{instance}/startReplica") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "instance": c.instance, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "sql.instances.startReplica", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "sql.instances.startReplica" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InstancesStartReplicaCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "sql.instances.startReplica", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstancesStopReplicaCall struct { - s *Service - project string - instance string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// StopReplica: Stops the replication in the read replica instance. -// -// - instance: Cloud SQL read replica instance name. -// - project: ID of the project that contains the read replica. -func (r *InstancesService) StopReplica(project string, instance string) *InstancesStopReplicaCall { - c := &InstancesStopReplicaCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.instance = instance - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *InstancesStopReplicaCall) Fields(s ...googleapi.Field) *InstancesStopReplicaCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstancesStopReplicaCall) Context(ctx context.Context) *InstancesStopReplicaCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstancesStopReplicaCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesStopReplicaCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/instances/{instance}/stopReplica") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "instance": c.instance, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "sql.instances.stopReplica", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "sql.instances.stopReplica" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InstancesStopReplicaCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "sql.instances.stopReplica", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstancesSwitchoverCall struct { - s *Service - project string - instance string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Switchover: Switches over from the primary instance to the DR replica -// instance. -// -// - instance: Cloud SQL read replica instance name. -// - project: ID of the project that contains the replica. -func (r *InstancesService) Switchover(project string, instance string) *InstancesSwitchoverCall { - c := &InstancesSwitchoverCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.instance = instance - return c -} - -// DbTimeout sets the optional parameter "dbTimeout": (MySQL and PostgreSQL -// only) Cloud SQL instance operations timeout, which is a sum of all database -// operations. Default value is 10 minutes and can be modified to a maximum -// value of 24 hours. -func (c *InstancesSwitchoverCall) DbTimeout(dbTimeout string) *InstancesSwitchoverCall { - c.urlParams_.Set("dbTimeout", dbTimeout) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *InstancesSwitchoverCall) Fields(s ...googleapi.Field) *InstancesSwitchoverCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstancesSwitchoverCall) Context(ctx context.Context) *InstancesSwitchoverCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstancesSwitchoverCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesSwitchoverCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/instances/{instance}/switchover") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "instance": c.instance, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "sql.instances.switchover", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "sql.instances.switchover" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InstancesSwitchoverCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "sql.instances.switchover", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstancesTruncateLogCall struct { - s *Service - project string - instance string - instancestruncatelogrequest *InstancesTruncateLogRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TruncateLog: Truncate MySQL general and slow query log tables MySQL only. -// -// - instance: Cloud SQL instance ID. This does not include the project ID. -// - project: Project ID of the Cloud SQL project. -func (r *InstancesService) TruncateLog(project string, instance string, instancestruncatelogrequest *InstancesTruncateLogRequest) *InstancesTruncateLogCall { - c := &InstancesTruncateLogCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.instance = instance - c.instancestruncatelogrequest = instancestruncatelogrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *InstancesTruncateLogCall) Fields(s ...googleapi.Field) *InstancesTruncateLogCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstancesTruncateLogCall) Context(ctx context.Context) *InstancesTruncateLogCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstancesTruncateLogCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesTruncateLogCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.instancestruncatelogrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/instances/{instance}/truncateLog") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "instance": c.instance, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "sql.instances.truncateLog", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "sql.instances.truncateLog" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InstancesTruncateLogCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "sql.instances.truncateLog", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstancesUpdateCall struct { - s *Service - project string - instance string - databaseinstance *DatabaseInstance - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Update: Updates settings of a Cloud SQL instance. Using this operation might -// cause your instance to restart. -// -// - instance: Cloud SQL instance ID. This does not include the project ID. -// - project: Project ID of the project that contains the instance. -func (r *InstancesService) Update(project string, instance string, databaseinstance *DatabaseInstance) *InstancesUpdateCall { - c := &InstancesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.instance = instance - c.databaseinstance = databaseinstance - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *InstancesUpdateCall) Fields(s ...googleapi.Field) *InstancesUpdateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstancesUpdateCall) Context(ctx context.Context) *InstancesUpdateCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstancesUpdateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesUpdateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.databaseinstance) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/instances/{instance}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PUT", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "instance": c.instance, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "sql.instances.update", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "sql.instances.update" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InstancesUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "sql.instances.update", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type OperationsCancelCall struct { - s *Service - project string - operation string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Cancel: Cancels an instance operation that has been performed on an -// instance. -// -// - operation: Instance operation ID. -// - project: Project ID of the project that contains the instance. -func (r *OperationsService) Cancel(project string, operation string) *OperationsCancelCall { - c := &OperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.operation = operation - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *OperationsCancelCall) Fields(s ...googleapi.Field) *OperationsCancelCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *OperationsCancelCall) Context(ctx context.Context) *OperationsCancelCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *OperationsCancelCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *OperationsCancelCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/operations/{operation}/cancel") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "operation": c.operation, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "sql.operations.cancel", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "sql.operations.cancel" call. -// Any non-2xx status code is an error. Response headers are in either -// *Empty.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *OperationsCancelCall) Do(opts ...googleapi.CallOption) (*Empty, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &Empty{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "sql.operations.cancel", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type OperationsGetCall struct { - s *Service - project string - operation string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Retrieves an instance operation that has been performed on an instance. -// -// - operation: Instance operation ID. -// - project: Project ID of the project that contains the instance. -func (r *OperationsService) Get(project string, operation string) *OperationsGetCall { - c := &OperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.operation = operation - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *OperationsGetCall) Fields(s ...googleapi.Field) *OperationsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *OperationsGetCall) IfNoneMatch(entityTag string) *OperationsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *OperationsGetCall) Context(ctx context.Context) *OperationsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *OperationsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *OperationsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/operations/{operation}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "operation": c.operation, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "sql.operations.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "sql.operations.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *OperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "sql.operations.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type OperationsListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Lists all instance operations that have been performed on the given -// Cloud SQL instance in the reverse chronological order of the start time. -// -// - project: Project ID of the project that contains the instance. -func (r *OperationsService) List(project string) *OperationsListCall { - c := &OperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Instance sets the optional parameter "instance": Cloud SQL instance ID. This -// does not include the project ID. -func (c *OperationsListCall) Instance(instance string) *OperationsListCall { - c.urlParams_.Set("instance", instance) - return c -} - -// MaxResults sets the optional parameter "maxResults": Maximum number of -// operations per response. -func (c *OperationsListCall) MaxResults(maxResults int64) *OperationsListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// PageToken sets the optional parameter "pageToken": A previously-returned -// page token representing part of the larger set of results to view. -func (c *OperationsListCall) PageToken(pageToken string) *OperationsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *OperationsListCall) Fields(s ...googleapi.Field) *OperationsListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *OperationsListCall) IfNoneMatch(entityTag string) *OperationsListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *OperationsListCall) Context(ctx context.Context) *OperationsListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *OperationsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *OperationsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/operations") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "sql.operations.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "sql.operations.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *OperationsListResponse.ServerResponse.Header or (if a response was returned -// at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified was -// returned. -func (c *OperationsListCall) Do(opts ...googleapi.CallOption) (*OperationsListResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &OperationsListResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "sql.operations.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *OperationsListCall) Pages(ctx context.Context, f func(*OperationsListResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -type ProjectsInstancesGetDiskShrinkConfigCall struct { - s *Service - project string - instance string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// GetDiskShrinkConfig: Get Disk Shrink Config for a given instance. -// -// - instance: Cloud SQL instance ID. This does not include the project ID. -// - project: Project ID of the project that contains the instance. -func (r *ProjectsInstancesService) GetDiskShrinkConfig(project string, instance string) *ProjectsInstancesGetDiskShrinkConfigCall { - c := &ProjectsInstancesGetDiskShrinkConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.instance = instance - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsInstancesGetDiskShrinkConfigCall) Fields(s ...googleapi.Field) *ProjectsInstancesGetDiskShrinkConfigCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *ProjectsInstancesGetDiskShrinkConfigCall) IfNoneMatch(entityTag string) *ProjectsInstancesGetDiskShrinkConfigCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsInstancesGetDiskShrinkConfigCall) Context(ctx context.Context) *ProjectsInstancesGetDiskShrinkConfigCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsInstancesGetDiskShrinkConfigCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsInstancesGetDiskShrinkConfigCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/instances/{instance}/getDiskShrinkConfig") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "instance": c.instance, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "sql.projects.instances.getDiskShrinkConfig", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "sql.projects.instances.getDiskShrinkConfig" call. -// Any non-2xx status code is an error. Response headers are in either -// *SqlInstancesGetDiskShrinkConfigResponse.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsInstancesGetDiskShrinkConfigCall) Do(opts ...googleapi.CallOption) (*SqlInstancesGetDiskShrinkConfigResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &SqlInstancesGetDiskShrinkConfigResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "sql.projects.instances.getDiskShrinkConfig", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsInstancesGetLatestRecoveryTimeCall struct { - s *Service - project string - instance string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// GetLatestRecoveryTime: Get Latest Recovery Time for a given instance. -// -// - instance: Cloud SQL instance ID. This does not include the project ID. -// - project: Project ID of the project that contains the instance. -func (r *ProjectsInstancesService) GetLatestRecoveryTime(project string, instance string) *ProjectsInstancesGetLatestRecoveryTimeCall { - c := &ProjectsInstancesGetLatestRecoveryTimeCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.instance = instance - return c -} - -// SourceInstanceDeletionTime sets the optional parameter -// "sourceInstanceDeletionTime": The timestamp used to identify the time when -// the source instance is deleted. If this instance is deleted, then you must -// set the timestamp. -func (c *ProjectsInstancesGetLatestRecoveryTimeCall) SourceInstanceDeletionTime(sourceInstanceDeletionTime string) *ProjectsInstancesGetLatestRecoveryTimeCall { - c.urlParams_.Set("sourceInstanceDeletionTime", sourceInstanceDeletionTime) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsInstancesGetLatestRecoveryTimeCall) Fields(s ...googleapi.Field) *ProjectsInstancesGetLatestRecoveryTimeCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *ProjectsInstancesGetLatestRecoveryTimeCall) IfNoneMatch(entityTag string) *ProjectsInstancesGetLatestRecoveryTimeCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsInstancesGetLatestRecoveryTimeCall) Context(ctx context.Context) *ProjectsInstancesGetLatestRecoveryTimeCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsInstancesGetLatestRecoveryTimeCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsInstancesGetLatestRecoveryTimeCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/instances/{instance}/getLatestRecoveryTime") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "instance": c.instance, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "sql.projects.instances.getLatestRecoveryTime", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "sql.projects.instances.getLatestRecoveryTime" call. -// Any non-2xx status code is an error. Response headers are in either -// *SqlInstancesGetLatestRecoveryTimeResponse.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsInstancesGetLatestRecoveryTimeCall) Do(opts ...googleapi.CallOption) (*SqlInstancesGetLatestRecoveryTimeResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &SqlInstancesGetLatestRecoveryTimeResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "sql.projects.instances.getLatestRecoveryTime", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsInstancesPerformDiskShrinkCall struct { - s *Service - project string - instance string - performdiskshrinkcontext *PerformDiskShrinkContext - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// PerformDiskShrink: Perform Disk Shrink on primary instance. -// -// - instance: Cloud SQL instance ID. This does not include the project ID. -// - project: Project ID of the project that contains the instance. -func (r *ProjectsInstancesService) PerformDiskShrink(project string, instance string, performdiskshrinkcontext *PerformDiskShrinkContext) *ProjectsInstancesPerformDiskShrinkCall { - c := &ProjectsInstancesPerformDiskShrinkCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.instance = instance - c.performdiskshrinkcontext = performdiskshrinkcontext - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsInstancesPerformDiskShrinkCall) Fields(s ...googleapi.Field) *ProjectsInstancesPerformDiskShrinkCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsInstancesPerformDiskShrinkCall) Context(ctx context.Context) *ProjectsInstancesPerformDiskShrinkCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsInstancesPerformDiskShrinkCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsInstancesPerformDiskShrinkCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.performdiskshrinkcontext) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/instances/{instance}/performDiskShrink") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "instance": c.instance, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "sql.projects.instances.performDiskShrink", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "sql.projects.instances.performDiskShrink" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsInstancesPerformDiskShrinkCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "sql.projects.instances.performDiskShrink", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsInstancesRescheduleMaintenanceCall struct { - s *Service - project string - instance string - sqlinstancesreschedulemaintenancerequestbody *SqlInstancesRescheduleMaintenanceRequestBody - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// RescheduleMaintenance: Reschedules the maintenance on the given instance. -// -// - instance: Cloud SQL instance ID. This does not include the project ID. -// - project: ID of the project that contains the instance. -func (r *ProjectsInstancesService) RescheduleMaintenance(project string, instance string, sqlinstancesreschedulemaintenancerequestbody *SqlInstancesRescheduleMaintenanceRequestBody) *ProjectsInstancesRescheduleMaintenanceCall { - c := &ProjectsInstancesRescheduleMaintenanceCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.instance = instance - c.sqlinstancesreschedulemaintenancerequestbody = sqlinstancesreschedulemaintenancerequestbody - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsInstancesRescheduleMaintenanceCall) Fields(s ...googleapi.Field) *ProjectsInstancesRescheduleMaintenanceCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsInstancesRescheduleMaintenanceCall) Context(ctx context.Context) *ProjectsInstancesRescheduleMaintenanceCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsInstancesRescheduleMaintenanceCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsInstancesRescheduleMaintenanceCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.sqlinstancesreschedulemaintenancerequestbody) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/instances/{instance}/rescheduleMaintenance") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "instance": c.instance, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "sql.projects.instances.rescheduleMaintenance", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "sql.projects.instances.rescheduleMaintenance" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsInstancesRescheduleMaintenanceCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "sql.projects.instances.rescheduleMaintenance", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsInstancesResetReplicaSizeCall struct { - s *Service - project string - instance string - sqlinstancesresetreplicasizerequest *SqlInstancesResetReplicaSizeRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// ResetReplicaSize: Reset Replica Size to primary instance disk size. -// -// - instance: Cloud SQL read replica instance name. -// - project: ID of the project that contains the read replica. -func (r *ProjectsInstancesService) ResetReplicaSize(project string, instance string, sqlinstancesresetreplicasizerequest *SqlInstancesResetReplicaSizeRequest) *ProjectsInstancesResetReplicaSizeCall { - c := &ProjectsInstancesResetReplicaSizeCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.instance = instance - c.sqlinstancesresetreplicasizerequest = sqlinstancesresetreplicasizerequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsInstancesResetReplicaSizeCall) Fields(s ...googleapi.Field) *ProjectsInstancesResetReplicaSizeCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsInstancesResetReplicaSizeCall) Context(ctx context.Context) *ProjectsInstancesResetReplicaSizeCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsInstancesResetReplicaSizeCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsInstancesResetReplicaSizeCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.sqlinstancesresetreplicasizerequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/instances/{instance}/resetReplicaSize") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "instance": c.instance, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "sql.projects.instances.resetReplicaSize", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "sql.projects.instances.resetReplicaSize" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsInstancesResetReplicaSizeCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "sql.projects.instances.resetReplicaSize", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsInstancesStartExternalSyncCall struct { - s *Service - project string - instance string - sqlinstancesstartexternalsyncrequest *SqlInstancesStartExternalSyncRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// StartExternalSync: Start External primary instance migration. -// -// - instance: Cloud SQL instance ID. This does not include the project ID. -// - project: ID of the project that contains the instance. -func (r *ProjectsInstancesService) StartExternalSync(project string, instance string, sqlinstancesstartexternalsyncrequest *SqlInstancesStartExternalSyncRequest) *ProjectsInstancesStartExternalSyncCall { - c := &ProjectsInstancesStartExternalSyncCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.instance = instance - c.sqlinstancesstartexternalsyncrequest = sqlinstancesstartexternalsyncrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsInstancesStartExternalSyncCall) Fields(s ...googleapi.Field) *ProjectsInstancesStartExternalSyncCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsInstancesStartExternalSyncCall) Context(ctx context.Context) *ProjectsInstancesStartExternalSyncCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsInstancesStartExternalSyncCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsInstancesStartExternalSyncCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.sqlinstancesstartexternalsyncrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/instances/{instance}/startExternalSync") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "instance": c.instance, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "sql.projects.instances.startExternalSync", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "sql.projects.instances.startExternalSync" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsInstancesStartExternalSyncCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "sql.projects.instances.startExternalSync", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsInstancesVerifyExternalSyncSettingsCall struct { - s *Service - project string - instance string - sqlinstancesverifyexternalsyncsettingsrequest *SqlInstancesVerifyExternalSyncSettingsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// VerifyExternalSyncSettings: Verify External primary instance external sync -// settings. -// -// - instance: Cloud SQL instance ID. This does not include the project ID. -// - project: Project ID of the project that contains the instance. -func (r *ProjectsInstancesService) VerifyExternalSyncSettings(project string, instance string, sqlinstancesverifyexternalsyncsettingsrequest *SqlInstancesVerifyExternalSyncSettingsRequest) *ProjectsInstancesVerifyExternalSyncSettingsCall { - c := &ProjectsInstancesVerifyExternalSyncSettingsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.instance = instance - c.sqlinstancesverifyexternalsyncsettingsrequest = sqlinstancesverifyexternalsyncsettingsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsInstancesVerifyExternalSyncSettingsCall) Fields(s ...googleapi.Field) *ProjectsInstancesVerifyExternalSyncSettingsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsInstancesVerifyExternalSyncSettingsCall) Context(ctx context.Context) *ProjectsInstancesVerifyExternalSyncSettingsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsInstancesVerifyExternalSyncSettingsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsInstancesVerifyExternalSyncSettingsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.sqlinstancesverifyexternalsyncsettingsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/instances/{instance}/verifyExternalSyncSettings") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "instance": c.instance, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "sql.projects.instances.verifyExternalSyncSettings", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "sql.projects.instances.verifyExternalSyncSettings" call. -// Any non-2xx status code is an error. Response headers are in either -// *SqlInstancesVerifyExternalSyncSettingsResponse.ServerResponse.Header or (if -// a response was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsInstancesVerifyExternalSyncSettingsCall) Do(opts ...googleapi.CallOption) (*SqlInstancesVerifyExternalSyncSettingsResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &SqlInstancesVerifyExternalSyncSettingsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "sql.projects.instances.verifyExternalSyncSettings", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type SslCertsCreateEphemeralCall struct { - s *Service - project string - instance string - sslcertscreateephemeralrequest *SslCertsCreateEphemeralRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// CreateEphemeral: Generates a short-lived X509 certificate containing the -// provided public key and signed by a private key specific to the target -// instance. Users may use the certificate to authenticate as themselves when -// connecting to the database. -// -// - instance: Cloud SQL instance ID. This does not include the project ID. -// - project: Project ID of the Cloud SQL project. -func (r *SslCertsService) CreateEphemeral(project string, instance string, sslcertscreateephemeralrequest *SslCertsCreateEphemeralRequest) *SslCertsCreateEphemeralCall { - c := &SslCertsCreateEphemeralCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.instance = instance - c.sslcertscreateephemeralrequest = sslcertscreateephemeralrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *SslCertsCreateEphemeralCall) Fields(s ...googleapi.Field) *SslCertsCreateEphemeralCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *SslCertsCreateEphemeralCall) Context(ctx context.Context) *SslCertsCreateEphemeralCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *SslCertsCreateEphemeralCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *SslCertsCreateEphemeralCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.sslcertscreateephemeralrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/instances/{instance}/createEphemeral") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "instance": c.instance, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "sql.sslCerts.createEphemeral", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "sql.sslCerts.createEphemeral" call. -// Any non-2xx status code is an error. Response headers are in either -// *SslCert.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *SslCertsCreateEphemeralCall) Do(opts ...googleapi.CallOption) (*SslCert, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &SslCert{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "sql.sslCerts.createEphemeral", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type SslCertsDeleteCall struct { - s *Service - project string - instance string - sha1Fingerprint string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the SSL certificate. For First Generation instances, the -// certificate remains valid until the instance is restarted. -// -// - instance: Cloud SQL instance ID. This does not include the project ID. -// - project: Project ID of the project that contains the instance. -// - sha1Fingerprint: Sha1 FingerPrint. -func (r *SslCertsService) Delete(project string, instance string, sha1Fingerprint string) *SslCertsDeleteCall { - c := &SslCertsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.instance = instance - c.sha1Fingerprint = sha1Fingerprint - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *SslCertsDeleteCall) Fields(s ...googleapi.Field) *SslCertsDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *SslCertsDeleteCall) Context(ctx context.Context) *SslCertsDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *SslCertsDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *SslCertsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/instances/{instance}/sslCerts/{sha1Fingerprint}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "instance": c.instance, - "sha1Fingerprint": c.sha1Fingerprint, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "sql.sslCerts.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "sql.sslCerts.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *SslCertsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "sql.sslCerts.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type SslCertsGetCall struct { - s *Service - project string - instance string - sha1Fingerprint string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Retrieves a particular SSL certificate. Does not include the private -// key (required for usage). The private key must be saved from the response to -// initial creation. -// -// - instance: Cloud SQL instance ID. This does not include the project ID. -// - project: Project ID of the project that contains the instance. -// - sha1Fingerprint: Sha1 FingerPrint. -func (r *SslCertsService) Get(project string, instance string, sha1Fingerprint string) *SslCertsGetCall { - c := &SslCertsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.instance = instance - c.sha1Fingerprint = sha1Fingerprint - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *SslCertsGetCall) Fields(s ...googleapi.Field) *SslCertsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *SslCertsGetCall) IfNoneMatch(entityTag string) *SslCertsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *SslCertsGetCall) Context(ctx context.Context) *SslCertsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *SslCertsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *SslCertsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/instances/{instance}/sslCerts/{sha1Fingerprint}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "instance": c.instance, - "sha1Fingerprint": c.sha1Fingerprint, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "sql.sslCerts.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "sql.sslCerts.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *SslCert.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *SslCertsGetCall) Do(opts ...googleapi.CallOption) (*SslCert, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &SslCert{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "sql.sslCerts.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type SslCertsInsertCall struct { - s *Service - project string - instance string - sslcertsinsertrequest *SslCertsInsertRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates an SSL certificate and returns it along with the private key -// and server certificate authority. The new certificate will not be usable -// until the instance is restarted. -// -// - instance: Cloud SQL instance ID. This does not include the project ID. -// - project: Project ID of the project that contains the instance. -func (r *SslCertsService) Insert(project string, instance string, sslcertsinsertrequest *SslCertsInsertRequest) *SslCertsInsertCall { - c := &SslCertsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.instance = instance - c.sslcertsinsertrequest = sslcertsinsertrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *SslCertsInsertCall) Fields(s ...googleapi.Field) *SslCertsInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *SslCertsInsertCall) Context(ctx context.Context) *SslCertsInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *SslCertsInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *SslCertsInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.sslcertsinsertrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/instances/{instance}/sslCerts") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "instance": c.instance, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "sql.sslCerts.insert", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "sql.sslCerts.insert" call. -// Any non-2xx status code is an error. Response headers are in either -// *SslCertsInsertResponse.ServerResponse.Header or (if a response was returned -// at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified was -// returned. -func (c *SslCertsInsertCall) Do(opts ...googleapi.CallOption) (*SslCertsInsertResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &SslCertsInsertResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "sql.sslCerts.insert", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type SslCertsListCall struct { - s *Service - project string - instance string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Lists all of the current SSL certificates for the instance. -// -// - instance: Cloud SQL instance ID. This does not include the project ID. -// - project: Project ID of the project that contains the instance. -func (r *SslCertsService) List(project string, instance string) *SslCertsListCall { - c := &SslCertsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.instance = instance - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *SslCertsListCall) Fields(s ...googleapi.Field) *SslCertsListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *SslCertsListCall) IfNoneMatch(entityTag string) *SslCertsListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *SslCertsListCall) Context(ctx context.Context) *SslCertsListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *SslCertsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *SslCertsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/instances/{instance}/sslCerts") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "instance": c.instance, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "sql.sslCerts.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "sql.sslCerts.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *SslCertsListResponse.ServerResponse.Header or (if a response was returned -// at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified was -// returned. -func (c *SslCertsListCall) Do(opts ...googleapi.CallOption) (*SslCertsListResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &SslCertsListResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "sql.sslCerts.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type TiersListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Lists all available machine types (tiers) for Cloud SQL, for example, -// `db-custom-1-3840`. For more information, see -// https://cloud.google.com/sql/pricing. -// -// - project: Project ID of the project for which to list tiers. -func (r *TiersService) List(project string) *TiersListCall { - c := &TiersListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *TiersListCall) Fields(s ...googleapi.Field) *TiersListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *TiersListCall) IfNoneMatch(entityTag string) *TiersListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *TiersListCall) Context(ctx context.Context) *TiersListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *TiersListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TiersListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/tiers") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "sql.tiers.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "sql.tiers.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *TiersListResponse.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified was -// returned. -func (c *TiersListCall) Do(opts ...googleapi.CallOption) (*TiersListResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &TiersListResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "sql.tiers.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type UsersDeleteCall struct { - s *Service - project string - instance string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes a user from a Cloud SQL instance. -// -// - instance: Database instance ID. This does not include the project ID. -// - project: Project ID of the project that contains the instance. -func (r *UsersService) Delete(project string, instance string) *UsersDeleteCall { - c := &UsersDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.instance = instance - return c -} - -// Host sets the optional parameter "host": Host of the user in the instance. -func (c *UsersDeleteCall) Host(host string) *UsersDeleteCall { - c.urlParams_.Set("host", host) - return c -} - -// Name sets the optional parameter "name": Name of the user in the instance. -func (c *UsersDeleteCall) Name(name string) *UsersDeleteCall { - c.urlParams_.Set("name", name) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *UsersDeleteCall) Fields(s ...googleapi.Field) *UsersDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *UsersDeleteCall) Context(ctx context.Context) *UsersDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *UsersDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *UsersDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/instances/{instance}/users") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "instance": c.instance, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "sql.users.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "sql.users.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *UsersDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "sql.users.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type UsersGetCall struct { - s *Service - project string - instance string - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Retrieves a resource containing information about a user. -// -// - instance: Database instance ID. This does not include the project ID. -// - name: User of the instance. -// - project: Project ID of the project that contains the instance. -func (r *UsersService) Get(project string, instance string, name string) *UsersGetCall { - c := &UsersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.instance = instance - c.name = name - return c -} - -// Host sets the optional parameter "host": Host of a user of the instance. -func (c *UsersGetCall) Host(host string) *UsersGetCall { - c.urlParams_.Set("host", host) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *UsersGetCall) Fields(s ...googleapi.Field) *UsersGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *UsersGetCall) IfNoneMatch(entityTag string) *UsersGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *UsersGetCall) Context(ctx context.Context) *UsersGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *UsersGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *UsersGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/instances/{instance}/users/{name}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "instance": c.instance, - "name": c.name, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "sql.users.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "sql.users.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *User.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *UsersGetCall) Do(opts ...googleapi.CallOption) (*User, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &User{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "sql.users.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type UsersInsertCall struct { - s *Service - project string - instance string - user *User - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a new user in a Cloud SQL instance. -// -// - instance: Database instance ID. This does not include the project ID. -// - project: Project ID of the project that contains the instance. -func (r *UsersService) Insert(project string, instance string, user *User) *UsersInsertCall { - c := &UsersInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.instance = instance - c.user = user - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *UsersInsertCall) Fields(s ...googleapi.Field) *UsersInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *UsersInsertCall) Context(ctx context.Context) *UsersInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *UsersInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *UsersInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.user) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/instances/{instance}/users") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "instance": c.instance, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "sql.users.insert", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "sql.users.insert" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *UsersInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "sql.users.insert", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type UsersListCall struct { - s *Service - project string - instance string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Lists users in the specified Cloud SQL instance. -// -// - instance: Database instance ID. This does not include the project ID. -// - project: Project ID of the project that contains the instance. -func (r *UsersService) List(project string, instance string) *UsersListCall { - c := &UsersListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.instance = instance - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *UsersListCall) Fields(s ...googleapi.Field) *UsersListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *UsersListCall) IfNoneMatch(entityTag string) *UsersListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *UsersListCall) Context(ctx context.Context) *UsersListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *UsersListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *UsersListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/instances/{instance}/users") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "instance": c.instance, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "sql.users.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "sql.users.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *UsersListResponse.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified was -// returned. -func (c *UsersListCall) Do(opts ...googleapi.CallOption) (*UsersListResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &UsersListResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "sql.users.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type UsersUpdateCall struct { - s *Service - project string - instance string - user *User - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Update: Updates an existing user in a Cloud SQL instance. -// -// - instance: Database instance ID. This does not include the project ID. -// - project: Project ID of the project that contains the instance. -func (r *UsersService) Update(project string, instance string, user *User) *UsersUpdateCall { - c := &UsersUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.instance = instance - c.user = user - return c -} - -// DatabaseRoles sets the optional parameter "databaseRoles": List of database -// roles to grant to the user. body.database_roles will be ignored for update -// request. -func (c *UsersUpdateCall) DatabaseRoles(databaseRoles ...string) *UsersUpdateCall { - c.urlParams_.SetMulti("databaseRoles", append([]string{}, databaseRoles...)) - return c -} - -// Host sets the optional parameter "host": Host of the user in the instance. -func (c *UsersUpdateCall) Host(host string) *UsersUpdateCall { - c.urlParams_.Set("host", host) - return c -} - -// Name sets the optional parameter "name": Name of the user in the instance. -func (c *UsersUpdateCall) Name(name string) *UsersUpdateCall { - c.urlParams_.Set("name", name) - return c -} - -// RevokeExistingRoles sets the optional parameter "revokeExistingRoles": -// Specifies whether to revoke existing roles that are not present in the -// `database_roles` field. If `false` or unset, the database roles specified in -// `database_roles` are added to the user's existing roles. -func (c *UsersUpdateCall) RevokeExistingRoles(revokeExistingRoles bool) *UsersUpdateCall { - c.urlParams_.Set("revokeExistingRoles", fmt.Sprint(revokeExistingRoles)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *UsersUpdateCall) Fields(s ...googleapi.Field) *UsersUpdateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *UsersUpdateCall) Context(ctx context.Context) *UsersUpdateCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *UsersUpdateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *UsersUpdateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.user) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/instances/{instance}/users") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PUT", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "instance": c.instance, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "sql.users.update", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "sql.users.update" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *UsersUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "sql.users.update", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} diff --git a/vendor/google.golang.org/genproto/googleapis/api/serviceconfig/auth.pb.go b/vendor/google.golang.org/genproto/googleapis/api/serviceconfig/auth.pb.go deleted file mode 100644 index 2f73467f19..0000000000 --- a/vendor/google.golang.org/genproto/googleapis/api/serviceconfig/auth.pb.go +++ /dev/null @@ -1,825 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.26.0 -// protoc v4.24.4 -// source: google/api/auth.proto - -package serviceconfig - -import ( - reflect "reflect" - sync "sync" - - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// `Authentication` defines the authentication configuration for API methods -// provided by an API service. -// -// Example: -// -// name: calendar.googleapis.com -// authentication: -// providers: -// - id: google_calendar_auth -// jwks_uri: https://www.googleapis.com/oauth2/v1/certs -// issuer: https://securetoken.google.com -// rules: -// - selector: "*" -// requirements: -// provider_id: google_calendar_auth -// - selector: google.calendar.Delegate -// oauth: -// canonical_scopes: https://www.googleapis.com/auth/calendar.read -type Authentication struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // A list of authentication rules that apply to individual API methods. - // - // **NOTE:** All service configuration rules follow "last one wins" order. - Rules []*AuthenticationRule `protobuf:"bytes,3,rep,name=rules,proto3" json:"rules,omitempty"` - // Defines a set of authentication providers that a service supports. - Providers []*AuthProvider `protobuf:"bytes,4,rep,name=providers,proto3" json:"providers,omitempty"` -} - -func (x *Authentication) Reset() { - *x = Authentication{} - if protoimpl.UnsafeEnabled { - mi := &file_google_api_auth_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Authentication) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Authentication) ProtoMessage() {} - -func (x *Authentication) ProtoReflect() protoreflect.Message { - mi := &file_google_api_auth_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Authentication.ProtoReflect.Descriptor instead. -func (*Authentication) Descriptor() ([]byte, []int) { - return file_google_api_auth_proto_rawDescGZIP(), []int{0} -} - -func (x *Authentication) GetRules() []*AuthenticationRule { - if x != nil { - return x.Rules - } - return nil -} - -func (x *Authentication) GetProviders() []*AuthProvider { - if x != nil { - return x.Providers - } - return nil -} - -// Authentication rules for the service. -// -// By default, if a method has any authentication requirements, every request -// must include a valid credential matching one of the requirements. -// It's an error to include more than one kind of credential in a single -// request. -// -// If a method doesn't have any auth requirements, request credentials will be -// ignored. -type AuthenticationRule struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Selects the methods to which this rule applies. - // - // Refer to [selector][google.api.DocumentationRule.selector] for syntax - // details. - Selector string `protobuf:"bytes,1,opt,name=selector,proto3" json:"selector,omitempty"` - // The requirements for OAuth credentials. - Oauth *OAuthRequirements `protobuf:"bytes,2,opt,name=oauth,proto3" json:"oauth,omitempty"` - // If true, the service accepts API keys without any other credential. - // This flag only applies to HTTP and gRPC requests. - AllowWithoutCredential bool `protobuf:"varint,5,opt,name=allow_without_credential,json=allowWithoutCredential,proto3" json:"allow_without_credential,omitempty"` - // Requirements for additional authentication providers. - Requirements []*AuthRequirement `protobuf:"bytes,7,rep,name=requirements,proto3" json:"requirements,omitempty"` -} - -func (x *AuthenticationRule) Reset() { - *x = AuthenticationRule{} - if protoimpl.UnsafeEnabled { - mi := &file_google_api_auth_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *AuthenticationRule) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*AuthenticationRule) ProtoMessage() {} - -func (x *AuthenticationRule) ProtoReflect() protoreflect.Message { - mi := &file_google_api_auth_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use AuthenticationRule.ProtoReflect.Descriptor instead. -func (*AuthenticationRule) Descriptor() ([]byte, []int) { - return file_google_api_auth_proto_rawDescGZIP(), []int{1} -} - -func (x *AuthenticationRule) GetSelector() string { - if x != nil { - return x.Selector - } - return "" -} - -func (x *AuthenticationRule) GetOauth() *OAuthRequirements { - if x != nil { - return x.Oauth - } - return nil -} - -func (x *AuthenticationRule) GetAllowWithoutCredential() bool { - if x != nil { - return x.AllowWithoutCredential - } - return false -} - -func (x *AuthenticationRule) GetRequirements() []*AuthRequirement { - if x != nil { - return x.Requirements - } - return nil -} - -// Specifies a location to extract JWT from an API request. -type JwtLocation struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to In: - // - // *JwtLocation_Header - // *JwtLocation_Query - // *JwtLocation_Cookie - In isJwtLocation_In `protobuf_oneof:"in"` - // The value prefix. The value format is "value_prefix{token}" - // Only applies to "in" header type. Must be empty for "in" query type. - // If not empty, the header value has to match (case sensitive) this prefix. - // If not matched, JWT will not be extracted. If matched, JWT will be - // extracted after the prefix is removed. - // - // For example, for "Authorization: Bearer {JWT}", - // value_prefix="Bearer " with a space at the end. - ValuePrefix string `protobuf:"bytes,3,opt,name=value_prefix,json=valuePrefix,proto3" json:"value_prefix,omitempty"` -} - -func (x *JwtLocation) Reset() { - *x = JwtLocation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_api_auth_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *JwtLocation) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*JwtLocation) ProtoMessage() {} - -func (x *JwtLocation) ProtoReflect() protoreflect.Message { - mi := &file_google_api_auth_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use JwtLocation.ProtoReflect.Descriptor instead. -func (*JwtLocation) Descriptor() ([]byte, []int) { - return file_google_api_auth_proto_rawDescGZIP(), []int{2} -} - -func (m *JwtLocation) GetIn() isJwtLocation_In { - if m != nil { - return m.In - } - return nil -} - -func (x *JwtLocation) GetHeader() string { - if x, ok := x.GetIn().(*JwtLocation_Header); ok { - return x.Header - } - return "" -} - -func (x *JwtLocation) GetQuery() string { - if x, ok := x.GetIn().(*JwtLocation_Query); ok { - return x.Query - } - return "" -} - -func (x *JwtLocation) GetCookie() string { - if x, ok := x.GetIn().(*JwtLocation_Cookie); ok { - return x.Cookie - } - return "" -} - -func (x *JwtLocation) GetValuePrefix() string { - if x != nil { - return x.ValuePrefix - } - return "" -} - -type isJwtLocation_In interface { - isJwtLocation_In() -} - -type JwtLocation_Header struct { - // Specifies HTTP header name to extract JWT token. - Header string `protobuf:"bytes,1,opt,name=header,proto3,oneof"` -} - -type JwtLocation_Query struct { - // Specifies URL query parameter name to extract JWT token. - Query string `protobuf:"bytes,2,opt,name=query,proto3,oneof"` -} - -type JwtLocation_Cookie struct { - // Specifies cookie name to extract JWT token. - Cookie string `protobuf:"bytes,4,opt,name=cookie,proto3,oneof"` -} - -func (*JwtLocation_Header) isJwtLocation_In() {} - -func (*JwtLocation_Query) isJwtLocation_In() {} - -func (*JwtLocation_Cookie) isJwtLocation_In() {} - -// Configuration for an authentication provider, including support for -// [JSON Web Token -// (JWT)](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32). -type AuthProvider struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The unique identifier of the auth provider. It will be referred to by - // `AuthRequirement.provider_id`. - // - // Example: "bookstore_auth". - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - // Identifies the principal that issued the JWT. See - // https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.1 - // Usually a URL or an email address. - // - // Example: https://securetoken.google.com - // Example: 1234567-compute@developer.gserviceaccount.com - Issuer string `protobuf:"bytes,2,opt,name=issuer,proto3" json:"issuer,omitempty"` - // URL of the provider's public key set to validate signature of the JWT. See - // [OpenID - // Discovery](https://openid.net/specs/openid-connect-discovery-1_0.html#ProviderMetadata). - // Optional if the key set document: - // - can be retrieved from - // [OpenID - // Discovery](https://openid.net/specs/openid-connect-discovery-1_0.html) - // of the issuer. - // - can be inferred from the email domain of the issuer (e.g. a Google - // service account). - // - // Example: https://www.googleapis.com/oauth2/v1/certs - JwksUri string `protobuf:"bytes,3,opt,name=jwks_uri,json=jwksUri,proto3" json:"jwks_uri,omitempty"` - // The list of JWT - // [audiences](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.3). - // that are allowed to access. A JWT containing any of these audiences will - // be accepted. When this setting is absent, JWTs with audiences: - // - "https://[service.name]/[google.protobuf.Api.name]" - // - "https://[service.name]/" - // - // will be accepted. - // For example, if no audiences are in the setting, LibraryService API will - // accept JWTs with the following audiences: - // - // - - // https://library-example.googleapis.com/google.example.library.v1.LibraryService - // - https://library-example.googleapis.com/ - // - // Example: - // - // audiences: bookstore_android.apps.googleusercontent.com, - // bookstore_web.apps.googleusercontent.com - Audiences string `protobuf:"bytes,4,opt,name=audiences,proto3" json:"audiences,omitempty"` - // Redirect URL if JWT token is required but not present or is expired. - // Implement authorizationUrl of securityDefinitions in OpenAPI spec. - AuthorizationUrl string `protobuf:"bytes,5,opt,name=authorization_url,json=authorizationUrl,proto3" json:"authorization_url,omitempty"` - // Defines the locations to extract the JWT. For now it is only used by the - // Cloud Endpoints to store the OpenAPI extension [x-google-jwt-locations] - // (https://cloud.google.com/endpoints/docs/openapi/openapi-extensions#x-google-jwt-locations) - // - // JWT locations can be one of HTTP headers, URL query parameters or - // cookies. The rule is that the first match wins. - // - // If not specified, default to use following 3 locations: - // 1. Authorization: Bearer - // 2. x-goog-iap-jwt-assertion - // 3. access_token query parameter - // - // Default locations can be specified as followings: - // - // jwt_locations: - // - header: Authorization - // value_prefix: "Bearer " - // - header: x-goog-iap-jwt-assertion - // - query: access_token - JwtLocations []*JwtLocation `protobuf:"bytes,6,rep,name=jwt_locations,json=jwtLocations,proto3" json:"jwt_locations,omitempty"` -} - -func (x *AuthProvider) Reset() { - *x = AuthProvider{} - if protoimpl.UnsafeEnabled { - mi := &file_google_api_auth_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *AuthProvider) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*AuthProvider) ProtoMessage() {} - -func (x *AuthProvider) ProtoReflect() protoreflect.Message { - mi := &file_google_api_auth_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use AuthProvider.ProtoReflect.Descriptor instead. -func (*AuthProvider) Descriptor() ([]byte, []int) { - return file_google_api_auth_proto_rawDescGZIP(), []int{3} -} - -func (x *AuthProvider) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -func (x *AuthProvider) GetIssuer() string { - if x != nil { - return x.Issuer - } - return "" -} - -func (x *AuthProvider) GetJwksUri() string { - if x != nil { - return x.JwksUri - } - return "" -} - -func (x *AuthProvider) GetAudiences() string { - if x != nil { - return x.Audiences - } - return "" -} - -func (x *AuthProvider) GetAuthorizationUrl() string { - if x != nil { - return x.AuthorizationUrl - } - return "" -} - -func (x *AuthProvider) GetJwtLocations() []*JwtLocation { - if x != nil { - return x.JwtLocations - } - return nil -} - -// OAuth scopes are a way to define data and permissions on data. For example, -// there are scopes defined for "Read-only access to Google Calendar" and -// "Access to Cloud Platform". Users can consent to a scope for an application, -// giving it permission to access that data on their behalf. -// -// OAuth scope specifications should be fairly coarse grained; a user will need -// to see and understand the text description of what your scope means. -// -// In most cases: use one or at most two OAuth scopes for an entire family of -// products. If your product has multiple APIs, you should probably be sharing -// the OAuth scope across all of those APIs. -// -// When you need finer grained OAuth consent screens: talk with your product -// management about how developers will use them in practice. -// -// Please note that even though each of the canonical scopes is enough for a -// request to be accepted and passed to the backend, a request can still fail -// due to the backend requiring additional scopes or permissions. -type OAuthRequirements struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The list of publicly documented OAuth scopes that are allowed access. An - // OAuth token containing any of these scopes will be accepted. - // - // Example: - // - // canonical_scopes: https://www.googleapis.com/auth/calendar, - // https://www.googleapis.com/auth/calendar.read - CanonicalScopes string `protobuf:"bytes,1,opt,name=canonical_scopes,json=canonicalScopes,proto3" json:"canonical_scopes,omitempty"` -} - -func (x *OAuthRequirements) Reset() { - *x = OAuthRequirements{} - if protoimpl.UnsafeEnabled { - mi := &file_google_api_auth_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *OAuthRequirements) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*OAuthRequirements) ProtoMessage() {} - -func (x *OAuthRequirements) ProtoReflect() protoreflect.Message { - mi := &file_google_api_auth_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use OAuthRequirements.ProtoReflect.Descriptor instead. -func (*OAuthRequirements) Descriptor() ([]byte, []int) { - return file_google_api_auth_proto_rawDescGZIP(), []int{4} -} - -func (x *OAuthRequirements) GetCanonicalScopes() string { - if x != nil { - return x.CanonicalScopes - } - return "" -} - -// User-defined authentication requirements, including support for -// [JSON Web Token -// (JWT)](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32). -type AuthRequirement struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // [id][google.api.AuthProvider.id] from authentication provider. - // - // Example: - // - // provider_id: bookstore_auth - ProviderId string `protobuf:"bytes,1,opt,name=provider_id,json=providerId,proto3" json:"provider_id,omitempty"` - // NOTE: This will be deprecated soon, once AuthProvider.audiences is - // implemented and accepted in all the runtime components. - // - // The list of JWT - // [audiences](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.3). - // that are allowed to access. A JWT containing any of these audiences will - // be accepted. When this setting is absent, only JWTs with audience - // "https://[Service_name][google.api.Service.name]/[API_name][google.protobuf.Api.name]" - // will be accepted. For example, if no audiences are in the setting, - // LibraryService API will only accept JWTs with the following audience - // "https://library-example.googleapis.com/google.example.library.v1.LibraryService". - // - // Example: - // - // audiences: bookstore_android.apps.googleusercontent.com, - // bookstore_web.apps.googleusercontent.com - Audiences string `protobuf:"bytes,2,opt,name=audiences,proto3" json:"audiences,omitempty"` -} - -func (x *AuthRequirement) Reset() { - *x = AuthRequirement{} - if protoimpl.UnsafeEnabled { - mi := &file_google_api_auth_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *AuthRequirement) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*AuthRequirement) ProtoMessage() {} - -func (x *AuthRequirement) ProtoReflect() protoreflect.Message { - mi := &file_google_api_auth_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use AuthRequirement.ProtoReflect.Descriptor instead. -func (*AuthRequirement) Descriptor() ([]byte, []int) { - return file_google_api_auth_proto_rawDescGZIP(), []int{5} -} - -func (x *AuthRequirement) GetProviderId() string { - if x != nil { - return x.ProviderId - } - return "" -} - -func (x *AuthRequirement) GetAudiences() string { - if x != nil { - return x.Audiences - } - return "" -} - -var File_google_api_auth_proto protoreflect.FileDescriptor - -var file_google_api_auth_proto_rawDesc = []byte{ - 0x0a, 0x15, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x75, 0x74, - 0x68, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0a, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x61, 0x70, 0x69, 0x22, 0x7e, 0x0a, 0x0e, 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x34, 0x0a, 0x05, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x18, 0x03, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, - 0x69, 0x2e, 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x52, 0x75, 0x6c, 0x65, 0x52, 0x05, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x12, 0x36, 0x0a, 0x09, 0x70, - 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x41, 0x75, 0x74, 0x68, - 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x52, 0x09, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, - 0x65, 0x72, 0x73, 0x22, 0xe0, 0x01, 0x0a, 0x12, 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, - 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x75, 0x6c, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x65, - 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x73, 0x65, - 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x12, 0x33, 0x0a, 0x05, 0x6f, 0x61, 0x75, 0x74, 0x68, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, - 0x70, 0x69, 0x2e, 0x4f, 0x41, 0x75, 0x74, 0x68, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, - 0x65, 0x6e, 0x74, 0x73, 0x52, 0x05, 0x6f, 0x61, 0x75, 0x74, 0x68, 0x12, 0x38, 0x0a, 0x18, 0x61, - 0x6c, 0x6c, 0x6f, 0x77, 0x5f, 0x77, 0x69, 0x74, 0x68, 0x6f, 0x75, 0x74, 0x5f, 0x63, 0x72, 0x65, - 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x16, 0x61, - 0x6c, 0x6c, 0x6f, 0x77, 0x57, 0x69, 0x74, 0x68, 0x6f, 0x75, 0x74, 0x43, 0x72, 0x65, 0x64, 0x65, - 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x12, 0x3f, 0x0a, 0x0c, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, - 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x41, 0x75, 0x74, 0x68, 0x52, 0x65, 0x71, - 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x0c, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, - 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x22, 0x82, 0x01, 0x0a, 0x0b, 0x4a, 0x77, 0x74, 0x4c, 0x6f, - 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x0a, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, - 0x12, 0x16, 0x0a, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, - 0x00, 0x52, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x12, 0x18, 0x0a, 0x06, 0x63, 0x6f, 0x6f, 0x6b, - 0x69, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x06, 0x63, 0x6f, 0x6f, 0x6b, - 0x69, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x5f, 0x70, 0x72, 0x65, 0x66, - 0x69, 0x78, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x50, - 0x72, 0x65, 0x66, 0x69, 0x78, 0x42, 0x04, 0x0a, 0x02, 0x69, 0x6e, 0x22, 0xda, 0x01, 0x0a, 0x0c, - 0x41, 0x75, 0x74, 0x68, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x12, 0x0e, 0x0a, 0x02, - 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, - 0x69, 0x73, 0x73, 0x75, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x69, 0x73, - 0x73, 0x75, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x08, 0x6a, 0x77, 0x6b, 0x73, 0x5f, 0x75, 0x72, 0x69, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6a, 0x77, 0x6b, 0x73, 0x55, 0x72, 0x69, 0x12, - 0x1c, 0x0a, 0x09, 0x61, 0x75, 0x64, 0x69, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x09, 0x61, 0x75, 0x64, 0x69, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x12, 0x2b, 0x0a, - 0x11, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x75, - 0x72, 0x6c, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, - 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x55, 0x72, 0x6c, 0x12, 0x3c, 0x0a, 0x0d, 0x6a, 0x77, - 0x74, 0x5f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4a, - 0x77, 0x74, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x6a, 0x77, 0x74, 0x4c, - 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x3e, 0x0a, 0x11, 0x4f, 0x41, 0x75, 0x74, - 0x68, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x29, 0x0a, - 0x10, 0x63, 0x61, 0x6e, 0x6f, 0x6e, 0x69, 0x63, 0x61, 0x6c, 0x5f, 0x73, 0x63, 0x6f, 0x70, 0x65, - 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x63, 0x61, 0x6e, 0x6f, 0x6e, 0x69, 0x63, - 0x61, 0x6c, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x73, 0x22, 0x50, 0x0a, 0x0f, 0x41, 0x75, 0x74, 0x68, - 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x70, - 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0a, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, - 0x61, 0x75, 0x64, 0x69, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x09, 0x61, 0x75, 0x64, 0x69, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x42, 0x6b, 0x0a, 0x0e, 0x63, 0x6f, - 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x42, 0x09, 0x41, 0x75, - 0x74, 0x68, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x45, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x67, 0x65, 0x6e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, - 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x3b, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0xa2, 0x02, 0x04, 0x47, 0x41, 0x50, 0x49, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_google_api_auth_proto_rawDescOnce sync.Once - file_google_api_auth_proto_rawDescData = file_google_api_auth_proto_rawDesc -) - -func file_google_api_auth_proto_rawDescGZIP() []byte { - file_google_api_auth_proto_rawDescOnce.Do(func() { - file_google_api_auth_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_api_auth_proto_rawDescData) - }) - return file_google_api_auth_proto_rawDescData -} - -var file_google_api_auth_proto_msgTypes = make([]protoimpl.MessageInfo, 6) -var file_google_api_auth_proto_goTypes = []interface{}{ - (*Authentication)(nil), // 0: google.api.Authentication - (*AuthenticationRule)(nil), // 1: google.api.AuthenticationRule - (*JwtLocation)(nil), // 2: google.api.JwtLocation - (*AuthProvider)(nil), // 3: google.api.AuthProvider - (*OAuthRequirements)(nil), // 4: google.api.OAuthRequirements - (*AuthRequirement)(nil), // 5: google.api.AuthRequirement -} -var file_google_api_auth_proto_depIdxs = []int32{ - 1, // 0: google.api.Authentication.rules:type_name -> google.api.AuthenticationRule - 3, // 1: google.api.Authentication.providers:type_name -> google.api.AuthProvider - 4, // 2: google.api.AuthenticationRule.oauth:type_name -> google.api.OAuthRequirements - 5, // 3: google.api.AuthenticationRule.requirements:type_name -> google.api.AuthRequirement - 2, // 4: google.api.AuthProvider.jwt_locations:type_name -> google.api.JwtLocation - 5, // [5:5] is the sub-list for method output_type - 5, // [5:5] is the sub-list for method input_type - 5, // [5:5] is the sub-list for extension type_name - 5, // [5:5] is the sub-list for extension extendee - 0, // [0:5] is the sub-list for field type_name -} - -func init() { file_google_api_auth_proto_init() } -func file_google_api_auth_proto_init() { - if File_google_api_auth_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_google_api_auth_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Authentication); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_api_auth_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AuthenticationRule); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_api_auth_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*JwtLocation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_api_auth_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AuthProvider); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_api_auth_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*OAuthRequirements); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_api_auth_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AuthRequirement); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_google_api_auth_proto_msgTypes[2].OneofWrappers = []interface{}{ - (*JwtLocation_Header)(nil), - (*JwtLocation_Query)(nil), - (*JwtLocation_Cookie)(nil), - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_google_api_auth_proto_rawDesc, - NumEnums: 0, - NumMessages: 6, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_google_api_auth_proto_goTypes, - DependencyIndexes: file_google_api_auth_proto_depIdxs, - MessageInfos: file_google_api_auth_proto_msgTypes, - }.Build() - File_google_api_auth_proto = out.File - file_google_api_auth_proto_rawDesc = nil - file_google_api_auth_proto_goTypes = nil - file_google_api_auth_proto_depIdxs = nil -} diff --git a/vendor/google.golang.org/genproto/googleapis/api/serviceconfig/backend.pb.go b/vendor/google.golang.org/genproto/googleapis/api/serviceconfig/backend.pb.go deleted file mode 100644 index dae56a7224..0000000000 --- a/vendor/google.golang.org/genproto/googleapis/api/serviceconfig/backend.pb.go +++ /dev/null @@ -1,579 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.26.0 -// protoc v4.24.4 -// source: google/api/backend.proto - -package serviceconfig - -import ( - reflect "reflect" - sync "sync" - - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// Path Translation specifies how to combine the backend address with the -// request path in order to produce the appropriate forwarding URL for the -// request. -// -// Path Translation is applicable only to HTTP-based backends. Backends which -// do not accept requests over HTTP/HTTPS should leave `path_translation` -// unspecified. -type BackendRule_PathTranslation int32 - -const ( - BackendRule_PATH_TRANSLATION_UNSPECIFIED BackendRule_PathTranslation = 0 - // Use the backend address as-is, with no modification to the path. If the - // URL pattern contains variables, the variable names and values will be - // appended to the query string. If a query string parameter and a URL - // pattern variable have the same name, this may result in duplicate keys in - // the query string. - // - // # Examples - // - // Given the following operation config: - // - // Method path: /api/company/{cid}/user/{uid} - // Backend address: https://example.cloudfunctions.net/getUser - // - // Requests to the following request paths will call the backend at the - // translated path: - // - // Request path: /api/company/widgetworks/user/johndoe - // Translated: - // https://example.cloudfunctions.net/getUser?cid=widgetworks&uid=johndoe - // - // Request path: /api/company/widgetworks/user/johndoe?timezone=EST - // Translated: - // https://example.cloudfunctions.net/getUser?timezone=EST&cid=widgetworks&uid=johndoe - BackendRule_CONSTANT_ADDRESS BackendRule_PathTranslation = 1 - // The request path will be appended to the backend address. - // - // # Examples - // - // Given the following operation config: - // - // Method path: /api/company/{cid}/user/{uid} - // Backend address: https://example.appspot.com - // - // Requests to the following request paths will call the backend at the - // translated path: - // - // Request path: /api/company/widgetworks/user/johndoe - // Translated: - // https://example.appspot.com/api/company/widgetworks/user/johndoe - // - // Request path: /api/company/widgetworks/user/johndoe?timezone=EST - // Translated: - // https://example.appspot.com/api/company/widgetworks/user/johndoe?timezone=EST - BackendRule_APPEND_PATH_TO_ADDRESS BackendRule_PathTranslation = 2 -) - -// Enum value maps for BackendRule_PathTranslation. -var ( - BackendRule_PathTranslation_name = map[int32]string{ - 0: "PATH_TRANSLATION_UNSPECIFIED", - 1: "CONSTANT_ADDRESS", - 2: "APPEND_PATH_TO_ADDRESS", - } - BackendRule_PathTranslation_value = map[string]int32{ - "PATH_TRANSLATION_UNSPECIFIED": 0, - "CONSTANT_ADDRESS": 1, - "APPEND_PATH_TO_ADDRESS": 2, - } -) - -func (x BackendRule_PathTranslation) Enum() *BackendRule_PathTranslation { - p := new(BackendRule_PathTranslation) - *p = x - return p -} - -func (x BackendRule_PathTranslation) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (BackendRule_PathTranslation) Descriptor() protoreflect.EnumDescriptor { - return file_google_api_backend_proto_enumTypes[0].Descriptor() -} - -func (BackendRule_PathTranslation) Type() protoreflect.EnumType { - return &file_google_api_backend_proto_enumTypes[0] -} - -func (x BackendRule_PathTranslation) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use BackendRule_PathTranslation.Descriptor instead. -func (BackendRule_PathTranslation) EnumDescriptor() ([]byte, []int) { - return file_google_api_backend_proto_rawDescGZIP(), []int{1, 0} -} - -// `Backend` defines the backend configuration for a service. -type Backend struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // A list of API backend rules that apply to individual API methods. - // - // **NOTE:** All service configuration rules follow "last one wins" order. - Rules []*BackendRule `protobuf:"bytes,1,rep,name=rules,proto3" json:"rules,omitempty"` -} - -func (x *Backend) Reset() { - *x = Backend{} - if protoimpl.UnsafeEnabled { - mi := &file_google_api_backend_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Backend) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Backend) ProtoMessage() {} - -func (x *Backend) ProtoReflect() protoreflect.Message { - mi := &file_google_api_backend_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Backend.ProtoReflect.Descriptor instead. -func (*Backend) Descriptor() ([]byte, []int) { - return file_google_api_backend_proto_rawDescGZIP(), []int{0} -} - -func (x *Backend) GetRules() []*BackendRule { - if x != nil { - return x.Rules - } - return nil -} - -// A backend rule provides configuration for an individual API element. -type BackendRule struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Selects the methods to which this rule applies. - // - // Refer to [selector][google.api.DocumentationRule.selector] for syntax - // details. - Selector string `protobuf:"bytes,1,opt,name=selector,proto3" json:"selector,omitempty"` - // The address of the API backend. - // - // The scheme is used to determine the backend protocol and security. - // The following schemes are accepted: - // - // SCHEME PROTOCOL SECURITY - // http:// HTTP None - // https:// HTTP TLS - // grpc:// gRPC None - // grpcs:// gRPC TLS - // - // It is recommended to explicitly include a scheme. Leaving out the scheme - // may cause constrasting behaviors across platforms. - // - // If the port is unspecified, the default is: - // - 80 for schemes without TLS - // - 443 for schemes with TLS - // - // For HTTP backends, use [protocol][google.api.BackendRule.protocol] - // to specify the protocol version. - Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"` - // The number of seconds to wait for a response from a request. The default - // varies based on the request protocol and deployment environment. - Deadline float64 `protobuf:"fixed64,3,opt,name=deadline,proto3" json:"deadline,omitempty"` - // Deprecated, do not use. - // - // Deprecated: Do not use. - MinDeadline float64 `protobuf:"fixed64,4,opt,name=min_deadline,json=minDeadline,proto3" json:"min_deadline,omitempty"` - // The number of seconds to wait for the completion of a long running - // operation. The default is no deadline. - OperationDeadline float64 `protobuf:"fixed64,5,opt,name=operation_deadline,json=operationDeadline,proto3" json:"operation_deadline,omitempty"` - // Path translation specifies how to combine the backend address with the - // request path in order to produce the appropriate forwarding URL for the - // request. See [PathTranslation][google.api.BackendRule.PathTranslation] for - // more details. - PathTranslation BackendRule_PathTranslation `protobuf:"varint,6,opt,name=path_translation,json=pathTranslation,proto3,enum=google.api.BackendRule_PathTranslation" json:"path_translation,omitempty"` - // Authentication settings used by the backend. - // - // These are typically used to provide service management functionality to - // a backend served on a publicly-routable URL. The `authentication` - // details should match the authentication behavior used by the backend. - // - // For example, specifying `jwt_audience` implies that the backend expects - // authentication via a JWT. - // - // When authentication is unspecified, the resulting behavior is the same - // as `disable_auth` set to `true`. - // - // Refer to https://developers.google.com/identity/protocols/OpenIDConnect for - // JWT ID token. - // - // Types that are assignable to Authentication: - // - // *BackendRule_JwtAudience - // *BackendRule_DisableAuth - Authentication isBackendRule_Authentication `protobuf_oneof:"authentication"` - // The protocol used for sending a request to the backend. - // The supported values are "http/1.1" and "h2". - // - // The default value is inferred from the scheme in the - // [address][google.api.BackendRule.address] field: - // - // SCHEME PROTOCOL - // http:// http/1.1 - // https:// http/1.1 - // grpc:// h2 - // grpcs:// h2 - // - // For secure HTTP backends (https://) that support HTTP/2, set this field - // to "h2" for improved performance. - // - // Configuring this field to non-default values is only supported for secure - // HTTP backends. This field will be ignored for all other backends. - // - // See - // https://www.iana.org/assignments/tls-extensiontype-values/tls-extensiontype-values.xhtml#alpn-protocol-ids - // for more details on the supported values. - Protocol string `protobuf:"bytes,9,opt,name=protocol,proto3" json:"protocol,omitempty"` - // The map between request protocol and the backend address. - OverridesByRequestProtocol map[string]*BackendRule `protobuf:"bytes,10,rep,name=overrides_by_request_protocol,json=overridesByRequestProtocol,proto3" json:"overrides_by_request_protocol,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - // The load balancing policy used for connection to the application backend. - // - // Defined as an arbitrary string to accomondate custom load balancing - // policies supported by the underlying channel, but suggest most users use - // one of the standard policies, such as the default, "RoundRobin". - LoadBalancingPolicy string `protobuf:"bytes,11,opt,name=load_balancing_policy,json=loadBalancingPolicy,proto3" json:"load_balancing_policy,omitempty"` -} - -func (x *BackendRule) Reset() { - *x = BackendRule{} - if protoimpl.UnsafeEnabled { - mi := &file_google_api_backend_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *BackendRule) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*BackendRule) ProtoMessage() {} - -func (x *BackendRule) ProtoReflect() protoreflect.Message { - mi := &file_google_api_backend_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use BackendRule.ProtoReflect.Descriptor instead. -func (*BackendRule) Descriptor() ([]byte, []int) { - return file_google_api_backend_proto_rawDescGZIP(), []int{1} -} - -func (x *BackendRule) GetSelector() string { - if x != nil { - return x.Selector - } - return "" -} - -func (x *BackendRule) GetAddress() string { - if x != nil { - return x.Address - } - return "" -} - -func (x *BackendRule) GetDeadline() float64 { - if x != nil { - return x.Deadline - } - return 0 -} - -// Deprecated: Do not use. -func (x *BackendRule) GetMinDeadline() float64 { - if x != nil { - return x.MinDeadline - } - return 0 -} - -func (x *BackendRule) GetOperationDeadline() float64 { - if x != nil { - return x.OperationDeadline - } - return 0 -} - -func (x *BackendRule) GetPathTranslation() BackendRule_PathTranslation { - if x != nil { - return x.PathTranslation - } - return BackendRule_PATH_TRANSLATION_UNSPECIFIED -} - -func (m *BackendRule) GetAuthentication() isBackendRule_Authentication { - if m != nil { - return m.Authentication - } - return nil -} - -func (x *BackendRule) GetJwtAudience() string { - if x, ok := x.GetAuthentication().(*BackendRule_JwtAudience); ok { - return x.JwtAudience - } - return "" -} - -func (x *BackendRule) GetDisableAuth() bool { - if x, ok := x.GetAuthentication().(*BackendRule_DisableAuth); ok { - return x.DisableAuth - } - return false -} - -func (x *BackendRule) GetProtocol() string { - if x != nil { - return x.Protocol - } - return "" -} - -func (x *BackendRule) GetOverridesByRequestProtocol() map[string]*BackendRule { - if x != nil { - return x.OverridesByRequestProtocol - } - return nil -} - -func (x *BackendRule) GetLoadBalancingPolicy() string { - if x != nil { - return x.LoadBalancingPolicy - } - return "" -} - -type isBackendRule_Authentication interface { - isBackendRule_Authentication() -} - -type BackendRule_JwtAudience struct { - // The JWT audience is used when generating a JWT ID token for the backend. - // This ID token will be added in the HTTP "authorization" header, and sent - // to the backend. - JwtAudience string `protobuf:"bytes,7,opt,name=jwt_audience,json=jwtAudience,proto3,oneof"` -} - -type BackendRule_DisableAuth struct { - // When disable_auth is true, a JWT ID token won't be generated and the - // original "Authorization" HTTP header will be preserved. If the header is - // used to carry the original token and is expected by the backend, this - // field must be set to true to preserve the header. - DisableAuth bool `protobuf:"varint,8,opt,name=disable_auth,json=disableAuth,proto3,oneof"` -} - -func (*BackendRule_JwtAudience) isBackendRule_Authentication() {} - -func (*BackendRule_DisableAuth) isBackendRule_Authentication() {} - -var File_google_api_backend_proto protoreflect.FileDescriptor - -var file_google_api_backend_proto_rawDesc = []byte{ - 0x0a, 0x18, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x62, 0x61, 0x63, - 0x6b, 0x65, 0x6e, 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0a, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x22, 0x38, 0x0a, 0x07, 0x42, 0x61, 0x63, 0x6b, 0x65, 0x6e, - 0x64, 0x12, 0x2d, 0x0a, 0x05, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x42, 0x61, - 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x52, 0x75, 0x6c, 0x65, 0x52, 0x05, 0x72, 0x75, 0x6c, 0x65, 0x73, - 0x22, 0x80, 0x06, 0x0a, 0x0b, 0x42, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x52, 0x75, 0x6c, 0x65, - 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x08, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x12, 0x18, 0x0a, 0x07, - 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, - 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x65, 0x61, 0x64, 0x6c, 0x69, - 0x6e, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x01, 0x52, 0x08, 0x64, 0x65, 0x61, 0x64, 0x6c, 0x69, - 0x6e, 0x65, 0x12, 0x25, 0x0a, 0x0c, 0x6d, 0x69, 0x6e, 0x5f, 0x64, 0x65, 0x61, 0x64, 0x6c, 0x69, - 0x6e, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x01, 0x42, 0x02, 0x18, 0x01, 0x52, 0x0b, 0x6d, 0x69, - 0x6e, 0x44, 0x65, 0x61, 0x64, 0x6c, 0x69, 0x6e, 0x65, 0x12, 0x2d, 0x0a, 0x12, 0x6f, 0x70, 0x65, - 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x64, 0x65, 0x61, 0x64, 0x6c, 0x69, 0x6e, 0x65, 0x18, - 0x05, 0x20, 0x01, 0x28, 0x01, 0x52, 0x11, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x44, 0x65, 0x61, 0x64, 0x6c, 0x69, 0x6e, 0x65, 0x12, 0x52, 0x0a, 0x10, 0x70, 0x61, 0x74, 0x68, - 0x5f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, - 0x28, 0x0e, 0x32, 0x27, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, - 0x42, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x52, 0x75, 0x6c, 0x65, 0x2e, 0x50, 0x61, 0x74, 0x68, - 0x54, 0x72, 0x61, 0x6e, 0x73, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0f, 0x70, 0x61, 0x74, - 0x68, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x23, 0x0a, 0x0c, - 0x6a, 0x77, 0x74, 0x5f, 0x61, 0x75, 0x64, 0x69, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x07, 0x20, 0x01, - 0x28, 0x09, 0x48, 0x00, 0x52, 0x0b, 0x6a, 0x77, 0x74, 0x41, 0x75, 0x64, 0x69, 0x65, 0x6e, 0x63, - 0x65, 0x12, 0x23, 0x0a, 0x0c, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x61, 0x75, 0x74, - 0x68, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x0b, 0x64, 0x69, 0x73, 0x61, 0x62, - 0x6c, 0x65, 0x41, 0x75, 0x74, 0x68, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, - 0x6f, 0x6c, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, - 0x6f, 0x6c, 0x12, 0x7a, 0x0a, 0x1d, 0x6f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x73, 0x5f, - 0x62, 0x79, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x63, 0x6f, 0x6c, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x37, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x42, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x52, 0x75, - 0x6c, 0x65, 0x2e, 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x73, 0x42, 0x79, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x45, 0x6e, 0x74, - 0x72, 0x79, 0x52, 0x1a, 0x6f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x73, 0x42, 0x79, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x12, 0x32, - 0x0a, 0x15, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x69, 0x6e, 0x67, - 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, 0x6c, - 0x6f, 0x61, 0x64, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x69, 0x6e, 0x67, 0x50, 0x6f, 0x6c, 0x69, - 0x63, 0x79, 0x1a, 0x66, 0x0a, 0x1f, 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x73, 0x42, - 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, - 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x2d, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x61, 0x70, 0x69, 0x2e, 0x42, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x52, 0x75, 0x6c, 0x65, 0x52, - 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x65, 0x0a, 0x0f, 0x50, 0x61, - 0x74, 0x68, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x20, 0x0a, - 0x1c, 0x50, 0x41, 0x54, 0x48, 0x5f, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x4c, 0x41, 0x54, 0x49, 0x4f, - 0x4e, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, - 0x14, 0x0a, 0x10, 0x43, 0x4f, 0x4e, 0x53, 0x54, 0x41, 0x4e, 0x54, 0x5f, 0x41, 0x44, 0x44, 0x52, - 0x45, 0x53, 0x53, 0x10, 0x01, 0x12, 0x1a, 0x0a, 0x16, 0x41, 0x50, 0x50, 0x45, 0x4e, 0x44, 0x5f, - 0x50, 0x41, 0x54, 0x48, 0x5f, 0x54, 0x4f, 0x5f, 0x41, 0x44, 0x44, 0x52, 0x45, 0x53, 0x53, 0x10, - 0x02, 0x42, 0x10, 0x0a, 0x0e, 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x42, 0x6e, 0x0a, 0x0e, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x61, 0x70, 0x69, 0x42, 0x0c, 0x42, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x50, 0x72, - 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x45, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f, - 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x67, 0x65, 0x6e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x61, 0x70, 0x69, - 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x3b, 0x73, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0xa2, 0x02, 0x04, 0x47, - 0x41, 0x50, 0x49, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_google_api_backend_proto_rawDescOnce sync.Once - file_google_api_backend_proto_rawDescData = file_google_api_backend_proto_rawDesc -) - -func file_google_api_backend_proto_rawDescGZIP() []byte { - file_google_api_backend_proto_rawDescOnce.Do(func() { - file_google_api_backend_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_api_backend_proto_rawDescData) - }) - return file_google_api_backend_proto_rawDescData -} - -var file_google_api_backend_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_google_api_backend_proto_msgTypes = make([]protoimpl.MessageInfo, 3) -var file_google_api_backend_proto_goTypes = []interface{}{ - (BackendRule_PathTranslation)(0), // 0: google.api.BackendRule.PathTranslation - (*Backend)(nil), // 1: google.api.Backend - (*BackendRule)(nil), // 2: google.api.BackendRule - nil, // 3: google.api.BackendRule.OverridesByRequestProtocolEntry -} -var file_google_api_backend_proto_depIdxs = []int32{ - 2, // 0: google.api.Backend.rules:type_name -> google.api.BackendRule - 0, // 1: google.api.BackendRule.path_translation:type_name -> google.api.BackendRule.PathTranslation - 3, // 2: google.api.BackendRule.overrides_by_request_protocol:type_name -> google.api.BackendRule.OverridesByRequestProtocolEntry - 2, // 3: google.api.BackendRule.OverridesByRequestProtocolEntry.value:type_name -> google.api.BackendRule - 4, // [4:4] is the sub-list for method output_type - 4, // [4:4] is the sub-list for method input_type - 4, // [4:4] is the sub-list for extension type_name - 4, // [4:4] is the sub-list for extension extendee - 0, // [0:4] is the sub-list for field type_name -} - -func init() { file_google_api_backend_proto_init() } -func file_google_api_backend_proto_init() { - if File_google_api_backend_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_google_api_backend_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Backend); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_api_backend_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BackendRule); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_google_api_backend_proto_msgTypes[1].OneofWrappers = []interface{}{ - (*BackendRule_JwtAudience)(nil), - (*BackendRule_DisableAuth)(nil), - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_google_api_backend_proto_rawDesc, - NumEnums: 1, - NumMessages: 3, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_google_api_backend_proto_goTypes, - DependencyIndexes: file_google_api_backend_proto_depIdxs, - EnumInfos: file_google_api_backend_proto_enumTypes, - MessageInfos: file_google_api_backend_proto_msgTypes, - }.Build() - File_google_api_backend_proto = out.File - file_google_api_backend_proto_rawDesc = nil - file_google_api_backend_proto_goTypes = nil - file_google_api_backend_proto_depIdxs = nil -} diff --git a/vendor/google.golang.org/genproto/googleapis/api/serviceconfig/billing.pb.go b/vendor/google.golang.org/genproto/googleapis/api/serviceconfig/billing.pb.go deleted file mode 100644 index 7d506dd35d..0000000000 --- a/vendor/google.golang.org/genproto/googleapis/api/serviceconfig/billing.pb.go +++ /dev/null @@ -1,286 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.26.0 -// protoc v4.24.4 -// source: google/api/billing.proto - -package serviceconfig - -import ( - reflect "reflect" - sync "sync" - - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// Billing related configuration of the service. -// -// The following example shows how to configure monitored resources and metrics -// for billing, `consumer_destinations` is the only supported destination and -// the monitored resources need at least one label key -// `cloud.googleapis.com/location` to indicate the location of the billing -// usage, using different monitored resources between monitoring and billing is -// recommended so they can be evolved independently: -// -// monitored_resources: -// - type: library.googleapis.com/billing_branch -// labels: -// - key: cloud.googleapis.com/location -// description: | -// Predefined label to support billing location restriction. -// - key: city -// description: | -// Custom label to define the city where the library branch is located -// in. -// - key: name -// description: Custom label to define the name of the library branch. -// metrics: -// - name: library.googleapis.com/book/borrowed_count -// metric_kind: DELTA -// value_type: INT64 -// unit: "1" -// billing: -// consumer_destinations: -// - monitored_resource: library.googleapis.com/billing_branch -// metrics: -// - library.googleapis.com/book/borrowed_count -type Billing struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Billing configurations for sending metrics to the consumer project. - // There can be multiple consumer destinations per service, each one must have - // a different monitored resource type. A metric can be used in at most - // one consumer destination. - ConsumerDestinations []*Billing_BillingDestination `protobuf:"bytes,8,rep,name=consumer_destinations,json=consumerDestinations,proto3" json:"consumer_destinations,omitempty"` -} - -func (x *Billing) Reset() { - *x = Billing{} - if protoimpl.UnsafeEnabled { - mi := &file_google_api_billing_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Billing) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Billing) ProtoMessage() {} - -func (x *Billing) ProtoReflect() protoreflect.Message { - mi := &file_google_api_billing_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Billing.ProtoReflect.Descriptor instead. -func (*Billing) Descriptor() ([]byte, []int) { - return file_google_api_billing_proto_rawDescGZIP(), []int{0} -} - -func (x *Billing) GetConsumerDestinations() []*Billing_BillingDestination { - if x != nil { - return x.ConsumerDestinations - } - return nil -} - -// Configuration of a specific billing destination (Currently only support -// bill against consumer project). -type Billing_BillingDestination struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The monitored resource type. The type must be defined in - // [Service.monitored_resources][google.api.Service.monitored_resources] - // section. - MonitoredResource string `protobuf:"bytes,1,opt,name=monitored_resource,json=monitoredResource,proto3" json:"monitored_resource,omitempty"` - // Names of the metrics to report to this billing destination. - // Each name must be defined in - // [Service.metrics][google.api.Service.metrics] section. - Metrics []string `protobuf:"bytes,2,rep,name=metrics,proto3" json:"metrics,omitempty"` -} - -func (x *Billing_BillingDestination) Reset() { - *x = Billing_BillingDestination{} - if protoimpl.UnsafeEnabled { - mi := &file_google_api_billing_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Billing_BillingDestination) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Billing_BillingDestination) ProtoMessage() {} - -func (x *Billing_BillingDestination) ProtoReflect() protoreflect.Message { - mi := &file_google_api_billing_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Billing_BillingDestination.ProtoReflect.Descriptor instead. -func (*Billing_BillingDestination) Descriptor() ([]byte, []int) { - return file_google_api_billing_proto_rawDescGZIP(), []int{0, 0} -} - -func (x *Billing_BillingDestination) GetMonitoredResource() string { - if x != nil { - return x.MonitoredResource - } - return "" -} - -func (x *Billing_BillingDestination) GetMetrics() []string { - if x != nil { - return x.Metrics - } - return nil -} - -var File_google_api_billing_proto protoreflect.FileDescriptor - -var file_google_api_billing_proto_rawDesc = []byte{ - 0x0a, 0x18, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x62, 0x69, 0x6c, - 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0a, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x22, 0xc5, 0x01, 0x0a, 0x07, 0x42, 0x69, 0x6c, 0x6c, 0x69, - 0x6e, 0x67, 0x12, 0x5b, 0x0a, 0x15, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x65, 0x72, 0x5f, 0x64, - 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x26, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x42, - 0x69, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x42, 0x69, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x44, 0x65, - 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x14, 0x63, 0x6f, 0x6e, 0x73, 0x75, - 0x6d, 0x65, 0x72, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x1a, - 0x5d, 0x0a, 0x12, 0x42, 0x69, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2d, 0x0a, 0x12, 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, - 0x65, 0x64, 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x11, 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x65, 0x64, 0x52, 0x65, 0x73, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x18, - 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x42, 0x6e, - 0x0a, 0x0e, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, - 0x42, 0x0c, 0x42, 0x69, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, - 0x5a, 0x45, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, - 0x6f, 0x72, 0x67, 0x2f, 0x67, 0x65, 0x6e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x3b, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, - 0x65, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0xa2, 0x02, 0x04, 0x47, 0x41, 0x50, 0x49, 0x62, 0x06, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_google_api_billing_proto_rawDescOnce sync.Once - file_google_api_billing_proto_rawDescData = file_google_api_billing_proto_rawDesc -) - -func file_google_api_billing_proto_rawDescGZIP() []byte { - file_google_api_billing_proto_rawDescOnce.Do(func() { - file_google_api_billing_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_api_billing_proto_rawDescData) - }) - return file_google_api_billing_proto_rawDescData -} - -var file_google_api_billing_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_google_api_billing_proto_goTypes = []interface{}{ - (*Billing)(nil), // 0: google.api.Billing - (*Billing_BillingDestination)(nil), // 1: google.api.Billing.BillingDestination -} -var file_google_api_billing_proto_depIdxs = []int32{ - 1, // 0: google.api.Billing.consumer_destinations:type_name -> google.api.Billing.BillingDestination - 1, // [1:1] is the sub-list for method output_type - 1, // [1:1] is the sub-list for method input_type - 1, // [1:1] is the sub-list for extension type_name - 1, // [1:1] is the sub-list for extension extendee - 0, // [0:1] is the sub-list for field type_name -} - -func init() { file_google_api_billing_proto_init() } -func file_google_api_billing_proto_init() { - if File_google_api_billing_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_google_api_billing_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Billing); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_api_billing_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Billing_BillingDestination); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_google_api_billing_proto_rawDesc, - NumEnums: 0, - NumMessages: 2, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_google_api_billing_proto_goTypes, - DependencyIndexes: file_google_api_billing_proto_depIdxs, - MessageInfos: file_google_api_billing_proto_msgTypes, - }.Build() - File_google_api_billing_proto = out.File - file_google_api_billing_proto_rawDesc = nil - file_google_api_billing_proto_goTypes = nil - file_google_api_billing_proto_depIdxs = nil -} diff --git a/vendor/google.golang.org/genproto/googleapis/api/serviceconfig/consumer.pb.go b/vendor/google.golang.org/genproto/googleapis/api/serviceconfig/consumer.pb.go deleted file mode 100644 index a8ead175ed..0000000000 --- a/vendor/google.golang.org/genproto/googleapis/api/serviceconfig/consumer.pb.go +++ /dev/null @@ -1,350 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.26.0 -// protoc v4.24.4 -// source: google/api/consumer.proto - -package serviceconfig - -import ( - reflect "reflect" - sync "sync" - - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// Supported data type of the property values -type Property_PropertyType int32 - -const ( - // The type is unspecified, and will result in an error. - Property_UNSPECIFIED Property_PropertyType = 0 - // The type is `int64`. - Property_INT64 Property_PropertyType = 1 - // The type is `bool`. - Property_BOOL Property_PropertyType = 2 - // The type is `string`. - Property_STRING Property_PropertyType = 3 - // The type is 'double'. - Property_DOUBLE Property_PropertyType = 4 -) - -// Enum value maps for Property_PropertyType. -var ( - Property_PropertyType_name = map[int32]string{ - 0: "UNSPECIFIED", - 1: "INT64", - 2: "BOOL", - 3: "STRING", - 4: "DOUBLE", - } - Property_PropertyType_value = map[string]int32{ - "UNSPECIFIED": 0, - "INT64": 1, - "BOOL": 2, - "STRING": 3, - "DOUBLE": 4, - } -) - -func (x Property_PropertyType) Enum() *Property_PropertyType { - p := new(Property_PropertyType) - *p = x - return p -} - -func (x Property_PropertyType) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (Property_PropertyType) Descriptor() protoreflect.EnumDescriptor { - return file_google_api_consumer_proto_enumTypes[0].Descriptor() -} - -func (Property_PropertyType) Type() protoreflect.EnumType { - return &file_google_api_consumer_proto_enumTypes[0] -} - -func (x Property_PropertyType) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use Property_PropertyType.Descriptor instead. -func (Property_PropertyType) EnumDescriptor() ([]byte, []int) { - return file_google_api_consumer_proto_rawDescGZIP(), []int{1, 0} -} - -// A descriptor for defining project properties for a service. One service may -// have many consumer projects, and the service may want to behave differently -// depending on some properties on the project. For example, a project may be -// associated with a school, or a business, or a government agency, a business -// type property on the project may affect how a service responds to the client. -// This descriptor defines which properties are allowed to be set on a project. -// -// Example: -// -// project_properties: -// properties: -// - name: NO_WATERMARK -// type: BOOL -// description: Allows usage of the API without watermarks. -// - name: EXTENDED_TILE_CACHE_PERIOD -// type: INT64 -type ProjectProperties struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // List of per consumer project-specific properties. - Properties []*Property `protobuf:"bytes,1,rep,name=properties,proto3" json:"properties,omitempty"` -} - -func (x *ProjectProperties) Reset() { - *x = ProjectProperties{} - if protoimpl.UnsafeEnabled { - mi := &file_google_api_consumer_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ProjectProperties) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ProjectProperties) ProtoMessage() {} - -func (x *ProjectProperties) ProtoReflect() protoreflect.Message { - mi := &file_google_api_consumer_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ProjectProperties.ProtoReflect.Descriptor instead. -func (*ProjectProperties) Descriptor() ([]byte, []int) { - return file_google_api_consumer_proto_rawDescGZIP(), []int{0} -} - -func (x *ProjectProperties) GetProperties() []*Property { - if x != nil { - return x.Properties - } - return nil -} - -// Defines project properties. -// -// API services can define properties that can be assigned to consumer projects -// so that backends can perform response customization without having to make -// additional calls or maintain additional storage. For example, Maps API -// defines properties that controls map tile cache period, or whether to embed a -// watermark in a result. -// -// These values can be set via API producer console. Only API providers can -// define and set these properties. -type Property struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The name of the property (a.k.a key). - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // The type of this property. - Type Property_PropertyType `protobuf:"varint,2,opt,name=type,proto3,enum=google.api.Property_PropertyType" json:"type,omitempty"` - // The description of the property - Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` -} - -func (x *Property) Reset() { - *x = Property{} - if protoimpl.UnsafeEnabled { - mi := &file_google_api_consumer_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Property) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Property) ProtoMessage() {} - -func (x *Property) ProtoReflect() protoreflect.Message { - mi := &file_google_api_consumer_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Property.ProtoReflect.Descriptor instead. -func (*Property) Descriptor() ([]byte, []int) { - return file_google_api_consumer_proto_rawDescGZIP(), []int{1} -} - -func (x *Property) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *Property) GetType() Property_PropertyType { - if x != nil { - return x.Type - } - return Property_UNSPECIFIED -} - -func (x *Property) GetDescription() string { - if x != nil { - return x.Description - } - return "" -} - -var File_google_api_consumer_proto protoreflect.FileDescriptor - -var file_google_api_consumer_proto_rawDesc = []byte{ - 0x0a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x6e, - 0x73, 0x75, 0x6d, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0a, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x22, 0x49, 0x0a, 0x11, 0x50, 0x72, 0x6f, 0x6a, 0x65, - 0x63, 0x74, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x12, 0x34, 0x0a, 0x0a, - 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x50, 0x72, - 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x52, 0x0a, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, - 0x65, 0x73, 0x22, 0xc5, 0x01, 0x0a, 0x08, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x12, - 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, - 0x61, 0x6d, 0x65, 0x12, 0x35, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0e, 0x32, 0x21, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x50, - 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, - 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, - 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x4c, 0x0a, 0x0c, - 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0f, 0x0a, 0x0b, - 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x09, 0x0a, - 0x05, 0x49, 0x4e, 0x54, 0x36, 0x34, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x42, 0x4f, 0x4f, 0x4c, - 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x53, 0x54, 0x52, 0x49, 0x4e, 0x47, 0x10, 0x03, 0x12, 0x0a, - 0x0a, 0x06, 0x44, 0x4f, 0x55, 0x42, 0x4c, 0x45, 0x10, 0x04, 0x42, 0x68, 0x0a, 0x0e, 0x63, 0x6f, - 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x42, 0x0d, 0x43, 0x6f, - 0x6e, 0x73, 0x75, 0x6d, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x45, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, - 0x2f, 0x67, 0x65, 0x6e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x61, 0x70, 0x69, 0x73, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x3b, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_google_api_consumer_proto_rawDescOnce sync.Once - file_google_api_consumer_proto_rawDescData = file_google_api_consumer_proto_rawDesc -) - -func file_google_api_consumer_proto_rawDescGZIP() []byte { - file_google_api_consumer_proto_rawDescOnce.Do(func() { - file_google_api_consumer_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_api_consumer_proto_rawDescData) - }) - return file_google_api_consumer_proto_rawDescData -} - -var file_google_api_consumer_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_google_api_consumer_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_google_api_consumer_proto_goTypes = []interface{}{ - (Property_PropertyType)(0), // 0: google.api.Property.PropertyType - (*ProjectProperties)(nil), // 1: google.api.ProjectProperties - (*Property)(nil), // 2: google.api.Property -} -var file_google_api_consumer_proto_depIdxs = []int32{ - 2, // 0: google.api.ProjectProperties.properties:type_name -> google.api.Property - 0, // 1: google.api.Property.type:type_name -> google.api.Property.PropertyType - 2, // [2:2] is the sub-list for method output_type - 2, // [2:2] is the sub-list for method input_type - 2, // [2:2] is the sub-list for extension type_name - 2, // [2:2] is the sub-list for extension extendee - 0, // [0:2] is the sub-list for field type_name -} - -func init() { file_google_api_consumer_proto_init() } -func file_google_api_consumer_proto_init() { - if File_google_api_consumer_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_google_api_consumer_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ProjectProperties); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_api_consumer_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Property); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_google_api_consumer_proto_rawDesc, - NumEnums: 1, - NumMessages: 2, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_google_api_consumer_proto_goTypes, - DependencyIndexes: file_google_api_consumer_proto_depIdxs, - EnumInfos: file_google_api_consumer_proto_enumTypes, - MessageInfos: file_google_api_consumer_proto_msgTypes, - }.Build() - File_google_api_consumer_proto = out.File - file_google_api_consumer_proto_rawDesc = nil - file_google_api_consumer_proto_goTypes = nil - file_google_api_consumer_proto_depIdxs = nil -} diff --git a/vendor/google.golang.org/genproto/googleapis/api/serviceconfig/context.pb.go b/vendor/google.golang.org/genproto/googleapis/api/serviceconfig/context.pb.go deleted file mode 100644 index a8f42fe7a3..0000000000 --- a/vendor/google.golang.org/genproto/googleapis/api/serviceconfig/context.pb.go +++ /dev/null @@ -1,325 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.26.0 -// protoc v4.24.4 -// source: google/api/context.proto - -package serviceconfig - -import ( - reflect "reflect" - sync "sync" - - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// `Context` defines which contexts an API requests. -// -// Example: -// -// context: -// rules: -// - selector: "*" -// requested: -// - google.rpc.context.ProjectContext -// - google.rpc.context.OriginContext -// -// The above specifies that all methods in the API request -// `google.rpc.context.ProjectContext` and -// `google.rpc.context.OriginContext`. -// -// Available context types are defined in package -// `google.rpc.context`. -// -// This also provides mechanism to allowlist any protobuf message extension that -// can be sent in grpc metadata using “x-goog-ext--bin” and -// “x-goog-ext--jspb” format. For example, list any service -// specific protobuf types that can appear in grpc metadata as follows in your -// yaml file: -// -// Example: -// -// context: -// rules: -// - selector: "google.example.library.v1.LibraryService.CreateBook" -// allowed_request_extensions: -// - google.foo.v1.NewExtension -// allowed_response_extensions: -// - google.foo.v1.NewExtension -// -// You can also specify extension ID instead of fully qualified extension name -// here. -type Context struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // A list of RPC context rules that apply to individual API methods. - // - // **NOTE:** All service configuration rules follow "last one wins" order. - Rules []*ContextRule `protobuf:"bytes,1,rep,name=rules,proto3" json:"rules,omitempty"` -} - -func (x *Context) Reset() { - *x = Context{} - if protoimpl.UnsafeEnabled { - mi := &file_google_api_context_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Context) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Context) ProtoMessage() {} - -func (x *Context) ProtoReflect() protoreflect.Message { - mi := &file_google_api_context_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Context.ProtoReflect.Descriptor instead. -func (*Context) Descriptor() ([]byte, []int) { - return file_google_api_context_proto_rawDescGZIP(), []int{0} -} - -func (x *Context) GetRules() []*ContextRule { - if x != nil { - return x.Rules - } - return nil -} - -// A context rule provides information about the context for an individual API -// element. -type ContextRule struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Selects the methods to which this rule applies. - // - // Refer to [selector][google.api.DocumentationRule.selector] for syntax - // details. - Selector string `protobuf:"bytes,1,opt,name=selector,proto3" json:"selector,omitempty"` - // A list of full type names of requested contexts, only the requested context - // will be made available to the backend. - Requested []string `protobuf:"bytes,2,rep,name=requested,proto3" json:"requested,omitempty"` - // A list of full type names of provided contexts. It is used to support - // propagating HTTP headers and ETags from the response extension. - Provided []string `protobuf:"bytes,3,rep,name=provided,proto3" json:"provided,omitempty"` - // A list of full type names or extension IDs of extensions allowed in grpc - // side channel from client to backend. - AllowedRequestExtensions []string `protobuf:"bytes,4,rep,name=allowed_request_extensions,json=allowedRequestExtensions,proto3" json:"allowed_request_extensions,omitempty"` - // A list of full type names or extension IDs of extensions allowed in grpc - // side channel from backend to client. - AllowedResponseExtensions []string `protobuf:"bytes,5,rep,name=allowed_response_extensions,json=allowedResponseExtensions,proto3" json:"allowed_response_extensions,omitempty"` -} - -func (x *ContextRule) Reset() { - *x = ContextRule{} - if protoimpl.UnsafeEnabled { - mi := &file_google_api_context_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ContextRule) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ContextRule) ProtoMessage() {} - -func (x *ContextRule) ProtoReflect() protoreflect.Message { - mi := &file_google_api_context_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ContextRule.ProtoReflect.Descriptor instead. -func (*ContextRule) Descriptor() ([]byte, []int) { - return file_google_api_context_proto_rawDescGZIP(), []int{1} -} - -func (x *ContextRule) GetSelector() string { - if x != nil { - return x.Selector - } - return "" -} - -func (x *ContextRule) GetRequested() []string { - if x != nil { - return x.Requested - } - return nil -} - -func (x *ContextRule) GetProvided() []string { - if x != nil { - return x.Provided - } - return nil -} - -func (x *ContextRule) GetAllowedRequestExtensions() []string { - if x != nil { - return x.AllowedRequestExtensions - } - return nil -} - -func (x *ContextRule) GetAllowedResponseExtensions() []string { - if x != nil { - return x.AllowedResponseExtensions - } - return nil -} - -var File_google_api_context_proto protoreflect.FileDescriptor - -var file_google_api_context_proto_rawDesc = []byte{ - 0x0a, 0x18, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x6e, - 0x74, 0x65, 0x78, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0a, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x22, 0x38, 0x0a, 0x07, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, - 0x74, 0x12, 0x2d, 0x0a, 0x05, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x43, 0x6f, - 0x6e, 0x74, 0x65, 0x78, 0x74, 0x52, 0x75, 0x6c, 0x65, 0x52, 0x05, 0x72, 0x75, 0x6c, 0x65, 0x73, - 0x22, 0xe1, 0x01, 0x0a, 0x0b, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x52, 0x75, 0x6c, 0x65, - 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x08, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x12, 0x1c, 0x0a, 0x09, - 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x65, 0x64, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, - 0x09, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x65, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x72, - 0x6f, 0x76, 0x69, 0x64, 0x65, 0x64, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x70, 0x72, - 0x6f, 0x76, 0x69, 0x64, 0x65, 0x64, 0x12, 0x3c, 0x0a, 0x1a, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x65, - 0x64, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, - 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x18, 0x61, 0x6c, 0x6c, 0x6f, - 0x77, 0x65, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, - 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x3e, 0x0a, 0x1b, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x5f, - 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, - 0x6f, 0x6e, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, 0x52, 0x19, 0x61, 0x6c, 0x6c, 0x6f, 0x77, - 0x65, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, - 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x6e, 0x0a, 0x0e, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x42, 0x0c, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x50, - 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x45, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, - 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x67, 0x65, 0x6e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x61, 0x70, - 0x69, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x3b, - 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0xa2, 0x02, 0x04, - 0x47, 0x41, 0x50, 0x49, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_google_api_context_proto_rawDescOnce sync.Once - file_google_api_context_proto_rawDescData = file_google_api_context_proto_rawDesc -) - -func file_google_api_context_proto_rawDescGZIP() []byte { - file_google_api_context_proto_rawDescOnce.Do(func() { - file_google_api_context_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_api_context_proto_rawDescData) - }) - return file_google_api_context_proto_rawDescData -} - -var file_google_api_context_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_google_api_context_proto_goTypes = []interface{}{ - (*Context)(nil), // 0: google.api.Context - (*ContextRule)(nil), // 1: google.api.ContextRule -} -var file_google_api_context_proto_depIdxs = []int32{ - 1, // 0: google.api.Context.rules:type_name -> google.api.ContextRule - 1, // [1:1] is the sub-list for method output_type - 1, // [1:1] is the sub-list for method input_type - 1, // [1:1] is the sub-list for extension type_name - 1, // [1:1] is the sub-list for extension extendee - 0, // [0:1] is the sub-list for field type_name -} - -func init() { file_google_api_context_proto_init() } -func file_google_api_context_proto_init() { - if File_google_api_context_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_google_api_context_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Context); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_api_context_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ContextRule); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_google_api_context_proto_rawDesc, - NumEnums: 0, - NumMessages: 2, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_google_api_context_proto_goTypes, - DependencyIndexes: file_google_api_context_proto_depIdxs, - MessageInfos: file_google_api_context_proto_msgTypes, - }.Build() - File_google_api_context_proto = out.File - file_google_api_context_proto_rawDesc = nil - file_google_api_context_proto_goTypes = nil - file_google_api_context_proto_depIdxs = nil -} diff --git a/vendor/google.golang.org/genproto/googleapis/api/serviceconfig/control.pb.go b/vendor/google.golang.org/genproto/googleapis/api/serviceconfig/control.pb.go deleted file mode 100644 index a87cb5626f..0000000000 --- a/vendor/google.golang.org/genproto/googleapis/api/serviceconfig/control.pb.go +++ /dev/null @@ -1,191 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.26.0 -// protoc v4.24.4 -// source: google/api/control.proto - -package serviceconfig - -import ( - reflect "reflect" - sync "sync" - - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// Selects and configures the service controller used by the service. -// -// Example: -// -// control: -// environment: servicecontrol.googleapis.com -type Control struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The service controller environment to use. If empty, no control plane - // features (like quota and billing) will be enabled. The recommended value - // for most services is servicecontrol.googleapis.com. - Environment string `protobuf:"bytes,1,opt,name=environment,proto3" json:"environment,omitempty"` - // Defines policies applying to the API methods of the service. - MethodPolicies []*MethodPolicy `protobuf:"bytes,4,rep,name=method_policies,json=methodPolicies,proto3" json:"method_policies,omitempty"` -} - -func (x *Control) Reset() { - *x = Control{} - if protoimpl.UnsafeEnabled { - mi := &file_google_api_control_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Control) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Control) ProtoMessage() {} - -func (x *Control) ProtoReflect() protoreflect.Message { - mi := &file_google_api_control_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Control.ProtoReflect.Descriptor instead. -func (*Control) Descriptor() ([]byte, []int) { - return file_google_api_control_proto_rawDescGZIP(), []int{0} -} - -func (x *Control) GetEnvironment() string { - if x != nil { - return x.Environment - } - return "" -} - -func (x *Control) GetMethodPolicies() []*MethodPolicy { - if x != nil { - return x.MethodPolicies - } - return nil -} - -var File_google_api_control_proto protoreflect.FileDescriptor - -var file_google_api_control_proto_rawDesc = []byte{ - 0x0a, 0x18, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x6e, - 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0a, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x1a, 0x17, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, - 0x70, 0x69, 0x2f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, - 0x6e, 0x0a, 0x07, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x12, 0x20, 0x0a, 0x0b, 0x65, 0x6e, - 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0b, 0x65, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x41, 0x0a, 0x0f, - 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x18, - 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, - 0x70, 0x69, 0x2e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, - 0x0e, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x42, - 0x6e, 0x0a, 0x0e, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, - 0x69, 0x42, 0x0c, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, - 0x01, 0x5a, 0x45, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, - 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x67, 0x65, 0x6e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x3b, 0x73, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0xa2, 0x02, 0x04, 0x47, 0x41, 0x50, 0x49, 0x62, - 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_google_api_control_proto_rawDescOnce sync.Once - file_google_api_control_proto_rawDescData = file_google_api_control_proto_rawDesc -) - -func file_google_api_control_proto_rawDescGZIP() []byte { - file_google_api_control_proto_rawDescOnce.Do(func() { - file_google_api_control_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_api_control_proto_rawDescData) - }) - return file_google_api_control_proto_rawDescData -} - -var file_google_api_control_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_google_api_control_proto_goTypes = []interface{}{ - (*Control)(nil), // 0: google.api.Control - (*MethodPolicy)(nil), // 1: google.api.MethodPolicy -} -var file_google_api_control_proto_depIdxs = []int32{ - 1, // 0: google.api.Control.method_policies:type_name -> google.api.MethodPolicy - 1, // [1:1] is the sub-list for method output_type - 1, // [1:1] is the sub-list for method input_type - 1, // [1:1] is the sub-list for extension type_name - 1, // [1:1] is the sub-list for extension extendee - 0, // [0:1] is the sub-list for field type_name -} - -func init() { file_google_api_control_proto_init() } -func file_google_api_control_proto_init() { - if File_google_api_control_proto != nil { - return - } - file_google_api_policy_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_api_control_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Control); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_google_api_control_proto_rawDesc, - NumEnums: 0, - NumMessages: 1, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_google_api_control_proto_goTypes, - DependencyIndexes: file_google_api_control_proto_depIdxs, - MessageInfos: file_google_api_control_proto_msgTypes, - }.Build() - File_google_api_control_proto = out.File - file_google_api_control_proto_rawDesc = nil - file_google_api_control_proto_goTypes = nil - file_google_api_control_proto_depIdxs = nil -} diff --git a/vendor/google.golang.org/genproto/googleapis/api/serviceconfig/documentation.pb.go b/vendor/google.golang.org/genproto/googleapis/api/serviceconfig/documentation.pb.go deleted file mode 100644 index c3c41ef2a0..0000000000 --- a/vendor/google.golang.org/genproto/googleapis/api/serviceconfig/documentation.pb.go +++ /dev/null @@ -1,510 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.26.0 -// protoc v4.24.4 -// source: google/api/documentation.proto - -package serviceconfig - -import ( - reflect "reflect" - sync "sync" - - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// `Documentation` provides the information for describing a service. -// -// Example: -//
documentation:
-//
-//	summary: >
-//	  The Google Calendar API gives access
-//	  to most calendar features.
-//	pages:
-//	- name: Overview
-//	  content: (== include google/foo/overview.md ==)
-//	- name: Tutorial
-//	  content: (== include google/foo/tutorial.md ==)
-//	  subpages:
-//	  - name: Java
-//	    content: (== include google/foo/tutorial_java.md ==)
-//	rules:
-//	- selector: google.calendar.Calendar.Get
-//	  description: >
-//	    ...
-//	- selector: google.calendar.Calendar.Put
-//	  description: >
-//	    ...
-//
-// 
-// Documentation is provided in markdown syntax. In addition to -// standard markdown features, definition lists, tables and fenced -// code blocks are supported. Section headers can be provided and are -// interpreted relative to the section nesting of the context where -// a documentation fragment is embedded. -// -// Documentation from the IDL is merged with documentation defined -// via the config at normalization time, where documentation provided -// by config rules overrides IDL provided. -// -// A number of constructs specific to the API platform are supported -// in documentation text. -// -// In order to reference a proto element, the following -// notation can be used: -//
[fully.qualified.proto.name][]
-// To override the display text used for the link, this can be used: -//
[display text][fully.qualified.proto.name]
-// Text can be excluded from doc using the following notation: -//
(-- internal comment --)
-// -// A few directives are available in documentation. Note that -// directives must appear on a single line to be properly -// identified. The `include` directive includes a markdown file from -// an external source: -//
(== include path/to/file ==)
-// The `resource_for` directive marks a message to be the resource of -// a collection in REST view. If it is not specified, tools attempt -// to infer the resource from the operations in a collection: -//
(== resource_for v1.shelves.books ==)
-// The directive `suppress_warning` does not directly affect documentation -// and is documented together with service config validation. -type Documentation struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // A short description of what the service does. The summary must be plain - // text. It becomes the overview of the service displayed in Google Cloud - // Console. - // NOTE: This field is equivalent to the standard field `description`. - Summary string `protobuf:"bytes,1,opt,name=summary,proto3" json:"summary,omitempty"` - // The top level pages for the documentation set. - Pages []*Page `protobuf:"bytes,5,rep,name=pages,proto3" json:"pages,omitempty"` - // A list of documentation rules that apply to individual API elements. - // - // **NOTE:** All service configuration rules follow "last one wins" order. - Rules []*DocumentationRule `protobuf:"bytes,3,rep,name=rules,proto3" json:"rules,omitempty"` - // The URL to the root of documentation. - DocumentationRootUrl string `protobuf:"bytes,4,opt,name=documentation_root_url,json=documentationRootUrl,proto3" json:"documentation_root_url,omitempty"` - // Specifies the service root url if the default one (the service name - // from the yaml file) is not suitable. This can be seen in any fully - // specified service urls as well as sections that show a base that other - // urls are relative to. - ServiceRootUrl string `protobuf:"bytes,6,opt,name=service_root_url,json=serviceRootUrl,proto3" json:"service_root_url,omitempty"` - // Declares a single overview page. For example: - //
documentation:
-	//
-	//	summary: ...
-	//	overview: (== include overview.md ==)
-	//
-	// 
- // This is a shortcut for the following declaration (using pages style): - //
documentation:
-	//
-	//	summary: ...
-	//	pages:
-	//	- name: Overview
-	//	  content: (== include overview.md ==)
-	//
-	// 
- // Note: you cannot specify both `overview` field and `pages` field. - Overview string `protobuf:"bytes,2,opt,name=overview,proto3" json:"overview,omitempty"` -} - -func (x *Documentation) Reset() { - *x = Documentation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_api_documentation_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Documentation) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Documentation) ProtoMessage() {} - -func (x *Documentation) ProtoReflect() protoreflect.Message { - mi := &file_google_api_documentation_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Documentation.ProtoReflect.Descriptor instead. -func (*Documentation) Descriptor() ([]byte, []int) { - return file_google_api_documentation_proto_rawDescGZIP(), []int{0} -} - -func (x *Documentation) GetSummary() string { - if x != nil { - return x.Summary - } - return "" -} - -func (x *Documentation) GetPages() []*Page { - if x != nil { - return x.Pages - } - return nil -} - -func (x *Documentation) GetRules() []*DocumentationRule { - if x != nil { - return x.Rules - } - return nil -} - -func (x *Documentation) GetDocumentationRootUrl() string { - if x != nil { - return x.DocumentationRootUrl - } - return "" -} - -func (x *Documentation) GetServiceRootUrl() string { - if x != nil { - return x.ServiceRootUrl - } - return "" -} - -func (x *Documentation) GetOverview() string { - if x != nil { - return x.Overview - } - return "" -} - -// A documentation rule provides information about individual API elements. -type DocumentationRule struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The selector is a comma-separated list of patterns for any element such as - // a method, a field, an enum value. Each pattern is a qualified name of the - // element which may end in "*", indicating a wildcard. Wildcards are only - // allowed at the end and for a whole component of the qualified name, - // i.e. "foo.*" is ok, but not "foo.b*" or "foo.*.bar". A wildcard will match - // one or more components. To specify a default for all applicable elements, - // the whole pattern "*" is used. - Selector string `protobuf:"bytes,1,opt,name=selector,proto3" json:"selector,omitempty"` - // Description of the selected proto element (e.g. a message, a method, a - // 'service' definition, or a field). Defaults to leading & trailing comments - // taken from the proto source definition of the proto element. - Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` - // Deprecation description of the selected element(s). It can be provided if - // an element is marked as `deprecated`. - DeprecationDescription string `protobuf:"bytes,3,opt,name=deprecation_description,json=deprecationDescription,proto3" json:"deprecation_description,omitempty"` -} - -func (x *DocumentationRule) Reset() { - *x = DocumentationRule{} - if protoimpl.UnsafeEnabled { - mi := &file_google_api_documentation_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DocumentationRule) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DocumentationRule) ProtoMessage() {} - -func (x *DocumentationRule) ProtoReflect() protoreflect.Message { - mi := &file_google_api_documentation_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DocumentationRule.ProtoReflect.Descriptor instead. -func (*DocumentationRule) Descriptor() ([]byte, []int) { - return file_google_api_documentation_proto_rawDescGZIP(), []int{1} -} - -func (x *DocumentationRule) GetSelector() string { - if x != nil { - return x.Selector - } - return "" -} - -func (x *DocumentationRule) GetDescription() string { - if x != nil { - return x.Description - } - return "" -} - -func (x *DocumentationRule) GetDeprecationDescription() string { - if x != nil { - return x.DeprecationDescription - } - return "" -} - -// Represents a documentation page. A page can contain subpages to represent -// nested documentation set structure. -type Page struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The name of the page. It will be used as an identity of the page to - // generate URI of the page, text of the link to this page in navigation, - // etc. The full page name (start from the root page name to this page - // concatenated with `.`) can be used as reference to the page in your - // documentation. For example: - //
pages:
-	//   - name: Tutorial
-	//     content: (== include tutorial.md ==)
-	//     subpages:
-	//   - name: Java
-	//     content: (== include tutorial_java.md ==)
-	//
-	// 
- // You can reference `Java` page using Markdown reference link syntax: - // `[Java][Tutorial.Java]`. - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // The Markdown content of the page. You can use ```(== include {path} - // ==)``` to include content from a Markdown file. The content can be used - // to produce the documentation page such as HTML format page. - Content string `protobuf:"bytes,2,opt,name=content,proto3" json:"content,omitempty"` - // Subpages of this page. The order of subpages specified here will be - // honored in the generated docset. - Subpages []*Page `protobuf:"bytes,3,rep,name=subpages,proto3" json:"subpages,omitempty"` -} - -func (x *Page) Reset() { - *x = Page{} - if protoimpl.UnsafeEnabled { - mi := &file_google_api_documentation_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Page) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Page) ProtoMessage() {} - -func (x *Page) ProtoReflect() protoreflect.Message { - mi := &file_google_api_documentation_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Page.ProtoReflect.Descriptor instead. -func (*Page) Descriptor() ([]byte, []int) { - return file_google_api_documentation_proto_rawDescGZIP(), []int{2} -} - -func (x *Page) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *Page) GetContent() string { - if x != nil { - return x.Content - } - return "" -} - -func (x *Page) GetSubpages() []*Page { - if x != nil { - return x.Subpages - } - return nil -} - -var File_google_api_documentation_proto protoreflect.FileDescriptor - -var file_google_api_documentation_proto_rawDesc = []byte{ - 0x0a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x64, 0x6f, 0x63, - 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x12, 0x0a, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x22, 0x82, 0x02, 0x0a, - 0x0d, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x18, - 0x0a, 0x07, 0x73, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x07, 0x73, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x12, 0x26, 0x0a, 0x05, 0x70, 0x61, 0x67, 0x65, - 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x05, 0x70, 0x61, 0x67, 0x65, 0x73, - 0x12, 0x33, 0x0a, 0x05, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x44, 0x6f, 0x63, - 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x75, 0x6c, 0x65, 0x52, 0x05, - 0x72, 0x75, 0x6c, 0x65, 0x73, 0x12, 0x34, 0x0a, 0x16, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, - 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x5f, 0x75, 0x72, 0x6c, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x14, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x6f, 0x6f, 0x74, 0x55, 0x72, 0x6c, 0x12, 0x28, 0x0a, 0x10, 0x73, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x5f, 0x75, 0x72, 0x6c, 0x18, - 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x6f, - 0x6f, 0x74, 0x55, 0x72, 0x6c, 0x12, 0x1a, 0x0a, 0x08, 0x6f, 0x76, 0x65, 0x72, 0x76, 0x69, 0x65, - 0x77, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6f, 0x76, 0x65, 0x72, 0x76, 0x69, 0x65, - 0x77, 0x22, 0x8a, 0x01, 0x0a, 0x11, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x52, 0x75, 0x6c, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x65, 0x6c, 0x65, 0x63, - 0x74, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x73, 0x65, 0x6c, 0x65, 0x63, - 0x74, 0x6f, 0x72, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, - 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, - 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x37, 0x0a, 0x17, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x16, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x62, - 0x0a, 0x04, 0x50, 0x61, 0x67, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, - 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6e, - 0x74, 0x65, 0x6e, 0x74, 0x12, 0x2c, 0x0a, 0x08, 0x73, 0x75, 0x62, 0x70, 0x61, 0x67, 0x65, 0x73, - 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x61, 0x70, 0x69, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x08, 0x73, 0x75, 0x62, 0x70, 0x61, 0x67, - 0x65, 0x73, 0x42, 0x74, 0x0a, 0x0e, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x61, 0x70, 0x69, 0x42, 0x12, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x45, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x67, 0x65, - 0x6e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, - 0x73, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x63, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x3b, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0xa2, 0x02, 0x04, 0x47, 0x41, 0x50, 0x49, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_google_api_documentation_proto_rawDescOnce sync.Once - file_google_api_documentation_proto_rawDescData = file_google_api_documentation_proto_rawDesc -) - -func file_google_api_documentation_proto_rawDescGZIP() []byte { - file_google_api_documentation_proto_rawDescOnce.Do(func() { - file_google_api_documentation_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_api_documentation_proto_rawDescData) - }) - return file_google_api_documentation_proto_rawDescData -} - -var file_google_api_documentation_proto_msgTypes = make([]protoimpl.MessageInfo, 3) -var file_google_api_documentation_proto_goTypes = []interface{}{ - (*Documentation)(nil), // 0: google.api.Documentation - (*DocumentationRule)(nil), // 1: google.api.DocumentationRule - (*Page)(nil), // 2: google.api.Page -} -var file_google_api_documentation_proto_depIdxs = []int32{ - 2, // 0: google.api.Documentation.pages:type_name -> google.api.Page - 1, // 1: google.api.Documentation.rules:type_name -> google.api.DocumentationRule - 2, // 2: google.api.Page.subpages:type_name -> google.api.Page - 3, // [3:3] is the sub-list for method output_type - 3, // [3:3] is the sub-list for method input_type - 3, // [3:3] is the sub-list for extension type_name - 3, // [3:3] is the sub-list for extension extendee - 0, // [0:3] is the sub-list for field type_name -} - -func init() { file_google_api_documentation_proto_init() } -func file_google_api_documentation_proto_init() { - if File_google_api_documentation_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_google_api_documentation_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Documentation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_api_documentation_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DocumentationRule); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_api_documentation_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Page); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_google_api_documentation_proto_rawDesc, - NumEnums: 0, - NumMessages: 3, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_google_api_documentation_proto_goTypes, - DependencyIndexes: file_google_api_documentation_proto_depIdxs, - MessageInfos: file_google_api_documentation_proto_msgTypes, - }.Build() - File_google_api_documentation_proto = out.File - file_google_api_documentation_proto_rawDesc = nil - file_google_api_documentation_proto_goTypes = nil - file_google_api_documentation_proto_depIdxs = nil -} diff --git a/vendor/google.golang.org/genproto/googleapis/api/serviceconfig/endpoint.pb.go b/vendor/google.golang.org/genproto/googleapis/api/serviceconfig/endpoint.pb.go deleted file mode 100644 index f0d3a89862..0000000000 --- a/vendor/google.golang.org/genproto/googleapis/api/serviceconfig/endpoint.pb.go +++ /dev/null @@ -1,229 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.26.0 -// protoc v4.24.4 -// source: google/api/endpoint.proto - -package serviceconfig - -import ( - reflect "reflect" - sync "sync" - - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// `Endpoint` describes a network address of a service that serves a set of -// APIs. It is commonly known as a service endpoint. A service may expose -// any number of service endpoints, and all service endpoints share the same -// service definition, such as quota limits and monitoring metrics. -// -// Example: -// -// type: google.api.Service -// name: library-example.googleapis.com -// endpoints: -// # Declares network address `https://library-example.googleapis.com` -// # for service `library-example.googleapis.com`. The `https` scheme -// # is implicit for all service endpoints. Other schemes may be -// # supported in the future. -// - name: library-example.googleapis.com -// allow_cors: false -// - name: content-staging-library-example.googleapis.com -// # Allows HTTP OPTIONS calls to be passed to the API frontend, for it -// # to decide whether the subsequent cross-origin request is allowed -// # to proceed. -// allow_cors: true -type Endpoint struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The canonical name of this endpoint. - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // Aliases for this endpoint, these will be served by the same UrlMap as the - // parent endpoint, and will be provisioned in the GCP stack for the Regional - // Endpoints. - Aliases []string `protobuf:"bytes,2,rep,name=aliases,proto3" json:"aliases,omitempty"` - // The specification of an Internet routable address of API frontend that will - // handle requests to this [API - // Endpoint](https://cloud.google.com/apis/design/glossary). It should be - // either a valid IPv4 address or a fully-qualified domain name. For example, - // "8.8.8.8" or "myservice.appspot.com". - Target string `protobuf:"bytes,101,opt,name=target,proto3" json:"target,omitempty"` - // Allowing - // [CORS](https://en.wikipedia.org/wiki/Cross-origin_resource_sharing), aka - // cross-domain traffic, would allow the backends served from this endpoint to - // receive and respond to HTTP OPTIONS requests. The response will be used by - // the browser to determine whether the subsequent cross-origin request is - // allowed to proceed. - AllowCors bool `protobuf:"varint,5,opt,name=allow_cors,json=allowCors,proto3" json:"allow_cors,omitempty"` -} - -func (x *Endpoint) Reset() { - *x = Endpoint{} - if protoimpl.UnsafeEnabled { - mi := &file_google_api_endpoint_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Endpoint) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Endpoint) ProtoMessage() {} - -func (x *Endpoint) ProtoReflect() protoreflect.Message { - mi := &file_google_api_endpoint_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Endpoint.ProtoReflect.Descriptor instead. -func (*Endpoint) Descriptor() ([]byte, []int) { - return file_google_api_endpoint_proto_rawDescGZIP(), []int{0} -} - -func (x *Endpoint) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *Endpoint) GetAliases() []string { - if x != nil { - return x.Aliases - } - return nil -} - -func (x *Endpoint) GetTarget() string { - if x != nil { - return x.Target - } - return "" -} - -func (x *Endpoint) GetAllowCors() bool { - if x != nil { - return x.AllowCors - } - return false -} - -var File_google_api_endpoint_proto protoreflect.FileDescriptor - -var file_google_api_endpoint_proto_rawDesc = []byte{ - 0x0a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x65, 0x6e, 0x64, - 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0a, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x22, 0x6f, 0x0a, 0x08, 0x45, 0x6e, 0x64, 0x70, 0x6f, - 0x69, 0x6e, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x6c, 0x69, 0x61, 0x73, - 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x65, - 0x73, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x18, 0x65, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x61, 0x6c, 0x6c, - 0x6f, 0x77, 0x5f, 0x63, 0x6f, 0x72, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x61, - 0x6c, 0x6c, 0x6f, 0x77, 0x43, 0x6f, 0x72, 0x73, 0x42, 0x6f, 0x0a, 0x0e, 0x63, 0x6f, 0x6d, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x42, 0x0d, 0x45, 0x6e, 0x64, 0x70, - 0x6f, 0x69, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x45, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x67, - 0x65, 0x6e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, - 0x69, 0x73, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x3b, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0xa2, 0x02, 0x04, 0x47, 0x41, 0x50, 0x49, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x33, -} - -var ( - file_google_api_endpoint_proto_rawDescOnce sync.Once - file_google_api_endpoint_proto_rawDescData = file_google_api_endpoint_proto_rawDesc -) - -func file_google_api_endpoint_proto_rawDescGZIP() []byte { - file_google_api_endpoint_proto_rawDescOnce.Do(func() { - file_google_api_endpoint_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_api_endpoint_proto_rawDescData) - }) - return file_google_api_endpoint_proto_rawDescData -} - -var file_google_api_endpoint_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_google_api_endpoint_proto_goTypes = []interface{}{ - (*Endpoint)(nil), // 0: google.api.Endpoint -} -var file_google_api_endpoint_proto_depIdxs = []int32{ - 0, // [0:0] is the sub-list for method output_type - 0, // [0:0] is the sub-list for method input_type - 0, // [0:0] is the sub-list for extension type_name - 0, // [0:0] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name -} - -func init() { file_google_api_endpoint_proto_init() } -func file_google_api_endpoint_proto_init() { - if File_google_api_endpoint_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_google_api_endpoint_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Endpoint); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_google_api_endpoint_proto_rawDesc, - NumEnums: 0, - NumMessages: 1, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_google_api_endpoint_proto_goTypes, - DependencyIndexes: file_google_api_endpoint_proto_depIdxs, - MessageInfos: file_google_api_endpoint_proto_msgTypes, - }.Build() - File_google_api_endpoint_proto = out.File - file_google_api_endpoint_proto_rawDesc = nil - file_google_api_endpoint_proto_goTypes = nil - file_google_api_endpoint_proto_depIdxs = nil -} diff --git a/vendor/google.golang.org/genproto/googleapis/api/serviceconfig/log.pb.go b/vendor/google.golang.org/genproto/googleapis/api/serviceconfig/log.pb.go deleted file mode 100644 index 5cdb6e782e..0000000000 --- a/vendor/google.golang.org/genproto/googleapis/api/serviceconfig/log.pb.go +++ /dev/null @@ -1,218 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.26.0 -// protoc v4.24.4 -// source: google/api/log.proto - -package serviceconfig - -import ( - reflect "reflect" - sync "sync" - - label "google.golang.org/genproto/googleapis/api/label" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// A description of a log type. Example in YAML format: -// -// - name: library.googleapis.com/activity_history -// description: The history of borrowing and returning library items. -// display_name: Activity -// labels: -// - key: /customer_id -// description: Identifier of a library customer -type LogDescriptor struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The name of the log. It must be less than 512 characters long and can - // include the following characters: upper- and lower-case alphanumeric - // characters [A-Za-z0-9], and punctuation characters including - // slash, underscore, hyphen, period [/_-.]. - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // The set of labels that are available to describe a specific log entry. - // Runtime requests that contain labels not specified here are - // considered invalid. - Labels []*label.LabelDescriptor `protobuf:"bytes,2,rep,name=labels,proto3" json:"labels,omitempty"` - // A human-readable description of this log. This information appears in - // the documentation and can contain details. - Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` - // The human-readable name for this log. This information appears on - // the user interface and should be concise. - DisplayName string `protobuf:"bytes,4,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"` -} - -func (x *LogDescriptor) Reset() { - *x = LogDescriptor{} - if protoimpl.UnsafeEnabled { - mi := &file_google_api_log_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *LogDescriptor) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*LogDescriptor) ProtoMessage() {} - -func (x *LogDescriptor) ProtoReflect() protoreflect.Message { - mi := &file_google_api_log_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use LogDescriptor.ProtoReflect.Descriptor instead. -func (*LogDescriptor) Descriptor() ([]byte, []int) { - return file_google_api_log_proto_rawDescGZIP(), []int{0} -} - -func (x *LogDescriptor) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *LogDescriptor) GetLabels() []*label.LabelDescriptor { - if x != nil { - return x.Labels - } - return nil -} - -func (x *LogDescriptor) GetDescription() string { - if x != nil { - return x.Description - } - return "" -} - -func (x *LogDescriptor) GetDisplayName() string { - if x != nil { - return x.DisplayName - } - return "" -} - -var File_google_api_log_proto protoreflect.FileDescriptor - -var file_google_api_log_proto_rawDesc = []byte{ - 0x0a, 0x14, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6c, 0x6f, 0x67, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0a, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, - 0x70, 0x69, 0x1a, 0x16, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6c, - 0x61, 0x62, 0x65, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x9d, 0x01, 0x0a, 0x0d, 0x4c, - 0x6f, 0x67, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x12, 0x12, 0x0a, 0x04, - 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, - 0x12, 0x33, 0x0a, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x61, - 0x62, 0x65, 0x6c, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x52, 0x06, 0x6c, - 0x61, 0x62, 0x65, 0x6c, 0x73, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, - 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x21, 0x0a, 0x0c, 0x64, 0x69, 0x73, 0x70, 0x6c, - 0x61, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, - 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x42, 0x6a, 0x0a, 0x0e, 0x63, 0x6f, - 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x42, 0x08, 0x4c, 0x6f, - 0x67, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x45, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x67, 0x65, 0x6e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2f, - 0x61, 0x70, 0x69, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x3b, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0xa2, - 0x02, 0x04, 0x47, 0x41, 0x50, 0x49, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_google_api_log_proto_rawDescOnce sync.Once - file_google_api_log_proto_rawDescData = file_google_api_log_proto_rawDesc -) - -func file_google_api_log_proto_rawDescGZIP() []byte { - file_google_api_log_proto_rawDescOnce.Do(func() { - file_google_api_log_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_api_log_proto_rawDescData) - }) - return file_google_api_log_proto_rawDescData -} - -var file_google_api_log_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_google_api_log_proto_goTypes = []interface{}{ - (*LogDescriptor)(nil), // 0: google.api.LogDescriptor - (*label.LabelDescriptor)(nil), // 1: google.api.LabelDescriptor -} -var file_google_api_log_proto_depIdxs = []int32{ - 1, // 0: google.api.LogDescriptor.labels:type_name -> google.api.LabelDescriptor - 1, // [1:1] is the sub-list for method output_type - 1, // [1:1] is the sub-list for method input_type - 1, // [1:1] is the sub-list for extension type_name - 1, // [1:1] is the sub-list for extension extendee - 0, // [0:1] is the sub-list for field type_name -} - -func init() { file_google_api_log_proto_init() } -func file_google_api_log_proto_init() { - if File_google_api_log_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_google_api_log_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*LogDescriptor); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_google_api_log_proto_rawDesc, - NumEnums: 0, - NumMessages: 1, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_google_api_log_proto_goTypes, - DependencyIndexes: file_google_api_log_proto_depIdxs, - MessageInfos: file_google_api_log_proto_msgTypes, - }.Build() - File_google_api_log_proto = out.File - file_google_api_log_proto_rawDesc = nil - file_google_api_log_proto_goTypes = nil - file_google_api_log_proto_depIdxs = nil -} diff --git a/vendor/google.golang.org/genproto/googleapis/api/serviceconfig/logging.pb.go b/vendor/google.golang.org/genproto/googleapis/api/serviceconfig/logging.pb.go deleted file mode 100644 index 2709c6dd9b..0000000000 --- a/vendor/google.golang.org/genproto/googleapis/api/serviceconfig/logging.pb.go +++ /dev/null @@ -1,303 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.26.0 -// protoc v4.24.4 -// source: google/api/logging.proto - -package serviceconfig - -import ( - reflect "reflect" - sync "sync" - - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// Logging configuration of the service. -// -// The following example shows how to configure logs to be sent to the -// producer and consumer projects. In the example, the `activity_history` -// log is sent to both the producer and consumer projects, whereas the -// `purchase_history` log is only sent to the producer project. -// -// monitored_resources: -// - type: library.googleapis.com/branch -// labels: -// - key: /city -// description: The city where the library branch is located in. -// - key: /name -// description: The name of the branch. -// logs: -// - name: activity_history -// labels: -// - key: /customer_id -// - name: purchase_history -// logging: -// producer_destinations: -// - monitored_resource: library.googleapis.com/branch -// logs: -// - activity_history -// - purchase_history -// consumer_destinations: -// - monitored_resource: library.googleapis.com/branch -// logs: -// - activity_history -type Logging struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Logging configurations for sending logs to the producer project. - // There can be multiple producer destinations, each one must have a - // different monitored resource type. A log can be used in at most - // one producer destination. - ProducerDestinations []*Logging_LoggingDestination `protobuf:"bytes,1,rep,name=producer_destinations,json=producerDestinations,proto3" json:"producer_destinations,omitempty"` - // Logging configurations for sending logs to the consumer project. - // There can be multiple consumer destinations, each one must have a - // different monitored resource type. A log can be used in at most - // one consumer destination. - ConsumerDestinations []*Logging_LoggingDestination `protobuf:"bytes,2,rep,name=consumer_destinations,json=consumerDestinations,proto3" json:"consumer_destinations,omitempty"` -} - -func (x *Logging) Reset() { - *x = Logging{} - if protoimpl.UnsafeEnabled { - mi := &file_google_api_logging_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Logging) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Logging) ProtoMessage() {} - -func (x *Logging) ProtoReflect() protoreflect.Message { - mi := &file_google_api_logging_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Logging.ProtoReflect.Descriptor instead. -func (*Logging) Descriptor() ([]byte, []int) { - return file_google_api_logging_proto_rawDescGZIP(), []int{0} -} - -func (x *Logging) GetProducerDestinations() []*Logging_LoggingDestination { - if x != nil { - return x.ProducerDestinations - } - return nil -} - -func (x *Logging) GetConsumerDestinations() []*Logging_LoggingDestination { - if x != nil { - return x.ConsumerDestinations - } - return nil -} - -// Configuration of a specific logging destination (the producer project -// or the consumer project). -type Logging_LoggingDestination struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The monitored resource type. The type must be defined in the - // [Service.monitored_resources][google.api.Service.monitored_resources] - // section. - MonitoredResource string `protobuf:"bytes,3,opt,name=monitored_resource,json=monitoredResource,proto3" json:"monitored_resource,omitempty"` - // Names of the logs to be sent to this destination. Each name must - // be defined in the [Service.logs][google.api.Service.logs] section. If the - // log name is not a domain scoped name, it will be automatically prefixed - // with the service name followed by "/". - Logs []string `protobuf:"bytes,1,rep,name=logs,proto3" json:"logs,omitempty"` -} - -func (x *Logging_LoggingDestination) Reset() { - *x = Logging_LoggingDestination{} - if protoimpl.UnsafeEnabled { - mi := &file_google_api_logging_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Logging_LoggingDestination) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Logging_LoggingDestination) ProtoMessage() {} - -func (x *Logging_LoggingDestination) ProtoReflect() protoreflect.Message { - mi := &file_google_api_logging_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Logging_LoggingDestination.ProtoReflect.Descriptor instead. -func (*Logging_LoggingDestination) Descriptor() ([]byte, []int) { - return file_google_api_logging_proto_rawDescGZIP(), []int{0, 0} -} - -func (x *Logging_LoggingDestination) GetMonitoredResource() string { - if x != nil { - return x.MonitoredResource - } - return "" -} - -func (x *Logging_LoggingDestination) GetLogs() []string { - if x != nil { - return x.Logs - } - return nil -} - -var File_google_api_logging_proto protoreflect.FileDescriptor - -var file_google_api_logging_proto_rawDesc = []byte{ - 0x0a, 0x18, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6c, 0x6f, 0x67, - 0x67, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0a, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x22, 0x9c, 0x02, 0x0a, 0x07, 0x4c, 0x6f, 0x67, 0x67, 0x69, - 0x6e, 0x67, 0x12, 0x5b, 0x0a, 0x15, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x65, 0x72, 0x5f, 0x64, - 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x26, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4c, - 0x6f, 0x67, 0x67, 0x69, 0x6e, 0x67, 0x2e, 0x4c, 0x6f, 0x67, 0x67, 0x69, 0x6e, 0x67, 0x44, 0x65, - 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x14, 0x70, 0x72, 0x6f, 0x64, 0x75, - 0x63, 0x65, 0x72, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, - 0x5b, 0x0a, 0x15, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x65, 0x72, 0x5f, 0x64, 0x65, 0x73, 0x74, - 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x6f, 0x67, 0x67, - 0x69, 0x6e, 0x67, 0x2e, 0x4c, 0x6f, 0x67, 0x67, 0x69, 0x6e, 0x67, 0x44, 0x65, 0x73, 0x74, 0x69, - 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x14, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x65, 0x72, - 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x57, 0x0a, 0x12, - 0x4c, 0x6f, 0x67, 0x67, 0x69, 0x6e, 0x67, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x12, 0x2d, 0x0a, 0x12, 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x65, 0x64, 0x5f, - 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, - 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x65, 0x64, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6c, 0x6f, 0x67, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, - 0x04, 0x6c, 0x6f, 0x67, 0x73, 0x42, 0x6e, 0x0a, 0x0e, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x42, 0x0c, 0x4c, 0x6f, 0x67, 0x67, 0x69, 0x6e, 0x67, - 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x45, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x67, 0x65, 0x6e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x61, - 0x70, 0x69, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x3b, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0xa2, 0x02, - 0x04, 0x47, 0x41, 0x50, 0x49, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_google_api_logging_proto_rawDescOnce sync.Once - file_google_api_logging_proto_rawDescData = file_google_api_logging_proto_rawDesc -) - -func file_google_api_logging_proto_rawDescGZIP() []byte { - file_google_api_logging_proto_rawDescOnce.Do(func() { - file_google_api_logging_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_api_logging_proto_rawDescData) - }) - return file_google_api_logging_proto_rawDescData -} - -var file_google_api_logging_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_google_api_logging_proto_goTypes = []interface{}{ - (*Logging)(nil), // 0: google.api.Logging - (*Logging_LoggingDestination)(nil), // 1: google.api.Logging.LoggingDestination -} -var file_google_api_logging_proto_depIdxs = []int32{ - 1, // 0: google.api.Logging.producer_destinations:type_name -> google.api.Logging.LoggingDestination - 1, // 1: google.api.Logging.consumer_destinations:type_name -> google.api.Logging.LoggingDestination - 2, // [2:2] is the sub-list for method output_type - 2, // [2:2] is the sub-list for method input_type - 2, // [2:2] is the sub-list for extension type_name - 2, // [2:2] is the sub-list for extension extendee - 0, // [0:2] is the sub-list for field type_name -} - -func init() { file_google_api_logging_proto_init() } -func file_google_api_logging_proto_init() { - if File_google_api_logging_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_google_api_logging_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Logging); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_api_logging_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Logging_LoggingDestination); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_google_api_logging_proto_rawDesc, - NumEnums: 0, - NumMessages: 2, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_google_api_logging_proto_goTypes, - DependencyIndexes: file_google_api_logging_proto_depIdxs, - MessageInfos: file_google_api_logging_proto_msgTypes, - }.Build() - File_google_api_logging_proto = out.File - file_google_api_logging_proto_rawDesc = nil - file_google_api_logging_proto_goTypes = nil - file_google_api_logging_proto_depIdxs = nil -} diff --git a/vendor/google.golang.org/genproto/googleapis/api/serviceconfig/monitoring.pb.go b/vendor/google.golang.org/genproto/googleapis/api/serviceconfig/monitoring.pb.go deleted file mode 100644 index 1142577776..0000000000 --- a/vendor/google.golang.org/genproto/googleapis/api/serviceconfig/monitoring.pb.go +++ /dev/null @@ -1,331 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.26.0 -// protoc v4.24.4 -// source: google/api/monitoring.proto - -package serviceconfig - -import ( - reflect "reflect" - sync "sync" - - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// Monitoring configuration of the service. -// -// The example below shows how to configure monitored resources and metrics -// for monitoring. In the example, a monitored resource and two metrics are -// defined. The `library.googleapis.com/book/returned_count` metric is sent -// to both producer and consumer projects, whereas the -// `library.googleapis.com/book/num_overdue` metric is only sent to the -// consumer project. -// -// monitored_resources: -// - type: library.googleapis.com/Branch -// display_name: "Library Branch" -// description: "A branch of a library." -// launch_stage: GA -// labels: -// - key: resource_container -// description: "The Cloud container (ie. project id) for the Branch." -// - key: location -// description: "The location of the library branch." -// - key: branch_id -// description: "The id of the branch." -// metrics: -// - name: library.googleapis.com/book/returned_count -// display_name: "Books Returned" -// description: "The count of books that have been returned." -// launch_stage: GA -// metric_kind: DELTA -// value_type: INT64 -// unit: "1" -// labels: -// - key: customer_id -// description: "The id of the customer." -// - name: library.googleapis.com/book/num_overdue -// display_name: "Books Overdue" -// description: "The current number of overdue books." -// launch_stage: GA -// metric_kind: GAUGE -// value_type: INT64 -// unit: "1" -// labels: -// - key: customer_id -// description: "The id of the customer." -// monitoring: -// producer_destinations: -// - monitored_resource: library.googleapis.com/Branch -// metrics: -// - library.googleapis.com/book/returned_count -// consumer_destinations: -// - monitored_resource: library.googleapis.com/Branch -// metrics: -// - library.googleapis.com/book/returned_count -// - library.googleapis.com/book/num_overdue -type Monitoring struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Monitoring configurations for sending metrics to the producer project. - // There can be multiple producer destinations. A monitored resource type may - // appear in multiple monitoring destinations if different aggregations are - // needed for different sets of metrics associated with that monitored - // resource type. A monitored resource and metric pair may only be used once - // in the Monitoring configuration. - ProducerDestinations []*Monitoring_MonitoringDestination `protobuf:"bytes,1,rep,name=producer_destinations,json=producerDestinations,proto3" json:"producer_destinations,omitempty"` - // Monitoring configurations for sending metrics to the consumer project. - // There can be multiple consumer destinations. A monitored resource type may - // appear in multiple monitoring destinations if different aggregations are - // needed for different sets of metrics associated with that monitored - // resource type. A monitored resource and metric pair may only be used once - // in the Monitoring configuration. - ConsumerDestinations []*Monitoring_MonitoringDestination `protobuf:"bytes,2,rep,name=consumer_destinations,json=consumerDestinations,proto3" json:"consumer_destinations,omitempty"` -} - -func (x *Monitoring) Reset() { - *x = Monitoring{} - if protoimpl.UnsafeEnabled { - mi := &file_google_api_monitoring_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Monitoring) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Monitoring) ProtoMessage() {} - -func (x *Monitoring) ProtoReflect() protoreflect.Message { - mi := &file_google_api_monitoring_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Monitoring.ProtoReflect.Descriptor instead. -func (*Monitoring) Descriptor() ([]byte, []int) { - return file_google_api_monitoring_proto_rawDescGZIP(), []int{0} -} - -func (x *Monitoring) GetProducerDestinations() []*Monitoring_MonitoringDestination { - if x != nil { - return x.ProducerDestinations - } - return nil -} - -func (x *Monitoring) GetConsumerDestinations() []*Monitoring_MonitoringDestination { - if x != nil { - return x.ConsumerDestinations - } - return nil -} - -// Configuration of a specific monitoring destination (the producer project -// or the consumer project). -type Monitoring_MonitoringDestination struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The monitored resource type. The type must be defined in - // [Service.monitored_resources][google.api.Service.monitored_resources] - // section. - MonitoredResource string `protobuf:"bytes,1,opt,name=monitored_resource,json=monitoredResource,proto3" json:"monitored_resource,omitempty"` - // Types of the metrics to report to this monitoring destination. - // Each type must be defined in - // [Service.metrics][google.api.Service.metrics] section. - Metrics []string `protobuf:"bytes,2,rep,name=metrics,proto3" json:"metrics,omitempty"` -} - -func (x *Monitoring_MonitoringDestination) Reset() { - *x = Monitoring_MonitoringDestination{} - if protoimpl.UnsafeEnabled { - mi := &file_google_api_monitoring_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Monitoring_MonitoringDestination) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Monitoring_MonitoringDestination) ProtoMessage() {} - -func (x *Monitoring_MonitoringDestination) ProtoReflect() protoreflect.Message { - mi := &file_google_api_monitoring_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Monitoring_MonitoringDestination.ProtoReflect.Descriptor instead. -func (*Monitoring_MonitoringDestination) Descriptor() ([]byte, []int) { - return file_google_api_monitoring_proto_rawDescGZIP(), []int{0, 0} -} - -func (x *Monitoring_MonitoringDestination) GetMonitoredResource() string { - if x != nil { - return x.MonitoredResource - } - return "" -} - -func (x *Monitoring_MonitoringDestination) GetMetrics() []string { - if x != nil { - return x.Metrics - } - return nil -} - -var File_google_api_monitoring_proto protoreflect.FileDescriptor - -var file_google_api_monitoring_proto_rawDesc = []byte{ - 0x0a, 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6d, 0x6f, 0x6e, - 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0a, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x22, 0xb4, 0x02, 0x0a, 0x0a, 0x4d, 0x6f, - 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x12, 0x61, 0x0a, 0x15, 0x70, 0x72, 0x6f, 0x64, - 0x75, 0x63, 0x65, 0x72, 0x5f, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x2e, - 0x4d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x14, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x65, 0x72, 0x44, - 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x61, 0x0a, 0x15, 0x63, - 0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x65, 0x72, 0x5f, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, - 0x6e, 0x67, 0x2e, 0x4d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x44, 0x65, 0x73, - 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x14, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6d, - 0x65, 0x72, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x60, - 0x0a, 0x15, 0x4d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x44, 0x65, 0x73, 0x74, - 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2d, 0x0a, 0x12, 0x6d, 0x6f, 0x6e, 0x69, 0x74, - 0x6f, 0x72, 0x65, 0x64, 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x11, 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x65, 0x64, 0x52, 0x65, - 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, - 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, - 0x42, 0x71, 0x0a, 0x0e, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, - 0x70, 0x69, 0x42, 0x0f, 0x4d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x50, 0x72, - 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x45, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f, - 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x67, 0x65, 0x6e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x61, 0x70, 0x69, - 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x3b, 0x73, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0xa2, 0x02, 0x04, 0x47, - 0x41, 0x50, 0x49, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_google_api_monitoring_proto_rawDescOnce sync.Once - file_google_api_monitoring_proto_rawDescData = file_google_api_monitoring_proto_rawDesc -) - -func file_google_api_monitoring_proto_rawDescGZIP() []byte { - file_google_api_monitoring_proto_rawDescOnce.Do(func() { - file_google_api_monitoring_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_api_monitoring_proto_rawDescData) - }) - return file_google_api_monitoring_proto_rawDescData -} - -var file_google_api_monitoring_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_google_api_monitoring_proto_goTypes = []interface{}{ - (*Monitoring)(nil), // 0: google.api.Monitoring - (*Monitoring_MonitoringDestination)(nil), // 1: google.api.Monitoring.MonitoringDestination -} -var file_google_api_monitoring_proto_depIdxs = []int32{ - 1, // 0: google.api.Monitoring.producer_destinations:type_name -> google.api.Monitoring.MonitoringDestination - 1, // 1: google.api.Monitoring.consumer_destinations:type_name -> google.api.Monitoring.MonitoringDestination - 2, // [2:2] is the sub-list for method output_type - 2, // [2:2] is the sub-list for method input_type - 2, // [2:2] is the sub-list for extension type_name - 2, // [2:2] is the sub-list for extension extendee - 0, // [0:2] is the sub-list for field type_name -} - -func init() { file_google_api_monitoring_proto_init() } -func file_google_api_monitoring_proto_init() { - if File_google_api_monitoring_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_google_api_monitoring_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Monitoring); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_api_monitoring_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Monitoring_MonitoringDestination); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_google_api_monitoring_proto_rawDesc, - NumEnums: 0, - NumMessages: 2, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_google_api_monitoring_proto_goTypes, - DependencyIndexes: file_google_api_monitoring_proto_depIdxs, - MessageInfos: file_google_api_monitoring_proto_msgTypes, - }.Build() - File_google_api_monitoring_proto = out.File - file_google_api_monitoring_proto_rawDesc = nil - file_google_api_monitoring_proto_goTypes = nil - file_google_api_monitoring_proto_depIdxs = nil -} diff --git a/vendor/google.golang.org/genproto/googleapis/api/serviceconfig/policy.pb.go b/vendor/google.golang.org/genproto/googleapis/api/serviceconfig/policy.pb.go deleted file mode 100644 index 1c22a52ee1..0000000000 --- a/vendor/google.golang.org/genproto/googleapis/api/serviceconfig/policy.pb.go +++ /dev/null @@ -1,351 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.26.0 -// protoc v4.24.4 -// source: google/api/policy.proto - -package serviceconfig - -import ( - reflect "reflect" - sync "sync" - - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - descriptorpb "google.golang.org/protobuf/types/descriptorpb" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// Google API Policy Annotation -// -// This message defines a simple API policy annotation that can be used to -// annotate API request and response message fields with applicable policies. -// One field may have multiple applicable policies that must all be satisfied -// before a request can be processed. This policy annotation is used to -// generate the overall policy that will be used for automatic runtime -// policy enforcement and documentation generation. -type FieldPolicy struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Selects one or more request or response message fields to apply this - // `FieldPolicy`. - // - // When a `FieldPolicy` is used in proto annotation, the selector must - // be left as empty. The service config generator will automatically fill - // the correct value. - // - // When a `FieldPolicy` is used in service config, the selector must be a - // comma-separated string with valid request or response field paths, - // such as "foo.bar" or "foo.bar,foo.baz". - Selector string `protobuf:"bytes,1,opt,name=selector,proto3" json:"selector,omitempty"` - // Specifies the required permission(s) for the resource referred to by the - // field. It requires the field contains a valid resource reference, and - // the request must pass the permission checks to proceed. For example, - // "resourcemanager.projects.get". - ResourcePermission string `protobuf:"bytes,2,opt,name=resource_permission,json=resourcePermission,proto3" json:"resource_permission,omitempty"` - // Specifies the resource type for the resource referred to by the field. - ResourceType string `protobuf:"bytes,3,opt,name=resource_type,json=resourceType,proto3" json:"resource_type,omitempty"` -} - -func (x *FieldPolicy) Reset() { - *x = FieldPolicy{} - if protoimpl.UnsafeEnabled { - mi := &file_google_api_policy_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *FieldPolicy) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*FieldPolicy) ProtoMessage() {} - -func (x *FieldPolicy) ProtoReflect() protoreflect.Message { - mi := &file_google_api_policy_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use FieldPolicy.ProtoReflect.Descriptor instead. -func (*FieldPolicy) Descriptor() ([]byte, []int) { - return file_google_api_policy_proto_rawDescGZIP(), []int{0} -} - -func (x *FieldPolicy) GetSelector() string { - if x != nil { - return x.Selector - } - return "" -} - -func (x *FieldPolicy) GetResourcePermission() string { - if x != nil { - return x.ResourcePermission - } - return "" -} - -func (x *FieldPolicy) GetResourceType() string { - if x != nil { - return x.ResourceType - } - return "" -} - -// Defines policies applying to an RPC method. -type MethodPolicy struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Selects a method to which these policies should be enforced, for example, - // "google.pubsub.v1.Subscriber.CreateSubscription". - // - // Refer to [selector][google.api.DocumentationRule.selector] for syntax - // details. - // - // NOTE: This field must not be set in the proto annotation. It will be - // automatically filled by the service config compiler . - Selector string `protobuf:"bytes,9,opt,name=selector,proto3" json:"selector,omitempty"` - // Policies that are applicable to the request message. - RequestPolicies []*FieldPolicy `protobuf:"bytes,2,rep,name=request_policies,json=requestPolicies,proto3" json:"request_policies,omitempty"` -} - -func (x *MethodPolicy) Reset() { - *x = MethodPolicy{} - if protoimpl.UnsafeEnabled { - mi := &file_google_api_policy_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MethodPolicy) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MethodPolicy) ProtoMessage() {} - -func (x *MethodPolicy) ProtoReflect() protoreflect.Message { - mi := &file_google_api_policy_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use MethodPolicy.ProtoReflect.Descriptor instead. -func (*MethodPolicy) Descriptor() ([]byte, []int) { - return file_google_api_policy_proto_rawDescGZIP(), []int{1} -} - -func (x *MethodPolicy) GetSelector() string { - if x != nil { - return x.Selector - } - return "" -} - -func (x *MethodPolicy) GetRequestPolicies() []*FieldPolicy { - if x != nil { - return x.RequestPolicies - } - return nil -} - -var file_google_api_policy_proto_extTypes = []protoimpl.ExtensionInfo{ - { - ExtendedType: (*descriptorpb.FieldOptions)(nil), - ExtensionType: (*FieldPolicy)(nil), - Field: 158361448, - Name: "google.api.field_policy", - Tag: "bytes,158361448,opt,name=field_policy", - Filename: "google/api/policy.proto", - }, - { - ExtendedType: (*descriptorpb.MethodOptions)(nil), - ExtensionType: (*MethodPolicy)(nil), - Field: 161893301, - Name: "google.api.method_policy", - Tag: "bytes,161893301,opt,name=method_policy", - Filename: "google/api/policy.proto", - }, -} - -// Extension fields to descriptorpb.FieldOptions. -var ( - // See [FieldPolicy][]. - // - // optional google.api.FieldPolicy field_policy = 158361448; - E_FieldPolicy = &file_google_api_policy_proto_extTypes[0] -) - -// Extension fields to descriptorpb.MethodOptions. -var ( - // See [MethodPolicy][]. - // - // optional google.api.MethodPolicy method_policy = 161893301; - E_MethodPolicy = &file_google_api_policy_proto_extTypes[1] -) - -var File_google_api_policy_proto protoreflect.FileDescriptor - -var file_google_api_policy_proto_rawDesc = []byte{ - 0x0a, 0x17, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x70, 0x6f, 0x6c, - 0x69, 0x63, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0a, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x61, 0x70, 0x69, 0x1a, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, - 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x7f, 0x0a, 0x0b, 0x46, 0x69, 0x65, 0x6c, 0x64, - 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, - 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, - 0x6f, 0x72, 0x12, 0x2f, 0x0a, 0x13, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x70, - 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x12, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, - 0x69, 0x6f, 0x6e, 0x12, 0x23, 0x0a, 0x0d, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, - 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x72, 0x65, 0x73, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x22, 0x6e, 0x0a, 0x0c, 0x4d, 0x65, 0x74, 0x68, - 0x6f, 0x64, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x65, 0x6c, 0x65, - 0x63, 0x74, 0x6f, 0x72, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x73, 0x65, 0x6c, 0x65, - 0x63, 0x74, 0x6f, 0x72, 0x12, 0x42, 0x0a, 0x10, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, - 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x46, 0x69, 0x65, 0x6c, - 0x64, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x0f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x3a, 0x5c, 0x0a, 0x0c, 0x66, 0x69, 0x65, 0x6c, - 0x64, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, - 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xe8, 0xce, 0xc1, 0x4b, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x46, 0x69, - 0x65, 0x6c, 0x64, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x0b, 0x66, 0x69, 0x65, 0x6c, 0x64, - 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x3a, 0x60, 0x0a, 0x0d, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, - 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x1e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, - 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xb5, 0x97, 0x99, 0x4d, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x18, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4d, 0x65, - 0x74, 0x68, 0x6f, 0x64, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x0c, 0x6d, 0x65, 0x74, 0x68, - 0x6f, 0x64, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x42, 0x6d, 0x0a, 0x0e, 0x63, 0x6f, 0x6d, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x42, 0x0b, 0x50, 0x6f, 0x6c, 0x69, - 0x63, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x45, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x67, 0x65, 0x6e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, - 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x3b, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0xa2, 0x02, 0x04, 0x47, 0x41, 0x50, 0x49, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_google_api_policy_proto_rawDescOnce sync.Once - file_google_api_policy_proto_rawDescData = file_google_api_policy_proto_rawDesc -) - -func file_google_api_policy_proto_rawDescGZIP() []byte { - file_google_api_policy_proto_rawDescOnce.Do(func() { - file_google_api_policy_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_api_policy_proto_rawDescData) - }) - return file_google_api_policy_proto_rawDescData -} - -var file_google_api_policy_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_google_api_policy_proto_goTypes = []interface{}{ - (*FieldPolicy)(nil), // 0: google.api.FieldPolicy - (*MethodPolicy)(nil), // 1: google.api.MethodPolicy - (*descriptorpb.FieldOptions)(nil), // 2: google.protobuf.FieldOptions - (*descriptorpb.MethodOptions)(nil), // 3: google.protobuf.MethodOptions -} -var file_google_api_policy_proto_depIdxs = []int32{ - 0, // 0: google.api.MethodPolicy.request_policies:type_name -> google.api.FieldPolicy - 2, // 1: google.api.field_policy:extendee -> google.protobuf.FieldOptions - 3, // 2: google.api.method_policy:extendee -> google.protobuf.MethodOptions - 0, // 3: google.api.field_policy:type_name -> google.api.FieldPolicy - 1, // 4: google.api.method_policy:type_name -> google.api.MethodPolicy - 5, // [5:5] is the sub-list for method output_type - 5, // [5:5] is the sub-list for method input_type - 3, // [3:5] is the sub-list for extension type_name - 1, // [1:3] is the sub-list for extension extendee - 0, // [0:1] is the sub-list for field type_name -} - -func init() { file_google_api_policy_proto_init() } -func file_google_api_policy_proto_init() { - if File_google_api_policy_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_google_api_policy_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FieldPolicy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_api_policy_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MethodPolicy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_google_api_policy_proto_rawDesc, - NumEnums: 0, - NumMessages: 2, - NumExtensions: 2, - NumServices: 0, - }, - GoTypes: file_google_api_policy_proto_goTypes, - DependencyIndexes: file_google_api_policy_proto_depIdxs, - MessageInfos: file_google_api_policy_proto_msgTypes, - ExtensionInfos: file_google_api_policy_proto_extTypes, - }.Build() - File_google_api_policy_proto = out.File - file_google_api_policy_proto_rawDesc = nil - file_google_api_policy_proto_goTypes = nil - file_google_api_policy_proto_depIdxs = nil -} diff --git a/vendor/google.golang.org/genproto/googleapis/api/serviceconfig/quota.pb.go b/vendor/google.golang.org/genproto/googleapis/api/serviceconfig/quota.pb.go deleted file mode 100644 index a7c235a9a3..0000000000 --- a/vendor/google.golang.org/genproto/googleapis/api/serviceconfig/quota.pb.go +++ /dev/null @@ -1,543 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.26.0 -// protoc v4.24.4 -// source: google/api/quota.proto - -package serviceconfig - -import ( - reflect "reflect" - sync "sync" - - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// Quota configuration helps to achieve fairness and budgeting in service -// usage. -// -// The metric based quota configuration works this way: -// - The service configuration defines a set of metrics. -// - For API calls, the quota.metric_rules maps methods to metrics with -// corresponding costs. -// - The quota.limits defines limits on the metrics, which will be used for -// quota checks at runtime. -// -// An example quota configuration in yaml format: -// -// quota: -// limits: -// -// - name: apiWriteQpsPerProject -// metric: library.googleapis.com/write_calls -// unit: "1/min/{project}" # rate limit for consumer projects -// values: -// STANDARD: 10000 -// -// -// (The metric rules bind all methods to the read_calls metric, -// except for the UpdateBook and DeleteBook methods. These two methods -// are mapped to the write_calls metric, with the UpdateBook method -// consuming at twice rate as the DeleteBook method.) -// metric_rules: -// - selector: "*" -// metric_costs: -// library.googleapis.com/read_calls: 1 -// - selector: google.example.library.v1.LibraryService.UpdateBook -// metric_costs: -// library.googleapis.com/write_calls: 2 -// - selector: google.example.library.v1.LibraryService.DeleteBook -// metric_costs: -// library.googleapis.com/write_calls: 1 -// -// Corresponding Metric definition: -// -// metrics: -// - name: library.googleapis.com/read_calls -// display_name: Read requests -// metric_kind: DELTA -// value_type: INT64 -// -// - name: library.googleapis.com/write_calls -// display_name: Write requests -// metric_kind: DELTA -// value_type: INT64 -type Quota struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // List of QuotaLimit definitions for the service. - Limits []*QuotaLimit `protobuf:"bytes,3,rep,name=limits,proto3" json:"limits,omitempty"` - // List of MetricRule definitions, each one mapping a selected method to one - // or more metrics. - MetricRules []*MetricRule `protobuf:"bytes,4,rep,name=metric_rules,json=metricRules,proto3" json:"metric_rules,omitempty"` -} - -func (x *Quota) Reset() { - *x = Quota{} - if protoimpl.UnsafeEnabled { - mi := &file_google_api_quota_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Quota) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Quota) ProtoMessage() {} - -func (x *Quota) ProtoReflect() protoreflect.Message { - mi := &file_google_api_quota_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Quota.ProtoReflect.Descriptor instead. -func (*Quota) Descriptor() ([]byte, []int) { - return file_google_api_quota_proto_rawDescGZIP(), []int{0} -} - -func (x *Quota) GetLimits() []*QuotaLimit { - if x != nil { - return x.Limits - } - return nil -} - -func (x *Quota) GetMetricRules() []*MetricRule { - if x != nil { - return x.MetricRules - } - return nil -} - -// Bind API methods to metrics. Binding a method to a metric causes that -// metric's configured quota behaviors to apply to the method call. -type MetricRule struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Selects the methods to which this rule applies. - // - // Refer to [selector][google.api.DocumentationRule.selector] for syntax - // details. - Selector string `protobuf:"bytes,1,opt,name=selector,proto3" json:"selector,omitempty"` - // Metrics to update when the selected methods are called, and the associated - // cost applied to each metric. - // - // The key of the map is the metric name, and the values are the amount - // increased for the metric against which the quota limits are defined. - // The value must not be negative. - MetricCosts map[string]int64 `protobuf:"bytes,2,rep,name=metric_costs,json=metricCosts,proto3" json:"metric_costs,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` -} - -func (x *MetricRule) Reset() { - *x = MetricRule{} - if protoimpl.UnsafeEnabled { - mi := &file_google_api_quota_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MetricRule) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MetricRule) ProtoMessage() {} - -func (x *MetricRule) ProtoReflect() protoreflect.Message { - mi := &file_google_api_quota_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use MetricRule.ProtoReflect.Descriptor instead. -func (*MetricRule) Descriptor() ([]byte, []int) { - return file_google_api_quota_proto_rawDescGZIP(), []int{1} -} - -func (x *MetricRule) GetSelector() string { - if x != nil { - return x.Selector - } - return "" -} - -func (x *MetricRule) GetMetricCosts() map[string]int64 { - if x != nil { - return x.MetricCosts - } - return nil -} - -// `QuotaLimit` defines a specific limit that applies over a specified duration -// for a limit type. There can be at most one limit for a duration and limit -// type combination defined within a `QuotaGroup`. -type QuotaLimit struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Name of the quota limit. - // - // The name must be provided, and it must be unique within the service. The - // name can only include alphanumeric characters as well as '-'. - // - // The maximum length of the limit name is 64 characters. - Name string `protobuf:"bytes,6,opt,name=name,proto3" json:"name,omitempty"` - // Optional. User-visible, extended description for this quota limit. - // Should be used only when more context is needed to understand this limit - // than provided by the limit's display name (see: `display_name`). - Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` - // Default number of tokens that can be consumed during the specified - // duration. This is the number of tokens assigned when a client - // application developer activates the service for his/her project. - // - // Specifying a value of 0 will block all requests. This can be used if you - // are provisioning quota to selected consumers and blocking others. - // Similarly, a value of -1 will indicate an unlimited quota. No other - // negative values are allowed. - // - // Used by group-based quotas only. - DefaultLimit int64 `protobuf:"varint,3,opt,name=default_limit,json=defaultLimit,proto3" json:"default_limit,omitempty"` - // Maximum number of tokens that can be consumed during the specified - // duration. Client application developers can override the default limit up - // to this maximum. If specified, this value cannot be set to a value less - // than the default limit. If not specified, it is set to the default limit. - // - // To allow clients to apply overrides with no upper bound, set this to -1, - // indicating unlimited maximum quota. - // - // Used by group-based quotas only. - MaxLimit int64 `protobuf:"varint,4,opt,name=max_limit,json=maxLimit,proto3" json:"max_limit,omitempty"` - // Free tier value displayed in the Developers Console for this limit. - // The free tier is the number of tokens that will be subtracted from the - // billed amount when billing is enabled. - // This field can only be set on a limit with duration "1d", in a billable - // group; it is invalid on any other limit. If this field is not set, it - // defaults to 0, indicating that there is no free tier for this service. - // - // Used by group-based quotas only. - FreeTier int64 `protobuf:"varint,7,opt,name=free_tier,json=freeTier,proto3" json:"free_tier,omitempty"` - // Duration of this limit in textual notation. Must be "100s" or "1d". - // - // Used by group-based quotas only. - Duration string `protobuf:"bytes,5,opt,name=duration,proto3" json:"duration,omitempty"` - // The name of the metric this quota limit applies to. The quota limits with - // the same metric will be checked together during runtime. The metric must be - // defined within the service config. - Metric string `protobuf:"bytes,8,opt,name=metric,proto3" json:"metric,omitempty"` - // Specify the unit of the quota limit. It uses the same syntax as - // [MetricDescriptor.unit][google.api.MetricDescriptor.unit]. The supported - // unit kinds are determined by the quota backend system. - // - // Here are some examples: - // * "1/min/{project}" for quota per minute per project. - // - // Note: the order of unit components is insignificant. - // The "1" at the beginning is required to follow the metric unit syntax. - Unit string `protobuf:"bytes,9,opt,name=unit,proto3" json:"unit,omitempty"` - // Tiered limit values. You must specify this as a key:value pair, with an - // integer value that is the maximum number of requests allowed for the - // specified unit. Currently only STANDARD is supported. - Values map[string]int64 `protobuf:"bytes,10,rep,name=values,proto3" json:"values,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` - // User-visible display name for this limit. - // Optional. If not set, the UI will provide a default display name based on - // the quota configuration. This field can be used to override the default - // display name generated from the configuration. - DisplayName string `protobuf:"bytes,12,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"` -} - -func (x *QuotaLimit) Reset() { - *x = QuotaLimit{} - if protoimpl.UnsafeEnabled { - mi := &file_google_api_quota_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QuotaLimit) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QuotaLimit) ProtoMessage() {} - -func (x *QuotaLimit) ProtoReflect() protoreflect.Message { - mi := &file_google_api_quota_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use QuotaLimit.ProtoReflect.Descriptor instead. -func (*QuotaLimit) Descriptor() ([]byte, []int) { - return file_google_api_quota_proto_rawDescGZIP(), []int{2} -} - -func (x *QuotaLimit) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *QuotaLimit) GetDescription() string { - if x != nil { - return x.Description - } - return "" -} - -func (x *QuotaLimit) GetDefaultLimit() int64 { - if x != nil { - return x.DefaultLimit - } - return 0 -} - -func (x *QuotaLimit) GetMaxLimit() int64 { - if x != nil { - return x.MaxLimit - } - return 0 -} - -func (x *QuotaLimit) GetFreeTier() int64 { - if x != nil { - return x.FreeTier - } - return 0 -} - -func (x *QuotaLimit) GetDuration() string { - if x != nil { - return x.Duration - } - return "" -} - -func (x *QuotaLimit) GetMetric() string { - if x != nil { - return x.Metric - } - return "" -} - -func (x *QuotaLimit) GetUnit() string { - if x != nil { - return x.Unit - } - return "" -} - -func (x *QuotaLimit) GetValues() map[string]int64 { - if x != nil { - return x.Values - } - return nil -} - -func (x *QuotaLimit) GetDisplayName() string { - if x != nil { - return x.DisplayName - } - return "" -} - -var File_google_api_quota_proto protoreflect.FileDescriptor - -var file_google_api_quota_proto_rawDesc = []byte{ - 0x0a, 0x16, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x71, 0x75, 0x6f, - 0x74, 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0a, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x61, 0x70, 0x69, 0x22, 0x72, 0x0a, 0x05, 0x51, 0x75, 0x6f, 0x74, 0x61, 0x12, 0x2e, 0x0a, - 0x06, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x51, 0x75, 0x6f, 0x74, 0x61, - 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x52, 0x06, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x73, 0x12, 0x39, 0x0a, - 0x0c, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x18, 0x04, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, - 0x2e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x52, 0x75, 0x6c, 0x65, 0x52, 0x0b, 0x6d, 0x65, 0x74, - 0x72, 0x69, 0x63, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x22, 0xb4, 0x01, 0x0a, 0x0a, 0x4d, 0x65, 0x74, - 0x72, 0x69, 0x63, 0x52, 0x75, 0x6c, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x65, 0x6c, 0x65, 0x63, - 0x74, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x73, 0x65, 0x6c, 0x65, 0x63, - 0x74, 0x6f, 0x72, 0x12, 0x4a, 0x0a, 0x0c, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x63, 0x6f, - 0x73, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x52, 0x75, 0x6c, - 0x65, 0x2e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x43, 0x6f, 0x73, 0x74, 0x73, 0x45, 0x6e, 0x74, - 0x72, 0x79, 0x52, 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x43, 0x6f, 0x73, 0x74, 0x73, 0x1a, - 0x3e, 0x0a, 0x10, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x43, 0x6f, 0x73, 0x74, 0x73, 0x45, 0x6e, - 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, - 0x83, 0x03, 0x0a, 0x0a, 0x51, 0x75, 0x6f, 0x74, 0x61, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x12, - 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, - 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, - 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x23, 0x0a, 0x0d, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, - 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x64, 0x65, 0x66, - 0x61, 0x75, 0x6c, 0x74, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x78, - 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x6d, 0x61, - 0x78, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x66, 0x72, 0x65, 0x65, 0x5f, 0x74, - 0x69, 0x65, 0x72, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x66, 0x72, 0x65, 0x65, 0x54, - 0x69, 0x65, 0x72, 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, - 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, - 0x16, 0x0a, 0x06, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x06, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x6e, 0x69, 0x74, 0x18, - 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x75, 0x6e, 0x69, 0x74, 0x12, 0x3a, 0x0a, 0x06, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x51, 0x75, 0x6f, 0x74, 0x61, 0x4c, 0x69, - 0x6d, 0x69, 0x74, 0x2e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, - 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x64, 0x69, 0x73, 0x70, 0x6c, - 0x61, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, - 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x1a, 0x39, 0x0a, 0x0b, 0x56, 0x61, - 0x6c, 0x75, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x3a, 0x02, 0x38, 0x01, 0x42, 0x6c, 0x0a, 0x0e, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x42, 0x0a, 0x51, 0x75, 0x6f, 0x74, 0x61, 0x50, 0x72, - 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x45, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f, - 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x67, 0x65, 0x6e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x61, 0x70, 0x69, - 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x3b, 0x73, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0xa2, 0x02, 0x04, 0x47, - 0x41, 0x50, 0x49, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_google_api_quota_proto_rawDescOnce sync.Once - file_google_api_quota_proto_rawDescData = file_google_api_quota_proto_rawDesc -) - -func file_google_api_quota_proto_rawDescGZIP() []byte { - file_google_api_quota_proto_rawDescOnce.Do(func() { - file_google_api_quota_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_api_quota_proto_rawDescData) - }) - return file_google_api_quota_proto_rawDescData -} - -var file_google_api_quota_proto_msgTypes = make([]protoimpl.MessageInfo, 5) -var file_google_api_quota_proto_goTypes = []interface{}{ - (*Quota)(nil), // 0: google.api.Quota - (*MetricRule)(nil), // 1: google.api.MetricRule - (*QuotaLimit)(nil), // 2: google.api.QuotaLimit - nil, // 3: google.api.MetricRule.MetricCostsEntry - nil, // 4: google.api.QuotaLimit.ValuesEntry -} -var file_google_api_quota_proto_depIdxs = []int32{ - 2, // 0: google.api.Quota.limits:type_name -> google.api.QuotaLimit - 1, // 1: google.api.Quota.metric_rules:type_name -> google.api.MetricRule - 3, // 2: google.api.MetricRule.metric_costs:type_name -> google.api.MetricRule.MetricCostsEntry - 4, // 3: google.api.QuotaLimit.values:type_name -> google.api.QuotaLimit.ValuesEntry - 4, // [4:4] is the sub-list for method output_type - 4, // [4:4] is the sub-list for method input_type - 4, // [4:4] is the sub-list for extension type_name - 4, // [4:4] is the sub-list for extension extendee - 0, // [0:4] is the sub-list for field type_name -} - -func init() { file_google_api_quota_proto_init() } -func file_google_api_quota_proto_init() { - if File_google_api_quota_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_google_api_quota_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Quota); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_api_quota_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MetricRule); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_api_quota_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QuotaLimit); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_google_api_quota_proto_rawDesc, - NumEnums: 0, - NumMessages: 5, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_google_api_quota_proto_goTypes, - DependencyIndexes: file_google_api_quota_proto_depIdxs, - MessageInfos: file_google_api_quota_proto_msgTypes, - }.Build() - File_google_api_quota_proto = out.File - file_google_api_quota_proto_rawDesc = nil - file_google_api_quota_proto_goTypes = nil - file_google_api_quota_proto_depIdxs = nil -} diff --git a/vendor/google.golang.org/genproto/googleapis/api/serviceconfig/service.pb.go b/vendor/google.golang.org/genproto/googleapis/api/serviceconfig/service.pb.go deleted file mode 100644 index ace5397069..0000000000 --- a/vendor/google.golang.org/genproto/googleapis/api/serviceconfig/service.pb.go +++ /dev/null @@ -1,633 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.26.0 -// protoc v4.24.4 -// source: google/api/service.proto - -package serviceconfig - -import ( - reflect "reflect" - sync "sync" - - annotations "google.golang.org/genproto/googleapis/api/annotations" - metric "google.golang.org/genproto/googleapis/api/metric" - monitoredres "google.golang.org/genproto/googleapis/api/monitoredres" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - apipb "google.golang.org/protobuf/types/known/apipb" - typepb "google.golang.org/protobuf/types/known/typepb" - wrapperspb "google.golang.org/protobuf/types/known/wrapperspb" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// `Service` is the root object of Google API service configuration (service -// config). It describes the basic information about a logical service, -// such as the service name and the user-facing title, and delegates other -// aspects to sub-sections. Each sub-section is either a proto message or a -// repeated proto message that configures a specific aspect, such as auth. -// For more information, see each proto message definition. -// -// Example: -// -// type: google.api.Service -// name: calendar.googleapis.com -// title: Google Calendar API -// apis: -// - name: google.calendar.v3.Calendar -// -// visibility: -// rules: -// - selector: "google.calendar.v3.*" -// restriction: PREVIEW -// backend: -// rules: -// - selector: "google.calendar.v3.*" -// address: calendar.example.com -// -// authentication: -// providers: -// - id: google_calendar_auth -// jwks_uri: https://www.googleapis.com/oauth2/v1/certs -// issuer: https://securetoken.google.com -// rules: -// - selector: "*" -// requirements: -// provider_id: google_calendar_auth -type Service struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The service name, which is a DNS-like logical identifier for the - // service, such as `calendar.googleapis.com`. The service name - // typically goes through DNS verification to make sure the owner - // of the service also owns the DNS name. - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // The product title for this service, it is the name displayed in Google - // Cloud Console. - Title string `protobuf:"bytes,2,opt,name=title,proto3" json:"title,omitempty"` - // The Google project that owns this service. - ProducerProjectId string `protobuf:"bytes,22,opt,name=producer_project_id,json=producerProjectId,proto3" json:"producer_project_id,omitempty"` - // A unique ID for a specific instance of this message, typically assigned - // by the client for tracking purpose. Must be no longer than 63 characters - // and only lower case letters, digits, '.', '_' and '-' are allowed. If - // empty, the server may choose to generate one instead. - Id string `protobuf:"bytes,33,opt,name=id,proto3" json:"id,omitempty"` - // A list of API interfaces exported by this service. Only the `name` field - // of the [google.protobuf.Api][google.protobuf.Api] needs to be provided by - // the configuration author, as the remaining fields will be derived from the - // IDL during the normalization process. It is an error to specify an API - // interface here which cannot be resolved against the associated IDL files. - Apis []*apipb.Api `protobuf:"bytes,3,rep,name=apis,proto3" json:"apis,omitempty"` - // A list of all proto message types included in this API service. - // Types referenced directly or indirectly by the `apis` are automatically - // included. Messages which are not referenced but shall be included, such as - // types used by the `google.protobuf.Any` type, should be listed here by - // name by the configuration author. Example: - // - // types: - // - name: google.protobuf.Int32 - Types []*typepb.Type `protobuf:"bytes,4,rep,name=types,proto3" json:"types,omitempty"` - // A list of all enum types included in this API service. Enums referenced - // directly or indirectly by the `apis` are automatically included. Enums - // which are not referenced but shall be included should be listed here by - // name by the configuration author. Example: - // - // enums: - // - name: google.someapi.v1.SomeEnum - Enums []*typepb.Enum `protobuf:"bytes,5,rep,name=enums,proto3" json:"enums,omitempty"` - // Additional API documentation. - Documentation *Documentation `protobuf:"bytes,6,opt,name=documentation,proto3" json:"documentation,omitempty"` - // API backend configuration. - Backend *Backend `protobuf:"bytes,8,opt,name=backend,proto3" json:"backend,omitempty"` - // HTTP configuration. - Http *annotations.Http `protobuf:"bytes,9,opt,name=http,proto3" json:"http,omitempty"` - // Quota configuration. - Quota *Quota `protobuf:"bytes,10,opt,name=quota,proto3" json:"quota,omitempty"` - // Auth configuration. - Authentication *Authentication `protobuf:"bytes,11,opt,name=authentication,proto3" json:"authentication,omitempty"` - // Context configuration. - Context *Context `protobuf:"bytes,12,opt,name=context,proto3" json:"context,omitempty"` - // Configuration controlling usage of this service. - Usage *Usage `protobuf:"bytes,15,opt,name=usage,proto3" json:"usage,omitempty"` - // Configuration for network endpoints. If this is empty, then an endpoint - // with the same name as the service is automatically generated to service all - // defined APIs. - Endpoints []*Endpoint `protobuf:"bytes,18,rep,name=endpoints,proto3" json:"endpoints,omitempty"` - // Configuration for the service control plane. - Control *Control `protobuf:"bytes,21,opt,name=control,proto3" json:"control,omitempty"` - // Defines the logs used by this service. - Logs []*LogDescriptor `protobuf:"bytes,23,rep,name=logs,proto3" json:"logs,omitempty"` - // Defines the metrics used by this service. - Metrics []*metric.MetricDescriptor `protobuf:"bytes,24,rep,name=metrics,proto3" json:"metrics,omitempty"` - // Defines the monitored resources used by this service. This is required - // by the `Service.monitoring` and `Service.logging` configurations. - MonitoredResources []*monitoredres.MonitoredResourceDescriptor `protobuf:"bytes,25,rep,name=monitored_resources,json=monitoredResources,proto3" json:"monitored_resources,omitempty"` - // Billing configuration. - Billing *Billing `protobuf:"bytes,26,opt,name=billing,proto3" json:"billing,omitempty"` - // Logging configuration. - Logging *Logging `protobuf:"bytes,27,opt,name=logging,proto3" json:"logging,omitempty"` - // Monitoring configuration. - Monitoring *Monitoring `protobuf:"bytes,28,opt,name=monitoring,proto3" json:"monitoring,omitempty"` - // System parameter configuration. - SystemParameters *SystemParameters `protobuf:"bytes,29,opt,name=system_parameters,json=systemParameters,proto3" json:"system_parameters,omitempty"` - // Output only. The source information for this configuration if available. - SourceInfo *SourceInfo `protobuf:"bytes,37,opt,name=source_info,json=sourceInfo,proto3" json:"source_info,omitempty"` - // Settings for [Google Cloud Client - // libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) - // generated from APIs defined as protocol buffers. - Publishing *annotations.Publishing `protobuf:"bytes,45,opt,name=publishing,proto3" json:"publishing,omitempty"` - // Obsolete. Do not use. - // - // This field has no semantic meaning. The service config compiler always - // sets this field to `3`. - ConfigVersion *wrapperspb.UInt32Value `protobuf:"bytes,20,opt,name=config_version,json=configVersion,proto3" json:"config_version,omitempty"` -} - -func (x *Service) Reset() { - *x = Service{} - if protoimpl.UnsafeEnabled { - mi := &file_google_api_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Service) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Service) ProtoMessage() {} - -func (x *Service) ProtoReflect() protoreflect.Message { - mi := &file_google_api_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Service.ProtoReflect.Descriptor instead. -func (*Service) Descriptor() ([]byte, []int) { - return file_google_api_service_proto_rawDescGZIP(), []int{0} -} - -func (x *Service) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *Service) GetTitle() string { - if x != nil { - return x.Title - } - return "" -} - -func (x *Service) GetProducerProjectId() string { - if x != nil { - return x.ProducerProjectId - } - return "" -} - -func (x *Service) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -func (x *Service) GetApis() []*apipb.Api { - if x != nil { - return x.Apis - } - return nil -} - -func (x *Service) GetTypes() []*typepb.Type { - if x != nil { - return x.Types - } - return nil -} - -func (x *Service) GetEnums() []*typepb.Enum { - if x != nil { - return x.Enums - } - return nil -} - -func (x *Service) GetDocumentation() *Documentation { - if x != nil { - return x.Documentation - } - return nil -} - -func (x *Service) GetBackend() *Backend { - if x != nil { - return x.Backend - } - return nil -} - -func (x *Service) GetHttp() *annotations.Http { - if x != nil { - return x.Http - } - return nil -} - -func (x *Service) GetQuota() *Quota { - if x != nil { - return x.Quota - } - return nil -} - -func (x *Service) GetAuthentication() *Authentication { - if x != nil { - return x.Authentication - } - return nil -} - -func (x *Service) GetContext() *Context { - if x != nil { - return x.Context - } - return nil -} - -func (x *Service) GetUsage() *Usage { - if x != nil { - return x.Usage - } - return nil -} - -func (x *Service) GetEndpoints() []*Endpoint { - if x != nil { - return x.Endpoints - } - return nil -} - -func (x *Service) GetControl() *Control { - if x != nil { - return x.Control - } - return nil -} - -func (x *Service) GetLogs() []*LogDescriptor { - if x != nil { - return x.Logs - } - return nil -} - -func (x *Service) GetMetrics() []*metric.MetricDescriptor { - if x != nil { - return x.Metrics - } - return nil -} - -func (x *Service) GetMonitoredResources() []*monitoredres.MonitoredResourceDescriptor { - if x != nil { - return x.MonitoredResources - } - return nil -} - -func (x *Service) GetBilling() *Billing { - if x != nil { - return x.Billing - } - return nil -} - -func (x *Service) GetLogging() *Logging { - if x != nil { - return x.Logging - } - return nil -} - -func (x *Service) GetMonitoring() *Monitoring { - if x != nil { - return x.Monitoring - } - return nil -} - -func (x *Service) GetSystemParameters() *SystemParameters { - if x != nil { - return x.SystemParameters - } - return nil -} - -func (x *Service) GetSourceInfo() *SourceInfo { - if x != nil { - return x.SourceInfo - } - return nil -} - -func (x *Service) GetPublishing() *annotations.Publishing { - if x != nil { - return x.Publishing - } - return nil -} - -func (x *Service) GetConfigVersion() *wrapperspb.UInt32Value { - if x != nil { - return x.ConfigVersion - } - return nil -} - -var File_google_api_service_proto protoreflect.FileDescriptor - -var file_google_api_service_proto_rawDesc = []byte{ - 0x0a, 0x18, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0a, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x1a, 0x15, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, - 0x70, 0x69, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x18, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, - 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x18, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, - 0x61, 0x70, 0x69, 0x2f, 0x62, 0x69, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x1a, 0x17, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6c, - 0x69, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x18, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x18, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, - 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x64, 0x6f, 0x63, 0x75, 0x6d, - 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x65, 0x6e, 0x64, 0x70, 0x6f, - 0x69, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x15, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x1a, 0x14, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6c, 0x6f, 0x67, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x18, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, - 0x70, 0x69, 0x2f, 0x6c, 0x6f, 0x67, 0x67, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x1a, 0x17, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6d, 0x65, 0x74, - 0x72, 0x69, 0x63, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x23, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x65, 0x64, 0x5f, - 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6d, 0x6f, 0x6e, 0x69, 0x74, - 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x16, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x71, 0x75, 0x6f, 0x74, 0x61, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, - 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x1a, 0x21, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x79, - 0x73, 0x74, 0x65, 0x6d, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x16, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, - 0x2f, 0x75, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x70, - 0x69, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1a, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x22, 0x8d, 0x0a, 0x0a, 0x07, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, - 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, - 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x12, 0x2e, 0x0a, 0x13, 0x70, 0x72, 0x6f, - 0x64, 0x75, 0x63, 0x65, 0x72, 0x5f, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, - 0x18, 0x16, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x65, 0x72, - 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x49, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, - 0x21, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x28, 0x0a, 0x04, 0x61, 0x70, 0x69, - 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x70, 0x69, 0x52, 0x04, 0x61, - 0x70, 0x69, 0x73, 0x12, 0x2b, 0x0a, 0x05, 0x74, 0x79, 0x70, 0x65, 0x73, 0x18, 0x04, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x05, 0x74, 0x79, 0x70, 0x65, 0x73, - 0x12, 0x2b, 0x0a, 0x05, 0x65, 0x6e, 0x75, 0x6d, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x15, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x52, 0x05, 0x65, 0x6e, 0x75, 0x6d, 0x73, 0x12, 0x3f, 0x0a, - 0x0d, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x06, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, - 0x69, 0x2e, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, - 0x0d, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2d, - 0x0a, 0x07, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x13, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x42, 0x61, 0x63, - 0x6b, 0x65, 0x6e, 0x64, 0x52, 0x07, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x12, 0x24, 0x0a, - 0x04, 0x68, 0x74, 0x74, 0x70, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x52, 0x04, 0x68, - 0x74, 0x74, 0x70, 0x12, 0x27, 0x0a, 0x05, 0x71, 0x75, 0x6f, 0x74, 0x61, 0x18, 0x0a, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, - 0x51, 0x75, 0x6f, 0x74, 0x61, 0x52, 0x05, 0x71, 0x75, 0x6f, 0x74, 0x61, 0x12, 0x42, 0x0a, 0x0e, - 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x0b, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, - 0x69, 0x2e, 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x52, 0x0e, 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x12, 0x2d, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x18, 0x0c, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x13, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x43, - 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x12, - 0x27, 0x0a, 0x05, 0x75, 0x73, 0x61, 0x67, 0x65, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x55, 0x73, 0x61, 0x67, - 0x65, 0x52, 0x05, 0x75, 0x73, 0x61, 0x67, 0x65, 0x12, 0x32, 0x0a, 0x09, 0x65, 0x6e, 0x64, 0x70, - 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x18, 0x12, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, - 0x74, 0x52, 0x09, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x12, 0x2d, 0x0a, 0x07, - 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x18, 0x15, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x72, - 0x6f, 0x6c, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x12, 0x2d, 0x0a, 0x04, 0x6c, - 0x6f, 0x67, 0x73, 0x18, 0x17, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x6f, 0x67, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, - 0x70, 0x74, 0x6f, 0x72, 0x52, 0x04, 0x6c, 0x6f, 0x67, 0x73, 0x12, 0x36, 0x0a, 0x07, 0x6d, 0x65, - 0x74, 0x72, 0x69, 0x63, 0x73, 0x18, 0x18, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x44, - 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x52, 0x07, 0x6d, 0x65, 0x74, 0x72, 0x69, - 0x63, 0x73, 0x12, 0x58, 0x0a, 0x13, 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x65, 0x64, 0x5f, - 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x18, 0x19, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x27, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4d, 0x6f, 0x6e, - 0x69, 0x74, 0x6f, 0x72, 0x65, 0x64, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x44, 0x65, - 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x52, 0x12, 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, - 0x72, 0x65, 0x64, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x2d, 0x0a, 0x07, - 0x62, 0x69, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x18, 0x1a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x42, 0x69, 0x6c, 0x6c, 0x69, - 0x6e, 0x67, 0x52, 0x07, 0x62, 0x69, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x12, 0x2d, 0x0a, 0x07, 0x6c, - 0x6f, 0x67, 0x67, 0x69, 0x6e, 0x67, 0x18, 0x1b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x6f, 0x67, 0x67, 0x69, 0x6e, - 0x67, 0x52, 0x07, 0x6c, 0x6f, 0x67, 0x67, 0x69, 0x6e, 0x67, 0x12, 0x36, 0x0a, 0x0a, 0x6d, 0x6f, - 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x18, 0x1c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4d, 0x6f, 0x6e, 0x69, - 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x0a, 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, - 0x6e, 0x67, 0x12, 0x49, 0x0a, 0x11, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x5f, 0x70, 0x61, 0x72, - 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x18, 0x1d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x53, 0x79, 0x73, 0x74, 0x65, - 0x6d, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x52, 0x10, 0x73, 0x79, 0x73, - 0x74, 0x65, 0x6d, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x12, 0x37, 0x0a, - 0x0b, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x25, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, - 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0a, 0x73, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x36, 0x0a, 0x0a, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x73, - 0x68, 0x69, 0x6e, 0x67, 0x18, 0x2d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x69, - 0x6e, 0x67, 0x52, 0x0a, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x12, 0x43, - 0x0a, 0x0e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, - 0x18, 0x14, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, - 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0d, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x56, 0x65, 0x72, 0x73, - 0x69, 0x6f, 0x6e, 0x42, 0x6e, 0x0a, 0x0e, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x61, 0x70, 0x69, 0x42, 0x0c, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, - 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x45, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f, - 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x67, 0x65, 0x6e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x61, 0x70, 0x69, - 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x3b, 0x73, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0xa2, 0x02, 0x04, 0x47, - 0x41, 0x50, 0x49, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_google_api_service_proto_rawDescOnce sync.Once - file_google_api_service_proto_rawDescData = file_google_api_service_proto_rawDesc -) - -func file_google_api_service_proto_rawDescGZIP() []byte { - file_google_api_service_proto_rawDescOnce.Do(func() { - file_google_api_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_api_service_proto_rawDescData) - }) - return file_google_api_service_proto_rawDescData -} - -var file_google_api_service_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_google_api_service_proto_goTypes = []interface{}{ - (*Service)(nil), // 0: google.api.Service - (*apipb.Api)(nil), // 1: google.protobuf.Api - (*typepb.Type)(nil), // 2: google.protobuf.Type - (*typepb.Enum)(nil), // 3: google.protobuf.Enum - (*Documentation)(nil), // 4: google.api.Documentation - (*Backend)(nil), // 5: google.api.Backend - (*annotations.Http)(nil), // 6: google.api.Http - (*Quota)(nil), // 7: google.api.Quota - (*Authentication)(nil), // 8: google.api.Authentication - (*Context)(nil), // 9: google.api.Context - (*Usage)(nil), // 10: google.api.Usage - (*Endpoint)(nil), // 11: google.api.Endpoint - (*Control)(nil), // 12: google.api.Control - (*LogDescriptor)(nil), // 13: google.api.LogDescriptor - (*metric.MetricDescriptor)(nil), // 14: google.api.MetricDescriptor - (*monitoredres.MonitoredResourceDescriptor)(nil), // 15: google.api.MonitoredResourceDescriptor - (*Billing)(nil), // 16: google.api.Billing - (*Logging)(nil), // 17: google.api.Logging - (*Monitoring)(nil), // 18: google.api.Monitoring - (*SystemParameters)(nil), // 19: google.api.SystemParameters - (*SourceInfo)(nil), // 20: google.api.SourceInfo - (*annotations.Publishing)(nil), // 21: google.api.Publishing - (*wrapperspb.UInt32Value)(nil), // 22: google.protobuf.UInt32Value -} -var file_google_api_service_proto_depIdxs = []int32{ - 1, // 0: google.api.Service.apis:type_name -> google.protobuf.Api - 2, // 1: google.api.Service.types:type_name -> google.protobuf.Type - 3, // 2: google.api.Service.enums:type_name -> google.protobuf.Enum - 4, // 3: google.api.Service.documentation:type_name -> google.api.Documentation - 5, // 4: google.api.Service.backend:type_name -> google.api.Backend - 6, // 5: google.api.Service.http:type_name -> google.api.Http - 7, // 6: google.api.Service.quota:type_name -> google.api.Quota - 8, // 7: google.api.Service.authentication:type_name -> google.api.Authentication - 9, // 8: google.api.Service.context:type_name -> google.api.Context - 10, // 9: google.api.Service.usage:type_name -> google.api.Usage - 11, // 10: google.api.Service.endpoints:type_name -> google.api.Endpoint - 12, // 11: google.api.Service.control:type_name -> google.api.Control - 13, // 12: google.api.Service.logs:type_name -> google.api.LogDescriptor - 14, // 13: google.api.Service.metrics:type_name -> google.api.MetricDescriptor - 15, // 14: google.api.Service.monitored_resources:type_name -> google.api.MonitoredResourceDescriptor - 16, // 15: google.api.Service.billing:type_name -> google.api.Billing - 17, // 16: google.api.Service.logging:type_name -> google.api.Logging - 18, // 17: google.api.Service.monitoring:type_name -> google.api.Monitoring - 19, // 18: google.api.Service.system_parameters:type_name -> google.api.SystemParameters - 20, // 19: google.api.Service.source_info:type_name -> google.api.SourceInfo - 21, // 20: google.api.Service.publishing:type_name -> google.api.Publishing - 22, // 21: google.api.Service.config_version:type_name -> google.protobuf.UInt32Value - 22, // [22:22] is the sub-list for method output_type - 22, // [22:22] is the sub-list for method input_type - 22, // [22:22] is the sub-list for extension type_name - 22, // [22:22] is the sub-list for extension extendee - 0, // [0:22] is the sub-list for field type_name -} - -func init() { file_google_api_service_proto_init() } -func file_google_api_service_proto_init() { - if File_google_api_service_proto != nil { - return - } - file_google_api_auth_proto_init() - file_google_api_backend_proto_init() - file_google_api_billing_proto_init() - file_google_api_context_proto_init() - file_google_api_control_proto_init() - file_google_api_documentation_proto_init() - file_google_api_endpoint_proto_init() - file_google_api_log_proto_init() - file_google_api_logging_proto_init() - file_google_api_monitoring_proto_init() - file_google_api_quota_proto_init() - file_google_api_source_info_proto_init() - file_google_api_system_parameter_proto_init() - file_google_api_usage_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_api_service_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Service); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_google_api_service_proto_rawDesc, - NumEnums: 0, - NumMessages: 1, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_google_api_service_proto_goTypes, - DependencyIndexes: file_google_api_service_proto_depIdxs, - MessageInfos: file_google_api_service_proto_msgTypes, - }.Build() - File_google_api_service_proto = out.File - file_google_api_service_proto_rawDesc = nil - file_google_api_service_proto_goTypes = nil - file_google_api_service_proto_depIdxs = nil -} diff --git a/vendor/google.golang.org/genproto/googleapis/api/serviceconfig/source_info.pb.go b/vendor/google.golang.org/genproto/googleapis/api/serviceconfig/source_info.pb.go deleted file mode 100644 index 44b6970548..0000000000 --- a/vendor/google.golang.org/genproto/googleapis/api/serviceconfig/source_info.pb.go +++ /dev/null @@ -1,173 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.26.0 -// protoc v4.24.4 -// source: google/api/source_info.proto - -package serviceconfig - -import ( - reflect "reflect" - sync "sync" - - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - anypb "google.golang.org/protobuf/types/known/anypb" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// Source information used to create a Service Config -type SourceInfo struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // All files used during config generation. - SourceFiles []*anypb.Any `protobuf:"bytes,1,rep,name=source_files,json=sourceFiles,proto3" json:"source_files,omitempty"` -} - -func (x *SourceInfo) Reset() { - *x = SourceInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_api_source_info_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SourceInfo) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SourceInfo) ProtoMessage() {} - -func (x *SourceInfo) ProtoReflect() protoreflect.Message { - mi := &file_google_api_source_info_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SourceInfo.ProtoReflect.Descriptor instead. -func (*SourceInfo) Descriptor() ([]byte, []int) { - return file_google_api_source_info_proto_rawDescGZIP(), []int{0} -} - -func (x *SourceInfo) GetSourceFiles() []*anypb.Any { - if x != nil { - return x.SourceFiles - } - return nil -} - -var File_google_api_source_info_proto protoreflect.FileDescriptor - -var file_google_api_source_info_proto_rawDesc = []byte{ - 0x0a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0a, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6e, 0x79, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x45, 0x0a, 0x0a, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, - 0x6e, 0x66, 0x6f, 0x12, 0x37, 0x0a, 0x0c, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x66, 0x69, - 0x6c, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, - 0x0b, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x42, 0x71, 0x0a, 0x0e, - 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x42, 0x0f, - 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, - 0x01, 0x5a, 0x45, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, - 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x67, 0x65, 0x6e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x3b, 0x73, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0xa2, 0x02, 0x04, 0x47, 0x41, 0x50, 0x49, 0x62, - 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_google_api_source_info_proto_rawDescOnce sync.Once - file_google_api_source_info_proto_rawDescData = file_google_api_source_info_proto_rawDesc -) - -func file_google_api_source_info_proto_rawDescGZIP() []byte { - file_google_api_source_info_proto_rawDescOnce.Do(func() { - file_google_api_source_info_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_api_source_info_proto_rawDescData) - }) - return file_google_api_source_info_proto_rawDescData -} - -var file_google_api_source_info_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_google_api_source_info_proto_goTypes = []interface{}{ - (*SourceInfo)(nil), // 0: google.api.SourceInfo - (*anypb.Any)(nil), // 1: google.protobuf.Any -} -var file_google_api_source_info_proto_depIdxs = []int32{ - 1, // 0: google.api.SourceInfo.source_files:type_name -> google.protobuf.Any - 1, // [1:1] is the sub-list for method output_type - 1, // [1:1] is the sub-list for method input_type - 1, // [1:1] is the sub-list for extension type_name - 1, // [1:1] is the sub-list for extension extendee - 0, // [0:1] is the sub-list for field type_name -} - -func init() { file_google_api_source_info_proto_init() } -func file_google_api_source_info_proto_init() { - if File_google_api_source_info_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_google_api_source_info_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SourceInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_google_api_source_info_proto_rawDesc, - NumEnums: 0, - NumMessages: 1, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_google_api_source_info_proto_goTypes, - DependencyIndexes: file_google_api_source_info_proto_depIdxs, - MessageInfos: file_google_api_source_info_proto_msgTypes, - }.Build() - File_google_api_source_info_proto = out.File - file_google_api_source_info_proto_rawDesc = nil - file_google_api_source_info_proto_goTypes = nil - file_google_api_source_info_proto_depIdxs = nil -} diff --git a/vendor/google.golang.org/genproto/googleapis/api/serviceconfig/system_parameter.pb.go b/vendor/google.golang.org/genproto/googleapis/api/serviceconfig/system_parameter.pb.go deleted file mode 100644 index 91f9901d3e..0000000000 --- a/vendor/google.golang.org/genproto/googleapis/api/serviceconfig/system_parameter.pb.go +++ /dev/null @@ -1,382 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.26.0 -// protoc v4.24.4 -// source: google/api/system_parameter.proto - -package serviceconfig - -import ( - reflect "reflect" - sync "sync" - - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// ### System parameter configuration -// -// A system parameter is a special kind of parameter defined by the API -// system, not by an individual API. It is typically mapped to an HTTP header -// and/or a URL query parameter. This configuration specifies which methods -// change the names of the system parameters. -type SystemParameters struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Define system parameters. - // - // The parameters defined here will override the default parameters - // implemented by the system. If this field is missing from the service - // config, default system parameters will be used. Default system parameters - // and names is implementation-dependent. - // - // Example: define api key for all methods - // - // system_parameters - // rules: - // - selector: "*" - // parameters: - // - name: api_key - // url_query_parameter: api_key - // - // Example: define 2 api key names for a specific method. - // - // system_parameters - // rules: - // - selector: "/ListShelves" - // parameters: - // - name: api_key - // http_header: Api-Key1 - // - name: api_key - // http_header: Api-Key2 - // - // **NOTE:** All service configuration rules follow "last one wins" order. - Rules []*SystemParameterRule `protobuf:"bytes,1,rep,name=rules,proto3" json:"rules,omitempty"` -} - -func (x *SystemParameters) Reset() { - *x = SystemParameters{} - if protoimpl.UnsafeEnabled { - mi := &file_google_api_system_parameter_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SystemParameters) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SystemParameters) ProtoMessage() {} - -func (x *SystemParameters) ProtoReflect() protoreflect.Message { - mi := &file_google_api_system_parameter_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SystemParameters.ProtoReflect.Descriptor instead. -func (*SystemParameters) Descriptor() ([]byte, []int) { - return file_google_api_system_parameter_proto_rawDescGZIP(), []int{0} -} - -func (x *SystemParameters) GetRules() []*SystemParameterRule { - if x != nil { - return x.Rules - } - return nil -} - -// Define a system parameter rule mapping system parameter definitions to -// methods. -type SystemParameterRule struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Selects the methods to which this rule applies. Use '*' to indicate all - // methods in all APIs. - // - // Refer to [selector][google.api.DocumentationRule.selector] for syntax - // details. - Selector string `protobuf:"bytes,1,opt,name=selector,proto3" json:"selector,omitempty"` - // Define parameters. Multiple names may be defined for a parameter. - // For a given method call, only one of them should be used. If multiple - // names are used the behavior is implementation-dependent. - // If none of the specified names are present the behavior is - // parameter-dependent. - Parameters []*SystemParameter `protobuf:"bytes,2,rep,name=parameters,proto3" json:"parameters,omitempty"` -} - -func (x *SystemParameterRule) Reset() { - *x = SystemParameterRule{} - if protoimpl.UnsafeEnabled { - mi := &file_google_api_system_parameter_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SystemParameterRule) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SystemParameterRule) ProtoMessage() {} - -func (x *SystemParameterRule) ProtoReflect() protoreflect.Message { - mi := &file_google_api_system_parameter_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SystemParameterRule.ProtoReflect.Descriptor instead. -func (*SystemParameterRule) Descriptor() ([]byte, []int) { - return file_google_api_system_parameter_proto_rawDescGZIP(), []int{1} -} - -func (x *SystemParameterRule) GetSelector() string { - if x != nil { - return x.Selector - } - return "" -} - -func (x *SystemParameterRule) GetParameters() []*SystemParameter { - if x != nil { - return x.Parameters - } - return nil -} - -// Define a parameter's name and location. The parameter may be passed as either -// an HTTP header or a URL query parameter, and if both are passed the behavior -// is implementation-dependent. -type SystemParameter struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Define the name of the parameter, such as "api_key" . It is case sensitive. - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // Define the HTTP header name to use for the parameter. It is case - // insensitive. - HttpHeader string `protobuf:"bytes,2,opt,name=http_header,json=httpHeader,proto3" json:"http_header,omitempty"` - // Define the URL query parameter name to use for the parameter. It is case - // sensitive. - UrlQueryParameter string `protobuf:"bytes,3,opt,name=url_query_parameter,json=urlQueryParameter,proto3" json:"url_query_parameter,omitempty"` -} - -func (x *SystemParameter) Reset() { - *x = SystemParameter{} - if protoimpl.UnsafeEnabled { - mi := &file_google_api_system_parameter_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SystemParameter) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SystemParameter) ProtoMessage() {} - -func (x *SystemParameter) ProtoReflect() protoreflect.Message { - mi := &file_google_api_system_parameter_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SystemParameter.ProtoReflect.Descriptor instead. -func (*SystemParameter) Descriptor() ([]byte, []int) { - return file_google_api_system_parameter_proto_rawDescGZIP(), []int{2} -} - -func (x *SystemParameter) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *SystemParameter) GetHttpHeader() string { - if x != nil { - return x.HttpHeader - } - return "" -} - -func (x *SystemParameter) GetUrlQueryParameter() string { - if x != nil { - return x.UrlQueryParameter - } - return "" -} - -var File_google_api_system_parameter_proto protoreflect.FileDescriptor - -var file_google_api_system_parameter_proto_rawDesc = []byte{ - 0x0a, 0x21, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x79, 0x73, - 0x74, 0x65, 0x6d, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x12, 0x0a, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x22, - 0x49, 0x0a, 0x10, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, - 0x65, 0x72, 0x73, 0x12, 0x35, 0x0a, 0x05, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, - 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x52, - 0x75, 0x6c, 0x65, 0x52, 0x05, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x22, 0x6e, 0x0a, 0x13, 0x53, 0x79, - 0x73, 0x74, 0x65, 0x6d, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x52, 0x75, 0x6c, - 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x08, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x12, 0x3b, 0x0a, - 0x0a, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x53, - 0x79, 0x73, 0x74, 0x65, 0x6d, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x52, 0x0a, - 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x22, 0x76, 0x0a, 0x0f, 0x53, 0x79, - 0x73, 0x74, 0x65, 0x6d, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x12, 0x12, 0x0a, - 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, - 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x68, 0x74, 0x74, 0x70, 0x48, 0x65, 0x61, 0x64, - 0x65, 0x72, 0x12, 0x2e, 0x0a, 0x13, 0x75, 0x72, 0x6c, 0x5f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x5f, - 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x11, 0x75, 0x72, 0x6c, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, - 0x65, 0x72, 0x42, 0x76, 0x0a, 0x0e, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x61, 0x70, 0x69, 0x42, 0x14, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x50, 0x61, 0x72, 0x61, - 0x6d, 0x65, 0x74, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x45, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, - 0x67, 0x65, 0x6e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, - 0x70, 0x69, 0x73, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x63, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x3b, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x63, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0xa2, 0x02, 0x04, 0x47, 0x41, 0x50, 0x49, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x33, -} - -var ( - file_google_api_system_parameter_proto_rawDescOnce sync.Once - file_google_api_system_parameter_proto_rawDescData = file_google_api_system_parameter_proto_rawDesc -) - -func file_google_api_system_parameter_proto_rawDescGZIP() []byte { - file_google_api_system_parameter_proto_rawDescOnce.Do(func() { - file_google_api_system_parameter_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_api_system_parameter_proto_rawDescData) - }) - return file_google_api_system_parameter_proto_rawDescData -} - -var file_google_api_system_parameter_proto_msgTypes = make([]protoimpl.MessageInfo, 3) -var file_google_api_system_parameter_proto_goTypes = []interface{}{ - (*SystemParameters)(nil), // 0: google.api.SystemParameters - (*SystemParameterRule)(nil), // 1: google.api.SystemParameterRule - (*SystemParameter)(nil), // 2: google.api.SystemParameter -} -var file_google_api_system_parameter_proto_depIdxs = []int32{ - 1, // 0: google.api.SystemParameters.rules:type_name -> google.api.SystemParameterRule - 2, // 1: google.api.SystemParameterRule.parameters:type_name -> google.api.SystemParameter - 2, // [2:2] is the sub-list for method output_type - 2, // [2:2] is the sub-list for method input_type - 2, // [2:2] is the sub-list for extension type_name - 2, // [2:2] is the sub-list for extension extendee - 0, // [0:2] is the sub-list for field type_name -} - -func init() { file_google_api_system_parameter_proto_init() } -func file_google_api_system_parameter_proto_init() { - if File_google_api_system_parameter_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_google_api_system_parameter_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SystemParameters); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_api_system_parameter_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SystemParameterRule); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_api_system_parameter_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SystemParameter); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_google_api_system_parameter_proto_rawDesc, - NumEnums: 0, - NumMessages: 3, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_google_api_system_parameter_proto_goTypes, - DependencyIndexes: file_google_api_system_parameter_proto_depIdxs, - MessageInfos: file_google_api_system_parameter_proto_msgTypes, - }.Build() - File_google_api_system_parameter_proto = out.File - file_google_api_system_parameter_proto_rawDesc = nil - file_google_api_system_parameter_proto_goTypes = nil - file_google_api_system_parameter_proto_depIdxs = nil -} diff --git a/vendor/google.golang.org/genproto/googleapis/api/serviceconfig/usage.pb.go b/vendor/google.golang.org/genproto/googleapis/api/serviceconfig/usage.pb.go deleted file mode 100644 index 47cd319dca..0000000000 --- a/vendor/google.golang.org/genproto/googleapis/api/serviceconfig/usage.pb.go +++ /dev/null @@ -1,310 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.26.0 -// protoc v4.24.4 -// source: google/api/usage.proto - -package serviceconfig - -import ( - reflect "reflect" - sync "sync" - - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// Configuration controlling usage of a service. -type Usage struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Requirements that must be satisfied before a consumer project can use the - // service. Each requirement is of the form /; - // for example 'serviceusage.googleapis.com/billing-enabled'. - // - // For Google APIs, a Terms of Service requirement must be included here. - // Google Cloud APIs must include "serviceusage.googleapis.com/tos/cloud". - // Other Google APIs should include - // "serviceusage.googleapis.com/tos/universal". Additional ToS can be - // included based on the business needs. - Requirements []string `protobuf:"bytes,1,rep,name=requirements,proto3" json:"requirements,omitempty"` - // A list of usage rules that apply to individual API methods. - // - // **NOTE:** All service configuration rules follow "last one wins" order. - Rules []*UsageRule `protobuf:"bytes,6,rep,name=rules,proto3" json:"rules,omitempty"` - // The full resource name of a channel used for sending notifications to the - // service producer. - // - // Google Service Management currently only supports - // [Google Cloud Pub/Sub](https://cloud.google.com/pubsub) as a notification - // channel. To use Google Cloud Pub/Sub as the channel, this must be the name - // of a Cloud Pub/Sub topic that uses the Cloud Pub/Sub topic name format - // documented in https://cloud.google.com/pubsub/docs/overview. - ProducerNotificationChannel string `protobuf:"bytes,7,opt,name=producer_notification_channel,json=producerNotificationChannel,proto3" json:"producer_notification_channel,omitempty"` -} - -func (x *Usage) Reset() { - *x = Usage{} - if protoimpl.UnsafeEnabled { - mi := &file_google_api_usage_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Usage) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Usage) ProtoMessage() {} - -func (x *Usage) ProtoReflect() protoreflect.Message { - mi := &file_google_api_usage_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Usage.ProtoReflect.Descriptor instead. -func (*Usage) Descriptor() ([]byte, []int) { - return file_google_api_usage_proto_rawDescGZIP(), []int{0} -} - -func (x *Usage) GetRequirements() []string { - if x != nil { - return x.Requirements - } - return nil -} - -func (x *Usage) GetRules() []*UsageRule { - if x != nil { - return x.Rules - } - return nil -} - -func (x *Usage) GetProducerNotificationChannel() string { - if x != nil { - return x.ProducerNotificationChannel - } - return "" -} - -// Usage configuration rules for the service. -type UsageRule struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Selects the methods to which this rule applies. Use '*' to indicate all - // methods in all APIs. - // - // Refer to [selector][google.api.DocumentationRule.selector] for syntax - // details. - Selector string `protobuf:"bytes,1,opt,name=selector,proto3" json:"selector,omitempty"` - // Use this rule to configure unregistered calls for the service. Unregistered - // calls are calls that do not contain consumer project identity. - // (Example: calls that do not contain an API key). - // - // WARNING: By default, API methods do not allow unregistered calls, and each - // method call must be identified by a consumer project identity. - AllowUnregisteredCalls bool `protobuf:"varint,2,opt,name=allow_unregistered_calls,json=allowUnregisteredCalls,proto3" json:"allow_unregistered_calls,omitempty"` - // If true, the selected method should skip service control and the control - // plane features, such as quota and billing, will not be available. - // This flag is used by Google Cloud Endpoints to bypass checks for internal - // methods, such as service health check methods. - SkipServiceControl bool `protobuf:"varint,3,opt,name=skip_service_control,json=skipServiceControl,proto3" json:"skip_service_control,omitempty"` -} - -func (x *UsageRule) Reset() { - *x = UsageRule{} - if protoimpl.UnsafeEnabled { - mi := &file_google_api_usage_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *UsageRule) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UsageRule) ProtoMessage() {} - -func (x *UsageRule) ProtoReflect() protoreflect.Message { - mi := &file_google_api_usage_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use UsageRule.ProtoReflect.Descriptor instead. -func (*UsageRule) Descriptor() ([]byte, []int) { - return file_google_api_usage_proto_rawDescGZIP(), []int{1} -} - -func (x *UsageRule) GetSelector() string { - if x != nil { - return x.Selector - } - return "" -} - -func (x *UsageRule) GetAllowUnregisteredCalls() bool { - if x != nil { - return x.AllowUnregisteredCalls - } - return false -} - -func (x *UsageRule) GetSkipServiceControl() bool { - if x != nil { - return x.SkipServiceControl - } - return false -} - -var File_google_api_usage_proto protoreflect.FileDescriptor - -var file_google_api_usage_proto_rawDesc = []byte{ - 0x0a, 0x16, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x75, 0x73, 0x61, - 0x67, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0a, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x61, 0x70, 0x69, 0x22, 0x9c, 0x01, 0x0a, 0x05, 0x55, 0x73, 0x61, 0x67, 0x65, 0x12, 0x22, - 0x0a, 0x0c, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x01, - 0x20, 0x03, 0x28, 0x09, 0x52, 0x0c, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, - 0x74, 0x73, 0x12, 0x2b, 0x0a, 0x05, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x15, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x55, - 0x73, 0x61, 0x67, 0x65, 0x52, 0x75, 0x6c, 0x65, 0x52, 0x05, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x12, - 0x42, 0x0a, 0x1d, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x65, 0x72, 0x5f, 0x6e, 0x6f, 0x74, 0x69, - 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, - 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x1b, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x65, 0x72, - 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x68, 0x61, 0x6e, - 0x6e, 0x65, 0x6c, 0x22, 0x93, 0x01, 0x0a, 0x09, 0x55, 0x73, 0x61, 0x67, 0x65, 0x52, 0x75, 0x6c, - 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x08, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x12, 0x38, 0x0a, - 0x18, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x5f, 0x75, 0x6e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, - 0x72, 0x65, 0x64, 0x5f, 0x63, 0x61, 0x6c, 0x6c, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, - 0x16, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x55, 0x6e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, - 0x65, 0x64, 0x43, 0x61, 0x6c, 0x6c, 0x73, 0x12, 0x30, 0x0a, 0x14, 0x73, 0x6b, 0x69, 0x70, 0x5f, - 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x12, 0x73, 0x6b, 0x69, 0x70, 0x53, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x42, 0x6c, 0x0a, 0x0e, 0x63, 0x6f, 0x6d, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x42, 0x0a, 0x55, 0x73, 0x61, - 0x67, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x45, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x67, 0x65, 0x6e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, - 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x3b, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0xa2, 0x02, 0x04, 0x47, 0x41, 0x50, 0x49, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_google_api_usage_proto_rawDescOnce sync.Once - file_google_api_usage_proto_rawDescData = file_google_api_usage_proto_rawDesc -) - -func file_google_api_usage_proto_rawDescGZIP() []byte { - file_google_api_usage_proto_rawDescOnce.Do(func() { - file_google_api_usage_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_api_usage_proto_rawDescData) - }) - return file_google_api_usage_proto_rawDescData -} - -var file_google_api_usage_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_google_api_usage_proto_goTypes = []interface{}{ - (*Usage)(nil), // 0: google.api.Usage - (*UsageRule)(nil), // 1: google.api.UsageRule -} -var file_google_api_usage_proto_depIdxs = []int32{ - 1, // 0: google.api.Usage.rules:type_name -> google.api.UsageRule - 1, // [1:1] is the sub-list for method output_type - 1, // [1:1] is the sub-list for method input_type - 1, // [1:1] is the sub-list for extension type_name - 1, // [1:1] is the sub-list for extension extendee - 0, // [0:1] is the sub-list for field type_name -} - -func init() { file_google_api_usage_proto_init() } -func file_google_api_usage_proto_init() { - if File_google_api_usage_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_google_api_usage_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Usage); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_api_usage_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UsageRule); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_google_api_usage_proto_rawDesc, - NumEnums: 0, - NumMessages: 2, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_google_api_usage_proto_goTypes, - DependencyIndexes: file_google_api_usage_proto_depIdxs, - MessageInfos: file_google_api_usage_proto_msgTypes, - }.Build() - File_google_api_usage_proto = out.File - file_google_api_usage_proto_rawDesc = nil - file_google_api_usage_proto_goTypes = nil - file_google_api_usage_proto_depIdxs = nil -} diff --git a/vendor/google.golang.org/genproto/googleapis/type/interval/interval.pb.go b/vendor/google.golang.org/genproto/googleapis/type/interval/interval.pb.go deleted file mode 100644 index 7f8f131113..0000000000 --- a/vendor/google.golang.org/genproto/googleapis/type/interval/interval.pb.go +++ /dev/null @@ -1,197 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.26.0 -// protoc v4.24.4 -// source: google/type/interval.proto - -package interval - -import ( - reflect "reflect" - sync "sync" - - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - timestamppb "google.golang.org/protobuf/types/known/timestamppb" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// Represents a time interval, encoded as a Timestamp start (inclusive) and a -// Timestamp end (exclusive). -// -// The start must be less than or equal to the end. -// When the start equals the end, the interval is empty (matches no time). -// When both start and end are unspecified, the interval matches any time. -type Interval struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Optional. Inclusive start of the interval. - // - // If specified, a Timestamp matching this interval will have to be the same - // or after the start. - StartTime *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"` - // Optional. Exclusive end of the interval. - // - // If specified, a Timestamp matching this interval will have to be before the - // end. - EndTime *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=end_time,json=endTime,proto3" json:"end_time,omitempty"` -} - -func (x *Interval) Reset() { - *x = Interval{} - if protoimpl.UnsafeEnabled { - mi := &file_google_type_interval_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Interval) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Interval) ProtoMessage() {} - -func (x *Interval) ProtoReflect() protoreflect.Message { - mi := &file_google_type_interval_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Interval.ProtoReflect.Descriptor instead. -func (*Interval) Descriptor() ([]byte, []int) { - return file_google_type_interval_proto_rawDescGZIP(), []int{0} -} - -func (x *Interval) GetStartTime() *timestamppb.Timestamp { - if x != nil { - return x.StartTime - } - return nil -} - -func (x *Interval) GetEndTime() *timestamppb.Timestamp { - if x != nil { - return x.EndTime - } - return nil -} - -var File_google_type_interval_proto protoreflect.FileDescriptor - -var file_google_type_interval_proto_rawDesc = []byte{ - 0x0a, 0x1a, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x69, 0x6e, - 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0b, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, - 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x7c, 0x0a, 0x08, 0x49, 0x6e, - 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x12, 0x39, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, - 0x74, 0x69, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, - 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x73, 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, - 0x65, 0x12, 0x35, 0x0a, 0x08, 0x65, 0x6e, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, - 0x07, 0x65, 0x6e, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x42, 0x69, 0x0a, 0x0f, 0x63, 0x6f, 0x6d, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x42, 0x0d, 0x49, 0x6e, 0x74, - 0x65, 0x72, 0x76, 0x61, 0x6c, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3c, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, - 0x67, 0x65, 0x6e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, - 0x70, 0x69, 0x73, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, - 0x6c, 0x3b, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0xf8, 0x01, 0x01, 0xa2, 0x02, 0x03, - 0x47, 0x54, 0x50, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_google_type_interval_proto_rawDescOnce sync.Once - file_google_type_interval_proto_rawDescData = file_google_type_interval_proto_rawDesc -) - -func file_google_type_interval_proto_rawDescGZIP() []byte { - file_google_type_interval_proto_rawDescOnce.Do(func() { - file_google_type_interval_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_type_interval_proto_rawDescData) - }) - return file_google_type_interval_proto_rawDescData -} - -var file_google_type_interval_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_google_type_interval_proto_goTypes = []interface{}{ - (*Interval)(nil), // 0: google.type.Interval - (*timestamppb.Timestamp)(nil), // 1: google.protobuf.Timestamp -} -var file_google_type_interval_proto_depIdxs = []int32{ - 1, // 0: google.type.Interval.start_time:type_name -> google.protobuf.Timestamp - 1, // 1: google.type.Interval.end_time:type_name -> google.protobuf.Timestamp - 2, // [2:2] is the sub-list for method output_type - 2, // [2:2] is the sub-list for method input_type - 2, // [2:2] is the sub-list for extension type_name - 2, // [2:2] is the sub-list for extension extendee - 0, // [0:2] is the sub-list for field type_name -} - -func init() { file_google_type_interval_proto_init() } -func file_google_type_interval_proto_init() { - if File_google_type_interval_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_google_type_interval_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Interval); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_google_type_interval_proto_rawDesc, - NumEnums: 0, - NumMessages: 1, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_google_type_interval_proto_goTypes, - DependencyIndexes: file_google_type_interval_proto_depIdxs, - MessageInfos: file_google_type_interval_proto_msgTypes, - }.Build() - File_google_type_interval_proto = out.File - file_google_type_interval_proto_rawDesc = nil - file_google_type_interval_proto_goTypes = nil - file_google_type_interval_proto_depIdxs = nil -} diff --git a/vendor/google.golang.org/protobuf/types/known/apipb/api.pb.go b/vendor/google.golang.org/protobuf/types/known/apipb/api.pb.go deleted file mode 100644 index 63ed10e379..0000000000 --- a/vendor/google.golang.org/protobuf/types/known/apipb/api.pb.go +++ /dev/null @@ -1,533 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// https://developers.google.com/protocol-buffers/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Code generated by protoc-gen-go. DO NOT EDIT. -// source: google/protobuf/api.proto - -package apipb - -import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - sourcecontextpb "google.golang.org/protobuf/types/known/sourcecontextpb" - typepb "google.golang.org/protobuf/types/known/typepb" - reflect "reflect" - sync "sync" - unsafe "unsafe" -) - -// Api is a light-weight descriptor for an API Interface. -// -// Interfaces are also described as "protocol buffer services" in some contexts, -// such as by the "service" keyword in a .proto file, but they are different -// from API Services, which represent a concrete implementation of an interface -// as opposed to simply a description of methods and bindings. They are also -// sometimes simply referred to as "APIs" in other contexts, such as the name of -// this message itself. See https://cloud.google.com/apis/design/glossary for -// detailed terminology. -// -// New usages of this message as an alternative to ServiceDescriptorProto are -// strongly discouraged. This message does not reliability preserve all -// information necessary to model the schema and preserve semantics. Instead -// make use of FileDescriptorSet which preserves the necessary information. -type Api struct { - state protoimpl.MessageState `protogen:"open.v1"` - // The fully qualified name of this interface, including package name - // followed by the interface's simple name. - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // The methods of this interface, in unspecified order. - Methods []*Method `protobuf:"bytes,2,rep,name=methods,proto3" json:"methods,omitempty"` - // Any metadata attached to the interface. - Options []*typepb.Option `protobuf:"bytes,3,rep,name=options,proto3" json:"options,omitempty"` - // A version string for this interface. If specified, must have the form - // `major-version.minor-version`, as in `1.10`. If the minor version is - // omitted, it defaults to zero. If the entire version field is empty, the - // major version is derived from the package name, as outlined below. If the - // field is not empty, the version in the package name will be verified to be - // consistent with what is provided here. - // - // The versioning schema uses [semantic - // versioning](http://semver.org) where the major version number - // indicates a breaking change and the minor version an additive, - // non-breaking change. Both version numbers are signals to users - // what to expect from different versions, and should be carefully - // chosen based on the product plan. - // - // The major version is also reflected in the package name of the - // interface, which must end in `v`, as in - // `google.feature.v1`. For major versions 0 and 1, the suffix can - // be omitted. Zero major versions must only be used for - // experimental, non-GA interfaces. - Version string `protobuf:"bytes,4,opt,name=version,proto3" json:"version,omitempty"` - // Source context for the protocol buffer service represented by this - // message. - SourceContext *sourcecontextpb.SourceContext `protobuf:"bytes,5,opt,name=source_context,json=sourceContext,proto3" json:"source_context,omitempty"` - // Included interfaces. See [Mixin][]. - Mixins []*Mixin `protobuf:"bytes,6,rep,name=mixins,proto3" json:"mixins,omitempty"` - // The source syntax of the service. - Syntax typepb.Syntax `protobuf:"varint,7,opt,name=syntax,proto3,enum=google.protobuf.Syntax" json:"syntax,omitempty"` - // The source edition string, only valid when syntax is SYNTAX_EDITIONS. - Edition string `protobuf:"bytes,8,opt,name=edition,proto3" json:"edition,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *Api) Reset() { - *x = Api{} - mi := &file_google_protobuf_api_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *Api) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Api) ProtoMessage() {} - -func (x *Api) ProtoReflect() protoreflect.Message { - mi := &file_google_protobuf_api_proto_msgTypes[0] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Api.ProtoReflect.Descriptor instead. -func (*Api) Descriptor() ([]byte, []int) { - return file_google_protobuf_api_proto_rawDescGZIP(), []int{0} -} - -func (x *Api) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *Api) GetMethods() []*Method { - if x != nil { - return x.Methods - } - return nil -} - -func (x *Api) GetOptions() []*typepb.Option { - if x != nil { - return x.Options - } - return nil -} - -func (x *Api) GetVersion() string { - if x != nil { - return x.Version - } - return "" -} - -func (x *Api) GetSourceContext() *sourcecontextpb.SourceContext { - if x != nil { - return x.SourceContext - } - return nil -} - -func (x *Api) GetMixins() []*Mixin { - if x != nil { - return x.Mixins - } - return nil -} - -func (x *Api) GetSyntax() typepb.Syntax { - if x != nil { - return x.Syntax - } - return typepb.Syntax(0) -} - -func (x *Api) GetEdition() string { - if x != nil { - return x.Edition - } - return "" -} - -// Method represents a method of an API interface. -// -// New usages of this message as an alternative to MethodDescriptorProto are -// strongly discouraged. This message does not reliability preserve all -// information necessary to model the schema and preserve semantics. Instead -// make use of FileDescriptorSet which preserves the necessary information. -type Method struct { - state protoimpl.MessageState `protogen:"open.v1"` - // The simple name of this method. - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // A URL of the input message type. - RequestTypeUrl string `protobuf:"bytes,2,opt,name=request_type_url,json=requestTypeUrl,proto3" json:"request_type_url,omitempty"` - // If true, the request is streamed. - RequestStreaming bool `protobuf:"varint,3,opt,name=request_streaming,json=requestStreaming,proto3" json:"request_streaming,omitempty"` - // The URL of the output message type. - ResponseTypeUrl string `protobuf:"bytes,4,opt,name=response_type_url,json=responseTypeUrl,proto3" json:"response_type_url,omitempty"` - // If true, the response is streamed. - ResponseStreaming bool `protobuf:"varint,5,opt,name=response_streaming,json=responseStreaming,proto3" json:"response_streaming,omitempty"` - // Any metadata attached to the method. - Options []*typepb.Option `protobuf:"bytes,6,rep,name=options,proto3" json:"options,omitempty"` - // The source syntax of this method. - // - // This field should be ignored, instead the syntax should be inherited from - // Api. This is similar to Field and EnumValue. - // - // Deprecated: Marked as deprecated in google/protobuf/api.proto. - Syntax typepb.Syntax `protobuf:"varint,7,opt,name=syntax,proto3,enum=google.protobuf.Syntax" json:"syntax,omitempty"` - // The source edition string, only valid when syntax is SYNTAX_EDITIONS. - // - // This field should be ignored, instead the edition should be inherited from - // Api. This is similar to Field and EnumValue. - // - // Deprecated: Marked as deprecated in google/protobuf/api.proto. - Edition string `protobuf:"bytes,8,opt,name=edition,proto3" json:"edition,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *Method) Reset() { - *x = Method{} - mi := &file_google_protobuf_api_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *Method) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Method) ProtoMessage() {} - -func (x *Method) ProtoReflect() protoreflect.Message { - mi := &file_google_protobuf_api_proto_msgTypes[1] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Method.ProtoReflect.Descriptor instead. -func (*Method) Descriptor() ([]byte, []int) { - return file_google_protobuf_api_proto_rawDescGZIP(), []int{1} -} - -func (x *Method) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *Method) GetRequestTypeUrl() string { - if x != nil { - return x.RequestTypeUrl - } - return "" -} - -func (x *Method) GetRequestStreaming() bool { - if x != nil { - return x.RequestStreaming - } - return false -} - -func (x *Method) GetResponseTypeUrl() string { - if x != nil { - return x.ResponseTypeUrl - } - return "" -} - -func (x *Method) GetResponseStreaming() bool { - if x != nil { - return x.ResponseStreaming - } - return false -} - -func (x *Method) GetOptions() []*typepb.Option { - if x != nil { - return x.Options - } - return nil -} - -// Deprecated: Marked as deprecated in google/protobuf/api.proto. -func (x *Method) GetSyntax() typepb.Syntax { - if x != nil { - return x.Syntax - } - return typepb.Syntax(0) -} - -// Deprecated: Marked as deprecated in google/protobuf/api.proto. -func (x *Method) GetEdition() string { - if x != nil { - return x.Edition - } - return "" -} - -// Declares an API Interface to be included in this interface. The including -// interface must redeclare all the methods from the included interface, but -// documentation and options are inherited as follows: -// -// - If after comment and whitespace stripping, the documentation -// string of the redeclared method is empty, it will be inherited -// from the original method. -// -// - Each annotation belonging to the service config (http, -// visibility) which is not set in the redeclared method will be -// inherited. -// -// - If an http annotation is inherited, the path pattern will be -// modified as follows. Any version prefix will be replaced by the -// version of the including interface plus the [root][] path if -// specified. -// -// Example of a simple mixin: -// -// package google.acl.v1; -// service AccessControl { -// // Get the underlying ACL object. -// rpc GetAcl(GetAclRequest) returns (Acl) { -// option (google.api.http).get = "/v1/{resource=**}:getAcl"; -// } -// } -// -// package google.storage.v2; -// service Storage { -// rpc GetAcl(GetAclRequest) returns (Acl); -// -// // Get a data record. -// rpc GetData(GetDataRequest) returns (Data) { -// option (google.api.http).get = "/v2/{resource=**}"; -// } -// } -// -// Example of a mixin configuration: -// -// apis: -// - name: google.storage.v2.Storage -// mixins: -// - name: google.acl.v1.AccessControl -// -// The mixin construct implies that all methods in `AccessControl` are -// also declared with same name and request/response types in -// `Storage`. A documentation generator or annotation processor will -// see the effective `Storage.GetAcl` method after inheriting -// documentation and annotations as follows: -// -// service Storage { -// // Get the underlying ACL object. -// rpc GetAcl(GetAclRequest) returns (Acl) { -// option (google.api.http).get = "/v2/{resource=**}:getAcl"; -// } -// ... -// } -// -// Note how the version in the path pattern changed from `v1` to `v2`. -// -// If the `root` field in the mixin is specified, it should be a -// relative path under which inherited HTTP paths are placed. Example: -// -// apis: -// - name: google.storage.v2.Storage -// mixins: -// - name: google.acl.v1.AccessControl -// root: acls -// -// This implies the following inherited HTTP annotation: -// -// service Storage { -// // Get the underlying ACL object. -// rpc GetAcl(GetAclRequest) returns (Acl) { -// option (google.api.http).get = "/v2/acls/{resource=**}:getAcl"; -// } -// ... -// } -type Mixin struct { - state protoimpl.MessageState `protogen:"open.v1"` - // The fully qualified name of the interface which is included. - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // If non-empty specifies a path under which inherited HTTP paths - // are rooted. - Root string `protobuf:"bytes,2,opt,name=root,proto3" json:"root,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *Mixin) Reset() { - *x = Mixin{} - mi := &file_google_protobuf_api_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *Mixin) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Mixin) ProtoMessage() {} - -func (x *Mixin) ProtoReflect() protoreflect.Message { - mi := &file_google_protobuf_api_proto_msgTypes[2] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Mixin.ProtoReflect.Descriptor instead. -func (*Mixin) Descriptor() ([]byte, []int) { - return file_google_protobuf_api_proto_rawDescGZIP(), []int{2} -} - -func (x *Mixin) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *Mixin) GetRoot() string { - if x != nil { - return x.Root - } - return "" -} - -var File_google_protobuf_api_proto protoreflect.FileDescriptor - -const file_google_protobuf_api_proto_rawDesc = "" + - "\n" + - "\x19google/protobuf/api.proto\x12\x0fgoogle.protobuf\x1a$google/protobuf/source_context.proto\x1a\x1agoogle/protobuf/type.proto\"\xdb\x02\n" + - "\x03Api\x12\x12\n" + - "\x04name\x18\x01 \x01(\tR\x04name\x121\n" + - "\amethods\x18\x02 \x03(\v2\x17.google.protobuf.MethodR\amethods\x121\n" + - "\aoptions\x18\x03 \x03(\v2\x17.google.protobuf.OptionR\aoptions\x12\x18\n" + - "\aversion\x18\x04 \x01(\tR\aversion\x12E\n" + - "\x0esource_context\x18\x05 \x01(\v2\x1e.google.protobuf.SourceContextR\rsourceContext\x12.\n" + - "\x06mixins\x18\x06 \x03(\v2\x16.google.protobuf.MixinR\x06mixins\x12/\n" + - "\x06syntax\x18\a \x01(\x0e2\x17.google.protobuf.SyntaxR\x06syntax\x12\x18\n" + - "\aedition\x18\b \x01(\tR\aedition\"\xd4\x02\n" + - "\x06Method\x12\x12\n" + - "\x04name\x18\x01 \x01(\tR\x04name\x12(\n" + - "\x10request_type_url\x18\x02 \x01(\tR\x0erequestTypeUrl\x12+\n" + - "\x11request_streaming\x18\x03 \x01(\bR\x10requestStreaming\x12*\n" + - "\x11response_type_url\x18\x04 \x01(\tR\x0fresponseTypeUrl\x12-\n" + - "\x12response_streaming\x18\x05 \x01(\bR\x11responseStreaming\x121\n" + - "\aoptions\x18\x06 \x03(\v2\x17.google.protobuf.OptionR\aoptions\x123\n" + - "\x06syntax\x18\a \x01(\x0e2\x17.google.protobuf.SyntaxB\x02\x18\x01R\x06syntax\x12\x1c\n" + - "\aedition\x18\b \x01(\tB\x02\x18\x01R\aedition\"/\n" + - "\x05Mixin\x12\x12\n" + - "\x04name\x18\x01 \x01(\tR\x04name\x12\x12\n" + - "\x04root\x18\x02 \x01(\tR\x04rootBv\n" + - "\x13com.google.protobufB\bApiProtoP\x01Z,google.golang.org/protobuf/types/known/apipb\xa2\x02\x03GPB\xaa\x02\x1eGoogle.Protobuf.WellKnownTypesb\x06proto3" - -var ( - file_google_protobuf_api_proto_rawDescOnce sync.Once - file_google_protobuf_api_proto_rawDescData []byte -) - -func file_google_protobuf_api_proto_rawDescGZIP() []byte { - file_google_protobuf_api_proto_rawDescOnce.Do(func() { - file_google_protobuf_api_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_google_protobuf_api_proto_rawDesc), len(file_google_protobuf_api_proto_rawDesc))) - }) - return file_google_protobuf_api_proto_rawDescData -} - -var file_google_protobuf_api_proto_msgTypes = make([]protoimpl.MessageInfo, 3) -var file_google_protobuf_api_proto_goTypes = []any{ - (*Api)(nil), // 0: google.protobuf.Api - (*Method)(nil), // 1: google.protobuf.Method - (*Mixin)(nil), // 2: google.protobuf.Mixin - (*typepb.Option)(nil), // 3: google.protobuf.Option - (*sourcecontextpb.SourceContext)(nil), // 4: google.protobuf.SourceContext - (typepb.Syntax)(0), // 5: google.protobuf.Syntax -} -var file_google_protobuf_api_proto_depIdxs = []int32{ - 1, // 0: google.protobuf.Api.methods:type_name -> google.protobuf.Method - 3, // 1: google.protobuf.Api.options:type_name -> google.protobuf.Option - 4, // 2: google.protobuf.Api.source_context:type_name -> google.protobuf.SourceContext - 2, // 3: google.protobuf.Api.mixins:type_name -> google.protobuf.Mixin - 5, // 4: google.protobuf.Api.syntax:type_name -> google.protobuf.Syntax - 3, // 5: google.protobuf.Method.options:type_name -> google.protobuf.Option - 5, // 6: google.protobuf.Method.syntax:type_name -> google.protobuf.Syntax - 7, // [7:7] is the sub-list for method output_type - 7, // [7:7] is the sub-list for method input_type - 7, // [7:7] is the sub-list for extension type_name - 7, // [7:7] is the sub-list for extension extendee - 0, // [0:7] is the sub-list for field type_name -} - -func init() { file_google_protobuf_api_proto_init() } -func file_google_protobuf_api_proto_init() { - if File_google_protobuf_api_proto != nil { - return - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: unsafe.Slice(unsafe.StringData(file_google_protobuf_api_proto_rawDesc), len(file_google_protobuf_api_proto_rawDesc)), - NumEnums: 0, - NumMessages: 3, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_google_protobuf_api_proto_goTypes, - DependencyIndexes: file_google_protobuf_api_proto_depIdxs, - MessageInfos: file_google_protobuf_api_proto_msgTypes, - }.Build() - File_google_protobuf_api_proto = out.File - file_google_protobuf_api_proto_goTypes = nil - file_google_protobuf_api_proto_depIdxs = nil -} diff --git a/vendor/google.golang.org/protobuf/types/known/sourcecontextpb/source_context.pb.go b/vendor/google.golang.org/protobuf/types/known/sourcecontextpb/source_context.pb.go deleted file mode 100644 index 954fbe081b..0000000000 --- a/vendor/google.golang.org/protobuf/types/known/sourcecontextpb/source_context.pb.go +++ /dev/null @@ -1,147 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// https://developers.google.com/protocol-buffers/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Code generated by protoc-gen-go. DO NOT EDIT. -// source: google/protobuf/source_context.proto - -package sourcecontextpb - -import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" - unsafe "unsafe" -) - -// `SourceContext` represents information about the source of a -// protobuf element, like the file in which it is defined. -type SourceContext struct { - state protoimpl.MessageState `protogen:"open.v1"` - // The path-qualified name of the .proto file that contained the associated - // protobuf element. For example: `"google/protobuf/source_context.proto"`. - FileName string `protobuf:"bytes,1,opt,name=file_name,json=fileName,proto3" json:"file_name,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *SourceContext) Reset() { - *x = SourceContext{} - mi := &file_google_protobuf_source_context_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *SourceContext) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SourceContext) ProtoMessage() {} - -func (x *SourceContext) ProtoReflect() protoreflect.Message { - mi := &file_google_protobuf_source_context_proto_msgTypes[0] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SourceContext.ProtoReflect.Descriptor instead. -func (*SourceContext) Descriptor() ([]byte, []int) { - return file_google_protobuf_source_context_proto_rawDescGZIP(), []int{0} -} - -func (x *SourceContext) GetFileName() string { - if x != nil { - return x.FileName - } - return "" -} - -var File_google_protobuf_source_context_proto protoreflect.FileDescriptor - -const file_google_protobuf_source_context_proto_rawDesc = "" + - "\n" + - "$google/protobuf/source_context.proto\x12\x0fgoogle.protobuf\",\n" + - "\rSourceContext\x12\x1b\n" + - "\tfile_name\x18\x01 \x01(\tR\bfileNameB\x8a\x01\n" + - "\x13com.google.protobufB\x12SourceContextProtoP\x01Z6google.golang.org/protobuf/types/known/sourcecontextpb\xa2\x02\x03GPB\xaa\x02\x1eGoogle.Protobuf.WellKnownTypesb\x06proto3" - -var ( - file_google_protobuf_source_context_proto_rawDescOnce sync.Once - file_google_protobuf_source_context_proto_rawDescData []byte -) - -func file_google_protobuf_source_context_proto_rawDescGZIP() []byte { - file_google_protobuf_source_context_proto_rawDescOnce.Do(func() { - file_google_protobuf_source_context_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_google_protobuf_source_context_proto_rawDesc), len(file_google_protobuf_source_context_proto_rawDesc))) - }) - return file_google_protobuf_source_context_proto_rawDescData -} - -var file_google_protobuf_source_context_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_google_protobuf_source_context_proto_goTypes = []any{ - (*SourceContext)(nil), // 0: google.protobuf.SourceContext -} -var file_google_protobuf_source_context_proto_depIdxs = []int32{ - 0, // [0:0] is the sub-list for method output_type - 0, // [0:0] is the sub-list for method input_type - 0, // [0:0] is the sub-list for extension type_name - 0, // [0:0] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name -} - -func init() { file_google_protobuf_source_context_proto_init() } -func file_google_protobuf_source_context_proto_init() { - if File_google_protobuf_source_context_proto != nil { - return - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: unsafe.Slice(unsafe.StringData(file_google_protobuf_source_context_proto_rawDesc), len(file_google_protobuf_source_context_proto_rawDesc)), - NumEnums: 0, - NumMessages: 1, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_google_protobuf_source_context_proto_goTypes, - DependencyIndexes: file_google_protobuf_source_context_proto_depIdxs, - MessageInfos: file_google_protobuf_source_context_proto_msgTypes, - }.Build() - File_google_protobuf_source_context_proto = out.File - file_google_protobuf_source_context_proto_goTypes = nil - file_google_protobuf_source_context_proto_depIdxs = nil -} diff --git a/vendor/google.golang.org/protobuf/types/known/typepb/type.pb.go b/vendor/google.golang.org/protobuf/types/known/typepb/type.pb.go deleted file mode 100644 index bd6c25edbe..0000000000 --- a/vendor/google.golang.org/protobuf/types/known/typepb/type.pb.go +++ /dev/null @@ -1,890 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// https://developers.google.com/protocol-buffers/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Code generated by protoc-gen-go. DO NOT EDIT. -// source: google/protobuf/type.proto - -package typepb - -import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - anypb "google.golang.org/protobuf/types/known/anypb" - sourcecontextpb "google.golang.org/protobuf/types/known/sourcecontextpb" - reflect "reflect" - sync "sync" - unsafe "unsafe" -) - -// The syntax in which a protocol buffer element is defined. -type Syntax int32 - -const ( - // Syntax `proto2`. - Syntax_SYNTAX_PROTO2 Syntax = 0 - // Syntax `proto3`. - Syntax_SYNTAX_PROTO3 Syntax = 1 - // Syntax `editions`. - Syntax_SYNTAX_EDITIONS Syntax = 2 -) - -// Enum value maps for Syntax. -var ( - Syntax_name = map[int32]string{ - 0: "SYNTAX_PROTO2", - 1: "SYNTAX_PROTO3", - 2: "SYNTAX_EDITIONS", - } - Syntax_value = map[string]int32{ - "SYNTAX_PROTO2": 0, - "SYNTAX_PROTO3": 1, - "SYNTAX_EDITIONS": 2, - } -) - -func (x Syntax) Enum() *Syntax { - p := new(Syntax) - *p = x - return p -} - -func (x Syntax) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (Syntax) Descriptor() protoreflect.EnumDescriptor { - return file_google_protobuf_type_proto_enumTypes[0].Descriptor() -} - -func (Syntax) Type() protoreflect.EnumType { - return &file_google_protobuf_type_proto_enumTypes[0] -} - -func (x Syntax) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use Syntax.Descriptor instead. -func (Syntax) EnumDescriptor() ([]byte, []int) { - return file_google_protobuf_type_proto_rawDescGZIP(), []int{0} -} - -// Basic field types. -type Field_Kind int32 - -const ( - // Field type unknown. - Field_TYPE_UNKNOWN Field_Kind = 0 - // Field type double. - Field_TYPE_DOUBLE Field_Kind = 1 - // Field type float. - Field_TYPE_FLOAT Field_Kind = 2 - // Field type int64. - Field_TYPE_INT64 Field_Kind = 3 - // Field type uint64. - Field_TYPE_UINT64 Field_Kind = 4 - // Field type int32. - Field_TYPE_INT32 Field_Kind = 5 - // Field type fixed64. - Field_TYPE_FIXED64 Field_Kind = 6 - // Field type fixed32. - Field_TYPE_FIXED32 Field_Kind = 7 - // Field type bool. - Field_TYPE_BOOL Field_Kind = 8 - // Field type string. - Field_TYPE_STRING Field_Kind = 9 - // Field type group. Proto2 syntax only, and deprecated. - Field_TYPE_GROUP Field_Kind = 10 - // Field type message. - Field_TYPE_MESSAGE Field_Kind = 11 - // Field type bytes. - Field_TYPE_BYTES Field_Kind = 12 - // Field type uint32. - Field_TYPE_UINT32 Field_Kind = 13 - // Field type enum. - Field_TYPE_ENUM Field_Kind = 14 - // Field type sfixed32. - Field_TYPE_SFIXED32 Field_Kind = 15 - // Field type sfixed64. - Field_TYPE_SFIXED64 Field_Kind = 16 - // Field type sint32. - Field_TYPE_SINT32 Field_Kind = 17 - // Field type sint64. - Field_TYPE_SINT64 Field_Kind = 18 -) - -// Enum value maps for Field_Kind. -var ( - Field_Kind_name = map[int32]string{ - 0: "TYPE_UNKNOWN", - 1: "TYPE_DOUBLE", - 2: "TYPE_FLOAT", - 3: "TYPE_INT64", - 4: "TYPE_UINT64", - 5: "TYPE_INT32", - 6: "TYPE_FIXED64", - 7: "TYPE_FIXED32", - 8: "TYPE_BOOL", - 9: "TYPE_STRING", - 10: "TYPE_GROUP", - 11: "TYPE_MESSAGE", - 12: "TYPE_BYTES", - 13: "TYPE_UINT32", - 14: "TYPE_ENUM", - 15: "TYPE_SFIXED32", - 16: "TYPE_SFIXED64", - 17: "TYPE_SINT32", - 18: "TYPE_SINT64", - } - Field_Kind_value = map[string]int32{ - "TYPE_UNKNOWN": 0, - "TYPE_DOUBLE": 1, - "TYPE_FLOAT": 2, - "TYPE_INT64": 3, - "TYPE_UINT64": 4, - "TYPE_INT32": 5, - "TYPE_FIXED64": 6, - "TYPE_FIXED32": 7, - "TYPE_BOOL": 8, - "TYPE_STRING": 9, - "TYPE_GROUP": 10, - "TYPE_MESSAGE": 11, - "TYPE_BYTES": 12, - "TYPE_UINT32": 13, - "TYPE_ENUM": 14, - "TYPE_SFIXED32": 15, - "TYPE_SFIXED64": 16, - "TYPE_SINT32": 17, - "TYPE_SINT64": 18, - } -) - -func (x Field_Kind) Enum() *Field_Kind { - p := new(Field_Kind) - *p = x - return p -} - -func (x Field_Kind) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (Field_Kind) Descriptor() protoreflect.EnumDescriptor { - return file_google_protobuf_type_proto_enumTypes[1].Descriptor() -} - -func (Field_Kind) Type() protoreflect.EnumType { - return &file_google_protobuf_type_proto_enumTypes[1] -} - -func (x Field_Kind) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use Field_Kind.Descriptor instead. -func (Field_Kind) EnumDescriptor() ([]byte, []int) { - return file_google_protobuf_type_proto_rawDescGZIP(), []int{1, 0} -} - -// Whether a field is optional, required, or repeated. -type Field_Cardinality int32 - -const ( - // For fields with unknown cardinality. - Field_CARDINALITY_UNKNOWN Field_Cardinality = 0 - // For optional fields. - Field_CARDINALITY_OPTIONAL Field_Cardinality = 1 - // For required fields. Proto2 syntax only. - Field_CARDINALITY_REQUIRED Field_Cardinality = 2 - // For repeated fields. - Field_CARDINALITY_REPEATED Field_Cardinality = 3 -) - -// Enum value maps for Field_Cardinality. -var ( - Field_Cardinality_name = map[int32]string{ - 0: "CARDINALITY_UNKNOWN", - 1: "CARDINALITY_OPTIONAL", - 2: "CARDINALITY_REQUIRED", - 3: "CARDINALITY_REPEATED", - } - Field_Cardinality_value = map[string]int32{ - "CARDINALITY_UNKNOWN": 0, - "CARDINALITY_OPTIONAL": 1, - "CARDINALITY_REQUIRED": 2, - "CARDINALITY_REPEATED": 3, - } -) - -func (x Field_Cardinality) Enum() *Field_Cardinality { - p := new(Field_Cardinality) - *p = x - return p -} - -func (x Field_Cardinality) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (Field_Cardinality) Descriptor() protoreflect.EnumDescriptor { - return file_google_protobuf_type_proto_enumTypes[2].Descriptor() -} - -func (Field_Cardinality) Type() protoreflect.EnumType { - return &file_google_protobuf_type_proto_enumTypes[2] -} - -func (x Field_Cardinality) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use Field_Cardinality.Descriptor instead. -func (Field_Cardinality) EnumDescriptor() ([]byte, []int) { - return file_google_protobuf_type_proto_rawDescGZIP(), []int{1, 1} -} - -// A protocol buffer message type. -// -// New usages of this message as an alternative to DescriptorProto are strongly -// discouraged. This message does not reliability preserve all information -// necessary to model the schema and preserve semantics. Instead make use of -// FileDescriptorSet which preserves the necessary information. -type Type struct { - state protoimpl.MessageState `protogen:"open.v1"` - // The fully qualified message name. - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // The list of fields. - Fields []*Field `protobuf:"bytes,2,rep,name=fields,proto3" json:"fields,omitempty"` - // The list of types appearing in `oneof` definitions in this type. - Oneofs []string `protobuf:"bytes,3,rep,name=oneofs,proto3" json:"oneofs,omitempty"` - // The protocol buffer options. - Options []*Option `protobuf:"bytes,4,rep,name=options,proto3" json:"options,omitempty"` - // The source context. - SourceContext *sourcecontextpb.SourceContext `protobuf:"bytes,5,opt,name=source_context,json=sourceContext,proto3" json:"source_context,omitempty"` - // The source syntax. - Syntax Syntax `protobuf:"varint,6,opt,name=syntax,proto3,enum=google.protobuf.Syntax" json:"syntax,omitempty"` - // The source edition string, only valid when syntax is SYNTAX_EDITIONS. - Edition string `protobuf:"bytes,7,opt,name=edition,proto3" json:"edition,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *Type) Reset() { - *x = Type{} - mi := &file_google_protobuf_type_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *Type) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Type) ProtoMessage() {} - -func (x *Type) ProtoReflect() protoreflect.Message { - mi := &file_google_protobuf_type_proto_msgTypes[0] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Type.ProtoReflect.Descriptor instead. -func (*Type) Descriptor() ([]byte, []int) { - return file_google_protobuf_type_proto_rawDescGZIP(), []int{0} -} - -func (x *Type) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *Type) GetFields() []*Field { - if x != nil { - return x.Fields - } - return nil -} - -func (x *Type) GetOneofs() []string { - if x != nil { - return x.Oneofs - } - return nil -} - -func (x *Type) GetOptions() []*Option { - if x != nil { - return x.Options - } - return nil -} - -func (x *Type) GetSourceContext() *sourcecontextpb.SourceContext { - if x != nil { - return x.SourceContext - } - return nil -} - -func (x *Type) GetSyntax() Syntax { - if x != nil { - return x.Syntax - } - return Syntax_SYNTAX_PROTO2 -} - -func (x *Type) GetEdition() string { - if x != nil { - return x.Edition - } - return "" -} - -// A single field of a message type. -// -// New usages of this message as an alternative to FieldDescriptorProto are -// strongly discouraged. This message does not reliability preserve all -// information necessary to model the schema and preserve semantics. Instead -// make use of FileDescriptorSet which preserves the necessary information. -type Field struct { - state protoimpl.MessageState `protogen:"open.v1"` - // The field type. - Kind Field_Kind `protobuf:"varint,1,opt,name=kind,proto3,enum=google.protobuf.Field_Kind" json:"kind,omitempty"` - // The field cardinality. - Cardinality Field_Cardinality `protobuf:"varint,2,opt,name=cardinality,proto3,enum=google.protobuf.Field_Cardinality" json:"cardinality,omitempty"` - // The field number. - Number int32 `protobuf:"varint,3,opt,name=number,proto3" json:"number,omitempty"` - // The field name. - Name string `protobuf:"bytes,4,opt,name=name,proto3" json:"name,omitempty"` - // The field type URL, without the scheme, for message or enumeration - // types. Example: `"type.googleapis.com/google.protobuf.Timestamp"`. - TypeUrl string `protobuf:"bytes,6,opt,name=type_url,json=typeUrl,proto3" json:"type_url,omitempty"` - // The index of the field type in `Type.oneofs`, for message or enumeration - // types. The first type has index 1; zero means the type is not in the list. - OneofIndex int32 `protobuf:"varint,7,opt,name=oneof_index,json=oneofIndex,proto3" json:"oneof_index,omitempty"` - // Whether to use alternative packed wire representation. - Packed bool `protobuf:"varint,8,opt,name=packed,proto3" json:"packed,omitempty"` - // The protocol buffer options. - Options []*Option `protobuf:"bytes,9,rep,name=options,proto3" json:"options,omitempty"` - // The field JSON name. - JsonName string `protobuf:"bytes,10,opt,name=json_name,json=jsonName,proto3" json:"json_name,omitempty"` - // The string value of the default value of this field. Proto2 syntax only. - DefaultValue string `protobuf:"bytes,11,opt,name=default_value,json=defaultValue,proto3" json:"default_value,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *Field) Reset() { - *x = Field{} - mi := &file_google_protobuf_type_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *Field) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Field) ProtoMessage() {} - -func (x *Field) ProtoReflect() protoreflect.Message { - mi := &file_google_protobuf_type_proto_msgTypes[1] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Field.ProtoReflect.Descriptor instead. -func (*Field) Descriptor() ([]byte, []int) { - return file_google_protobuf_type_proto_rawDescGZIP(), []int{1} -} - -func (x *Field) GetKind() Field_Kind { - if x != nil { - return x.Kind - } - return Field_TYPE_UNKNOWN -} - -func (x *Field) GetCardinality() Field_Cardinality { - if x != nil { - return x.Cardinality - } - return Field_CARDINALITY_UNKNOWN -} - -func (x *Field) GetNumber() int32 { - if x != nil { - return x.Number - } - return 0 -} - -func (x *Field) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *Field) GetTypeUrl() string { - if x != nil { - return x.TypeUrl - } - return "" -} - -func (x *Field) GetOneofIndex() int32 { - if x != nil { - return x.OneofIndex - } - return 0 -} - -func (x *Field) GetPacked() bool { - if x != nil { - return x.Packed - } - return false -} - -func (x *Field) GetOptions() []*Option { - if x != nil { - return x.Options - } - return nil -} - -func (x *Field) GetJsonName() string { - if x != nil { - return x.JsonName - } - return "" -} - -func (x *Field) GetDefaultValue() string { - if x != nil { - return x.DefaultValue - } - return "" -} - -// Enum type definition. -// -// New usages of this message as an alternative to EnumDescriptorProto are -// strongly discouraged. This message does not reliability preserve all -// information necessary to model the schema and preserve semantics. Instead -// make use of FileDescriptorSet which preserves the necessary information. -type Enum struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Enum type name. - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // Enum value definitions. - Enumvalue []*EnumValue `protobuf:"bytes,2,rep,name=enumvalue,proto3" json:"enumvalue,omitempty"` - // Protocol buffer options. - Options []*Option `protobuf:"bytes,3,rep,name=options,proto3" json:"options,omitempty"` - // The source context. - SourceContext *sourcecontextpb.SourceContext `protobuf:"bytes,4,opt,name=source_context,json=sourceContext,proto3" json:"source_context,omitempty"` - // The source syntax. - Syntax Syntax `protobuf:"varint,5,opt,name=syntax,proto3,enum=google.protobuf.Syntax" json:"syntax,omitempty"` - // The source edition string, only valid when syntax is SYNTAX_EDITIONS. - Edition string `protobuf:"bytes,6,opt,name=edition,proto3" json:"edition,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *Enum) Reset() { - *x = Enum{} - mi := &file_google_protobuf_type_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *Enum) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Enum) ProtoMessage() {} - -func (x *Enum) ProtoReflect() protoreflect.Message { - mi := &file_google_protobuf_type_proto_msgTypes[2] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Enum.ProtoReflect.Descriptor instead. -func (*Enum) Descriptor() ([]byte, []int) { - return file_google_protobuf_type_proto_rawDescGZIP(), []int{2} -} - -func (x *Enum) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *Enum) GetEnumvalue() []*EnumValue { - if x != nil { - return x.Enumvalue - } - return nil -} - -func (x *Enum) GetOptions() []*Option { - if x != nil { - return x.Options - } - return nil -} - -func (x *Enum) GetSourceContext() *sourcecontextpb.SourceContext { - if x != nil { - return x.SourceContext - } - return nil -} - -func (x *Enum) GetSyntax() Syntax { - if x != nil { - return x.Syntax - } - return Syntax_SYNTAX_PROTO2 -} - -func (x *Enum) GetEdition() string { - if x != nil { - return x.Edition - } - return "" -} - -// Enum value definition. -// -// New usages of this message as an alternative to EnumValueDescriptorProto are -// strongly discouraged. This message does not reliability preserve all -// information necessary to model the schema and preserve semantics. Instead -// make use of FileDescriptorSet which preserves the necessary information. -type EnumValue struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Enum value name. - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // Enum value number. - Number int32 `protobuf:"varint,2,opt,name=number,proto3" json:"number,omitempty"` - // Protocol buffer options. - Options []*Option `protobuf:"bytes,3,rep,name=options,proto3" json:"options,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *EnumValue) Reset() { - *x = EnumValue{} - mi := &file_google_protobuf_type_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *EnumValue) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*EnumValue) ProtoMessage() {} - -func (x *EnumValue) ProtoReflect() protoreflect.Message { - mi := &file_google_protobuf_type_proto_msgTypes[3] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use EnumValue.ProtoReflect.Descriptor instead. -func (*EnumValue) Descriptor() ([]byte, []int) { - return file_google_protobuf_type_proto_rawDescGZIP(), []int{3} -} - -func (x *EnumValue) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *EnumValue) GetNumber() int32 { - if x != nil { - return x.Number - } - return 0 -} - -func (x *EnumValue) GetOptions() []*Option { - if x != nil { - return x.Options - } - return nil -} - -// A protocol buffer option, which can be attached to a message, field, -// enumeration, etc. -// -// New usages of this message as an alternative to FileOptions, MessageOptions, -// FieldOptions, EnumOptions, EnumValueOptions, ServiceOptions, or MethodOptions -// are strongly discouraged. -type Option struct { - state protoimpl.MessageState `protogen:"open.v1"` - // The option's name. For protobuf built-in options (options defined in - // descriptor.proto), this is the short name. For example, `"map_entry"`. - // For custom options, it should be the fully-qualified name. For example, - // `"google.api.http"`. - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // The option's value packed in an Any message. If the value is a primitive, - // the corresponding wrapper type defined in google/protobuf/wrappers.proto - // should be used. If the value is an enum, it should be stored as an int32 - // value using the google.protobuf.Int32Value type. - Value *anypb.Any `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *Option) Reset() { - *x = Option{} - mi := &file_google_protobuf_type_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *Option) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Option) ProtoMessage() {} - -func (x *Option) ProtoReflect() protoreflect.Message { - mi := &file_google_protobuf_type_proto_msgTypes[4] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Option.ProtoReflect.Descriptor instead. -func (*Option) Descriptor() ([]byte, []int) { - return file_google_protobuf_type_proto_rawDescGZIP(), []int{4} -} - -func (x *Option) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *Option) GetValue() *anypb.Any { - if x != nil { - return x.Value - } - return nil -} - -var File_google_protobuf_type_proto protoreflect.FileDescriptor - -const file_google_protobuf_type_proto_rawDesc = "" + - "\n" + - "\x1agoogle/protobuf/type.proto\x12\x0fgoogle.protobuf\x1a\x19google/protobuf/any.proto\x1a$google/protobuf/source_context.proto\"\xa7\x02\n" + - "\x04Type\x12\x12\n" + - "\x04name\x18\x01 \x01(\tR\x04name\x12.\n" + - "\x06fields\x18\x02 \x03(\v2\x16.google.protobuf.FieldR\x06fields\x12\x16\n" + - "\x06oneofs\x18\x03 \x03(\tR\x06oneofs\x121\n" + - "\aoptions\x18\x04 \x03(\v2\x17.google.protobuf.OptionR\aoptions\x12E\n" + - "\x0esource_context\x18\x05 \x01(\v2\x1e.google.protobuf.SourceContextR\rsourceContext\x12/\n" + - "\x06syntax\x18\x06 \x01(\x0e2\x17.google.protobuf.SyntaxR\x06syntax\x12\x18\n" + - "\aedition\x18\a \x01(\tR\aedition\"\xb4\x06\n" + - "\x05Field\x12/\n" + - "\x04kind\x18\x01 \x01(\x0e2\x1b.google.protobuf.Field.KindR\x04kind\x12D\n" + - "\vcardinality\x18\x02 \x01(\x0e2\".google.protobuf.Field.CardinalityR\vcardinality\x12\x16\n" + - "\x06number\x18\x03 \x01(\x05R\x06number\x12\x12\n" + - "\x04name\x18\x04 \x01(\tR\x04name\x12\x19\n" + - "\btype_url\x18\x06 \x01(\tR\atypeUrl\x12\x1f\n" + - "\voneof_index\x18\a \x01(\x05R\n" + - "oneofIndex\x12\x16\n" + - "\x06packed\x18\b \x01(\bR\x06packed\x121\n" + - "\aoptions\x18\t \x03(\v2\x17.google.protobuf.OptionR\aoptions\x12\x1b\n" + - "\tjson_name\x18\n" + - " \x01(\tR\bjsonName\x12#\n" + - "\rdefault_value\x18\v \x01(\tR\fdefaultValue\"\xc8\x02\n" + - "\x04Kind\x12\x10\n" + - "\fTYPE_UNKNOWN\x10\x00\x12\x0f\n" + - "\vTYPE_DOUBLE\x10\x01\x12\x0e\n" + - "\n" + - "TYPE_FLOAT\x10\x02\x12\x0e\n" + - "\n" + - "TYPE_INT64\x10\x03\x12\x0f\n" + - "\vTYPE_UINT64\x10\x04\x12\x0e\n" + - "\n" + - "TYPE_INT32\x10\x05\x12\x10\n" + - "\fTYPE_FIXED64\x10\x06\x12\x10\n" + - "\fTYPE_FIXED32\x10\a\x12\r\n" + - "\tTYPE_BOOL\x10\b\x12\x0f\n" + - "\vTYPE_STRING\x10\t\x12\x0e\n" + - "\n" + - "TYPE_GROUP\x10\n" + - "\x12\x10\n" + - "\fTYPE_MESSAGE\x10\v\x12\x0e\n" + - "\n" + - "TYPE_BYTES\x10\f\x12\x0f\n" + - "\vTYPE_UINT32\x10\r\x12\r\n" + - "\tTYPE_ENUM\x10\x0e\x12\x11\n" + - "\rTYPE_SFIXED32\x10\x0f\x12\x11\n" + - "\rTYPE_SFIXED64\x10\x10\x12\x0f\n" + - "\vTYPE_SINT32\x10\x11\x12\x0f\n" + - "\vTYPE_SINT64\x10\x12\"t\n" + - "\vCardinality\x12\x17\n" + - "\x13CARDINALITY_UNKNOWN\x10\x00\x12\x18\n" + - "\x14CARDINALITY_OPTIONAL\x10\x01\x12\x18\n" + - "\x14CARDINALITY_REQUIRED\x10\x02\x12\x18\n" + - "\x14CARDINALITY_REPEATED\x10\x03\"\x99\x02\n" + - "\x04Enum\x12\x12\n" + - "\x04name\x18\x01 \x01(\tR\x04name\x128\n" + - "\tenumvalue\x18\x02 \x03(\v2\x1a.google.protobuf.EnumValueR\tenumvalue\x121\n" + - "\aoptions\x18\x03 \x03(\v2\x17.google.protobuf.OptionR\aoptions\x12E\n" + - "\x0esource_context\x18\x04 \x01(\v2\x1e.google.protobuf.SourceContextR\rsourceContext\x12/\n" + - "\x06syntax\x18\x05 \x01(\x0e2\x17.google.protobuf.SyntaxR\x06syntax\x12\x18\n" + - "\aedition\x18\x06 \x01(\tR\aedition\"j\n" + - "\tEnumValue\x12\x12\n" + - "\x04name\x18\x01 \x01(\tR\x04name\x12\x16\n" + - "\x06number\x18\x02 \x01(\x05R\x06number\x121\n" + - "\aoptions\x18\x03 \x03(\v2\x17.google.protobuf.OptionR\aoptions\"H\n" + - "\x06Option\x12\x12\n" + - "\x04name\x18\x01 \x01(\tR\x04name\x12*\n" + - "\x05value\x18\x02 \x01(\v2\x14.google.protobuf.AnyR\x05value*C\n" + - "\x06Syntax\x12\x11\n" + - "\rSYNTAX_PROTO2\x10\x00\x12\x11\n" + - "\rSYNTAX_PROTO3\x10\x01\x12\x13\n" + - "\x0fSYNTAX_EDITIONS\x10\x02B{\n" + - "\x13com.google.protobufB\tTypeProtoP\x01Z-google.golang.org/protobuf/types/known/typepb\xf8\x01\x01\xa2\x02\x03GPB\xaa\x02\x1eGoogle.Protobuf.WellKnownTypesb\x06proto3" - -var ( - file_google_protobuf_type_proto_rawDescOnce sync.Once - file_google_protobuf_type_proto_rawDescData []byte -) - -func file_google_protobuf_type_proto_rawDescGZIP() []byte { - file_google_protobuf_type_proto_rawDescOnce.Do(func() { - file_google_protobuf_type_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_google_protobuf_type_proto_rawDesc), len(file_google_protobuf_type_proto_rawDesc))) - }) - return file_google_protobuf_type_proto_rawDescData -} - -var file_google_protobuf_type_proto_enumTypes = make([]protoimpl.EnumInfo, 3) -var file_google_protobuf_type_proto_msgTypes = make([]protoimpl.MessageInfo, 5) -var file_google_protobuf_type_proto_goTypes = []any{ - (Syntax)(0), // 0: google.protobuf.Syntax - (Field_Kind)(0), // 1: google.protobuf.Field.Kind - (Field_Cardinality)(0), // 2: google.protobuf.Field.Cardinality - (*Type)(nil), // 3: google.protobuf.Type - (*Field)(nil), // 4: google.protobuf.Field - (*Enum)(nil), // 5: google.protobuf.Enum - (*EnumValue)(nil), // 6: google.protobuf.EnumValue - (*Option)(nil), // 7: google.protobuf.Option - (*sourcecontextpb.SourceContext)(nil), // 8: google.protobuf.SourceContext - (*anypb.Any)(nil), // 9: google.protobuf.Any -} -var file_google_protobuf_type_proto_depIdxs = []int32{ - 4, // 0: google.protobuf.Type.fields:type_name -> google.protobuf.Field - 7, // 1: google.protobuf.Type.options:type_name -> google.protobuf.Option - 8, // 2: google.protobuf.Type.source_context:type_name -> google.protobuf.SourceContext - 0, // 3: google.protobuf.Type.syntax:type_name -> google.protobuf.Syntax - 1, // 4: google.protobuf.Field.kind:type_name -> google.protobuf.Field.Kind - 2, // 5: google.protobuf.Field.cardinality:type_name -> google.protobuf.Field.Cardinality - 7, // 6: google.protobuf.Field.options:type_name -> google.protobuf.Option - 6, // 7: google.protobuf.Enum.enumvalue:type_name -> google.protobuf.EnumValue - 7, // 8: google.protobuf.Enum.options:type_name -> google.protobuf.Option - 8, // 9: google.protobuf.Enum.source_context:type_name -> google.protobuf.SourceContext - 0, // 10: google.protobuf.Enum.syntax:type_name -> google.protobuf.Syntax - 7, // 11: google.protobuf.EnumValue.options:type_name -> google.protobuf.Option - 9, // 12: google.protobuf.Option.value:type_name -> google.protobuf.Any - 13, // [13:13] is the sub-list for method output_type - 13, // [13:13] is the sub-list for method input_type - 13, // [13:13] is the sub-list for extension type_name - 13, // [13:13] is the sub-list for extension extendee - 0, // [0:13] is the sub-list for field type_name -} - -func init() { file_google_protobuf_type_proto_init() } -func file_google_protobuf_type_proto_init() { - if File_google_protobuf_type_proto != nil { - return - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: unsafe.Slice(unsafe.StringData(file_google_protobuf_type_proto_rawDesc), len(file_google_protobuf_type_proto_rawDesc)), - NumEnums: 3, - NumMessages: 5, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_google_protobuf_type_proto_goTypes, - DependencyIndexes: file_google_protobuf_type_proto_depIdxs, - EnumInfos: file_google_protobuf_type_proto_enumTypes, - MessageInfos: file_google_protobuf_type_proto_msgTypes, - }.Build() - File_google_protobuf_type_proto = out.File - file_google_protobuf_type_proto_goTypes = nil - file_google_protobuf_type_proto_depIdxs = nil -} diff --git a/vendor/modules.txt b/vendor/modules.txt index 1c6bba7903..d9b317cc7a 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -3,7 +3,6 @@ cel.dev/expr # cloud.google.com/go v0.123.0 ## explicit; go 1.24.0 -cloud.google.com/go cloud.google.com/go/internal cloud.google.com/go/internal/optional cloud.google.com/go/internal/trace @@ -36,38 +35,15 @@ cloud.google.com/go/auth/oauth2adapt # cloud.google.com/go/compute/metadata v0.9.0 ## explicit; go 1.24.0 cloud.google.com/go/compute/metadata -# cloud.google.com/go/container v1.49.0 -## explicit; go 1.25.0 -cloud.google.com/go/container/apiv1 -cloud.google.com/go/container/apiv1/containerpb -cloud.google.com/go/container/internal # cloud.google.com/go/iam v1.9.0 ## explicit; go 1.25.0 cloud.google.com/go/iam cloud.google.com/go/iam/apiv1/iampb -# cloud.google.com/go/longrunning v0.9.0 -## explicit; go 1.25.0 -cloud.google.com/go/longrunning -cloud.google.com/go/longrunning/autogen -cloud.google.com/go/longrunning/autogen/longrunningpb -cloud.google.com/go/longrunning/internal # cloud.google.com/go/monitoring v1.24.3 ## explicit; go 1.24.0 cloud.google.com/go/monitoring/apiv3/v2 cloud.google.com/go/monitoring/apiv3/v2/monitoringpb -cloud.google.com/go/monitoring/dashboard/apiv1 -cloud.google.com/go/monitoring/dashboard/apiv1/dashboardpb cloud.google.com/go/monitoring/internal -# cloud.google.com/go/resourcemanager v1.13.0 -## explicit; go 1.25.0 -cloud.google.com/go/resourcemanager/apiv3 -cloud.google.com/go/resourcemanager/apiv3/resourcemanagerpb -cloud.google.com/go/resourcemanager/internal -# cloud.google.com/go/serviceusage v1.14.0 -## explicit; go 1.25.0 -cloud.google.com/go/serviceusage/apiv1 -cloud.google.com/go/serviceusage/apiv1/serviceusagepb -cloud.google.com/go/serviceusage/internal # cloud.google.com/go/storage v1.62.1 ## explicit; go 1.25.0 cloud.google.com/go/storage @@ -1387,7 +1363,6 @@ gonum.org/v1/gonum/stat/distuv ## explicit; go 1.25.0 google.golang.org/api/googleapi google.golang.org/api/googleapi/transport -google.golang.org/api/iam/v1 google.golang.org/api/iamcredentials/v1 google.golang.org/api/internal google.golang.org/api/internal/cert @@ -1398,8 +1373,6 @@ google.golang.org/api/internal/third_party/uritemplates google.golang.org/api/iterator google.golang.org/api/option google.golang.org/api/option/internaloption -google.golang.org/api/servicenetworking/v1 -google.golang.org/api/sqladmin/v1 google.golang.org/api/storage/v1 google.golang.org/api/transport google.golang.org/api/transport/grpc @@ -1409,7 +1382,6 @@ google.golang.org/api/transport/http google.golang.org/genproto/googleapis/type/calendarperiod google.golang.org/genproto/googleapis/type/date google.golang.org/genproto/googleapis/type/expr -google.golang.org/genproto/googleapis/type/interval google.golang.org/genproto/googleapis/type/timeofday # google.golang.org/genproto/googleapis/api v0.0.0-20260803160001-6ac0973c030d ## explicit; go 1.25.0 @@ -1421,7 +1393,6 @@ google.golang.org/genproto/googleapis/api/httpbody google.golang.org/genproto/googleapis/api/label google.golang.org/genproto/googleapis/api/metric google.golang.org/genproto/googleapis/api/monitoredres -google.golang.org/genproto/googleapis/api/serviceconfig google.golang.org/genproto/googleapis/api/visibility # google.golang.org/genproto/googleapis/rpc v0.0.0-20260803160001-6ac0973c030d ## explicit; go 1.25.0 @@ -1639,14 +1610,11 @@ google.golang.org/protobuf/types/descriptorpb google.golang.org/protobuf/types/dynamicpb google.golang.org/protobuf/types/gofeaturespb google.golang.org/protobuf/types/known/anypb -google.golang.org/protobuf/types/known/apipb google.golang.org/protobuf/types/known/durationpb google.golang.org/protobuf/types/known/emptypb google.golang.org/protobuf/types/known/fieldmaskpb -google.golang.org/protobuf/types/known/sourcecontextpb google.golang.org/protobuf/types/known/structpb google.golang.org/protobuf/types/known/timestamppb -google.golang.org/protobuf/types/known/typepb google.golang.org/protobuf/types/known/wrapperspb # gopkg.in/evanphx/json-patch.v4 v4.13.0 ## explicit